@voyantjs/crm 0.5.0 → 0.6.0

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 (36) hide show
  1. package/dist/booking-extension.d.ts +2 -2
  2. package/dist/booking-extension.d.ts.map +1 -1
  3. package/dist/booking-extension.js +2 -1
  4. package/dist/routes/accounts.d.ts +42 -64
  5. package/dist/routes/accounts.d.ts.map +1 -1
  6. package/dist/routes/accounts.js +22 -25
  7. package/dist/routes/activities.d.ts +6 -6
  8. package/dist/routes/activities.d.ts.map +1 -1
  9. package/dist/routes/activities.js +6 -5
  10. package/dist/routes/custom-fields.d.ts +6 -6
  11. package/dist/routes/custom-fields.d.ts.map +1 -1
  12. package/dist/routes/custom-fields.js +6 -5
  13. package/dist/routes/index.d.ts +73 -95
  14. package/dist/routes/index.d.ts.map +1 -1
  15. package/dist/routes/opportunities.d.ts +10 -10
  16. package/dist/routes/opportunities.d.ts.map +1 -1
  17. package/dist/routes/opportunities.js +7 -6
  18. package/dist/routes/pipelines.d.ts +2 -2
  19. package/dist/routes/pipelines.d.ts.map +1 -1
  20. package/dist/routes/pipelines.js +7 -6
  21. package/dist/routes/quotes.d.ts +7 -7
  22. package/dist/routes/quotes.d.ts.map +1 -1
  23. package/dist/routes/quotes.js +6 -5
  24. package/dist/schema-accounts.d.ts +1 -1
  25. package/dist/schema-activities.d.ts +1 -1
  26. package/dist/service/accounts-organizations.d.ts +4 -4
  27. package/dist/service/accounts-people.d.ts +21 -21
  28. package/dist/service/accounts.d.ts +25 -25
  29. package/dist/service/activities.d.ts +6 -6
  30. package/dist/service/custom-fields.d.ts +6 -6
  31. package/dist/service/index.d.ts +58 -58
  32. package/dist/service/opportunities.d.ts +10 -10
  33. package/dist/service/pipelines.d.ts +2 -2
  34. package/dist/service/quotes.d.ts +7 -7
  35. package/dist/validation.d.ts +11 -11
  36. package/package.json +5 -5
@@ -91,7 +91,7 @@ export declare const accountsService: {
91
91
  id: string;
92
92
  entityType: string;
93
93
  entityId: string;
94
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
94
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
95
95
  label: string | null;
96
96
  value: string;
97
97
  normalizedValue: string | null;
@@ -103,23 +103,23 @@ export declare const accountsService: {
103
103
  }[]>;
104
104
  createContactMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: import("./accounts-shared.js").CreateContactPointInput): Promise<{
105
105
  value: string;
106
+ metadata: Record<string, unknown> | null;
107
+ id: string;
106
108
  createdAt: Date;
107
109
  updatedAt: Date;
108
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
110
+ notes: string | null;
111
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
109
112
  entityType: string;
110
113
  entityId: string;
111
114
  label: string | null;
112
115
  normalizedValue: string | null;
113
116
  isPrimary: boolean;
114
- notes: string | null;
115
- metadata: Record<string, unknown> | null;
116
- id: string;
117
117
  } | null>;
