@voyantjs/crm 0.2.0 → 0.3.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 (37) hide show
  1. package/dist/routes/accounts.d.ts +1 -1
  2. package/dist/routes/index.d.ts +2 -2
  3. package/dist/routes/opportunities.d.ts +1 -1
  4. package/dist/schema-accounts.d.ts +1175 -0
  5. package/dist/schema-accounts.d.ts.map +1 -0
  6. package/dist/schema-accounts.js +112 -0
  7. package/dist/schema-activities.d.ts +821 -0
  8. package/dist/schema-activities.d.ts.map +1 -0
  9. package/dist/schema-activities.js +83 -0
  10. package/dist/schema-relations.d.ts +81 -0
  11. package/dist/schema-relations.d.ts.map +1 -0
  12. package/dist/schema-relations.js +123 -0
  13. package/dist/schema-sales.d.ts +1392 -0
  14. package/dist/schema-sales.d.ts.map +1 -0
  15. package/dist/schema-sales.js +142 -0
  16. package/dist/schema-shared.d.ts +13 -0
  17. package/dist/schema-shared.d.ts.map +1 -0
  18. package/dist/schema-shared.js +63 -0
  19. package/dist/schema.d.ts +5 -3477
  20. package/dist/schema.d.ts.map +1 -1
  21. package/dist/schema.js +5 -515
  22. package/dist/service/accounts-organizations.d.ts +93 -0
  23. package/dist/service/accounts-organizations.d.ts.map +1 -0
  24. package/dist/service/accounts-organizations.js +49 -0
  25. package/dist/service/accounts-people.d.ts +868 -0
  26. package/dist/service/accounts-people.d.ts.map +1 -0
  27. package/dist/service/accounts-people.js +311 -0
  28. package/dist/service/accounts-shared.d.ts +54 -0
  29. package/dist/service/accounts-shared.d.ts.map +1 -0
  30. package/dist/service/accounts-shared.js +152 -0
  31. package/dist/service/accounts.d.ts +121 -149
  32. package/dist/service/accounts.d.ts.map +1 -1
  33. package/dist/service/accounts.js +4 -507
  34. package/dist/service/index.d.ts +106 -297
  35. package/dist/service/index.d.ts.map +1 -1
  36. package/dist/service/opportunities.d.ts +1 -1
  37. package/package.json +5 -5
