@bisondesk/commons-sdk 1.0.347 → 1.0.349
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/lib/apis/picklists.js.map +1 -1
- package/lib/constants.js +3 -3
- package/lib/constants.js.map +1 -1
- package/lib/errors.js.map +1 -1
- package/lib/fetch.d.ts +1 -0
- package/lib/fetch.d.ts.map +1 -1
- package/lib/fetch.js.map +1 -1
- package/lib/fields.js +2 -2
- package/lib/fields.js.map +1 -1
- package/lib/formatting.d.ts +2 -2
- package/lib/formatting.d.ts.map +1 -1
- package/lib/ids.js +1 -1
- package/lib/ids.js.map +1 -1
- package/lib/location-utils.js.map +1 -1
- package/lib/locations.js +1 -1
- package/lib/locations.js.map +1 -1
- package/lib/notifications-whatsapp.d.ts +48 -0
- package/lib/notifications-whatsapp.d.ts.map +1 -0
- package/lib/notifications-whatsapp.js +9 -0
- package/lib/notifications-whatsapp.js.map +1 -0
- package/lib/notifications.js +3 -3
- package/lib/notifications.js.map +1 -1
- package/lib/search.js +5 -5
- package/lib/search.js.map +1 -1
- package/lib/servers.js +1 -1
- package/lib/servers.js.map +1 -1
- package/lib/storage.js +2 -2
- package/lib/storage.js.map +1 -1
- package/lib/tasks.js +2 -2
- package/lib/tasks.js.map +1 -1
- package/lib/types.js +2 -2
- package/lib/types.js.map +1 -1
- package/lib/utils.js +1 -1
- package/lib/utils.js.map +1 -1
- package/package.json +1 -1
- package/src/notifications-whatsapp.ts +48 -0
- package/tsconfig.deploy.tsbuildinfo +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export enum WhatsappTemplateType {
|
|
2
|
+
DOCUMENT = 'DOCUMENT',
|
|
3
|
+
IMAGE = 'IMAGE',
|
|
4
|
+
VIDEO = 'VIDEO',
|
|
5
|
+
TEXT = 'TEXT',
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type WhatsappNotificationMessage = {
|
|
9
|
+
tenantId: string;
|
|
10
|
+
templateId: string;
|
|
11
|
+
language?: string;
|
|
12
|
+
dedupId?: string;
|
|
13
|
+
destination: {
|
|
14
|
+
phone: string;
|
|
15
|
+
name?: string;
|
|
16
|
+
};
|
|
17
|
+
} & (
|
|
18
|
+
| {
|
|
19
|
+
format: WhatsappTemplateType.DOCUMENT;
|
|
20
|
+
templateParams: {
|
|
21
|
+
filename: string;
|
|
22
|
+
link: string;
|
|
23
|
+
[param: string]: string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
| {
|
|
27
|
+
format: WhatsappTemplateType.IMAGE | WhatsappTemplateType.VIDEO;
|
|
28
|
+
templateParams: {
|
|
29
|
+
link: string;
|
|
30
|
+
[param: string]: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
| {
|
|
34
|
+
format: WhatsappTemplateType.TEXT;
|
|
35
|
+
templateParams: {
|
|
36
|
+
[param: string]: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export const WHATSAPP_NOTIFICATION_SETTINGS_ID = 'whatsapp-notification';
|
|
42
|
+
|
|
43
|
+
export type WhatsappNotificationSettings = {
|
|
44
|
+
whatsappPlugin: { identifier: string; key: string };
|
|
45
|
+
bisondeskPlugin: { identifier: string; key: string };
|
|
46
|
+
websiteId: string;
|
|
47
|
+
originNumber: string;
|
|
48
|
+
};
|