@voyantjs/crm 0.106.1 → 0.107.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/README.md +3 -3
- package/dist/booking-extension.d.ts +7 -7
- package/dist/booking-extension.d.ts.map +1 -1
- package/dist/booking-extension.js +8 -5
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/routes/activities.d.ts +2 -2
- package/dist/routes/custom-fields.d.ts +6 -6
- package/dist/routes/index.d.ts +518 -51
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +2 -2
- package/dist/routes/pipelines.d.ts +4 -4
- package/dist/routes/quote-versions.d.ts +746 -0
- package/dist/routes/quote-versions.d.ts.map +1 -0
- package/dist/routes/quote-versions.js +175 -0
- package/dist/routes/quotes.d.ts +161 -53
- package/dist/routes/quotes.d.ts.map +1 -1
- package/dist/routes/quotes.js +29 -11
- package/dist/schema-activities.d.ts +6 -6
- package/dist/schema-relations.d.ts +19 -18
- package/dist/schema-relations.d.ts.map +1 -1
- package/dist/schema-relations.js +38 -31
- package/dist/schema-sales.d.ts +206 -87
- package/dist/schema-sales.d.ts.map +1 -1
- package/dist/schema-sales.js +62 -50
- package/dist/schema-shared.d.ts +3 -3
- package/dist/schema-shared.d.ts.map +1 -1
- package/dist/schema-shared.js +5 -16
- package/dist/schema-signals.d.ts +1 -1
- package/dist/schema-signals.js +1 -1
- package/dist/service/accounts-merge.js +10 -10
- package/dist/service/activities.d.ts +6 -6
- package/dist/service/custom-fields.d.ts +6 -6
- package/dist/service/index.d.ts +338 -139
- package/dist/service/index.d.ts.map +1 -1
- package/dist/service/index.js +2 -2
- package/dist/service/pipelines.d.ts +4 -4
- package/dist/service/quote-versions.d.ts +674 -0
- package/dist/service/quote-versions.d.ts.map +1 -0
- package/dist/service/quote-versions.js +399 -0
- package/dist/service/quotes.d.ts +426 -94
- package/dist/service/quotes.d.ts.map +1 -1
- package/dist/service/quotes.js +63 -22
- package/package.json +7 -7
- package/dist/routes/opportunities.d.ts +0 -387
- package/dist/routes/opportunities.d.ts.map +0 -1
- package/dist/routes/opportunities.js +0 -70
- package/dist/service/opportunities.d.ts +0 -822
- package/dist/service/opportunities.d.ts.map +0 -1
- package/dist/service/opportunities.js +0 -117
package/dist/service/quotes.d.ts
CHANGED
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
2
2
|
import type { z } from "zod";
|
|
3
|
-
import type {
|
|
3
|
+
import type { insertQuoteParticipantSchema, insertQuoteProductSchema, insertQuoteSchema, quoteListQuerySchema, updateQuoteProductSchema, updateQuoteSchema } from "../validation.js";
|
|
4
4
|
type QuoteListQuery = z.infer<typeof quoteListQuerySchema>;
|
|
5
5
|
type CreateQuoteInput = z.infer<typeof insertQuoteSchema>;
|
|
6
6
|
type UpdateQuoteInput = z.infer<typeof updateQuoteSchema>;
|
|
7
|
-
type
|
|
8
|
-
type
|
|
7
|
+
type CreateQuoteParticipantInput = z.infer<typeof insertQuoteParticipantSchema>;
|
|
8
|
+
type CreateQuoteProductInput = z.infer<typeof insertQuoteProductSchema>;
|
|
9
|
+
type UpdateQuoteProductInput = z.infer<typeof updateQuoteProductSchema>;
|
|
9
10
|
export declare const quotesService: {
|
|
10
11
|
listQuotes(db: PostgresJsDatabase, query: QuoteListQuery): Promise<{
|
|
11
12
|
data: {
|
|
12
13
|
id: string;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
14
|
+
title: string;
|
|
15
|
+
personId: string | null;
|
|
16
|
+
organizationId: string | null;
|
|
17
|
+
pipelineId: string;
|
|
18
|
+
stageId: string;
|
|
19
|
+
ownerId: string | null;
|
|
20
|
+
status: "lost" | "archived" | "open" | "won";
|
|
21
|
+
acceptedVersionId: string | null;
|
|
22
|
+
valueAmountCents: number | null;
|
|
23
|
+
valueCurrency: string | null;
|
|
24
|
+
expectedCloseDate: string | null;
|
|
25
|
+
source: string | null;
|
|
26
|
+
sourceRef: string | null;
|
|
27
|
+
lostReason: string | null;
|
|
28
|
+
tags: string[];
|
|
21
29
|
createdAt: Date;
|
|
22
30
|
updatedAt: Date;
|
|
23
|
-
|
|
31
|
+
stageChangedAt: Date;
|
|
32
|
+
closedAt: Date | null;
|
|
24
33
|
}[];
|
|
25
34
|
total: number;
|
|
26
35
|
limit: number;
|
|
@@ -28,53 +37,77 @@ export declare const quotesService: {
|
|
|
28
37
|
}>;
|
|
29
38
|
getQuoteById(db: PostgresJsDatabase, id: string): Promise<{
|
|
30
39
|
id: string;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
title: string;
|
|
41
|
+
personId: string | null;
|
|
42
|
+
organizationId: string | null;
|
|
43
|
+
pipelineId: string;
|
|
44
|
+
stageId: string;
|
|
45
|
+
ownerId: string | null;
|
|
46
|
+
status: "lost" | "archived" | "open" | "won";
|
|
47
|
+
acceptedVersionId: string | null;
|
|
48
|
+
valueAmountCents: number | null;
|
|
49
|
+
valueCurrency: string | null;
|
|
50
|
+
expectedCloseDate: string | null;
|
|
51
|
+
source: string | null;
|
|
52
|
+
sourceRef: string | null;
|
|
53
|
+
lostReason: string | null;
|
|
54
|
+
tags: string[];
|
|
39
55
|
createdAt: Date;
|
|
40
56
|
updatedAt: Date;
|
|
41
|
-
|
|
57
|
+
stageChangedAt: Date;
|
|
58
|
+
closedAt: Date | null;
|
|
42
59
|
} | null>;
|
|
43
60
|
createQuote(db: PostgresJsDatabase, data: CreateQuoteInput): Promise<{
|
|
44
61
|
id: string;
|
|
45
|
-
status: "
|
|
62
|
+
status: "lost" | "archived" | "open" | "won";
|
|
63
|
+
organizationId: string | null;
|
|
46
64
|
createdAt: Date;
|
|
65
|
+
source: string | null;
|
|
47
66
|
updatedAt: Date;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
67
|
+
title: string;
|
|
68
|
+
ownerId: string | null;
|
|
69
|
+
sourceRef: string | null;
|
|
70
|
+
tags: string[];
|
|
71
|
+
personId: string | null;
|
|
72
|
+
pipelineId: string;
|
|
73
|
+
stageId: string;
|
|
74
|
+
acceptedVersionId: string | null;
|
|
75
|
+
valueAmountCents: number | null;
|
|
76
|
+
valueCurrency: string | null;
|
|
77
|
+
expectedCloseDate: string | null;
|
|
78
|
+
lostReason: string | null;
|
|
79
|
+
stageChangedAt: Date;
|
|
80
|
+
closedAt: Date | null;
|
|
56
81
|
} | undefined>;
|
|
57
82
|
updateQuote(db: PostgresJsDatabase, id: string, data: UpdateQuoteInput): Promise<{
|
|
58
83
|
id: string;
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
84
|
+
title: string;
|
|
85
|
+
personId: string | null;
|
|
86
|
+
organizationId: string | null;
|
|
87
|
+
pipelineId: string;
|
|
88
|
+
stageId: string;
|
|
89
|
+
ownerId: string | null;
|
|
90
|
+
status: "lost" | "archived" | "open" | "won";
|
|
91
|
+
acceptedVersionId: string | null;
|
|
92
|
+
valueAmountCents: number | null;
|
|
93
|
+
valueCurrency: string | null;
|
|
94
|
+
expectedCloseDate: string | null;
|
|
95
|
+
source: string | null;
|
|
96
|
+
sourceRef: string | null;
|
|
97
|
+
lostReason: string | null;
|
|
98
|
+
tags: string[];
|
|
67
99
|
createdAt: Date;
|
|
68
100
|
updatedAt: Date;
|
|
69
|
-
|
|
101
|
+
stageChangedAt: Date;
|
|
102
|
+
closedAt: Date | null;
|
|
70
103
|
} | null>;
|
|
71
104
|
deleteQuote(db: PostgresJsDatabase, id: string): Promise<{
|
|
72
105
|
id: string;
|
|
73
106
|
} | null>;
|
|
74
|
-
|
|
107
|
+
listQuoteParticipants(db: PostgresJsDatabase, quoteId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"quote_participants", {
|
|
75
108
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
76
109
|
name: string;
|
|
77
|
-
tableName: "
|
|
110
|
+
tableName: "quote_participants";
|
|
78
111
|
dataType: "string";
|
|
79
112
|
columnType: "PgText";
|
|
80
113
|
data: string;
|
|
@@ -91,7 +124,232 @@ export declare const quotesService: {
|
|
|
91
124
|
}, {}, {}>;
|
|
92
125
|
quoteId: import("drizzle-orm/pg-core").PgColumn<{
|
|
93
126
|
name: string;
|
|
94
|
-
tableName: "
|
|
127
|
+
tableName: "quote_participants";
|
|
128
|
+
dataType: "string";
|
|
129
|
+
columnType: "PgText";
|
|
130
|
+
data: string;
|
|
131
|
+
driverParam: string;
|
|
132
|
+
notNull: true;
|
|
133
|
+
hasDefault: false;
|
|
134
|
+
isPrimaryKey: false;
|
|
135
|
+
isAutoincrement: false;
|
|
136
|
+
hasRuntimeDefault: false;
|
|
137
|
+
enumValues: [string, ...string[]];
|
|
138
|
+
baseColumn: never;
|
|
139
|
+
identity: undefined;
|
|
140
|
+
generated: undefined;
|
|
141
|
+
}, {}, {}>;
|
|
142
|
+
personId: import("drizzle-orm/pg-core").PgColumn<{
|
|
143
|
+
name: string;
|
|
144
|
+
tableName: "quote_participants";
|
|
145
|
+
dataType: "string";
|
|
146
|
+
columnType: "PgText";
|
|
147
|
+
data: string;
|
|
148
|
+
driverParam: string;
|
|
149
|
+
notNull: true;
|
|
150
|
+
hasDefault: false;
|
|
151
|
+
isPrimaryKey: false;
|
|
152
|
+
isAutoincrement: false;
|
|
153
|
+
hasRuntimeDefault: false;
|
|
154
|
+
enumValues: [string, ...string[]];
|
|
155
|
+
baseColumn: never;
|
|
156
|
+
identity: undefined;
|
|
157
|
+
generated: undefined;
|
|
158
|
+
}, {}, {}>;
|
|
159
|
+
role: import("drizzle-orm/pg-core").PgColumn<{
|
|
160
|
+
name: "role";
|
|
161
|
+
tableName: "quote_participants";
|
|
162
|
+
dataType: "string";
|
|
163
|
+
columnType: "PgEnumColumn";
|
|
164
|
+
data: "other" | "finance" | "traveler" | "booker" | "decision_maker";
|
|
165
|
+
driverParam: string;
|
|
166
|
+
notNull: true;
|
|
167
|
+
hasDefault: true;
|
|
168
|
+
isPrimaryKey: false;
|
|
169
|
+
isAutoincrement: false;
|
|
170
|
+
hasRuntimeDefault: false;
|
|
171
|
+
enumValues: ["traveler", "booker", "decision_maker", "finance", "other"];
|
|
172
|
+
baseColumn: never;
|
|
173
|
+
identity: undefined;
|
|
174
|
+
generated: undefined;
|
|
175
|
+
}, {}, {}>;
|
|
176
|
+
isPrimary: import("drizzle-orm/pg-core").PgColumn<{
|
|
177
|
+
name: "is_primary";
|
|
178
|
+
tableName: "quote_participants";
|
|
179
|
+
dataType: "boolean";
|
|
180
|
+
columnType: "PgBoolean";
|
|
181
|
+
data: boolean;
|
|
182
|
+
driverParam: boolean;
|
|
183
|
+
notNull: true;
|
|
184
|
+
hasDefault: true;
|
|
185
|
+
isPrimaryKey: false;
|
|
186
|
+
isAutoincrement: false;
|
|
187
|
+
hasRuntimeDefault: false;
|
|
188
|
+
enumValues: undefined;
|
|
189
|
+
baseColumn: never;
|
|
190
|
+
identity: undefined;
|
|
191
|
+
generated: undefined;
|
|
192
|
+
}, {}, {}>;
|
|
193
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
194
|
+
name: "created_at";
|
|
195
|
+
tableName: "quote_participants";
|
|
196
|
+
dataType: "date";
|
|
197
|
+
columnType: "PgTimestamp";
|
|
198
|
+
data: Date;
|
|
199
|
+
driverParam: string;
|
|
200
|
+
notNull: true;
|
|
201
|
+
hasDefault: true;
|
|
202
|
+
isPrimaryKey: false;
|
|
203
|
+
isAutoincrement: false;
|
|
204
|
+
hasRuntimeDefault: false;
|
|
205
|
+
enumValues: undefined;
|
|
206
|
+
baseColumn: never;
|
|
207
|
+
identity: undefined;
|
|
208
|
+
generated: undefined;
|
|
209
|
+
}, {}, {}>;
|
|
210
|
+
}, "single", Record<"quote_participants", "not-null">, false, "where" | "orderBy", {
|
|
211
|
+
id: string;
|
|
212
|
+
quoteId: string;
|
|
213
|
+
personId: string;
|
|
214
|
+
role: "other" | "finance" | "traveler" | "booker" | "decision_maker";
|
|
215
|
+
isPrimary: boolean;
|
|
216
|
+
createdAt: Date;
|
|
217
|
+
}[], {
|
|
218
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
219
|
+
name: string;
|
|
220
|
+
tableName: "quote_participants";
|
|
221
|
+
dataType: "string";
|
|
222
|
+
columnType: "PgText";
|
|
223
|
+
data: string;
|
|
224
|
+
driverParam: string;
|
|
225
|
+
notNull: true;
|
|
226
|
+
hasDefault: true;
|
|
227
|
+
isPrimaryKey: true;
|
|
228
|
+
isAutoincrement: false;
|
|
229
|
+
hasRuntimeDefault: true;
|
|
230
|
+
enumValues: [string, ...string[]];
|
|
231
|
+
baseColumn: never;
|
|
232
|
+
identity: undefined;
|
|
233
|
+
generated: undefined;
|
|
234
|
+
}, {}, {}>;
|
|
235
|
+
quoteId: import("drizzle-orm/pg-core").PgColumn<{
|
|
236
|
+
name: string;
|
|
237
|
+
tableName: "quote_participants";
|
|
238
|
+
dataType: "string";
|
|
239
|
+
columnType: "PgText";
|
|
240
|
+
data: string;
|
|
241
|
+
driverParam: string;
|
|
242
|
+
notNull: true;
|
|
243
|
+
hasDefault: false;
|
|
244
|
+
isPrimaryKey: false;
|
|
245
|
+
isAutoincrement: false;
|
|
246
|
+
hasRuntimeDefault: false;
|
|
247
|
+
enumValues: [string, ...string[]];
|
|
248
|
+
baseColumn: never;
|
|
249
|
+
identity: undefined;
|
|
250
|
+
generated: undefined;
|
|
251
|
+
}, {}, {}>;
|
|
252
|
+
personId: import("drizzle-orm/pg-core").PgColumn<{
|
|
253
|
+
name: string;
|
|
254
|
+
tableName: "quote_participants";
|
|
255
|
+
dataType: "string";
|
|
256
|
+
columnType: "PgText";
|
|
257
|
+
data: string;
|
|
258
|
+
driverParam: string;
|
|
259
|
+
notNull: true;
|
|
260
|
+
hasDefault: false;
|
|
261
|
+
isPrimaryKey: false;
|
|
262
|
+
isAutoincrement: false;
|
|
263
|
+
hasRuntimeDefault: false;
|
|
264
|
+
enumValues: [string, ...string[]];
|
|
265
|
+
baseColumn: never;
|
|
266
|
+
identity: undefined;
|
|
267
|
+
generated: undefined;
|
|
268
|
+
}, {}, {}>;
|
|
269
|
+
role: import("drizzle-orm/pg-core").PgColumn<{
|
|
270
|
+
name: "role";
|
|
271
|
+
tableName: "quote_participants";
|
|
272
|
+
dataType: "string";
|
|
273
|
+
columnType: "PgEnumColumn";
|
|
274
|
+
data: "other" | "finance" | "traveler" | "booker" | "decision_maker";
|
|
275
|
+
driverParam: string;
|
|
276
|
+
notNull: true;
|
|
277
|
+
hasDefault: true;
|
|
278
|
+
isPrimaryKey: false;
|
|
279
|
+
isAutoincrement: false;
|
|
280
|
+
hasRuntimeDefault: false;
|
|
281
|
+
enumValues: ["traveler", "booker", "decision_maker", "finance", "other"];
|
|
282
|
+
baseColumn: never;
|
|
283
|
+
identity: undefined;
|
|
284
|
+
generated: undefined;
|
|
285
|
+
}, {}, {}>;
|
|
286
|
+
isPrimary: import("drizzle-orm/pg-core").PgColumn<{
|
|
287
|
+
name: "is_primary";
|
|
288
|
+
tableName: "quote_participants";
|
|
289
|
+
dataType: "boolean";
|
|
290
|
+
columnType: "PgBoolean";
|
|
291
|
+
data: boolean;
|
|
292
|
+
driverParam: boolean;
|
|
293
|
+
notNull: true;
|
|
294
|
+
hasDefault: true;
|
|
295
|
+
isPrimaryKey: false;
|
|
296
|
+
isAutoincrement: false;
|
|
297
|
+
hasRuntimeDefault: false;
|
|
298
|
+
enumValues: undefined;
|
|
299
|
+
baseColumn: never;
|
|
300
|
+
identity: undefined;
|
|
301
|
+
generated: undefined;
|
|
302
|
+
}, {}, {}>;
|
|
303
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
304
|
+
name: "created_at";
|
|
305
|
+
tableName: "quote_participants";
|
|
306
|
+
dataType: "date";
|
|
307
|
+
columnType: "PgTimestamp";
|
|
308
|
+
data: Date;
|
|
309
|
+
driverParam: string;
|
|
310
|
+
notNull: true;
|
|
311
|
+
hasDefault: true;
|
|
312
|
+
isPrimaryKey: false;
|
|
313
|
+
isAutoincrement: false;
|
|
314
|
+
hasRuntimeDefault: false;
|
|
315
|
+
enumValues: undefined;
|
|
316
|
+
baseColumn: never;
|
|
317
|
+
identity: undefined;
|
|
318
|
+
generated: undefined;
|
|
319
|
+
}, {}, {}>;
|
|
320
|
+
}>, "where" | "orderBy">;
|
|
321
|
+
createQuoteParticipant(db: PostgresJsDatabase, quoteId: string, data: CreateQuoteParticipantInput): Promise<{
|
|
322
|
+
id: string;
|
|
323
|
+
createdAt: Date;
|
|
324
|
+
role: "other" | "finance" | "traveler" | "booker" | "decision_maker";
|
|
325
|
+
quoteId: string;
|
|
326
|
+
isPrimary: boolean;
|
|
327
|
+
personId: string;
|
|
328
|
+
} | undefined>;
|
|
329
|
+
deleteQuoteParticipant(db: PostgresJsDatabase, id: string): Promise<{
|
|
330
|
+
id: string;
|
|
331
|
+
} | null>;
|
|
332
|
+
listQuoteProducts(db: PostgresJsDatabase, quoteId: string): Omit<import("drizzle-orm/pg-core").PgSelectBase<"quote_products", {
|
|
333
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
334
|
+
name: string;
|
|
335
|
+
tableName: "quote_products";
|
|
336
|
+
dataType: "string";
|
|
337
|
+
columnType: "PgText";
|
|
338
|
+
data: string;
|
|
339
|
+
driverParam: string;
|
|
340
|
+
notNull: true;
|
|
341
|
+
hasDefault: true;
|
|
342
|
+
isPrimaryKey: true;
|
|
343
|
+
isAutoincrement: false;
|
|
344
|
+
hasRuntimeDefault: true;
|
|
345
|
+
enumValues: [string, ...string[]];
|
|
346
|
+
baseColumn: never;
|
|
347
|
+
identity: undefined;
|
|
348
|
+
generated: undefined;
|
|
349
|
+
}, {}, {}>;
|
|
350
|
+
quoteId: import("drizzle-orm/pg-core").PgColumn<{
|
|
351
|
+
name: string;
|
|
352
|
+
tableName: "quote_products";
|
|
95
353
|
dataType: "string";
|
|
96
354
|
columnType: "PgText";
|
|
97
355
|
data: string;
|
|
@@ -108,7 +366,7 @@ export declare const quotesService: {
|
|
|
108
366
|
}, {}, {}>;
|
|
109
367
|
productId: import("drizzle-orm/pg-core").PgColumn<{
|
|
110
368
|
name: "product_id";
|
|
111
|
-
tableName: "
|
|
369
|
+
tableName: "quote_products";
|
|
112
370
|
dataType: "string";
|
|
113
371
|
columnType: "PgText";
|
|
114
372
|
data: string;
|
|
@@ -125,7 +383,7 @@ export declare const quotesService: {
|
|
|
125
383
|
}, {}, {}>;
|
|
126
384
|
supplierServiceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
127
385
|
name: "supplier_service_id";
|
|
128
|
-
tableName: "
|
|
386
|
+
tableName: "quote_products";
|
|
129
387
|
dataType: "string";
|
|
130
388
|
columnType: "PgText";
|
|
131
389
|
data: string;
|
|
@@ -140,14 +398,31 @@ export declare const quotesService: {
|
|
|
140
398
|
identity: undefined;
|
|
141
399
|
generated: undefined;
|
|
142
400
|
}, {}, {}>;
|
|
401
|
+
nameSnapshot: import("drizzle-orm/pg-core").PgColumn<{
|
|
402
|
+
name: "name_snapshot";
|
|
403
|
+
tableName: "quote_products";
|
|
404
|
+
dataType: "string";
|
|
405
|
+
columnType: "PgText";
|
|
406
|
+
data: string;
|
|
407
|
+
driverParam: string;
|
|
408
|
+
notNull: true;
|
|
409
|
+
hasDefault: false;
|
|
410
|
+
isPrimaryKey: false;
|
|
411
|
+
isAutoincrement: false;
|
|
412
|
+
hasRuntimeDefault: false;
|
|
413
|
+
enumValues: [string, ...string[]];
|
|
414
|
+
baseColumn: never;
|
|
415
|
+
identity: undefined;
|
|
416
|
+
generated: undefined;
|
|
417
|
+
}, {}, {}>;
|
|
143
418
|
description: import("drizzle-orm/pg-core").PgColumn<{
|
|
144
419
|
name: "description";
|
|
145
|
-
tableName: "
|
|
420
|
+
tableName: "quote_products";
|
|
146
421
|
dataType: "string";
|
|
147
422
|
columnType: "PgText";
|
|
148
423
|
data: string;
|
|
149
424
|
driverParam: string;
|
|
150
|
-
notNull:
|
|
425
|
+
notNull: false;
|
|
151
426
|
hasDefault: false;
|
|
152
427
|
isPrimaryKey: false;
|
|
153
428
|
isAutoincrement: false;
|
|
@@ -159,7 +434,7 @@ export declare const quotesService: {
|
|
|
159
434
|
}, {}, {}>;
|
|
160
435
|
quantity: import("drizzle-orm/pg-core").PgColumn<{
|
|
161
436
|
name: "quantity";
|
|
162
|
-
tableName: "
|
|
437
|
+
tableName: "quote_products";
|
|
163
438
|
dataType: "number";
|
|
164
439
|
columnType: "PgInteger";
|
|
165
440
|
data: number;
|
|
@@ -176,13 +451,13 @@ export declare const quotesService: {
|
|
|
176
451
|
}, {}, {}>;
|
|
177
452
|
unitPriceAmountCents: import("drizzle-orm/pg-core").PgColumn<{
|
|
178
453
|
name: "unit_price_amount_cents";
|
|
179
|
-
tableName: "
|
|
454
|
+
tableName: "quote_products";
|
|
180
455
|
dataType: "number";
|
|
181
456
|
columnType: "PgInteger";
|
|
182
457
|
data: number;
|
|
183
458
|
driverParam: string | number;
|
|
184
|
-
notNull:
|
|
185
|
-
hasDefault:
|
|
459
|
+
notNull: false;
|
|
460
|
+
hasDefault: false;
|
|
186
461
|
isPrimaryKey: false;
|
|
187
462
|
isAutoincrement: false;
|
|
188
463
|
hasRuntimeDefault: false;
|
|
@@ -191,15 +466,15 @@ export declare const quotesService: {
|
|
|
191
466
|
identity: undefined;
|
|
192
467
|
generated: undefined;
|
|
193
468
|
}, {}, {}>;
|
|
194
|
-
|
|
195
|
-
name: "
|
|
196
|
-
tableName: "
|
|
469
|
+
costAmountCents: import("drizzle-orm/pg-core").PgColumn<{
|
|
470
|
+
name: "cost_amount_cents";
|
|
471
|
+
tableName: "quote_products";
|
|
197
472
|
dataType: "number";
|
|
198
473
|
columnType: "PgInteger";
|
|
199
474
|
data: number;
|
|
200
475
|
driverParam: string | number;
|
|
201
|
-
notNull:
|
|
202
|
-
hasDefault:
|
|
476
|
+
notNull: false;
|
|
477
|
+
hasDefault: false;
|
|
203
478
|
isPrimaryKey: false;
|
|
204
479
|
isAutoincrement: false;
|
|
205
480
|
hasRuntimeDefault: false;
|
|
@@ -210,12 +485,12 @@ export declare const quotesService: {
|
|
|
210
485
|
}, {}, {}>;
|
|
211
486
|
currency: import("drizzle-orm/pg-core").PgColumn<{
|
|
212
487
|
name: "currency";
|
|
213
|
-
tableName: "
|
|
488
|
+
tableName: "quote_products";
|
|
214
489
|
dataType: "string";
|
|
215
490
|
columnType: "PgText";
|
|
216
491
|
data: string;
|
|
217
492
|
driverParam: string;
|
|
218
|
-
notNull:
|
|
493
|
+
notNull: false;
|
|
219
494
|
hasDefault: false;
|
|
220
495
|
isPrimaryKey: false;
|
|
221
496
|
isAutoincrement: false;
|
|
@@ -225,9 +500,26 @@ export declare const quotesService: {
|
|
|
225
500
|
identity: undefined;
|
|
226
501
|
generated: undefined;
|
|
227
502
|
}, {}, {}>;
|
|
503
|
+
discountAmountCents: import("drizzle-orm/pg-core").PgColumn<{
|
|
504
|
+
name: "discount_amount_cents";
|
|
505
|
+
tableName: "quote_products";
|
|
506
|
+
dataType: "number";
|
|
507
|
+
columnType: "PgInteger";
|
|
508
|
+
data: number;
|
|
509
|
+
driverParam: string | number;
|
|
510
|
+
notNull: false;
|
|
511
|
+
hasDefault: false;
|
|
512
|
+
isPrimaryKey: false;
|
|
513
|
+
isAutoincrement: false;
|
|
514
|
+
hasRuntimeDefault: false;
|
|
515
|
+
enumValues: undefined;
|
|
516
|
+
baseColumn: never;
|
|
517
|
+
identity: undefined;
|
|
518
|
+
generated: undefined;
|
|
519
|
+
}, {}, {}>;
|
|
228
520
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
229
521
|
name: "created_at";
|
|
230
|
-
tableName: "
|
|
522
|
+
tableName: "quote_products";
|
|
231
523
|
dataType: "date";
|
|
232
524
|
columnType: "PgTimestamp";
|
|
233
525
|
data: Date;
|
|
@@ -244,7 +536,7 @@ export declare const quotesService: {
|
|
|
244
536
|
}, {}, {}>;
|
|
245
537
|
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
246
538
|
name: "updated_at";
|
|
247
|
-
tableName: "
|
|
539
|
+
tableName: "quote_products";
|
|
248
540
|
dataType: "date";
|
|
249
541
|
columnType: "PgTimestamp";
|
|
250
542
|
data: Date;
|
|
@@ -259,22 +551,24 @@ export declare const quotesService: {
|
|
|
259
551
|
identity: undefined;
|
|
260
552
|
generated: undefined;
|
|
261
553
|
}, {}, {}>;
|
|
262
|
-
}, "single", Record<"
|
|
554
|
+
}, "single", Record<"quote_products", "not-null">, false, "where" | "orderBy", {
|
|
263
555
|
id: string;
|
|
264
556
|
quoteId: string;
|
|
265
557
|
productId: string | null;
|
|
266
558
|
supplierServiceId: string | null;
|
|
267
|
-
|
|
559
|
+
nameSnapshot: string;
|
|
560
|
+
description: string | null;
|
|
268
561
|
quantity: number;
|
|
269
|
-
unitPriceAmountCents: number;
|
|
270
|
-
|
|
271
|
-
currency: string;
|
|
562
|
+
unitPriceAmountCents: number | null;
|
|
563
|
+
costAmountCents: number | null;
|
|
564
|
+
currency: string | null;
|
|
565
|
+
discountAmountCents: number | null;
|
|
272
566
|
createdAt: Date;
|
|
273
567
|
updatedAt: Date;
|
|
274
568
|
}[], {
|
|
275
569
|
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
276
570
|
name: string;
|
|
277
|
-
tableName: "
|
|
571
|
+
tableName: "quote_products";
|
|
278
572
|
dataType: "string";
|
|
279
573
|
columnType: "PgText";
|
|
280
574
|
data: string;
|
|
@@ -291,7 +585,7 @@ export declare const quotesService: {
|
|
|
291
585
|
}, {}, {}>;
|
|
292
586
|
quoteId: import("drizzle-orm/pg-core").PgColumn<{
|
|
293
587
|
name: string;
|
|
294
|
-
tableName: "
|
|
588
|
+
tableName: "quote_products";
|
|
295
589
|
dataType: "string";
|
|
296
590
|
columnType: "PgText";
|
|
297
591
|
data: string;
|
|
@@ -308,7 +602,7 @@ export declare const quotesService: {
|
|
|
308
602
|
}, {}, {}>;
|
|
309
603
|
productId: import("drizzle-orm/pg-core").PgColumn<{
|
|
310
604
|
name: "product_id";
|
|
311
|
-
tableName: "
|
|
605
|
+
tableName: "quote_products";
|
|
312
606
|
dataType: "string";
|
|
313
607
|
columnType: "PgText";
|
|
314
608
|
data: string;
|
|
@@ -325,7 +619,7 @@ export declare const quotesService: {
|
|
|
325
619
|
}, {}, {}>;
|
|
326
620
|
supplierServiceId: import("drizzle-orm/pg-core").PgColumn<{
|
|
327
621
|
name: "supplier_service_id";
|
|
328
|
-
tableName: "
|
|
622
|
+
tableName: "quote_products";
|
|
329
623
|
dataType: "string";
|
|
330
624
|
columnType: "PgText";
|
|
331
625
|
data: string;
|
|
@@ -340,14 +634,31 @@ export declare const quotesService: {
|
|
|
340
634
|
identity: undefined;
|
|
341
635
|
generated: undefined;
|
|
342
636
|
}, {}, {}>;
|
|
637
|
+
nameSnapshot: import("drizzle-orm/pg-core").PgColumn<{
|
|
638
|
+
name: "name_snapshot";
|
|
639
|
+
tableName: "quote_products";
|
|
640
|
+
dataType: "string";
|
|
641
|
+
columnType: "PgText";
|
|
642
|
+
data: string;
|
|
643
|
+
driverParam: string;
|
|
644
|
+
notNull: true;
|
|
645
|
+
hasDefault: false;
|
|
646
|
+
isPrimaryKey: false;
|
|
647
|
+
isAutoincrement: false;
|
|
648
|
+
hasRuntimeDefault: false;
|
|
649
|
+
enumValues: [string, ...string[]];
|
|
650
|
+
baseColumn: never;
|
|
651
|
+
identity: undefined;
|
|
652
|
+
generated: undefined;
|
|
653
|
+
}, {}, {}>;
|
|
343
654
|
description: import("drizzle-orm/pg-core").PgColumn<{
|
|
344
655
|
name: "description";
|
|
345
|
-
tableName: "
|
|
656
|
+
tableName: "quote_products";
|
|
346
657
|
dataType: "string";
|
|
347
658
|
columnType: "PgText";
|
|
348
659
|
data: string;
|
|
349
660
|
driverParam: string;
|
|
350
|
-
notNull:
|
|
661
|
+
notNull: false;
|
|
351
662
|
hasDefault: false;
|
|
352
663
|
isPrimaryKey: false;
|
|
353
664
|
isAutoincrement: false;
|
|
@@ -359,7 +670,7 @@ export declare const quotesService: {
|
|
|
359
670
|
}, {}, {}>;
|
|
360
671
|
quantity: import("drizzle-orm/pg-core").PgColumn<{
|
|
361
672
|
name: "quantity";
|
|
362
|
-
tableName: "
|
|
673
|
+
tableName: "quote_products";
|
|
363
674
|
dataType: "number";
|
|
364
675
|
columnType: "PgInteger";
|
|
365
676
|
data: number;
|
|
@@ -376,13 +687,13 @@ export declare const quotesService: {
|
|
|
376
687
|
}, {}, {}>;
|
|
377
688
|
unitPriceAmountCents: import("drizzle-orm/pg-core").PgColumn<{
|
|
378
689
|
name: "unit_price_amount_cents";
|
|
379
|
-
tableName: "
|
|
690
|
+
tableName: "quote_products";
|
|
380
691
|
dataType: "number";
|
|
381
692
|
columnType: "PgInteger";
|
|
382
693
|
data: number;
|
|
383
694
|
driverParam: string | number;
|
|
384
|
-
notNull:
|
|
385
|
-
hasDefault:
|
|
695
|
+
notNull: false;
|
|
696
|
+
hasDefault: false;
|
|
386
697
|
isPrimaryKey: false;
|
|
387
698
|
isAutoincrement: false;
|
|
388
699
|
hasRuntimeDefault: false;
|
|
@@ -391,15 +702,15 @@ export declare const quotesService: {
|
|
|
391
702
|
identity: undefined;
|
|
392
703
|
generated: undefined;
|
|
393
704
|
}, {}, {}>;
|
|
394
|
-
|
|
395
|
-
name: "
|
|
396
|
-
tableName: "
|
|
705
|
+
costAmountCents: import("drizzle-orm/pg-core").PgColumn<{
|
|
706
|
+
name: "cost_amount_cents";
|
|
707
|
+
tableName: "quote_products";
|
|
397
708
|
dataType: "number";
|
|
398
709
|
columnType: "PgInteger";
|
|
399
710
|
data: number;
|
|
400
711
|
driverParam: string | number;
|
|
401
|
-
notNull:
|
|
402
|
-
hasDefault:
|
|
712
|
+
notNull: false;
|
|
713
|
+
hasDefault: false;
|
|
403
714
|
isPrimaryKey: false;
|
|
404
715
|
isAutoincrement: false;
|
|
405
716
|
hasRuntimeDefault: false;
|
|
@@ -410,12 +721,12 @@ export declare const quotesService: {
|
|
|
410
721
|
}, {}, {}>;
|
|
411
722
|
currency: import("drizzle-orm/pg-core").PgColumn<{
|
|
412
723
|
name: "currency";
|
|
413
|
-
tableName: "
|
|
724
|
+
tableName: "quote_products";
|
|
414
725
|
dataType: "string";
|
|
415
726
|
columnType: "PgText";
|
|
416
727
|
data: string;
|
|
417
728
|
driverParam: string;
|
|
418
|
-
notNull:
|
|
729
|
+
notNull: false;
|
|
419
730
|
hasDefault: false;
|
|
420
731
|
isPrimaryKey: false;
|
|
421
732
|
isAutoincrement: false;
|
|
@@ -425,9 +736,26 @@ export declare const quotesService: {
|
|
|
425
736
|
identity: undefined;
|
|
426
737
|
generated: undefined;
|
|
427
738
|
}, {}, {}>;
|
|
739
|
+
discountAmountCents: import("drizzle-orm/pg-core").PgColumn<{
|
|
740
|
+
name: "discount_amount_cents";
|
|
741
|
+
tableName: "quote_products";
|
|
742
|
+
dataType: "number";
|
|
743
|
+
columnType: "PgInteger";
|
|
744
|
+
data: number;
|
|
745
|
+
driverParam: string | number;
|
|
746
|
+
notNull: false;
|
|
747
|
+
hasDefault: false;
|
|
748
|
+
isPrimaryKey: false;
|
|
749
|
+
isAutoincrement: false;
|
|
750
|
+
hasRuntimeDefault: false;
|
|
751
|
+
enumValues: undefined;
|
|
752
|
+
baseColumn: never;
|
|
753
|
+
identity: undefined;
|
|
754
|
+
generated: undefined;
|
|
755
|
+
}, {}, {}>;
|
|
428
756
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
429
757
|
name: "created_at";
|
|
430
|
-
tableName: "
|
|
758
|
+
tableName: "quote_products";
|
|
431
759
|
dataType: "date";
|
|
432
760
|
columnType: "PgTimestamp";
|
|
433
761
|
data: Date;
|
|
@@ -444,7 +772,7 @@ export declare const quotesService: {
|
|
|
444
772
|
}, {}, {}>;
|
|
445
773
|
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
446
774
|
name: "updated_at";
|
|
447
|
-
tableName: "
|
|
775
|
+
tableName: "quote_products";
|
|
448
776
|
dataType: "date";
|
|
449
777
|
columnType: "PgTimestamp";
|
|
450
778
|
data: Date;
|
|
@@ -460,33 +788,37 @@ export declare const quotesService: {
|
|
|
460
788
|
generated: undefined;
|
|
461
789
|
}, {}, {}>;
|
|
462
790
|
}>, "where" | "orderBy">;
|
|
463
|
-
|
|
791
|
+
createQuoteProduct(db: PostgresJsDatabase, quoteId: string, data: CreateQuoteProductInput): Promise<{
|
|
464
792
|
id: string;
|
|
465
|
-
description: string;
|
|
793
|
+
description: string | null;
|
|
466
794
|
createdAt: Date;
|
|
467
795
|
updatedAt: Date;
|
|
468
|
-
currency: string;
|
|
796
|
+
currency: string | null;
|
|
469
797
|
quoteId: string;
|
|
470
798
|
productId: string | null;
|
|
471
799
|
supplierServiceId: string | null;
|
|
800
|
+
nameSnapshot: string;
|
|
472
801
|
quantity: number;
|
|
473
|
-
unitPriceAmountCents: number;
|
|
474
|
-
|
|
802
|
+
unitPriceAmountCents: number | null;
|
|
803
|
+
costAmountCents: number | null;
|
|
804
|
+
discountAmountCents: number | null;
|
|
475
805
|
} | undefined>;
|
|
476
|
-
|
|
806
|
+
updateQuoteProduct(db: PostgresJsDatabase, id: string, data: UpdateQuoteProductInput): Promise<{
|
|
477
807
|
id: string;
|
|
478
808
|
quoteId: string;
|
|
479
809
|
productId: string | null;
|
|
480
810
|
supplierServiceId: string | null;
|
|
481
|
-
|
|
811
|
+
nameSnapshot: string;
|
|
812
|
+
description: string | null;
|
|
482
813
|
quantity: number;
|
|
483
|
-
unitPriceAmountCents: number;
|
|
484
|
-
|
|
485
|
-
currency: string;
|
|
814
|
+
unitPriceAmountCents: number | null;
|
|
815
|
+
costAmountCents: number | null;
|
|
816
|
+
currency: string | null;
|
|
817
|
+
discountAmountCents: number | null;
|
|
486
818
|
createdAt: Date;
|
|
487
819
|
updatedAt: Date;
|
|
488
820
|
} | null>;
|
|
489
|
-
|
|
821
|
+
deleteQuoteProduct(db: PostgresJsDatabase, id: string): Promise<{
|
|
490
822
|
id: string;
|
|
491
823
|
} | null>;
|
|
492
824
|
};
|