118
118
  updateContactMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdateContactPointInput): Promise<{
119
119
  id: string;
120
120
  entityType: string;
121
121
  entityId: string;
122
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
122
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
123
123
  label: string | null;
124
124
  value: string;
125
125
  normalizedValue: string | null;
@@ -136,7 +136,7 @@ export declare const accountsService: {
136
136
  id: string;
137
137
  entityType: string;
138
138
  entityId: string;
139
- label: "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
139
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
140
140
  fullText: string | null;
141
141
  line1: string | null;
142
142
  line2: string | null;
@@ -154,14 +154,16 @@ export declare const accountsService: {
154
154
  updatedAt: Date;
155
155
  }[]>;
156
156
  createAddress(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: import("./accounts-shared.js").CreateAddressInput): Promise<{
157
+ metadata: Record<string, unknown> | null;
158
+ id: string;
157
159
  createdAt: Date;
158
160
  updatedAt: Date;
161
+ notes: string | null;
162
+ timezone: string | null;
159
163
  entityType: string;
160
164
  entityId: string;
161
- label: "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
165
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
162
166
  isPrimary: boolean;
163
- notes: string | null;
164
- metadata: Record<string, unknown> | null;
165
167
  fullText: string | null;
166
168
  line1: string | null;
167
169
  line2: string | null;
@@ -171,14 +173,12 @@ export declare const accountsService: {
171
173
  country: string | null;
172
174
  latitude: number | null;
173
175
  longitude: number | null;
174
- timezone: string | null;
175
- id: string;
176
176
  } | null>;
177
177
  updateAddress(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdateAddressInput): Promise<{
178
178
  id: string;
179
179
  entityType: string;
180
180
  entityId: string;
181
- label: "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
181
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
182
182
  fullText: string | null;
183
183
  line1: string | null;
184
184
  line2: string | null;
@@ -378,8 +378,8 @@ export declare const accountsService: {
378
378
  }, {}, {}>;
379
379
  }>, "where" | "orderBy">;
380
380
  createPersonNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, userId: string, data: import("./accounts-shared.js").CreatePersonNoteInput): Promise<{
381
- createdAt: Date;
382
381
  id: string;
382
+ createdAt: Date;
383
383
  personId: string;
384
384
  authorId: string;
385
385
  content: string;
@@ -564,8 +564,8 @@ export declare const accountsService: {
564
564
  }, {}, {}>;
565
565
  }>, "where" | "orderBy">;
566
566
  createOrganizationNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, organizationId: string, userId: string, data: import("./accounts-shared.js").CreateOrganizationNoteInput): Promise<{
567
- createdAt: Date;
568
567
  id: string;
568
+ createdAt: Date;
569
569
  organizationId: string;
570
570
  authorId: string;
571
571
  content: string;
@@ -578,8 +578,8 @@ export declare const accountsService: {
578
578
  createdAt: Date;
579
579
  } | null>;
580
580
  deletePersonNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
581
- createdAt: Date;
582
581
  id: string;
582
+ createdAt: Date;
583
583
  personId: string;
584
584
  authorId: string;
585
585
  content: string;
@@ -592,8 +592,8 @@ export declare const accountsService: {
592
592
  createdAt: Date;
593
593
  } | null>;
594
594
  deleteOrganizationNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
595
- createdAt: Date;
596
595
  id: string;
596
+ createdAt: Date;
597
597
  organizationId: string;
598
598
  authorId: string;
599
599
  content: string;
@@ -602,7 +602,7 @@ export declare const accountsService: {
602
602
  id: string;
603
603
  personId: string;
604
604
  organizationId: string | null;
605
- channel: "email" | "phone" | "whatsapp" | "sms" | "other" | "meeting";
605
+ channel: "email" | "other" | "phone" | "whatsapp" | "sms" | "meeting";
606
606
  direction: "inbound" | "outbound";
607
607
  subject: string | null;
608
608
  content: string | null;
@@ -610,12 +610,12 @@ export declare const accountsService: {
610
610
  createdAt: Date;
611
611
  }[]>;
612
612
  createCommunication(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, data: import("./accounts-shared.js").CreateCommunicationLogInput): Promise<{
613
- createdAt: Date;
614
613
  id: string;
614
+ createdAt: Date;
615
615
  organizationId: string | null;
616
616
  personId: string;
617
617
  content: string | null;
618
- channel: "email" | "phone" | "whatsapp" | "sms" | "other" | "meeting";
618
+ channel: "email" | "other" | "phone" | "whatsapp" | "sms" | "meeting";
619
619
  direction: "inbound" | "outbound";
620
620
  subject: string | null;
621
621
  sentAt: Date | null;
@@ -839,11 +839,11 @@ export declare const accountsService: {
839
839
  }, {}, {}>;
840
840
  }>, "orderBy">;
841
841
  createSegment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./accounts-shared.js").CreateSegmentInput): Promise<{
842
+ id: string;
842
843
  name: string;
843
844
  createdAt: Date;
844
845
  updatedAt: Date;
845
846
  description: string | null;
846
- id: string;
847
847
  conditions: Record<string, unknown> | null;
848
848
  } | undefined>;
849
849
  deleteSegment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, segmentId: string): Promise<{
@@ -908,21 +908,21 @@ export declare const accountsService: {
908
908
  archivedAt: Date | null;
909
909
  } | null>;
910
910
  createOrganization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./accounts-shared.js").CreateOrganizationInput): Promise<{
911
+ source: string | null;
911
912
  relation: "partner" | "supplier" | "other" | "client" | null;
913
+ id: string;
912
914
  name: string;
913
915
  createdAt: Date;
914
916
  updatedAt: Date;
915
- website: string | null;
917
+ status: "active" | "inactive" | "archived";
916
918
  notes: string | null;
917
- id: string;
919
+ website: string | null;
918
920
  legalName: string | null;
919
921
  industry: string | null;
920
922
  ownerId: string | null;
921
923
  defaultCurrency: string | null;
922
924
  preferredLanguage: string | null;
923
925
  paymentTerms: number | null;
924
- status: "active" | "inactive" | "archived";
925
- source: string | null;
926
926
  sourceRef: string | null;
927
927
  tags: string[];
928
928
  archivedAt: Date | null;
@@ -39,13 +39,13 @@ export declare const activitiesService: {
39
39
  updatedAt: Date;
40
40
  } | null>;
41
41
  createActivity(db: PostgresJsDatabase, data: CreateActivityInput): Promise<{
42
+ id: string;
42
43
  createdAt: Date;
43
44
  updatedAt: Date;
44
- description: string | null;
45
+ status: "done" | "planned" | "cancelled";
45
46
  type: "email" | "meeting" | "call" | "task" | "follow_up" | "note";
46
- id: string;
47
+ description: string | null;
47
48
  ownerId: string | null;
48
- status: "done" | "planned" | "cancelled";
49
49
  subject: string;
50
50
  dueAt: Date | null;
51
51
  completedAt: Date | null;
@@ -282,11 +282,11 @@ export declare const activitiesService: {
282
282
  }, {}, {}>;
283
283
  }>, "where" | "orderBy">;
284
284
  createActivityLink(db: PostgresJsDatabase, activityId: string, data: CreateActivityLinkInput): Promise<{
285
+ id: string;
285
286
  createdAt: Date;
287
+ role: "primary" | "related";
286
288
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
287
289
  entityId: string;
288
- role: "primary" | "related";
289
- id: string;
290
290
  activityId: string;
291
291
  } | undefined>;
292
292
  deleteActivityLink(db: PostgresJsDatabase, id: string): Promise<{
@@ -472,9 +472,9 @@ export declare const activitiesService: {
472
472
  }, {}, {}>;
473
473
  }>, "where" | "orderBy">;
474
474
  createActivityParticipant(db: PostgresJsDatabase, activityId: string, data: CreateActivityParticipantInput): Promise<{
475
+ id: string;
475
476
  createdAt: Date;
476
477
  isPrimary: boolean;
477
- id: string;
478
478
  personId: string;
479
479
  activityId: string;
480
480
  } | undefined>;
@@ -13,7 +13,7 @@ export declare const customFieldsService: {
13
13
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
14
14
  key: string;
15
15
  label: string;
16
- fieldType: "boolean" | "json" | "date" | "text" | "phone" | "set" | "enum" | "varchar" | "double" | "monetary" | "address";
16
+ fieldType: "boolean" | "json" | "date" | "set" | "enum" | "text" | "phone" | "varchar" | "double" | "monetary" | "address";
17
17
  isRequired: boolean;
18
18
  isSearchable: boolean;
19
19
  options: {
@@ -32,7 +32,7 @@ export declare const customFieldsService: {
32
32
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
33
33
  key: string;
34
34
  label: string;
35
- fieldType: "boolean" | "json" | "date" | "text" | "phone" | "set" | "enum" | "varchar" | "double" | "monetary" | "address";
35
+ fieldType: "boolean" | "json" | "date" | "set" | "enum" | "text" | "phone" | "varchar" | "double" | "monetary" | "address";
36
36
  isRequired: boolean;
37
37
  isSearchable: boolean;
38
38
  options: {
@@ -44,6 +44,7 @@ export declare const customFieldsService: {
44
44
  } | null>;
45
45
  createCustomFieldDefinition(db: PostgresJsDatabase, data: CreateCustomFieldDefinitionInput): Promise<{
46
46
  key: string;
47
+ id: string;
47
48
  createdAt: Date;
48
49
  updatedAt: Date;
49
50
  options: {
@@ -52,8 +53,7 @@ export declare const customFieldsService: {
52
53
  }[] | null;
53
54
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
54
55
  label: string;
55
- id: string;
56
- fieldType: "boolean" | "json" | "date" | "text" | "phone" | "set" | "enum" | "varchar" | "double" | "monetary" | "address";
56
+ fieldType: "boolean" | "json" | "date" | "set" | "enum" | "text" | "phone" | "varchar" | "double" | "monetary" | "address";
57
57
  isRequired: boolean;
58
58
  isSearchable: boolean;
59
59
  } | undefined>;
@@ -62,7 +62,7 @@ export declare const customFieldsService: {
62
62
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
63
63
  key: string;
64
64
  label: string;
65
- fieldType: "boolean" | "json" | "date" | "text" | "phone" | "set" | "enum" | "varchar" | "double" | "monetary" | "address";
65
+ fieldType: "boolean" | "json" | "date" | "set" | "enum" | "text" | "phone" | "varchar" | "double" | "monetary" | "address";
66
66
  isRequired: boolean;
67
67
  isSearchable: boolean;
68
68
  options: {
@@ -96,11 +96,11 @@ export declare const customFieldsService: {
96
96
  offset: number;
97
97
  }>;
98
98
  upsertCustomFieldValue(db: PostgresJsDatabase, definitionId: string, data: UpsertCustomFieldValueInput): Promise<{
99
+ id: string;
99
100
  createdAt: Date;
100
101
  updatedAt: Date;
101
102
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
102
103
  entityId: string;
103
- id: string;
104
104
  definitionId: string;
105
105
  textValue: string | null;
106
106
  numberValue: number | null;