@azure-rest/communication-messages 2.0.1-alpha.20250211.1 → 2.1.0-alpha.20250212.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +163 -0
- package/dist/browser/generated/src/clientDefinitions.d.ts +3 -3
- package/dist/browser/generated/src/clientDefinitions.d.ts.map +1 -1
- package/dist/browser/generated/src/clientDefinitions.js.map +1 -1
- package/dist/browser/generated/src/isUnexpected.d.ts +1 -1
- package/dist/browser/generated/src/isUnexpected.d.ts.map +1 -1
- package/dist/browser/generated/src/isUnexpected.js.map +1 -1
- package/dist/browser/generated/src/messagesServiceClient.d.ts +3 -3
- package/dist/browser/generated/src/messagesServiceClient.d.ts.map +1 -1
- package/dist/browser/generated/src/messagesServiceClient.js +2 -2
- package/dist/browser/generated/src/messagesServiceClient.js.map +1 -1
- package/dist/browser/generated/src/models.d.ts +148 -1
- package/dist/browser/generated/src/models.d.ts.map +1 -1
- package/dist/browser/generated/src/models.js.map +1 -1
- package/dist/browser/generated/src/outputModels.d.ts +7 -3
- package/dist/browser/generated/src/outputModels.d.ts.map +1 -1
- package/dist/browser/generated/src/outputModels.js.map +1 -1
- package/dist/browser/generated/src/paginateHelper.d.ts +28 -3
- package/dist/browser/generated/src/paginateHelper.d.ts.map +1 -1
- package/dist/browser/generated/src/paginateHelper.js +99 -2
- package/dist/browser/generated/src/paginateHelper.js.map +1 -1
- package/dist/browser/generated/src/parameters.d.ts +3 -3
- package/dist/browser/generated/src/parameters.d.ts.map +1 -1
- package/dist/browser/generated/src/parameters.js.map +1 -1
- package/dist/browser/generated/src/responses.d.ts +3 -3
- package/dist/browser/generated/src/responses.d.ts.map +1 -1
- package/dist/browser/generated/src/responses.js.map +1 -1
- package/dist/commonjs/generated/src/clientDefinitions.d.ts +3 -3
- package/dist/commonjs/generated/src/clientDefinitions.d.ts.map +1 -1
- package/dist/commonjs/generated/src/clientDefinitions.js.map +1 -1
- package/dist/commonjs/generated/src/isUnexpected.d.ts +1 -1
- package/dist/commonjs/generated/src/isUnexpected.d.ts.map +1 -1
- package/dist/commonjs/generated/src/isUnexpected.js.map +1 -1
- package/dist/commonjs/generated/src/messagesServiceClient.d.ts +3 -3
- package/dist/commonjs/generated/src/messagesServiceClient.d.ts.map +1 -1
- package/dist/commonjs/generated/src/messagesServiceClient.js +2 -2
- package/dist/commonjs/generated/src/messagesServiceClient.js.map +1 -1
- package/dist/commonjs/generated/src/models.d.ts +148 -1
- package/dist/commonjs/generated/src/models.d.ts.map +1 -1
- package/dist/commonjs/generated/src/models.js.map +1 -1
- package/dist/commonjs/generated/src/outputModels.d.ts +7 -3
- package/dist/commonjs/generated/src/outputModels.d.ts.map +1 -1
- package/dist/commonjs/generated/src/outputModels.js.map +1 -1
- package/dist/commonjs/generated/src/paginateHelper.d.ts +28 -3
- package/dist/commonjs/generated/src/paginateHelper.d.ts.map +1 -1
- package/dist/commonjs/generated/src/paginateHelper.js +99 -2
- package/dist/commonjs/generated/src/paginateHelper.js.map +1 -1
- package/dist/commonjs/generated/src/parameters.d.ts +3 -3
- package/dist/commonjs/generated/src/parameters.d.ts.map +1 -1
- package/dist/commonjs/generated/src/parameters.js.map +1 -1
- package/dist/commonjs/generated/src/responses.d.ts +3 -3
- package/dist/commonjs/generated/src/responses.d.ts.map +1 -1
- package/dist/commonjs/generated/src/responses.js.map +1 -1
- package/dist/esm/generated/src/clientDefinitions.d.ts +3 -3
- package/dist/esm/generated/src/clientDefinitions.d.ts.map +1 -1
- package/dist/esm/generated/src/clientDefinitions.js.map +1 -1
- package/dist/esm/generated/src/isUnexpected.d.ts +1 -1
- package/dist/esm/generated/src/isUnexpected.d.ts.map +1 -1
- package/dist/esm/generated/src/isUnexpected.js.map +1 -1
- package/dist/esm/generated/src/messagesServiceClient.d.ts +3 -3
- package/dist/esm/generated/src/messagesServiceClient.d.ts.map +1 -1
- package/dist/esm/generated/src/messagesServiceClient.js +2 -2
- package/dist/esm/generated/src/messagesServiceClient.js.map +1 -1
- package/dist/esm/generated/src/models.d.ts +148 -1
- package/dist/esm/generated/src/models.d.ts.map +1 -1
- package/dist/esm/generated/src/models.js.map +1 -1
- package/dist/esm/generated/src/outputModels.d.ts +7 -3
- package/dist/esm/generated/src/outputModels.d.ts.map +1 -1
- package/dist/esm/generated/src/outputModels.js.map +1 -1
- package/dist/esm/generated/src/paginateHelper.d.ts +28 -3
- package/dist/esm/generated/src/paginateHelper.d.ts.map +1 -1
- package/dist/esm/generated/src/paginateHelper.js +99 -2
- package/dist/esm/generated/src/paginateHelper.js.map +1 -1
- package/dist/esm/generated/src/parameters.d.ts +3 -3
- package/dist/esm/generated/src/parameters.d.ts.map +1 -1
- package/dist/esm/generated/src/parameters.js.map +1 -1
- package/dist/esm/generated/src/responses.d.ts +3 -3
- package/dist/esm/generated/src/responses.d.ts.map +1 -1
- package/dist/esm/generated/src/responses.js.map +1 -1
- package/dist/react-native/generated/src/clientDefinitions.d.ts +3 -3
- package/dist/react-native/generated/src/clientDefinitions.d.ts.map +1 -1
- package/dist/react-native/generated/src/clientDefinitions.js.map +1 -1
- package/dist/react-native/generated/src/isUnexpected.d.ts +1 -1
- package/dist/react-native/generated/src/isUnexpected.d.ts.map +1 -1
- package/dist/react-native/generated/src/isUnexpected.js.map +1 -1
- package/dist/react-native/generated/src/messagesServiceClient.d.ts +3 -3
- package/dist/react-native/generated/src/messagesServiceClient.d.ts.map +1 -1
- package/dist/react-native/generated/src/messagesServiceClient.js +2 -2
- package/dist/react-native/generated/src/messagesServiceClient.js.map +1 -1
- package/dist/react-native/generated/src/models.d.ts +148 -1
- package/dist/react-native/generated/src/models.d.ts.map +1 -1
- package/dist/react-native/generated/src/models.js.map +1 -1
- package/dist/react-native/generated/src/outputModels.d.ts +7 -3
- package/dist/react-native/generated/src/outputModels.d.ts.map +1 -1
- package/dist/react-native/generated/src/outputModels.js.map +1 -1
- package/dist/react-native/generated/src/paginateHelper.d.ts +28 -3
- package/dist/react-native/generated/src/paginateHelper.d.ts.map +1 -1
- package/dist/react-native/generated/src/paginateHelper.js +99 -2
- package/dist/react-native/generated/src/paginateHelper.js.map +1 -1
- package/dist/react-native/generated/src/parameters.d.ts +3 -3
- package/dist/react-native/generated/src/parameters.d.ts.map +1 -1
- package/dist/react-native/generated/src/parameters.js.map +1 -1
- package/dist/react-native/generated/src/responses.d.ts +3 -3
- package/dist/react-native/generated/src/responses.d.ts.map +1 -1
- package/dist/react-native/generated/src/responses.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -213,6 +213,169 @@ if (!isUnexpected(result)) {
|
|
|
213
213
|
}
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
+
## Send a Button Action Interactive Message with WhatsApp Channel
|
|
217
|
+
|
|
218
|
+
`Note: Business can't start a conversation with a media message. It needs to be user initiated.`
|
|
219
|
+
|
|
220
|
+
```typescript
|
|
221
|
+
const interactiveMessage: InteractiveMessage = {
|
|
222
|
+
body: {
|
|
223
|
+
kind: "text",
|
|
224
|
+
text: "Do you want to proceed?",
|
|
225
|
+
},
|
|
226
|
+
action: {
|
|
227
|
+
kind: "whatsAppButtonAction",
|
|
228
|
+
content: {
|
|
229
|
+
kind: "buttonSet",
|
|
230
|
+
buttons: [
|
|
231
|
+
{
|
|
232
|
+
id: "yes",
|
|
233
|
+
title: "Yes",
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
id: "no",
|
|
237
|
+
title: "No",
|
|
238
|
+
},
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
const result = await client.path("/messages/notifications:send").post({
|
|
245
|
+
contentType: "application/json",
|
|
246
|
+
body: {
|
|
247
|
+
channelRegistrationId: "<Channel_Registration_Id>",
|
|
248
|
+
to: ["<to-phone-number-1>"],
|
|
249
|
+
kind: "interactive",
|
|
250
|
+
interactiveMessage: interactiveMessage,
|
|
251
|
+
},
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
if (result.status === "202") {
|
|
255
|
+
const response: Send202Response = result as Send202Response;
|
|
256
|
+
response.body.receipts.forEach((receipt) => {
|
|
257
|
+
console.log("Message sent to:" + receipt.to + " with message id:" + receipt.messageId);
|
|
258
|
+
});
|
|
259
|
+
} else {
|
|
260
|
+
throw new Error("Failed to send message");
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
## Send a List Action Interactive Message with WhatsApp Channel
|
|
265
|
+
|
|
266
|
+
`Note: Business can't start a conversation with a media message. It needs to be user initiated.`
|
|
267
|
+
|
|
268
|
+
```typescript
|
|
269
|
+
const interactiveMessage: InteractiveMessage = {
|
|
270
|
+
body: {
|
|
271
|
+
kind: "text",
|
|
272
|
+
text: "Which shipping option do you want?",
|
|
273
|
+
},
|
|
274
|
+
action: {
|
|
275
|
+
kind: "whatsAppListAction",
|
|
276
|
+
content: {
|
|
277
|
+
kind: "group",
|
|
278
|
+
title: "Shipping Options",
|
|
279
|
+
groups:[
|
|
280
|
+
{
|
|
281
|
+
title: "Express Delivery",
|
|
282
|
+
items: [
|
|
283
|
+
{
|
|
284
|
+
id: "priority_mail_express",
|
|
285
|
+
title: "Priority Mail Express",
|
|
286
|
+
description: "Delivered on same day!",
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
id: "priority_mail",
|
|
290
|
+
title: "Priority Mail",
|
|
291
|
+
description: "Delivered in 1-2 days",
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
title: "Normal Delivery",
|
|
297
|
+
items: [
|
|
298
|
+
{
|
|
299
|
+
id: "usps_ground_advantage",
|
|
300
|
+
title: "USPS Ground Advantage",
|
|
301
|
+
description: "Delivered in 2-5 days",
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
id: "usps_mail",
|
|
305
|
+
title: "Normal Mail",
|
|
306
|
+
description: "Delivered in 5-8 days",
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
const result = await client.path("/messages/notifications:send").post({
|
|
316
|
+
contentType: "application/json",
|
|
317
|
+
body: {
|
|
318
|
+
channelRegistrationId: "<Channel_Registration_Id>",
|
|
319
|
+
to: ["<to-phone-number-1>"],
|
|
320
|
+
kind: "interactive",
|
|
321
|
+
interactiveMessage: interactiveMessage,
|
|
322
|
+
},
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
if (result.status === "202") {
|
|
326
|
+
const response: Send202Response = result as Send202Response;
|
|
327
|
+
response.body.receipts.forEach((receipt) => {
|
|
328
|
+
console.log("Message sent to:" + receipt.to + " with message id:" + receipt.messageId);
|
|
329
|
+
});
|
|
330
|
+
} else {
|
|
331
|
+
throw new Error("Failed to send message");
|
|
332
|
+
}
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
## Send a Url Action Interactive Message with WhatsApp Channel
|
|
336
|
+
|
|
337
|
+
`Note: Business can't start a conversation with a media message. It needs to be user initiated.`
|
|
338
|
+
|
|
339
|
+
```typescript
|
|
340
|
+
const interactiveMessage: InteractiveMessage = {
|
|
341
|
+
body: {
|
|
342
|
+
kind: "text",
|
|
343
|
+
text: "Find more detail in the link.",
|
|
344
|
+
},
|
|
345
|
+
action: {
|
|
346
|
+
kind: "whatsAppUrlAction",
|
|
347
|
+
content: {
|
|
348
|
+
kind: "url",
|
|
349
|
+
title: "link",
|
|
350
|
+
url: "https://<your-url-link>",
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
footer: {
|
|
354
|
+
kind: "text",
|
|
355
|
+
text: "This is a footer message",
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
const result = await client.path("/messages/notifications:send").post({
|
|
360
|
+
contentType: "application/json",
|
|
361
|
+
body: {
|
|
362
|
+
channelRegistrationId: "<Channel_Registration_Id>",
|
|
363
|
+
to: ["<to-phone-number-1>"],
|
|
364
|
+
kind: "interactive",
|
|
365
|
+
interactiveMessage: interactiveMessage,
|
|
366
|
+
},
|
|
367
|
+
});
|
|
368
|
+
|
|
369
|
+
if (result.status === "202") {
|
|
370
|
+
const response: Send202Response = result as Send202Response;
|
|
371
|
+
response.body.receipts.forEach((receipt) => {
|
|
372
|
+
console.log("Message sent to:" + receipt.to + " with message id:" + receipt.messageId);
|
|
373
|
+
});
|
|
374
|
+
} else {
|
|
375
|
+
throw new Error("Failed to send message");
|
|
376
|
+
}
|
|
377
|
+
```
|
|
378
|
+
|
|
216
379
|
## Troubleshooting
|
|
217
380
|
|
|
218
381
|
### Logging
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { GetMediaParameters, SendParameters, ListTemplatesParameters } from "./parameters.js";
|
|
2
|
-
import { GetMedia200Response, GetMediaDefaultResponse, Send202Response, SendDefaultResponse, ListTemplates200Response, ListTemplatesDefaultResponse } from "./responses.js";
|
|
3
|
-
import { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
1
|
+
import type { GetMediaParameters, SendParameters, ListTemplatesParameters } from "./parameters.js";
|
|
2
|
+
import type { GetMedia200Response, GetMediaDefaultResponse, Send202Response, SendDefaultResponse, ListTemplates200Response, ListTemplatesDefaultResponse } from "./responses.js";
|
|
3
|
+
import type { Client, StreamableMethod } from "@azure-rest/core-client";
|
|
4
4
|
export interface GetMedia {
|
|
5
5
|
/** Download the Media payload from a User to Business message. */
|
|
6
6
|
get(options?: GetMediaParameters): StreamableMethod<GetMedia200Response | GetMediaDefaultResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"clientDefinitions.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/clientDefinitions.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACd,uBAAuB,EACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAExE,MAAM,WAAW,QAAQ;IACvB,kEAAkE;IAClE,GAAG,CACD,OAAO,CAAC,EAAE,kBAAkB,GAC3B,gBAAgB,CAAC,mBAAmB,GAAG,uBAAuB,CAAC,CAAC;CACpE;AAED,MAAM,WAAW,IAAI;IACnB,0DAA0D;IAC1D,IAAI,CACF,OAAO,EAAE,cAAc,GACtB,gBAAgB,CAAC,eAAe,GAAG,mBAAmB,CAAC,CAAC;CAC5D;AAED,MAAM,WAAW,aAAa;IAC5B,wEAAwE;IACxE,GAAG,CACD,OAAO,CAAC,EAAE,uBAAuB,GAChC,gBAAgB,CAAC,wBAAwB,GAAG,4BAA4B,CAAC,CAAC;CAC9E;AAED,MAAM,WAAW,MAAM;IACrB,uFAAuF;IACvF,CAAC,IAAI,EAAE,wBAAwB,EAAE,EAAE,EAAE,MAAM,GAAG,QAAQ,CAAC;IACvD,4FAA4F;IAC5F,CAAC,IAAI,EAAE,8BAA8B,GAAG,IAAI,CAAC;IAC7C,yGAAyG;IACzG,CACE,IAAI,EAAE,0CAA0C,EAChD,SAAS,EAAE,MAAM,GAChB,aAAa,CAAC;CAClB;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,GAAG;IAC3C,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../../../src/generated/src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GetMediaParameters,\n SendParameters,\n ListTemplatesParameters,\n} from \"./parameters.js\";\nimport {\n GetMedia200Response,\n GetMediaDefaultResponse,\n Send202Response,\n SendDefaultResponse,\n ListTemplates200Response,\n ListTemplatesDefaultResponse,\n} from \"./responses.js\";\nimport { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetMedia {\n /** Download the Media payload from a User to Business message. */\n get(\n options?: GetMediaParameters,\n ): StreamableMethod<GetMedia200Response | GetMediaDefaultResponse>;\n}\n\nexport interface Send {\n /** Sends a notification message from Business to User. */\n post(\n options: SendParameters,\n ): StreamableMethod<Send202Response | SendDefaultResponse>;\n}\n\nexport interface ListTemplates {\n /** List all templates for given Azure Communication Services channel */\n get(\n options?: ListTemplatesParameters,\n ): StreamableMethod<ListTemplates200Response | ListTemplatesDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/messages/streams/\\{id\\}' has methods for the following verbs: get */\n (path: \"/messages/streams/{id}\", id: string): GetMedia;\n /** Resource for '/messages/notifications:send' has methods for the following verbs: post */\n (path: \"/messages/notifications:send\"): Send;\n /** Resource for '/messages/channels/\\{channelId\\}/templates' has methods for the following verbs: get */\n (\n path: \"/messages/channels/{channelId}/templates\",\n channelId: string,\n ): ListTemplates;\n}\n\nexport type MessagesServiceClient = Client & {\n path: Routes;\n};\n"]}
|
|
1
|
+
{"version":3,"file":"clientDefinitions.js","sourceRoot":"","sources":["../../../../src/generated/src/clientDefinitions.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n GetMediaParameters,\n SendParameters,\n ListTemplatesParameters,\n} from \"./parameters.js\";\nimport type {\n GetMedia200Response,\n GetMediaDefaultResponse,\n Send202Response,\n SendDefaultResponse,\n ListTemplates200Response,\n ListTemplatesDefaultResponse,\n} from \"./responses.js\";\nimport type { Client, StreamableMethod } from \"@azure-rest/core-client\";\n\nexport interface GetMedia {\n /** Download the Media payload from a User to Business message. */\n get(\n options?: GetMediaParameters,\n ): StreamableMethod<GetMedia200Response | GetMediaDefaultResponse>;\n}\n\nexport interface Send {\n /** Sends a notification message from Business to User. */\n post(\n options: SendParameters,\n ): StreamableMethod<Send202Response | SendDefaultResponse>;\n}\n\nexport interface ListTemplates {\n /** List all templates for given Azure Communication Services channel */\n get(\n options?: ListTemplatesParameters,\n ): StreamableMethod<ListTemplates200Response | ListTemplatesDefaultResponse>;\n}\n\nexport interface Routes {\n /** Resource for '/messages/streams/\\{id\\}' has methods for the following verbs: get */\n (path: \"/messages/streams/{id}\", id: string): GetMedia;\n /** Resource for '/messages/notifications:send' has methods for the following verbs: post */\n (path: \"/messages/notifications:send\"): Send;\n /** Resource for '/messages/channels/\\{channelId\\}/templates' has methods for the following verbs: get */\n (\n path: \"/messages/channels/{channelId}/templates\",\n channelId: string,\n ): ListTemplates;\n}\n\nexport type MessagesServiceClient = Client & {\n path: Routes;\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GetMedia200Response, GetMediaDefaultResponse, Send202Response, SendDefaultResponse, ListTemplates200Response, ListTemplatesDefaultResponse } from "./responses.js";
|
|
1
|
+
import type { GetMedia200Response, GetMediaDefaultResponse, Send202Response, SendDefaultResponse, ListTemplates200Response, ListTemplatesDefaultResponse } from "./responses.js";
|
|
2
2
|
export declare function isUnexpected(response: GetMedia200Response | GetMediaDefaultResponse): response is GetMediaDefaultResponse;
|
|
3
3
|
export declare function isUnexpected(response: Send202Response | SendDefaultResponse): response is SendDefaultResponse;
|
|
4
4
|
export declare function isUnexpected(response: ListTemplates200Response | ListTemplatesDefaultResponse): response is ListTemplatesDefaultResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"isUnexpected.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/isUnexpected.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AAQxB,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,mBAAmB,GAAG,uBAAuB,GACtD,QAAQ,IAAI,uBAAuB,CAAC;AACvC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,eAAe,GAAG,mBAAmB,GAC9C,QAAQ,IAAI,mBAAmB,CAAC;AACnC,wBAAgB,YAAY,CAC1B,QAAQ,EAAE,wBAAwB,GAAG,4BAA4B,GAChE,QAAQ,IAAI,4BAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../../../src/generated/src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC,MAAM,WAAW,GAA6B;IAC5C,4BAA4B,EAAE,CAAC,KAAK,CAAC;IACrC,mCAAmC,EAAE,CAAC,KAAK,CAAC;IAC5C,8CAA8C,EAAE,CAAC,KAAK,CAAC;CACxD,CAAC;AAWF,MAAM,UAAU,YAAY,CAC1B,QAMgC;IAKhC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACvC,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,WAAW,GAAG,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAAC,Q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,GAAG,CAAC,EAC/C,GAAG,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAC1B,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAC1C,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;gBAE3B,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n GetMedia200Response,\n GetMediaDefaultResponse,\n Send202Response,\n SendDefaultResponse,\n ListTemplates200Response,\n ListTemplatesDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /messages/streams/{id}\": [\"200\"],\n \"POST /messages/notifications:send\": [\"202\"],\n \"GET /messages/channels/{channelId}/templates\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetMedia200Response | GetMediaDefaultResponse,\n): response is GetMediaDefaultResponse;\nexport function isUnexpected(\n response: Send202Response | SendDefaultResponse,\n): response is SendDefaultResponse;\nexport function isUnexpected(\n response: ListTemplates200Response | ListTemplatesDefaultResponse,\n): response is ListTemplatesDefaultResponse;\nexport function isUnexpected(\n response:\n | GetMedia200Response\n | GetMediaDefaultResponse\n | Send202Response\n | SendDefaultResponse\n | ListTemplates200Response\n | ListTemplatesDefaultResponse,\n): response is\n | GetMediaDefaultResponse\n | SendDefaultResponse\n | ListTemplatesDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(\n `${candidateParts[i]?.slice(start, end)}`,\n ).test(pathParts[j] || \"\");\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"isUnexpected.js","sourceRoot":"","sources":["../../../../src/generated/src/isUnexpected.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAWlC,MAAM,WAAW,GAA6B;IAC5C,4BAA4B,EAAE,CAAC,KAAK,CAAC;IACrC,mCAAmC,EAAE,CAAC,KAAK,CAAC;IAC5C,8CAA8C,EAAE,CAAC,KAAK,CAAC;CACxD,CAAC;AAWF,MAAM,UAAU,YAAY,CAC1B,QAMgC;IAKhC,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACzD,MAAM,MAAM,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC;IACvC,IAAI,WAAW,GAAG,WAAW,CAAC,GAAG,MAAM,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC3D,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,WAAW,GAAG,0BAA0B,CAAC,MAAM,EAAE,GAAG,CAA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AAC,GAAG,CAAC,EAC/C,GAAG,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,MAAM,CAAC;gBAClC,4DAA4D;gBAC5D,qDAAqD;gBACrD,eAAe;gBACf,6BAA6B;gBAC7B,MAAM,SAAS,GAAG,IAAI,MAAM,CAC1B,GAAG,MAAA,cAAc,CAAC,CAAC,CAAC,0CAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,CAC1C,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;gBAE3B,IAAI,CAAC,SAAS,EAAE,CAAC;oBACf,KAAK,GAAG,KAAK,CAAC;oBACd,MAAM;gBACR,CAAC;gBACD,SAAS;YACX,CAAC;YAED,8CAA8C;YAC9C,wDAAwD;YACxD,2CAA2C;YAC3C,IAAI,cAAc,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvC,KAAK,GAAG,KAAK,CAAC;gBACd,MAAM;YACR,CAAC;QACH,CAAC;QAED,qDAAqD;QACrD,sEAAsE;QACtE,IAAI,KAAK,IAAI,aAAa,CAAC,MAAM,GAAG,UAAU,EAAE,CAAC;YAC/C,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC;YAClC,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;IACH,CAAC;IAED,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,SAAS,iBAAiB,CAAC,MAAc;IACvC,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type {\n GetMedia200Response,\n GetMediaDefaultResponse,\n Send202Response,\n SendDefaultResponse,\n ListTemplates200Response,\n ListTemplatesDefaultResponse,\n} from \"./responses.js\";\n\nconst responseMap: Record<string, string[]> = {\n \"GET /messages/streams/{id}\": [\"200\"],\n \"POST /messages/notifications:send\": [\"202\"],\n \"GET /messages/channels/{channelId}/templates\": [\"200\"],\n};\n\nexport function isUnexpected(\n response: GetMedia200Response | GetMediaDefaultResponse,\n): response is GetMediaDefaultResponse;\nexport function isUnexpected(\n response: Send202Response | SendDefaultResponse,\n): response is SendDefaultResponse;\nexport function isUnexpected(\n response: ListTemplates200Response | ListTemplatesDefaultResponse,\n): response is ListTemplatesDefaultResponse;\nexport function isUnexpected(\n response:\n | GetMedia200Response\n | GetMediaDefaultResponse\n | Send202Response\n | SendDefaultResponse\n | ListTemplates200Response\n | ListTemplatesDefaultResponse,\n): response is\n | GetMediaDefaultResponse\n | SendDefaultResponse\n | ListTemplatesDefaultResponse {\n const lroOriginal = response.headers[\"x-ms-original-url\"];\n const url = new URL(lroOriginal ?? response.request.url);\n const method = response.request.method;\n let pathDetails = responseMap[`${method} ${url.pathname}`];\n if (!pathDetails) {\n pathDetails = getParametrizedPathSuccess(method, url.pathname);\n }\n return !pathDetails.includes(response.status);\n}\n\nfunction getParametrizedPathSuccess(method: string, path: string): string[] {\n const pathParts = path.split(\"/\");\n\n // Traverse list to match the longest candidate\n // matchedLen: the length of candidate path\n // matchedValue: the matched status code array\n let matchedLen = -1,\n matchedValue: string[] = [];\n\n // Iterate the responseMap to find a match\n for (const [key, value] of Object.entries(responseMap)) {\n // Extracting the path from the map key which is in format\n // GET /path/foo\n if (!key.startsWith(method)) {\n continue;\n }\n const candidatePath = getPathFromMapKey(key);\n // Get each part of the url path\n const candidateParts = candidatePath.split(\"/\");\n\n // track if we have found a match to return the values found.\n let found = true;\n for (\n let i = candidateParts.length - 1, j = pathParts.length - 1;\n i >= 1 && j >= 1;\n i--, j--\n ) {\n if (\n candidateParts[i]?.startsWith(\"{\") &&\n candidateParts[i]?.indexOf(\"}\") !== -1\n ) {\n const start = candidateParts[i]!.indexOf(\"}\") + 1,\n end = candidateParts[i]?.length;\n // If the current part of the candidate is a \"template\" part\n // Try to use the suffix of pattern to match the path\n // {guid} ==> $\n // {guid}:export ==> :export$\n const isMatched = new RegExp(\n `${candidateParts[i]?.slice(start, end)}`,\n ).test(pathParts[j] || \"\");\n\n if (!isMatched) {\n found = false;\n break;\n }\n continue;\n }\n\n // If the candidate part is not a template and\n // the parts don't match mark the candidate as not found\n // to move on with the next candidate path.\n if (candidateParts[i] !== pathParts[j]) {\n found = false;\n break;\n }\n }\n\n // We finished evaluating the current candidate parts\n // Update the matched value if and only if we found the longer pattern\n if (found && candidatePath.length > matchedLen) {\n matchedLen = candidatePath.length;\n matchedValue = value;\n }\n }\n\n return matchedValue;\n}\n\nfunction getPathFromMapKey(mapKey: string): string {\n const pathStart = mapKey.indexOf(\"/\");\n return mapKey.slice(pathStart);\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ClientOptions } from "@azure-rest/core-client";
|
|
2
|
-
import { TokenCredential, KeyCredential } from "@azure/core-auth";
|
|
3
|
-
import { MessagesServiceClient } from "./clientDefinitions.js";
|
|
1
|
+
import type { ClientOptions } from "@azure-rest/core-client";
|
|
2
|
+
import type { TokenCredential, KeyCredential } from "@azure/core-auth";
|
|
3
|
+
import type { MessagesServiceClient } from "./clientDefinitions.js";
|
|
4
4
|
/** The optional parameters for the client */
|
|
5
5
|
export interface MessagesServiceClientOptions extends ClientOptions {
|
|
6
6
|
/** The api version option of the client */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messagesServiceClient.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/messagesServiceClient.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"messagesServiceClient.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/messagesServiceClient.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,6CAA6C;AAC7C,MAAM,WAAW,4BAA6B,SAAQ,aAAa;IACjE,2CAA2C;IAC3C,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,eAAe,GAAG,aAAa,EAC5C,EACE,UAAiC,EACjC,GAAG,OAAO,EACX,GAAE,4BAAiC,GACnC,qBAAqB,CA+CvB"}
|
|
@@ -11,9 +11,9 @@ import { logger } from "./logger.js";
|
|
|
11
11
|
*/
|
|
12
12
|
export default function createClient(endpointParam, credentials, _a = {}) {
|
|
13
13
|
var _b, _c, _d, _e, _f, _g, _h, _j;
|
|
14
|
-
var { apiVersion = "
|
|
14
|
+
var { apiVersion = "2025-01-15-preview" } = _a, options = __rest(_a, ["apiVersion"]);
|
|
15
15
|
const endpointUrl = (_c = (_b = options.endpoint) !== null && _b !== void 0 ? _b : options.baseUrl) !== null && _c !== void 0 ? _c : `${endpointParam}`;
|
|
16
|
-
const userAgentInfo = `azsdk-js-communication-messages-rest/2.0.
|
|
16
|
+
const userAgentInfo = `azsdk-js-communication-messages-rest/2.1.0-beta.1`;
|
|
17
17
|
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
18
18
|
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
|
|
19
19
|
: `${userAgentInfo}`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messagesServiceClient.js","sourceRoot":"","sources":["../../../../src/generated/src/messagesServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;
|
|
1
|
+
{"version":3,"file":"messagesServiceClient.js","sourceRoot":"","sources":["../../../../src/generated/src/messagesServiceClient.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;AAGlC,OAAO,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AAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACzB,qDAAqD;YACrD,yEAAyE;YACzE,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;YAC7B,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,UAAU,EAAE,CAAC;gBACvD,GAAG,CAAC,GAAG,GAAG,GAAG,GAAG,CAAC,GAAG,GAClB,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GACzD,eAAe,UAAU,EAAE,CAAC;YAC9B,CAAC;YAED,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport type { ClientOptions } from \"@azure-rest/core-client\";\nimport { getClient } from \"@azure-rest/core-client\";\nimport { logger } from \"./logger.js\";\nimport type { TokenCredential, KeyCredential } from \"@azure/core-auth\";\nimport type { MessagesServiceClient } from \"./clientDefinitions.js\";\n\n/** The optional parameters for the client */\nexport interface MessagesServiceClientOptions extends ClientOptions {\n /** The api version option of the client */\n apiVersion?: string;\n}\n\n/**\n * Initialize a new instance of `MessagesServiceClient`\n * @param endpointParam - The communication resource, for example https://my-resource.communication.azure.com\n * @param credentials - uniquely identify client credential\n * @param options - the parameter for all optional parameters\n */\nexport default function createClient(\n endpointParam: string,\n credentials: TokenCredential | KeyCredential,\n {\n apiVersion = \"2025-01-15-preview\",\n ...options\n }: MessagesServiceClientOptions = {},\n): MessagesServiceClient {\n const endpointUrl = options.endpoint ?? options.baseUrl ?? `${endpointParam}`;\n const userAgentInfo = `azsdk-js-communication-messages-rest/2.1.0-beta.1`;\n const userAgentPrefix =\n options.userAgentOptions && options.userAgentOptions.userAgentPrefix\n ? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`\n : `${userAgentInfo}`;\n options = {\n ...options,\n userAgentOptions: {\n userAgentPrefix,\n },\n loggingOptions: {\n logger: options.loggingOptions?.logger ?? logger.info,\n },\n credentials: {\n scopes: options.credentials?.scopes ?? [\n \"https://communication.azure.com/.default\",\n ],\n apiKeyHeaderName:\n options.credentials?.apiKeyHeaderName ?? \"Authorization\",\n },\n };\n const client = getClient(\n endpointUrl,\n credentials,\n options,\n ) as MessagesServiceClient;\n\n client.pipeline.removePolicy({ name: \"ApiVersionPolicy\" });\n client.pipeline.addPolicy({\n name: \"ClientApiVersionPolicy\",\n sendRequest: (req, next) => {\n // Use the apiVersion defined in request url directly\n // Append one if there is no apiVersion and we have one at client options\n const url = new URL(req.url);\n if (!url.searchParams.get(\"api-version\") && apiVersion) {\n req.url = `${req.url}${\n Array.from(url.searchParams.keys()).length > 0 ? \"&\" : \"?\"\n }api-version=${apiVersion}`;\n }\n\n return next(req);\n },\n });\n\n return client;\n}\n"]}
|
|
@@ -58,6 +58,145 @@ export interface AudioNotificationContent extends NotificationContentParent {
|
|
|
58
58
|
/** A media url for the file. Required if the type is one of the supported media types, e.g. image */
|
|
59
59
|
mediaUri: string;
|
|
60
60
|
}
|
|
61
|
+
/** A request to send a Reaction notification. */
|
|
62
|
+
export interface ReactionNotificationContent extends NotificationContentParent {
|
|
63
|
+
/** Message notification type is reaction. */
|
|
64
|
+
kind: "reaction";
|
|
65
|
+
/** emoji content like \uD83D\uDE00. */
|
|
66
|
+
emoji: string;
|
|
67
|
+
/** ID of the previous message you want to reply to. */
|
|
68
|
+
messageId: string;
|
|
69
|
+
}
|
|
70
|
+
/** A request to send a Sticker notification. */
|
|
71
|
+
export interface StickerNotificationContent extends NotificationContentParent {
|
|
72
|
+
/** Message notification type is sticker. */
|
|
73
|
+
kind: "sticker";
|
|
74
|
+
/** A media url for the file. Required if the type is one of the supported media types, e.g. image */
|
|
75
|
+
mediaUri: string;
|
|
76
|
+
}
|
|
77
|
+
/** A request to send an Interactive message notification. */
|
|
78
|
+
export interface InteractiveNotificationContent extends NotificationContentParent {
|
|
79
|
+
/** Message notification type is Interactive. */
|
|
80
|
+
kind: "interactive";
|
|
81
|
+
/** The interactive message content. */
|
|
82
|
+
interactiveMessage: InteractiveMessage;
|
|
83
|
+
}
|
|
84
|
+
/** The Interactive message content to which user can read and respond. */
|
|
85
|
+
export interface InteractiveMessage {
|
|
86
|
+
/** Gets or Sets Header content. Supports the following types:text, images etc. */
|
|
87
|
+
header?: MessageContent;
|
|
88
|
+
/** Gets or Sets Message body content. Emojis, markdown, and links are supported. */
|
|
89
|
+
body: TextMessageContent;
|
|
90
|
+
/** Gets or Sets Message footer content. Emojis, markdown, and links are supported. */
|
|
91
|
+
footer?: TextMessageContent;
|
|
92
|
+
/** The binding object to get or set Action which describes options user have to respond to message. */
|
|
93
|
+
action: ActionBindings;
|
|
94
|
+
}
|
|
95
|
+
/** The message content object used to create interactive messages components. */
|
|
96
|
+
export interface MessageContentParent {
|
|
97
|
+
kind: MessageContentKind;
|
|
98
|
+
}
|
|
99
|
+
/** The message content of type text information. */
|
|
100
|
+
export interface TextMessageContent extends MessageContentParent {
|
|
101
|
+
/** Message content kind is text. */
|
|
102
|
+
kind: "text";
|
|
103
|
+
/** The text value. */
|
|
104
|
+
text: string;
|
|
105
|
+
}
|
|
106
|
+
/** The message content of type document information. */
|
|
107
|
+
export interface DocumentMessageContent extends MessageContentParent {
|
|
108
|
+
/** Message content kind is document. */
|
|
109
|
+
kind: "document";
|
|
110
|
+
/** MediaUri of the media content. */
|
|
111
|
+
mediaUri: string;
|
|
112
|
+
}
|
|
113
|
+
/** The message content of type image information. */
|
|
114
|
+
export interface ImageMessageContent extends MessageContentParent {
|
|
115
|
+
/** Message content kind is image. */
|
|
116
|
+
kind: "image";
|
|
117
|
+
/** MediaUri of the media content. */
|
|
118
|
+
mediaUri: string;
|
|
119
|
+
}
|
|
120
|
+
/** The message content of type video information. */
|
|
121
|
+
export interface VideoMessageContent extends MessageContentParent {
|
|
122
|
+
/** Message content kind is video. */
|
|
123
|
+
kind: "video";
|
|
124
|
+
/** MediaUri of the media content. */
|
|
125
|
+
mediaUri: string;
|
|
126
|
+
}
|
|
127
|
+
/** The message content of type ButtonSet/ List of buttons information. */
|
|
128
|
+
export interface ButtonSetContent extends MessageContentParent {
|
|
129
|
+
/** Message content kind is Button. */
|
|
130
|
+
kind: "buttonSet";
|
|
131
|
+
/** Unique Id of the button content. */
|
|
132
|
+
buttons: Array<ButtonContent>;
|
|
133
|
+
}
|
|
134
|
+
/** The message content of type Button information. */
|
|
135
|
+
export interface ButtonContent {
|
|
136
|
+
/** Unique Id of the button content. */
|
|
137
|
+
id: string;
|
|
138
|
+
/** Title of the button content. */
|
|
139
|
+
title: string;
|
|
140
|
+
}
|
|
141
|
+
/** The message content of type Url information. */
|
|
142
|
+
export interface LinkContent extends MessageContentParent {
|
|
143
|
+
/** Message content kind is url. */
|
|
144
|
+
kind: "url";
|
|
145
|
+
/** Title of the url content. */
|
|
146
|
+
title: string;
|
|
147
|
+
/** The url in the content. */
|
|
148
|
+
url: string;
|
|
149
|
+
}
|
|
150
|
+
/** The action content of type ActionGroup. */
|
|
151
|
+
export interface ActionGroupContent extends MessageContentParent {
|
|
152
|
+
/** Message content kind is actionGroup. */
|
|
153
|
+
kind: "group";
|
|
154
|
+
/** Title of the actionGroup content. */
|
|
155
|
+
title: string;
|
|
156
|
+
/** Set or group of actions. */
|
|
157
|
+
groups: Array<ActionGroup>;
|
|
158
|
+
}
|
|
159
|
+
/** The Action Group content. */
|
|
160
|
+
export interface ActionGroup {
|
|
161
|
+
/** Title of the ActionGroup. */
|
|
162
|
+
title: string;
|
|
163
|
+
/** Array of items in ActionGroup. */
|
|
164
|
+
items: Array<ActionGroupItem>;
|
|
165
|
+
}
|
|
166
|
+
/** The Action group item in the content. */
|
|
167
|
+
export interface ActionGroupItem {
|
|
168
|
+
/** Id of the Item. */
|
|
169
|
+
id: string;
|
|
170
|
+
/** Title of the Item. */
|
|
171
|
+
title: string;
|
|
172
|
+
/** Description of the Item. */
|
|
173
|
+
description: string;
|
|
174
|
+
}
|
|
175
|
+
/** Binding actions to the interactive message. */
|
|
176
|
+
export interface ActionBindingsParent {
|
|
177
|
+
kind: MessageActionBindingKind;
|
|
178
|
+
}
|
|
179
|
+
/** WhatsApp List Binding actions to the interactive message. */
|
|
180
|
+
export interface WhatsAppListActionBindings extends ActionBindingsParent {
|
|
181
|
+
/** Message action binding type is WhatsAppListAction. */
|
|
182
|
+
kind: "whatsAppListAction";
|
|
183
|
+
/** Action content of Interactive message. */
|
|
184
|
+
content: ActionGroupContent;
|
|
185
|
+
}
|
|
186
|
+
/** WhatsApp Binding actions to the interactive message. */
|
|
187
|
+
export interface WhatsAppButtonActionBindings extends ActionBindingsParent {
|
|
188
|
+
/** Message action binding type is WhatsAppButtonAction. */
|
|
189
|
+
kind: "whatsAppButtonAction";
|
|
190
|
+
/** Action content of Interactive message. */
|
|
191
|
+
content: ButtonSetContent;
|
|
192
|
+
}
|
|
193
|
+
/** WhatsApp Binding actions to the interactive message. */
|
|
194
|
+
export interface WhatsAppUrlActionBindings extends ActionBindingsParent {
|
|
195
|
+
/** Message action binding type is WhatsAppUrlAction. */
|
|
196
|
+
kind: "whatsAppUrlAction";
|
|
197
|
+
/** Action content of Interactive message. */
|
|
198
|
+
content: LinkContent;
|
|
199
|
+
}
|
|
61
200
|
/** A request to send a template notification. */
|
|
62
201
|
export interface TemplateNotificationContent extends NotificationContentParent {
|
|
63
202
|
/** Message notification type is template. */
|
|
@@ -178,13 +317,21 @@ export interface WhatsAppMessageTemplateBindingsButton {
|
|
|
178
317
|
refValue: string;
|
|
179
318
|
}
|
|
180
319
|
/** Details of the message to send. */
|
|
181
|
-
export type NotificationContent = NotificationContentParent | TextNotificationContent | MediaNotificationContent | ImageNotificationContent | DocumentNotificationContent | VideoNotificationContent | AudioNotificationContent | TemplateNotificationContent;
|
|
320
|
+
export type NotificationContent = NotificationContentParent | TextNotificationContent | MediaNotificationContent | ImageNotificationContent | DocumentNotificationContent | VideoNotificationContent | AudioNotificationContent | ReactionNotificationContent | StickerNotificationContent | InteractiveNotificationContent | TemplateNotificationContent;
|
|
321
|
+
/** The message content object used to create interactive messages components. */
|
|
322
|
+
export type MessageContent = MessageContentParent | TextMessageContent | DocumentMessageContent | ImageMessageContent | VideoMessageContent | ButtonSetContent | LinkContent | ActionGroupContent;
|
|
323
|
+
/** Binding actions to the interactive message. */
|
|
324
|
+
export type ActionBindings = ActionBindingsParent | WhatsAppListActionBindings | WhatsAppButtonActionBindings | WhatsAppUrlActionBindings;
|
|
182
325
|
/** The class describes a parameter of a template. */
|
|
183
326
|
export type MessageTemplateValue = MessageTemplateValueParent | MessageTemplateText | MessageTemplateImage | MessageTemplateDocument | MessageTemplateVideo | MessageTemplateLocation | MessageTemplateQuickAction;
|
|
184
327
|
/** The binding object to link values to the template specific locations */
|
|
185
328
|
export type MessageTemplateBindings = MessageTemplateBindingsParent | WhatsAppMessageTemplateBindings;
|
|
186
329
|
/** Alias for CommunicationMessageKind */
|
|
187
330
|
export type CommunicationMessageKind = string;
|
|
331
|
+
/** Alias for MessageContentKind */
|
|
332
|
+
export type MessageContentKind = string;
|
|
333
|
+
/** Alias for MessageActionBindingKind */
|
|
334
|
+
export type MessageActionBindingKind = string;
|
|
188
335
|
/** Alias for MessageTemplateValueKind */
|
|
189
336
|
export type MessageTemplateValueKind = string;
|
|
190
337
|
/** Alias for MessageTemplateBindingsKind */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/models.ts"],"names":[],"mappings":"AAGA,sCAAsC;AACtC,MAAM,WAAW,yBAAyB;IACxC,+DAA+D;IAC/D,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sEAAsE;IACtE,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,IAAI,EAA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,MAAM,CAAC;CAClB;AAED,0DAA0D;AAC1D,MAAM,WAAW,qCAAqC;IACpD;;;;OAIG;IACH,OAAO,EAAE,4BAA4B,CAAC;IACtC,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,sCAAsC;AACtC,MAAM,MAAM,mBAAmB,GAC3B,yBAAyB,GACzB,uBAAuB,GACvB,wBAAwB,GACxB,wBAAwB,GACxB,2BAA2B,GAC3B,wBAAwB,GACxB,wBAAwB,GACxB,2BAA2B,CAAC;AAChC,qDAAqD;AACrD,MAAM,MAAM,oBAAoB,GAC5B,0BAA0B,GAC1B,mBAAmB,GACnB,oBAAoB,GACpB,uBAAuB,GACvB,oBAAoB,GACpB,uBAAuB,GACvB,0BAA0B,CAAC;AAC/B,2EAA2E;AAC3E,MAAM,MAAM,uBAAuB,GAC/B,6BAA6B,GAC7B,+BAA+B,CAAC;AACpC,yCAAyC;AACzC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC9C,yCAAyC;AACzC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC9C,4CAA4C;AAC5C,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC;AACjD,6CAA6C;AAC7C,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/models.ts"],"names":[],"mappings":"AAGA,sCAAsC;AACtC,MAAM,WAAW,yBAAyB;IACxC,+DAA+D;IAC/D,qBAAqB,EAAE,MAAM,CAAC;IAC9B,sEAAsE;IACtE,EAAE,EAAE,MAAM,EAAE,CAAC;IACb,IAAI,EAAE,wBAAwB,CAAC;CAChC;AAED,6CAA6C;AAC7C,MAAM,WAAW,uBAAwB,SAAQ,yBAAyB;IACxE,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,uBAAuB;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,2DAA2D;AAC3D,MAA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C,yCAAyC;AACzC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC9C,mCAAmC;AACnC,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AACxC,yCAAyC;AACzC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC9C,yCAAyC;AACzC,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAC9C,4CAA4C;AAC5C,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC;AACjD,6CAA6C;AAC7C,MAAM,MAAM,4BAA4B,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/generated/src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** Details of the message to send. */\nexport interface NotificationContentParent {\n /** The Channel Registration ID for the Business Identifier. */\n channelRegistrationId: string;\n /** The native external platform user identifiers of the recipient. */\n to: string[];\n kind: CommunicationMessageKind;\n}\n\n/** A request to send a text notification. */\nexport interface TextNotificationContent extends NotificationContentParent {\n /** Message notification type is text. */\n kind: \"text\";\n /** Message content. */\n content: string;\n}\n\n/** @deprecated A request to send an image notification. */\nexport interface MediaNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"image_v0\";\n /** Optional text content. */\n content?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send an image notification. */\nexport interface ImageNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"image\";\n /** Optional text content. */\n caption?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send a document notification. */\nexport interface DocumentNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"document\";\n /** Optional text content. */\n caption?: string;\n /** Optional name for the file. */\n fileName?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send a video notification. */\nexport interface VideoNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"video\";\n /** Optional text content. */\n caption?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send an audio notification. */\nexport interface AudioNotificationContent extends NotificationContentParent {\n /** Message notification type is audio. */\n kind: \"audio\";\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send a template notification. */\nexport interface TemplateNotificationContent extends NotificationContentParent {\n /** Message notification type is template. */\n kind: \"template\";\n /** The template object used to create templates. */\n template: MessageTemplate;\n}\n\n/** The template object used to create templates. */\nexport interface MessageTemplate {\n /** Name of the template. */\n name: string;\n /** The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'. */\n language: string;\n /** The template values. */\n values?: Array<MessageTemplateValue>;\n /** The binding object to link values to the template specific locations */\n bindings?: MessageTemplateBindings;\n}\n\n/** The class describes a parameter of a template. */\nexport interface MessageTemplateValueParent {\n /** Template binding reference name */\n name: string;\n kind: MessageTemplateValueKind;\n}\n\n/** The message template's text value information. */\nexport interface MessageTemplateText extends MessageTemplateValueParent {\n /** Message parameter type is text. */\n kind: \"text\";\n /** The text value. */\n text: string;\n}\n\n/** The message template's image value information. */\nexport interface MessageTemplateImage extends MessageTemplateValueParent {\n /** Message parameter type is image. */\n kind: \"image\";\n /** The (public) URL of the media. */\n url: string;\n /** The [optional] caption of the media object. */\n caption?: string;\n /** The [optional] filename of the media file. */\n fileName?: string;\n}\n\n/** The message template's document value information. */\nexport interface MessageTemplateDocument extends MessageTemplateValueParent {\n /** Message parameter type is document. */\n kind: \"document\";\n /** The (public) URL of the media. */\n url: string;\n /** The [optional] caption of the media object. */\n caption?: string;\n /** The [optional] filename of the media file. */\n fileName?: string;\n}\n\n/** The message template's video value information. */\nexport interface MessageTemplateVideo extends MessageTemplateValueParent {\n /** Message parameter type is video. */\n kind: \"video\";\n /** The (public) URL of the media. */\n url: string;\n /** The [optional] caption of the media object. */\n caption?: string;\n /** The [optional] filename of the media file. */\n fileName?: string;\n}\n\n/** The message template's location value information. */\nexport interface MessageTemplateLocation extends MessageTemplateValueParent {\n /** Message parameter type is location. */\n kind: \"location\";\n /** The [Optional] name of the location. */\n locationName?: string;\n /** The [Optional] address of the location. */\n address?: string;\n /** The latitude of the location. */\n latitude: number;\n /** The longitude of the location. */\n longitude: number;\n}\n\n/** The message template's quick action value information. */\nexport interface MessageTemplateQuickAction extends MessageTemplateValueParent {\n /** Message parameter type is quick action. */\n kind: \"quickAction\";\n /** The [Optional] quick action text */\n text?: string;\n /** The [Optional] quick action payload */\n payload?: string;\n}\n\n/** The binding object to link values to the template specific locations */\nexport interface MessageTemplateBindingsParent {\n kind: MessageTemplateBindingsKind;\n}\n\n/** The template bindings for WhatsApp */\nexport interface WhatsAppMessageTemplateBindings\n extends MessageTemplateBindingsParent {\n /** MessageTemplateBindings is whatsApp */\n kind: \"whatsApp\";\n /** The header template bindings */\n header?: Array<WhatsAppMessageTemplateBindingsComponent>;\n /** The body template bindings */\n body?: Array<WhatsAppMessageTemplateBindingsComponent>;\n /** The footer template bindings */\n footer?: Array<WhatsAppMessageTemplateBindingsComponent>;\n /** The button template bindings */\n buttons?: Array<WhatsAppMessageTemplateBindingsButton>;\n}\n\n/** The template bindings component for WhatsApp */\nexport interface WhatsAppMessageTemplateBindingsComponent {\n /** The name of the referenced item in the template values. */\n refValue: string;\n}\n\n/** The template bindings component button for WhatsApp */\nexport interface WhatsAppMessageTemplateBindingsButton {\n /**\n * The WhatsApp button sub type\n *\n * Possible values: \"quickReply\", \"url\"\n */\n subType: WhatsAppMessageButtonSubType;\n /** The name of the referenced item in the template values. */\n refValue: string;\n}\n\n/** Details of the message to send. */\nexport type NotificationContent =\n | NotificationContentParent\n | TextNotificationContent\n | MediaNotificationContent\n | ImageNotificationContent\n | DocumentNotificationContent\n | VideoNotificationContent\n | AudioNotificationContent\n | TemplateNotificationContent;\n/** The class describes a parameter of a template. */\nexport type MessageTemplateValue =\n | MessageTemplateValueParent\n | MessageTemplateText\n | MessageTemplateImage\n | MessageTemplateDocument\n | MessageTemplateVideo\n | MessageTemplateLocation\n | MessageTemplateQuickAction;\n/** The binding object to link values to the template specific locations */\nexport type MessageTemplateBindings =\n | MessageTemplateBindingsParent\n | WhatsAppMessageTemplateBindings;\n/** Alias for CommunicationMessageKind */\nexport type CommunicationMessageKind = string;\n/** Alias for MessageTemplateValueKind */\nexport type MessageTemplateValueKind = string;\n/** Alias for MessageTemplateBindingsKind */\nexport type MessageTemplateBindingsKind = string;\n/** Alias for WhatsAppMessageButtonSubType */\nexport type WhatsAppMessageButtonSubType = string;\n"]}
|
|
1
|
+
{"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/generated/src/models.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** Details of the message to send. */\nexport interface NotificationContentParent {\n /** The Channel Registration ID for the Business Identifier. */\n channelRegistrationId: string;\n /** The native external platform user identifiers of the recipient. */\n to: string[];\n kind: CommunicationMessageKind;\n}\n\n/** A request to send a text notification. */\nexport interface TextNotificationContent extends NotificationContentParent {\n /** Message notification type is text. */\n kind: \"text\";\n /** Message content. */\n content: string;\n}\n\n/** @deprecated A request to send an image notification. */\nexport interface MediaNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"image_v0\";\n /** Optional text content. */\n content?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send an image notification. */\nexport interface ImageNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"image\";\n /** Optional text content. */\n caption?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send a document notification. */\nexport interface DocumentNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"document\";\n /** Optional text content. */\n caption?: string;\n /** Optional name for the file. */\n fileName?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send a video notification. */\nexport interface VideoNotificationContent extends NotificationContentParent {\n /** Message notification type is image. */\n kind: \"video\";\n /** Optional text content. */\n caption?: string;\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send an audio notification. */\nexport interface AudioNotificationContent extends NotificationContentParent {\n /** Message notification type is audio. */\n kind: \"audio\";\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send a Reaction notification. */\nexport interface ReactionNotificationContent extends NotificationContentParent {\n /** Message notification type is reaction. */\n kind: \"reaction\";\n /** emoji content like \\uD83D\\uDE00. */\n emoji: string;\n /** ID of the previous message you want to reply to. */\n messageId: string;\n}\n\n/** A request to send a Sticker notification. */\nexport interface StickerNotificationContent extends NotificationContentParent {\n /** Message notification type is sticker. */\n kind: \"sticker\";\n /** A media url for the file. Required if the type is one of the supported media types, e.g. image */\n mediaUri: string;\n}\n\n/** A request to send an Interactive message notification. */\nexport interface InteractiveNotificationContent\n extends NotificationContentParent {\n /** Message notification type is Interactive. */\n kind: \"interactive\";\n /** The interactive message content. */\n interactiveMessage: InteractiveMessage;\n}\n\n/** The Interactive message content to which user can read and respond. */\nexport interface InteractiveMessage {\n /** Gets or Sets Header content. Supports the following types:text, images etc. */\n header?: MessageContent;\n /** Gets or Sets Message body content. Emojis, markdown, and links are supported. */\n body: TextMessageContent;\n /** Gets or Sets Message footer content. Emojis, markdown, and links are supported. */\n footer?: TextMessageContent;\n /** The binding object to get or set Action which describes options user have to respond to message. */\n action: ActionBindings;\n}\n\n/** The message content object used to create interactive messages components. */\nexport interface MessageContentParent {\n kind: MessageContentKind;\n}\n\n/** The message content of type text information. */\nexport interface TextMessageContent extends MessageContentParent {\n /** Message content kind is text. */\n kind: \"text\";\n /** The text value. */\n text: string;\n}\n\n/** The message content of type document information. */\nexport interface DocumentMessageContent extends MessageContentParent {\n /** Message content kind is document. */\n kind: \"document\";\n /** MediaUri of the media content. */\n mediaUri: string;\n}\n\n/** The message content of type image information. */\nexport interface ImageMessageContent extends MessageContentParent {\n /** Message content kind is image. */\n kind: \"image\";\n /** MediaUri of the media content. */\n mediaUri: string;\n}\n\n/** The message content of type video information. */\nexport interface VideoMessageContent extends MessageContentParent {\n /** Message content kind is video. */\n kind: \"video\";\n /** MediaUri of the media content. */\n mediaUri: string;\n}\n\n/** The message content of type ButtonSet/ List of buttons information. */\nexport interface ButtonSetContent extends MessageContentParent {\n /** Message content kind is Button. */\n kind: \"buttonSet\";\n /** Unique Id of the button content. */\n buttons: Array<ButtonContent>;\n}\n\n/** The message content of type Button information. */\nexport interface ButtonContent {\n /** Unique Id of the button content. */\n id: string;\n /** Title of the button content. */\n title: string;\n}\n\n/** The message content of type Url information. */\nexport interface LinkContent extends MessageContentParent {\n /** Message content kind is url. */\n kind: \"url\";\n /** Title of the url content. */\n title: string;\n /** The url in the content. */\n url: string;\n}\n\n/** The action content of type ActionGroup. */\nexport interface ActionGroupContent extends MessageContentParent {\n /** Message content kind is actionGroup. */\n kind: \"group\";\n /** Title of the actionGroup content. */\n title: string;\n /** Set or group of actions. */\n groups: Array<ActionGroup>;\n}\n\n/** The Action Group content. */\nexport interface ActionGroup {\n /** Title of the ActionGroup. */\n title: string;\n /** Array of items in ActionGroup. */\n items: Array<ActionGroupItem>;\n}\n\n/** The Action group item in the content. */\nexport interface ActionGroupItem {\n /** Id of the Item. */\n id: string;\n /** Title of the Item. */\n title: string;\n /** Description of the Item. */\n description: string;\n}\n\n/** Binding actions to the interactive message. */\nexport interface ActionBindingsParent {\n kind: MessageActionBindingKind;\n}\n\n/** WhatsApp List Binding actions to the interactive message. */\nexport interface WhatsAppListActionBindings extends ActionBindingsParent {\n /** Message action binding type is WhatsAppListAction. */\n kind: \"whatsAppListAction\";\n /** Action content of Interactive message. */\n content: ActionGroupContent;\n}\n\n/** WhatsApp Binding actions to the interactive message. */\nexport interface WhatsAppButtonActionBindings extends ActionBindingsParent {\n /** Message action binding type is WhatsAppButtonAction. */\n kind: \"whatsAppButtonAction\";\n /** Action content of Interactive message. */\n content: ButtonSetContent;\n}\n\n/** WhatsApp Binding actions to the interactive message. */\nexport interface WhatsAppUrlActionBindings extends ActionBindingsParent {\n /** Message action binding type is WhatsAppUrlAction. */\n kind: \"whatsAppUrlAction\";\n /** Action content of Interactive message. */\n content: LinkContent;\n}\n\n/** A request to send a template notification. */\nexport interface TemplateNotificationContent extends NotificationContentParent {\n /** Message notification type is template. */\n kind: \"template\";\n /** The template object used to create templates. */\n template: MessageTemplate;\n}\n\n/** The template object used to create templates. */\nexport interface MessageTemplate {\n /** Name of the template. */\n name: string;\n /** The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'. */\n language: string;\n /** The template values. */\n values?: Array<MessageTemplateValue>;\n /** The binding object to link values to the template specific locations */\n bindings?: MessageTemplateBindings;\n}\n\n/** The class describes a parameter of a template. */\nexport interface MessageTemplateValueParent {\n /** Template binding reference name */\n name: string;\n kind: MessageTemplateValueKind;\n}\n\n/** The message template's text value information. */\nexport interface MessageTemplateText extends MessageTemplateValueParent {\n /** Message parameter type is text. */\n kind: \"text\";\n /** The text value. */\n text: string;\n}\n\n/** The message template's image value information. */\nexport interface MessageTemplateImage extends MessageTemplateValueParent {\n /** Message parameter type is image. */\n kind: \"image\";\n /** The (public) URL of the media. */\n url: string;\n /** The [optional] caption of the media object. */\n caption?: string;\n /** The [optional] filename of the media file. */\n fileName?: string;\n}\n\n/** The message template's document value information. */\nexport interface MessageTemplateDocument extends MessageTemplateValueParent {\n /** Message parameter type is document. */\n kind: \"document\";\n /** The (public) URL of the media. */\n url: string;\n /** The [optional] caption of the media object. */\n caption?: string;\n /** The [optional] filename of the media file. */\n fileName?: string;\n}\n\n/** The message template's video value information. */\nexport interface MessageTemplateVideo extends MessageTemplateValueParent {\n /** Message parameter type is video. */\n kind: \"video\";\n /** The (public) URL of the media. */\n url: string;\n /** The [optional] caption of the media object. */\n caption?: string;\n /** The [optional] filename of the media file. */\n fileName?: string;\n}\n\n/** The message template's location value information. */\nexport interface MessageTemplateLocation extends MessageTemplateValueParent {\n /** Message parameter type is location. */\n kind: \"location\";\n /** The [Optional] name of the location. */\n locationName?: string;\n /** The [Optional] address of the location. */\n address?: string;\n /** The latitude of the location. */\n latitude: number;\n /** The longitude of the location. */\n longitude: number;\n}\n\n/** The message template's quick action value information. */\nexport interface MessageTemplateQuickAction extends MessageTemplateValueParent {\n /** Message parameter type is quick action. */\n kind: \"quickAction\";\n /** The [Optional] quick action text */\n text?: string;\n /** The [Optional] quick action payload */\n payload?: string;\n}\n\n/** The binding object to link values to the template specific locations */\nexport interface MessageTemplateBindingsParent {\n kind: MessageTemplateBindingsKind;\n}\n\n/** The template bindings for WhatsApp */\nexport interface WhatsAppMessageTemplateBindings\n extends MessageTemplateBindingsParent {\n /** MessageTemplateBindings is whatsApp */\n kind: \"whatsApp\";\n /** The header template bindings */\n header?: Array<WhatsAppMessageTemplateBindingsComponent>;\n /** The body template bindings */\n body?: Array<WhatsAppMessageTemplateBindingsComponent>;\n /** The footer template bindings */\n footer?: Array<WhatsAppMessageTemplateBindingsComponent>;\n /** The button template bindings */\n buttons?: Array<WhatsAppMessageTemplateBindingsButton>;\n}\n\n/** The template bindings component for WhatsApp */\nexport interface WhatsAppMessageTemplateBindingsComponent {\n /** The name of the referenced item in the template values. */\n refValue: string;\n}\n\n/** The template bindings component button for WhatsApp */\nexport interface WhatsAppMessageTemplateBindingsButton {\n /**\n * The WhatsApp button sub type\n *\n * Possible values: \"quickReply\", \"url\"\n */\n subType: WhatsAppMessageButtonSubType;\n /** The name of the referenced item in the template values. */\n refValue: string;\n}\n\n/** Details of the message to send. */\nexport type NotificationContent =\n | NotificationContentParent\n | TextNotificationContent\n | MediaNotificationContent\n | ImageNotificationContent\n | DocumentNotificationContent\n | VideoNotificationContent\n | AudioNotificationContent\n | ReactionNotificationContent\n | StickerNotificationContent\n | InteractiveNotificationContent\n | TemplateNotificationContent;\n/** The message content object used to create interactive messages components. */\nexport type MessageContent =\n | MessageContentParent\n | TextMessageContent\n | DocumentMessageContent\n | ImageMessageContent\n | VideoMessageContent\n | ButtonSetContent\n | LinkContent\n | ActionGroupContent;\n/** Binding actions to the interactive message. */\nexport type ActionBindings =\n | ActionBindingsParent\n | WhatsAppListActionBindings\n | WhatsAppButtonActionBindings\n | WhatsAppUrlActionBindings;\n/** The class describes a parameter of a template. */\nexport type MessageTemplateValue =\n | MessageTemplateValueParent\n | MessageTemplateText\n | MessageTemplateImage\n | MessageTemplateDocument\n | MessageTemplateVideo\n | MessageTemplateLocation\n | MessageTemplateQuickAction;\n/** The binding object to link values to the template specific locations */\nexport type MessageTemplateBindings =\n | MessageTemplateBindingsParent\n | WhatsAppMessageTemplateBindings;\n/** Alias for CommunicationMessageKind */\nexport type CommunicationMessageKind = string;\n/** Alias for MessageContentKind */\nexport type MessageContentKind = string;\n/** Alias for MessageActionBindingKind */\nexport type MessageActionBindingKind = string;\n/** Alias for MessageTemplateValueKind */\nexport type MessageTemplateValueKind = string;\n/** Alias for MessageTemplateBindingsKind */\nexport type MessageTemplateBindingsKind = string;\n/** Alias for WhatsAppMessageButtonSubType */\nexport type WhatsAppMessageButtonSubType = string;\n"]}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Paged } from "@azure/core-paging";
|
|
2
1
|
/** Result of the send message operation. */
|
|
3
2
|
export interface SendMessageResultOutput {
|
|
4
3
|
/** Receipts of the send message operation. */
|
|
@@ -11,6 +10,13 @@ export interface MessageReceiptOutput {
|
|
|
11
10
|
/** The native external platform user identifier of the recipient. */
|
|
12
11
|
to: string;
|
|
13
12
|
}
|
|
13
|
+
/** Paged collection of MessageTemplateItem items */
|
|
14
|
+
export interface PagedMessageTemplateItemOutput {
|
|
15
|
+
/** The MessageTemplateItem items on this page */
|
|
16
|
+
value: Array<MessageTemplateItemOutput>;
|
|
17
|
+
/** The link to the next page of items */
|
|
18
|
+
nextLink?: string;
|
|
19
|
+
}
|
|
14
20
|
/** The message template as returned from the service. */
|
|
15
21
|
export interface MessageTemplateItemOutputParent {
|
|
16
22
|
/** The template's name. */
|
|
@@ -36,8 +42,6 @@ export interface WhatsAppMessageTemplateItemOutput extends MessageTemplateItemOu
|
|
|
36
42
|
export type MessageTemplateItemOutput = MessageTemplateItemOutputParent | WhatsAppMessageTemplateItemOutput;
|
|
37
43
|
/** Alias for RepeatabilityResultOutput */
|
|
38
44
|
export type RepeatabilityResultOutput = "accepted" | "rejected";
|
|
39
|
-
/** Paged collection of MessageTemplateItem items */
|
|
40
|
-
export type PagedMessageTemplateItemOutput = Paged<MessageTemplateItemOutput>;
|
|
41
45
|
/** Alias for MessageTemplateStatusOutput */
|
|
42
46
|
export type MessageTemplateStatusOutput = string;
|
|
43
47
|
/** Alias for CommunicationMessagesChannelOutput */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/outputModels.ts"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"outputModels.d.ts","sourceRoot":"","sources":["../../../../src/generated/src/outputModels.ts"],"names":[],"mappings":"AAGA,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,8CAA8C;IAC9C,QAAQ,EAAE,KAAK,CAAC,oBAAoB,CAAC,CAAC;CACvC;AAED,0CAA0C;AAC1C,MAAM,WAAW,oBAAoB;IACnC,sBAAsB;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,oDAAoD;AACpD,MAAM,WAAW,8BAA8B;IAC7C,iDAAiD;IACjD,KAAK,EAAE,KAAK,CAAC,yBAAyB,CAAC,CAAC;IACxC,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,yDAAyD;AACzD,MAAM,WAAW,+BAA+B;IAC9C,2BAA2B;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oKAAoK;IACpK,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,MAAM,EAAE,2BAA2B,CAAC;IACpC,IAAI,EAAE,kCAAkC,CAAC;CAC1C;AAED,uDAAuD;AACvD,MAAM,WAAW,iCACf,SAAQ,+BAA+B;IACvC,4FAA4F;IAC5F,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,kDAAkD;IAClD,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,yDAAyD;AACzD,MAAM,MAAM,yBAAyB,GACjC,+BAA+B,GAC/B,iCAAiC,CAAC;AACtC,0CAA0C;AAC1C,MAAM,MAAM,yBAAyB,GAAG,UAAU,GAAG,UAAU,CAAC;AAChE,4CAA4C;AAC5C,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC;AACjD,mDAAmD;AACnD,MAAM,MAAM,kCAAkC,GAAG,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../../../src/generated/src/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\
|
|
1
|
+
{"version":3,"file":"outputModels.js","sourceRoot":"","sources":["../../../../src/generated/src/outputModels.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/** Result of the send message operation. */\nexport interface SendMessageResultOutput {\n /** Receipts of the send message operation. */\n receipts: Array<MessageReceiptOutput>;\n}\n\n/** Receipt of the sending one message. */\nexport interface MessageReceiptOutput {\n /** The message id. */\n messageId: string;\n /** The native external platform user identifier of the recipient. */\n to: string;\n}\n\n/** Paged collection of MessageTemplateItem items */\nexport interface PagedMessageTemplateItemOutput {\n /** The MessageTemplateItem items on this page */\n value: Array<MessageTemplateItemOutput>;\n /** The link to the next page of items */\n nextLink?: string;\n}\n\n/** The message template as returned from the service. */\nexport interface MessageTemplateItemOutputParent {\n /** The template's name. */\n readonly name: string;\n /** The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'. */\n language: string;\n /**\n * The aggregated template status.\n *\n * Possible values: \"approved\", \"rejected\", \"pending\", \"paused\"\n */\n status: MessageTemplateStatusOutput;\n kind: CommunicationMessagesChannelOutput;\n}\n\n/** The WhatsApp-specific template response contract */\nexport interface WhatsAppMessageTemplateItemOutput\n extends MessageTemplateItemOutputParent {\n /** WhatsApp platform's template content. This is the payload returned from WhatsApp API. */\n content?: any;\n /** Message template response type is whatsApp. */\n kind: \"whatsApp\";\n}\n\n/** The message template as returned from the service. */\nexport type MessageTemplateItemOutput =\n | MessageTemplateItemOutputParent\n | WhatsAppMessageTemplateItemOutput;\n/** Alias for RepeatabilityResultOutput */\nexport type RepeatabilityResultOutput = \"accepted\" | \"rejected\";\n/** Alias for MessageTemplateStatusOutput */\nexport type MessageTemplateStatusOutput = string;\n/** Alias for CommunicationMessagesChannelOutput */\nexport type CommunicationMessagesChannelOutput = string;\n"]}
|