@bisondesk/core-sdk 1.0.14 → 1.0.16

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,3 +1,5 @@
1
+ import { PhoneNumberValue } from './fields';
2
+ import { VehicleInterest } from './interests';
1
3
  export declare type Organization = {
2
4
  countryCode: string;
3
5
  createdAt: string;
@@ -12,4 +14,35 @@ export declare type Organization = {
12
14
  export declare type SearchOrganization = {
13
15
  org: Partial<Organization>;
14
16
  };
17
+ export declare type SearchContact = {
18
+ org: Partial<Organization>;
19
+ contact: Partial<Contact>;
20
+ };
21
+ export declare type Contact = {
22
+ id: string;
23
+ organizationId: string;
24
+ accountManager?: string;
25
+ language?: string;
26
+ firstName?: string;
27
+ lastName: string;
28
+ createdAt: string;
29
+ createdBy: string;
30
+ phones: PhoneNumberValue[];
31
+ emails: string[];
32
+ job?: string;
33
+ };
34
+ export declare type LeadContact = {
35
+ accountManager: string;
36
+ companyName?: string;
37
+ country: string;
38
+ email?: string;
39
+ language?: string;
40
+ name: string;
41
+ phone?: PhoneNumberValue;
42
+ remarks?: string;
43
+ };
44
+ export declare type Lead = {
45
+ contact: LeadContact;
46
+ interests: VehicleInterest[];
47
+ };
15
48
  //# sourceMappingURL=crm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"crm.d.ts","sourceRoot":"","sources":["../../src/types/crm.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,GAAG,YAAY,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,oBAAY,kB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,WAAW,GAAG;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,IAAI,GAAG;IACjB,OAAO,EAAE,WAAW,CAAC;IACrB,SAAS,EAAE,eAAe,EAAE,CAAC;CAC9B,CAAC"}
@@ -0,0 +1,34 @@
1
+ export declare type VehicleInterest = {
2
+ adr?: boolean;
3
+ ageRange?: {
4
+ min: number;
5
+ max: number;
6
+ };
7
+ axleConfigurations?: string[];
8
+ bodywork?: string;
9
+ category: string;
10
+ crane?: boolean;
11
+ damaged?: boolean;
12
+ emissionsRange?: {
13
+ min: number;
14
+ max: number;
15
+ };
16
+ horsepowerRange?: {
17
+ min: number;
18
+ max: number;
19
+ };
20
+ kilometersRange?: {
21
+ min: number;
22
+ max: number;
23
+ };
24
+ makes?: string[];
25
+ models?: string[];
26
+ priceRange?: {
27
+ min: number;
28
+ max: number;
29
+ };
30
+ retarderIntarder?: boolean;
31
+ suspensions?: string[];
32
+ tailgate?: boolean;
33
+ };
34
+ //# sourceMappingURL=interests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interests.d.ts","sourceRoot":"","sources":["../../src/types/interests.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe,GAAG;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACxC,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC9C,eAAe,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,eAAe,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=interests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interests.js","sourceRoot":"","sources":["../../src/types/interests.ts"],"names":[],"mappings":""}
@@ -8,6 +8,10 @@ export declare type NewPicklistValue = {
8
8
  customId?: string;
9
9
  sortPriority?: number;
10
10
  titles: MultiLangValue;
11
+ dependency?: {
12
+ fieldId: string;
13
+ values: string[];
14
+ };
11
15
  };
12
16
  export declare type PicklistValue = NewPicklistValue & {
13
17
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"picklists.d.ts","sourceRoot":"","sources":["../../src/types/picklists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAKlE,oBAAY,0BAA0B,GAAG;IAC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  "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",
14
+ "@bisondesk/commons-sdk": "^1.0.16",
15
15
  "joi": "17.4.0"
16
16
  },
17
17
  "devDependencies": {
package/src/types/crm.ts CHANGED
@@ -1,3 +1,6 @@
1
+ import { PhoneNumberValue } from './fields';
2
+ import { VehicleInterest } from './interests';
3
+
1
4
  export type Organization = {
2
5
  countryCode: string;
3
6
  createdAt: string;
@@ -13,3 +16,38 @@ export type Organization = {
13
16
  export type SearchOrganization = {
14
17
  org: Partial<Organization>;
15
18
  };
19
+
20
+ export type SearchContact = {
21
+ org: Partial<Organization>;
22
+ contact: Partial<Contact>;
23
+ };
24
+
25
+ export type Contact = {
26
+ id: string;
27
+ organizationId: string;
28
+ accountManager?: string;
29
+ language?: string;
30
+ firstName?: string;
31
+ lastName: string;
32
+ createdAt: string;
33
+ createdBy: string;
34
+ phones: PhoneNumberValue[];
35
+ emails: string[];
36
+ job?: string;
37
+ };
38
+
39
+ export type LeadContact = {
40
+ accountManager: string;
41
+ companyName?: string;
42
+ country: string;
43
+ email?: string;
44
+ language?: string;
45
+ name: string;
46
+ phone?: PhoneNumberValue;
47
+ remarks?: string;
48
+ };
49
+
50
+ export type Lead = {
51
+ contact: LeadContact;
52
+ interests: VehicleInterest[];
53
+ };
@@ -0,0 +1,18 @@
1
+ export type VehicleInterest = {
2
+ adr?: boolean;
3
+ ageRange?: { min: number; max: number };
4
+ axleConfigurations?: string[];
5
+ bodywork?: string;
6
+ category: string;
7
+ crane?: boolean;
8
+ damaged?: boolean;
9
+ emissionsRange?: { min: number; max: number };
10
+ horsepowerRange?: { min: number; max: number };
11
+ kilometersRange?: { min: number; max: number };
12
+ makes?: string[];
13
+ models?: string[];
14
+ priceRange?: { min: number; max: number };
15
+ retarderIntarder?: boolean;
16
+ suspensions?: string[];
17
+ tailgate?: boolean;
18
+ };
@@ -12,6 +12,10 @@ export type NewPicklistValue = {
12
12
  customId?: string;
13
13
  sortPriority?: number;
14
14
  titles: MultiLangValue;
15
+ dependency?: {
16
+ fieldId: string;
17
+ values: string[];
18
+ };
15
19
  };
16
20
  export type PicklistValue = NewPicklistValue & {
17
21
  id: string;
@@ -221,11 +221,6 @@
221
221
  "signature": "c20d2c34fda1657c54c6da833623aabfae503c6f9b69105394a24c56baed5e3b",
222
222
  "affectsGlobalScope": false
223
223
  },
224
- "./src/types/crm.ts": {
225
- "version": "a5e3decf8eabedf4246670ae3c6bfe59629d154f03612a279aab8d321596fb11",
226
- "signature": "6face17c7ac74ea55ba6773a5848ce13d81b68267d07d9ec4c0591fa2b984ef9",
227
- "affectsGlobalScope": false
228
- },
229
224
  "../commons-sdk/lib/types.d.ts": {
230
225
  "version": "a1f5b22e933458b9c3a5c6d96156e9865e32d047385006e7a6b1136c0c2ab9e5",
231
226
  "signature": "a1f5b22e933458b9c3a5c6d96156e9865e32d047385006e7a6b1136c0c2ab9e5",
@@ -236,6 +231,16 @@
236
231
  "signature": "45e95dbe99decdf0c4b706a2fd94492b92b05f96ab7cc59d43448202a4a3b226",
237
232
  "affectsGlobalScope": false
238
233
  },
234
+ "./src/types/interests.ts": {
235
+ "version": "ec434a06a40b1a7d5b1e4ed301be2f5d8e52f36bddcb397bad7cac2b713207e3",
236
+ "signature": "6af980f9590cc1ff3178ca2ffc50ce96b8ca210065a254d3c2001047571030e7",
237
+ "affectsGlobalScope": false
238
+ },
239
+ "./src/types/crm.ts": {
240
+ "version": "145a028ceb01e2511a6ce0689034be797f5dfafd4bc4eb2e0832094d91574d4f",
241
+ "signature": "d9d3c17e634e3a00ec0e36f5ac42542dbe795c6bc442c07c11eb272d808efd07",
242
+ "affectsGlobalScope": false
243
+ },
239
244
  "./src/types/search.ts": {
240
245
  "version": "31fee677dbd8330ebebb362a03aedbce58e1081d0edb4647da96a880e64a5844",
241
246
  "signature": "b0211290f21c79f0d7cc0b273488129e89a337883c56a1246a5399542e5e7253",
@@ -252,8 +257,8 @@
252
257
  "affectsGlobalScope": false
253
258
  },
254
259
  "./src/types/picklists.ts": {
255
- "version": "39c4db954acd43da79c4170c34f0a4c67d3de29d128fd73f563c6ca1e6017ef9",
256
- "signature": "527852c53d9f71ba29f8b252a050f191b84715db4cbec86905c4cf8a764a90a3",
260
+ "version": "129792133fc2a152de7f3037f7ee00a359aba859c6f05f86ff48c6967c94a09d",
261
+ "signature": "002ab340fe41b0939ffb160b46eadfc8c6b77a0419d096c359a395c528470cf7",
257
262
  "affectsGlobalScope": false
258
263
  },
259
264
  "./src/types/storage.ts": {
@@ -1928,6 +1933,10 @@
1928
1933
  "../../node_modules/pretty-format/build/index.d.ts": [
1929
1934
  "../../node_modules/pretty-format/build/types.d.ts"
1930
1935
  ],
1936
+ "./src/types/crm.ts": [
1937
+ "./src/types/fields.ts",
1938
+ "./src/types/interests.ts"
1939
+ ],
1931
1940
  "./src/types/definitions.ts": [
1932
1941
  "./src/types/fields.ts",
1933
1942
  "./src/types/search.ts"
@@ -2730,6 +2739,10 @@
2730
2739
  "../../node_modules/pretty-format/build/index.d.ts": [
2731
2740
  "../../node_modules/pretty-format/build/types.d.ts"
2732
2741
  ],
2742
+ "./src/types/crm.ts": [
2743
+ "./src/types/fields.ts",
2744
+ "./src/types/interests.ts"
2745
+ ],
2733
2746
  "./src/types/definitions.ts": [
2734
2747
  "./src/types/fields.ts",
2735
2748
  "./src/types/search.ts"
@@ -2968,6 +2981,7 @@
2968
2981
  "./src/types/definitions.ts",
2969
2982
  "./src/types/events.ts",
2970
2983
  "./src/types/fields.ts",
2984
+ "./src/types/interests.ts",
2971
2985
  "./src/types/picklists.ts",
2972
2986
  "./src/types/search.ts",
2973
2987
  "./src/types/storage.ts",