@bisondesk/core-sdk 1.0.255 → 1.0.257

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 (189) hide show
  1. package/lib/cjs/apis/crm.js +2 -4
  2. package/lib/cjs/apis/crm.js.map +1 -1
  3. package/lib/cjs/apis/documents.js +14 -6
  4. package/lib/cjs/apis/documents.js.map +1 -1
  5. package/lib/cjs/apis/internet-vehicles.js +2 -4
  6. package/lib/cjs/apis/internet-vehicles.js.map +1 -1
  7. package/lib/cjs/apis/leasing-administration.js +2 -4
  8. package/lib/cjs/apis/leasing-administration.js.map +1 -1
  9. package/lib/cjs/apis/leasing.js +2 -4
  10. package/lib/cjs/apis/leasing.js.map +1 -1
  11. package/lib/cjs/apis/opportunities.js.map +1 -1
  12. package/lib/cjs/apis/picklists.js +2 -4
  13. package/lib/cjs/apis/picklists.js.map +1 -1
  14. package/lib/cjs/apis/tenants.js +2 -4
  15. package/lib/cjs/apis/tenants.js.map +1 -1
  16. package/lib/cjs/apis/users.js +2 -4
  17. package/lib/cjs/apis/users.js.map +1 -1
  18. package/lib/cjs/apis/utils.js.map +1 -1
  19. package/lib/cjs/apis/vehicles.js +2 -4
  20. package/lib/cjs/apis/vehicles.js.map +1 -1
  21. package/lib/cjs/constants.js +7 -1
  22. package/lib/cjs/constants.js.map +1 -1
  23. package/lib/cjs/ddb-entities.js.map +1 -1
  24. package/lib/cjs/types/activities.js.map +1 -1
  25. package/lib/cjs/types/crm.js.map +1 -1
  26. package/lib/cjs/types/definitions.js.map +1 -1
  27. package/lib/cjs/types/delivery-settings.js.map +1 -1
  28. package/lib/cjs/types/documents.js.map +1 -1
  29. package/lib/cjs/types/events.js.map +1 -1
  30. package/lib/cjs/types/fields.js.map +1 -1
  31. package/lib/cjs/types/internet-vehicles.js.map +1 -1
  32. package/lib/cjs/types/leads.js.map +1 -1
  33. package/lib/cjs/types/leasing-administration.js.map +1 -1
  34. package/lib/cjs/types/leasing-debtors.js.map +1 -1
  35. package/lib/cjs/types/leasing-search.js.map +1 -1
  36. package/lib/cjs/types/leasing-settings.js.map +1 -1
  37. package/lib/cjs/types/leasing.js.map +1 -1
  38. package/lib/cjs/types/machines.js.map +1 -1
  39. package/lib/cjs/types/opportunities.js +10 -1
  40. package/lib/cjs/types/opportunities.js.map +1 -1
  41. package/lib/cjs/types/payments.js.map +1 -1
  42. package/lib/cjs/types/picklists.js.map +1 -1
  43. package/lib/cjs/types/quotes.js.map +1 -1
  44. package/lib/cjs/types/recently-viewed.js.map +1 -1
  45. package/lib/cjs/types/saved-filters.js.map +1 -1
  46. package/lib/cjs/types/search.js.map +1 -1
  47. package/lib/cjs/types/settings.js.map +1 -1
  48. package/lib/cjs/types/storage.js +2 -15
  49. package/lib/cjs/types/storage.js.map +1 -1
  50. package/lib/cjs/types/templates.js.map +1 -1
  51. package/lib/cjs/types/tenants.js.map +1 -1
  52. package/lib/cjs/types/users.js.map +1 -1
  53. package/lib/cjs/types/utils.js.map +1 -1
  54. package/lib/cjs/types/vehicles.js.map +1 -1
  55. package/lib/cjs/types/website.js.map +1 -1
  56. package/lib/cjs/utils/forms.js +2 -4
  57. package/lib/cjs/utils/forms.js.map +1 -1
  58. package/lib/cjs/utils/leasing.js.map +1 -1
  59. package/lib/cjs/utils/opportunities.js +26 -6
  60. package/lib/cjs/utils/opportunities.js.map +1 -1
  61. package/lib/cjs/utils/slug.js +2 -4
  62. package/lib/cjs/utils/slug.js.map +1 -1
  63. package/lib/cjs/utils/tenants.js.map +1 -1
  64. package/lib/cjs/utils/vehicles.js.map +1 -1
  65. package/lib/esm/apis/crm.js.map +1 -1
  66. package/lib/esm/apis/documents.js +12 -2
  67. package/lib/esm/apis/documents.js.map +1 -1
  68. package/lib/esm/apis/internet-vehicles.js.map +1 -1
  69. package/lib/esm/apis/leasing-administration.js.map +1 -1
  70. package/lib/esm/apis/leasing.js.map +1 -1
  71. package/lib/esm/apis/opportunities.js.map +1 -1
  72. package/lib/esm/apis/picklists.js.map +1 -1
  73. package/lib/esm/apis/tenants.js.map +1 -1
  74. package/lib/esm/apis/users.js.map +1 -1
  75. package/lib/esm/apis/utils.js.map +1 -1
  76. package/lib/esm/apis/vehicles.js.map +1 -1
  77. package/lib/esm/constants.js +6 -0
  78. package/lib/esm/constants.js.map +1 -1
  79. package/lib/esm/ddb-entities.js.map +1 -1
  80. package/lib/esm/types/activities.js.map +1 -1
  81. package/lib/esm/types/crm.js.map +1 -1
  82. package/lib/esm/types/definitions.js.map +1 -1
  83. package/lib/esm/types/delivery-settings.js.map +1 -1
  84. package/lib/esm/types/documents.js.map +1 -1
  85. package/lib/esm/types/events.js.map +1 -1
  86. package/lib/esm/types/fields.js.map +1 -1
  87. package/lib/esm/types/internet-vehicles.js.map +1 -1
  88. package/lib/esm/types/leads.js.map +1 -1
  89. package/lib/esm/types/leasing-administration.js.map +1 -1
  90. package/lib/esm/types/leasing-debtors.js.map +1 -1
  91. package/lib/esm/types/leasing-search.js.map +1 -1
  92. package/lib/esm/types/leasing-settings.js.map +1 -1
  93. package/lib/esm/types/leasing.js.map +1 -1
  94. package/lib/esm/types/machines.js.map +1 -1
  95. package/lib/esm/types/opportunities.js +9 -0
  96. package/lib/esm/types/opportunities.js.map +1 -1
  97. package/lib/esm/types/payments.js.map +1 -1
  98. package/lib/esm/types/picklists.js.map +1 -1
  99. package/lib/esm/types/quotes.js.map +1 -1
  100. package/lib/esm/types/recently-viewed.js.map +1 -1
  101. package/lib/esm/types/saved-filters.js.map +1 -1
  102. package/lib/esm/types/search.js.map +1 -1
  103. package/lib/esm/types/settings.js.map +1 -1
  104. package/lib/esm/types/storage.js.map +1 -1
  105. package/lib/esm/types/templates.js.map +1 -1
  106. package/lib/esm/types/tenants.js.map +1 -1
  107. package/lib/esm/types/users.js.map +1 -1
  108. package/lib/esm/types/utils.js.map +1 -1
  109. package/lib/esm/types/vehicles.js.map +1 -1
  110. package/lib/esm/types/website.js.map +1 -1
  111. package/lib/esm/utils/forms.js.map +1 -1
  112. package/lib/esm/utils/leasing.js.map +1 -1
  113. package/lib/esm/utils/opportunities.js +22 -5
  114. package/lib/esm/utils/opportunities.js.map +1 -1
  115. package/lib/esm/utils/slug.js.map +1 -1
  116. package/lib/esm/utils/tenants.js.map +1 -1
  117. package/lib/esm/utils/vehicles.js.map +1 -1
  118. package/lib/tsconfig.cjs.tsbuildinfo +1 -1
  119. package/lib/tsconfig.esm.tsbuildinfo +1 -1
  120. package/lib/types/apis/crm.d.ts.map +1 -1
  121. package/lib/types/apis/documents.d.ts.map +1 -1
  122. package/lib/types/apis/internet-vehicles.d.ts.map +1 -1
  123. package/lib/types/apis/leasing-administration.d.ts.map +1 -1
  124. package/lib/types/apis/leasing.d.ts.map +1 -1
  125. package/lib/types/apis/opportunities.d.ts.map +1 -1
  126. package/lib/types/apis/picklists.d.ts.map +1 -1
  127. package/lib/types/apis/tenants.d.ts.map +1 -1
  128. package/lib/types/apis/users.d.ts.map +1 -1
  129. package/lib/types/apis/utils.d.ts.map +1 -1
  130. package/lib/types/apis/vehicles.d.ts.map +1 -1
  131. package/lib/types/constants.d.ts +5 -0
  132. package/lib/types/constants.d.ts.map +1 -1
  133. package/lib/types/ddb-entities.d.ts.map +1 -1
  134. package/lib/types/types/activities.d.ts.map +1 -1
  135. package/lib/types/types/crm.d.ts.map +1 -1
  136. package/lib/types/types/definitions.d.ts.map +1 -1
  137. package/lib/types/types/delivery-settings.d.ts.map +1 -1
  138. package/lib/types/types/documents.d.ts.map +1 -1
  139. package/lib/types/types/events.d.ts.map +1 -1
  140. package/lib/types/types/fields.d.ts.map +1 -1
  141. package/lib/types/types/internet-vehicles.d.ts.map +1 -1
  142. package/lib/types/types/leads.d.ts.map +1 -1
  143. package/lib/types/types/leasing-administration.d.ts +16 -16
  144. package/lib/types/types/leasing-administration.d.ts.map +1 -1
  145. package/lib/types/types/leasing-debtors.d.ts.map +1 -1
  146. package/lib/types/types/leasing-search.d.ts.map +1 -1
  147. package/lib/types/types/leasing-settings.d.ts.map +1 -1
  148. package/lib/types/types/leasing.d.ts +17 -0
  149. package/lib/types/types/leasing.d.ts.map +1 -1
  150. package/lib/types/types/machines.d.ts.map +1 -1
  151. package/lib/types/types/opportunities.d.ts +37 -32
  152. package/lib/types/types/opportunities.d.ts.map +1 -1
  153. package/lib/types/types/payments.d.ts +28 -0
  154. package/lib/types/types/payments.d.ts.map +1 -1
  155. package/lib/types/types/picklists.d.ts.map +1 -1
  156. package/lib/types/types/quotes.d.ts +17 -0
  157. package/lib/types/types/quotes.d.ts.map +1 -1
  158. package/lib/types/types/recently-viewed.d.ts.map +1 -1
  159. package/lib/types/types/saved-filters.d.ts.map +1 -1
  160. package/lib/types/types/search.d.ts.map +1 -1
  161. package/lib/types/types/settings.d.ts.map +1 -1
  162. package/lib/types/types/storage.d.ts.map +1 -1
  163. package/lib/types/types/templates.d.ts.map +1 -1
  164. package/lib/types/types/tenants.d.ts +1 -0
  165. package/lib/types/types/tenants.d.ts.map +1 -1
  166. package/lib/types/types/users.d.ts.map +1 -1
  167. package/lib/types/types/utils.d.ts.map +1 -1
  168. package/lib/types/types/vehicles.d.ts +2 -2
  169. package/lib/types/types/vehicles.d.ts.map +1 -1
  170. package/lib/types/types/website.d.ts.map +1 -1
  171. package/lib/types/utils/forms.d.ts.map +1 -1
  172. package/lib/types/utils/leasing.d.ts.map +1 -1
  173. package/lib/types/utils/opportunities.d.ts +7 -2
  174. package/lib/types/utils/opportunities.d.ts.map +1 -1
  175. package/lib/types/utils/slug.d.ts.map +1 -1
  176. package/lib/types/utils/tenants.d.ts.map +1 -1
  177. package/lib/types/utils/vehicles.d.ts.map +1 -1
  178. package/package.json +6 -4
  179. package/src/apis/documents.ts +13 -3
  180. package/src/constants.ts +6 -0
  181. package/src/types/leasing-administration.ts +16 -16
  182. package/src/types/leasing.ts +22 -3
  183. package/src/types/opportunities.ts +40 -31
  184. package/src/types/payments.ts +32 -0
  185. package/src/types/quotes.ts +19 -0
  186. package/src/types/tenants.ts +1 -0
  187. package/src/types/vehicles.ts +2 -2
  188. package/src/utils/opportunities.ts +31 -5
  189. package/tsconfig.json +2 -0
