@bisondesk/core-sdk 1.0.447 → 1.0.449

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/src/types/crm.ts CHANGED
@@ -30,23 +30,61 @@ export enum OrganizationActions {
30
30
 
31
31
  export type CrmEvent = CrmOrganizationEvent | CrmContactEvent;
32
32
 
33
- export type CrmContactEvent = BaseEvent & {
33
+ type BaseContactEvent = BaseEvent & {
34
34
  contactId: string;
35
35
  organizationId?: string;
36
- action: 'upsert' | 'delete';
37
36
  actionAt: string;
38
37
  userId: string;
39
38
  tenantId: string;
40
39
  };
41
40
 
42
- export type CrmOrganizationEvent = BaseEvent & {
41
+ export type ContactCreateEvent = BaseContactEvent & {
42
+ action: 'create';
43
+ contact: Contact;
44
+ previousContact?: undefined;
45
+ };
46
+
47
+ export type ContactUpdateEvent = BaseContactEvent & {
48
+ action: 'update';
49
+ contact: Contact;
50
+ previousContact: Contact;
51
+ };
52
+
53
+ export type ContactDeleteEvent = BaseContactEvent & {
54
+ action: 'delete';
55
+ contact?: undefined;
56
+ previousContact: Contact;
57
+ };
58
+
59
+ export type CrmContactEvent = ContactCreateEvent | ContactUpdateEvent | ContactDeleteEvent;
60
+
61
+ type BaseOrgEvent = BaseEvent & {
43
62
  organizationId: string;
44
- action: 'upsert' | 'delete';
45
63
  actionAt: string;
46
64
  userId: string;
47
65
  tenantId: string;
48
66
  };
49
67
 
68
+ export type OrgCreateEvent = BaseOrgEvent & {
69
+ action: 'create';
70
+ org: Organization;
71
+ previousOrg?: undefined;
72
+ };
73
+
74
+ export type OrgUpdateEvent = BaseOrgEvent & {
75
+ action: 'update';
76
+ org: Organization;
77
+ previousOrg: Organization;
78
+ };
79
+
80
+ export type OrgDeleteEvent = BaseOrgEvent & {
81
+ action: 'delete';
82
+ org?: undefined;
83
+ previousOrg: Organization;
84
+ };
85
+
86
+ export type CrmOrganizationEvent = OrgCreateEvent | OrgUpdateEvent | OrgDeleteEvent;
87
+
50
88
  type BaseOrganization = {
51
89
  usages: {
52
90
  [tenantId: string]: string[]; // branchIds that are using this organization
@@ -194,6 +232,13 @@ export type NewContact = BaseContact & {
194
232
  phones: Array<PhoneNumberValue | PhoneNumberRawValue>;
195
233
  };
196
234
 
235
+ export type NewContactValidated = BaseContact & {
236
+ id?: undefined;
237
+ createdAt?: undefined;
238
+ createdBy?: undefined;
239
+ phones: PhoneNumberValue[];
240
+ };
241
+
197
242
  export type Contact = BaseContact & {
198
243
  id: string;
199
244
  createdAt: string;
@@ -409,6 +409,7 @@ export type AmortizationTableTemplateData = {
409
409
  offerNumber: string;
410
410
  contractNumber: string;
411
411
  vatPercentage: string;
412
+ totalLeasingAmount: string;
412
413
  };
413
414
  amortization: {
414
415
  period: number;
@@ -569,6 +569,8 @@ export type HpLeasingContractRequest = {
569
569
  processMetaId: string;
570
570
  processRunData: {
571
571
  entityOwner: string;
572
+ leasingContractOwner: string;
573
+ totalLeasingAmount: string;
572
574
  company?: string;
573
575
  vehicle?: string;
574
576
  ldNumber: number;
@@ -656,6 +658,8 @@ export type HpLeasingDealReturnRequest = {
656
658
  processRunData: {
657
659
  entityOwner: string;
658
660
  leasingContractNumber2: string;
661
+ leasingContractNumber: string;
662
+ opportunityContractId: string;
659
663
  company: string;
660
664
  vehicle: string;
661
665
  };
@@ -89,6 +89,7 @@ export type NewUserCommissionPayment = {
89
89
  paidBy: string;
90
90
  paidAt: string;
91
91
  amount: string;
92
+ comments?: string; // optional comment
92
93
  };
93
94
 
94
95
  export type UserCommissionPayment = {
@@ -1,7 +1,7 @@
1
- export type ClientModePinValidationRequest = {
1
+ export type PinValidationRequest = {
2
2
  pin: string;
3
3
  };
4
4
 
5
- export type ClientModePinValidationResponse = {
5
+ export type PinValidationResponse = {
6
6
  valid: boolean;
7
7
  };