@bisondesk/core-sdk 1.0.76 → 1.0.78

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.
@@ -1,4 +1,5 @@
1
1
  export declare const APP_LANGUAGES_PICKLIST_ID = "appLanguages";
2
+ export declare const CLIENT_LANGUAGES_PICKLIST_ID = "clientLanguages";
2
3
  export declare const TIMEZONES_PICKLIST_ID = "timezones";
3
4
  export declare const COUNTRIES_PICKLIST_ID = "countries";
4
5
  export declare const BODYWORKS_PICKLIST_ID = "bodywork";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,yBAAyB,iBAAiB,CAAC;AACxD,eAAO,MAAM,qBAAqB,cAAc,CAAC;AACjD,eAAO,MAAM,qBAAqB,cAAc,CAAC;AAKjD,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAChD,eAAO,MAAM,kBAAkB,UAAU,CAAC;AAC1C,eAAO,MAAM,sBAAsB,aAAa,CAAC;AACjD,eAAO,MAAM,0BAA0B,kBAAkB,CAAC;AAC1D,eAAO,MAAM,qBAAqB,aAAa,CAAC;AAChD,eAAO,MAAM,yBAAyB,YAAY,CAAC;AACnD,eAAO,MAAM,iBAAiB,SAAS,CAAC;AACxC,eAAO,MAAM,uBAAuB,eAAe,CAAC;AACpD,eAAO,MAAM,uBAAuB,eAAe,CAAC;AACpD,eAAO,MAAM,wBAAwB,YAAY,CAAC;AAKlD,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,aAAa,kBAAkB;IAC/B,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,KAAK,UAAU;IACf,gBAAgB,sBAAsB;CACvC;AAKD,oBAAY,UAAU;IACpB,WAAW,iBAAiB;IAC5B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,WAAW,iBAAiB;IAC5B,GAAG,QAAQ;IACX,OAAO,YAAY;CACpB;AAKD,e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;CACpB;AAKD,eAAO,MAAM,iBAAiB,QAAS,CAAC;AACxC,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAKnC,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAC3C,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAK9C,eAAO,MAAM,OAAO,KAAK,CAAC;AAC1B,eAAO,MAAM,MAAM,UAAY,CAAC;AAChC,eAAO,MAAM,SAAS,SAAU,CAAC;AACjC,eAAO,MAAM,cAAc,OAAO,CAAC;AACnC,eAAO,MAAM,WAAW,SAAU,CAAC"}
package/lib/constants.js CHANGED
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.KM_ROUNDING = exports.PRICE_ROUNDING = exports.MAX_PRICE = exports.MAX_KM = exports.MAX_AGE = exports.FILTER_MULTIPLE_SEPARATOR = exports.FILTER_RANGE_SEPARATOR = exports.MIN_SORT_PRIORITY = exports.MAX_SORT_PRIORITY = exports.Categories = exports.BusinessEntityIds = exports.ORG_SEGMENTS_PICKLIST_ID = exports.SUSPENSIONS_PICKLIST_ID = exports.MAKE_MODELS_PICKLIST_ID = exports.MAKES_PICKLIST_ID = exports.TRANSMISSIONS_PICKLIST_ID = exports.EURONORMS_PICKLIST_ID = exports.CONFIGURATIONS_PICKLIST_ID = exports.CATEGORIES_PICKLIST_ID = exports.CABINS_PICKLIST_ID = exports.BODYWORKS_PICKLIST_ID = exports.COUNTRIES_PICKLIST_ID = exports.TIMEZONES_PICKLIST_ID = exports.APP_LANGUAGES_PICKLIST_ID = void 0;
3
+ exports.KM_ROUNDING = exports.PRICE_ROUNDING = exports.MAX_PRICE = exports.MAX_KM = exports.MAX_AGE = exports.FILTER_MULTIPLE_SEPARATOR = exports.FILTER_RANGE_SEPARATOR = exports.MIN_SORT_PRIORITY = exports.MAX_SORT_PRIORITY = exports.Categories = exports.BusinessEntityIds = exports.ORG_SEGMENTS_PICKLIST_ID = exports.SUSPENSIONS_PICKLIST_ID = exports.MAKE_MODELS_PICKLIST_ID = exports.MAKES_PICKLIST_ID = exports.TRANSMISSIONS_PICKLIST_ID = exports.EURONORMS_PICKLIST_ID = exports.CONFIGURATIONS_PICKLIST_ID = exports.CATEGORIES_PICKLIST_ID = exports.CABINS_PICKLIST_ID = exports.BODYWORKS_PICKLIST_ID = exports.COUNTRIES_PICKLIST_ID = exports.TIMEZONES_PICKLIST_ID = exports.CLIENT_LANGUAGES_PICKLIST_ID = exports.APP_LANGUAGES_PICKLIST_ID = void 0;
4
4
  //
