@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.
Files changed (120) hide show
  1. package/README.md +16 -0
  2. package/dist/models/v1/add-keyword/add-keyword.d.ts +13 -0
  3. package/dist/models/v1/{group-object-auto-update-remove/group-object-auto-update-remove.js → add-keyword/add-keyword.js} +1 -1
  4. package/dist/models/v1/add-keyword/add-keyword.js.map +1 -0
  5. package/dist/models/v1/add-keyword/index.d.ts +1 -0
  6. package/dist/models/v1/add-keyword/index.js.map +1 -0
  7. package/dist/models/v1/api-mo-message/api-mo-message.d.ts +4 -6
  8. package/dist/models/v1/api-update-binary-mt-message/api-update-binary-mt-message.d.ts +12 -3
  9. package/dist/models/v1/api-update-mms-mt-message/api-update-mms-mt-message.d.ts +8 -3
  10. package/dist/models/v1/api-update-text-mt-message/api-update-text-mt-message.d.ts +17 -2
  11. package/dist/models/v1/binary-request/binary-request.d.ts +2 -8
  12. package/dist/models/v1/binary-response/binary-response.d.ts +5 -10
  13. package/dist/models/v1/create-group-request/create-group-request.d.ts +5 -5
  14. package/dist/models/v1/enums.d.ts +14 -2
  15. package/dist/models/v1/group/group.d.ts +2 -2
  16. package/dist/models/v1/group-auto-update/group-auto-update.d.ts +7 -3
  17. package/dist/models/v1/inbound-message-response/inbound-message-response.d.ts +2 -1
  18. package/dist/models/v1/index.d.ts +7 -7
  19. package/dist/models/v1/index.js +7 -7
  20. package/dist/models/v1/index.js.map +1 -1
  21. package/dist/models/v1/media-body/media-body.d.ts +2 -0
  22. package/dist/models/v1/media-request/media-request.d.ts +5 -5
  23. package/dist/models/v1/media-response/media-response.d.ts +5 -5
  24. package/dist/models/v1/message-delivery-status/message-delivery-status.d.ts +4 -4
  25. package/dist/models/v1/mms-media/index.d.ts +1 -0
  26. package/dist/models/v1/mms-media/index.js.map +1 -0
  27. package/dist/models/v1/mms-media/mms-media.d.ts +13 -0
  28. package/dist/models/v1/mms-media/mms-media.js +3 -0
  29. package/dist/models/v1/mms-media/mms-media.js.map +1 -0
  30. package/dist/models/v1/mms-mo-body/index.d.ts +1 -0
  31. package/dist/models/v1/mms-mo-body/index.js.map +1 -0
  32. package/dist/models/v1/mms-mo-body/mms-mo-body.d.ts +12 -0
  33. package/dist/models/v1/mms-mo-body/mms-mo-body.js +3 -0
  34. package/dist/models/v1/mms-mo-body/mms-mo-body.js.map +1 -0
  35. package/dist/models/v1/mo-binary/mo-binary.d.ts +1 -1
  36. package/dist/models/v1/mo-media/index.d.ts +1 -0
  37. package/dist/models/v1/mo-media/index.js.map +1 -0
  38. package/dist/models/v1/mo-media/mo-media.d.ts +8 -0
  39. package/dist/models/v1/mo-media/mo-media.js +3 -0
  40. package/dist/models/v1/mo-media/mo-media.js.map +1 -0
  41. package/dist/models/v1/recipient-delivery-report/recipient-delivery-report.d.ts +4 -4
  42. package/dist/models/v1/remove-keyword/index.d.ts +1 -0
  43. package/dist/models/v1/remove-keyword/index.js.map +1 -0
  44. package/dist/models/v1/remove-keyword/remove-keyword.d.ts +13 -0
  45. package/dist/models/v1/{update-group-request-auto-update-add/update-group-request-auto-update-add.js → remove-keyword/remove-keyword.js} +1 -1
  46. package/dist/models/v1/remove-keyword/remove-keyword.js.map +1 -0
  47. package/dist/models/v1/replace-group-request/replace-group-request.d.ts +6 -1
  48. package/dist/models/v1/requests/delivery-reports/delivery-reports-request-data.d.ts +13 -9
  49. package/dist/models/v1/requests/groups/groups-request-data.d.ts +3 -3
  50. package/dist/models/v1/text-request/text-request.d.ts +2 -2
  51. package/dist/models/v1/text-response/text-response.d.ts +1 -1
  52. package/dist/models/v1/update-group-request/update-group-request.d.ts +3 -3
  53. package/dist/rest/v1/batches/batches-api.d.ts +4 -8
  54. package/dist/rest/v1/batches/batches-api.js +12 -16
  55. package/dist/rest/v1/batches/batches-api.js.map +1 -1
  56. package/dist/rest/v1/batches/index.d.ts +1 -0
  57. package/dist/rest/v1/batches/index.js +1 -0
  58. package/dist/rest/v1/batches/index.js.map +1 -1
  59. package/dist/rest/v1/callbacks/callbacks-webhook.d.ts +12 -3
  60. package/dist/rest/v1/callbacks/callbacks-webhook.js +34 -6
  61. package/dist/rest/v1/callbacks/callbacks-webhook.js.map +1 -1
  62. package/dist/rest/v1/delivery-reports/delivery-reports-api.d.ts +4 -8
  63. package/dist/rest/v1/delivery-reports/delivery-reports-api.js +3 -11
  64. package/dist/rest/v1/delivery-reports/delivery-reports-api.js.map +1 -1
  65. package/dist/rest/v1/delivery-reports/index.d.ts +1 -0
  66. package/dist/rest/v1/delivery-reports/index.js +1 -0
  67. package/dist/rest/v1/delivery-reports/index.js.map +1 -1
  68. package/dist/rest/v1/groups/groups-api.d.ts +4 -8
  69. package/dist/rest/v1/groups/groups-api.js +3 -15
  70. package/dist/rest/v1/groups/groups-api.js.map +1 -1
  71. package/dist/rest/v1/groups/index.d.ts +1 -0
  72. package/dist/rest/v1/groups/index.js +1 -0
  73. package/dist/rest/v1/groups/index.js.map +1 -1
  74. package/dist/rest/v1/inbounds/inbounds-api.d.ts +4 -8
  75. package/dist/rest/v1/inbounds/inbounds-api.js +3 -10
  76. package/dist/rest/v1/inbounds/inbounds-api.js.map +1 -1
  77. package/dist/rest/v1/inbounds/index.d.ts +1 -0
  78. package/dist/rest/v1/inbounds/index.js +1 -0
  79. package/dist/rest/v1/inbounds/index.js.map +1 -1
  80. package/dist/rest/v1/index.d.ts +1 -1
  81. package/dist/rest/v1/index.js +1 -1
  82. package/dist/rest/v1/index.js.map +1 -1
  83. package/dist/rest/v1/sms-domain-api.d.ts +12 -14
  84. package/dist/rest/v1/sms-domain-api.js +22 -48
  85. package/dist/rest/v1/sms-domain-api.js.map +1 -1
  86. package/dist/rest/v1/sms-service.d.ts +13 -1
  87. package/dist/rest/v1/sms-service.js +65 -13
  88. package/dist/rest/v1/sms-service.js.map +1 -1
  89. package/package.json +2 -2
  90. package/dist/models/v1/group-object-auto-update/group-object-auto-update.d.ts +0 -10
  91. package/dist/models/v1/group-object-auto-update/group-object-auto-update.js +0 -3
  92. package/dist/models/v1/group-object-auto-update/group-object-auto-update.js.map +0 -1
  93. package/dist/models/v1/group-object-auto-update/index.d.ts +0 -1
  94. package/dist/models/v1/group-object-auto-update/index.js.map +0 -1
  95. package/dist/models/v1/group-object-auto-update-remove/group-object-auto-update-remove.d.ts +0 -13
  96. package/dist/models/v1/group-object-auto-update-remove/group-object-auto-update-remove.js.map +0 -1
  97. package/dist/models/v1/group-object-auto-update-remove/index.d.ts +0 -1
  98. package/dist/models/v1/group-object-auto-update-remove/index.js.map +0 -1
  99. package/dist/models/v1/update-group-request-auto-update/index.d.ts +0 -1
  100. package/dist/models/v1/update-group-request-auto-update/index.js.map +0 -1
  101. package/dist/models/v1/update-group-request-auto-update/update-group-request-auto-update.d.ts +0 -10
  102. package/dist/models/v1/update-group-request-auto-update/update-group-request-auto-update.js +0 -3
  103. package/dist/models/v1/update-group-request-auto-update/update-group-request-auto-update.js.map +0 -1
  104. package/dist/models/v1/update-group-request-auto-update-add/index.d.ts +0 -1
  105. package/dist/models/v1/update-group-request-auto-update-add/index.js.map +0 -1
  106. package/dist/models/v1/update-group-request-auto-update-add/update-group-request-auto-update-add.d.ts +0 -10
  107. package/dist/models/v1/update-group-request-auto-update-add/update-group-request-auto-update-add.js.map +0 -1
  108. package/dist/models/v1/update-group-request-auto-update-remove/index.d.ts +0 -1
  109. package/dist/models/v1/update-group-request-auto-update-remove/index.js.map +0 -1
  110. package/dist/models/v1/update-group-request-auto-update-remove/update-group-request-auto-update-remove.d.ts +0 -13
  111. package/dist/models/v1/update-group-request-auto-update-remove/update-group-request-auto-update-remove.js +0 -8
  112. package/dist/models/v1/update-group-request-auto-update-remove/update-group-request-auto-update-remove.js.map +0 -1
  113. package/dist/rest/v1/fixtures.jest.d.ts +0 -4
  114. package/dist/rest/v1/fixtures.jest.js +0 -12
  115. package/dist/rest/v1/fixtures.jest.js.map +0 -1
  116. /package/dist/models/v1/{group-object-auto-update-remove → add-keyword}/index.js +0 -0
  117. /package/dist/models/v1/{group-object-auto-update → mms-media}/index.js +0 -0
  118. /package/dist/models/v1/{update-group-request-auto-update-add → mms-mo-body}/index.js +0 -0
  119. /package/dist/models/v1/{update-group-request-auto-update-remove → mo-media}/index.js +0 -0
  120. /package/dist/models/v1/{update-group-request-auto-update → remove-keyword}/index.js +0 -0
