Closed billguo99 closed 2 years ago
Tested in GraphQL Playground 🎉 Mutation:
mutation{
sendSMS(body: "Hi", to: "+27825893193")
}
Return:
{
"data": {
"sendSMS": "SM920c33ad3e8044fba8b1ff03e7f0ca90"
}
}
ToDo:
sendSMS
functionality to be able to send to a list of numbersMerging #411 (09c0197) into staging (684f754) will decrease coverage by
0.32%
. The diff coverage is62.50%
.
@@ Coverage Diff @@
## staging #411 +/- ##
===========================================
- Coverage 77.49% 77.17% -0.33%
===========================================
Files 147 151 +4
Lines 2191 2239 +48
Branches 140 142 +2
===========================================
+ Hits 1698 1728 +30
- Misses 459 476 +17
- Partials 34 35 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/query-data/query-data.service.ts | 36.76% <0.00%> (-2.92%) |
:arrow_down: |
src/messaging/messaging.service.ts | 37.50% <37.50%> (ø) |
|
src/queries/queries.service.ts | 50.69% <40.00%> (-0.39%) |
:arrow_down: |
src/app-config/app-config.module.ts | 100.00% <100.00%> (ø) |
|
src/app-config/app-config.service.ts | 92.30% <100.00%> (+1.00%) |
:arrow_up: |
src/app-config/config/twilio.config.ts | 100.00% <100.00%> (ø) |
|
src/app.module.ts | 97.14% <100.00%> (+0.08%) |
:arrow_up: |
src/messaging/messaging.constants.ts | 100.00% <100.00%> (ø) |
|
src/messaging/messaging.module.ts | 100.00% <100.00%> (ø) |
|
src/queries/dto/create-event-query.input.ts | 96.55% <100.00%> (+0.12%) |
:arrow_up: |
... and 1 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 684f754...09c0197. Read the comment docs.
Working for list of numbers: Mutation:
mutation{
sendBulkSMS(message: "Testing duo numbers", numbers: ["+27765588901","+27825893193"])
}
Return:
{
"data": {
"sendBulkSMS": "SMbbef6c02daf9407aab82c03bb35277d5,SM9731072d7dd34ccdb092156e9aed0ab4"
}
}
Resolves #406.
and Whatsappmessages to a list of numbers.Steps done:
yarn add twilio
nestjs-twiliomessaging
twilio.config.ts
in config, to useAppConfigService
to setup Twilio client inMessagingModule
customdirector @InjectTwilioMESSGING_OPTIONS
to inject creds intoMessagingService
Twilio client and create simpleasync sendSMS()
function