@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.
- package/dist/routes/accounts.d.ts +1 -1
- package/dist/routes/index.d.ts +2 -2
- package/dist/routes/opportunities.d.ts +1 -1
- package/dist/schema-accounts.d.ts +1175 -0
- package/dist/schema-accounts.d.ts.map +1 -0
- package/dist/schema-accounts.js +112 -0
- package/dist/schema-activities.d.ts +821 -0
- package/dist/schema-activities.d.ts.map +1 -0
- package/dist/schema-activities.js +83 -0
- package/dist/schema-relations.d.ts +81 -0
- package/dist/schema-relations.d.ts.map +1 -0
- package/dist/schema-relations.js +123 -0
- package/dist/schema-sales.d.ts +1392 -0
- package/dist/schema-sales.d.ts.map +1 -0
- package/dist/schema-sales.js +142 -0
- package/dist/schema-shared.d.ts +13 -0
- package/dist/schema-shared.d.ts.map +1 -0
- package/dist/schema-shared.js +63 -0
- package/dist/schema.d.ts +5 -3477
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +5 -515
- package/dist/service/accounts-organizations.d.ts +93 -0
- package/dist/service/accounts-organizations.d.ts.map +1 -0
- package/dist/service/accounts-organizations.js +49 -0
- package/dist/service/accounts-people.d.ts +868 -0
- package/dist/service/accounts-people.d.ts.map +1 -0
- package/dist/service/accounts-people.js +311 -0
- package/dist/service/accounts-shared.d.ts +54 -0
- package/dist/service/accounts-shared.d.ts.map +1 -0
- package/dist/service/accounts-shared.js +152 -0
- package/dist/service/accounts.d.ts +121 -149
- package/dist/service/accounts.d.ts.map +1 -1
- package/dist/service/accounts.js +4 -507
- package/dist/service/index.d.ts +106 -297
- package/dist/service/index.d.ts.map +1 -1
- package/dist/service/opportunities.d.ts +1 -1
- package/package.json +5 -5
|
@@ -1,120 +1,5 @@
|
|
|
1
|
-
import type { insertAddressSchema, insertContactPointSchema, updateAddressSchema, updateContactPointSchema } from "@voyantjs/identity/validation";
|
|
2
|
-
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
3
|
-
import type { z } from "zod";
|
|
4
|
-
import type { communicationListQuerySchema, insertCommunicationLogSchema, insertOrganizationNoteSchema, insertOrganizationSchema, insertPersonNoteSchema, insertPersonSchema, insertSegmentSchema, organizationListQuerySchema, personListQuerySchema, updateOrganizationSchema, updatePersonSchema } from "../validation.js";
|
|
5
|
-
type OrganizationListQuery = z.infer<typeof organizationListQuerySchema>;
|
|
6
|
-
type CreateOrganizationInput = z.infer<typeof insertOrganizationSchema>;
|
|
7
|
-
type UpdateOrganizationInput = z.infer<typeof updateOrganizationSchema>;
|
|
8
|
-
type PersonListQuery = z.infer<typeof personListQuerySchema>;
|
|
9
|
-
type CreatePersonInput = z.infer<typeof insertPersonSchema>;
|
|
10
|
-
type UpdatePersonInput = z.infer<typeof updatePersonSchema>;
|
|
11
|
-
type CreateContactPointInput = z.infer<typeof insertContactPointSchema>;
|
|
12
|
-
type UpdateContactPointInput = z.infer<typeof updateContactPointSchema>;
|
|
13
|
-
type CreateAddressInput = z.infer<typeof insertAddressSchema>;
|
|
14
|
-
type UpdateAddressInput = z.infer<typeof updateAddressSchema>;
|
|
15
|
-
type CreatePersonNoteInput = z.infer<typeof insertPersonNoteSchema>;
|
|
16
|
-
type CreateOrganizationNoteInput = z.infer<typeof insertOrganizationNoteSchema>;
|
|
17
|
-
type CreateCommunicationLogInput = z.infer<typeof insertCommunicationLogSchema>;
|
|
18
|
-
type CommunicationListQuery = z.infer<typeof communicationListQuerySchema>;
|
|
19
|
-
type CreateSegmentInput = z.infer<typeof insertSegmentSchema>;
|
|
20
|
-
type PersonHydratedFields = {
|
|
21
|
-
email: string | null;
|
|
22
|
-
phone: string | null;
|
|
23
|
-
website: string | null;
|
|
24
|
-
address: string | null;
|
|
25
|
-
city: string | null;
|
|
26
|
-
country: string | null;
|
|
27
|
-
};
|
|
28
1
|
export declare const accountsService: {
|
|
29
|
-
|
|
30
|
-
data: {
|
|
31
|
-
id: string;
|
|
32
|
-
name: string;
|
|
33
|
-
legalName: string | null;
|
|
34
|
-
website: string | null;
|
|
35
|
-
industry: string | null;
|
|
36
|
-
relation: "partner" | "supplier" | "other" | "client" | null;
|
|
37
|
-
ownerId: string | null;
|
|
38
|
-
defaultCurrency: string | null;
|
|
39
|
-
preferredLanguage: string | null;
|
|
40
|
-
paymentTerms: number | null;
|
|
41
|
-
status: "active" | "inactive" | "archived";
|
|
42
|
-
source: string | null;
|
|
43
|
-
sourceRef: string | null;
|
|
44
|
-
tags: string[];
|
|
45
|
-
notes: string | null;
|
|
46
|
-
createdAt: Date;
|
|
47
|
-
updatedAt: Date;
|
|
48
|
-
archivedAt: Date | null;
|
|
49
|
-
}[];
|
|
50
|
-
total: number;
|
|
51
|
-
limit: number;
|
|
52
|
-
offset: number;
|
|
53
|
-
}>;
|
|
54
|
-
getOrganizationById(db: PostgresJsDatabase, id: string): Promise<{
|
|
55
|
-
id: string;
|
|
56
|
-
name: string;
|
|
57
|
-
legalName: string | null;
|
|
58
|
-
website: string | null;
|
|
59
|
-
industry: string | null;
|
|
60
|
-
relation: "partner" | "supplier" | "other" | "client" | null;
|
|
61
|
-
ownerId: string | null;
|
|
62
|
-
defaultCurrency: string | null;
|
|
63
|
-
preferredLanguage: string | null;
|
|
64
|
-
paymentTerms: number | null;
|
|
65
|
-
status: "active" | "inactive" | "archived";
|
|
66
|
-
source: string | null;
|
|
67
|
-
sourceRef: string | null;
|
|
68
|
-
tags: string[];
|
|
69
|
-
notes: string | null;
|
|
70
|
-
createdAt: Date;
|
|
71
|
-
updatedAt: Date;
|
|
72
|
-
archivedAt: Date | null;
|
|
73
|
-
} | null>;
|
|
74
|
-
createOrganization(db: PostgresJsDatabase, data: CreateOrganizationInput): Promise<{
|
|
75
|
-
relation: "partner" | "supplier" | "other" | "client" | null;
|
|
76
|
-
name: string;
|
|
77
|
-
createdAt: Date;
|
|
78
|
-
updatedAt: Date;
|
|
79
|
-
website: string | null;
|
|
80
|
-
notes: string | null;
|
|
81
|
-
id: string;
|
|
82
|
-
legalName: string | null;
|
|
83
|
-
industry: string | null;
|
|
84
|
-
ownerId: string | null;
|
|
85
|
-
defaultCurrency: string | null;
|
|
86
|
-
preferredLanguage: string | null;
|
|
87
|
-
paymentTerms: number | null;
|
|
88
|
-
status: "active" | "inactive" | "archived";
|
|
89
|
-
source: string | null;
|
|
90
|
-
sourceRef: string | null;
|
|
91
|
-
tags: string[];
|
|
92
|
-
archivedAt: Date | null;
|
|
93
|
-
} | undefined>;
|
|
94
|
-
updateOrganization(db: PostgresJsDatabase, id: string, data: UpdateOrganizationInput): Promise<{
|
|
95
|
-
id: string;
|
|
96
|
-
name: string;
|
|
97
|
-
legalName: string | null;
|
|
98
|
-
website: string | null;
|
|
99
|
-
industry: string | null;
|
|
100
|
-
relation: "partner" | "supplier" | "other" | "client" | null;
|
|
101
|
-
ownerId: string | null;
|
|
102
|
-
defaultCurrency: string | null;
|
|
103
|
-
preferredLanguage: string | null;
|
|
104
|
-
paymentTerms: number | null;
|
|
105
|
-
status: "active" | "inactive" | "archived";
|
|
106
|
-
source: string | null;
|
|
107
|
-
sourceRef: string | null;
|
|
108
|
-
tags: string[];
|
|
109
|
-
notes: string | null;
|
|
110
|
-
createdAt: Date;
|
|
111
|
-
updatedAt: Date;
|
|
112
|
-
archivedAt: Date | null;
|
|
113
|
-
} | null>;
|
|
114
|
-
deleteOrganization(db: PostgresJsDatabase, id: string): Promise<{
|
|
115
|
-
id: string;
|
|
116
|
-
} | null>;
|
|
117
|
-
listPeople(db: PostgresJsDatabase, query: PersonListQuery): Promise<{
|
|
2
|
+
listPeople(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./accounts-shared.js").PersonListQuery): Promise<{
|
|
118
3
|
data: ({
|
|
119
4
|
id: string;
|
|
120
5
|
organizationId: string | null;
|
|
@@ -134,12 +19,12 @@ export declare const accountsService: {
|
|
|
134
19
|
createdAt: Date;
|
|
135
20
|
updatedAt: Date;
|
|
136
21
|
archivedAt: Date | null;
|
|
137
|
-
} & PersonHydratedFields)[];
|
|
22
|
+
} & import("./accounts-shared.js").PersonHydratedFields)[];
|
|
138
23
|
total: number;
|
|
139
24
|
limit: number;
|
|
140
25
|
offset: number;
|
|
141
26
|
}>;
|
|
142
|
-
getPersonById(db: PostgresJsDatabase, id: string): Promise<({
|
|
27
|
+
getPersonById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<({
|
|
143
28
|
id: string;
|
|
144
29
|
organizationId: string | null;
|
|
145
30
|
firstName: string;
|
|
@@ -158,8 +43,8 @@ export declare const accountsService: {
|
|
|
158
43
|
createdAt: Date;
|
|
159
44
|
updatedAt: Date;
|
|
160
45
|
archivedAt: Date | null;
|
|
161
|
-
} & PersonHydratedFields) | null>;
|
|
162
|
-
createPerson(db: PostgresJsDatabase, data: CreatePersonInput): Promise<({
|
|
46
|
+
} & import("./accounts-shared.js").PersonHydratedFields) | null>;
|
|
47
|
+
createPerson(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./accounts-shared.js").CreatePersonInput): Promise<({
|
|
163
48
|
id: string;
|
|
164
49
|
organizationId: string | null;
|
|
165
50
|
firstName: string;
|
|
@@ -178,8 +63,8 @@ export declare const accountsService: {
|
|
|
178
63
|
createdAt: Date;
|
|
179
64
|
updatedAt: Date;
|
|
180
65
|
archivedAt: Date | null;
|
|
181
|
-
} & PersonHydratedFields) | null>;
|
|
182
|
-
updatePerson(db: PostgresJsDatabase, id: string, data: UpdatePersonInput): Promise<({
|
|
66
|
+
} & import("./accounts-shared.js").PersonHydratedFields) | null>;
|
|
67
|
+
updatePerson(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdatePersonInput): Promise<({
|
|
183
68
|
id: string;
|
|
184
69
|
organizationId: string | null;
|
|
185
70
|
firstName: string;
|
|
@@ -198,11 +83,11 @@ export declare const accountsService: {
|
|
|
198
83
|
createdAt: Date;
|
|
199
84
|
updatedAt: Date;
|
|
200
85
|
archivedAt: Date | null;
|
|
201
|
-
} & PersonHydratedFields) | null>;
|
|
202
|
-
deletePerson(db: PostgresJsDatabase, id: string): Promise<{
|
|
86
|
+
} & import("./accounts-shared.js").PersonHydratedFields) | null>;
|
|
87
|
+
deletePerson(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
203
88
|
id: string;
|
|
204
89
|
} | null>;
|
|
205
|
-
listContactMethods(db: PostgresJsDatabase, entityType: "organization" | "person", entityId: string): Promise<{
|
|
90
|
+
listContactMethods(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string): Promise<{
|
|
206
91
|
id: string;
|
|
207
92
|
entityType: string;
|
|
208
93
|
entityId: string;
|
|
@@ -216,7 +101,7 @@ export declare const accountsService: {
|
|
|
216
101
|
createdAt: Date;
|
|
217
102
|
updatedAt: Date;
|
|
218
103
|
}[]>;
|
|
219
|
-
createContactMethod(db: PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: CreateContactPointInput): Promise<{
|
|
104
|
+
createContactMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: import("./accounts-shared.js").CreateContactPointInput): Promise<{
|
|
220
105
|
value: string;
|
|
221
106
|
createdAt: Date;
|
|
222
107
|
updatedAt: Date;
|
|
@@ -230,7 +115,7 @@ export declare const accountsService: {
|
|
|
230
115
|
metadata: Record<string, unknown> | null;
|
|
231
116
|
id: string;
|
|
232
117
|
} | null>;
|
|
233
|
-
updateContactMethod(db: PostgresJsDatabase, id: string, data: UpdateContactPointInput): Promise<{
|
|
118
|
+
updateContactMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdateContactPointInput): Promise<{
|
|
234
119
|
id: string;
|
|
235
120
|
entityType: string;
|
|
236
121
|
entityId: string;
|
|
@@ -244,10 +129,10 @@ export declare const accountsService: {
|
|
|
244
129
|
createdAt: Date;
|
|
245
130
|
updatedAt: Date;
|
|
246
131
|
} | null>;
|
|
247
|
-
deleteContactMethod(db: PostgresJsDatabase, id: string): Promise<{
|
|
132
|
+
deleteContactMethod(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
248
133
|
id: string;
|
|
249
134
|
} | null>;
|
|
250
|
-
listAddresses(db: PostgresJsDatabase, entityType: "organization" | "person", entityId: string): Promise<{
|
|
135
|
+
listAddresses(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string): Promise<{
|
|
251
136
|
id: string;
|
|
252
137
|
entityType: string;
|
|
253
138
|
entityId: string;
|
|
@@ -268,7 +153,7 @@ export declare const accountsService: {
|
|
|
268
153
|
createdAt: Date;
|
|
269
154
|
updatedAt: Date;
|
|
270
155
|
}[]>;
|
|
271
|
-
createAddress(db: PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: CreateAddressInput): Promise<{
|
|
156
|
+
createAddress(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, entityType: "organization" | "person", entityId: string, data: import("./accounts-shared.js").CreateAddressInput): Promise<{
|
|
272
157
|
createdAt: Date;
|
|
273
158
|
updatedAt: Date;
|
|
274
159
|
entityType: string;
|
|
@@ -289,7 +174,7 @@ export declare const accountsService: {
|
|
|
289
174
|
timezone: string | null;
|
|
290
175
|
id: string;
|
|
291
176
|
} | null>;
|
|
292
|
-
updateAddress(db: PostgresJsDatabase, id: string, data: UpdateAddressInput): Promise<{
|
|
177
|
+
updateAddress(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdateAddressInput): Promise<{
|
|
293
178
|
id: string;
|
|
294
179
|
entityType: string;
|
|
295
180
|
entityId: string;
|
|
@@ -310,10 +195,10 @@ export declare const accountsService: {
|
|
|
310
195
|
createdAt: Date;
|
|
311
196
|
updatedAt: Date;
|
|
312
197
|
} | null>;
|
|
313
|
-
deleteAddress(db: PostgresJsDatabase, id: string): Promise<{
|
|
198
|
+
deleteAddress(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
314
199
|
id: string;
|
|
315
200
|
} | null>;
|
|
316
|
-
listPersonNotes(db: PostgresJsDatabase, personId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"person_notes", {
|
|
201
|
+
listPersonNotes(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"person_notes", {
|
|
317
202
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
318
203
|
name: string;
|
|
319
204
|
tableName: "person_notes";
|
|
@@ -492,14 +377,14 @@ export declare const accountsService: {
|
|
|
492
377
|
generated: undefined;
|
|
493
378
|
}, {}, {}>;
|
|
494
379
|
}>, "where" | "orderBy">;
|
|
495
|
-
createPersonNote(db: PostgresJsDatabase, personId: string, userId: string, data: CreatePersonNoteInput): Promise<{
|
|
380
|
+
createPersonNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, userId: string, data: import("./accounts-shared.js").CreatePersonNoteInput): Promise<{
|
|
496
381
|
createdAt: Date;
|
|
497
382
|
id: string;
|
|
498
383
|
personId: string;
|
|
499
384
|
authorId: string;
|
|
500
385
|
content: string;
|
|
501
386
|
} | null | undefined>;
|
|
502
|
-
listOrganizationNotes(db: PostgresJsDatabase, organizationId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"organization_notes", {
|
|
387
|
+
listOrganizationNotes(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, organizationId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"organization_notes", {
|
|
503
388
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
504
389
|
name: string;
|
|
505
390
|
tableName: "organization_notes";
|
|
@@ -678,42 +563,42 @@ export declare const accountsService: {
|
|
|
678
563
|
generated: undefined;
|
|
679
564
|
}, {}, {}>;
|
|
680
565
|
}>, "where" | "orderBy">;
|
|
681
|
-
createOrganizationNote(db: PostgresJsDatabase, organizationId: string, userId: string, data: CreateOrganizationNoteInput): Promise<{
|
|
566
|
+
createOrganizationNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, organizationId: string, userId: string, data: import("./accounts-shared.js").CreateOrganizationNoteInput): Promise<{
|
|
682
567
|
createdAt: Date;
|
|
683
568
|
id: string;
|
|
684
569
|
organizationId: string;
|
|
685
570
|
authorId: string;
|
|
686
571
|
content: string;
|
|
687
572
|
} | null | undefined>;
|
|
688
|
-
updatePersonNote(db: PostgresJsDatabase, id: string, content: string): Promise<{
|
|
573
|
+
updatePersonNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, content: string): Promise<{
|
|
689
574
|
id: string;
|
|
690
575
|
personId: string;
|
|
691
576
|
authorId: string;
|
|
692
577
|
content: string;
|
|
693
578
|
createdAt: Date;
|
|
694
579
|
} | null>;
|
|
695
|
-
deletePersonNote(db: PostgresJsDatabase, id: string): Promise<{
|
|
580
|
+
deletePersonNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
696
581
|
createdAt: Date;
|
|
697
582
|
id: string;
|
|
698
583
|
personId: string;
|
|
699
584
|
authorId: string;
|
|
700
585
|
content: string;
|
|
701
586
|
} | null>;
|
|
702
|
-
updateOrganizationNote(db: PostgresJsDatabase, id: string, content: string): Promise<{
|
|
587
|
+
updateOrganizationNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, content: string): Promise<{
|
|
703
588
|
id: string;
|
|
704
589
|
organizationId: string;
|
|
705
590
|
authorId: string;
|
|
706
591
|
content: string;
|
|
707
592
|
createdAt: Date;
|
|
708
593
|
} | null>;
|
|
709
|
-
deleteOrganizationNote(db: PostgresJsDatabase, id: string): Promise<{
|
|
594
|
+
deleteOrganizationNote(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
710
595
|
createdAt: Date;
|
|
711
596
|
id: string;
|
|
712
597
|
organizationId: string;
|
|
713
598
|
authorId: string;
|
|
714
599
|
content: string;
|
|
715
600
|
} | null>;
|
|
716
|
-
listCommunications(db: PostgresJsDatabase, personId: string, query: CommunicationListQuery): Promise<{
|
|
601
|
+
listCommunications(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, query: import("./accounts-shared.js").CommunicationListQuery): Promise<{
|
|
717
602
|
id: string;
|
|
718
603
|
personId: string;
|
|
719
604
|
organizationId: string | null;
|
|
@@ -724,18 +609,18 @@ export declare const accountsService: {
|
|
|
724
609
|
sentAt: Date | null;
|
|
725
610
|
createdAt: Date;
|
|
726
611
|
}[]>;
|
|
727
|
-
createCommunication(db: PostgresJsDatabase, personId: string, data: CreateCommunicationLogInput): Promise<{
|
|
612
|
+
createCommunication(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, personId: string, data: import("./accounts-shared.js").CreateCommunicationLogInput): Promise<{
|
|
728
613
|
createdAt: Date;
|
|
729
614
|
id: string;
|
|
730
615
|
organizationId: string | null;
|
|
731
616
|
personId: string;
|
|
732
|
-
subject: string | null;
|
|
733
617
|
content: string | null;
|
|
734
618
|
channel: "email" | "phone" | "whatsapp" | "sms" | "other" | "meeting";
|
|
735
619
|
direction: "inbound" | "outbound";
|
|
620
|
+
subject: string | null;
|
|
736
621
|
sentAt: Date | null;
|
|
737
622
|
} | null | undefined>;
|
|
738
|
-
listSegments(db: PostgresJsDatabase): Omit<import("drizzle-orm/pg-core").PgSelectBase<"segments", {
|
|
623
|
+
listSegments(db: import("drizzle-orm/postgres-js").PostgresJsDatabase): Omit<import("drizzle-orm/pg-core").PgSelectBase<"segments", {
|
|
739
624
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
740
625
|
name: string;
|
|
741
626
|
tableName: "segments";
|
|
@@ -953,7 +838,7 @@ export declare const accountsService: {
|
|
|
953
838
|
generated: undefined;
|
|
954
839
|
}, {}, {}>;
|
|
955
840
|
}>, "orderBy">;
|
|
956
|
-
createSegment(db: PostgresJsDatabase, data: CreateSegmentInput): Promise<{
|
|
841
|
+
createSegment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./accounts-shared.js").CreateSegmentInput): Promise<{
|
|
957
842
|
name: string;
|
|
958
843
|
createdAt: Date;
|
|
959
844
|
updatedAt: Date;
|
|
@@ -961,11 +846,11 @@ export declare const accountsService: {
|
|
|
961
846
|
id: string;
|
|
962
847
|
conditions: Record<string, unknown> | null;
|
|
963
848
|
} | undefined>;
|
|
964
|
-
deleteSegment(db: PostgresJsDatabase, segmentId: string): Promise<{
|
|
849
|
+
deleteSegment(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, segmentId: string): Promise<{
|
|
965
850
|
id: string;
|
|
966
851
|
} | null>;
|
|
967
|
-
exportPeopleCsv(db: PostgresJsDatabase): Promise<string>;
|
|
968
|
-
importPeopleCsv(db: PostgresJsDatabase, csvText: string): Promise<{
|
|
852
|
+
exportPeopleCsv(db: import("drizzle-orm/postgres-js").PostgresJsDatabase): Promise<string>;
|
|
853
|
+
importPeopleCsv(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, csvText: string): Promise<{
|
|
969
854
|
error: "CSV must have a header row and at least one data row";
|
|
970
855
|
imported?: undefined;
|
|
971
856
|
errors?: undefined;
|
|
@@ -977,6 +862,93 @@ export declare const accountsService: {
|
|
|
977
862
|
}[];
|
|
978
863
|
error?: undefined;
|
|
979
864
|
}>;
|
|
865
|
+
listOrganizations(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, query: import("./accounts-shared.js").OrganizationListQuery): Promise<{
|
|
866
|
+
data: {
|
|
867
|
+
id: string;
|
|
868
|
+
name: string;
|
|
869
|
+
legalName: string | null;
|
|
870
|
+
website: string | null;
|
|
871
|
+
industry: string | null;
|
|
872
|
+
relation: "partner" | "supplier" | "other" | "client" | null;
|
|
873
|
+
ownerId: string | null;
|
|
874
|
+
defaultCurrency: string | null;
|
|
875
|
+
preferredLanguage: string | null;
|
|
876
|
+
paymentTerms: number | null;
|
|
877
|
+
status: "active" | "inactive" | "archived";
|
|
878
|
+
source: string | null;
|
|
879
|
+
sourceRef: string | null;
|
|
880
|
+
tags: string[];
|
|
881
|
+
notes: string | null;
|
|
882
|
+
createdAt: Date;
|
|
883
|
+
updatedAt: Date;
|
|
884
|
+
archivedAt: Date | null;
|
|
885
|
+
}[];
|
|
886
|
+
total: number;
|
|
887
|
+
limit: number;
|
|
888
|
+
offset: number;
|
|
889
|
+
}>;
|
|
890
|
+
getOrganizationById(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
891
|
+
id: string;
|
|
892
|
+
name: string;
|
|
893
|
+
legalName: string | null;
|
|
894
|
+
website: string | null;
|
|
895
|
+
industry: string | null;
|
|
896
|
+
relation: "partner" | "supplier" | "other" | "client" | null;
|
|
897
|
+
ownerId: string | null;
|
|
898
|
+
defaultCurrency: string | null;
|
|
899
|
+
preferredLanguage: string | null;
|
|
900
|
+
paymentTerms: number | null;
|
|
901
|
+
status: "active" | "inactive" | "archived";
|
|
902
|
+
source: string | null;
|
|
903
|
+
sourceRef: string | null;
|
|
904
|
+
tags: string[];
|
|
905
|
+
notes: string | null;
|
|
906
|
+
createdAt: Date;
|
|
907
|
+
updatedAt: Date;
|
|
908
|
+
archivedAt: Date | null;
|
|
909
|
+
} | null>;
|
|
910
|
+
createOrganization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, data: import("./accounts-shared.js").CreateOrganizationInput): Promise<{
|
|
911
|
+
relation: "partner" | "supplier" | "other" | "client" | null;
|
|
912
|
+
name: string;
|
|
913
|
+
createdAt: Date;
|
|
914
|
+
updatedAt: Date;
|
|
915
|
+
website: string | null;
|
|
916
|
+
notes: string | null;
|
|
917
|
+
id: string;
|
|
918
|
+
legalName: string | null;
|
|
919
|
+
industry: string | null;
|
|
920
|
+
ownerId: string | null;
|
|
921
|
+
defaultCurrency: string | null;
|
|
922
|
+
preferredLanguage: string | null;
|
|
923
|
+
paymentTerms: number | null;
|
|
924
|
+
status: "active" | "inactive" | "archived";
|
|
925
|
+
source: string | null;
|
|
926
|
+
sourceRef: string | null;
|
|
927
|
+
tags: string[];
|
|
928
|
+
archivedAt: Date | null;
|
|
929
|
+
} | undefined>;
|
|
930
|
+
updateOrganization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string, data: import("./accounts-shared.js").UpdateOrganizationInput): Promise<{
|
|
931
|
+
id: string;
|
|
932
|
+
name: string;
|
|
933
|
+
legalName: string | null;
|
|
934
|
+
website: string | null;
|
|
935
|
+
industry: string | null;
|
|
936
|
+
relation: "partner" | "supplier" | "other" | "client" | null;
|
|
937
|
+
ownerId: string | null;
|
|
938
|
+
defaultCurrency: string | null;
|
|
939
|
+
preferredLanguage: string | null;
|
|
940
|
+
paymentTerms: number | null;
|
|
941
|
+
status: "active" | "inactive" | "archived";
|
|
942
|
+
source: string | null;
|
|
943
|
+
sourceRef: string | null;
|
|
944
|
+
tags: string[];
|
|
945
|
+
notes: string | null;
|
|
946
|
+
createdAt: Date;
|
|
947
|
+
updatedAt: Date;
|
|
948
|
+
archivedAt: Date | null;
|
|
949
|
+
} | null>;
|
|
950
|
+
deleteOrganization(db: import("drizzle-orm/postgres-js").PostgresJsDatabase, id: string): Promise<{
|
|
951
|
+
id: string;
|
|
952
|
+
} | null>;
|
|
980
953
|
};
|
|
981
|
-
export {};
|
|
982
954
|
//# sourceMappingURL=accounts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/service/accounts.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../src/service/accounts.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAG3B,CAAA"}
|