@@ -1,4 +1,4 @@
1
- import { DeliveryReportStatusEnum } from '../enums';
1
+ import { DeliveryReceiptCodeEnum, DeliveryStatusEnum } from '../enums';
2
2
  export interface RecipientDeliveryReport {
3
3
  /** The default originator used for the recipient this delivery report belongs to, if default originator pool configured and no originator set when submitting batch. */
4
4
  applied_originator?: string;
@@ -8,8 +8,8 @@ export interface RecipientDeliveryReport {
8
8
  batch_id: string;
9
9
  /** The client identifier of the batch this delivery report belongs to, if set when submitting batch. */
10
10
  client_reference?: string;
11
- /** The detailed status code. */
12
- code: number;
11
+ /** The detailed [status code](https://developers.sinch.com/docs/sms/api-reference/sms/tag/Delivery-reports/#tag/Delivery-reports/section/Delivery-report-error-codes). */
12
+ code: DeliveryReceiptCodeEnum;
13
13
  /** Applied encoding for message. Present only if smart encoding is enabled. */
14
14
  encoding?: 'GSM' | 'UNICODE';
15
15
  /** The number of parts the message was split into. Present only if `max_number_of_message_parts` parameter was set. */
@@ -21,7 +21,7 @@ export interface RecipientDeliveryReport {
21
21
  /** Phone number that was queried. */
22
22
  recipient: string;
23
23
  /** The simplified status as described in _Delivery Report Statuses_. */
24
- status: DeliveryReportStatusEnum;
24
+ status: DeliveryStatusEnum;
25
25
  /** The recipient delivery report type. */
26
26
  type: 'recipient_delivery_report_sms' | 'recipient_delivery_report_mms';
27
27
  }
@@ -0,0 +1 @@
1
+ export type { RemoveKeyword } from './remove-keyword';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/v1/remove-keyword/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Keyword to be sent in MO to remove MSISDN to a group
3
+ */
4
+ export interface RemoveKeyword {
5
+ /** Opt-out keyword like "LEAVE" 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-out keyword like "LEAVE" 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=update-group-request-auto-update-add.js.map
8
+ //# sourceMappingURL=remove-keyword.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-keyword.js","sourceRoot":"","sources":["../../../../src/models/v1/remove-keyword/remove-keyword.ts"],"names":[],"mappings":";;;AAUA,sCAAsC;AACzB,QAAA,gBAAgB,GAAG,OAAO,CAAC;AAExC,uCAAuC;AAC1B,QAAA,iBAAiB,GAAG,OAAO,CAAC"}
@@ -1,6 +1,11 @@
1
+ import { GroupAutoUpdate } from '../group-auto-update';
1
2
  export interface ReplaceGroupRequest {
2
3
  /** Name of group. */
3
4
  name?: string;
4
- /** The initial members of the group. Constraints: Elements must be phone numbers in <a href=\"https://community.sinch.com/t5/Glossary/E-164/ta-p/7537\" target=\"_blank\">E.164</a> format MSISDNs. */
5
+ /** The initial members of the group. Constraints: Elements must be phone numbers in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format MSISDNs. */
5
6
  members: string[];
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
+ child_groups?: string[];
9
+ /** @see GroupAutoUpdate */
10
+ auto_update?: GroupAutoUpdate;
6
11
  }
@@ -1,13 +1,17 @@
1
- import { DeliveryReportStatusEnum } from '../../enums';
1
+ import { DeliveryReceiptCodeEnum, DeliveryStatusEnum } from '../../enums';
2
2
  export interface GetDeliveryReportByBatchIdRequestData {
3
3
  /** The batch ID you received from sending a message. */
4
4
  'batch_id': string;
5
- /** The type of delivery report. - A `summary` will count the number of messages sent per status. - A `full` report give that of a `summary` report but in addition, lists phone numbers. */
5
+ /**
6
+ * The type of delivery report.
7
+ * - A `summary` will count the number of messages sent per status.
8
+ * - A `full` report give that of a `summary` report but in addition, lists phone numbers.
9
+ */
6
10
  'type'?: 'summary' | 'full';
7
- /** Comma separated list of delivery_report_statuses to include */
8
- 'status'?: DeliveryReportStatusEnum[];
9
- /** Comma separated list of delivery_receipt_error_codes to include */
10
- 'code'?: string | number | number[];
11
+ /** Comma separated list of delivery report statuses to include */
12
+ 'status'?: DeliveryStatusEnum | DeliveryStatusEnum[];
13
+ /** Comma separated list of delivery receipt codes to include */
14
+ 'code'?: string | DeliveryReceiptCodeEnum | DeliveryReceiptCodeEnum[];
11
15
  }
12
16
  export type GetDeliveryReportByPhoneNumberRequestData = GetDeliveryReportByPhoneNumberRequestDataBC | GetDeliveryReportByPhoneNumberRequestDataDeprecated;
13
17
  export interface GetDeliveryReportByPhoneNumberRequestDataBC {
@@ -36,9 +40,9 @@ export interface ListDeliveryReportsRequestData {
36
40
  /** Only list messages received before this date/time. */
37
41
  'end_date'?: Date;
38
42
  /** Comma separated list of delivery report statuses to include. */
39
- 'status'?: DeliveryReportStatusEnum[];
40
- /** Comma separated list of delivery receipt error codes to include. */
41
- 'code'?: string;
43
+ 'status'?: DeliveryStatusEnum | DeliveryStatusEnum[];
44
+ /** Comma separated list of delivery receipt codes to include. */
45
+ 'code'?: string | DeliveryReceiptCodeEnum | DeliveryReceiptCodeEnum[];
42
46
  /** Client reference to include */
43
47
  'client_reference'?: string;
44
48
  }
@@ -3,7 +3,7 @@ import { ReplaceGroupRequest } from '../../replace-group-request';
3
3
  import { UpdateGroupRequest } from '../../update-group-request';
4
4
  export interface CreateGroupRequestData {
5
5
  /** */
6
- 'createGroupRequestBody'?: CreateGroupRequest;
6
+ 'createGroupRequestBody': CreateGroupRequest;
7
7
  }
8
8
  export interface DeleteGroupRequestData {
9
9
  /** ID of a group that you are interested in getting. */
@@ -23,7 +23,7 @@ export interface ReplaceGroupRequestData {
23
23
  /** ID of a group that you are interested in getting. */
24
24
  'group_id': string;
25
25
  /** */
26
- 'replaceGroupRequestBody'?: ReplaceGroupRequest;
26
+ 'replaceGroupRequestBody': ReplaceGroupRequest;
27
27
  }
28
28
  export interface GetGroupRequestData {
29
29
  /** ID of a group that you are interested in getting. */
@@ -33,5 +33,5 @@ export interface UpdateGroupRequestData {
33
33
  /** ID of a group that you are interested in getting. */
34
34
  'group_id': string;
35
35
  /** */
36
- 'updateGroupRequestBody'?: UpdateGroupRequest;
36
+ 'updateGroupRequestBody': UpdateGroupRequest;
37
37
  }
@@ -1,7 +1,7 @@
1
1
  import { ParameterGroup } from '../parameter-group';
2
2
  import { DeliveryReportEnum } from '../enums';
3
3
  export interface TextRequest {
4
- /** List of Phone numbers and group IDs that will receive the batch. <a href=\"https://community.sinch.com/t5/Glossary/MSISDN/ta-p/7628\" target=\"_blank\">More info</a> */
4
+ /** List of Phone numbers and group IDs that will receive the batch. [More info](https://community.sinch.com/t5/Glossary/MSISDN/ta-p/7628) */
5
5
  to: string[];
6
6
  /** Sender number. Must be valid phone number, short code or alphanumeric. Required if Automatic Default Originator not configured. */
7
7
  from?: string;
@@ -23,7 +23,7 @@ export interface TextRequest {
23
23
  callback_url?: string;
24
24
  /** The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch */
25
25
  client_reference?: string;
26
- /** If set to `true`, then [feedback](/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
26
+ /** 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. */
27
27
  feedback_enabled?: boolean;
28
28
  /** Shows message on screen without user interaction while not saving the message to the inbox. */
29
29
  flash_message?: boolean;
@@ -31,7 +31,7 @@ export interface TextResponse {
31
31
  callback_url?: string;
32
32
  /** The client identifier of a batch message. If set, the identifier will be added in the delivery report/callback of this batch */
33
33
  client_reference?: string;
34
- /** If set to `true`, then [feedback](/docs/sms/api-reference/sms/tag/Batches/#tag/Batches/operation/deliveryFeedback) is expected after successful delivery. */
34
+ /** 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. */
35
35
  feedback_enabled?: boolean;
36
36
  /** Shows message on screen without user interaction while not saving the message to the inbox. */
37
37
  flash_message?: boolean;
@@ -1,4 +1,4 @@
1
- import { UpdateGroupRequestAutoUpdate } from '../update-group-request-auto-update';
1
+ import { GroupAutoUpdate } from '../group-auto-update';
2
2
  export interface UpdateGroupRequest {
3
3
  /** The name of the group. Omitting `name` from the JSON body will leave the name unchanged. To remove an existing name set, name explicitly to the JSON value `null`. */
4
4
  name?: string | null;
@@ -10,6 +10,6 @@ export interface UpdateGroupRequest {
10
10
  add_from_group?: string;
11
11
  /** Remove the members in a specified group from this group. Constraints: Must be valid group ID */
12
12
  remove_from_group?: string;
13
- /** @see UpdateGroupRequestAutoUpdate */
14
- auto_update?: UpdateGroupRequestAutoUpdate;
13
+ /** @see GroupAutoUpdate */
14
+ auto_update?: GroupAutoUpdate;
15
15
  }
@@ -1,13 +1,9 @@
1
+ import { ApiListPromise } from '@sinch/sdk-client';
1
2
  import { CancelBatchMessageResponse, DryRunResponse, ReplaceBatchMessageResponse, SendSMSResponse, BinaryResponse, TextResponse, MediaResponse, CancelBatchMessageRequestData, DeliveryFeedbackRequestData, DryRunRequestData, GetBatchMessageRequestData, ListBatchesRequestData, ReplaceBatchMessageRequestData, SendSMSRequestData, SendTextSMSRequestData, SendBinarySMSRequestData, SendMediaSMSRequestData, UpdateBatchMessageRequestData } from '../../../models';
2
- import { ApiListPromise, SinchClientParameters } from '@sinch/sdk-client';
3
3
  import { SmsDomainApi } from '../sms-domain-api';
4
+ import { LazySmsApiClient } from '../sms-service';
4
5
  export declare class BatchesApi extends SmsDomainApi {
5
- /**
6
- * Initialize your interface
7
- *
8
- * @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
9
- */
10
- constructor(sinchClientParameters: SinchClientParameters);
6
+ constructor(lazyClient: LazySmsApiClient);
11
7
  /**
12
8
  * Cancel a batch message
13
9
  * A batch can be canceled at any point. If a batch is canceled while it's currently being delivered some messages currently being processed might still be delivered. The delivery report will indicate which messages were canceled and which weren't. Canceling a batch scheduled in the future will result in an empty delivery report while canceling an already sent batch would result in no change to the completed delivery report.
@@ -40,7 +36,7 @@ export declare class BatchesApi extends SmsDomainApi {
40
36
  * @param { ListBatchesRequestData } data - The data to provide to the API call.
41
37
  * @return {ApiListPromise<SendSMSResponse>}
42
38
  */
43
- list(data: ListBatchesRequestData): ApiListPromise<SendSMSResponse>;
39
+ list(data?: ListBatchesRequestData): ApiListPromise<SendSMSResponse>;
44
40
  /**
45
41
  * Replace a batch
46
42
  * This operation will replace all the parameters of a batch with the provided values. It is the same as cancelling a batch and sending a new one instead.
@@ -4,13 +4,8 @@ exports.BatchesApi = void 0;
4
4
  const sdk_client_1 = require("@sinch/sdk-client");
5
5
  const sms_domain_api_1 = require("../sms-domain-api");
6
6
  class BatchesApi extends sms_domain_api_1.SmsDomainApi {
7
- /**
8
- * Initialize your interface
9
- *
10
- * @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
11
- */
12
- constructor(sinchClientParameters) {
13
- super(sinchClientParameters, 'BatchesApi');
7
+ constructor(lazyClient) {
8
+ super(lazyClient, 'BatchesApi');
14
9
  }
15
10
  /**
16
11
  * Cancel a batch message
@@ -18,7 +13,6 @@ class BatchesApi extends sms_domain_api_1.SmsDomainApi {
18
13
  * @param { CancelBatchMessageRequestData } data - The data to provide to the API call.
19
14
  */
20
15
  async cancel(data) {
21
- this.client = this.getSinchClient();
22
16
  const getParams = this.client.extractQueryParams(data, []);
23
17
  const headers = {
24
18
  'Content-Type': 'application/json',
@@ -43,7 +37,6 @@ class BatchesApi extends sms_domain_api_1.SmsDomainApi {
43
37
  * @param { DeliveryFeedbackRequestData } data - The data to provide to the API call.
44
38
  */
45
39
  async sendDeliveryFeedback(data) {
46
- this.client = this.getSinchClient();
47
40
  const getParams = this.client.extractQueryParams(data, []);
48
41
  const headers = {
49
42
  'Content-Type': 'application/json',
@@ -66,7 +59,6 @@ class BatchesApi extends sms_domain_api_1.SmsDomainApi {
66
59
  * @param { DryRunRequestData } data - The data to provide to the API call.
67
60
  */
68
61
  async dryRun(data) {
69
- this.client = this.getSinchClient();
70
62
  const getParams = this.client.extractQueryParams(data, [
71
63
  'per_recipient',
72
64
  'number_of_recipients'
@@ -92,7 +84,6 @@ class BatchesApi extends sms_domain_api_1.SmsDomainApi {
92
84
  * @param { GetBatchMessageRequestData } data - The data to provide to the API call.
93
85
  */
94
86
  async get(data) {
95
- this.client = this.getSinchClient();
96
87
  const getParams = this.client.extractQueryParams(data, []);
97
88
  const headers = {
98
89
  'Content-Type': 'application/json',
@@ -116,8 +107,7 @@ class BatchesApi extends sms_domain_api_1.SmsDomainApi {
116
107
  * @return {ApiListPromise<SendSMSResponse>}
117
108
  */
118
109
  list(data) {
119
- this.client = this.getSinchClient();
120
- const getParams = this.client.extractQueryParams(data, ['page', 'page_size', 'from', 'start_date', 'end_date', 'client_reference']);
110
+ const getParams = this.client.extractQueryParams(data ?? {}, ['page', 'page_size', 'from', 'start_date', 'end_date', 'client_reference']);
121
111
  const headers = {
122
112
  'Content-Type': 'application/json',
123
113
  'Accept': 'application/json',
@@ -143,7 +133,6 @@ class BatchesApi extends sms_domain_api_1.SmsDomainApi {
143
133
  * @param { ReplaceBatchMessageRequestData } data - The data to provide to the API call.
144
134
  */
145
135
  async replace(data) {
146
- this.client = this.getSinchClient();
147
136
  const getParams = this.client.extractQueryParams(data, []);
148
137
  const headers = {
149
138
  'Content-Type': 'application/json',
@@ -170,7 +159,6 @@ class BatchesApi extends sms_domain_api_1.SmsDomainApi {
170
159
  * @param { SendSMSRequestData } data - The data to provide to the API call.
171
160
  */
172
161
  async send(data) {
173
- this.client = this.getSinchClient();
174
162
  const getParams = this.client.extractQueryParams(data, []);
175
163
  const headers = {
176
164
  'Content-Type': 'application/json',
@@ -197,6 +185,9 @@ class BatchesApi extends sms_domain_api_1.SmsDomainApi {
197
185
  * @param { SendTextSMSRequestData } data - The data to provide to the API call.
198
186
  */
199
187
  async sendTextMessage(data) {
188
+ if (data.sendSMSRequestBody) {
189
+ data.sendSMSRequestBody.type = 'mt_text';
190
+ }
200
191
  const response = await this.send(data);
201
192
  return response;
202
193
  }
@@ -210,6 +201,9 @@ class BatchesApi extends sms_domain_api_1.SmsDomainApi {
210
201
  * @param { SendBinarySMSRequestData } data - The data to provide to the API call.
211
202
  */
212
203
  async sendBinaryMessage(data) {
204
+ if (data.sendSMSRequestBody) {
205
+ data.sendSMSRequestBody.type = 'mt_binary';
206
+ }
213
207
  const response = await this.send(data);
214
208
  return response;
215
209
  }
@@ -223,6 +217,9 @@ class BatchesApi extends sms_domain_api_1.SmsDomainApi {
223
217
  * @param { SendMediaSMSRequestData } data - The data to provide to the API call.
224
218
  */
225
219
  async sendMediaMessage(data) {
220
+ if (data.sendSMSRequestBody) {
221
+ data.sendSMSRequestBody.type = 'mt_media';
222
+ }
226
223
  const response = await this.send(data);
227
224
  return response;
228
225
  }
@@ -232,7 +229,6 @@ class BatchesApi extends sms_domain_api_1.SmsDomainApi {
232
229
  * @param { UpdateBatchMessageRequestData } data - The data to provide to the API call.
233
230
  */
234
231
  async update(data) {
235
- this.client = this.getSinchClient();
236
232
  const getParams = this.client.extractQueryParams(data, []);
237
233
  const headers = {
238
234
  'Content-Type': 'application/json',
@@ -1 +1 @@
1
- {"version":3,"file":"batches-api.js","sourceRoot":"","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Q,WAAW,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,YAAY,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;QAE5I,MAAM,cAAc,GAChB,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,IAAI,SAAS,CAAC,CAAC;QACjG,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,cAAc,CAAC,QAAQ,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;QAExF,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAkB;YAC9C,GAAG;YACH,cAAc;YACd,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,oBAAoB;SAClC,CAAC,CAAC;IACL,CAAC;CAEF;AA/SD,gCA+SC"}
@@ -1 +1,2 @@
1
1
  export * from './batches-api';
2
+ export * from './batches-api.jest.fixture';
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./batches-api"), exports);
18
+ __exportStar(require("./batches-api.jest.fixture"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rest/v1/batches/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rest/v1/batches/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,6DAA2C"}
@@ -1,9 +1,11 @@
1
- import { DeliveryReport, MOBinary, MOText, RecipientDeliveryReport } from '../../../models';
1
+ import { DeliveryReport, MOBinary, MOMedia, MOText, RecipientDeliveryReport } from '../../../models';
2
2
  import { CallbackProcessor } from '@sinch/sdk-client';
3
3
  import { IncomingHttpHeaders } from 'http';
4
- export type SmsCallback = DeliveryReport | RecipientDeliveryReport | MOText | MOBinary;
4
+ export type SmsCallback = DeliveryReport | RecipientDeliveryReport | MOText | MOBinary | MOMedia;
5
5
  export declare class SmsCallbackWebhooks implements CallbackProcessor<SmsCallback> {
6
- validateAuthenticationHeader(_headers: IncomingHttpHeaders, _body: any, _path: string, _method: string): boolean;
6
+ private readonly appSecret;
7
+ constructor(appSecret?: string);
8
+ validateAuthenticationHeader(headers: IncomingHttpHeaders, body: any, _path?: string, _method?: string): boolean;
7
9
  /**
8
10
  * Reviver for an SMS Event.
9
11
  * This method ensures the object can be treated as an SMS Event and should be called before any action is taken to manipulate the object.
@@ -11,4 +13,11 @@ export declare class SmsCallbackWebhooks implements CallbackProcessor<SmsCallbac
11
13
  * @return {SmsCallback} - The parsed SMS event object
12
14
  */
13
15
  parseEvent(eventBody: any): SmsCallback;
16
+ /**
17
+ * Static reviver for an SMS Event.
18
+ * This method ensures the object can be treated as an SMS Event.
19
+ * @param {any} eventBody - The event body containing the SMS event notification.
20
+ * @return {SmsCallback} - The parsed SMS event object
21
+ */
22
+ static parseEvent(eventBody: any): SmsCallback;
14
23
  }
@@ -1,12 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SmsCallbackWebhooks = void 0;
4
+ const sdk_client_1 = require("@sinch/sdk-client");
4
5
  class SmsCallbackWebhooks {
5
- validateAuthenticationHeader(
6
+ constructor(appSecret) {
7
+ this.appSecret = appSecret;
8
+ }
9
+ validateAuthenticationHeader(headers, body,
6
10
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
7
- _headers, _body, _path, _method) {
8
- // No header validation is implemented for SMS API
9
- return true;
11
+ _path, _method) {
12
+ if (!this.appSecret) {
13
+ return false;
14
+ }
15
+ return (0, sdk_client_1.validateWebhookSignature)(this.appSecret, headers, body);
10
16
  }
11
17
  /**
12
18
  * Reviver for an SMS Event.
@@ -15,10 +21,14 @@ class SmsCallbackWebhooks {
15
21
  * @return {SmsCallback} - The parsed SMS event object
16
22
  */
17
23
  parseEvent(eventBody) {
24
+ if (typeof eventBody === 'string') {
25
+ eventBody = JSON.parse(eventBody);
26
+ }
18
27
  if (eventBody.type) {
19
28
  let recipientDeliveryReport = null;
20
29
  let moText = null;
21
30
  let moBinary = null;
31
+ let moMedia = null;
22
32
  switch (eventBody.type) {
23
33
  case 'delivery_report_sms':
24
34
  case 'delivery_report_mms':
@@ -51,14 +61,32 @@ class SmsCallbackWebhooks {
51
61
  moBinary.sent_at = new Date(moBinary.sent_at);
52
62
  }
53
63
  return moBinary;
64
+ case 'mo_media':
65
+ moMedia = eventBody;
66
+ if (moMedia.received_at) {
67
+ moMedia.received_at = new Date(moMedia.received_at);
68
+ }
69
+ if (moMedia.sent_at) {
70
+ moMedia.sent_at = new Date(moMedia.sent_at);
71
+ }
72
+ return moMedia;
54
73
  default:
55
74
  throw new Error(`Unknown SMS event type: ${eventBody.type}`);
56
75
  }
57
76
  }
58
- console.log(eventBody);
59
- throw new Error('Unknown SMS event');
77
+ throw new Error(`Unknown SMS event: ${JSON.stringify(eventBody)}`);
60
78
  }
61
79
  ;
80
+ /**
81
+ * Static reviver for an SMS Event.
82
+ * This method ensures the object can be treated as an SMS Event.
83
+ * @param {any} eventBody - The event body containing the SMS event notification.
84
+ * @return {SmsCallback} - The parsed SMS event object
85
+ */
86
+ static parseEvent(eventBody) {
87
+ const instance = new SmsCallbackWebhooks();
88
+ return instance.parseEvent(eventBody);
89
+ }
62
90
  }
63
91
  exports.SmsCallbackWebhooks = SmsCallbackWebhooks;
64
92
  //# sourceMappingURL=callbacks-webhook.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"callbacks-webhook.js","sourceRoot":"","sources":["../../../../src/rest/v1/callbacks/callbacks-webhook.ts"],"names":[],"mappings":";;;AAMA,MAAa,mBAAmB;IAEvB,4BAA4B;IACjC,6DAA6D;IAC7D,QAA6B,EAAE,KAAU,EAAE,KAAa,EAAE,OAAe;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,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;oBAChD,CAAC;oBACD,OAAO,QAAQ,CAAC;gBAClB,KAAK,UAAU;oBACb,OAAO,GAAG,SAAoB,CAAC;oBAC/B,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;wBACxB,OAAO,CAAC,WAAW,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;oBACtD,CAAC;oBACD,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;wBACpB,OAAO,CAAC,OAAO,GAAG,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;oBAC9C,CAAC;oBACD,OAAO,OAAO,CAAC;gBACjB;oBACE,MAAM,IAAI,KAAK,CAAC,2BAA2B,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,sBAAsB,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;IACrE,CAAC;IAAA,CAAC;IAEF;;;;;OAKG;IACI,MAAM,CAAC,UAAU,CAAC,SAAc;QACrC,MAAM,QAAQ,GAAG,IAAI,mBAAmB,EAAE,CAAC;QAC3C,OAAO,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;CAEF;AAlGD,kDAkGC"}
@@ -1,13 +1,9 @@
1
+ import { ApiListPromise } from '@sinch/sdk-client';
1
2
  import { DeliveryReport, GetDeliveryReportByBatchIdRequestData, GetDeliveryReportByPhoneNumberRequestData, ListDeliveryReportsRequestData, RecipientDeliveryReport } from '../../../models';
2
- import { ApiListPromise, SinchClientParameters } from '@sinch/sdk-client';
3
3
  import { SmsDomainApi } from '../sms-domain-api';
4
+ import { LazySmsApiClient } from '../sms-service';
4
5
  export declare class DeliveryReportsApi extends SmsDomainApi {
5
- /**
6
- * Initialize your interface
7
- *
8
- * @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
9
- */
10
- constructor(sinchClientParameters: SinchClientParameters);
6
+ constructor(lazyClient: LazySmsApiClient);
11
7
  /**
12
8
  * Retrieve a delivery report
13
9
  * Delivery reports can be retrieved even if no callback was requested. The difference between a summary and a full report is only that the full report contains the phone numbers in &lt;a href&#x3D;\&quot;https://community.sinch.com/t5/Glossary/E-164/ta-p/7537\&quot; target&#x3D;\&quot;_blank\&quot;&gt;E.164&lt;/a&gt; format for each status code.
@@ -26,5 +22,5 @@ export declare class DeliveryReportsApi extends SmsDomainApi {
26
22
  * @param { ListDeliveryReportsRequestData } data - The data to provide to the API call.
27
23
  * @return {ApiListPromise<RecipientDeliveryReport>}
28
24
  */
29
- list(data: ListDeliveryReportsRequestData): ApiListPromise<RecipientDeliveryReport>;
25
+ list(data?: ListDeliveryReportsRequestData): ApiListPromise<RecipientDeliveryReport>;
30
26
  }
@@ -4,13 +4,8 @@ exports.DeliveryReportsApi = void 0;
4
4
  const sdk_client_1 = require("@sinch/sdk-client");
5
5
  const sms_domain_api_1 = require("../sms-domain-api");
6
6
  class DeliveryReportsApi extends sms_domain_api_1.SmsDomainApi {
7
- /**
8
- * Initialize your interface
9
- *
10
- * @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
11
- */
12
- constructor(sinchClientParameters) {
13
- super(sinchClientParameters, 'DeliveryReportsApi');
7
+ constructor(lazyClient) {
8
+ super(lazyClient, 'DeliveryReportsApi');
14
9
  }
15
10
  /**
16
11
  * Retrieve a delivery report
@@ -18,7 +13,6 @@ class DeliveryReportsApi extends sms_domain_api_1.SmsDomainApi {
18
13
  * @param { GetDeliveryReportByBatchIdRequestData } data - The data to provide to the API call.
19
14
  */
20
15
  async get(data) {
21
- this.client = this.getSinchClient();
22
16
  const getParams = this.client.extractQueryParams(data, ['type', 'status', 'code']);
23
17
  const headers = {
24
18
  'Content-Type': 'application/json',
@@ -41,7 +35,6 @@ class DeliveryReportsApi extends sms_domain_api_1.SmsDomainApi {
41
35
  * @param { GetDeliveryReportByPhoneNumberRequestData } data - The data to provide to the API call.
42
36
  */
43
37
  async getForNumber(data) {
44
- this.client = this.getSinchClient();
45
38
  const getParams = this.client.extractQueryParams(data, []);
46
39
  const headers = {
47
40
  'Content-Type': 'application/json',
@@ -73,8 +66,7 @@ class DeliveryReportsApi extends sms_domain_api_1.SmsDomainApi {
73
66
  * @return {ApiListPromise<RecipientDeliveryReport>}
74
67
  */
75
68
  list(data) {
76
- this.client = this.getSinchClient();
77
- const getParams = this.client.extractQueryParams(data, ['page', 'page_size', 'start_date', 'end_date', 'status', 'code', 'client_reference']);
69
+ const getParams = this.client.extractQueryParams(data ?? {}, ['page', 'page_size', 'start_date', 'end_date', 'status', 'code', 'client_reference']);
78
70
  const headers = {
79
71
  'Content-Type': 'application/json',
80
72
  'Accept': 'application/json',
@@ -1 +1 @@
1
- {"version":3,"file":"delivery-reports-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/delivery-reports/delivery-reports-api.ts"],"names":[],"mappings":";;;AAOA,kDAQ2B;AAC3B,sDAAiD;AAEjD,MAAa,kBAAmB,SAAQ,6BAAY;IAElD;;;;OAIG;IACH,YAAY,qBAA4C;QACtD,KAAK,CAAC,qBAAqB,EAAE,oBAAoB,CAAC,CAAC;IACrD,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,GAAG,CAAC,IAA2C;QAC1D,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QACpC,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAC9C,IAAI,EACJ,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAC3B,CAAC;QACF,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,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2BAAc,CAAC,IAAI;YAC/B,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,oBAAoB;YACjC,OAAO,EAAE,kBAAkB;SAC5B,CAAC;QAEF,qEAAqE;QACrE,MAAM,WAAW,GAAG,IAAA,mCAAsB,EACxC,IAAI,CAAC,MAAM,EACX,qBAAqB,EACrB,mBAAmB,CAAC,CAAC;QAEvB,kFAAkF;QAClF,MAAM,CAAC,MAAM,CACX,WAAW,EACX,IAAA,+CAAkC,EAChC,IAAI,CAAC,MAAM,EAAE,qBAAqB,EAAE,WAAW,EAAE,mBAAmB,CAAC,CACxE,CAAC;QAEF,OAAO,WAAsD,CAAC;IAChE,CAAC;CAEF;AA7HD,gDA6HC"}
1
+ {"version":3,"file":"delivery-reports-api.js","sourceRoot":"","sources":["../../../../src/rest/v1/delivery-reports/delivery-reports-api.ts"],"names":[],"mappings":";;;AAAA,kDAO2B;AAQ3B,sDAAiD;AAGjD,MAAa,kBAAmB,SAAQ,6BAAY;IAElD,YAAY,UAA4B;QACtC,KAAK,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC;IAC1C,CAAC;IAED;;;;OAIG;IACI,KAAK,CAAC,GAAG,CAAC,IAA2C;QAC1D,MAAM,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAC9C,IAAI,EACJ,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,CAC3B,CAAC;QACF,MAAM,OAAO,GAA0C;YACrD,cAAc,EAAE,kBAAkB;YAClC,QAAQ,EAAE,kBAAkB;SAC7B,CAAC;QAEF,MAAM,IAAI,GAAgB,EAAE,CAAC;QAC7B,MAAM,WAAW,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,WAAW,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,SAAS,YAAY,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC;QAE5J,MAAM,cAAc,GAChB,MAAM,IAAI,CAAC,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FAAkF;QAClF,MAAM,CAAC,MAAM,CACX,WAAW,EACX,IAAA,+CAAkC,EAChC,IAAI,CAAC,MAAM,EAAE,qBAAqB,EAAE,WAAW,EAAE,mBAAmB,CAAC,CACxE,CAAC;QAEF,OAAO,WAAsD,CAAC;IAChE,CAAC;CAEF;AArHD,gDAqHC"}
@@ -1 +1,2 @@
1
1
  export * from './delivery-reports-api';
2
+ export * from './delivery-reports-api.jest.fixture';
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./delivery-reports-api"), exports);
18
+ __exportStar(require("./delivery-reports-api.jest.fixture"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rest/v1/delivery-reports/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/rest/v1/delivery-reports/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,sEAAoD"}
@@ -1,13 +1,9 @@
1
+ import { ApiListPromise } from '@sinch/sdk-client';
1
2
  import { CreateGroupRequestData, DeleteGroupRequestData, GetGroupRequestData, ListGroupsRequestData, ListMembersRequestData, ReplaceGroupRequestData, UpdateGroupRequestData, Group } from '../../../models';
2
- import { ApiListPromise, SinchClientParameters } from '@sinch/sdk-client';
3
3
  import { SmsDomainApi } from '../sms-domain-api';
4
+ import { LazySmsApiClient } from '../sms-service';
4
5
  export declare class GroupsApi extends SmsDomainApi {
5
- /**
6
- * Initialize your interface
7
- *
8
- * @param {SinchClientParameters} sinchClientParameters - The parameters used to initialize the API Client.
9
- */
10
- constructor(sinchClientParameters: SinchClientParameters);
6
+ constructor(lazyClient: LazySmsApiClient);
11
7
  /**
12
8
  * Create a group
13
9
  * A group is a set of phone numbers (MSISDNs) that can be used as a target in the &#x60;send_batch_msg&#x60; operation. An MSISDN can only occur once in a group and any attempts to add a duplicate would be ignored but not rejected.
@@ -32,7 +28,7 @@ export declare class GroupsApi extends SmsDomainApi {
32
28
  * @param { ListGroupsRequestData } data - The data to provide to the API call.
33
29
  * @return {ApiListPromise<Group>}
34
30
  */
35
- list(data: ListGroupsRequestData): ApiListPromise<Group>;
31
+ list(data?: ListGroupsRequestData): ApiListPromise<Group>;
36
32
  /**
37
33
  * Replace a group
38
34
  * The replace operation will replace all parameters, including members, of an existing group with new values. Replacing a group targeted by a batch message scheduled in the future is allowed and changes will be reflected when the batch is sent.