@sinch/sms 1.2.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -0
- package/dist/models/v1/add-keyword/add-keyword.d.ts +13 -0
- package/dist/models/v1/{group-object-auto-update-remove/group-object-auto-update-remove.js → add-keyword/add-keyword.js} +1 -1
- package/dist/models/v1/add-keyword/add-keyword.js.map +1 -0
- package/dist/models/v1/add-keyword/index.d.ts +1 -0
- package/dist/models/v1/add-keyword/index.js.map +1 -0
- package/dist/models/v1/api-mo-message/api-mo-message.d.ts +4 -6
- package/dist/models/v1/api-update-binary-mt-message/api-update-binary-mt-message.d.ts +12 -3
- package/dist/models/v1/api-update-mms-mt-message/api-update-mms-mt-message.d.ts +8 -3
- package/dist/models/v1/api-update-text-mt-message/api-update-text-mt-message.d.ts +17 -2
- package/dist/models/v1/binary-request/binary-request.d.ts +2 -8
- package/dist/models/v1/binary-response/binary-response.d.ts +5 -10
- package/dist/models/v1/create-group-request/create-group-request.d.ts +5 -5
- package/dist/models/v1/enums.d.ts +14 -2
- package/dist/models/v1/group/group.d.ts +2 -2
- package/dist/models/v1/group-auto-update/group-auto-update.d.ts +7 -3
- package/dist/models/v1/inbound-message-response/inbound-message-response.d.ts +2 -1
- package/dist/models/v1/index.d.ts +7 -7
- package/dist/models/v1/index.js +7 -7
- package/dist/models/v1/index.js.map +1 -1
- package/dist/models/v1/media-body/media-body.d.ts +2 -0
- package/dist/models/v1/media-request/media-request.d.ts +5 -5
- package/dist/models/v1/media-response/media-response.d.ts +5 -5
- package/dist/models/v1/message-delivery-status/message-delivery-status.d.ts +4 -4
- package/dist/models/v1/mms-media/index.d.ts +1 -0
- package/dist/models/v1/mms-media/index.js.map +1 -0
- package/dist/models/v1/mms-media/mms-media.d.ts +13 -0
- package/dist/models/v1/mms-media/mms-media.js +3 -0
- package/dist/models/v1/mms-media/mms-media.js.map +1 -0
- package/dist/models/v1/mms-mo-body/index.d.ts +1 -0
- package/dist/models/v1/mms-mo-body/index.js.map +1 -0
- package/dist/models/v1/mms-mo-body/mms-mo-body.d.ts +12 -0
- package/dist/models/v1/mms-mo-body/mms-mo-body.js +3 -0
- package/dist/models/v1/mms-mo-body/mms-mo-body.js.map +1 -0
- package/dist/models/v1/mo-binary/mo-binary.d.ts +1 -1
- package/dist/models/v1/mo-media/index.d.ts +1 -0
- package/dist/models/v1/mo-media/index.js.map +1 -0
- package/dist/models/v1/mo-media/mo-media.d.ts +8 -0
- package/dist/models/v1/mo-media/mo-media.js +3 -0
- package/dist/models/v1/mo-media/mo-media.js.map +1 -0
- package/dist/models/v1/recipient-delivery-report/recipient-delivery-report.d.ts +4 -4
- package/dist/models/v1/remove-keyword/index.d.ts +1 -0
- package/dist/models/v1/remove-keyword/index.js.map +1 -0
- package/dist/models/v1/remove-keyword/remove-keyword.d.ts +13 -0
- package/dist/models/v1/{update-group-request-auto-update-add/update-group-request-auto-update-add.js → remove-keyword/remove-keyword.js} +1 -1
- package/dist/models/v1/remove-keyword/remove-keyword.js.map +1 -0
- package/dist/models/v1/replace-group-request/replace-group-request.d.ts +6 -1
- package/dist/models/v1/requests/delivery-reports/delivery-reports-request-data.d.ts +13 -9
- package/dist/models/v1/requests/groups/groups-request-data.d.ts +3 -3
- package/dist/models/v1/text-request/text-request.d.ts +2 -2
- package/dist/models/v1/text-response/text-response.d.ts +1 -1
- package/dist/models/v1/update-group-request/update-group-request.d.ts +3 -3
- package/dist/rest/v1/batches/batches-api.d.ts +4 -8
- package/dist/rest/v1/batches/batches-api.js +12 -16
- package/dist/rest/v1/batches/batches-api.js.map +1 -1
- package/dist/rest/v1/batches/index.d.ts +1 -0
- package/dist/rest/v1/batches/index.js +1 -0
- package/dist/rest/v1/batches/index.js.map +1 -1
- package/dist/rest/v1/callbacks/callbacks-webhook.d.ts +12 -3
- package/dist/rest/v1/callbacks/callbacks-webhook.js +34 -6
- package/dist/rest/v1/callbacks/callbacks-webhook.js.map +1 -1
- package/dist/rest/v1/delivery-reports/delivery-reports-api.d.ts +4 -8
- package/dist/rest/v1/delivery-reports/delivery-reports-api.js +3 -11
- package/dist/rest/v1/delivery-reports/delivery-reports-api.js.map +1 -1
- package/dist/rest/v1/delivery-reports/index.d.ts +1 -0
- package/dist/rest/v1/delivery-reports/index.js +1 -0
- package/dist/rest/v1/delivery-reports/index.js.map +1 -1
- package/dist/rest/v1/groups/groups-api.d.ts +4 -8
- package/dist/rest/v1/groups/groups-api.js +3 -15
- package/dist/rest/v1/groups/groups-api.js.map +1 -1
- package/dist/rest/v1/groups/index.d.ts +1 -0
- package/dist/rest/v1/groups/index.js +1 -0
- package/dist/rest/v1/groups/index.js.map +1 -1
- package/dist/rest/v1/inbounds/inbounds-api.d.ts +4 -8
- package/dist/rest/v1/inbounds/inbounds-api.js +3 -10
- package/dist/rest/v1/inbounds/inbounds-api.js.map +1 -1
- package/dist/rest/v1/inbounds/index.d.ts +1 -0
- package/dist/rest/v1/inbounds/index.js +1 -0
- package/dist/rest/v1/inbounds/index.js.map +1 -1
- package/dist/rest/v1/index.d.ts +1 -1
- package/dist/rest/v1/index.js +1 -1
- package/dist/rest/v1/index.js.map +1 -1
- package/dist/rest/v1/sms-domain-api.d.ts +12 -14
- package/dist/rest/v1/sms-domain-api.js +22 -48
- package/dist/rest/v1/sms-domain-api.js.map +1 -1
- package/dist/rest/v1/sms-service.d.ts +13 -1
- package/dist/rest/v1/sms-service.js +65 -13
- package/dist/rest/v1/sms-service.js.map +1 -1
- package/package.json +2 -2
- package/dist/models/v1/group-object-auto-update/group-object-auto-update.d.ts +0 -10
- package/dist/models/v1/group-object-auto-update/group-object-auto-update.js +0 -3
- package/dist/models/v1/group-object-auto-update/group-object-auto-update.js.map +0 -1
- package/dist/models/v1/group-object-auto-update/index.d.ts +0 -1
- package/dist/models/v1/group-object-auto-update/index.js.map +0 -1
- package/dist/models/v1/group-object-auto-update-remove/group-object-auto-update-remove.d.ts +0 -13
- package/dist/models/v1/group-object-auto-update-remove/group-object-auto-update-remove.js.map +0 -1
- package/dist/models/v1/group-object-auto-update-remove/index.d.ts +0 -1
- package/dist/models/v1/group-object-auto-update-remove/index.js.map +0 -1
- package/dist/models/v1/update-group-request-auto-update/index.d.ts +0 -1
- package/dist/models/v1/update-group-request-auto-update/index.js.map +0 -1
- package/dist/models/v1/update-group-request-auto-update/update-group-request-auto-update.d.ts +0 -10
- package/dist/models/v1/update-group-request-auto-update/update-group-request-auto-update.js +0 -3
- package/dist/models/v1/update-group-request-auto-update/update-group-request-auto-update.js.map +0 -1
- package/dist/models/v1/update-group-request-auto-update-add/index.d.ts +0 -1
- package/dist/models/v1/update-group-request-auto-update-add/index.js.map +0 -1
- package/dist/models/v1/update-group-request-auto-update-add/update-group-request-auto-update-add.d.ts +0 -10
- package/dist/models/v1/update-group-request-auto-update-add/update-group-request-auto-update-add.js.map +0 -1
- package/dist/models/v1/update-group-request-auto-update-remove/index.d.ts +0 -1
- package/dist/models/v1/update-group-request-auto-update-remove/index.js.map +0 -1
- package/dist/models/v1/update-group-request-auto-update-remove/update-group-request-auto-update-remove.d.ts +0 -13
- package/dist/models/v1/update-group-request-auto-update-remove/update-group-request-auto-update-remove.js +0 -8
- package/dist/models/v1/update-group-request-auto-update-remove/update-group-request-auto-update-remove.js.map +0 -1
- package/dist/rest/v1/fixtures.jest.d.ts +0 -4
- package/dist/rest/v1/fixtures.jest.js +0 -12
- package/dist/rest/v1/fixtures.jest.js.map +0 -1
- /package/dist/models/v1/{group-object-auto-update-remove → add-keyword}/index.js +0 -0
- /package/dist/models/v1/{group-object-auto-update → mms-media}/index.js +0 -0
- /package/dist/models/v1/{update-group-request-auto-update-add → mms-mo-body}/index.js +0 -0
- /package/dist/models/v1/{update-group-request-auto-update-remove → mo-media}/index.js +0 -0
- /package/dist/models/v1/{update-group-request-auto-update → remove-keyword}/index.js +0 -0
package/README.md
CHANGED
|
@@ -143,6 +143,22 @@ const response_1: Sms.SendSMSResponse = await smsServiceWithProjectId.batches.se
|
|
|
143
143
|
const response_2: Sms.SendSMSResponse = await smsServiceWithServicePlanId.batches.send(requestData);
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
+
## Other parameters
|
|
147
|
+
|
|
148
|
+
`smsHostname`: You can override the default hostname used to send requests to the SMS API by providing the `smsHostname` parameter in the `SinchClientParameters` object. By default, the hostname is built based on the selected region and authentication method.
|
|
149
|
+
- For OAuth2 authentication, the default hostname is `zt.{region}.sms.api.sinch.com`
|
|
150
|
+
- For API Token authentication, the default hostname is `{region}.sms.api.sinch.com`
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
const credentials: UnifiedCredentials = {
|
|
154
|
+
projectId: 'PROJECT_ID',
|
|
155
|
+
keyId: 'KEY_ID',
|
|
156
|
+
keySecret: 'KEY_SECRET',
|
|
157
|
+
smsHostname: 'my.custom.domain.com',
|
|
158
|
+
};
|
|
159
|
+
const smsService = new SmsService(credentials);
|
|
160
|
+
```
|
|
161
|
+
|
|
146
162
|
## Promises
|
|
147
163
|
|
|
148
164
|
All the methods that interact with the Sinch APIs use Promises. You can use `await` in an `async` method to wait for the response, or you can resolve them yourself with `then()` / `catch()`.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Keyword to be sent in MO to add MSISDN to a group
|
|
3
|
+
*/
|
|
4
|
+
export interface AddKeyword {
|
|
5
|
+
/** Opt-in keyword like "JOIN" if `auto_update.to` is dedicated long/short number or unique brand keyword like "Sinch" if it is a shared short code. */
|
|
6
|
+
first_word: string;
|
|
7
|
+
/** Opt-in keyword like "JOIN" if `auto_update.to` is shared short code. */
|
|
8
|
+
second_word?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Validation regex for first_word */
|
|
11
|
+
export declare const firstWordPattern: RegExp;
|
|
12
|
+
/** Validation regex for second_word */
|
|
13
|
+
export declare const secondWordPattern: RegExp;
|
|
@@ -5,4 +5,4 @@ exports.secondWordPattern = exports.firstWordPattern = void 0;
|
|
|
5
5
|
exports.firstWordPattern = /^\w+$/;
|
|
6
6
|
/** Validation regex for second_word */
|
|
7
7
|
exports.secondWordPattern = /^\w+$/;
|
|
8
|
-
//# sourceMappingURL=
|
|
8
|
+
//# sourceMappingURL=add-keyword.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-keyword.js","sourceRoot":"","sources":["../../../../src/models/v1/add-keyword/add-keyword.ts"],"names":[],"mappings":";;;AAUA,sCAAsC;AACzB,QAAA,gBAAgB,GAAG,OAAO,CAAC;AAExC,uCAAuC;AAC1B,QAAA,iBAAiB,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { AddKeyword } from './add-keyword';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/add-keyword/index.ts"],"names":[],"mappings":""}
|
|
@@ -2,20 +2,18 @@
|
|
|
2
2
|
* The page of inbounds matching the given filters.
|
|
3
3
|
*/
|
|
4
4
|
export interface ApiMoMessage {
|
|
5
|
-
body?: string;
|
|
6
5
|
/** If this inbound message is in response to a previously sent message that contained a client reference, then this field contains *that* client reference. Utilizing this feature requires additional setup on your account. Contact your <a href=\"https://dashboard.sinch.com/settings/account-details\" target=\"_blank\">account manager</a> to enable this feature. */
|
|
7
6
|
client_reference?: string;
|
|
8
|
-
/** The phone number that sent the message.
|
|
7
|
+
/** The phone number that sent the message. [More info](https://community.sinch.com/t5/Glossary/MSISDN/ta-p/7628) */
|
|
9
8
|
from: string;
|
|
10
9
|
/** The ID of this inbound message. */
|
|
11
10
|
id: string;
|
|
12
|
-
/** The MCC/MNC of the sender
|
|
11
|
+
/** The MCC/MNC of the sender's operator if known. */
|
|
13
12
|
operator_id?: string;
|
|
14
|
-
/** When the system received the message. Formatted as
|
|
13
|
+
/** When the system received the message. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): `YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
15
14
|
received_at: Date;
|
|
16
|
-
/** When the message left the originating device. Only available if provided by operator. Formatted as
|
|
15
|
+
/** When the message left the originating device. Only available if provided by operator. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): `YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
17
16
|
sent_at?: Date;
|
|
18
17
|
/** The Sinch phone number or short code to which the message was sent. */
|
|
19
18
|
to: string;
|
|
20
|
-
type: string;
|
|
21
19
|
}
|
|
@@ -2,7 +2,7 @@ import { DeliveryReportEnum } from '../enums';
|
|
|
2
2
|
export interface ApiUpdateBinaryMtMessage {
|
|
3
3
|
/** Sender number. Must be valid phone number, short code or alphanumeric. */
|
|
4
4
|
from?: string;
|
|
5
|
-
/** SMS in binary format */
|
|
5
|
+
/** SMS in [binary](https://community.sinch.com/t5/Glossary/Binary-SMS/ta-p/7470) format. */
|
|
6
6
|
type?: 'mt_binary';
|
|
7
7
|
/** List of phone numbers and group IDs to add to the batch. */
|
|
8
8
|
to_add?: string[];
|
|
@@ -10,14 +10,23 @@ export interface ApiUpdateBinaryMtMessage {
|
|
|
10
10
|
to_remove?: string[];
|
|
11
11
|
/** Request delivery report callback. Note that delivery reports can be fetched from the API regardless of this setting. */
|
|
12
12
|
delivery_report?: DeliveryReportEnum;
|
|
13
|
-
/** If set, in the future the message will be delayed until `send_at` occurs. Formatted as
|
|
13
|
+
/** If set, in the future the message will be delayed until `send_at` occurs. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): `YYYY-MM-DDThh:mm:ss.SSSZ`. Constraints: Must be before expire_at. If set in the past, messages will be sent immediately. */
|
|
14
14
|
send_at?: Date;
|
|
15
|
-
/** If set, the system will stop trying to deliver the message at this point.
|
|
15
|
+
/** If set, the system will stop trying to deliver the message at this point.
|
|
16
|
+
* Must be after `send_at`. Default and max is 3 days after `send_at`. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
16
17
|
expire_at?: Date;
|
|
17
18
|
/** Override the default callback URL for this batch. Constraints: Must be valid URL. */
|
|
18
19
|
callback_url?: string;
|
|
20
|
+
/** The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch. */
|
|
21
|
+
client_reference?: string;
|
|
22
|
+
/** If set to true then [feedback](https://developers.sinch.com/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
|
|
23
|
+
feedback_enabled?: boolean;
|
|
19
24
|
/** The message content Base64 encoded. Max 140 bytes together with udh. */
|
|
20
25
|
body?: string;
|
|
21
26
|
/** The UDH header of a binary message HEX encoded. Max 140 bytes together with body. */
|
|
22
27
|
udh?: string;
|
|
28
|
+
/** The type of number for the sender number. Use to override the automatic detection. */
|
|
29
|
+
from_ton?: number;
|
|
30
|
+
/** Number Plan Indicator for the sender number. Use to override the automatic detection. */
|
|
31
|
+
from_npi?: number;
|
|
23
32
|
}
|
|
@@ -12,16 +12,21 @@ export interface ApiUpdateMmsMtMessage {
|
|
|
12
12
|
to_remove?: string[];
|
|
13
13
|
/** Request delivery report callback. Note that delivery reports can be fetched from the API regardless of this setting. */
|
|
14
14
|
delivery_report?: DeliveryReportEnum;
|
|
15
|
-
/** If set, in the future the message will be delayed until `send_at` occurs. Formatted as
|
|
15
|
+
/** If set, in the future the message will be delayed until `send_at` occurs. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): `YYYY-MM-DDThh:mm:ss.SSSZ`. Constraints: Must be before expire_at. If set in the past, messages will be sent immediately. */
|
|
16
16
|
send_at?: Date;
|
|
17
|
-
/** If set, the system will stop trying to deliver the message at this point.
|
|
17
|
+
/** If set, the system will stop trying to deliver the message at this point.
|
|
18
|
+
* Must be after `send_at`. Default and max is 3 days after `send_at`. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): `YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
18
19
|
expire_at?: Date;
|
|
19
20
|
/** Override the default callback URL for this batch. Constraints: Must be valid URL. */
|
|
20
21
|
callback_url?: string;
|
|
22
|
+
/** The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch */
|
|
23
|
+
client_reference?: string;
|
|
24
|
+
/** If set to `true`, then [feedback](https://developers.sinch.com/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
|
|
25
|
+
feedback_enabled?: boolean;
|
|
21
26
|
/** @see MediaBody */
|
|
22
27
|
body?: MediaBody;
|
|
23
28
|
/** @see ParameterGroup */
|
|
24
29
|
parameters?: ParameterGroup;
|
|
25
|
-
/** Whether or not you want the media included in your message to be checked against [Sinch MMS channel best practices](/docs/mms/bestpractices/). If set to true, your message will be rejected if it doesn
|
|
30
|
+
/** Whether or not you want the media included in your message to be checked against [Sinch MMS channel best practices](https://developers.sinch.com/docs/mms/bestpractices/). If set to true, your message will be rejected if it doesn't conform to the listed recommendations, otherwise no validation will be performed. */
|
|
26
31
|
strict_validation?: boolean;
|
|
27
32
|
}
|
|
@@ -11,14 +11,29 @@ export interface ApiUpdateTextMtMessage {
|
|
|
11
11
|
to_remove?: string[];
|
|
12
12
|
/** Request delivery report callback. Note that delivery reports can be fetched from the API regardless of this setting. */
|
|
13
13
|
delivery_report?: DeliveryReportEnum;
|
|
14
|
-
/** If set, in the future the message will be delayed until `send_at` occurs. Formatted as
|
|
14
|
+
/** If set, in the future the message will be delayed until `send_at` occurs. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): `YYYY-MM-DDThh:mm:ss.SSSZ`. Constraints: Must be before expire_at. If set in the past, messages will be sent immediately. */
|
|
15
15
|
send_at?: Date;
|
|
16
|
-
/** If set, the system will stop trying to deliver the message at this point.
|
|
16
|
+
/** If set, the system will stop trying to deliver the message at this point.
|
|
17
|
+
* Must be after `send_at`. Default and max is 3 days after `send_at`. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): `YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
17
18
|
expire_at?: Date;
|
|
18
19
|
/** Override the default callback URL for this batch. Constraints: Must be valid URL. */
|
|
19
20
|
callback_url?: string;
|
|
21
|
+
/** The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch */
|
|
22
|
+
client_reference?: string;
|
|
23
|
+
/** If set to `true`, then [feedback](https://developers.sinch.com/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
|
|
24
|
+
feedback_enabled?: boolean;
|
|
20
25
|
/** @see ParameterGroup */
|
|
21
26
|
parameters?: ParameterGroup;
|
|
22
27
|
/** The message content */
|
|
23
28
|
body?: string;
|
|
29
|
+
/** The type of number for the sender number. Use to override the automatic detection. */
|
|
30
|
+
from_ton?: number;
|
|
31
|
+
/** Number Plan Indicator for the sender number. Use to override the automatic detection. */
|
|
32
|
+
from_npi?: number;
|
|
33
|
+
/** Message will be dispatched only if it is not split to more parts than Max Number of Message Parts */
|
|
34
|
+
max_number_of_message_parts?: number;
|
|
35
|
+
/** If set to `true` the message will be shortened when exceeding one part. */
|
|
36
|
+
truncate_concat?: boolean;
|
|
37
|
+
/** Shows message on screen without user interaction while not saving the message to the inbox. */
|
|
38
|
+
flash_message?: boolean;
|
|
24
39
|
}
|
|
@@ -8,7 +8,7 @@ export interface BinaryRequest {
|
|
|
8
8
|
body: string;
|
|
9
9
|
/** The UDH header of a binary message HEX encoded. Max 140 bytes including the `body`. */
|
|
10
10
|
udh: string;
|
|
11
|
-
/** SMS in
|
|
11
|
+
/** SMS in [binary](https://community.sinch.com/t5/Glossary/Binary-SMS/ta-p/7470) format. */
|
|
12
12
|
type?: 'mt_binary';
|
|
13
13
|
/** Request delivery report callback. Note that delivery reports can be fetched from the API regardless of this setting. */
|
|
14
14
|
delivery_report?: DeliveryReportEnum;
|
|
@@ -22,14 +22,8 @@ export interface BinaryRequest {
|
|
|
22
22
|
callback_url?: string;
|
|
23
23
|
/** The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch. */
|
|
24
24
|
client_reference?: string;
|
|
25
|
-
/** If set to true then [feedback](/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
|
|
25
|
+
/** If set to true then [feedback](https://developers.sinch.com/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
|
|
26
26
|
feedback_enabled?: boolean;
|
|
27
|
-
/** Shows message on screen without user interaction while not saving the message to the inbox. */
|
|
28
|
-
flash_message?: boolean;
|
|
29
|
-
/** If set to `true`, the message will be shortened when exceeding one part. */
|
|
30
|
-
truncate_concat?: boolean;
|
|
31
|
-
/** Message will be dispatched only if it is not split to more parts than the maximum number of message parts. */
|
|
32
|
-
max_number_of_message_parts?: number;
|
|
33
27
|
/** The type of number for the sender number. Use to override the automatic detection. */
|
|
34
28
|
from_ton?: number;
|
|
35
29
|
/** Number Plan Indicator for the sender number. Use to override the automatic detection. */
|
|
@@ -10,9 +10,9 @@ export interface BinaryResponse {
|
|
|
10
10
|
canceled?: boolean;
|
|
11
11
|
/** The message content provided. Base64 encoded. */
|
|
12
12
|
body?: string;
|
|
13
|
-
/** The
|
|
13
|
+
/** The [UDH](https://community.sinch.com/t5/Glossary/UDH-User-Data-Header/ta-p/7776) header of a binary message HEX encoded. Max 140 bytes including the `body`. */
|
|
14
14
|
udh?: string;
|
|
15
|
-
/** SMS in
|
|
15
|
+
/** SMS in [binary](https://community.sinch.com/t5/Glossary/Binary-SMS/ta-p/7470) format. */
|
|
16
16
|
type?: 'mt_binary';
|
|
17
17
|
/** Timestamp for when batch was created. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
18
18
|
created_at?: Date;
|
|
@@ -22,20 +22,15 @@ export interface BinaryResponse {
|
|
|
22
22
|
delivery_report?: DeliveryReportEnum;
|
|
23
23
|
/** If set, the date and time the message should be delivered. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601). For example: `YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
24
24
|
send_at?: Date;
|
|
25
|
-
/** If set, the
|
|
25
|
+
/** If set, the system will stop trying to deliver the message at this point.
|
|
26
|
+
* Must be after `send_at`. Default and max is 3 days after `send_at`. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): `YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
26
27
|
expire_at?: Date;
|
|
27
28
|
/** The callback URL provided in the request. */
|
|
28
29
|
callback_url?: string;
|
|
29
30
|
/** The string input to identify this batch message. If set, the identifier will be added in the delivery report/callback of this batch. */
|
|
30
31
|
client_reference?: string;
|
|
31
|
-
/** If set to true
|
|
32
|
+
/** If set to true then [feedback](https://developers.sinch.com/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
|
|
32
33
|
feedback_enabled?: boolean;
|
|
33
|
-
/** If sent as a flash message, displays `true`. */
|
|
34
|
-
flash_message?: boolean;
|
|
35
|
-
/** If set to `true`, the message was shortened when exceeding one part. */
|
|
36
|
-
truncate_concat?: boolean;
|
|
37
|
-
/** Displays the number of message parts set in the request. */
|
|
38
|
-
max_number_of_message_parts?: number;
|
|
39
34
|
/** The type of number for the sender number. */
|
|
40
35
|
from_ton?: number;
|
|
41
36
|
/** Number Plan Indicator for the sender number. */
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GroupAutoUpdate } from '../group-auto-update';
|
|
2
2
|
export interface CreateGroupRequest {
|
|
3
3
|
/** Name of the group */
|
|
4
4
|
name?: string;
|
|
5
|
-
/**
|
|
5
|
+
/** Initial list of phone numbers in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format [MSISDNs](https://community.sinch.com/t5/Glossary/MSISDN/ta-p/7628) for the group. */
|
|
6
6
|
members?: string[];
|
|
7
|
-
/** Phone numbers (
|
|
7
|
+
/** Phone numbers ([MSISDNs](https://community.sinch.com/t5/Glossary/MSISDN/ta-p/7628)) of child group will be included in this group. If present then this group will be auto populated. Constraints: Elements must be group IDs. */
|
|
8
8
|
child_groups?: string[];
|
|
9
|
-
/** @see
|
|
10
|
-
auto_update?:
|
|
9
|
+
/** @see GroupAutoUpdate */
|
|
10
|
+
auto_update?: GroupAutoUpdate;
|
|
11
11
|
}
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Kind of delivery report
|
|
3
|
+
*/
|
|
4
|
+
export type DeliveryReportEnum = 'none' | 'summary' | 'full' | 'per_recipient' | 'per_recipient_final' | string;
|
|
5
|
+
/**
|
|
6
|
+
* The simplified status as described in _Delivery Report Statuses_.
|
|
7
|
+
*/
|
|
8
|
+
export type DeliveryStatusEnum = 'Queued' | 'Dispatched' | 'Aborted' | 'Cancelled' | 'Rejected' | 'Deleted' | 'Delivered' | 'Failed' | 'Expired' | 'Unknown' | string;
|
|
9
|
+
/** @deprecated */
|
|
10
|
+
export type DeliveryReportStatusEnum = DeliveryReportEnum;
|
|
11
|
+
/**
|
|
12
|
+
* The delivery report status code provides a more detailed view of what happened with a message. The REST API error codes are a combination of [SMPP error codes](/docs/sms/smpp/error-codes/#status-reports-error-codes), [MMS error codes](/docs/mms/7-service/mms-status-codes/) and custom codes.
|
|
13
|
+
*/
|
|
14
|
+
export type DeliveryReceiptCodeEnum = 0 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | number;
|
|
@@ -18,8 +18,8 @@ export interface Group {
|
|
|
18
18
|
created_at?: Date;
|
|
19
19
|
/** Timestamp for when the group was last updated. Format: YYYY-MM-DDThh:mm:ss.SSSZ */
|
|
20
20
|
modified_at?: Date;
|
|
21
|
-
/** Phone numbers (MSISDNs) of child group will be included in this group. If present, this group will be auto populated. Constraints: Elements must be group IDs. */
|
|
22
|
-
child_groups?:
|
|
21
|
+
/** Phone numbers ([MSISDNs](https://community.sinch.com/t5/Glossary/MSISDN/ta-p/7628)) of child group will be included in this group. If present, this group will be auto populated. Constraints: Elements must be group IDs. */
|
|
22
|
+
child_groups?: string[];
|
|
23
23
|
/** @see GroupAutoUpdate */
|
|
24
24
|
auto_update?: GroupAutoUpdate;
|
|
25
25
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { AddKeyword } from '../add-keyword';
|
|
2
|
+
import { RemoveKeyword } from '../remove-keyword';
|
|
1
3
|
export interface GroupAutoUpdate {
|
|
2
|
-
/** Short code or long number addressed in
|
|
4
|
+
/** Short code or long number addressed in [MO](https://community.sinch.com/t5/Glossary/MO-Mobile-Originated/ta-p/7618). Constraints: Must be valid phone number or short code which has been **provisioned by your account manager**. */
|
|
3
5
|
to: string;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
+
/** @see AddKeyword */
|
|
7
|
+
add?: AddKeyword;
|
|
8
|
+
/** @see RemoveKeyword */
|
|
9
|
+
remove?: RemoveKeyword;
|
|
6
10
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './add-keyword';
|
|
1
2
|
export * from './api-batch-list';
|
|
2
3
|
export * from './delivery-feedback-request';
|
|
3
4
|
export * from './api-inbound-list';
|
|
@@ -18,19 +19,21 @@ export * from './dry-run-response-per-recipient-inner';
|
|
|
18
19
|
export * from './error-response-obj';
|
|
19
20
|
export * from './group-auto-update';
|
|
20
21
|
export * from './create-group-request';
|
|
21
|
-
export * from './group-object-auto-update';
|
|
22
|
-
export * from './group-object-auto-update-remove';
|
|
23
22
|
export * from './inbound-message-response';
|
|
24
23
|
export * from './list-groups-response';
|
|
25
|
-
export * from './mo-binary';
|
|
26
|
-
export * from './mo-text';
|
|
27
24
|
export * from './media-body';
|
|
28
25
|
export * from './media-request';
|
|
29
26
|
export * from './media-response';
|
|
30
27
|
export * from './message-delivery-status';
|
|
28
|
+
export * from './mms-media';
|
|
29
|
+
export * from './mms-mo-body';
|
|
30
|
+
export * from './mo-binary';
|
|
31
|
+
export * from './mo-media';
|
|
32
|
+
export * from './mo-text';
|
|
31
33
|
export * from './parameter-group';
|
|
32
34
|
export * from './parameter-values';
|
|
33
35
|
export * from './recipient-delivery-report';
|
|
36
|
+
export * from './remove-keyword';
|
|
34
37
|
export * from './replace-group-request';
|
|
35
38
|
export * from './send-sms-response';
|
|
36
39
|
export * from './send-sms-request';
|
|
@@ -38,8 +41,5 @@ export * from './text-request';
|
|
|
38
41
|
export * from './text-response';
|
|
39
42
|
export * from './update-batch-message-request';
|
|
40
43
|
export * from './update-group-request';
|
|
41
|
-
export * from './update-group-request-auto-update';
|
|
42
|
-
export * from './update-group-request-auto-update-add';
|
|
43
|
-
export * from './update-group-request-auto-update-remove';
|
|
44
44
|
export * from './enums';
|
|
45
45
|
export * from './requests';
|
package/dist/models/v1/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./add-keyword"), exports);
|
|
17
18
|
__exportStar(require("./api-batch-list"), exports);
|
|
18
19
|
__exportStar(require("./delivery-feedback-request"), exports);
|
|
19
20
|
__exportStar(require("./api-inbound-list"), exports);
|
|
@@ -34,19 +35,21 @@ __exportStar(require("./dry-run-response-per-recipient-inner"), exports);
|
|
|
34
35
|
__exportStar(require("./error-response-obj"), exports);
|
|
35
36
|
__exportStar(require("./group-auto-update"), exports);
|
|
36
37
|
__exportStar(require("./create-group-request"), exports);
|
|
37
|
-
__exportStar(require("./group-object-auto-update"), exports);
|
|
38
|
-
__exportStar(require("./group-object-auto-update-remove"), exports);
|
|
39
38
|
__exportStar(require("./inbound-message-response"), exports);
|
|
40
39
|
__exportStar(require("./list-groups-response"), exports);
|
|
41
|
-
__exportStar(require("./mo-binary"), exports);
|
|
42
|
-
__exportStar(require("./mo-text"), exports);
|
|
43
40
|
__exportStar(require("./media-body"), exports);
|
|
44
41
|
__exportStar(require("./media-request"), exports);
|
|
45
42
|
__exportStar(require("./media-response"), exports);
|
|
46
43
|
__exportStar(require("./message-delivery-status"), exports);
|
|
44
|
+
__exportStar(require("./mms-media"), exports);
|
|
45
|
+
__exportStar(require("./mms-mo-body"), exports);
|
|
46
|
+
__exportStar(require("./mo-binary"), exports);
|
|
47
|
+
__exportStar(require("./mo-media"), exports);
|
|
48
|
+
__exportStar(require("./mo-text"), exports);
|
|
47
49
|
__exportStar(require("./parameter-group"), exports);
|
|
48
50
|
__exportStar(require("./parameter-values"), exports);
|
|
49
51
|
__exportStar(require("./recipient-delivery-report"), exports);
|
|
52
|
+
__exportStar(require("./remove-keyword"), exports);
|
|
50
53
|
__exportStar(require("./replace-group-request"), exports);
|
|
51
54
|
__exportStar(require("./send-sms-response"), exports);
|
|
52
55
|
__exportStar(require("./send-sms-request"), exports);
|
|
@@ -54,9 +57,6 @@ __exportStar(require("./text-request"), exports);
|
|
|
54
57
|
__exportStar(require("./text-response"), exports);
|
|
55
58
|
__exportStar(require("./update-batch-message-request"), exports);
|
|
56
59
|
__exportStar(require("./update-group-request"), exports);
|
|
57
|
-
__exportStar(require("./update-group-request-auto-update"), exports);
|
|
58
|
-
__exportStar(require("./update-group-request-auto-update-add"), exports);
|
|
59
|
-
__exportStar(require("./update-group-request-auto-update-remove"), exports);
|
|
60
60
|
__exportStar(require("./enums"), exports);
|
|
61
61
|
__exportStar(require("./requests"), exports);
|
|
62
62
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAiC;AACjC,8DAA4C;AAC5C,qDAAmC;AACnC,6DAA2C;AAC3C,mDAAiC;AACjC,iEAA+C;AAC/C,8DAA4C;AAC5C,0DAAwC;AACxC,+DAA6C;AAC7C,mDAAiC;AACjC,oDAAkC;AAClC,0CAAwB;AACxB,oDAAkC;AAClC,yDAAuC;AACvC,oDAAkC;AAClC,qDAAmC;AACnC,yEAAuD;AACvD,uDAAqC;AACrC,sDAAoC;AACpC,yDAAuC;AACvC,6DAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/v1/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,mDAAiC;AACjC,8DAA4C;AAC5C,qDAAmC;AACnC,6DAA2C;AAC3C,mDAAiC;AACjC,iEAA+C;AAC/C,8DAA4C;AAC5C,0DAAwC;AACxC,+DAA6C;AAC7C,mDAAiC;AACjC,oDAAkC;AAClC,0CAAwB;AACxB,oDAAkC;AAClC,yDAAuC;AACvC,oDAAkC;AAClC,qDAAmC;AACnC,yEAAuD;AACvD,uDAAqC;AACrC,sDAAoC;AACpC,yDAAuC;AACvC,6DAA2C;AAC3C,yDAAuC;AACvC,+CAA6B;AAC7B,kDAAgC;AAChC,mDAAiC;AACjC,4DAA0C;AAC1C,8CAA4B;AAC5B,gDAA8B;AAC9B,8CAA4B;AAC5B,6CAA2B;AAC3B,4CAA0B;AAC1B,oDAAkC;AAClC,qDAAmC;AACnC,8DAA4C;AAC5C,mDAAiC;AACjC,0DAAwC;AACxC,sDAAoC;AACpC,qDAAmC;AACnC,iDAA+B;AAC/B,kDAAgC;AAChC,iEAA+C;AAC/C,yDAAuC;AACvC,0CAAwB;AACxB,6CAA2B"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
* The message content, including a URL to the media file
|
|
3
3
|
*/
|
|
4
4
|
export interface MediaBody {
|
|
5
|
+
/** The subject text */
|
|
6
|
+
subject?: string;
|
|
5
7
|
/** The message text. Text only media messages will be rejected, please use SMS instead. */
|
|
6
8
|
message?: string;
|
|
7
9
|
/** URL to the media file */
|
|
@@ -5,7 +5,7 @@ import { DeliveryReportEnum } from '../enums';
|
|
|
5
5
|
* Only available in the US. Contact support if you wish to send MMS.
|
|
6
6
|
*/
|
|
7
7
|
export interface MediaRequest {
|
|
8
|
-
/** List of Phone numbers and group IDs that will receive the batch.
|
|
8
|
+
/** List of Phone numbers and group IDs that will receive the batch. [More info](https://community.sinch.com/t5/Glossary/MSISDN/ta-p/7628) */
|
|
9
9
|
to: string[];
|
|
10
10
|
/** Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured. */
|
|
11
11
|
from?: string;
|
|
@@ -18,17 +18,17 @@ export interface MediaRequest {
|
|
|
18
18
|
/** Request delivery report callback. Note that delivery reports can be fetched from the API regardless of this setting. */
|
|
19
19
|
delivery_report?: DeliveryReportEnum;
|
|
20
20
|
/** If set in the future, the message will be delayed until `send_at` occurs.
|
|
21
|
-
* Must be before `expire_at`. If set in the past, messages will be sent immediately. Formatted as
|
|
21
|
+
* Must be before `expire_at`. If set in the past, messages will be sent immediately. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): `YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
22
22
|
send_at?: Date;
|
|
23
23
|
/** If set, the system will stop trying to deliver the message at this point.
|
|
24
|
-
* Must be after `send_at`. Default and max is 3 days after `send_at`. Formatted as
|
|
24
|
+
* Must be after `send_at`. Default and max is 3 days after `send_at`. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601): `YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
25
25
|
expire_at?: Date;
|
|
26
26
|
/** Override the default callback URL for this batch. Must be valid URL. */
|
|
27
27
|
callback_url?: string;
|
|
28
28
|
/** The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch */
|
|
29
29
|
client_reference?: string;
|
|
30
|
-
/** If set to `true`, then [feedback](/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
|
|
30
|
+
/** If set to `true`, then [feedback](https://developers.sinch.com/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
|
|
31
31
|
feedback_enabled?: boolean;
|
|
32
|
-
/** Whether or not you want the media included in your message to be checked against [Sinch MMS channel best practices](/docs/mms/bestpractices/). If set to true, your message will be rejected if it doesn
|
|
32
|
+
/** Whether or not you want the media included in your message to be checked against [Sinch MMS channel best practices](https://developers.sinch.com/docs/mms/bestpractices/). If set to true, your message will be rejected if it doesn't conform to the listed recommendations, otherwise no validation will be performed. */
|
|
33
33
|
strict_validation?: boolean;
|
|
34
34
|
}
|
|
@@ -16,23 +16,23 @@ export interface MediaResponse {
|
|
|
16
16
|
parameters?: ParameterGroup;
|
|
17
17
|
/** Media message */
|
|
18
18
|
type?: 'mt_media';
|
|
19
|
-
/** Timestamp for when batch was created. YYYY-MM-DDThh:mm:ss.SSSZ
|
|
19
|
+
/** Timestamp for when batch was created. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601):`YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
20
20
|
created_at?: Date;
|
|
21
|
-
/** Timestamp for when batch was last updated. YYYY-MM-DDThh:mm:ss.SSSZ
|
|
21
|
+
/** Timestamp for when batch was last updated. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601):`YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
22
22
|
modified_at?: Date;
|
|
23
23
|
/** Request delivery report callback. Note that delivery reports can be fetched from the API regardless of this setting. */
|
|
24
24
|
delivery_report?: DeliveryReportEnum;
|
|
25
25
|
/** If set in the future the message will be delayed until send_at occurs.
|
|
26
|
-
* Must be before `expire_at`. If set in the past messages will be sent immediately. YYYY-MM-DDThh:mm:ss.SSSZ
|
|
26
|
+
* Must be before `expire_at`. If set in the past messages will be sent immediately. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601):`YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
27
27
|
send_at?: Date;
|
|
28
28
|
/** If set the system will stop trying to deliver the message at this point.
|
|
29
|
-
* Must be after `send_at`. Default and max is 3 days after send_at. YYYY-MM-DDThh:mm:ss.SSSZ
|
|
29
|
+
* Must be after `send_at`. Default and max is 3 days after send_at. Formatted as [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601):`YYYY-MM-DDThh:mm:ss.SSSZ`. */
|
|
30
30
|
expire_at?: Date;
|
|
31
31
|
/** Override the default callback URL for this batch. Must be valid URL. */
|
|
32
32
|
callback_url?: string;
|
|
33
33
|
/** The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch */
|
|
34
34
|
client_reference?: string;
|
|
35
|
-
/** If set to true then [feedback](/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
|
|
35
|
+
/** If set to true then [feedback](https://developers.sinch.com/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
|
|
36
36
|
feedback_enabled?: boolean;
|
|
37
37
|
/** Whether or not you want the media included in your message to be checked against [Sinch MMS channel best practices](/docs/mms/bestpractices/). If set to true, your message will be rejected if it doesn't conform to the listed recommendations, otherwise no validation will be performed. */
|
|
38
38
|
strict_validation?: boolean;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DeliveryReceiptCodeEnum, DeliveryStatusEnum } from '../enums';
|
|
2
2
|
/**
|
|
3
3
|
* Array with status objects. Only status codes with at least one recipient will be listed.
|
|
4
4
|
*/
|
|
5
5
|
export interface MessageDeliveryStatus {
|
|
6
|
-
/** The detailed status code. */
|
|
7
|
-
code:
|
|
6
|
+
/** The detailed [status code](https://developers.sinch.com/docs/sms/api-reference/sms/tag/Delivery-reports/#tag/Delivery-reports/section/Delivery-report-error-codes). */
|
|
7
|
+
code: DeliveryReceiptCodeEnum;
|
|
8
8
|
/** The number of messages that currently has this code. */
|
|
9
9
|
count: number;
|
|
10
10
|
/** Only for `full` report. A list of the phone number recipients which messages has this status code. */
|
|
11
11
|
recipients?: string[];
|
|
12
12
|
/** The simplified status as described in _Delivery Report Statuses_. */
|
|
13
|
-
status:
|
|
13
|
+
status: DeliveryStatusEnum;
|
|
14
14
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { MmsMedia } from './mms-media';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/mms-media/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collection of attachments in incoming message.
|
|
3
|
+
*/
|
|
4
|
+
export interface MmsMedia {
|
|
5
|
+
/** The result code. Possible values: 0 (success), 1 (content upload error), 2 (cloud bucket error), 3 (bucket key error). */
|
|
6
|
+
code: number;
|
|
7
|
+
/** Content type of binary. [More info](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) */
|
|
8
|
+
content_type: string;
|
|
9
|
+
/** Status of the uploaded media. */
|
|
10
|
+
status: 'Uploaded' | 'Failed' | string;
|
|
11
|
+
/** URL to be used to download attachment. */
|
|
12
|
+
url?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mms-media.js","sourceRoot":"","sources":["../../../../src/models/v1/mms-media/mms-media.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { MmsMoBody } from './mms-mo-body';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/mms-mo-body/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MmsMedia } from '../mms-media';
|
|
2
|
+
/**
|
|
3
|
+
* The message content, including a URL to the media filters.
|
|
4
|
+
*/
|
|
5
|
+
export interface MmsMoBody {
|
|
6
|
+
/** The subject of the MMS media message. */
|
|
7
|
+
subject?: string;
|
|
8
|
+
/** The text message content of the MMS media message. */
|
|
9
|
+
message?: string;
|
|
10
|
+
/** List of MmsMedias */
|
|
11
|
+
media?: MmsMedia[];
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mms-mo-body.js","sourceRoot":"","sources":["../../../../src/models/v1/mms-mo-body/mms-mo-body.ts"],"names":[],"mappings":""}
|
|
@@ -2,7 +2,7 @@ import { ApiMoMessage } from '../api-mo-message';
|
|
|
2
2
|
export interface MOBinary extends ApiMoMessage {
|
|
3
3
|
/** The message content Base64 encoded. Max 140 bytes together with udh. */
|
|
4
4
|
body: string;
|
|
5
|
-
/** SMS in binary format */
|
|
5
|
+
/** SMS in [binary](https://community.sinch.com/t5/Glossary/Binary-SMS/ta-p/7470) format */
|
|
6
6
|
type: 'mo_binary';
|
|
7
7
|
/** The UDH header of a binary message HEX encoded. Max 140 bytes together with body. */
|
|
8
8
|
udh: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { MOMedia } from './mo-media';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/mo-media/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mo-media.js","sourceRoot":"","sources":["../../../../src/models/v1/mo-media/mo-media.ts"],"names":[],"mappings":""}
|