5
5
  // STATIC PICKLIST IDS
6
6
  //
7
7
  exports.APP_LANGUAGES_PICKLIST_ID = 'appLanguages';
8
+ exports.CLIENT_LANGUAGES_PICKLIST_ID = 'clientLanguages';
8
9
  exports.TIMEZONES_PICKLIST_ID = 'timezones';
9
10
  exports.COUNTRIES_PICKLIST_ID = 'countries';
10
11
  //
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAA,EAAE;AACF,sBAAsB;AACtB,EAAE;AACW,QAAA,yBAAyB,GAAG,cAAc,CAAC;AAC3C,QAAA,qBAAqB,GAAG,WAAW,CAAC;AACpC,QAAA,qBAAqB,GAAG,WAAW,CAAC;AAEjD,EAAE;AACF,oCAAoC;AACpC,EAAE;AACW,QAAA,qBAAqB,GAAG,UAAU,CAAC;AACnC,QAAA,kBAAkB,GAAG,OAAO,CAAC;AAC7B,QAAA,sBAAsB,GAAG,UAAU,CAAC;AACpC,QAAA,0BAA0B,GAAG,eAAe,CAAC;AAC7C,QAAA,qBAAqB,GAAG,UAAU,CAAC;AACnC,QAAA,yBAAyB,GAAG,SAAS,CAAC;AACtC,QAAA,iBAAiB,GAAG,MAAM,CAAC;AAC3B,QAAA,uBAAuB,GAAG,YAAY,CAAC;AACvC,QAAA,uBAAuB,GAAG,YAAY,CAAC;AACvC,QAAA,wBAAwB,GAAG,SAAS,CAAC;AAElD,EAAE;AACF,uCAAuC;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QAAA,SAAS,GAAG,MAAO,CAAC;AACpB,QAAA,cAAc,GAAG,IAAI,CAAC;AACtB,QAAA,WAAW,GAAG,MAAO,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { AttachmentValue } from './fields';
2
+ export declare type EmailAddress = {
3
+ name?: string;
4
+ email: string;
5
+ };
6
+ export declare type EmailDestination = EmailAddress & {
7
+ organizationId?: string;
8
+ contactId?: string;
9
+ addressType: 'TO' | 'CC' | 'BCC';
10
+ };
11
+ export declare type EmailContent = {
12
+ subject: string;
13
+ body: {
14
+ text?: string;
15
+ html?: string;
16
+ };
17
+ };
18
+ export declare type EmailMessage = {
19
+ id: string;
20
+ sentAt: string;
21
+ content?: AttachmentValue;
22
+ subject: string;
23
+ source: EmailAddress;
24
+ replyTo?: EmailAddress;
25
+ destinations: EmailDestination[];
26
+ };
27
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/types/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,oBAAY,YAAY,GAAG;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,oBAAY,gBAAgB,GAAG,YAAY,GAAG;IAC5C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,IAAI,GAAG,IAAI,GAAG,KAAK,CAAC;CAClC,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF,oBAAY,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,gBAAgB,EAAE,CAAC;CAClC,CAAC"}
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=communications.js.map
3
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/types/messages.ts"],"names":[],"mappings":""}
@@ -13,19 +13,21 @@ export declare type TemplateContent = {
13
13
  type: TemplateType.Sms;
14
14
  content: string;
15
15
  };
