@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
@@ -9,7 +9,7 @@ export declare const crmService: {
9
9
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
10
10
  key: string;
11
11
  label: string;
12
- fieldType: "boolean" | "json" | "date" | "text" | "phone" | "set" | "enum" | "varchar" | "double" | "monetary" | "address";
12
+ fieldType: "boolean" | "json" | "date" | "set" | "enum" | "text" | "phone" | "varchar" | "double" | "monetary" | "address";
13
13
  isRequired: boolean;
14
14
  isSearchable: boolean;
15
15
  options: {
@@ -28,7 +28,7 @@ export declare const crmService: {
28
28
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
29
29
  key: string;
30
30
  label: string;
31
- fieldType: "boolean" | "json" | "date" | "text" | "phone" | "set" | "enum" | "varchar" | "double" | "monetary" | "address";
31
+ fieldType: "boolean" | "json" | "date" | "set" | "enum" | "text" | "phone" | "varchar" | "double" | "monetary" | "address";
32
32
  isRequired: boolean;
33
33
  isSearchable: boolean;
34
34
  options: {
@@ -42,7 +42,7 @@ export declare const crmService: {
42
42
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
43
43
  key: string;
44
44
  label: string;
45
- fieldType: "boolean" | "json" | "date" | "text" | "phone" | "set" | "enum" | "varchar" | "double" | "monetary" | "address";
45
+ fieldType: "boolean" | "json" | "date" | "set" | "enum" | "text" | "phone" | "varchar" | "double" | "monetary" | "address";
46
46
  isRequired: boolean;
47
47
  isSearchable: boolean;
48
48
  options?: {
@@ -51,6 +51,7 @@ export declare const crmService: {
51
51
  }[] | null | undefined;
52
52
  }): Promise<{
53
53
  key: string;
54
+ id: string;
54
55
  createdAt: Date;
55
56
  updatedAt: Date;
56
57
  options: {
@@ -59,8 +60,7 @@ export declare const crmService: {
59
60
  }[] | null;
60
61
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
61
62
  label: string;
62
- id: string;
63
- fieldType: "boolean" | "json" | "date" | "text" | "phone" | "set" | "enum" | "varchar" | "double" | "monetary" | "address";
63
+ fieldType: "boolean" | "json" | "date" | "set" | "enum" | "text" | "phone" | "varchar" | "double" | "monetary" | "address";
64
64
  isRequired: boolean;
65
65
  isSearchable: boolean;
66
66
  } | undefined>;
@@ -68,7 +68,7 @@ export declare const crmService: {
68
68
  entityType?: "organization" | "person" | "opportunity" | "quote" | "activity" | undefined;
69
69
  key?: string | undefined;
70
70
  label?: string | undefined;
71
- fieldType?: "boolean" | "json" | "date" | "text" | "phone" | "set" | "enum" | "varchar" | "double" | "monetary" | "address" | undefined;
71
+ fieldType?: "boolean" | "json" | "date" | "set" | "enum" | "text" | "phone" | "varchar" | "double" | "monetary" | "address" | undefined;
72
72
  isRequired?: boolean | undefined;
73
73
  isSearchable?: boolean | undefined;
74
74
  options?: {
@@ -80,7 +80,7 @@ export declare const crmService: {
80
80
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
81
81
  key: string;
82
82
  label: string;
83
- fieldType: "boolean" | "json" | "date" | "text" | "phone" | "set" | "enum" | "varchar" | "double" | "monetary" | "address";
83
+ fieldType: "boolean" | "json" | "date" | "set" | "enum" | "text" | "phone" | "varchar" | "double" | "monetary" | "address";
84
84
  isRequired: boolean;
85
85
  isSearchable: boolean;
86
86
  options: {
@@ -130,11 +130,11 @@ export declare const crmService: {
130
130
  currencyCode?: string | null | undefined;
131
131
  jsonValue?: Record<string, unknown> | string[] | null | undefined;
132
132
  }): Promise<{
133
+ id: string;
133
134
  createdAt: Date;
134
135
  updatedAt: Date;
135
136
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
136
137
  entityId: string;
137
- id: string;
138
138
  definitionId: string;
139
139
  textValue: string | null;
140
140
  numberValue: number | null;
@@ -197,13 +197,13 @@ export declare const crmService: {
197
197
  location?: string | null | undefined;
198
198
  description?: string | null | undefined;
199
199
  }): Promise<{
200
+ id: string;
200
201
  createdAt: Date;
201
202
  updatedAt: Date;
202
- description: string | null;
203
+ status: "done" | "planned" | "cancelled";
203
204
  type: "email" | "meeting" | "call" | "task" | "follow_up" | "note";
204
- id: string;
205
+ description: string | null;
205
206
  ownerId: string | null;
206
- status: "done" | "planned" | "cancelled";
207
207
  subject: string;
208
208
  dueAt: Date | null;
209
209
  completedAt: Date | null;
@@ -453,11 +453,11 @@ export declare const crmService: {
453
453
  entityId: string;
454
454
  role: "primary" | "related";
455
455
  }): Promise<{
456
+ id: string;
456
457
  createdAt: Date;
458
+ role: "primary" | "related";
457
459
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
458
460
  entityId: string;
459
- role: "primary" | "related";
460
- id: string;
461
461
  activityId: string;
462
462
  } | undefined>;
463
463
  deleteActivityLink(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
@@ -646,9 +646,9 @@ export declare const crmService: {
646
646
  personId: string;
647
647
  isPrimary: boolean;
648
648
  }): Promise<{
649
+ id: string;
649
650
  createdAt: Date;
650
651
  isPrimary: boolean;
651
- id: string;
652
652
  personId: string;
653
653
  activityId: string;
654
654
  } | undefined>;
@@ -703,14 +703,14 @@ export declare const crmService: {
703
703
  validUntil?: string | null | undefined;
704
704
  notes?: string | null | undefined;
705
705
  }): Promise<{
706
- opportunityId: string;
706
+ id: string;
707
707
  createdAt: Date;
708
708
  updatedAt: Date;
709
- notes: string | null;
710
- id: string;
711
709
  status: "archived" | "draft" | "sent" | "accepted" | "expired" | "rejected";
712
- archivedAt: Date | null;
713
710
  currency: string;
711
+ notes: string | null;
712
+ opportunityId: string;
713
+ archivedAt: Date | null;
714
714
  validUntil: string | null;
715
715
  subtotalAmountCents: number;
716
716
  taxAmountCents: number;
@@ -1140,16 +1140,16 @@ export declare const crmService: {
1140
1140
  productId?: string | null | undefined;
1141
1141
  supplierServiceId?: string | null | undefined;
1142
1142
  }): Promise<{
1143
- quoteId: string;
1143
+ id: string;
1144
1144
  createdAt: Date;
1145
1145
  updatedAt: Date;
1146
+ currency: string;
1146
1147
  description: string;
1147
- id: string;
1148
+ quoteId: string;
1148
1149
  productId: string | null;
1149
1150
  supplierServiceId: string | null;
1150
1151
  quantity: number;
1151
1152
  unitPriceAmountCents: number;
1152
- currency: string;
1153
1153
  totalAmountCents: number;
1154
1154
  } | undefined>;
1155
1155
  updateQuoteLine(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: {
@@ -1249,16 +1249,16 @@ export declare const crmService: {
1249
1249
  sourceRef?: string | null | undefined;
1250
1250
  lostReason?: string | null | undefined;
1251
1251
  }): Promise<{
1252
+ source: string | null;
1253
+ id: string;
1252
1254
  createdAt: Date;
1253
1255
  updatedAt: Date;
1256
+ organizationId: string | null;
1257
+ status: "archived" | "open" | "won" | "lost";
1254
1258
  title: string;
1255
- id: string;
1256
1259
  ownerId: string | null;
1257
- status: "archived" | "open" | "won" | "lost";
1258
- source: string | null;
1259
1260
  sourceRef: string | null;
1260
1261
  tags: string[];
1261
- organizationId: string | null;
1262
1262
  personId: string | null;
1263
1263
  pipelineId: string;
1264
1264
  stageId: string;
@@ -1527,11 +1527,11 @@ export declare const crmService: {
1527
1527
  role: "other" | "traveler" | "booker" | "decision_maker" | "finance";
1528
1528
  isPrimary: boolean;
1529
1529
  }): Promise<{
1530
- opportunityId: string;
1530
+ id: string;
1531
1531
  createdAt: Date;
1532
- isPrimary: boolean;
1533
1532
  role: "other" | "traveler" | "booker" | "decision_maker" | "finance";
1534
- id: string;
1533
+ opportunityId: string;
1534
+ isPrimary: boolean;
1535
1535
  personId: string;
1536
1536
  } | undefined>;
1537
1537
  deleteOpportunityParticipant(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
@@ -2007,18 +2007,18 @@ export declare const crmService: {
2007
2007
  currency?: string | null | undefined;
2008
2008
  discountAmountCents?: number | null | undefined;
2009
2009
  }): Promise<{
2010
- opportunityId: string;
2010
+ id: string;
2011
2011
  createdAt: Date;
2012
2012
  updatedAt: Date;
2013
+ currency: string | null;
2013
2014
  description: string | null;
2014
- id: string;
2015
+ opportunityId: string;
2015
2016
  productId: string | null;
2016
2017
  supplierServiceId: string | null;
2017
2018
  nameSnapshot: string;
2018
2019
  quantity: number;
2019
2020
  unitPriceAmountCents: number | null;
2020
2021
  costAmountCents: number | null;
2021
- currency: string | null;
2022
2022
  discountAmountCents: number | null;
2023
2023
  } | undefined>;
2024
2024
  updateOpportunityProduct(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: {
@@ -2082,11 +2082,11 @@ export declare const crmService: {
2082
2082
  isDefault: boolean;
2083
2083
  sortOrder: number;
2084
2084
  }): Promise<{
2085
+ id: string;
2085
2086
  name: string;
2086
2087
  createdAt: Date;
2087
2088
  updatedAt: Date;
2088
2089
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
2089
- id: string;
2090
2090
  isDefault: boolean;
2091
2091
  sortOrder: number;
2092
2092
  } | undefined>;
@@ -2149,10 +2149,10 @@ export declare const crmService: {
2149
2149
  isLost: boolean;
2150
2150
  probability?: number | null | undefined;
2151
2151
  }): Promise<{
2152
+ id: string;
2152
2153
  name: string;
2153
2154
  createdAt: Date;
2154
2155
  updatedAt: Date;
2155
- id: string;
2156
2156
  sortOrder: number;
2157
2157
  pipelineId: string;
2158
2158
  probability: number | null;
@@ -2275,7 +2275,7 @@ export declare const crmService: {
2275
2275
  id: string;
2276
2276
  entityType: string;
2277
2277
  entityId: string;
2278
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
2278
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
2279
2279
  label: string | null;
2280
2280
  value: string;
2281
2281
  normalizedValue: string | null;
@@ -2287,23 +2287,23 @@ export declare const crmService: {
2287
2287
  }[]>;
2288
2288
  createContactMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: import("./accounts-shared.js").CreateContactPointInput): Promise<{
2289
2289
  value: string;
2290
+ metadata: Record<string, unknown> | null;
2291
+ id: string;
2290
2292
  createdAt: Date;
2291
2293
  updatedAt: Date;
2292
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
2294
+ notes: string | null;
2295
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
2293
2296
  entityType: string;
2294
2297
  entityId: string;
2295
2298
  label: string | null;
2296
2299
  normalizedValue: string | null;
2297
2300
  isPrimary: boolean;
2298
- notes: string | null;
2299
- metadata: Record<string, unknown> | null;
2300
- id: string;
2301
2301
  } | null>;
2302
2302
  updateContactMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdateContactPointInput): Promise<{
2303
2303
  id: string;
2304
2304
  entityType: string;
2305
2305
  entityId: string;
2306
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
2306
+ kind: "email" | "other" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social";
2307
2307
  label: string | null;
2308
2308
  value: string;
2309
2309
  normalizedValue: string | null;
@@ -2320,7 +2320,7 @@ export declare const crmService: {
2320
2320
  id: string;
2321
2321
  entityType: string;
2322
2322
  entityId: string;
2323
- label: "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
2323
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
2324
2324
  fullText: string | null;
2325
2325
  line1: string | null;
2326
2326
  line2: string | null;
@@ -2338,14 +2338,16 @@ export declare const crmService: {
2338
2338
  updatedAt: Date;
2339
2339
  }[]>;
2340
2340
  createAddress(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: import("./accounts-shared.js").CreateAddressInput): Promise<{
2341
+ metadata: Record<string, unknown> | null;
2342
+ id: string;
2341
2343
  createdAt: Date;
2342
2344
  updatedAt: Date;
2345
+ notes: string | null;
2346
+ timezone: string | null;
2343
2347
  entityType: string;
2344
2348
  entityId: string;
2345
- label: "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
2349
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
2346
2350
  isPrimary: boolean;
2347
- notes: string | null;
2348
- metadata: Record<string, unknown> | null;
2349
2351
  fullText: string | null;
2350
2352
  line1: string | null;
2351
2353
  line2: string | null;
@@ -2355,14 +2357,12 @@ export declare const crmService: {
2355
2357
  country: string | null;
2356
2358
  latitude: number | null;
2357
2359
  longitude: number | null;
2358
- timezone: string | null;
2359
- id: string;
2360
2360
  } | null>;
2361
2361
  updateAddress(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdateAddressInput): Promise<{
2362
2362
  id: string;
2363
2363
  entityType: string;
2364
2364
  entityId: string;
2365
- label: "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
2365
+ label: "service" | "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "legal";
2366
2366
  fullText: string | null;
2367
2367
  line1: string | null;
2368
2368
  line2: string | null;
@@ -2562,8 +2562,8 @@ export declare const crmService: {
2562
2562
  }, {}, {}>;
2563
2563
  }>, "where" | "orderBy">;
2564
2564
  createPersonNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, userId: string, data: import("./accounts-shared.js").CreatePersonNoteInput): Promise<{
2565
- createdAt: Date;
2566
2565
  id: string;
2566
+ createdAt: Date;
2567
2567
  personId: string;
2568
2568
  authorId: string;
2569
2569
  content: string;
@@ -2748,8 +2748,8 @@ export declare const crmService: {
2748
2748
  }, {}, {}>;
2749
2749
  }>, "where" | "orderBy">;
2750
2750
  createOrganizationNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, organizationId: string, userId: string, data: import("./accounts-shared.js").CreateOrganizationNoteInput): Promise<{
2751
- createdAt: Date;
2752
2751
  id: string;
2752
+ createdAt: Date;
2753
2753
  organizationId: string;
2754
2754
  authorId: string;
2755
2755
  content: string;
@@ -2762,8 +2762,8 @@ export declare const crmService: {
2762
2762
  createdAt: Date;
2763
2763
  } | null>;
2764
2764
  deletePersonNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
2765
- createdAt: Date;
2766
2765
  id: string;
2766
+ createdAt: Date;
2767
2767
  personId: string;
2768
2768
  authorId: string;
2769
2769
  content: string;
@@ -2776,8 +2776,8 @@ export declare const crmService: {
2776
2776
  createdAt: Date;
2777
2777
  } | null>;
2778
2778
  deleteOrganizationNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
2779
- createdAt: Date;
2780
2779
  id: string;
2780
+ createdAt: Date;
2781
2781
  organizationId: string;
2782
2782
  authorId: string;
2783
2783
  content: string;
@@ -2786,7 +2786,7 @@ export declare const crmService: {
2786
2786
  id: string;
2787
2787
  personId: string;
2788
2788
  organizationId: string | null;
2789
- channel: "email" | "phone" | "whatsapp" | "sms" | "other" | "meeting";
2789
+ channel: "email" | "other" | "phone" | "whatsapp" | "sms" | "meeting";
2790
2790
  direction: "inbound" | "outbound";
2791
2791
  subject: string | null;
2792
2792
  content: string | null;
@@ -2794,12 +2794,12 @@ export declare const crmService: {
2794
2794
  createdAt: Date;
2795
2795
  }[]>;
2796
2796
  createCommunication(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, data: import("./accounts-shared.js").CreateCommunicationLogInput): Promise<{
2797
- createdAt: Date;
2798
2797
  id: string;
2798
+ createdAt: Date;
2799
2799
  organizationId: string | null;
2800
2800
  personId: string;
2801
2801
  content: string | null;
2802
- channel: "email" | "phone" | "whatsapp" | "sms" | "other" | "meeting";
2802
+ channel: "email" | "other" | "phone" | "whatsapp" | "sms" | "meeting";
2803
2803
  direction: "inbound" | "outbound";
2804
2804
  subject: string | null;
2805
2805
  sentAt: Date | null;
@@ -3023,11 +3023,11 @@ export declare const crmService: {
3023
3023
  }, {}, {}>;
3024
3024
  }>, "orderBy">;
3025
3025
  createSegment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./accounts-shared.js").CreateSegmentInput): Promise<{
3026
+ id: string;
3026
3027
  name: string;
3027
3028
  createdAt: Date;
3028
3029
  updatedAt: Date;
3029
3030
  description: string | null;
3030
- id: string;
3031
3031
  conditions: Record<string, unknown> | null;
3032
3032
  } | undefined>;
3033
3033
  deleteSegment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, segmentId: string): Promise<{
@@ -3092,21 +3092,21 @@ export declare const crmService: {
3092
3092
  archivedAt: Date | null;
3093
3093
  } | null>;
3094
3094
  createOrganization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./accounts-shared.js").CreateOrganizationInput): Promise<{
3095
+ source: string | null;
3095
3096
  relation: "partner" | "supplier" | "other" | "client" | null;
3097
+ id: string;
3096
3098
  name: string;
3097
3099
  createdAt: Date;
3098
3100
  updatedAt: Date;
3099
- website: string | null;
3101
+ status: "active" | "inactive" | "archived";
3100
3102
  notes: string | null;
3101
- id: string;
3103
+ website: string | null;
3102
3104
  legalName: string | null;
3103
3105
  industry: string | null;
3104
3106
  ownerId: string | null;
3105
3107
  defaultCurrency: string | null;
3106
3108
  preferredLanguage: string | null;
3107
3109
  paymentTerms: number | null;
3108
- status: "active" | "inactive" | "archived";
3109
- source: string | null;
3110
3110
  sourceRef: string | null;
3111
3111
  tags: string[];
3112
3112
  archivedAt: Date | null;
@@ -56,16 +56,16 @@ export declare const opportunitiesService: {
56
56
  closedAt: Date | null;
57
57
  } | null>;
58
58
  createOpportunity(db: PostgresJsDatabase, data: CreateOpportunityInput): Promise<{
59
+ source: string | null;
60
+ id: string;
59
61
  createdAt: Date;
60
62
  updatedAt: Date;
63
+ organizationId: string | null;
64
+ status: "archived" | "open" | "won" | "lost";
61
65
  title: string;
62
- id: string;
63
66
  ownerId: string | null;
64
- status: "archived" | "open" | "won" | "lost";
65
- source: string | null;
66
67
  sourceRef: string | null;
67
68
  tags: string[];
68
- organizationId: string | null;
69
69
  personId: string | null;
70
70
  pipelineId: string;
71
71
  stageId: string;
@@ -315,11 +315,11 @@ export declare const opportunitiesService: {
315
315
  }, {}, {}>;
316
316
  }>, "where" | "orderBy">;
317
317
  createOpportunityParticipant(db: PostgresJsDatabase, opportunityId: string, data: CreateOpportunityParticipantInput): Promise<{
318
- opportunityId: string;
318
+ id: string;
319
319
  createdAt: Date;
320
- isPrimary: boolean;
321
320
  role: "other" | "traveler" | "booker" | "decision_maker" | "finance";
322
- id: string;
321
+ opportunityId: string;
322
+ isPrimary: boolean;
323
323
  personId: string;
324
324
  } | undefined>;
325
325
  deleteOpportunityParticipant(db: PostgresJsDatabase, id: string): Promise<{
@@ -785,18 +785,18 @@ export declare const opportunitiesService: {
785
785
  }, {}, {}>;
786
786
  }>, "where" | "orderBy">;
787
787
  createOpportunityProduct(db: PostgresJsDatabase, opportunityId: string, data: CreateOpportunityProductInput): Promise<{
788
- opportunityId: string;
788
+ id: string;
789
789
  createdAt: Date;
790
790
  updatedAt: Date;
791
+ currency: string | null;
791
792
  description: string | null;
792
- id: string;
793
+ opportunityId: string;
793
794
  productId: string | null;
794
795
  supplierServiceId: string | null;
795
796
  nameSnapshot: string;
796
797
  quantity: number;
797
798
  unitPriceAmountCents: number | null;
798
799
  costAmountCents: number | null;
799
- currency: string | null;
800
800
  discountAmountCents: number | null;
801
801
  } | undefined>;
802
802
  updateOpportunityProduct(db: PostgresJsDatabase, id: string, data: UpdateOpportunityProductInput): Promise<{
@@ -32,11 +32,11 @@ export declare const pipelinesService: {
32
32
  updatedAt: Date;
33
33
  } | null>;
34
34
  createPipeline(db: PostgresJsDatabase, data: CreatePipelineInput): Promise<{
35
+ id: string;
35
36
  name: string;
36
37
  createdAt: Date;
37
38
  updatedAt: Date;
38
39
  entityType: "organization" | "person" | "opportunity" | "quote" | "activity";
39
- id: string;
40
40
  isDefault: boolean;
41
41
  sortOrder: number;
42
42
  } | undefined>;
@@ -82,10 +82,10 @@ export declare const pipelinesService: {
82
82
  updatedAt: Date;
83
83
  } | null>;
84
84
  createStage(db: PostgresJsDatabase, data: CreateStageInput): Promise<{
85
+ id: string;
85
86
  name: string;
86
87
  createdAt: Date;
87
88
  updatedAt: Date;
88
- id: string;
89
89
  sortOrder: number;
90
90
  pipelineId: string;
91
91
  probability: number | null;
@@ -41,14 +41,14 @@ export declare const quotesService: {
41
41
  archivedAt: Date | null;
42
42
  } | null>;
43
43
  createQuote(db: PostgresJsDatabase, data: CreateQuoteInput): Promise<{
44
- opportunityId: string;
44
+ id: string;
45
45
  createdAt: Date;
46
46
  updatedAt: Date;
47
- notes: string | null;
48
- id: string;
49
47
  status: "archived" | "draft" | "sent" | "accepted" | "expired" | "rejected";
50
- archivedAt: Date | null;
51
48
  currency: string;
49
+ notes: string | null;
50
+ opportunityId: string;
51
+ archivedAt: Date | null;
52
52
  validUntil: string | null;
53
53
  subtotalAmountCents: number;
54
54
  taxAmountCents: number;
@@ -461,16 +461,16 @@ export declare const quotesService: {
461
461
  }, {}, {}>;
462
462
  }>, "where" | "orderBy">;
463
463
  createQuoteLine(db: PostgresJsDatabase, quoteId: string, data: CreateQuoteLineInput): Promise<{
464
- quoteId: string;
464
+ id: string;
465
465
  createdAt: Date;
466
466
  updatedAt: Date;
467
+ currency: string;
467
468
  description: string;
468
- id: string;
469
+ quoteId: string;
469
470
  productId: string | null;
470
471
  supplierServiceId: string | null;
471
472
  quantity: number;
472
473
  unitPriceAmountCents: number;
473
- currency: string;
474
474
  totalAmountCents: number;
475
475
  } | undefined>;
476
476
  updateQuoteLine(db: PostgresJsDatabase, id: string, data: UpdateQuoteLineInput): Promise<{
@@ -19,10 +19,10 @@ export declare const relationTypeSchema: z.ZodEnum<{
19
19
  }>;
20
20
  export declare const communicationChannelSchema: z.ZodEnum<{
21
21
  email: "email";
22
+ other: "other";
22
23
  phone: "phone";
23
24
  whatsapp: "whatsapp";
24
25
  sms: "sms";
25
- other: "other";
26
26
  meeting: "meeting";
27
27
  }>;
28
28
  export declare const communicationDirectionSchema: z.ZodEnum<{
@@ -71,10 +71,10 @@ export declare const customFieldTypeSchema: z.ZodEnum<{
71
71
  boolean: "boolean";
72
72
  json: "json";
73
73
  date: "date";
74
- text: "text";
75
- phone: "phone";
76
74
  set: "set";
77
75
  enum: "enum";
76
+ text: "text";
77
+ phone: "phone";
78
78
  varchar: "varchar";
79
79
  double: "double";
80
80
  monetary: "monetary";
@@ -687,10 +687,10 @@ export declare const customFieldDefinitionCoreSchema: z.ZodObject<{
687
687
  boolean: "boolean";
688
688
  json: "json";
689
689
  date: "date";
690
- text: "text";
691
- phone: "phone";
692
690
  set: "set";
693
691
  enum: "enum";
692
+ text: "text";
693
+ phone: "phone";
694
694
  varchar: "varchar";
695
695
  double: "double";
696
696
  monetary: "monetary";
@@ -717,10 +717,10 @@ export declare const insertCustomFieldDefinitionSchema: z.ZodObject<{
717
717
  boolean: "boolean";
718
718
  json: "json";
719
719
  date: "date";
720
- text: "text";
721
- phone: "phone";
722
720
  set: "set";
723
721
  enum: "enum";
722
+ text: "text";
723
+ phone: "phone";
724
724
  varchar: "varchar";
725
725
  double: "double";
726
726
  monetary: "monetary";
@@ -747,10 +747,10 @@ export declare const updateCustomFieldDefinitionSchema: z.ZodObject<{
747
747
  boolean: "boolean";
748
748
  json: "json";
749
749
  date: "date";
750
- text: "text";
751
- phone: "phone";
752
750
  set: "set";
753
751
  enum: "enum";
752
+ text: "text";
753
+ phone: "phone";
754
754
  varchar: "varchar";
755
755
  double: "double";
756
756
  monetary: "monetary";
@@ -820,10 +820,10 @@ export declare const insertCommunicationLogSchema: z.ZodObject<{
820
820
  organizationId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
821
821
  channel: z.ZodEnum<{
822
822
  email: "email";
823
+ other: "other";
823
824
  phone: "phone";
824
825
  whatsapp: "whatsapp";
825
826
  sms: "sms";
826
- other: "other";
827
827
  meeting: "meeting";
828
828
  }>;
829
829
  direction: z.ZodEnum<{
@@ -839,10 +839,10 @@ export declare const communicationListQuerySchema: z.ZodObject<{
839
839
  offset: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
840
840
  channel: z.ZodOptional<z.ZodEnum<{
841
841
  email: "email";
842
+ other: "other";
842
843
  phone: "phone";
843
844
  whatsapp: "whatsapp";
844
845
  sms: "sms";
845
- other: "other";
846
846
  meeting: "meeting";
847
847
  }>>;
848
848
  direction: z.ZodOptional<z.ZodEnum<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/crm",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "license": "FSL-1.1-Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -29,10 +29,10 @@
29
29
  "drizzle-orm": "^0.45.2",
30
30
  "hono": "^4.12.10",
31
31
  "zod": "^4.3.6",
32
- "@voyantjs/core": "0.5.0",
33
- "@voyantjs/db": "0.5.0",
34
- "@voyantjs/hono": "0.5.0",
35
- "@voyantjs/identity": "0.5.0"
32
+ "@voyantjs/core": "0.6.0",
33
+ "@voyantjs/db": "0.6.0",
34
+ "@voyantjs/hono": "0.6.0",
35
+ "@voyantjs/identity": "0.6.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "^6.0.2",