@@ -1259,8 +1259,8 @@ export declare const crmService: {
1259
1259
  sourceRef: string | null;
1260
1260
  tags: string[];
1261
1261
  organizationId: string | null;
1262
- pipelineId: string;
1263
1262
  personId: string | null;
1263
+ pipelineId: string;
1264
1264
  stageId: string;
1265
1265
  valueAmountCents: number | null;
1266
1266
  valueCurrency: string | null;
@@ -2183,140 +2183,7 @@ export declare const crmService: {
2183
2183
  deleteStage(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
2184
2184
  id: string;
2185
2185
  } | null>;
2186
- listOrganizations(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: {
2187
- limit: number;
2188
- offset: number;
2189
- ownerId?: string | undefined;
2190
- relation?: "partner" | "supplier" | "other" | "client" | undefined;
2191
- status?: "active" | "inactive" | "archived" | undefined;
2192
- search?: string | undefined;
2193
- }): Promise<{
2194
- data: {
2195
- id: string;
2196
- name: string;
2197
- legalName: string | null;
2198
- website: string | null;
2199
- industry: string | null;
2200
- relation: "partner" | "supplier" | "other" | "client" | null;
2201
- ownerId: string | null;
2202
- defaultCurrency: string | null;
2203
- preferredLanguage: string | null;
2204
- paymentTerms: number | null;
2205
- status: "active" | "inactive" | "archived";
2206
- source: string | null;
2207
- sourceRef: string | null;
2208
- tags: string[];
2209
- notes: string | null;
2210
- createdAt: Date;
2211
- updatedAt: Date;
2212
- archivedAt: Date | null;
2213
- }[];
2214
- total: number;
2215
- limit: number;
2216
- offset: number;
2217
- }>;
2218
- getOrganizationById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
2219
- id: string;
2220
- name: string;
2221
- legalName: string | null;
2222
- website: string | null;
2223
- industry: string | null;
2224
- relation: "partner" | "supplier" | "other" | "client" | null;
2225
- ownerId: string | null;
2226
- defaultCurrency: string | null;
2227
- preferredLanguage: string | null;
2228
- paymentTerms: number | null;
2229
- status: "active" | "inactive" | "archived";
2230
- source: string | null;
2231
- sourceRef: string | null;
2232
- tags: string[];
2233
- notes: string | null;
2234
- createdAt: Date;
2235
- updatedAt: Date;
2236
- archivedAt: Date | null;
2237
- } | null>;
2238
- createOrganization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: {
2239
- name: string;
2240
- website: string | null;
2241
- status: "active" | "inactive" | "archived";
2242
- tags: string[];
2243
- legalName?: string | null | undefined;
2244
- industry?: string | null | undefined;
2245
- relation?: "partner" | "supplier" | "other" | "client" | null | undefined;
2246
- ownerId?: string | null | undefined;
2247
- defaultCurrency?: string | null | undefined;
2248
- preferredLanguage?: string | null | undefined;
2249
- paymentTerms?: number | null | undefined;
2250
- source?: string | null | undefined;
2251
- sourceRef?: string | null | undefined;
2252
- notes?: string | null | undefined;
2253
- }): Promise<{
2254
- relation: "partner" | "supplier" | "other" | "client" | null;
2255
- name: string;
2256
- createdAt: Date;
2257
- updatedAt: Date;
2258
- website: string | null;
2259
- notes: string | null;
2260
- id: string;
2261
- legalName: string | null;
2262
- industry: string | null;
2263
- ownerId: string | null;
2264
- defaultCurrency: string | null;
2265
- preferredLanguage: string | null;
2266
- paymentTerms: number | null;
2267
- status: "active" | "inactive" | "archived";
2268
- source: string | null;
2269
- sourceRef: string | null;
2270
- tags: string[];
2271
- archivedAt: Date | null;
2272
- } | undefined>;
2273
- updateOrganization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: {
2274
- name?: string | undefined;
2275
- legalName?: string | null | undefined;
2276
- website?: string | null | undefined;
2277
- industry?: string | null | undefined;
2278
- relation?: "partner" | "supplier" | "other" | "client" | null | undefined;
2279
- ownerId?: string | null | undefined;
2280
- defaultCurrency?: string | null | undefined;
2281
- preferredLanguage?: string | null | undefined;
2282
- paymentTerms?: number | null | undefined;
2283
- status?: "active" | "inactive" | "archived" | undefined;
2284
- source?: string | null | undefined;
2285
- sourceRef?: string | null | undefined;
2286
- tags?: string[] | undefined;
2287
- notes?: string | null | undefined;
2288
- }): Promise<{
2289
- id: string;
2290
- name: string;
2291
- legalName: string | null;
2292
- website: string | null;
2293
- industry: string | null;
2294
- relation: "partner" | "supplier" | "other" | "client" | null;
2295
- ownerId: string | null;
2296
- defaultCurrency: string | null;
2297
- preferredLanguage: string | null;
2298
- paymentTerms: number | null;
2299
- status: "active" | "inactive" | "archived";
2300
- source: string | null;
2301
- sourceRef: string | null;
2302
- tags: string[];
2303
- notes: string | null;
2304
- createdAt: Date;
2305
- updatedAt: Date;
2306
- archivedAt: Date | null;
2307
- } | null>;
2308
- deleteOrganization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
2309
- id: string;
2310
- } | null>;
2311
- listPeople(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: {
2312
- limit: number;
2313
- offset: number;
2314
- organizationId?: string | undefined;
2315
- ownerId?: string | undefined;
2316
- relation?: "partner" | "supplier" | "other" | "client" | undefined;
2317
- status?: "active" | "inactive" | "archived" | undefined;
2318
- search?: string | undefined;
2319
- }): Promise<{
2186
+ listPeople(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./accounts-shared.js").PersonListQuery): Promise<{
2320
2187
  data: ({
2321
2188
  id: string;
2322
2189
  organizationId: string | null;
@@ -2336,14 +2203,7 @@ export declare const crmService: {
2336
2203
  createdAt: Date;
2337
2204
  updatedAt: Date;
2338
2205
  archivedAt: Date | null;
2339
- } & {
2340
- email: string | null;
2341
- phone: string | null;
2342
- website: string | null;
2343
- address: string | null;
2344
- city: string | null;
2345
- country: string | null;
2346
- })[];
2206
+ } & import("./accounts-shared.js").PersonHydratedFields)[];
2347
2207
  total: number;
2348
2208
  limit: number;
2349
2209
  offset: number;
@@ -2367,36 +2227,8 @@ export declare const crmService: {
2367
2227
  createdAt: Date;
2368
2228
  updatedAt: Date;
2369
2229
  archivedAt: Date | null;
2370
- } & {
2371
- email: string | null;
2372
- phone: string | null;
2373
- website: string | null;
2374
- address: string | null;
2375
- city: string | null;
2376
- country: string | null;
2377
- }) | null>;
2378
- createPerson(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: {
2379
- firstName: string;
2380
- lastName: string;
2381
- status: "active" | "inactive" | "archived";
2382
- tags: string[];
2383
- website: string | null;
2384
- organizationId?: string | null | undefined;
2385
- jobTitle?: string | null | undefined;
2386
- relation?: "partner" | "supplier" | "other" | "client" | null | undefined;
2387
- preferredLanguage?: string | null | undefined;
2388
- preferredCurrency?: string | null | undefined;
2389
- ownerId?: string | null | undefined;
2390
- source?: string | null | undefined;
2391
- sourceRef?: string | null | undefined;
2392
- birthday?: string | null | undefined;
2393
- notes?: string | null | undefined;
2394
- email?: string | null | undefined;
2395
- phone?: string | null | undefined;
2396
- address?: string | null | undefined;
2397
- city?: string | null | undefined;
2398
- country?: string | null | undefined;
2399
- }): Promise<({
2230
+ } & import("./accounts-shared.js").PersonHydratedFields) | null>;
2231
+ createPerson(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./accounts-shared.js").CreatePersonInput): Promise<({
2400
2232
  id: string;
2401
2233
  organizationId: string | null;
2402
2234
  firstName: string;
@@ -2415,36 +2247,8 @@ export declare const crmService: {
2415
2247
  createdAt: Date;
2416
2248
  updatedAt: Date;
2417
2249
  archivedAt: Date | null;
2418
- } & {
2419
- email: string | null;
2420
- phone: string | null;
2421
- website: string | null;
2422
- address: string | null;
2423
- city: string | null;
2424
- country: string | null;
2425
- }) | null>;
2426
- updatePerson(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: {
2427
- organizationId?: string | null | undefined;
2428
- firstName?: string | undefined;
2429
- lastName?: string | undefined;
2430
- jobTitle?: string | null | undefined;
2431
- relation?: "partner" | "supplier" | "other" | "client" | null | undefined;
2432
- preferredLanguage?: string | null | undefined;
2433
- preferredCurrency?: string | null | undefined;
2434
- ownerId?: string | null | undefined;
2435
- status?: "active" | "inactive" | "archived" | undefined;
2436
- source?: string | null | undefined;
2437
- sourceRef?: string | null | undefined;
2438
- tags?: string[] | undefined;
2439
- birthday?: string | null | undefined;
2440
- notes?: string | null | undefined;
2441
- email?: string | null | undefined;
2442
- phone?: string | null | undefined;
2443
- website?: string | null | undefined;
2444
- address?: string | null | undefined;
2445
- city?: string | null | undefined;
2446
- country?: string | null | undefined;
2447
- }): Promise<({
2250
+ } & import("./accounts-shared.js").PersonHydratedFields) | null>;
2251
+ updatePerson(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdatePersonInput): Promise<({
2448
2252
  id: string;
2449
2253
  organizationId: string | null;
2450
2254
  firstName: string;
@@ -2463,14 +2267,7 @@ export declare const crmService: {
2463
2267
  createdAt: Date;
2464
2268
  updatedAt: Date;
2465
2269
  archivedAt: Date | null;
2466
- } & {
2467
- email: string | null;
2468
- phone: string | null;
2469
- website: string | null;
2470
- address: string | null;
2471
- city: string | null;
2472
- country: string | null;
2473
- }) | null>;
2270
+ } & import("./accounts-shared.js").PersonHydratedFields) | null>;
2474
2271
  deletePerson(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
2475
2272
  id: string;
2476
2273
  } | null>;
