@bisondesk/core-sdk 1.0.75 → 1.0.76

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.
@@ -0,0 +1,16 @@
1
+ export declare type CommunicationDestination = {
2
+ organizationId: string;
3
+ contactId: string;
4
+ type: 'sms' | 'email';
5
+ target: string;
6
+ };
7
+ export declare type Communication = {
8
+ templateId: string;
9
+ templateModifiedAt: number;
10
+ templateLanguage: string;
11
+ id: string;
12
+ createdAt: string;
13
+ content: string;
14
+ destinations: CommunicationDestination[];
15
+ };
16
+ //# sourceMappingURL=communications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"communications.d.ts","sourceRoot":"","sources":["../../src/types/communications.ts"],"names":[],"mappings":"AAAA,oBAAY,wBAAwB,GAAG;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,wBAAwB,EAAE,CAAC;CAC1C,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=communications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"communications.js","sourceRoot":"","sources":["../../src/types/communications.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ export declare enum TemplateType {
2
+ Email = "email",
3
+ Sms = "sms"
4
+ }
5
+ export declare type TemplateContent = {
6
+ type: TemplateType.Email;
7
+ subject: string;
8
+ content: {
9
+ html: string;
10
+ design: any;
11
+ };
12
+ } | {
13
+ type: TemplateType.Sms;
14
+ content: string;
15
+ };
16
+ export declare type Template = {
17
+ modifiedAt: string;
18
+ modifiedBy: string;
19
+ id: string;
20
+ language: string;
21
+ name: string;
22
+ } & TemplateContent;
23
+ export declare type TemplateInfo = {
24
+ id: string;
25
+ name: string;
26
+ langs: string[];
27
+ modifiedAt: string;
28
+ modifiedBy: string;
29
+ type: TemplateType;
30
+ };
31
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/types/templates.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,KAAK,UAAU;IACf,GAAG,QAAQ;CACZ;AAED,oBAAY,eAAe,GACvB;IACE,IAAI,EAAE,YAAY,CAAC,KAAK,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,EAAE,GAAG,CAAC;KACb,CAAC;CACH,GACD;IACE,IAAI,EAAE,YAAY,CAAC,GAAG,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,oBAAY,QAAQ,GAAG;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,eAAe,CAAC;AAEpB,oBAAY,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TemplateType = void 0;
4
+ var TemplateType;
5
+ (function (TemplateType) {
6
+ TemplateType["Email"] = "email";
7
+ TemplateType["Sms"] = "sms";
8
+ })(TemplateType = exports.TemplateType || (exports.TemplateType = {}));
9
+ //# sourceMappingURL=templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/types/templates.ts"],"names":[],"mappings":";;;AAAA,IAAY,YAGX;AAHD,WAAY,YAAY;IACtB,+BAAe,CAAA;IACf,2BAAW,CAAA;AACb,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bisondesk/core-sdk",
3
- "version": "1.0.75",
3
+ "version": "1.0.76",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "clean": "rm -rf build dist lib *.tsbuildinfo",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "author": "Ivo Anastácio",
13
13
  "dependencies": {
14
- "@bisondesk/commons-sdk": "1.0.75",
14
+ "@bisondesk/commons-sdk": "1.0.76",
15
15
  "joi": "17.4.0",
16
16
  "lru-cache": "6.0.0"
17
17
  },
@@ -0,0 +1,16 @@
1
+ export type CommunicationDestination = {
2
+ organizationId: string;
3
+ contactId: string;
4
+ type: 'sms' | 'email';
5
+ target: string; // the contact's phone number in E164 format or email
6
+ };
7
+
8
+ export type Communication = {
9
+ templateId: string;
10
+ templateModifiedAt: number;
11
+ templateLanguage: string;
12
+ id: string;
13
+ createdAt: string;
14
+ content: string;
15
+ destinations: CommunicationDestination[];
16
+ };
@@ -0,0 +1,35 @@
1
+ export enum TemplateType {
2
+ Email = 'email',
3
+ Sms = 'sms',
4
+ }
5
+
6
+ export type TemplateContent =
7
+ | {
8
+ type: TemplateType.Email;
9
+ subject: string;
10
+ content: {
11
+ html: string;
12
+ design: any;
13
+ };
14
+ }
15
+ | {
16
+ type: TemplateType.Sms;
17
+ content: string;
18
+ };
19
+
20
+ export type Template = {
21
+ modifiedAt: string;
22
+ modifiedBy: string;
23
+ id: string;
24
+ language: string;
25
+ name: string;
26
+ } & TemplateContent;
27
+
28
+ export type TemplateInfo = {
29
+ id: string;
30
+ name: string;
31
+ langs: string[];
32
+ modifiedAt: string;
33
+ modifiedBy: string;
34
+ type: TemplateType;
35
+ };
@@ -566,6 +566,11 @@
566
566
  "signature": "b715c10ba458f9f3de7c97f3f74122bc1e4e28747a09e966b99bfb1180e58853",
567
567
  "affectsGlobalScope": false
568
568
  },
569
+ "./src/types/communications.ts": {
570
+ "version": "ddc8a4abf653b461063a1ee61ee1e5a36c68884d1539d05bfee547d1313e64bc",
571
+ "signature": "e6f498f5bdc6bf5e4f1d10fe9f348cf0e003759422a36d755ad9858bb1231c9a",
572
+ "affectsGlobalScope": false
573
+ },
569
574
  "./src/types/conversations.ts": {
570
575
  "version": "64f6e1c8acfb1c799b8a23c561626ff5b8821734281f6b7b825806026c5f18ac",
571
576
  "signature": "e69c84342201dc3f03f3b6e3c279cf09238d40f600fd22a7e9454e08d01039fa",
@@ -596,6 +601,11 @@
596
601
  "signature": "88a781f968c85ed8359ad428b167e98b3ec50d75d2ddf317164f6173082dda4a",
597
602
  "affectsGlobalScope": false
598
603
  },
604
+ "./src/types/templates.ts": {
605
+ "version": "b16f14e12b11c1e3f85c86d6c626ab6ee82ba65959268485194a18c17efc6c18",
606
+ "signature": "7bcad107ed474d228f94783520d07674529e209f4ae1f39fae652b8ecd4b9096",
607
+ "affectsGlobalScope": false
608
+ },
599
609
  "./src/types/users.ts": {
600
610
  "version": "7ebc0d856c4c4a0f218ecf0c3dca9103cdc6ec1e94d8f7cc57c378af11207c71",
601
611
  "signature": "8498aad47ce75ed30d7360634bda5f327c5b0ff28adabec1e4d9be1ddcd5d0a2",
@@ -3188,6 +3198,7 @@
3188
3198
  "./src/apis/utils.ts",
3189
3199
  "./src/apis/vehicles.ts",
3190
3200
  "./src/constants.ts",
3201
+ "./src/types/communications.ts",
3191
3202
  "./src/types/conversations.ts",
3192
3203
  "./src/types/crm.ts",
3193
3204
  "./src/types/definitions.ts",
@@ -3199,6 +3210,7 @@
3199
3210
  "./src/types/search.ts",
3200
3211
  "./src/types/settings.ts",
3201
3212
  "./src/types/storage.ts",
3213
+ "./src/types/templates.ts",
3202
3214
  "./src/types/tenants.ts",
3203
3215
  "./src/types/users.ts",
3204
3216
  "./src/types/utils.ts",