@bisondesk/core-sdk 1.0.21 → 1.0.23-B

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.
Files changed (225) hide show
  1. package/lib/apis/crm.d.ts +39 -0
  2. package/lib/apis/crm.d.ts.map +1 -0
  3. package/lib/apis/crm.js +201 -0
  4. package/lib/apis/crm.js.map +1 -0
  5. package/lib/apis/documents.d.ts +4 -0
  6. package/lib/apis/documents.d.ts.map +1 -0
  7. package/lib/apis/documents.js +47 -0
  8. package/lib/apis/documents.js.map +1 -0
  9. package/lib/apis/internet-vehicles.d.ts +3 -0
  10. package/lib/apis/internet-vehicles.d.ts.map +1 -0
  11. package/lib/apis/internet-vehicles.js +27 -0
  12. package/lib/apis/internet-vehicles.js.map +1 -0
  13. package/lib/apis/leasing-administration.d.ts +8 -0
  14. package/lib/apis/leasing-administration.d.ts.map +1 -0
  15. package/lib/apis/leasing-administration.js +49 -0
  16. package/lib/apis/leasing-administration.js.map +1 -0
  17. package/lib/apis/leasing.d.ts +19 -0
  18. package/lib/apis/leasing.d.ts.map +1 -0
  19. package/lib/apis/leasing.js +168 -0
  20. package/lib/apis/leasing.js.map +1 -0
  21. package/lib/apis/opportunities.d.ts +9 -0
  22. package/lib/apis/opportunities.d.ts.map +1 -0
  23. package/lib/apis/opportunities.js +94 -0
  24. package/lib/apis/opportunities.js.map +1 -0
  25. package/lib/apis/picklists.d.ts +5 -0
  26. package/lib/apis/picklists.d.ts.map +1 -0
  27. package/lib/apis/picklists.js +44 -0
  28. package/lib/apis/picklists.js.map +1 -0
  29. package/lib/apis/tenants.d.ts +7 -0
  30. package/lib/apis/tenants.d.ts.map +1 -0
  31. package/lib/apis/tenants.js +80 -0
  32. package/lib/apis/tenants.js.map +1 -0
  33. package/lib/apis/users.d.ts +3 -0
  34. package/lib/apis/users.d.ts.map +1 -0
  35. package/lib/apis/users.js +26 -0
  36. package/lib/apis/users.js.map +1 -0
  37. package/lib/apis/utils.d.ts +9 -0
  38. package/lib/apis/utils.d.ts.map +1 -0
  39. package/lib/apis/utils.js +23 -0
  40. package/lib/apis/utils.js.map +1 -0
  41. package/lib/apis/vehicles.d.ts +18 -0
  42. package/lib/apis/vehicles.d.ts.map +1 -0
  43. package/lib/apis/vehicles.js +159 -0
  44. package/lib/apis/vehicles.js.map +1 -0
  45. package/lib/constants.d.ts +77 -0
  46. package/lib/constants.d.ts.map +1 -1
  47. package/lib/constants.js +924 -1
  48. package/lib/constants.js.map +1 -1
  49. package/lib/ddb-entities.d.ts +2 -0
  50. package/lib/ddb-entities.d.ts.map +1 -0
  51. package/lib/ddb-entities.js +5 -0
  52. package/lib/ddb-entities.js.map +1 -0
  53. package/lib/types/activities.d.ts +38 -0
  54. package/lib/types/activities.d.ts.map +1 -0
  55. package/lib/types/activities.js +16 -0
  56. package/lib/types/activities.js.map +1 -0
  57. package/lib/types/crm.d.ts +103 -30
  58. package/lib/types/crm.d.ts.map +1 -1
  59. package/lib/types/crm.js +16 -0
  60. package/lib/types/crm.js.map +1 -1
  61. package/lib/types/definitions.d.ts +15 -13
  62. package/lib/types/definitions.d.ts.map +1 -1
  63. package/lib/types/documents.d.ts +105 -0
  64. package/lib/types/documents.d.ts.map +1 -0
  65. package/lib/types/{interests.js → documents.js} +1 -1
  66. package/lib/types/documents.js.map +1 -0
  67. package/lib/types/fields.d.ts +26 -25
  68. package/lib/types/fields.d.ts.map +1 -1
  69. package/lib/types/fields.js +4 -0
  70. package/lib/types/fields.js.map +1 -1
  71. package/lib/types/internet-vehicles.d.ts +64 -0
  72. package/lib/types/internet-vehicles.d.ts.map +1 -0
  73. package/lib/types/internet-vehicles.js +3 -0
  74. package/lib/types/internet-vehicles.js.map +1 -0
  75. package/lib/types/leads.d.ts +134 -0
  76. package/lib/types/leads.d.ts.map +1 -0
  77. package/lib/types/leads.js +3 -0
  78. package/lib/types/leads.js.map +1 -0
  79. package/lib/types/leasing-administration.d.ts +107 -0
  80. package/lib/types/leasing-administration.d.ts.map +1 -0
  81. package/lib/types/leasing-administration.js +3 -0
  82. package/lib/types/leasing-administration.js.map +1 -0
  83. package/lib/types/leasing-search.d.ts +22 -0
  84. package/lib/types/leasing-search.d.ts.map +1 -0
  85. package/lib/types/leasing-search.js +3 -0
  86. package/lib/types/leasing-search.js.map +1 -0
  87. package/lib/types/leasing-settings.d.ts +113 -0
  88. package/lib/types/leasing-settings.d.ts.map +1 -0
  89. package/lib/types/leasing-settings.js +10 -0
  90. package/lib/types/leasing-settings.js.map +1 -0
  91. package/lib/types/leasing.d.ts +322 -0
  92. package/lib/types/leasing.d.ts.map +1 -0
  93. package/lib/types/leasing.js +24 -0
  94. package/lib/types/leasing.js.map +1 -0
  95. package/lib/types/machines.d.ts +38 -0
  96. package/lib/types/machines.d.ts.map +1 -0
  97. package/lib/types/machines.js +3 -0
  98. package/lib/types/machines.js.map +1 -0
  99. package/lib/types/opportunities.d.ts +448 -0
  100. package/lib/types/opportunities.d.ts.map +1 -0
  101. package/lib/types/opportunities.js +68 -0
  102. package/lib/types/opportunities.js.map +1 -0
  103. package/lib/types/payments.d.ts +38 -0
  104. package/lib/types/payments.d.ts.map +1 -0
  105. package/lib/types/payments.js +9 -0
  106. package/lib/types/payments.js.map +1 -0
  107. package/lib/types/picklists.d.ts +15 -4
  108. package/lib/types/picklists.d.ts.map +1 -1
  109. package/lib/types/quotes.d.ts +173 -0
  110. package/lib/types/quotes.d.ts.map +1 -0
  111. package/lib/types/quotes.js +26 -0
  112. package/lib/types/quotes.js.map +1 -0
  113. package/lib/types/recently-viewed.d.ts +33 -0
  114. package/lib/types/recently-viewed.d.ts.map +1 -0
  115. package/lib/types/recently-viewed.js +3 -0
  116. package/lib/types/recently-viewed.js.map +1 -0
  117. package/lib/types/saved-filters.d.ts +20 -0
  118. package/lib/types/saved-filters.d.ts.map +1 -0
  119. package/lib/types/saved-filters.js +3 -0
  120. package/lib/types/saved-filters.js.map +1 -0
  121. package/lib/types/search.d.ts +26 -4
  122. package/lib/types/search.d.ts.map +1 -1
  123. package/lib/types/search.js.map +1 -1
  124. package/lib/types/settings.d.ts +50 -0
  125. package/lib/types/settings.d.ts.map +1 -0
  126. package/lib/types/settings.js +3 -0
  127. package/lib/types/settings.js.map +1 -0
  128. package/lib/types/storage.d.ts +1 -11
  129. package/lib/types/storage.d.ts.map +1 -1
  130. package/lib/types/storage.js +15 -0
  131. package/lib/types/storage.js.map +1 -1
  132. package/lib/types/templates.d.ts +35 -0
  133. package/lib/types/templates.d.ts.map +1 -0
  134. package/lib/types/templates.js +9 -0
  135. package/lib/types/templates.js.map +1 -0
  136. package/lib/types/tenants.d.ts +32 -9
  137. package/lib/types/tenants.d.ts.map +1 -1
  138. package/lib/types/tenants.js +11 -0
  139. package/lib/types/tenants.js.map +1 -1
  140. package/lib/types/users.d.ts +11 -3
  141. package/lib/types/users.d.ts.map +1 -1
  142. package/lib/types/utils.d.ts +20 -0
  143. package/lib/types/utils.d.ts.map +1 -1
  144. package/lib/types/utils.js +6 -0
  145. package/lib/types/utils.js.map +1 -1
  146. package/lib/types/vehicles.d.ts +406 -92
  147. package/lib/types/vehicles.d.ts.map +1 -1
  148. package/lib/types/vehicles.js +54 -1
  149. package/lib/types/vehicles.js.map +1 -1
  150. package/lib/types/website.d.ts +24 -0
  151. package/lib/types/website.d.ts.map +1 -0
  152. package/lib/types/website.js +3 -0
  153. package/lib/types/website.js.map +1 -0
  154. package/lib/utils/forms.d.ts +6 -0
  155. package/lib/utils/forms.d.ts.map +1 -0
  156. package/lib/utils/forms.js +33 -0
  157. package/lib/utils/forms.js.map +1 -0
  158. package/lib/utils/leasing.d.ts +3 -0
  159. package/lib/utils/leasing.d.ts.map +1 -0
  160. package/lib/utils/leasing.js +10 -0
  161. package/lib/utils/leasing.js.map +1 -0
  162. package/lib/utils/slug.d.ts +3 -0
  163. package/lib/utils/slug.d.ts.map +1 -0
  164. package/lib/utils/slug.js +23 -0
  165. package/lib/utils/slug.js.map +1 -0
  166. package/lib/utils/tenants.d.ts +4 -0
  167. package/lib/utils/tenants.d.ts.map +1 -0
  168. package/lib/utils/tenants.js +16 -0
  169. package/lib/utils/tenants.js.map +1 -0
  170. package/lib/utils/vehicles.d.ts +12 -0
  171. package/lib/utils/vehicles.d.ts.map +1 -0
  172. package/lib/utils/vehicles.js +73 -0
  173. package/lib/utils/vehicles.js.map +1 -0
  174. package/package.json +8 -6
  175. package/src/apis/crm.ts +302 -0
  176. package/src/apis/documents.ts +54 -0
  177. package/src/apis/internet-vehicles.ts +23 -0
  178. package/src/apis/leasing-administration.ts +70 -0
  179. package/src/apis/leasing.ts +257 -0
  180. package/src/apis/opportunities.ts +133 -0
  181. package/src/apis/picklists.ts +50 -0
  182. package/src/apis/tenants.ts +100 -0
  183. package/src/apis/users.ts +22 -0
  184. package/src/apis/utils.ts +23 -0
  185. package/src/apis/vehicles.ts +229 -0
  186. package/src/constants.ts +930 -1
  187. package/src/ddb-entities.ts +1 -0
  188. package/src/environment.d.ts +6 -0
  189. package/src/types/activities.ts +41 -0
  190. package/src/types/crm.ts +118 -30
  191. package/src/types/definitions.ts +19 -12
  192. package/src/types/documents.ts +110 -0
  193. package/src/types/fields.ts +72 -31
  194. package/src/types/internet-vehicles.ts +67 -0
  195. package/src/types/leads.ts +144 -0
  196. package/src/types/leasing-administration.ts +131 -0
  197. package/src/types/leasing-search.ts +24 -0
  198. package/src/types/leasing-settings.ts +111 -0
  199. package/src/types/leasing.ts +360 -0
  200. package/src/types/machines.ts +40 -0
  201. package/src/types/opportunities.ts +496 -0
  202. package/src/types/payments.ts +40 -0
  203. package/src/types/picklists.ts +26 -7
  204. package/src/types/quotes.ts +186 -0
  205. package/src/types/recently-viewed.ts +45 -0
  206. package/src/types/saved-filters.ts +21 -0
  207. package/src/types/search.ts +34 -4
  208. package/src/types/settings.ts +51 -0
  209. package/src/types/storage.ts +1 -12
  210. package/src/types/templates.ts +40 -0
  211. package/src/types/tenants.ts +37 -11
  212. package/src/types/users.ts +17 -3
  213. package/src/types/utils.ts +25 -0
  214. package/src/types/vehicles.ts +461 -93
  215. package/src/types/website.ts +28 -0
  216. package/src/utils/forms.ts +32 -0
  217. package/src/utils/leasing.ts +14 -0
  218. package/src/utils/slug.ts +19 -0
  219. package/src/utils/tenants.ts +14 -0
  220. package/src/utils/vehicles.ts +92 -0
  221. package/tsconfig.tsbuildinfo +1 -2995
  222. package/lib/types/interests.d.ts +0 -23
  223. package/lib/types/interests.d.ts.map +0 -1
  224. package/lib/types/interests.js.map +0 -1
  225. package/src/types/interests.ts +0 -20