@@ -2488,17 +2285,7 @@ export declare const crmService: {
2488
2285
  createdAt: Date;
2489
2286
  updatedAt: Date;
2490
2287
  }[]>;
2491
- createContactMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: {
2492
- entityType: string;
2493
- entityId: string;
2494
- kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
2495
- value: string;
2496
- isPrimary: boolean;
2497
- label?: string | null | undefined;
2498
- normalizedValue?: string | null | undefined;
2499
- notes?: string | null | undefined;
2500
- metadata?: Record<string, unknown> | null | undefined;
2501
- }): Promise<{
2288
+ createContactMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: import("./accounts-shared.js").CreateContactPointInput): Promise<{
2502
2289
  value: string;
2503
2290
  createdAt: Date;
2504
2291
  updatedAt: Date;
@@ -2512,17 +2299,7 @@ export declare const crmService: {
2512
2299
  metadata: Record<string, unknown> | null;
2513
2300
  id: string;
2514
2301
  } | null>;
2515
- updateContactMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: {
2516
- entityType?: string | undefined;
2517
- entityId?: string | undefined;
2518
- kind?: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other" | undefined;
2519
- label?: string | null | undefined;
2520
- value?: string | undefined;
2521
- normalizedValue?: string | null | undefined;
2522
- isPrimary?: boolean | undefined;
2523
- notes?: string | null | undefined;
2524
- metadata?: Record<string, unknown> | null | undefined;
2525
- }): Promise<{
2302
+ updateContactMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdateContactPointInput): Promise<{
2526
2303
  id: string;
2527
2304
  entityType: string;
2528
2305
  entityId: string;
@@ -2560,24 +2337,7 @@ export declare const crmService: {
2560
2337
  createdAt: Date;
2561
2338
  updatedAt: Date;
2562
2339
  }[]>;
2563
- createAddress(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: {
2564
- entityType: string;
2565
- entityId: string;
2566
- label: "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
2567
- isPrimary: boolean;
2568
- fullText?: string | null | undefined;
2569
- line1?: string | null | undefined;
2570
- line2?: string | null | undefined;
2571
- city?: string | null | undefined;
2572
- region?: string | null | undefined;
2573
- postalCode?: string | null | undefined;
2574
- country?: string | null | undefined;
2575
- latitude?: number | null | undefined;
2576
- longitude?: number | null | undefined;
2577
- timezone?: string | null | undefined;
2578
- notes?: string | null | undefined;
2579
- metadata?: Record<string, unknown> | null | undefined;
2580
- }): Promise<{
2340
+ createAddress(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: import("./accounts-shared.js").CreateAddressInput): Promise<{
2581
2341
  createdAt: Date;
2582
2342
  updatedAt: Date;
2583
2343
  entityType: string;
@@ -2598,24 +2358,7 @@ export declare const crmService: {
2598
2358
  timezone: string | null;
2599
2359
  id: string;
2600
2360
  } | null>;
2601
- updateAddress(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: {
2602
- entityType?: string | undefined;
2603
- entityId?: string | undefined;
2604
- label?: "primary" | "other" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal" | undefined;
2605
- fullText?: string | null | undefined;
2606
- line1?: string | null | undefined;
2607
- line2?: string | null | undefined;
2608
- city?: string | null | undefined;
2609
- region?: string | null | undefined;
2610
- postalCode?: string | null | undefined;
2611
- country?: string | null | undefined;
2612
- latitude?: number | null | undefined;
2613
- longitude?: number | null | undefined;
2614
- timezone?: string | null | undefined;
2615
- isPrimary?: boolean | undefined;
2616
- notes?: string | null | undefined;
2617
- metadata?: Record<string, unknown> | null | undefined;
2618
- }): Promise<{
2361
+ updateAddress(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdateAddressInput): Promise<{
2619
2362
  id: string;
2620
2363
  entityType: string;
2621
2364
  entityId: string;
@@ -2818,9 +2561,7 @@ export declare const crmService: {
2818
2561
  generated: undefined;
2819
2562
  }, {}, {}>;
2820
2563
  }>, "where" | "orderBy">;
2821
- createPersonNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, userId: string, data: {
2822
- content: string;
2823
- }): Promise<{
2564
+ createPersonNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, userId: string, data: import("./accounts-shared.js").CreatePersonNoteInput): Promise<{
2824
2565
  createdAt: Date;
2825
2566
  id: string;
2826
2567
  personId: string;
@@ -3006,9 +2747,7 @@ export declare const crmService: {
3006
2747
  generated: undefined;
3007
2748
  }, {}, {}>;
3008
2749
  }>, "where" | "orderBy">;
3009
- createOrganizationNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, organizationId: string, userId: string, data: {
3010
- content: string;
3011
- }): Promise<{
2750
+ createOrganizationNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, organizationId: string, userId: string, data: import("./accounts-shared.js").CreateOrganizationNoteInput): Promise<{
3012
2751
  createdAt: Date;
3013
2752
  id: string;
3014
2753
  organizationId: string;
@@ -3043,14 +2782,7 @@ export declare const crmService: {
3043
2782
  authorId: string;
3044
2783
  content: string;
3045
2784
  } | null>;
3046
- listCommunications(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, query: {
3047
- limit: number;
3048
- offset: number;
3049
- channel?: "email" | "phone" | "whatsapp" | "sms" | "other" | "meeting" | undefined;
3050
- direction?: "inbound" | "outbound" | undefined;
3051
- dateFrom?: string | undefined;
3052
- dateTo?: string | undefined;
3053
- }): Promise<{
2785
+ listCommunications(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, query: import("./accounts-shared.js").CommunicationListQuery): Promise<{
3054
2786
  id: string;
3055
2787
  personId: string;
3056
2788
  organizationId: string | null;
@@ -3061,22 +2793,15 @@ export declare const crmService: {
3061
2793
  sentAt: Date | null;
3062
2794
  createdAt: Date;
3063
2795
  }[]>;
3064
- createCommunication(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, data: {
3065
- channel: "email" | "phone" | "whatsapp" | "sms" | "other" | "meeting";
3066
- direction: "inbound" | "outbound";
3067
- organizationId?: string | null | undefined;
3068
- subject?: string | null | undefined;
3069
- content?: string | null | undefined;
3070
- sentAt?: string | null | undefined;
3071
- }): Promise<{
2796
+ createCommunication(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, data: import("./accounts-shared.js").CreateCommunicationLogInput): Promise<{
3072
2797
  createdAt: Date;
3073
2798
  id: string;
3074
2799
  organizationId: string | null;
3075
2800
  personId: string;
3076
- subject: string | null;
3077
2801
  content: string | null;
3078
2802
  channel: "email" | "phone" | "whatsapp" | "sms" | "other" | "meeting";
3079
2803
  direction: "inbound" | "outbound";
2804
+ subject: string | null;
3080
2805
  sentAt: Date | null;
3081
2806
  } | null | undefined>;
3082
2807
  listSegments(db: import("drizzle-orm/postgres-js").PostgresJsDatabase): Omit<import("drizzle-orm/pg-core").PgSelectBase<"segments", {
@@ -3297,11 +3022,7 @@ export declare const crmService: {
3297
3022
  generated: undefined;
3298
3023
  }, {}, {}>;
3299
3024
  }>, "orderBy">;
3300
- createSegment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: {
3301
- name: string;
3302
- description?: string | null | undefined;
3303
- conditions?: Record<string, unknown> | null | undefined;
3304
- }): Promise<{
3025
+ createSegment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./accounts-shared.js").CreateSegmentInput): Promise<{
3305
3026
  name: string;
3306
3027
  createdAt: Date;
3307
3028
  updatedAt: Date;
@@ -3325,5 +3046,93 @@ export declare const crmService: {
3325
3046
  }[];
3326
3047
  error?: undefined;
3327
3048
  }>;
3049
+ listOrganizations(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./accounts-shared.js").OrganizationListQuery): Promise<{
3050
+ data: {
3051
+ id: string;
3052
+ name: string;
3053
+ legalName: string | null;
3054
+ website: string | null;
3055
+ industry: string | null;
3056
+ relation: "partner" | "supplier" | "other" | "client" | null;
3057
+ ownerId: string | null;
3058
+ defaultCurrency: string | null;
3059
+ preferredLanguage: string | null;
3060
+ paymentTerms: number | null;
3061
+ status: "active" | "inactive" | "archived";
3062
+ source: string | null;
3063
+ sourceRef: string | null;
3064
+ tags: string[];
3065
+ notes: string | null;
3066
+ createdAt: Date;
3067
+ updatedAt: Date;
3068
+ archivedAt: Date | null;
3069
+ }[];
3070
+ total: number;
3071
+ limit: number;
3072
+ offset: number;
3073
+ }>;
3074
+ getOrganizationById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
3075
+ id: string;
3076
+ name: string;
3077
+ legalName: string | null;
3078
+ website: string | null;
3079
+ industry: string | null;
3080
+ relation: "partner" | "supplier" | "other" | "client" | null;
3081
+ ownerId: string | null;
3082
+ defaultCurrency: string | null;
3083
+ preferredLanguage: string | null;
3084
+ paymentTerms: number | null;
3085
+ status: "active" | "inactive" | "archived";
3086
+ source: string | null;
3087
+ sourceRef: string | null;
3088
+ tags: string[];
3089
+ notes: string | null;
3090
+ createdAt: Date;
3091
+ updatedAt: Date;
3092
+ archivedAt: Date | null;
3093
+ } | null>;
3094
+ createOrganization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./accounts-shared.js").CreateOrganizationInput): Promise<{
3095
+ relation: "partner" | "supplier" | "other" | "client" | null;
3096
+ name: string;
3097
+ createdAt: Date;
3098
+ updatedAt: Date;
3099
+ website: string | null;
3100
+ notes: string | null;
3101
+ id: string;
3102
+ legalName: string | null;
3103
+ industry: string | null;
3104
+ ownerId: string | null;
3105
+ defaultCurrency: string | null;
3106
+ preferredLanguage: string | null;
3107
+ paymentTerms: number | null;
3108
+ status: "active" | "inactive" | "archived";
3109
+ source: string | null;
3110
+ sourceRef: string | null;
3111
+ tags: string[];
3112
+ archivedAt: Date | null;
3113
+ } | undefined>;
3114
+ updateOrganization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdateOrganizationInput): Promise<{
3115
+ id: string;
3116
+ name: string;
3117
+ legalName: string | null;
3118
+ website: string | null;
3119
+ industry: string | null;
3120
+ relation: "partner" | "supplier" | "other" | "client" | null;
3121
+ ownerId: string | null;
3122
+ defaultCurrency: string | null;
3123
+ preferredLanguage: string | null;
3124
+ paymentTerms: number | null;
3125
+ status: "active" | "inactive" | "archived";
3126
+ source: string | null;
3127
+ sourceRef: string | null;
3128
+ tags: string[];
3129
+ notes: string | null;
3130
+ createdAt: Date;
3131
+ updatedAt: Date;
3132
+ archivedAt: Date | null;
3133
+ } | null>;
3134
+ deleteOrganization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
3135
+ id: string;
3136
+ } | null>;
3328
3137
  };
3329
3138
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/service/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOtB,CAAA"}
@@ -66,8 +66,8 @@ export declare const opportunitiesService: {
66
66
  sourceRef: string | null;
67
67
  tags: string[];
68
68
  organizationId: string | null;
69
- pipelineId: string;
70
69
  personId: string | null;
70
+ pipelineId: string;
71
71
  stageId: string;
72
72
  valueAmountCents: number | null;
73
73
  valueCurrency: string | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/crm",
3
- "version": "0.2.0",
3
+ "version": "0.3.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.2.0",
33
- "@voyantjs/db": "0.2.0",
34
- "@voyantjs/hono": "0.2.0",
35
- "@voyantjs/identity": "0.2.0"
32
+ "@voyantjs/core": "0.3.0",
33
+ "@voyantjs/db": "0.3.0",
34
+ "@voyantjs/hono": "0.3.0",
35
+ "@voyantjs/identity": "0.3.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "typescript": "^6.0.2",