@bisondesk/core-sdk 1.0.75 → 1.0.77
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/types/communications.d.ts +16 -0
- package/lib/types/communications.d.ts.map +1 -0
- package/lib/types/communications.js +3 -0
- package/lib/types/communications.js.map +1 -0
- package/lib/types/templates.d.ts +33 -0
- package/lib/types/templates.d.ts.map +1 -0
- package/lib/types/templates.js +9 -0
- package/lib/types/templates.js.map +1 -0
- package/package.json +2 -2
- package/src/types/communications.ts +16 -0
- package/src/types/templates.ts +38 -0
- package/tsconfig.tsbuildinfo +12 -0
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"communications.js","sourceRoot":"","sources":["../../src/types/communications.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 NewTemplateRequest = {
|
|
17
|
+
id?: string;
|
|
18
|
+
language: string;
|
|
19
|
+
name: string;
|
|
20
|
+
} & TemplateContent;
|
|
21
|
+
export declare type Template = {
|
|
22
|
+
id: string;
|
|
23
|
+
modifiedAt: string;
|
|
24
|
+
modifiedBy: string;
|
|
25
|
+
} & Omit<NewTemplateRequest, 'id'>;
|
|
26
|
+
export declare type TemplateInfo = {
|
|
27
|
+
id: string;
|
|
28
|
+
langs: string[];
|
|
29
|
+
modifiedAt: string;
|
|
30
|
+
name: string;
|
|
31
|
+
type: TemplateType;
|
|
32
|
+
};
|
|
33
|
+
//# 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,kBAAkB,GAAG;IAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,eAAe,CAAC;AAEpB,oBAAY,QAAQ,GAAG;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;AAEnC,oBAAY,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,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.
|
|
3
|
+
"version": "1.0.77",
|
|
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.
|
|
14
|
+
"@bisondesk/commons-sdk": "1.0.77",
|
|
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,38 @@
|
|
|
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 NewTemplateRequest = {
|
|
21
|
+
id?: string;
|
|
22
|
+
language: string;
|
|
23
|
+
name: string;
|
|
24
|
+
} & TemplateContent;
|
|
25
|
+
|
|
26
|
+
export type Template = {
|
|
27
|
+
id: string;
|
|
28
|
+
modifiedAt: string;
|
|
29
|
+
modifiedBy: string;
|
|
30
|
+
} & Omit<NewTemplateRequest, 'id'>;
|
|
31
|
+
|
|
32
|
+
export type TemplateInfo = {
|
|
33
|
+
id: string;
|
|
34
|
+
langs: string[];
|
|
35
|
+
modifiedAt: string;
|
|
36
|
+
name: string;
|
|
37
|
+
type: TemplateType;
|
|
38
|
+
};
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -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": "e51032194982412fcaf46e4c184d1d13908ad7e4ead3df25dab1d441bfaec578",
|
|
606
|
+
"signature": "f545ffe7f042c7301023c8342bbb63abdfbaca38e2592a5f7a08c79b67292373",
|
|
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",
|