@@ -83,6 +83,7 @@ export type NewVehicleRequest = {
83
83
  internet?: string;
84
84
  };
85
85
  media: {
86
+ internalPictures: AttachmentValue[];
86
87
  pictures: AttachmentValue[];
87
88
  videos: AttachmentValue[];
88
89
  docs: Document[];
@@ -193,6 +194,7 @@ export type VehicleInternalInfo = {
193
194
  metaId: string;
194
195
  };
195
196
  documents: Document[];
197
+ pictures: AttachmentValue[];
196
198
  engineeringDocs: Document[];
197
199
  pricing: {
198
200
  premium?: string;
@@ -431,13 +433,11 @@ export type VehicleMarketing = {
431
433
  titles: MultiLangValue;
432
434
  remarks?: MultiLangValue;
433
435
  marketingPlatforms: string[];
434
- pictures: AttachmentValue[];
435
436
  videos: AttachmentValue[];
436
437
  overrides?: {
437
438
  marketingPlatforms?: boolean;
438
439
  remarks?: boolean;
439
440
  titles?: boolean;
440
- pictures?: boolean;
441
441
  videos?: boolean;
442
442
  };
443
443
  };
@@ -1,15 +1,41 @@
1
1
  import { Opportunity, OpportunityStatus, OpportunityStatusOrder } from '../types/opportunities';
2
2
 
3
- export const isSameAfterReferenceOpportunityStatus = (input: {
3
+ type CompareInput = {
4
4
  currentStatus: OpportunityStatus;
5
5
  referenceStatus: OpportunityStatus;
6
- }): boolean => {
6
+ };
7
+
8
+ const compareOpportunityStatus = (input: CompareInput) => {
7
9
  const { currentStatus, referenceStatus } = input;
8
10
 
9
- const currentStatusIndex = OpportunityStatusOrder.indexOf(currentStatus);
10
- const referenceStatusIndex = OpportunityStatusOrder.indexOf(referenceStatus);
11
+ const currentStatusIdx = OpportunityStatusOrder.indexOf(currentStatus);
12
+ const referenceStatusIdx = OpportunityStatusOrder.indexOf(referenceStatus);
13
+
14
+ return {
15
+ currentStatusIdx,
16
+ referenceStatusIdx,
17
+ };
18
+ };
19
+
20
+ export const isSameOrAfterReferenceOpportunityStatus = (input: CompareInput): boolean => {
21
+ const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
11
22
 
12
- return currentStatusIndex >= referenceStatusIndex;
23
+ return currentStatusIdx >= referenceStatusIdx;
24
+ };
25
+
26
+ export const isSameOrBeforeReferenceOpportunityStatus = (input: CompareInput): boolean => {
27
+ const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
28
+
29
+ return currentStatusIdx <= referenceStatusIdx;
13
30
  };
14
31
 
15
32
  export const isOpportunityLost = (input: Opportunity): boolean => input.lostAt != null;
33
+
34
+ export const getOpportunityReservedStatus = (): OpportunityStatus[] => [
35
+ OpportunityStatus.REVIEW,
36
+ OpportunityStatus.PREPARATION,
37
+ OpportunityStatus.DELIVERY,
38
+ ];
39
+
40
+ export const isOpportunityReserved = (input: Opportunity): boolean =>
41
+ getOpportunityReservedStatus().includes(input.status);
package/tsconfig.json CHANGED
@@ -4,6 +4,8 @@
4
4
  "declaration": true,
5
5
  "declarationMap": true,
6
6
  "sourceMap": true,
7
+ "inlineSources": true,
8
+ "sourceRoot": "/",
7
9
  "composite": true,
8
10
  "rootDir": "src",
9
11
  "declarationDir": "lib/types"