@azure/communication-sms 1.2.0-beta.2 → 1.2.0-beta.4
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/LICENSE +3 -3
- package/README.md +127 -16
- package/dist/browser/constants.js +1 -1
- package/dist/browser/constants.js.map +1 -1
- package/dist/browser/extractOperationOptions.d.ts.map +1 -1
- package/dist/browser/generated/src/models/index.d.ts +9 -0
- package/dist/browser/generated/src/models/index.d.ts.map +1 -1
- package/dist/browser/generated/src/models/index.js.map +1 -1
- package/dist/browser/generated/src/models/mappers.d.ts +1 -0
- package/dist/browser/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/browser/generated/src/models/mappers.js +29 -0
- package/dist/browser/generated/src/models/mappers.js.map +1 -1
- package/dist/browser/generated/src/models/parameters.js +1 -1
- package/dist/browser/generated/src/models/parameters.js.map +1 -1
- package/dist/browser/generated/src/smsApiClient.js +2 -2
- package/dist/browser/generated/src/smsApiClient.js.map +1 -1
- package/dist/browser/generated/src/tracing.js +1 -1
- package/dist/browser/generated/src/tracing.js.map +1 -1
- package/dist/browser/optOutsClient.d.ts.map +1 -1
- package/dist/browser/optOutsClient.js +1 -1
- package/dist/browser/optOutsClient.js.map +1 -1
- package/dist/browser/smsClient.d.ts +9 -0
- package/dist/browser/smsClient.d.ts.map +1 -1
- package/dist/browser/smsClient.js.map +1 -1
- package/dist/browser/utils/smsUtils.d.ts.map +1 -1
- package/dist/browser/utils/smsUtils.js +1 -1
- package/dist/browser/utils/smsUtils.js.map +1 -1
- package/dist/commonjs/constants.js +1 -1
- package/dist/commonjs/constants.js.map +1 -1
- package/dist/commonjs/extractOperationOptions.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/index.d.ts +9 -0
- package/dist/commonjs/generated/src/models/index.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/index.js.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.d.ts +1 -0
- package/dist/commonjs/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models/mappers.js +30 -1
- package/dist/commonjs/generated/src/models/mappers.js.map +1 -1
- package/dist/commonjs/generated/src/models/parameters.js +1 -1
- package/dist/commonjs/generated/src/models/parameters.js.map +1 -1
- package/dist/commonjs/generated/src/smsApiClient.js +2 -2
- package/dist/commonjs/generated/src/smsApiClient.js.map +1 -1
- package/dist/commonjs/generated/src/tracing.js +1 -1
- package/dist/commonjs/generated/src/tracing.js.map +1 -1
- package/dist/commonjs/optOutsClient.d.ts.map +1 -1
- package/dist/commonjs/optOutsClient.js +1 -1
- package/dist/commonjs/optOutsClient.js.map +1 -1
- package/dist/commonjs/smsClient.d.ts +9 -0
- package/dist/commonjs/smsClient.d.ts.map +1 -1
- package/dist/commonjs/smsClient.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +1 -1
- package/dist/commonjs/utils/smsUtils.d.ts.map +1 -1
- package/dist/commonjs/utils/smsUtils.js +1 -1
- package/dist/commonjs/utils/smsUtils.js.map +1 -1
- package/dist/esm/constants.js +1 -1
- package/dist/esm/constants.js.map +1 -1
- package/dist/esm/extractOperationOptions.d.ts.map +1 -1
- package/dist/esm/generated/src/models/index.d.ts +9 -0
- package/dist/esm/generated/src/models/index.d.ts.map +1 -1
- package/dist/esm/generated/src/models/index.js.map +1 -1
- package/dist/esm/generated/src/models/mappers.d.ts +1 -0
- package/dist/esm/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/esm/generated/src/models/mappers.js +29 -0
- package/dist/esm/generated/src/models/mappers.js.map +1 -1
- package/dist/esm/generated/src/models/parameters.js +1 -1
- package/dist/esm/generated/src/models/parameters.js.map +1 -1
- package/dist/esm/generated/src/smsApiClient.js +2 -2
- package/dist/esm/generated/src/smsApiClient.js.map +1 -1
- package/dist/esm/generated/src/tracing.js +1 -1
- package/dist/esm/generated/src/tracing.js.map +1 -1
- package/dist/esm/optOutsClient.d.ts.map +1 -1
- package/dist/esm/optOutsClient.js +1 -1
- package/dist/esm/optOutsClient.js.map +1 -1
- package/dist/esm/smsClient.d.ts +9 -0
- package/dist/esm/smsClient.d.ts.map +1 -1
- package/dist/esm/smsClient.js.map +1 -1
- package/dist/esm/utils/smsUtils.d.ts.map +1 -1
- package/dist/esm/utils/smsUtils.js +1 -1
- package/dist/esm/utils/smsUtils.js.map +1 -1
- package/dist/react-native/constants.js +1 -1
- package/dist/react-native/constants.js.map +1 -1
- package/dist/react-native/extractOperationOptions.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/index.d.ts +9 -0
- package/dist/react-native/generated/src/models/index.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/index.js.map +1 -1
- package/dist/react-native/generated/src/models/mappers.d.ts +1 -0
- package/dist/react-native/generated/src/models/mappers.d.ts.map +1 -1
- package/dist/react-native/generated/src/models/mappers.js +29 -0
- package/dist/react-native/generated/src/models/mappers.js.map +1 -1
- package/dist/react-native/generated/src/models/parameters.js +1 -1
- package/dist/react-native/generated/src/models/parameters.js.map +1 -1
- package/dist/react-native/generated/src/smsApiClient.js +2 -2
- package/dist/react-native/generated/src/smsApiClient.js.map +1 -1
- package/dist/react-native/generated/src/tracing.js +1 -1
- package/dist/react-native/generated/src/tracing.js.map +1 -1
- package/dist/react-native/optOutsClient.d.ts.map +1 -1
- package/dist/react-native/optOutsClient.js +1 -1
- package/dist/react-native/optOutsClient.js.map +1 -1
- package/dist/react-native/smsClient.d.ts +9 -0
- package/dist/react-native/smsClient.d.ts.map +1 -1
- package/dist/react-native/smsClient.js.map +1 -1
- package/dist/react-native/utils/smsUtils.d.ts.map +1 -1
- package/dist/react-native/utils/smsUtils.js +1 -1
- package/dist/react-native/utils/smsUtils.js.map +1 -1
- package/package.json +26 -34
|
@@ -105,6 +105,35 @@ export const SmsSendOptions = {
|
|
|
105
105
|
name: "Number",
|
|
106
106
|
},
|
|
107
107
|
},
|
|
108
|
+
messagingConnect: {
|
|
109
|
+
serializedName: "messagingConnect",
|
|
110
|
+
type: {
|
|
111
|
+
name: "Composite",
|
|
112
|
+
className: "MessagingConnectOptions",
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
};
|
|
118
|
+
export const MessagingConnectOptions = {
|
|
119
|
+
type: {
|
|
120
|
+
name: "Composite",
|
|
121
|
+
className: "MessagingConnectOptions",
|
|
122
|
+
modelProperties: {
|
|
123
|
+
apiKey: {
|
|
124
|
+
serializedName: "apiKey",
|
|
125
|
+
required: true,
|
|
126
|
+
type: {
|
|
127
|
+
name: "String",
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
partner: {
|
|
131
|
+
serializedName: "partner",
|
|
132
|
+
required: true,
|
|
133
|
+
type: {
|
|
134
|
+
name: "String",
|
|
135
|
+
},
|
|
136
|
+
},
|
|
108
137
|
},
|
|
109
138
|
},
|
|
110
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../../../src/generated/src/models/mappers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,CAAC,MAAM,kBAAkB,GAA+B;IAC5D,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,oBAAoB;QAC/B,eAAe,EAAE;YACf,IAAI,EAAE;gBACJ,cAAc,EAAE,MAAM;gBACtB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,aAAa,EAAE;gBACb,cAAc,EAAE,eAAe;gBAC/B,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,UAAU;oBAChB,OAAO,EAAE;wBACP,IAAI,EAAE;4BACJ,IAAI,EAAE,WAAW;4BACjB,SAAS,EAAE,cAAc;yBAC1B;qBACF;iBACF;aACF;YACD,OAAO,EAAE;gBACP,WAAW,EAAE;oBACX,SAAS,EAAE,IAAI;iBAChB;gBACD,cAAc,EAAE,SAAS;gBACzB,QAAQ,E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BAChC;qBACF;iBACF;aACF;SACF;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAA+B;IAC5D,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,SAAS,EAAE,oBAAoB;QAC/B,eAAe,EAAE;YACf,EAAE,EAAE;gBACF,WAAW,EAAE;oBACX,SAAS,EAAE,CAAC;iBACb;gBACD,cAAc,EAAE,IAAI;gBACpB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,cAAc,EAAE;gBACd,cAAc,EAAE,gBAAgB;gBAChC,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,UAAU,EAAE;gBACV,cAAc,EAAE,YAAY;gBAC5B,IAAI,EAAE;oBACJ,IAAI,EAAE,SAAS;iBAChB;aACF;YACD,YAAY,EAAE;gBACZ,cAAc,EAAE,cAAc;gBAC9B,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACF,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\nexport const SendMessageRequest: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SendMessageRequest\",\n modelProperties: {\n from: {\n serializedName: \"from\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n smsRecipients: {\n serializedName: \"smsRecipients\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SmsRecipient\",\n },\n },\n },\n },\n message: {\n constraints: {\n MaxLength: 2048,\n },\n serializedName: \"message\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n smsSendOptions: {\n serializedName: \"smsSendOptions\",\n type: {\n name: \"Composite\",\n className: \"SmsSendOptions\",\n },\n },\n },\n },\n};\n\nexport const SmsRecipient: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SmsRecipient\",\n modelProperties: {\n to: {\n serializedName: \"to\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n repeatabilityRequestId: {\n serializedName: \"repeatabilityRequestId\",\n type: {\n name: \"String\",\n },\n },\n repeatabilityFirstSent: {\n serializedName: \"repeatabilityFirstSent\",\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n\nexport const SmsSendOptions: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SmsSendOptions\",\n modelProperties: {\n enableDeliveryReport: {\n serializedName: \"enableDeliveryReport\",\n required: true,\n type: {\n name: \"Boolean\",\n },\n },\n tag: {\n serializedName: \"tag\",\n type: {\n name: \"String\",\n },\n },\n deliveryReportTimeoutInSeconds: {\n constraints: {\n InclusiveMaximum: 43200,\n InclusiveMinimum: 60,\n },\n serializedName: \"deliveryReportTimeoutInSeconds\",\n type: {\n name: \"Number\",\n },\n },\n },\n },\n};\n\nexport const SmsSendResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SmsSendResponse\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SmsSendResponseItem\",\n },\n },\n },\n },\n },\n },\n};\n\nexport const SmsSendResponseItem: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SmsSendResponseItem\",\n modelProperties: {\n to: {\n serializedName: \"to\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n messageId: {\n serializedName: \"messageId\",\n type: {\n name: \"String\",\n },\n },\n httpStatusCode: {\n serializedName: \"httpStatusCode\",\n required: true,\n type: {\n name: \"Number\",\n },\n },\n repeatabilityResult: {\n serializedName: \"repeatabilityResult\",\n type: {\n name: \"String\",\n },\n },\n successful: {\n serializedName: \"successful\",\n required: true,\n type: {\n name: \"Boolean\",\n },\n },\n errorMessage: {\n serializedName: \"errorMessage\",\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n\nexport const OptOutRequest: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"OptOutRequest\",\n modelProperties: {\n from: {\n constraints: {\n MinLength: 1,\n },\n serializedName: \"from\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n recipients: {\n constraints: {\n MinItems: 1,\n MaxItems: 100,\n },\n serializedName: \"recipients\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"OptOutRecipient\",\n },\n },\n },\n },\n },\n },\n};\n\nexport const OptOutRecipient: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"OptOutRecipient\",\n modelProperties: {\n to: {\n constraints: {\n MinLength: 1,\n },\n serializedName: \"to\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n\nexport const OptOutResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"OptOutResponse\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"OptOutResponseItem\",\n },\n },\n },\n },\n },\n },\n};\n\nexport const OptOutResponseItem: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"OptOutResponseItem\",\n modelProperties: {\n to: {\n constraints: {\n MinLength: 1,\n },\n serializedName: \"to\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n httpStatusCode: {\n serializedName: \"httpStatusCode\",\n required: true,\n type: {\n name: \"Number\",\n },\n },\n isOptedOut: {\n serializedName: \"isOptedOut\",\n type: {\n name: \"Boolean\",\n },\n },\n errorMessage: {\n serializedName: \"errorMessage\",\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n"]}
|
|
1
|
+
{"version":3,"file":"mappers.js","sourceRoot":"","sources":["../../../../../src/generated/src/models/mappers.ts"],"names":[],"mappings":"AAAA;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I,EAAE,WAAW;QACjB,SAAS,EAAE,oBAAoB;QAC/B,eAAe,EAAE;YACf,EAAE,EAAE;gBACF,WAAW,EAAE;oBACX,SAAS,EAAE,CAAC;iBACb;gBACD,cAAc,EAAE,IAAI;gBACpB,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,cAAc,EAAE;gBACd,cAAc,EAAE,gBAAgB;gBAChC,QAAQ,EAAE,IAAI;gBACd,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,UAAU,EAAE;gBACV,cAAc,EAAE,YAAY;gBAC5B,IAAI,EAAE;oBACJ,IAAI,EAAE,SAAS;iBAChB;aACF;YACD,YAAY,EAAE;gBACZ,cAAc,EAAE,cAAc;gBAC9B,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;KACF;CACF,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\n\nexport const SendMessageRequest: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SendMessageRequest\",\n modelProperties: {\n from: {\n serializedName: \"from\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n smsRecipients: {\n serializedName: \"smsRecipients\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SmsRecipient\",\n },\n },\n },\n },\n message: {\n constraints: {\n MaxLength: 2048,\n },\n serializedName: \"message\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n smsSendOptions: {\n serializedName: \"smsSendOptions\",\n type: {\n name: \"Composite\",\n className: \"SmsSendOptions\",\n },\n },\n },\n },\n};\n\nexport const SmsRecipient: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SmsRecipient\",\n modelProperties: {\n to: {\n serializedName: \"to\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n repeatabilityRequestId: {\n serializedName: \"repeatabilityRequestId\",\n type: {\n name: \"String\",\n },\n },\n repeatabilityFirstSent: {\n serializedName: \"repeatabilityFirstSent\",\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n\nexport const SmsSendOptions: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SmsSendOptions\",\n modelProperties: {\n enableDeliveryReport: {\n serializedName: \"enableDeliveryReport\",\n required: true,\n type: {\n name: \"Boolean\",\n },\n },\n tag: {\n serializedName: \"tag\",\n type: {\n name: \"String\",\n },\n },\n deliveryReportTimeoutInSeconds: {\n constraints: {\n InclusiveMaximum: 43200,\n InclusiveMinimum: 60,\n },\n serializedName: \"deliveryReportTimeoutInSeconds\",\n type: {\n name: \"Number\",\n },\n },\n messagingConnect: {\n serializedName: \"messagingConnect\",\n type: {\n name: \"Composite\",\n className: \"MessagingConnectOptions\",\n },\n },\n },\n },\n};\n\nexport const MessagingConnectOptions: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"MessagingConnectOptions\",\n modelProperties: {\n apiKey: {\n serializedName: \"apiKey\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n partner: {\n serializedName: \"partner\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n\nexport const SmsSendResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SmsSendResponse\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"SmsSendResponseItem\",\n },\n },\n },\n },\n },\n },\n};\n\nexport const SmsSendResponseItem: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"SmsSendResponseItem\",\n modelProperties: {\n to: {\n serializedName: \"to\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n messageId: {\n serializedName: \"messageId\",\n type: {\n name: \"String\",\n },\n },\n httpStatusCode: {\n serializedName: \"httpStatusCode\",\n required: true,\n type: {\n name: \"Number\",\n },\n },\n repeatabilityResult: {\n serializedName: \"repeatabilityResult\",\n type: {\n name: \"String\",\n },\n },\n successful: {\n serializedName: \"successful\",\n required: true,\n type: {\n name: \"Boolean\",\n },\n },\n errorMessage: {\n serializedName: \"errorMessage\",\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n\nexport const OptOutRequest: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"OptOutRequest\",\n modelProperties: {\n from: {\n constraints: {\n MinLength: 1,\n },\n serializedName: \"from\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n recipients: {\n constraints: {\n MinItems: 1,\n MaxItems: 100,\n },\n serializedName: \"recipients\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"OptOutRecipient\",\n },\n },\n },\n },\n },\n },\n};\n\nexport const OptOutRecipient: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"OptOutRecipient\",\n modelProperties: {\n to: {\n constraints: {\n MinLength: 1,\n },\n serializedName: \"to\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n\nexport const OptOutResponse: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"OptOutResponse\",\n modelProperties: {\n value: {\n serializedName: \"value\",\n required: true,\n type: {\n name: \"Sequence\",\n element: {\n type: {\n name: \"Composite\",\n className: \"OptOutResponseItem\",\n },\n },\n },\n },\n },\n },\n};\n\nexport const OptOutResponseItem: coreClient.CompositeMapper = {\n type: {\n name: \"Composite\",\n className: \"OptOutResponseItem\",\n modelProperties: {\n to: {\n constraints: {\n MinLength: 1,\n },\n serializedName: \"to\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n httpStatusCode: {\n serializedName: \"httpStatusCode\",\n required: true,\n type: {\n name: \"Number\",\n },\n },\n isOptedOut: {\n serializedName: \"isOptedOut\",\n type: {\n name: \"Boolean\",\n },\n },\n errorMessage: {\n serializedName: \"errorMessage\",\n type: {\n name: \"String\",\n },\n },\n },\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../src/generated/src/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EACL,kBAAkB,IAAI,wBAAwB,EAC9C,aAAa,IAAI,mBAAmB,GACrC,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,WAAW,GAAuB;IAC7C,aAAa,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IACzC,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,cAAc;QAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAuB;IACpD,aAAa,EAAE,oBAAoB;IACnC,MAAM,EAAE,wBAAwB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAA0B;IAC7C,aAAa,EAAE,UAAU;IACzB,MAAM,EAAE;QACN,cAAc,EAAE,UAAU;QAC1B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;IACD,YAAY,EAAE,IAAI;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAA4B;IACjD,aAAa,EAAE,YAAY;IAC3B,MAAM,EAAE;QACN,YAAY,EAAE,oBAAoB;QAClC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,aAAa;QAC7B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAuB;IACtC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,mBAAmB;CAC5B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter,\n} from \"@azure/core-client\";\nimport {\n SendMessageRequest as SendMessageRequestMapper,\n OptOutRequest as OptOutRequestMapper,\n} from \"../models/mappers.js\";\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\",\n },\n },\n};\n\nexport const sendMessageRequest: OperationParameter = {\n parameterPath: \"sendMessageRequest\",\n mapper: SendMessageRequestMapper,\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\",\n },\n },\n};\n\nexport const endpoint: OperationURLParameter = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"endpoint\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n skipEncoding: true,\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"
|
|
1
|
+
{"version":3,"file":"parameters.js","sourceRoot":"","sources":["../../../../../src/generated/src/models/parameters.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH,OAAO,EACL,kBAAkB,IAAI,wBAAwB,EAC9C,aAAa,IAAI,mBAAmB,GACrC,MAAM,sBAAsB,CAAC;AAE9B,MAAM,CAAC,MAAM,WAAW,GAAuB;IAC7C,aAAa,EAAE,CAAC,SAAS,EAAE,aAAa,CAAC;IACzC,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,cAAc;QAC9B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAuB;IACpD,aAAa,EAAE,oBAAoB;IACnC,MAAM,EAAE,wBAAwB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAuB;IACxC,aAAa,EAAE,QAAQ;IACvB,MAAM,EAAE;QACN,YAAY,EAAE,kBAAkB;QAChC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,QAAQ;QACxB,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAA0B;IAC7C,aAAa,EAAE,UAAU;IACzB,MAAM,EAAE;QACN,cAAc,EAAE,UAAU;QAC1B,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;IACD,YAAY,EAAE,IAAI;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAA4B;IACjD,aAAa,EAAE,YAAY;IAC3B,MAAM,EAAE;QACN,YAAY,EAAE,oBAAoB;QAClC,UAAU,EAAE,IAAI;QAChB,cAAc,EAAE,aAAa;QAC7B,IAAI,EAAE;YACJ,IAAI,EAAE,QAAQ;SACf;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAuB;IACtC,aAAa,EAAE,MAAM;IACrB,MAAM,EAAE,mBAAmB;CAC5B,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport {\n OperationParameter,\n OperationURLParameter,\n OperationQueryParameter,\n} from \"@azure/core-client\";\nimport {\n SendMessageRequest as SendMessageRequestMapper,\n OptOutRequest as OptOutRequestMapper,\n} from \"../models/mappers.js\";\n\nexport const contentType: OperationParameter = {\n parameterPath: [\"options\", \"contentType\"],\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Content-Type\",\n type: {\n name: \"String\",\n },\n },\n};\n\nexport const sendMessageRequest: OperationParameter = {\n parameterPath: \"sendMessageRequest\",\n mapper: SendMessageRequestMapper,\n};\n\nexport const accept: OperationParameter = {\n parameterPath: \"accept\",\n mapper: {\n defaultValue: \"application/json\",\n isConstant: true,\n serializedName: \"Accept\",\n type: {\n name: \"String\",\n },\n },\n};\n\nexport const endpoint: OperationURLParameter = {\n parameterPath: \"endpoint\",\n mapper: {\n serializedName: \"endpoint\",\n required: true,\n type: {\n name: \"String\",\n },\n },\n skipEncoding: true,\n};\n\nexport const apiVersion: OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n defaultValue: \"2025-05-29-preview\",\n isConstant: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\",\n },\n },\n};\n\nexport const body: OperationParameter = {\n parameterPath: \"body\",\n mapper: OptOutRequestMapper,\n};\n"]}
|
|
@@ -25,7 +25,7 @@ export class SmsApiClient extends coreClient.ServiceClient {
|
|
|
25
25
|
const defaults = {
|
|
26
26
|
requestContentType: "application/json; charset=utf-8",
|
|
27
27
|
};
|
|
28
|
-
const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.
|
|
28
|
+
const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.4`;
|
|
29
29
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
30
30
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
31
31
|
: `${packageDetails}`;
|
|
@@ -36,7 +36,7 @@ export class SmsApiClient extends coreClient.ServiceClient {
|
|
|
36
36
|
// Parameter assignments
|
|
37
37
|
this.endpoint = endpoint;
|
|
38
38
|
// Assigning values to Constant parameters
|
|
39
|
-
this.apiVersion = options.apiVersion || "
|
|
39
|
+
this.apiVersion = options.apiVersion || "2025-05-29-preview";
|
|
40
40
|
this.sms = new SmsImpl(this);
|
|
41
41
|
this.optOuts = new OptOutsImpl(this);
|
|
42
42
|
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smsApiClient.js","sourceRoot":"","sources":["../../../../src/generated/src/smsApiClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI7D,MAAM,OAAO,YAAa,SAAQ,UAAU,CAAC,aAAa;IAIxD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAoC;;QAChE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,GAAG,EAAE,CAAC;QACf,CAAC;QACD,MAAM,QAAQ,GAA+B;YAC3C,kBAAkB,EAAE,iCAAiC;SACtD,CAAC;QAEF,MAAM,cAAc,GAAG,yCAAyC,CAAC;QACjE,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OAAO,KACV,gBAAgB,EAAE;gBAChB,eAAe;aAChB,EACD,QAAQ,EAAE,MAAA,MAAA,OAAO,CAAC,QAAQ,mCAAI,OAAO,CAAC,OAAO,mCAAI,YAAY,GAC9D,CAA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,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAIF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport { SmsImpl, OptOutsImpl } from \"./operations/index.js\";\nimport { Sms, OptOuts } from \"./operationsInterfaces/index.js\";\nimport { SmsApiClientOptionalParams } from \"./models/index.js\";\n\nexport class SmsApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SmsApiClient class.\n * @param endpoint The communication resource, for example https://my-resource.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SmsApiClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SmsApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.
|
|
1
|
+
{"version":3,"file":"smsApiClient.js","sourceRoot":"","sources":["../../../../src/generated/src/smsApiClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAMjD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAI7D,MAAM,OAAO,YAAa,SAAQ,UAAU,CAAC,aAAa;IAIxD;;;;OAIG;IACH,YAAY,QAAgB,EAAE,OAAoC;;QAChE,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QAC/C,CAAC;QAED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AC,GAAG,CAAC,CAAC;gBACrC,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;oBACrB,MAAM,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;wBACjD,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;4BACrC,OAAO,cAAc,GAAG,UAAU,CAAC;wBACrC,CAAC;6BAAM,CAAC;4BACN,OAAO,IAAI,CAAC;wBACd,CAAC;oBACH,CAAC,CAAC,CAAC;oBACH,OAAO,CAAC,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACrD,CAAC;gBACD,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;YACvB,CAAC;SACF,CAAC;QACF,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IAC5C,CAAC;CAIF","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport * as coreClient from \"@azure/core-client\";\nimport {\n PipelineRequest,\n PipelineResponse,\n SendRequest,\n} from \"@azure/core-rest-pipeline\";\nimport { SmsImpl, OptOutsImpl } from \"./operations/index.js\";\nimport { Sms, OptOuts } from \"./operationsInterfaces/index.js\";\nimport { SmsApiClientOptionalParams } from \"./models/index.js\";\n\nexport class SmsApiClient extends coreClient.ServiceClient {\n endpoint: string;\n apiVersion: string;\n\n /**\n * Initializes a new instance of the SmsApiClient class.\n * @param endpoint The communication resource, for example https://my-resource.communication.azure.com\n * @param options The parameter options\n */\n constructor(endpoint: string, options?: SmsApiClientOptionalParams) {\n if (endpoint === undefined) {\n throw new Error(\"'endpoint' cannot be null\");\n }\n\n // Initializing default values for options\n if (!options) {\n options = {};\n }\n const defaults: SmsApiClientOptionalParams = {\n requestContentType: \"application/json; charset=utf-8\",\n };\n\n const packageDetails = `azsdk-js-communication-sms/1.2.0-beta.4`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`\n : `${packageDetails}`;\n\n const optionsWithDefaults = {\n ...defaults,\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n endpoint: options.endpoint ?? options.baseUri ?? \"{endpoint}\",\n };\n super(optionsWithDefaults);\n // Parameter assignments\n this.endpoint = endpoint;\n\n // Assigning values to Constant parameters\n this.apiVersion = options.apiVersion || \"2025-05-29-preview\";\n this.sms = new SmsImpl(this);\n this.optOuts = new OptOutsImpl(this);\n this.addCustomApiVersionPolicy(options.apiVersion);\n }\n\n /** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */\n private addCustomApiVersionPolicy(apiVersion?: string) {\n if (!apiVersion) {\n return;\n }\n const apiVersionPolicy = {\n name: \"CustomApiVersionPolicy\",\n async sendRequest(\n request: PipelineRequest,\n next: SendRequest,\n ): Promise<PipelineResponse> {\n const param = request.url.split(\"?\");\n if (param.length > 1) {\n const newParams = param[1].split(\"&\").map((item) => {\n if (item.indexOf(\"api-version\") > -1) {\n return \"api-version=\" + apiVersion;\n } else {\n return item;\n }\n });\n request.url = param[0] + \"?\" + newParams.join(\"&\");\n }\n return next(request);\n },\n };\n this.pipeline.addPolicy(apiVersionPolicy);\n }\n\n sms: Sms;\n optOuts: OptOuts;\n}\n"]}
|
|
@@ -9,6 +9,6 @@ import { createTracingClient } from "@azure/core-tracing";
|
|
|
9
9
|
export const tracingClient = createTracingClient({
|
|
10
10
|
namespace: "Microsoft.Communication",
|
|
11
11
|
packageName: "@azure/communication-sms",
|
|
12
|
-
packageVersion: "1.2.0-beta.
|
|
12
|
+
packageVersion: "1.2.0-beta.4",
|
|
13
13
|
});
|
|
14
14
|
//# sourceMappingURL=tracing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,0BAA0B;IACvC,cAAc,EAAE,cAAc;CAC/B,CAAC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-sms\",\n packageVersion: \"1.2.0-beta.
|
|
1
|
+
{"version":3,"file":"tracing.js","sourceRoot":"","sources":["../../../../src/generated/src/tracing.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG,mBAAmB,CAAC;IAC/C,SAAS,EAAE,yBAAyB;IACpC,WAAW,EAAE,0BAA0B;IACvC,cAAc,EAAE,cAAc;CAC/B,CAAC,CAAC","sourcesContent":["/*\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is regenerated.\n */\n\nimport { createTracingClient } from \"@azure/core-tracing\";\n\nexport const tracingClient = createTracingClient({\n namespace: \"Microsoft.Communication\",\n packageName: \"@azure/communication-sms\",\n packageVersion: \"1.2.0-beta.4\",\n});\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optOutsClient.d.ts","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAGpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,UAAU,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,gBAAgB;CAAG;AAEzD;;GAEG;AACH,MAAM,WAAW,UAAW,SAAQ,gBAAgB;CAAG;AAEvD;;GAEG;AACH,MAAM,WAAW,aAAc,SAAQ,gBAAgB;CAAG;AAE1D;;;GAGG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;gBAEvB,GAAG,EAAE,YAAY;IAI7B;;;;;;OAMG;IACU,MAAM,CACjB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EAAE,EACZ,OAAO,GAAE,aAAkB,GAC1B,OAAO,CAAC,kBAAkB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"optOutsClient.d.ts","sourceRoot":"","s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Z,OAAO,GAAE,UAAe,GACvB,OAAO,CAAC,eAAe,EAAE,CAAC;IAe7B;;;;;;OAMG;IACU,KAAK,CAChB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EAAE,EACZ,OAAO,GAAE,YAAiB,GACzB,OAAO,CAAC,iBAAiB,EAAE,CAAC;CAkBhC"}
|
|
@@ -21,7 +21,7 @@ export class OptOutsClient {
|
|
|
21
21
|
async remove(from, to, options = {}) {
|
|
22
22
|
const { operationOptions } = extractOperationOptions(options);
|
|
23
23
|
return tracingClient.withSpan("OptOuts-Remove", operationOptions, async (updatedOptions) => {
|
|
24
|
-
const response = await this.api.optOuts.
|
|
24
|
+
const response = await this.api.optOuts.remove(generateOptOutRequest(from, to), updatedOptions);
|
|
25
25
|
return response.value.map((optOutResponseItem) => {
|
|
26
26
|
var _a;
|
|
27
27
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optOutsClient.js","sourceRoot":"","sources":["../../src/optOutsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAG3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AA4EvE;;;GAGG;AACH,MAAM,OAAO,aAAa;IAGxB,YAAY,GAAiB;QAC3B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,MAAM,CACjB,IAAY,EACZ,EAAY,EACZ,UAAyB,EAAE;QAE3B,MAAM,EAAE,gBAAgB,EAAE,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC9D,OAAO,aAAa,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE;YACzF,MAAM,QAAQ,GAAG,MAAM,IA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YAAY,mCAAI,EAAE;iBACpD,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { tracingClient } from \"./generated/src/tracing.js\";\nimport type { OptOutResponseItem } from \"./generated/src/index.js\";\nimport type { SmsApiClient } from \"./generated/src/smsApiClient.js\";\nimport { generateOptOutRequest } from \"./utils/smsUtils.js\";\nimport { extractOperationOptions } from \"./extractOperationOptions.js\";\nimport type { OperationOptions } from \"@azure/core-client\";\n\n/**\n * The result of Opt Out Check request.\n */\nexport interface OptOutCheckResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * Indicates if the recipient's phone number in opted out from receiving messages or not.\n */\n isOptedOut: boolean;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Add request.\n */\nexport interface OptOutAddResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Remove request.\n */\nexport interface OptOutRemoveResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * Client options used to configure OptOuts Client API Check requests.\n */\nexport interface CheckOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Add requests.\n */\nexport interface AddOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Remove requests.\n */\nexport interface RemoveOptions extends OperationOptions {}\n\n/**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\nexport class OptOutsClient {\n private readonly api: SmsApiClient;\n\n constructor(api: SmsApiClient) {\n this.api = api;\n }\n\n /**\n * Removes phone numbers from the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async remove(\n from: string,\n to: string[],\n options: RemoveOptions = {},\n ): Promise<OptOutRemoveResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Remove\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.remove(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Adds phone numbers to the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async add(\n from: string,\n to: string[],\n options: AddOptions = {},\n ): Promise<OptOutAddResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Add\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.add(generateOptOutRequest(from, to), updatedOptions);\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n\n /**\n * Checks if phone numbers are in the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n public async check(\n from: string,\n to: string[],\n options: CheckOptions = {},\n ): Promise<OptOutCheckResult[]> {\n const { operationOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"OptOuts-Check\", operationOptions, async (updatedOptions) => {\n const response = await this.api.optOuts.check(\n generateOptOutRequest(from, to),\n updatedOptions,\n );\n\n return response.value.map((optOutResponseItem: OptOutResponseItem) => {\n return {\n to: optOutResponseItem.to,\n isOptedOut: optOutResponseItem.isOptedOut ?? false,\n httpStatusCode: optOutResponseItem.httpStatusCode,\n errorMessage: optOutResponseItem.errorMessage ?? \"\",\n };\n });\n });\n }\n}\n"]}
|
|
@@ -39,6 +39,15 @@ export interface SmsSendOptions extends OperationOptions {
|
|
|
39
39
|
tag?: string;
|
|
40
40
|
/** Time to wait for a delivery report. After this time a delivery report with timeout error code is generated. */
|
|
41
41
|
deliveryReportTimeoutInSeconds?: number;
|
|
42
|
+
/** Defines optional parameters for connecting with the Messaging Connect Partner to deliver SMS. */
|
|
43
|
+
messagingConnect?: MessagingConnectOptions;
|
|
44
|
+
}
|
|
45
|
+
/** Defines optional parameters for connecting with the Messaging Connect Partner to deliver SMS. */
|
|
46
|
+
export interface MessagingConnectOptions {
|
|
47
|
+
/** Represents the API key associated with the customer's account in the Messaging Connect Partner portal. */
|
|
48
|
+
apiKey: string;
|
|
49
|
+
/** Specifies the partner associated with the API key. */
|
|
50
|
+
partner: string;
|
|
42
51
|
}
|
|
43
52
|
/**
|
|
44
53
|
* The result of Sms send request.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smsClient.d.ts","sourceRoot":"","sources":["../../src/smsClient.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAShF;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,mBAAmB;CAAG;AAEhE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,EAAE,EAAE,MAAM,EAAE,CAAC;IACb;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,gBAAgB;IACtD;;;OAGG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CAAC,EACpD,cAAc,CACf,CAAC;YACF,OAAO,QAAQ,CAAC,KAAK,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { InternalPipelineOptions } from \"@azure/core-rest-pipeline\";\nimport { SmsApiClient } from \"./generated/src/smsApiClient.js\";\nimport { extractOperationOptions } from \"./extractOperationOptions.js\";\nimport { generateSendMessageRequest } from \"./utils/smsUtils.js\";\nimport { logger } from \"./logger.js\";\nimport { tracingClient } from \"./generated/src/tracing.js\";\nimport { OptOutsClient as OptOutsClientImpl } from \"./optOutsClient.js\";\n\n/**\n * Client options used to configure SMS Client API requests.\n */\nexport interface SmsClientOptions extends CommonClientOptions {}\n\n/**\n * Values used to configure Sms message\n */\nexport interface SmsSendRequest {\n /**\n * The sender's phone number in E.164 format that is owned by the authenticated account.\n */\n from: string;\n /**\n * The list of recipient's phone number in E.164 format.\n */\n to: string[];\n /**\n * The contents of the message that will be sent to the recipient. The allowable content is\n * defined by RFC 5724.\n */\n message: string;\n}\n\n/**\n * Options to configure Sms requests.\n */\nexport interface SmsSendOptions extends OperationOptions {\n /**\n * Enable this flag to receive a delivery report for this message on the Azure Resource\n * EventGrid. Default value: false.\n */\n enableDeliveryReport?: boolean;\n /**\n * Use this field to provide metadata that will then be sent back in the corresponding Delivery\n * Report.\n */\n tag?: string;\n /** Time to wait for a delivery report. After this time a delivery report with timeout error code is generated. */\n deliveryReportTimeoutInSeconds?: number;\n}\n\n/**\n * The result of Sms send request.\n */\nexport interface SmsSendResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * The identifier of the outgoing Sms message. Only present if message processed.\n */\n messageId?: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Indicates if the message is processed successfully or not.\n */\n successful: boolean;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\nexport interface OptOutsClient {\n /**\n * Adds phone numbers to the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n add(from: string, to: string[], options?: AddOptions): Promise<OptOutAddResult[]>;\n /**\n * Checks if phone numbers are in the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n check(from: string, to: string[], options?: CheckOptions): Promise<OptOutCheckResult[]>;\n /**\n * Removes phone numbers from the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n remove(from: string, to: string[], options?: RemoveOptions): Promise<OptOutRemoveResult[]>;\n}\n\n/**\n * Client options used to configure OptOuts Client API Add requests.\n */\nexport interface AddOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Check requests.\n */\nexport interface CheckOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Remove requests.\n */\nexport interface RemoveOptions extends OperationOptions {}\n\n/**\n * The result of Opt Out Check request.\n */\nexport interface OptOutCheckResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * Indicates if the recipient's phone number in opted out from receiving messages or not.\n */\n isOptedOut: boolean;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Add request.\n */\nexport interface OptOutAddResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Remove request.\n */\nexport interface OptOutRemoveResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * Checks whether the type of a value is SmsClientOptions or not.\n *\n * @param options - The value being checked.\n */\nconst isSmsClientOptions = (options: any): options is SmsClientOptions =>\n !!options && !isTokenCredential(options) && !isKeyCredential(options);\n\n/**\n * A SmsClient represents a Client to the Azure Communication Sms service allowing you\n * to send SMS messages.\n */\nexport class SmsClient {\n private readonly api: SmsApiClient;\n /**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\n public optOuts: OptOutsClient;\n\n /**\n * Initializes a new instance of the SmsClient class.\n * @param connectionString - Connection string to connect to an Azure Communication Service resource.\n * Example: \"endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret\";\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(connectionString: string, options?: SmsClientOptions);\n\n /**\n * Initializes a new instance of the SmsClient class using an Azure KeyCredential.\n * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(endpoint: string, credential: KeyCredential, options?: SmsClientOptions);\n\n /**\n * Initializes a new instance of the SmsClient class using a TokenCredential.\n * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).\n * @param credential - TokenCredential that is used to authenticate requests to the service.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(endpoint: string, credential: TokenCredential, options?: SmsClientOptions);\n\n constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | SmsClientOptions,\n maybeOptions: SmsClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isSmsClientOptions(credentialOrOptions) ? credentialOrOptions : maybeOptions;\n\n const internalPipelineOptions: InternalPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.api = new SmsApiClient(url, internalPipelineOptions);\n this.api.pipeline.addPolicy(authPolicy);\n this.optOuts = new OptOutsClientImpl(this.api);\n }\n\n /**\n * Sends an SMS from a phone number that is acquired by the authenticated account, to another phone number.\n *\n * @param sendRequest - Provides the sender's and recipient's phone numbers, and the contents of the message\n * @param options - Additional request options\n */\n public async send(\n sendRequest: SmsSendRequest,\n options: SmsSendOptions = { enableDeliveryReport: false },\n ): Promise<SmsSendResult[]> {\n const { operationOptions, restOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"SmsClient-Send\", operationOptions, async (updatedOptions) => {\n const response = await this.api.sms.send(\n generateSendMessageRequest(sendRequest, restOptions),\n updatedOptions,\n );\n return response.value;\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"smsClient.js","sourceRoot":"","sources":["../../src/smsClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAClC,4CAA4C;AAE5C,OAAO,EACL,6BAA6B,EAC7B,eAAe,EACf,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,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F,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CACtC,0BAA0B,CAAC,WAAW,EAAE,WAAW,CAAC,EACpD,cAAc,CACf,CAAC;YACF,OAAO,QAAQ,CAAC,KAAK,CAAC;QACxB,CAAC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n/// <reference lib=\"esnext.asynciterable\" />\n\nimport {\n createCommunicationAuthPolicy,\n isKeyCredential,\n parseClientArguments,\n} from \"@azure/communication-common\";\nimport type { KeyCredential, TokenCredential } from \"@azure/core-auth\";\nimport { isTokenCredential } from \"@azure/core-auth\";\nimport type { CommonClientOptions, OperationOptions } from \"@azure/core-client\";\nimport type { InternalPipelineOptions } from \"@azure/core-rest-pipeline\";\nimport { SmsApiClient } from \"./generated/src/smsApiClient.js\";\nimport { extractOperationOptions } from \"./extractOperationOptions.js\";\nimport { generateSendMessageRequest } from \"./utils/smsUtils.js\";\nimport { logger } from \"./logger.js\";\nimport { tracingClient } from \"./generated/src/tracing.js\";\nimport { OptOutsClient as OptOutsClientImpl } from \"./optOutsClient.js\";\n\n/**\n * Client options used to configure SMS Client API requests.\n */\nexport interface SmsClientOptions extends CommonClientOptions {}\n\n/**\n * Values used to configure Sms message\n */\nexport interface SmsSendRequest {\n /**\n * The sender's phone number in E.164 format that is owned by the authenticated account.\n */\n from: string;\n /**\n * The list of recipient's phone number in E.164 format.\n */\n to: string[];\n /**\n * The contents of the message that will be sent to the recipient. The allowable content is\n * defined by RFC 5724.\n */\n message: string;\n}\n\n/**\n * Options to configure Sms requests.\n */\nexport interface SmsSendOptions extends OperationOptions {\n /**\n * Enable this flag to receive a delivery report for this message on the Azure Resource\n * EventGrid. Default value: false.\n */\n enableDeliveryReport?: boolean;\n /**\n * Use this field to provide metadata that will then be sent back in the corresponding Delivery\n * Report.\n */\n tag?: string;\n /** Time to wait for a delivery report. After this time a delivery report with timeout error code is generated. */\n deliveryReportTimeoutInSeconds?: number;\n\n /** Defines optional parameters for connecting with the Messaging Connect Partner to deliver SMS. */\n messagingConnect?: MessagingConnectOptions;\n}\n\n/** Defines optional parameters for connecting with the Messaging Connect Partner to deliver SMS. */\nexport interface MessagingConnectOptions {\n /** Represents the API key associated with the customer's account in the Messaging Connect Partner portal. */\n apiKey: string;\n /** Specifies the partner associated with the API key. */\n partner: string;\n}\n\n/**\n * The result of Sms send request.\n */\nexport interface SmsSendResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * The identifier of the outgoing Sms message. Only present if message processed.\n */\n messageId?: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Indicates if the message is processed successfully or not.\n */\n successful: boolean;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\nexport interface OptOutsClient {\n /**\n * Adds phone numbers to the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n add(from: string, to: string[], options?: AddOptions): Promise<OptOutAddResult[]>;\n /**\n * Checks if phone numbers are in the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n check(from: string, to: string[], options?: CheckOptions): Promise<OptOutCheckResult[]>;\n /**\n * Removes phone numbers from the optouts list.\n *\n * @param from - The sender's phone number\n * @param to - The recipient's phone numbers\n * @param options - Additional request options\n */\n remove(from: string, to: string[], options?: RemoveOptions): Promise<OptOutRemoveResult[]>;\n}\n\n/**\n * Client options used to configure OptOuts Client API Add requests.\n */\nexport interface AddOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Check requests.\n */\nexport interface CheckOptions extends OperationOptions {}\n\n/**\n * Client options used to configure OptOuts Client API Remove requests.\n */\nexport interface RemoveOptions extends OperationOptions {}\n\n/**\n * The result of Opt Out Check request.\n */\nexport interface OptOutCheckResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * Indicates if the recipient's phone number in opted out from receiving messages or not.\n */\n isOptedOut: boolean;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Add request.\n */\nexport interface OptOutAddResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * The result of Opt Out Remove request.\n */\nexport interface OptOutRemoveResult {\n /**\n * The recipient's phone number in E.164 format.\n */\n to: string;\n /**\n * HTTP Status code.\n */\n httpStatusCode: number;\n /**\n * Optional error message in case of 4xx/5xx/repeatable errors.\n */\n errorMessage?: string;\n}\n\n/**\n * Checks whether the type of a value is SmsClientOptions or not.\n *\n * @param options - The value being checked.\n */\nconst isSmsClientOptions = (options: any): options is SmsClientOptions =>\n !!options && !isTokenCredential(options) && !isKeyCredential(options);\n\n/**\n * A SmsClient represents a Client to the Azure Communication Sms service allowing you\n * to send SMS messages.\n */\nexport class SmsClient {\n private readonly api: SmsApiClient;\n /**\n * A OptOutsClient represents a Client to the Azure Communication Sms service allowing you\n * to call Opt Out Management Api methods.\n */\n public optOuts: OptOutsClient;\n\n /**\n * Initializes a new instance of the SmsClient class.\n * @param connectionString - Connection string to connect to an Azure Communication Service resource.\n * Example: \"endpoint=https://contoso.eastus.communications.azure.net/;accesskey=secret\";\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(connectionString: string, options?: SmsClientOptions);\n\n /**\n * Initializes a new instance of the SmsClient class using an Azure KeyCredential.\n * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).\n * @param credential - An object that is used to authenticate requests to the service. Use the Azure KeyCredential or `@azure/identity` to create a credential.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(endpoint: string, credential: KeyCredential, options?: SmsClientOptions);\n\n /**\n * Initializes a new instance of the SmsClient class using a TokenCredential.\n * @param endpoint - The endpoint of the service (ex: https://contoso.eastus.communications.azure.net).\n * @param credential - TokenCredential that is used to authenticate requests to the service.\n * @param options - Optional. Options to configure the HTTP pipeline.\n */\n constructor(endpoint: string, credential: TokenCredential, options?: SmsClientOptions);\n\n constructor(\n connectionStringOrUrl: string,\n credentialOrOptions?: KeyCredential | TokenCredential | SmsClientOptions,\n maybeOptions: SmsClientOptions = {},\n ) {\n const { url, credential } = parseClientArguments(connectionStringOrUrl, credentialOrOptions);\n const options = isSmsClientOptions(credentialOrOptions) ? credentialOrOptions : maybeOptions;\n\n const internalPipelineOptions: InternalPipelineOptions = {\n ...options,\n ...{\n loggingOptions: {\n logger: logger.info,\n },\n },\n };\n\n const authPolicy = createCommunicationAuthPolicy(credential);\n this.api = new SmsApiClient(url, internalPipelineOptions);\n this.api.pipeline.addPolicy(authPolicy);\n this.optOuts = new OptOutsClientImpl(this.api);\n }\n\n /**\n * Sends an SMS from a phone number that is acquired by the authenticated account, to another phone number.\n *\n * @param sendRequest - Provides the sender's and recipient's phone numbers, and the contents of the message\n * @param options - Additional request options\n */\n public async send(\n sendRequest: SmsSendRequest,\n options: SmsSendOptions = { enableDeliveryReport: false },\n ): Promise<SmsSendResult[]> {\n const { operationOptions, restOptions } = extractOperationOptions(options);\n return tracingClient.withSpan(\"SmsClient-Send\", operationOptions, async (updatedOptions) => {\n const response = await this.api.sms.send(\n generateSendMessageRequest(sendRequest, restOptions),\n updatedOptions,\n );\n return response.value;\n });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smsUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/smsUtils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAItE,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,cAAc,EAC1B,OAAO,GAAE,cAAmB,GAC3B,kBAAkB,
|
|
1
|
+
{"version":3,"file":"smsUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/smsUtils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AAC1F,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAItE,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,cAAc,EAC1B,OAAO,GAAE,cAAmB,GAC3B,kBAAkB,CAwBpB;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,aAAa,CAS/E"}
|
|
@@ -19,7 +19,7 @@ export function generateSendMessageRequest(smsRequest, options = {}) {
|
|
|
19
19
|
};
|
|
20
20
|
}),
|
|
21
21
|
message: smsRequest.message,
|
|
22
|
-
smsSendOptions: Object.assign({ enableDeliveryReport: (_b = options.enableDeliveryReport) !== null && _b !== void 0 ? _b : false }, (options.tag && { tag: options.tag })),
|
|
22
|
+
smsSendOptions: Object.assign(Object.assign({ enableDeliveryReport: (_b = options.enableDeliveryReport) !== null && _b !== void 0 ? _b : false }, (options.tag && { tag: options.tag })), (options.messagingConnect && { messagingConnect: options.messagingConnect })),
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
export function generateOptOutRequest(from, to) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smsUtils.js","sourceRoot":"","sources":["../../../src/utils/smsUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAIlC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,MAAM,UAAU,0BAA0B,CACxC,UAA0B,EAC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IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,WAAW,EAAE;gBAC1D,sBAAsB,EAAE,IAAI,CAAC,YAAY,EAAE;aAC5C,CAAC;QACJ,CAAC,CAAC;QACF,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,cAAc,gCACZ,oBAAoB,EAAE,MAAA,OAAO,CAAC,oBAAoB,mCAAI,KAAK,IACxD,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,CAAC,GACrC,CAAC,OAAO,CAAC,gBAAgB,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAChF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,IAAY,EAAE,EAAY;IAC9D,OAAO;QACL,IAAI,EAAE,IAAI;QACV,UAAU,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,cAAc,EAAE,EAAE;YACpC,OAAO;gBACL,EAAE,EAAE,cAAc;aACnB,CAAC;QACJ,CAAC,CAAC;KACH,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { SendMessageRequest, OptOutRequest } from \"../generated/src/models/index.js\";\nimport type { SmsSendOptions, SmsSendRequest } from \"../smsClient.js\";\nimport { Uuid } from \"./uuid.js\";\nimport type { SmsSendOptions as InternalOptions } from \"../generated/src/models/index.js\";\n\nexport function generateSendMessageRequest(\n smsRequest: SmsSendRequest,\n options: SmsSendOptions = {},\n): SendMessageRequest {\n const _smsSendOptions: InternalOptions = {\n enableDeliveryReport: options.enableDeliveryReport ?? false,\n };\n if (options.tag) {\n _smsSendOptions[\"tag\"] = options.tag;\n }\n\n return {\n from: smsRequest.from,\n smsRecipients: smsRequest.to.map((phoneNumberStr) => {\n return {\n to: phoneNumberStr,\n repeatabilityFirstSent: new Date(Date.now()).toUTCString(),\n repeatabilityRequestId: Uuid.generateUuid(),\n };\n }),\n message: smsRequest.message,\n smsSendOptions: {\n enableDeliveryReport: options.enableDeliveryReport ?? false,\n ...(options.tag && { tag: options.tag }),\n ...(options.messagingConnect && { messagingConnect: options.messagingConnect }),\n },\n };\n}\n\nexport function generateOptOutRequest(from: string, to: string[]): OptOutRequest {\n return {\n from: from,\n recipients: to.map((phoneNumberStr) => {\n return {\n to: phoneNumberStr,\n };\n }),\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure/communication-sms",
|
|
3
|
-
"version": "1.2.0-beta.
|
|
3
|
+
"version": "1.2.0-beta.4",
|
|
4
4
|
"description": "SDK for Azure Communication SMS service which facilitates the sending of SMS messages.",
|
|
5
5
|
"sdk-type": "client",
|
|
6
6
|
"main": "./dist/commonjs/index.js",
|
|
@@ -9,29 +9,21 @@
|
|
|
9
9
|
"types": "./dist/commonjs/index.d.ts",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
|
|
12
|
-
"build:browser": "dev-tool run build-package && dev-tool run bundle",
|
|
13
|
-
"build:node": "dev-tool run build-package && dev-tool run bundle",
|
|
14
12
|
"build:samples": "dev-tool samples publish --force",
|
|
15
|
-
"build:test": "dev-tool run build-package && dev-tool run bundle",
|
|
16
13
|
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
17
14
|
"clean": "dev-tool run vendored rimraf --glob dist dist-* temp types *.tgz *.log",
|
|
18
15
|
"execute:samples": "dev-tool samples run samples-dev",
|
|
19
16
|
"extract-api": "dev-tool run build-package && dev-tool run extract-api",
|
|
20
17
|
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
|
|
21
|
-
"generate:client": "autorest --typescript ./swagger/README.md
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"integration-test:node": "dev-tool run test:vitest --esm",
|
|
25
|
-
"lint": "eslint package.json api-extractor.json README.md src test",
|
|
26
|
-
"lint:fix": "eslint package.json api-extractor.json README.md src test --fix --fix-type [problem,suggestion]",
|
|
18
|
+
"generate:client": "autorest --typescript ./swagger/README.md",
|
|
19
|
+
"lint": "eslint package.json api-extractor.json src test",
|
|
20
|
+
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
|
|
27
21
|
"pack": "npm pack 2>&1",
|
|
28
|
-
"test": "npm run
|
|
29
|
-
"test:browser": "npm run build
|
|
30
|
-
"test:node": "
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"unit-test:node": "dev-tool run test:vitest",
|
|
34
|
-
"update-snippets": "echo skipped"
|
|
22
|
+
"test": "npm run test:node && npm run test:browser",
|
|
23
|
+
"test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
|
|
24
|
+
"test:node": "dev-tool run test:vitest",
|
|
25
|
+
"test:node:esm": "dev-tool run test:vitest --esm",
|
|
26
|
+
"update-snippets": "dev-tool run update-snippets"
|
|
35
27
|
},
|
|
36
28
|
"files": [
|
|
37
29
|
"dist/",
|
|
@@ -58,16 +50,16 @@
|
|
|
58
50
|
"sideEffects": false,
|
|
59
51
|
"prettier": "@azure/eslint-plugin-azure-sdk/prettier.json",
|
|
60
52
|
"dependencies": {
|
|
61
|
-
"@azure/abort-controller": "^2.
|
|
62
|
-
"@azure/communication-common": "^2.
|
|
63
|
-
"@azure/core-auth": "^1.
|
|
64
|
-
"@azure/core-client": "^1.
|
|
65
|
-
"@azure/core-rest-pipeline": "^1.
|
|
66
|
-
"@azure/core-tracing": "^1.
|
|
67
|
-
"@azure/core-util": "^1.
|
|
68
|
-
"@azure/logger": "^1.
|
|
69
|
-
"events": "^3.
|
|
70
|
-
"tslib": "^2.
|
|
53
|
+
"@azure/abort-controller": "^2.1.2",
|
|
54
|
+
"@azure/communication-common": "^2.3.1",
|
|
55
|
+
"@azure/core-auth": "^1.9.0",
|
|
56
|
+
"@azure/core-client": "^1.9.2",
|
|
57
|
+
"@azure/core-rest-pipeline": "^1.18.2",
|
|
58
|
+
"@azure/core-tracing": "^1.2.0",
|
|
59
|
+
"@azure/core-util": "^1.11.0",
|
|
60
|
+
"@azure/logger": "^1.1.4",
|
|
61
|
+
"events": "^3.3.0",
|
|
62
|
+
"tslib": "^2.8.1"
|
|
71
63
|
},
|
|
72
64
|
"devDependencies": {
|
|
73
65
|
"@azure-tools/test-credential": "^2.0.0",
|
|
@@ -75,15 +67,15 @@
|
|
|
75
67
|
"@azure-tools/test-utils-vitest": "^1.0.0",
|
|
76
68
|
"@azure/dev-tool": "^1.0.0",
|
|
77
69
|
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
|
|
78
|
-
"@azure/identity": "^4.0
|
|
70
|
+
"@azure/identity": "^4.5.0",
|
|
79
71
|
"@types/node": "^18.0.0",
|
|
80
|
-
"@vitest/browser": "^
|
|
81
|
-
"@vitest/coverage-istanbul": "^
|
|
72
|
+
"@vitest/browser": "^3.0.9",
|
|
73
|
+
"@vitest/coverage-istanbul": "^3.0.9",
|
|
82
74
|
"dotenv": "^16.0.0",
|
|
83
75
|
"eslint": "^9.9.0",
|
|
84
|
-
"playwright": "^1.
|
|
85
|
-
"typescript": "~5.
|
|
86
|
-
"vitest": "^
|
|
76
|
+
"playwright": "^1.49.1",
|
|
77
|
+
"typescript": "~5.8.2",
|
|
78
|
+
"vitest": "^3.0.9"
|
|
87
79
|
},
|
|
88
80
|
"//metadata": {
|
|
89
81
|
"constantPaths": [
|
|
@@ -112,7 +104,7 @@
|
|
|
112
104
|
"azure-communication-services"
|
|
113
105
|
],
|
|
114
106
|
"requiredResources": {
|
|
115
|
-
"Azure Communication Services account": "https://
|
|
107
|
+
"Azure Communication Services account": "https://learn.microsoft.com/azure/communication-services/quickstarts/create-communication-resource"
|
|
116
108
|
}
|
|
117
109
|
},
|
|
118
110
|
"type": "module",
|