@voyantjs/transactions 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-offers.d.ts +885 -0
- package/dist/routes-offers.d.ts.map +1 -0
- package/dist/routes-offers.js +161 -0
- package/dist/routes-orders.d.ts +1056 -0
- package/dist/routes-orders.d.ts.map +1 -0
- package/dist/routes-orders.js +180 -0
- package/dist/routes-shared.d.ts +103 -0
- package/dist/routes-shared.d.ts.map +1 -0
- package/dist/routes-shared.js +97 -0
- package/dist/routes.d.ts +3 -1979
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +5 -604
- package/dist/schema-audit.d.ts +216 -0
- package/dist/schema-audit.d.ts.map +1 -0
- package/dist/schema-audit.js +22 -0
- package/dist/schema-offers.d.ts +1301 -0
- package/dist/schema-offers.d.ts.map +1 -0
- package/dist/schema-offers.js +120 -0
- package/dist/schema-orders.d.ts +1582 -0
- package/dist/schema-orders.d.ts.map +1 -0
- package/dist/schema-orders.js +149 -0
- package/dist/schema-relations.d.ts +42 -0
- package/dist/schema-relations.d.ts.map +1 -0
- package/dist/schema-relations.js +56 -0
- package/dist/schema-shared.d.ts +12 -0
- package/dist/schema-shared.d.ts.map +1 -0
- package/dist/schema-shared.js +84 -0
- package/dist/schema.d.ts +5 -3148
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +5 -420
- package/dist/service-offers.d.ts +447 -0
- package/dist/service-offers.d.ts.map +1 -0
- package/dist/service-offers.js +262 -0
- package/dist/service-orders.d.ts +443 -0
- package/dist/service-orders.d.ts.map +1 -0
- package/dist/service-orders.js +278 -0
- package/dist/service-shared.d.ts +86 -0
- package/dist/service-shared.d.ts.map +1 -0
- package/dist/service-shared.js +49 -0
- package/dist/service.d.ts +48 -927
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +48 -595
- package/package.json +5 -5
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
2
|
+
import type { CreateOfferBundleInput, CreateOfferInput, CreateOfferItemInput, CreateOfferItemParticipantInput, CreateOfferParticipantInput, OfferItemListQuery, OfferItemParticipantListQuery, OfferListQuery, OfferParticipantListQuery, UpdateOfferInput, UpdateOfferItemInput, UpdateOfferItemParticipantInput, UpdateOfferParticipantInput } from "./service-shared.js";
|
|
3
|
+
export declare function listOffers(db: PostgresJsDatabase, query: OfferListQuery): Promise<{
|
|
4
|
+
data: {
|
|
5
|
+
id: string;
|
|
6
|
+
offerNumber: string;
|
|
7
|
+
title: string;
|
|
8
|
+
status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
|
|
9
|
+
personId: string | null;
|
|
10
|
+
organizationId: string | null;
|
|
11
|
+
opportunityId: string | null;
|
|
12
|
+
quoteId: string | null;
|
|
13
|
+
marketId: string | null;
|
|
14
|
+
sourceChannelId: string | null;
|
|
15
|
+
currency: string;
|
|
16
|
+
baseCurrency: string | null;
|
|
17
|
+
fxRateSetId: string | null;
|
|
18
|
+
subtotalAmountCents: number;
|
|
19
|
+
taxAmountCents: number;
|
|
20
|
+
feeAmountCents: number;
|
|
21
|
+
totalAmountCents: number;
|
|
22
|
+
costAmountCents: number;
|
|
23
|
+
validFrom: string | null;
|
|
24
|
+
validUntil: string | null;
|
|
25
|
+
sentAt: Date | null;
|
|
26
|
+
acceptedAt: Date | null;
|
|
27
|
+
convertedAt: Date | null;
|
|
28
|
+
notes: string | null;
|
|
29
|
+
metadata: unknown;
|
|
30
|
+
createdAt: Date;
|
|
31
|
+
updatedAt: Date;
|
|
32
|
+
}[];
|
|
33
|
+
total: number;
|
|
34
|
+
limit: number;
|
|
35
|
+
offset: number;
|
|
36
|
+
}>;
|
|
37
|
+
export declare function getOfferById(db: PostgresJsDatabase, id: string): Promise<{
|
|
38
|
+
id: string;
|
|
39
|
+
offerNumber: string;
|
|
40
|
+
title: string;
|
|
41
|
+
status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
|
|
42
|
+
personId: string | null;
|
|
43
|
+
organizationId: string | null;
|
|
44
|
+
opportunityId: string | null;
|
|
45
|
+
quoteId: string | null;
|
|
46
|
+
marketId: string | null;
|
|
47
|
+
sourceChannelId: string | null;
|
|
48
|
+
currency: string;
|
|
49
|
+
baseCurrency: string | null;
|
|
50
|
+
fxRateSetId: string | null;
|
|
51
|
+
subtotalAmountCents: number;
|
|
52
|
+
taxAmountCents: number;
|
|
53
|
+
feeAmountCents: number;
|
|
54
|
+
totalAmountCents: number;
|
|
55
|
+
costAmountCents: number;
|
|
56
|
+
validFrom: string | null;
|
|
57
|
+
validUntil: string | null;
|
|
58
|
+
sentAt: Date | null;
|
|
59
|
+
acceptedAt: Date | null;
|
|
60
|
+
convertedAt: Date | null;
|
|
61
|
+
notes: string | null;
|
|
62
|
+
metadata: unknown;
|
|
63
|
+
createdAt: Date;
|
|
64
|
+
updatedAt: Date;
|
|
65
|
+
} | null>;
|
|
66
|
+
export declare function createOffer(db: PostgresJsDatabase, data: CreateOfferInput): Promise<{
|
|
67
|
+
createdAt: Date;
|
|
68
|
+
updatedAt: Date;
|
|
69
|
+
currency: string;
|
|
70
|
+
notes: string | null;
|
|
71
|
+
id: string;
|
|
72
|
+
metadata: unknown;
|
|
73
|
+
offerNumber: string;
|
|
74
|
+
title: string;
|
|
75
|
+
status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
|
|
76
|
+
personId: string | null;
|
|
77
|
+
organizationId: string | null;
|
|
78
|
+
opportunityId: string | null;
|
|
79
|
+
quoteId: string | null;
|
|
80
|
+
marketId: string | null;
|
|
81
|
+
sourceChannelId: string | null;
|
|
82
|
+
baseCurrency: string | null;
|
|
83
|
+
fxRateSetId: string | null;
|
|
84
|
+
subtotalAmountCents: number;
|
|
85
|
+
taxAmountCents: number;
|
|
86
|
+
feeAmountCents: number;
|
|
87
|
+
totalAmountCents: number;
|
|
88
|
+
costAmountCents: number;
|
|
89
|
+
validFrom: string | null;
|
|
90
|
+
validUntil: string | null;
|
|
91
|
+
sentAt: Date | null;
|
|
92
|
+
acceptedAt: Date | null;
|
|
93
|
+
convertedAt: Date | null;
|
|
94
|
+
} | null>;
|
|
95
|
+
export declare function createOfferBundle(db: PostgresJsDatabase, input: CreateOfferBundleInput): Promise<{
|
|
96
|
+
offer: {
|
|
97
|
+
createdAt: Date;
|
|
98
|
+
updatedAt: Date;
|
|
99
|
+
currency: string;
|
|
100
|
+
notes: string | null;
|
|
101
|
+
id: string;
|
|
102
|
+
metadata: unknown;
|
|
103
|
+
offerNumber: string;
|
|
104
|
+
title: string;
|
|
105
|
+
status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
|
|
106
|
+
personId: string | null;
|
|
107
|
+
organizationId: string | null;
|
|
108
|
+
opportunityId: string | null;
|
|
109
|
+
quoteId: string | null;
|
|
110
|
+
marketId: string | null;
|
|
111
|
+
sourceChannelId: string | null;
|
|
112
|
+
baseCurrency: string | null;
|
|
113
|
+
fxRateSetId: string | null;
|
|
114
|
+
subtotalAmountCents: number;
|
|
115
|
+
taxAmountCents: number;
|
|
116
|
+
feeAmountCents: number;
|
|
117
|
+
totalAmountCents: number;
|
|
118
|
+
costAmountCents: number;
|
|
119
|
+
validFrom: string | null;
|
|
120
|
+
validUntil: string | null;
|
|
121
|
+
sentAt: Date | null;
|
|
122
|
+
acceptedAt: Date | null;
|
|
123
|
+
convertedAt: Date | null;
|
|
124
|
+
};
|
|
125
|
+
participants: {
|
|
126
|
+
id: string;
|
|
127
|
+
offerId: string;
|
|
128
|
+
personId: string | null;
|
|
129
|
+
participantType: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
|
|
130
|
+
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
131
|
+
firstName: string;
|
|
132
|
+
lastName: string;
|
|
133
|
+
email: string | null;
|
|
134
|
+
phone: string | null;
|
|
135
|
+
preferredLanguage: string | null;
|
|
136
|
+
isPrimary: boolean;
|
|
137
|
+
notes: string | null;
|
|
138
|
+
hasTravelIdentity: boolean;
|
|
139
|
+
createdAt: Date;
|
|
140
|
+
updatedAt: Date;
|
|
141
|
+
}[];
|
|
142
|
+
items: {
|
|
143
|
+
offerId: string;
|
|
144
|
+
createdAt: Date;
|
|
145
|
+
updatedAt: Date;
|
|
146
|
+
description: string | null;
|
|
147
|
+
notes: string | null;
|
|
148
|
+
id: string;
|
|
149
|
+
metadata: unknown;
|
|
150
|
+
title: string;
|
|
151
|
+
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
152
|
+
taxAmountCents: number | null;
|
|
153
|
+
feeAmountCents: number | null;
|
|
154
|
+
productId: string | null;
|
|
155
|
+
optionId: string | null;
|
|
156
|
+
unitId: string | null;
|
|
157
|
+
slotId: string | null;
|
|
158
|
+
itemType: "other" | "unit" | "service" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
159
|
+
serviceDate: string | null;
|
|
160
|
+
startsAt: Date | null;
|
|
161
|
+
endsAt: Date | null;
|
|
162
|
+
quantity: number;
|
|
163
|
+
sellCurrency: string;
|
|
164
|
+
unitSellAmountCents: number | null;
|
|
165
|
+
totalSellAmountCents: number | null;
|
|
166
|
+
costCurrency: string | null;
|
|
167
|
+
unitCostAmountCents: number | null;
|
|
168
|
+
totalCostAmountCents: number | null;
|
|
169
|
+
}[];
|
|
170
|
+
itemParticipants: {
|
|
171
|
+
createdAt: Date;
|
|
172
|
+
participantId: string;
|
|
173
|
+
id: string;
|
|
174
|
+
isPrimary: boolean;
|
|
175
|
+
offerItemId: string;
|
|
176
|
+
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
177
|
+
}[];
|
|
178
|
+
} | null>;
|
|
179
|
+
export declare function updateOffer(db: PostgresJsDatabase, id: string, data: UpdateOfferInput): Promise<{
|
|
180
|
+
id: string;
|
|
181
|
+
offerNumber: string;
|
|
182
|
+
title: string;
|
|
183
|
+
status: "draft" | "published" | "sent" | "accepted" | "expired" | "withdrawn" | "converted";
|
|
184
|
+
personId: string | null;
|
|
185
|
+
organizationId: string | null;
|
|
186
|
+
opportunityId: string | null;
|
|
187
|
+
quoteId: string | null;
|
|
188
|
+
marketId: string | null;
|
|
189
|
+
sourceChannelId: string | null;
|
|
190
|
+
currency: string;
|
|
191
|
+
baseCurrency: string | null;
|
|
192
|
+
fxRateSetId: string | null;
|
|
193
|
+
subtotalAmountCents: number;
|
|
194
|
+
taxAmountCents: number;
|
|
195
|
+
feeAmountCents: number;
|
|
196
|
+
totalAmountCents: number;
|
|
197
|
+
costAmountCents: number;
|
|
198
|
+
validFrom: string | null;
|
|
199
|
+
validUntil: string | null;
|
|
200
|
+
sentAt: Date | null;
|
|
201
|
+
acceptedAt: Date | null;
|
|
202
|
+
convertedAt: Date | null;
|
|
203
|
+
notes: string | null;
|
|
204
|
+
metadata: unknown;
|
|
205
|
+
createdAt: Date;
|
|
206
|
+
updatedAt: Date;
|
|
207
|
+
} | null>;
|
|
208
|
+
export declare function deleteOffer(db: PostgresJsDatabase, id: string): Promise<{
|
|
209
|
+
id: string;
|
|
210
|
+
} | null>;
|
|
211
|
+
export declare function listOfferParticipants(db: PostgresJsDatabase, query: OfferParticipantListQuery): Promise<{
|
|
212
|
+
data: {
|
|
213
|
+
id: string;
|
|
214
|
+
offerId: string;
|
|
215
|
+
personId: string | null;
|
|
216
|
+
participantType: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
|
|
217
|
+
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
218
|
+
firstName: string;
|
|
219
|
+
lastName: string;
|
|
220
|
+
email: string | null;
|
|
221
|
+
phone: string | null;
|
|
222
|
+
preferredLanguage: string | null;
|
|
223
|
+
isPrimary: boolean;
|
|
224
|
+
notes: string | null;
|
|
225
|
+
hasTravelIdentity: boolean;
|
|
226
|
+
createdAt: Date;
|
|
227
|
+
updatedAt: Date;
|
|
228
|
+
}[];
|
|
229
|
+
total: number;
|
|
230
|
+
limit: number;
|
|
231
|
+
offset: number;
|
|
232
|
+
}>;
|
|
233
|
+
export declare function getOfferParticipantById(db: PostgresJsDatabase, id: string): Promise<{
|
|
234
|
+
id: string;
|
|
235
|
+
offerId: string;
|
|
236
|
+
personId: string | null;
|
|
237
|
+
participantType: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
|
|
238
|
+
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
239
|
+
firstName: string;
|
|
240
|
+
lastName: string;
|
|
241
|
+
email: string | null;
|
|
242
|
+
phone: string | null;
|
|
243
|
+
preferredLanguage: string | null;
|
|
244
|
+
isPrimary: boolean;
|
|
245
|
+
notes: string | null;
|
|
246
|
+
hasTravelIdentity: boolean;
|
|
247
|
+
createdAt: Date;
|
|
248
|
+
updatedAt: Date;
|
|
249
|
+
} | null>;
|
|
250
|
+
export declare function createOfferParticipant(db: PostgresJsDatabase, data: CreateOfferParticipantInput): Promise<{
|
|
251
|
+
id: string;
|
|
252
|
+
offerId: string;
|
|
253
|
+
personId: string | null;
|
|
254
|
+
participantType: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
|
|
255
|
+
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
256
|
+
firstName: string;
|
|
257
|
+
lastName: string;
|
|
258
|
+
email: string | null;
|
|
259
|
+
phone: string | null;
|
|
260
|
+
preferredLanguage: string | null;
|
|
261
|
+
isPrimary: boolean;
|
|
262
|
+
notes: string | null;
|
|
263
|
+
hasTravelIdentity: boolean;
|
|
264
|
+
createdAt: Date;
|
|
265
|
+
updatedAt: Date;
|
|
266
|
+
} | null>;
|
|
267
|
+
export declare function updateOfferParticipant(db: PostgresJsDatabase, id: string, data: UpdateOfferParticipantInput): Promise<{
|
|
268
|
+
id: string;
|
|
269
|
+
offerId: string;
|
|
270
|
+
personId: string | null;
|
|
271
|
+
participantType: "staff" | "other" | "traveler" | "booker" | "contact" | "occupant";
|
|
272
|
+
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
273
|
+
firstName: string;
|
|
274
|
+
lastName: string;
|
|
275
|
+
email: string | null;
|
|
276
|
+
phone: string | null;
|
|
277
|
+
preferredLanguage: string | null;
|
|
278
|
+
isPrimary: boolean;
|
|
279
|
+
notes: string | null;
|
|
280
|
+
hasTravelIdentity: boolean;
|
|
281
|
+
createdAt: Date;
|
|
282
|
+
updatedAt: Date;
|
|
283
|
+
} | null>;
|
|
284
|
+
export declare function deleteOfferParticipant(db: PostgresJsDatabase, id: string): Promise<{
|
|
285
|
+
id: string;
|
|
286
|
+
} | null>;
|
|
287
|
+
export declare function listOfferItems(db: PostgresJsDatabase, query: OfferItemListQuery): Promise<{
|
|
288
|
+
data: {
|
|
289
|
+
id: string;
|
|
290
|
+
offerId: string;
|
|
291
|
+
productId: string | null;
|
|
292
|
+
optionId: string | null;
|
|
293
|
+
unitId: string | null;
|
|
294
|
+
slotId: string | null;
|
|
295
|
+
title: string;
|
|
296
|
+
description: string | null;
|
|
297
|
+
itemType: "other" | "unit" | "service" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
298
|
+
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
299
|
+
serviceDate: string | null;
|
|
300
|
+
startsAt: Date | null;
|
|
301
|
+
endsAt: Date | null;
|
|
302
|
+
quantity: number;
|
|
303
|
+
sellCurrency: string;
|
|
304
|
+
unitSellAmountCents: number | null;
|
|
305
|
+
totalSellAmountCents: number | null;
|
|
306
|
+
taxAmountCents: number | null;
|
|
307
|
+
feeAmountCents: number | null;
|
|
308
|
+
costCurrency: string | null;
|
|
309
|
+
unitCostAmountCents: number | null;
|
|
310
|
+
totalCostAmountCents: number | null;
|
|
311
|
+
notes: string | null;
|
|
312
|
+
metadata: unknown;
|
|
313
|
+
createdAt: Date;
|
|
314
|
+
updatedAt: Date;
|
|
315
|
+
}[];
|
|
316
|
+
total: number;
|
|
317
|
+
limit: number;
|
|
318
|
+
offset: number;
|
|
319
|
+
}>;
|
|
320
|
+
export declare function getOfferItemById(db: PostgresJsDatabase, id: string): Promise<{
|
|
321
|
+
id: string;
|
|
322
|
+
offerId: string;
|
|
323
|
+
productId: string | null;
|
|
324
|
+
optionId: string | null;
|
|
325
|
+
unitId: string | null;
|
|
326
|
+
slotId: string | null;
|
|
327
|
+
title: string;
|
|
328
|
+
description: string | null;
|
|
329
|
+
itemType: "other" | "unit" | "service" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
330
|
+
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
331
|
+
serviceDate: string | null;
|
|
332
|
+
startsAt: Date | null;
|
|
333
|
+
endsAt: Date | null;
|
|
334
|
+
quantity: number;
|
|
335
|
+
sellCurrency: string;
|
|
336
|
+
unitSellAmountCents: number | null;
|
|
337
|
+
totalSellAmountCents: number | null;
|
|
338
|
+
taxAmountCents: number | null;
|
|
339
|
+
feeAmountCents: number | null;
|
|
340
|
+
costCurrency: string | null;
|
|
341
|
+
unitCostAmountCents: number | null;
|
|
342
|
+
totalCostAmountCents: number | null;
|
|
343
|
+
notes: string | null;
|
|
344
|
+
metadata: unknown;
|
|
345
|
+
createdAt: Date;
|
|
346
|
+
updatedAt: Date;
|
|
347
|
+
} | null>;
|
|
348
|
+
export declare function createOfferItem(db: PostgresJsDatabase, data: CreateOfferItemInput): Promise<{
|
|
349
|
+
offerId: string;
|
|
350
|
+
createdAt: Date;
|
|
351
|
+
updatedAt: Date;
|
|
352
|
+
description: string | null;
|
|
353
|
+
notes: string | null;
|
|
354
|
+
id: string;
|
|
355
|
+
metadata: unknown;
|
|
356
|
+
title: string;
|
|
357
|
+
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
358
|
+
taxAmountCents: number | null;
|
|
359
|
+
feeAmountCents: number | null;
|
|
360
|
+
productId: string | null;
|
|
361
|
+
optionId: string | null;
|
|
362
|
+
unitId: string | null;
|
|
363
|
+
slotId: string | null;
|
|
364
|
+
itemType: "other" | "unit" | "service" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
365
|
+
serviceDate: string | null;
|
|
366
|
+
startsAt: Date | null;
|
|
367
|
+
endsAt: Date | null;
|
|
368
|
+
quantity: number;
|
|
369
|
+
sellCurrency: string;
|
|
370
|
+
unitSellAmountCents: number | null;
|
|
371
|
+
totalSellAmountCents: number | null;
|
|
372
|
+
costCurrency: string | null;
|
|
373
|
+
unitCostAmountCents: number | null;
|
|
374
|
+
totalCostAmountCents: number | null;
|
|
375
|
+
} | null>;
|
|
376
|
+
export declare function updateOfferItem(db: PostgresJsDatabase, id: string, data: UpdateOfferItemInput): Promise<{
|
|
377
|
+
id: string;
|
|
378
|
+
offerId: string;
|
|
379
|
+
productId: string | null;
|
|
380
|
+
optionId: string | null;
|
|
381
|
+
unitId: string | null;
|
|
382
|
+
slotId: string | null;
|
|
383
|
+
title: string;
|
|
384
|
+
description: string | null;
|
|
385
|
+
itemType: "other" | "unit" | "service" | "extra" | "fee" | "tax" | "discount" | "adjustment" | "accommodation" | "transport";
|
|
386
|
+
status: "draft" | "confirmed" | "fulfilled" | "cancelled" | "priced";
|
|
387
|
+
serviceDate: string | null;
|
|
388
|
+
startsAt: Date | null;
|
|
389
|
+
endsAt: Date | null;
|
|
390
|
+
quantity: number;
|
|
391
|
+
sellCurrency: string;
|
|
392
|
+
unitSellAmountCents: number | null;
|
|
393
|
+
totalSellAmountCents: number | null;
|
|
394
|
+
taxAmountCents: number | null;
|
|
395
|
+
feeAmountCents: number | null;
|
|
396
|
+
costCurrency: string | null;
|
|
397
|
+
unitCostAmountCents: number | null;
|
|
398
|
+
totalCostAmountCents: number | null;
|
|
399
|
+
notes: string | null;
|
|
400
|
+
metadata: unknown;
|
|
401
|
+
createdAt: Date;
|
|
402
|
+
updatedAt: Date;
|
|
403
|
+
} | null>;
|
|
404
|
+
export declare function deleteOfferItem(db: PostgresJsDatabase, id: string): Promise<{
|
|
405
|
+
id: string;
|
|
406
|
+
} | null>;
|
|
407
|
+
export declare function listOfferItemParticipants(db: PostgresJsDatabase, query: OfferItemParticipantListQuery): Promise<{
|
|
408
|
+
data: {
|
|
409
|
+
id: string;
|
|
410
|
+
offerItemId: string;
|
|
411
|
+
participantId: string;
|
|
412
|
+
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
413
|
+
isPrimary: boolean;
|
|
414
|
+
createdAt: Date;
|
|
415
|
+
}[];
|
|
416
|
+
total: number;
|
|
417
|
+
limit: number;
|
|
418
|
+
offset: number;
|
|
419
|
+
}>;
|
|
420
|
+
export declare function getOfferItemParticipantById(db: PostgresJsDatabase, id: string): Promise<{
|
|
421
|
+
id: string;
|
|
422
|
+
offerItemId: string;
|
|
423
|
+
participantId: string;
|
|
424
|
+
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
425
|
+
isPrimary: boolean;
|
|
426
|
+
createdAt: Date;
|
|
427
|
+
} | null>;
|
|
428
|
+
export declare function createOfferItemParticipant(db: PostgresJsDatabase, data: CreateOfferItemParticipantInput): Promise<{
|
|
429
|
+
createdAt: Date;
|
|
430
|
+
participantId: string;
|
|
431
|
+
id: string;
|
|
432
|
+
isPrimary: boolean;
|
|
433
|
+
offerItemId: string;
|
|
434
|
+
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
435
|
+
} | null>;
|
|
436
|
+
export declare function updateOfferItemParticipant(db: PostgresJsDatabase, id: string, data: UpdateOfferItemParticipantInput): Promise<{
|
|
437
|
+
id: string;
|
|
438
|
+
offerItemId: string;
|
|
439
|
+
participantId: string;
|
|
440
|
+
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
441
|
+
isPrimary: boolean;
|
|
442
|
+
createdAt: Date;
|
|
443
|
+
} | null>;
|
|
444
|
+
export declare function deleteOfferItemParticipant(db: PostgresJsDatabase, id: string): Promise<{
|
|
445
|
+
id: string;
|
|
446
|
+
} | null>;
|
|
447
|
+
//# sourceMappingURL=service-offers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service-offers.d.ts","sourceRoot":"","sources":["../src/service-offers.ts"],"names":[],"mappings":"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"}
|