16
- export declare type Template = {
17
- modifiedAt: string;
18
- modifiedBy: string;
19
- id: string;
16
+ export declare type NewTemplateRequest = {
17
+ id?: string;
20
18
  language: string;
21
19
  name: string;
22
20
  } & TemplateContent;
21
+ export declare type Template = {
22
+ id: string;
23
+ modifiedAt: string;
24
+ modifiedBy: string;
25
+ } & Omit<NewTemplateRequest, 'id'>;
23
26
  export declare type TemplateInfo = {
24
27
  id: string;
25
- name: string;
26
28
  langs: string[];
27
29
  modifiedAt: string;
28
- modifiedBy: string;
30
+ name: string;
29
31
  type: TemplateType;
30
32
  };
31
33
  //# sourceMappingURL=templates.d.ts.map
@@ -1 +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,EA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CAAC;IACX,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,CAAC;CACpB,CAAC"}
@@ -4,7 +4,7 @@ export declare type Tenant = {
4
4
  country: string;
5
5
  region: Region;
6
6
  name: string;
7
- languages: string[];
7
+ languages: [string, ...string[]];
8
8
  subdomain: string;
9
9
  currency: string;
10
10
  hyperdmsIds?: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"tenants.d.ts","sourceRoot":"","sources":["../../src/types/tenants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D,oBAAY,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAIxB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC3C,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;CAClC,CAAC"}
1
+ {"version":3,"file":"tenants.d.ts","sourceRoot":"","sources":["../../src/types/tenants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAE1D,oBAAY,MAAM,GAAG;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,CAAC,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CAIxB,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,oBAAY,kBAAkB,GAAG;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC3C,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;CAClC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bisondesk/core-sdk",
3
- "version": "1.0.76",
3
+ "version": "1.0.78",
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.76",
14
+ "@bisondesk/commons-sdk": "1.0.78",
15
15
  "joi": "17.4.0",
16
16
  "lru-cache": "6.0.0"
17
17
  },
package/src/constants.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  // STATIC PICKLIST IDS
3
3
  //
4
4
  export const APP_LANGUAGES_PICKLIST_ID = 'appLanguages';
5
+ export const CLIENT_LANGUAGES_PICKLIST_ID = 'clientLanguages';
5
6
  export const TIMEZONES_PICKLIST_ID = 'timezones';
6
7
  export const COUNTRIES_PICKLIST_ID = 'countries';
7
8
 
@@ -0,0 +1,30 @@
1
+ import { AttachmentValue } from './fields';
2
+
3
+ export type EmailAddress = {
4
+ name?: string;
5
+ email: string;
6
+ };
7
+
8
+ export type EmailDestination = EmailAddress & {
9
+ organizationId?: string;
10
+ contactId?: string;
11
+ addressType: 'TO' | 'CC' | 'BCC';
12
+ };
13
+
14
+ export type EmailContent = {
15
+ subject: string;
16
+ body: {
17
+ text?: string;
18
+ html?: string;
19
+ };
20
+ };
21
+
22
+ export type EmailMessage = {
23
+ id: string;
24
+ sentAt: string;
25
+ content?: AttachmentValue;
26
+ subject: string;
27
+ source: EmailAddress;
28
+ replyTo?: EmailAddress;
29
+ destinations: EmailDestination[];
30
+ };
@@ -17,19 +17,22 @@ export type TemplateContent =
17
17
  content: string;
18
18
  };
19
19
 
20
- export type Template = {
21
- modifiedAt: string;
22
- modifiedBy: string;
23
- id: string;
20
+ export type NewTemplateRequest = {
21
+ id?: string;
24
22
  language: string;
25
23
  name: string;
26
24
  } & TemplateContent;
27
25
 
26
+ export type Template = {
27
+ id: string;
28
+ modifiedAt: string;
29
+ modifiedBy: string;
30
+ } & Omit<NewTemplateRequest, 'id'>;
31
+
28
32
  export type TemplateInfo = {
29
33
  id: string;
30
- name: string;
31
34
  langs: string[];
32
35
  modifiedAt: string;
33
- modifiedBy: string;
36
+ name: string;
34
37
  type: TemplateType;
35
38
  };
@@ -5,7 +5,7 @@ export type Tenant = {
5
5
  country: string;
6
6
  region: Region;
7
7
  name: string;
8
- languages: string[];
8
+ languages: [string, ...string[]];
9
9
  subdomain: string;
10
10
  currency: string;
11
11
  hyperdmsIds?: string[];
@@ -217,8 +217,8 @@
217
217
  "affectsGlobalScope": true
218
218
  },
219
219
  "./src/constants.ts": {
220
- "version": "a9f12e9bacc0b38859c78f7f354917e6eb799061962e4b91b72c8c274d481ede",
221
- "signature": "53e963e9a17267d08cab83fa8f84e59b7afe01074ae35ef8874473028267d3ee",
220
+ "version": "79b80767fba232e4869f9681fb975e8b6e389b5b7a92e15700e58a44f9437d97",
221
+ "signature": "72c6c86a443f3ba4d7d3ec15eb6cce0f734f993926526267485efff60537c0bf",
222
222
  "affectsGlobalScope": false
223
223
  },
224
224
  "../commons-sdk/lib/constants.d.ts": {
@@ -552,8 +552,8 @@
552
552
  "affectsGlobalScope": false
553
553
  },
554
554
  "./src/types/tenants.ts": {
555
- "version": "0859e967abd2bb3d8fab912adc21dc1e328f0ebcd5c5abd6b1453bc0951b822c",
556
- "signature": "4809391323223d10461e64f7fd3f3456e6e65faa821a2a8b562ce365c4b31c49",
555
+ "version": "c3dd529bcf161d36a15ad60cea7a80c947bfe9552ec66f86487f1ebac511e8fc",
556
+ "signature": "c0c981bec5611293c7184327dcb45ae7b3b437bf57cea678f1984555d275e301",
557
557
  "affectsGlobalScope": false
558
558
  },
559
559
  "./src/apis/tenants.ts": {
@@ -566,11 +566,6 @@
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
- },
574
569
  "./src/types/conversations.ts": {
575
570
  "version": "64f6e1c8acfb1c799b8a23c561626ff5b8821734281f6b7b825806026c5f18ac",
576
571
  "signature": "e69c84342201dc3f03f3b6e3c279cf09238d40f600fd22a7e9454e08d01039fa",
@@ -586,6 +581,11 @@
586
581
  "signature": "f4af600607e1048634ccf83432a8284f0272d1819cfe32f86a8355d9d588f55f",
587
582
  "affectsGlobalScope": false
588
583
  },
584
+ "./src/types/messages.ts": {
585
+ "version": "443636a4de3a7277ed17a7325b9455f7b34f6e43509a3db787f65e280ec58518",
586
+ "signature": "b055b3ed1956e219510a926a26d69a16253469c71840e3fb31b30dea56f926fb",
587
+ "affectsGlobalScope": false
588
+ },
589
589
  "./src/types/picklists.ts": {
590
590
  "version": "8eaf2e2385ef63e1eaebec5359df54120bc05459bcc8d1967b2467ac25d6478a",
591
591
  "signature": "b489153b83dc8d84f3c382c297a7d52d3c7dcfad31ac1d21a5b2e76f58ffbb28",
@@ -602,8 +602,8 @@
602
602
  "affectsGlobalScope": false
603
603
  },
604
604
  "./src/types/templates.ts": {
605
- "version": "b16f14e12b11c1e3f85c86d6c626ab6ee82ba65959268485194a18c17efc6c18",
606
- "signature": "7bcad107ed474d228f94783520d07674529e209f4ae1f39fae652b8ecd4b9096",
605
+ "version": "e51032194982412fcaf46e4c184d1d13908ad7e4ead3df25dab1d441bfaec578",
606
+ "signature": "f545ffe7f042c7301023c8342bbb63abdfbaca38e2592a5f7a08c79b67292373",
607
607
  "affectsGlobalScope": false
608
608
  },
609
609
  "./src/types/users.ts": {
@@ -2098,6 +2098,9 @@
2098
2098
  "./src/types/definitions.ts",
2099
2099
  "./src/types/vehicles.ts"
2100
2100
  ],
2101
+ "./src/types/messages.ts": [
2102
+ "./src/types/fields.ts"
2103
+ ],
2101
2104
  "./src/types/picklists.ts": [
2102
2105
  "../commons-sdk/lib/types.d.ts"
2103
2106
  ],
@@ -2947,6 +2950,9 @@
2947
2950
  "./src/types/definitions.ts",
2948
2951
  "./src/types/vehicles.ts"
2949
2952
  ],
2953
+ "./src/types/messages.ts": [
2954
+ "./src/types/fields.ts"
2955
+ ],
2950
2956
  "./src/types/picklists.ts": [
2951
2957
  "../commons-sdk/lib/types.d.ts"
2952
2958
  ],
@@ -3198,7 +3204,6 @@
3198
3204
  "./src/apis/utils.ts",
3199
3205
  "./src/apis/vehicles.ts",
3200
3206
  "./src/constants.ts",
3201
- "./src/types/communications.ts",
3202
3207
  "./src/types/conversations.ts",
3203
3208
  "./src/types/crm.ts",
3204
3209
  "./src/types/definitions.ts",
@@ -3206,6 +3211,7 @@
3206
3211
  "./src/types/fields.ts",
3207
3212
  "./src/types/leads.ts",
3208
3213
  "./src/types/leasing.ts",
3214
+ "./src/types/messages.ts",
3209
3215
  "./src/types/picklists.ts",
3210
3216
  "./src/types/search.ts",
3211
3217
  "./src/types/settings.ts",
@@ -1,16 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"communications.js","sourceRoot":"","sources":["../../src/types/communications.ts"],"names":[],"mappings":""}
@@ -1,16 +0,0 @@
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
- };