@@ -1,11 +1,19 @@
1
- import { AttachmentValue, PhoneNumberRawValue, PhoneNumberValue } from './fields';
1
+ import { AppRoles } from '@bisondesk/commons-sdk/lib/constants';
2
+ import { AttachmentValue, PhoneNumberRawValue, PhoneNumberValue } from '@bisondesk/commons-sdk/lib/types';
2
3
  export declare type NewUserRequest = {
3
4
  email: string;
4
5
  firstName: string;
5
6
  language: string;
6
7
  lastName: string;
7
8
  phone: PhoneNumberRawValue;
8
- roles: string[];
9
+ picture?: AttachmentValue;
10
+ roles: AppRoles[];
11
+ };
12
+ export declare type ValidNewUserRequest = Omit<NewUserRequest, 'phone'> & {
13
+ phone: PhoneNumberValue;
14
+ };
15
+ export declare type UpdateUserRequest = Omit<User, 'phone'> & {
16
+ phone: PhoneNumberRawValue | PhoneNumberValue;
9
17
  };
10
18
  export declare type User = {
11
19
  active: boolean;
@@ -17,7 +25,7 @@ export declare type User = {
17
25
  lastName: string;
18
26
  phone: PhoneNumberValue;
19
27
  picture?: AttachmentValue;
20
- roles: string[];
28
+ roles: AppRoles[];
21
29
  updatedAt: string;
22
30
  };
23
31
  export declare type UserSummary = {
@@ -1 +1 @@
1
- {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/types/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAElF,oBAAY,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB,CAAC;AAEF,oBAAY,IAAI,GAAG;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAIF,oBAAY,WAAW,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B,CAAC"}
1
+ {"version":3,"file":"users.d.ts","sourceRoot":"","sources":["../../src/types/users.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAChE,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAE1C,oBAAY,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,mBAAmB,CAAC;IAC3B,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB,CAAC;AAEF,oBAAY,mBAAmB,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG;IAChE,KAAK,EAAE,gBAAgB,CAAC;CACzB,CAAC;AAEF,oBAAY,iBAAiB,GAAG,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG;IACpD,KAAK,EAAE,mBAAmB,GAAG,gBAAgB,CAAC;CAC/C,CAAC;AAEF,oBAAY,IAAI,GAAG;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,gBAAgB,CAAC;IACxB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAIF,oBAAY,WAAW,GAAG;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B,CAAC"}
@@ -1,3 +1,5 @@
1
+ import { MultiLangValue } from '@bisondesk/commons-sdk/lib/types';
2
+ import { AdHocPicklistValueDisplay } from './picklists';
1
3
  export declare type CountryInfo = {
2
4
  code: string;
3
5
  name: string;
@@ -24,4 +26,22 @@ export declare type Country = {
24
26
  name: string;
25
27
  dialCode: number;
26
28
  };
29
+ export declare type ReferenceData = {
30
+ recordTitles: AdHocRecordTitles;
31
+ picklistTitles: AdHocPicklistValueDisplay;
32
+ };
33
+ export declare type AdHocRecordTitles = {
34
+ [businessEntityId: string]: {
35
+ [recordId: string]: string | MultiLangValue;
36
+ };
37
+ };
38
+ export declare type DataRecord<T, M = undefined> = {
39
+ record: T;
40
+ meta?: M;
41
+ actions: string[];
42
+ };
43
+ export declare enum PricePercentageMode {
44
+ CURRENCY = "currency",
45
+ PERCENTAGE = "percentage"
46
+ }
27
47
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,QAAQ,EAAE;QACR,IAAI,EAAE,OAAO,CAAC;QACd,KAAK,EAAE,OAAO,CAAC;QACf,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QACP,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;IACF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAExD,oBAAY,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QACN,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,QAAQ,EAAE;QACR,IAAI,EAAE,OAAO,CAAC;QACd,KAAK,EAAE,OAAO,CAAC;QACf,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE;QACP,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;IACF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,oBAAY,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,oBAAY,aAAa,GAAG;IAC1B,YAAY,EAAE,iBAAiB,CAAC;IAChC,cAAc,EAAE,yBAAyB,CAAC;CAC3C,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC9B,CAAC,gBAAgB,EAAE,MAAM,GAAG;QAC1B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,cAAc,CAAC;KAC7C,CAAC;CACH,CAAC;AAEF,oBAAY,UAAU,CAAC,CAAC,EAAE,CAAC,GAAG,SAAS,IAAI;IACzC,MAAM,EAAE,CAAC,CAAC;IACV,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB,CAAC;AAEF,oBAAY,mBAAmB;IAC7B,QAAQ,aAAa;IACrB,UAAU,eAAe;CAC1B"}
@@ -1,3 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PricePercentageMode = void 0;
4
+ var PricePercentageMode;
5
+ (function (PricePercentageMode) {
6
+ PricePercentageMode["CURRENCY"] = "currency";
7
+ PricePercentageMode["PERCENTAGE"] = "percentage";
8
+ })(PricePercentageMode = exports.PricePercentageMode || (exports.PricePercentageMode = {}));
3
9
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":";;;AAgDA,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,4CAAqB,CAAA;IACrB,gDAAyB,CAAA;AAC3B,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B"}
@@ -1,11 +1,231 @@
1
- import { AttachmentValue } from './fields';
2
- export declare type SearchVehicle = {
3
- vehicle: Partial<Vehicle>;
1
+ import { AttachmentValue, Document, LocationValue, MultiLangValue, SearchPermissions } from '@bisondesk/commons-sdk/lib/types';
2
+ declare type BaseVehicleEvent = {
3
+ id: string;
4
+ actionAt: string;
5
+ userId: string;
6
+ tenantId: string;
7
+ };
8
+ declare type VehicleSuperstructure = {
9
+ carCapacity?: number;
10
+ compartmentCount?: number;
11
+ counter?: boolean;
12
+ crane?: {
13
+ make?: string;
14
+ model?: string;
15
+ position?: 'Behind the cabin' | 'Rear';
16
+ present?: boolean;
17
+ year?: number;
18
+ };
19
+ dimensions?: {
20
+ height?: number;
21
+ length?: number;
22
+ width?: number;
23
+ extended?: string;
24
+ heightened?: string;
25
+ };
26
+ baseVehicle?: SuperstructureBaseVehicle;
27
+ extendable?: boolean;
28
+ highPressurePump?: boolean;
29
+ loadingPlatformHeight?: number;
30
+ pump?: boolean;
31
+ slidingRoof?: boolean;
32
+ tailgate?: {
33
+ capacity?: number;
34
+ make?: string;
35
+ model?: string;
36
+ present?: boolean;
37
+ type?: 'slider_lift' | 'cantilever' | 'column_lift';
38
+ };
39
+ tank?: {
40
+ capacity: number;
41
+ };
42
+ temperatureControl?: {
43
+ engineType?: 'diesel' | 'electric' | 'diesel+electric' | 'engine';
44
+ make?: string;
45
+ runningHours?: {
46
+ diesel?: number;
47
+ electric?: number;
48
+ };
49
+ };
50
+ tipper?: {
51
+ tipsBack?: boolean;
52
+ tipsLeft?: boolean;
53
+ tipsRight?: boolean;
54
+ };
4
55
  };
5
- export declare type Vehicle = {
56
+ export declare type NewVehicleRequest = {
57
+ branch: string;
58
+ count: number;
59
+ specs: VehicleExternalInfo;
60
+ description: {
61
+ remarks?: string;
62
+ technicalRemarks?: string;
63
+ };
64
+ logistics: {
65
+ vehicleRole: VehicleInternalInfo['role'];
66
+ parking: string;
67
+ deliveryType: VehiclePurchaseDeliveryType;
68
+ availableDate: string;
69
+ pickupAddress?: LocationValue;
70
+ };
71
+ prices: {
72
+ minimum?: string;
73
+ premium?: string;
74
+ internet?: string;
75
+ };
76
+ media: {
77
+ pictures: AttachmentValue[];
78
+ videos: AttachmentValue[];
79
+ docs: Document[];
80
+ engineeringDocs: Document[];
81
+ };
82
+ vinList?: string;
83
+ deal: {
84
+ stockNumber?: string;
85
+ contactId: string;
86
+ orgId: string;
87
+ purchasedBy: string;
88
+ dealStatus: VehiclePurchaseDealStatus.PurchaseEvaluation | VehiclePurchaseDealStatus.PurchaseAgreed;
89
+ costs: {
90
+ purchase: string;
91
+ purchaseVatPercentage: string;
92
+ commission?: string;
93
+ externalTransport?: string;
94
+ internalTransport?: string;
95
+ externalGarage?: string;
96
+ internalGarage?: string;
97
+ other?: string;
98
+ };
99
+ };
100
+ };
101
+ export declare type VehicleCreateEvent = BaseVehicleEvent & {
102
+ action: 'create';
103
+ vehicle: Vehicle;
104
+ previousVehicle?: undefined;
105
+ };
106
+ export declare type VehicleUpdateEvent = BaseVehicleEvent & {
107
+ action: 'update';
108
+ vehicle: Vehicle;
109
+ previousVehicle: Vehicle;
110
+ };
111
+ export declare type VehicleDeleteEvent = BaseVehicleEvent & {
112
+ action: 'delete';
113
+ vehicle?: undefined;
114
+ previousVehicle: Vehicle;
115
+ };
116
+ export declare type VehicleEvent = VehicleCreateEvent | VehicleUpdateEvent | VehicleDeleteEvent;
117
+ export declare type VehicleMarketingEvent = {
118
+ actionAt: string;
119
+ data: VehicleMarketing;
120
+ tenantId: string;
121
+ userId: string;
122
+ vehicleId: string;
123
+ };
124
+ export declare type UpdateVehiclesPricesEvent = {
6
125
  id: string;
126
+ actionAt: string;
127
+ userId: string;
128
+ tenantId: string;
129
+ priceList: AttachmentValue;
130
+ };
131
+ export declare type PublicVehicle = Pick<Vehicle, 'external' | 'id'>;
132
+ export declare type PublicSearchVehicle = {
133
+ vehicle: PublicVehicle;
134
+ };
135
+ export declare enum CustomSearchState {
136
+ Available = "available",
137
+ Expected = "expected",
138
+ Reserved = "reserved"
139
+ }
140
+ export declare type SearchVehicle = {
141
+ custom: {
142
+ features: string[];
143
+ state: CustomSearchState[];
144
+ };
145
+ purchase?: {
146
+ supplierStockNumber?: string;
147
+ };
148
+ vehicle: Vehicle;
149
+ };
150
+ export declare type InputSearchVehicle = SearchVehicle & {
151
+ permissions: SearchPermissions;
152
+ };
153
+ export declare type VehicleInternalInfo = {
7
154
  createdAt: string;
155
+ description: {
156
+ title: string;
157
+ remarks?: string;
158
+ technicalRemarks?: string;
159
+ };
160
+ parkingName?: string;
161
+ identification: {
162
+ administrativeNumber?: string;
163
+ stockNumber: string;
164
+ branch: string;
165
+ /**
166
+ * This ID is used to link different vehicle objects that represent the same real world asset.
167
+ * Ideally the chassis number could be used, but in some cases it is not available yet.
168
+ */
169
+ metaId: string;
170
+ };
171
+ documents: Document[];
172
+ engineeringDocs: Document[];
173
+ pricing: {
174
+ premium?: string;
175
+ minimum?: string;
176
+ currency?: string;
177
+ };
178
+ role: 'SALE' | 'OWN_USE' | 'RENTAL' | 'BUILD' | 'UNKNOWN';
179
+ status: VehicleStatus;
8
180
  updatedAt: string;
181
+ keywords?: string[];
182
+ };
183
+ export declare type VehicleOriginalInfo = {
184
+ tenantId: string;
185
+ identification: {
186
+ id: string;
187
+ stockNumber: string;
188
+ hyperdmsTenantId?: string;
189
+ metaId?: string;
190
+ };
191
+ salesConditions: {
192
+ leasing?: boolean;
193
+ expected?: boolean;
194
+ reserved?: boolean;
195
+ price?: string;
196
+ currency?: string;
197
+ };
198
+ };
199
+ export declare type VehicleAxlesInfo = {
200
+ details: VehicleAxle[];
201
+ configuration?: string;
202
+ count?: number;
203
+ poweredAxlesCount?: number;
204
+ wheelbase?: number;
205
+ suspension?: 'Air' | 'Air/Steel' | 'Steel';
206
+ };
207
+ export declare type SuperstructureBaseVehicle = {
208
+ category: string;
209
+ make: string;
210
+ model?: string;
211
+ type?: string;
212
+ axlesConfiguration?: string;
213
+ emissionsClass?: string;
214
+ transmissionType?: 'Automatic' | 'Manual' | 'Semi-Automatic';
215
+ vin?: string;
216
+ currentRegistration?: {
217
+ country?: string;
218
+ };
219
+ suspension?: 'Air' | 'Air/Steel' | 'Steel';
220
+ constructionYear?: number;
221
+ firstRegistration?: string;
222
+ odometerKm?: number;
223
+ powerHp?: number;
224
+ bodystyle?: string;
225
+ accessories: VehicleExternalInfo['accessories'];
226
+ superstructure?: Pick<VehicleSuperstructure, 'crane' | 'tailgate'>;
227
+ };
228
+ export declare type VehicleExternalInfo = {
9
229
  body?: {
10
230
  cabin?: {
11
231
  type: 'Day' | 'Sleep / Small' | 'Sleep / Medium' | 'Sleep / Large';
@@ -25,6 +245,7 @@ export declare type Vehicle = {
25
245
  };
26
246
  mainPicture?: AttachmentValue;
27
247
  pictures?: AttachmentValue[];
248
+ videos?: AttachmentValue[];
28
249
  condition?: {
29
250
  damaged?: boolean;
30
251
  odometer?: {
@@ -32,26 +253,14 @@ export declare type Vehicle = {
32
253
  };
33
254
  used?: boolean;
34
255
  };
35
- description?: {
36
- remarks?: {
37
- [lang: string]: string;
38
- };
39
- internal_remarks?: {
40
- [lang: string]: string;
41
- };
42
- internal_technical_remarks?: {
43
- [lang: string]: string;
44
- };
45
- titles?: {
46
- [lang: string]: string;
47
- };
48
- };
49
256
  general: {
50
- bodystyle: string;
257
+ bodystyle?: string;
51
258
  category: string;
52
- make: string;
259
+ make?: string;
53
260
  model?: string;
261
+ modelName?: string;
54
262
  type?: string;
263
+ typeName?: string;
55
264
  };
56
265
  history?: {
57
266
  advertisingYear?: number;
@@ -61,29 +270,21 @@ export declare type Vehicle = {
61
270
  technicalInspectionEndDate?: string;
62
271
  };
63
272
  firstRegistration?: string;
273
+ cocPvg?: string;
64
274
  };
65
- identification?: {
66
- administrativeNumber: string;
67
- externalId?: string;
68
- hdmsId: string;
69
- hdmsOrg: string;
275
+ identification: {
70
276
  licensePlate?: string;
71
- stockNumber: string;
277
+ stockNumber?: string;
72
278
  vin?: string;
279
+ buildStockNumber?: string;
73
280
  };
74
281
  powertrain?: {
75
- axles?: {
76
- details?: VehicleAxle[];
77
- configuration?: string;
78
- count?: number;
79
- poweredAxlesCount?: number;
80
- wheelbase?: number;
81
- suspension?: 'Air' | 'Air/Steel' | 'Steel';
82
- };
282
+ axles?: VehicleAxlesInfo;
83
283
  emissions?: {
84
284
  class?: string;
85
285
  };
86
286
  engine?: {
287
+ cylinderCount?: number;
87
288
  energy?: string;
88
289
  power?: {
89
290
  hp?: number;
@@ -97,65 +298,14 @@ export declare type Vehicle = {
97
298
  type?: 'Automatic' | 'Manual' | 'Semi-Automatic';
98
299
  };
99
300
  };
100
- salesConditions?: {
301
+ salesConditions: {
101
302
  leasing?: boolean;
102
303
  expected?: boolean;
103
304
  reserved?: boolean;
104
- pricing?: {
105
- internet?: string;
106
- premium?: string;
107
- minimum?: string;
108
- currency?: string;
109
- };
110
- };
111
- superstructure?: {
112
- carCapacity?: number;
113
- compartmentCount?: number;
114
- counter?: boolean;
115
- crane?: {
116
- make?: string;
117
- model?: string;
118
- position?: 'Behind the cabin' | 'Rear';
119
- present?: boolean;
120
- year?: number;
121
- };
122
- dimensions?: {
123
- height?: number;
124
- length?: number;
125
- width?: number;
126
- extended?: 'L1' | 'L2' | 'L3' | 'L4' | 'L5';
127
- heightened?: 'H1' | 'H2' | 'H3';
128
- };
129
- extendable?: boolean;
130
- highPressurePump?: boolean;
131
- hoses?: boolean;
132
- loadingPlatformHeight?: number;
133
- pump?: boolean;
134
- slidingRoof?: boolean;
135
- tailgate?: {
136
- capacity?: number;
137
- make?: string;
138
- model?: string;
139
- present?: boolean;
140
- type?: 'slider_lift' | 'cantilever' | 'column_lift';
141
- };
142
- tank?: {
143
- capacity: number;
144
- };
145
- temperatureControl?: {
146
- engineType?: 'diesel' | 'electric' | 'diesel+electric' | 'engine';
147
- make?: string;
148
- runningHours?: {
149
- diesel?: number;
150
- electric?: number;
151
- };
152
- };
153
- tipper?: {
154
- tipsBack?: boolean;
155
- tipsLeft?: boolean;
156
- tipsRight?: boolean;
157
- };
305
+ price?: string | undefined;
306
+ currency?: string | undefined;
158
307
  };
308
+ superstructure?: VehicleSuperstructure;
159
309
  weights?: {
160
310
  gvw?: number;
161
311
  massEmpty?: number;
@@ -169,7 +319,6 @@ export declare type Vehicle = {
169
319
  cdPlayer?: boolean;
170
320
  centralLocking?: boolean;
171
321
  centralLubrication?: boolean;
172
- crane?: boolean;
173
322
  cruiseControl?: boolean;
174
323
  electricDoorMirrors?: boolean;
175
324
  electricWindows?: boolean;
@@ -202,9 +351,29 @@ export declare type Vehicle = {
202
351
  xenonLights?: boolean;
203
352
  };
204
353
  };
354
+ declare type BaseVehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = {
355
+ internal: I;
356
+ external: E;
357
+ original?: VehicleOriginalInfo;
358
+ };
359
+ export declare type NewVehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = BaseVehicle<I, E> & {
360
+ id?: undefined;
361
+ };
362
+ export declare type Vehicle<I = VehicleInternalInfo, E = VehicleExternalInfo> = BaseVehicle<I, E> & {
363
+ id: string;
364
+ };
365
+ export declare type VehiclesByChassisNumberRequest = {
366
+ tenantIds: string[];
367
+ chassisNumber: string;
368
+ };
369
+ export declare type VehiclesByMetaIdRequest = {
370
+ tenantIds: string[];
371
+ metaId: string;
372
+ };
205
373
  export declare type VehicleAxle = {
374
+ make?: string;
206
375
  alloyWheels?: boolean;
207
- brakes?: string;
376
+ brakes?: 'Disc' | 'Drum';
208
377
  differentialLock?: boolean;
209
378
  liftAxle?: boolean;
210
379
  maxLoad?: number;
@@ -213,7 +382,7 @@ export declare type VehicleAxle = {
213
382
  powered?: boolean;
214
383
  reduction?: string;
215
384
  steering?: boolean;
216
- suspension?: string;
385
+ suspension?: 'Steel' | 'Air' | 'Hydraulic';
217
386
  twinWheels?: boolean;
218
387
  tyreConditionPercLeftInside?: number;
219
388
  tyreConditionPercLeftOutside?: number;
@@ -221,4 +390,149 @@ export declare type VehicleAxle = {
221
390
  tyreConditionPercRightOutside?: number;
222
391
  tyreSize?: string;
223
392
  };
393
+ export declare type VehicleMarketing = {
394
+ titles: MultiLangValue;
395
+ remarks?: MultiLangValue;
396
+ marketingPlatforms: string[];
397
+ pictures: AttachmentValue[];
398
+ videos: AttachmentValue[];
399
+ overrides?: {
400
+ marketingPlatforms?: boolean;
401
+ remarks?: boolean;
402
+ titles?: boolean;
403
+ pictures?: boolean;
404
+ videos?: boolean;
405
+ };
406
+ };
407
+ export declare enum VehicleSaleDealStatus {
408
+ SaleAgreed = "SALE_AGREED",
409
+ FirstPaymentReceived = "FIRST_PAYMENT_RECEIVED",
410
+ FullPaymentReceived = "FULL_PAYMENT_RECEIVED",
411
+ NotSold = "NOT_SOLD"
412
+ }
413
+ export declare enum VehiclePurchaseDealStatus {
414
+ PurchaseEvaluation = "PURCHASE_EVALUATION",
415
+ PurchaseAgreed = "PURCHASE_AGREED",
416
+ FirstPaymentAllowed = "FIRST_PAYMENT_ALLOWED",
417
+ FirstPaymentSent = "FIRST_PAYMENT_SENT",
418
+ FullPaymentAllowed = "FULL_PAYMENT_ALLOWED",
419
+ FullPaymentSent = "FULL_PAYMENT_SENT"
420
+ }
421
+ export declare enum VehicleSaleLogisticsStatus {
422
+ AtOrigin = "AT_ORIGIN",
423
+ Delivered = "DELIVERED"
424
+ }
425
+ export declare enum VehiclePurchaseLogisticsStatus {
426
+ AtOrigin = "AT_ORIGIN",
427
+ Arrived = "ARRIVED",
428
+ CheckedIn = "CHECKED_IN"
429
+ }
430
+ export declare enum VehiclePurchaseDeliveryType {
431
+ PickUp = "PICK_UP",
432
+ DropOff = "DROP_OFF"
433
+ }
434
+ export declare type VehicleStatus = {
435
+ deleted?: boolean;
436
+ option?: {
437
+ id: string;
438
+ expirationDate: number;
439
+ };
440
+ sale: {
441
+ id?: string;
442
+ dealStatus: VehicleSaleDealStatus;
443
+ logisticsStatus?: VehicleSaleLogisticsStatus;
444
+ };
445
+ purchase: {
446
+ purchasedBy?: string;
447
+ dealStatus: VehiclePurchaseDealStatus;
448
+ logisticsStatus: VehiclePurchaseLogisticsStatus;
449
+ };
450
+ };
451
+ export declare type VehiclePriceList = {
452
+ uploadedAt: string;
453
+ uploadedBy: string;
454
+ priceList: AttachmentValue;
455
+ id: string;
456
+ };
457
+ export declare type UpdateVehiclesPricesRequest = {
458
+ priceList: AttachmentValue;
459
+ };
460
+ export declare type VehiclePriceListLine = {
461
+ reference: string;
462
+ internet?: string;
463
+ premium?: string;
464
+ minimum?: string;
465
+ };
466
+ export declare type VehiclePriceUpdateError = {
467
+ data: VehiclePriceListLine;
468
+ line: number;
469
+ error: {
470
+ fieldId: keyof VehiclePriceListLine;
471
+ msg: string;
472
+ };
473
+ };
474
+ export declare type VehiclePriceUpdateResponse = {
475
+ success: true;
476
+ } | {
477
+ success: false;
478
+ errors: VehiclePriceUpdateError[];
479
+ };
480
+ export declare type VehiclePurchase = {
481
+ organizationId: string;
482
+ contactId: string;
483
+ supplierStockNumber?: string;
484
+ purchasedBy: string;
485
+ log: {
486
+ evaluationStartedAt?: string;
487
+ evaluationStartedBy?: string;
488
+ purchaseAgreedAt?: string;
489
+ purchaseAgreedBy?: string;
490
+ firstPaymentAllowedAt?: string;
491
+ firstPaymentAllowedBy?: string;
492
+ firstPaymentSentAt?: string;
493
+ firstPaymentSentBy?: string;
494
+ fullPaymentAllowedAt?: string;
495
+ fullPaymentAllowedBy?: string;
496
+ fullPaymentSentAt?: string;
497
+ fullPaymentSentBy?: string;
498
+ arrivedAt?: string;
499
+ arrivedBy?: string;
500
+ checkedInAt?: string;
501
+ checkedInBy?: string;
502
+ };
503
+ deal: {
504
+ status: VehiclePurchaseDealStatus;
505
+ askingPrice?: string;
506
+ purchaseVatRate?: string;
507
+ purchase?: string;
508
+ commission?: string;
509
+ externalTransport?: string;
510
+ internalTransport?: string;
511
+ externalGarage?: string;
512
+ internalGarage?: string;
513
+ other?: string;
514
+ };
515
+ logistics: {
516
+ parkingName?: string;
517
+ status: VehiclePurchaseLogisticsStatus;
518
+ deliveryType?: VehiclePurchaseDeliveryType;
519
+ pickupAddress?: LocationValue;
520
+ availableWeek?: string;
521
+ };
522
+ };
523
+ export declare enum VehicleActions {
524
+ EditAdminDocs = "edit_admin_docs",
525
+ EditEngineeringDocs = "edit_engineering_docs",
526
+ EditMarketing = "edit_marketing",
527
+ EditMedia = "edit_media",
528
+ EditPictures = "edit_pictures",
529
+ EditPrices = "edit_prices",
530
+ EditPurchaseDeal = "edit_purchase_deal",
531
+ EditPurchaseLogistics = "edit_purchase_logistics",
532
+ EditSpecs = "edit_specs",
533
+ EditVideos = "edit_videos",
534
+ ViewLeads = "view_leads",
535
+ ViewSimilarOnline = "view_similar_online"
536
+ }
537
+ export {};
224
538
  //# sourceMappingURL=vehicles.d.ts.map