@voyantjs/transactions 0.6.8 → 0.7.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/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/pii.d.ts +16 -9
- package/dist/pii.d.ts.map +1 -1
- package/dist/pii.js +76 -70
- package/dist/routes-offers.d.ts +462 -28
- package/dist/routes-offers.d.ts.map +1 -1
- package/dist/routes-offers.js +199 -84
- package/dist/routes-orders.d.ts +461 -27
- package/dist/routes-orders.d.ts.map +1 -1
- package/dist/routes-orders.js +199 -84
- package/dist/routes-shared.d.ts +20 -13
- package/dist/routes-shared.d.ts.map +1 -1
- package/dist/routes-shared.js +7 -6
- package/dist/schema/participant-identity.d.ts +43 -6
- package/dist/schema/participant-identity.d.ts.map +1 -1
- package/dist/schema/participant-identity.js +12 -5
- package/dist/schema-audit.d.ts +4 -4
- package/dist/schema-audit.js +3 -3
- package/dist/schema-contacts.d.ts +529 -0
- package/dist/schema-contacts.d.ts.map +1 -0
- package/dist/schema-contacts.js +57 -0
- package/dist/schema-offers.d.ts +177 -3
- package/dist/schema-offers.d.ts.map +1 -1
- package/dist/schema-offers.js +13 -3
- package/dist/schema-orders.d.ts +177 -3
- package/dist/schema-orders.d.ts.map +1 -1
- package/dist/schema-orders.js +13 -3
- package/dist/schema-relations.d.ts +24 -0
- package/dist/schema-relations.d.ts.map +1 -1
- package/dist/schema-relations.js +40 -2
- package/dist/schema-shared.d.ts +3 -1
- package/dist/schema-shared.d.ts.map +1 -1
- package/dist/schema-shared.js +8 -2
- package/dist/schema-staff.d.ts +529 -0
- package/dist/schema-staff.d.ts.map +1 -0
- package/dist/schema-staff.js +57 -0
- package/dist/schema.d.ts +2 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +2 -0
- package/dist/service-offers.d.ts +275 -29
- package/dist/service-offers.d.ts.map +1 -1
- package/dist/service-offers.js +306 -43
- package/dist/service-orders.d.ts +227 -25
- package/dist/service-orders.d.ts.map +1 -1
- package/dist/service-orders.js +127 -22
- package/dist/service-shared.d.ts +144 -22
- package/dist/service-shared.d.ts.map +1 -1
- package/dist/service-shared.js +30 -2
- package/dist/service.d.ts +62 -22
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +42 -2
- package/dist/storefront-offers.d.ts +39 -5
- package/dist/storefront-offers.d.ts.map +1 -1
- package/dist/storefront-offers.js +3 -3
- package/dist/validation.d.ts +674 -36
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +186 -29
- package/package.json +5 -5
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { typeId, typeIdRef } from "@voyantjs/db/lib/typeid-column";
|
|
2
|
+
import { boolean, index, jsonb, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
3
|
+
import { offerItems, offers } from "./schema-offers.js";
|
|
4
|
+
import { orderItems, orders } from "./schema-orders.js";
|
|
5
|
+
import { transactionStaffAssignmentRoleEnum } from "./schema-shared.js";
|
|
6
|
+
export const offerStaffAssignments = pgTable("offer_staff_assignments", {
|
|
7
|
+
id: typeId("offer_staff_assignments"),
|
|
8
|
+
offerId: typeIdRef("offer_id")
|
|
9
|
+
.notNull()
|
|
10
|
+
.references(() => offers.id, { onDelete: "cascade" }),
|
|
11
|
+
offerItemId: typeIdRef("offer_item_id").references(() => offerItems.id, {
|
|
12
|
+
onDelete: "set null",
|
|
13
|
+
}),
|
|
14
|
+
personId: text("person_id"),
|
|
15
|
+
role: transactionStaffAssignmentRoleEnum("role").notNull().default("service_assignee"),
|
|
16
|
+
firstName: text("first_name").notNull(),
|
|
17
|
+
lastName: text("last_name").notNull(),
|
|
18
|
+
email: text("email"),
|
|
19
|
+
phone: text("phone"),
|
|
20
|
+
preferredLanguage: text("preferred_language"),
|
|
21
|
+
isPrimary: boolean("is_primary").notNull().default(false),
|
|
22
|
+
notes: text("notes"),
|
|
23
|
+
metadata: jsonb("metadata"),
|
|
24
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
25
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
26
|
+
}, (table) => [
|
|
27
|
+
index("idx_offer_staff_assignments_offer_created").on(table.offerId, table.createdAt),
|
|
28
|
+
index("idx_offer_staff_assignments_item_created").on(table.offerItemId, table.createdAt),
|
|
29
|
+
index("idx_offer_staff_assignments_role_created").on(table.offerId, table.role, table.createdAt),
|
|
30
|
+
index("idx_offer_staff_assignments_person_created").on(table.personId, table.createdAt),
|
|
31
|
+
]);
|
|
32
|
+
export const orderStaffAssignments = pgTable("order_staff_assignments", {
|
|
33
|
+
id: typeId("order_staff_assignments"),
|
|
34
|
+
orderId: typeIdRef("order_id")
|
|
35
|
+
.notNull()
|
|
36
|
+
.references(() => orders.id, { onDelete: "cascade" }),
|
|
37
|
+
orderItemId: typeIdRef("order_item_id").references(() => orderItems.id, {
|
|
38
|
+
onDelete: "set null",
|
|
39
|
+
}),
|
|
40
|
+
personId: text("person_id"),
|
|
41
|
+
role: transactionStaffAssignmentRoleEnum("role").notNull().default("service_assignee"),
|
|
42
|
+
firstName: text("first_name").notNull(),
|
|
43
|
+
lastName: text("last_name").notNull(),
|
|
44
|
+
email: text("email"),
|
|
45
|
+
phone: text("phone"),
|
|
46
|
+
preferredLanguage: text("preferred_language"),
|
|
47
|
+
isPrimary: boolean("is_primary").notNull().default(false),
|
|
48
|
+
notes: text("notes"),
|
|
49
|
+
metadata: jsonb("metadata"),
|
|
50
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
51
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
52
|
+
}, (table) => [
|
|
53
|
+
index("idx_order_staff_assignments_order_created").on(table.orderId, table.createdAt),
|
|
54
|
+
index("idx_order_staff_assignments_item_created").on(table.orderItemId, table.createdAt),
|
|
55
|
+
index("idx_order_staff_assignments_role_created").on(table.orderId, table.role, table.createdAt),
|
|
56
|
+
index("idx_order_staff_assignments_person_created").on(table.personId, table.createdAt),
|
|
57
|
+
]);
|
package/dist/schema.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from "./schema-audit";
|
|
2
|
+
export * from "./schema-contacts";
|
|
2
3
|
export * from "./schema-offers";
|
|
3
4
|
export * from "./schema-orders";
|
|
4
5
|
export * from "./schema-relations";
|
|
5
6
|
export * from "./schema-shared";
|
|
7
|
+
export * from "./schema-staff";
|
|
6
8
|
//# sourceMappingURL=schema.d.ts.map
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,gBAAgB,CAAA"}
|
package/dist/schema.js
CHANGED
package/dist/service-offers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
|
2
|
-
import type { CreateOfferBundleInput, CreateOfferInput, CreateOfferItemInput,
|
|
2
|
+
import type { CreateOfferBundleInput, CreateOfferContactAssignmentInput, CreateOfferInput, CreateOfferItemInput, CreateOfferItemTravelerInput, CreateOfferStaffAssignmentInput, CreateOfferTravelerInput, OfferContactAssignmentListQuery, OfferItemListQuery, OfferItemTravelerListQuery, OfferListQuery, OfferStaffAssignmentListQuery, OfferTravelerListQuery, UpdateOfferContactAssignmentInput, UpdateOfferInput, UpdateOfferItemInput, UpdateOfferItemTravelerInput, UpdateOfferStaffAssignmentInput, UpdateOfferTravelerInput } from "./service-shared.js";
|
|
3
3
|
export declare function listOffers(db: PostgresJsDatabase, query: OfferListQuery): Promise<{
|
|
4
4
|
data: {
|
|
5
5
|
id: string;
|
|
@@ -12,6 +12,16 @@ export declare function listOffers(db: PostgresJsDatabase, query: OfferListQuery
|
|
|
12
12
|
quoteId: string | null;
|
|
13
13
|
marketId: string | null;
|
|
14
14
|
sourceChannelId: string | null;
|
|
15
|
+
contactFirstName: string | null;
|
|
16
|
+
contactLastName: string | null;
|
|
17
|
+
contactEmail: string | null;
|
|
18
|
+
contactPhone: string | null;
|
|
19
|
+
contactPreferredLanguage: string | null;
|
|
20
|
+
contactCountry: string | null;
|
|
21
|
+
contactRegion: string | null;
|
|
22
|
+
contactCity: string | null;
|
|
23
|
+
contactAddressLine1: string | null;
|
|
24
|
+
contactPostalCode: string | null;
|
|
15
25
|
currency: string;
|
|
16
26
|
baseCurrency: string | null;
|
|
17
27
|
fxRateSetId: string | null;
|
|
@@ -45,6 +55,16 @@ export declare function getOfferById(db: PostgresJsDatabase, id: string): Promis
|
|
|
45
55
|
quoteId: string | null;
|
|
46
56
|
marketId: string | null;
|
|
47
57
|
sourceChannelId: string | null;
|
|
58
|
+
contactFirstName: string | null;
|
|
59
|
+
contactLastName: string | null;
|
|
60
|
+
contactEmail: string | null;
|
|
61
|
+
contactPhone: string | null;
|
|
62
|
+
contactPreferredLanguage: string | null;
|
|
63
|
+
contactCountry: string | null;
|
|
64
|
+
contactRegion: string | null;
|
|
65
|
+
contactCity: string | null;
|
|
66
|
+
contactAddressLine1: string | null;
|
|
67
|
+
contactPostalCode: string | null;
|
|
48
68
|
currency: string;
|
|
49
69
|
baseCurrency: string | null;
|
|
50
70
|
fxRateSetId: string | null;
|
|
@@ -79,6 +99,16 @@ export declare function createOffer(db: PostgresJsDatabase, data: CreateOfferInp
|
|
|
79
99
|
quoteId: string | null;
|
|
80
100
|
marketId: string | null;
|
|
81
101
|
sourceChannelId: string | null;
|
|
102
|
+
contactFirstName: string | null;
|
|
103
|
+
contactLastName: string | null;
|
|
104
|
+
contactEmail: string | null;
|
|
105
|
+
contactPhone: string | null;
|
|
106
|
+
contactPreferredLanguage: string | null;
|
|
107
|
+
contactCountry: string | null;
|
|
108
|
+
contactRegion: string | null;
|
|
109
|
+
contactCity: string | null;
|
|
110
|
+
contactAddressLine1: string | null;
|
|
111
|
+
contactPostalCode: string | null;
|
|
82
112
|
baseCurrency: string | null;
|
|
83
113
|
fxRateSetId: string | null;
|
|
84
114
|
subtotalAmountCents: number;
|
|
@@ -109,6 +139,16 @@ export declare function createOfferBundle(db: PostgresJsDatabase, input: CreateO
|
|
|
109
139
|
quoteId: string | null;
|
|
110
140
|
marketId: string | null;
|
|
111
141
|
sourceChannelId: string | null;
|
|
142
|
+
contactFirstName: string | null;
|
|
143
|
+
contactLastName: string | null;
|
|
144
|
+
contactEmail: string | null;
|
|
145
|
+
contactPhone: string | null;
|
|
146
|
+
contactPreferredLanguage: string | null;
|
|
147
|
+
contactCountry: string | null;
|
|
148
|
+
contactRegion: string | null;
|
|
149
|
+
contactCity: string | null;
|
|
150
|
+
contactAddressLine1: string | null;
|
|
151
|
+
contactPostalCode: string | null;
|
|
112
152
|
baseCurrency: string | null;
|
|
113
153
|
fxRateSetId: string | null;
|
|
114
154
|
subtotalAmountCents: number;
|
|
@@ -122,11 +162,11 @@ export declare function createOfferBundle(db: PostgresJsDatabase, input: CreateO
|
|
|
122
162
|
acceptedAt: Date | null;
|
|
123
163
|
convertedAt: Date | null;
|
|
124
164
|
};
|
|
125
|
-
|
|
165
|
+
travelers: {
|
|
126
166
|
id: string;
|
|
127
167
|
offerId: string;
|
|
128
168
|
personId: string | null;
|
|
129
|
-
participantType: "staff" | "other" | "traveler" | "
|
|
169
|
+
participantType: "staff" | "other" | "traveler" | "occupant";
|
|
130
170
|
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
131
171
|
firstName: string;
|
|
132
172
|
lastName: string;
|
|
@@ -139,6 +179,40 @@ export declare function createOfferBundle(db: PostgresJsDatabase, input: CreateO
|
|
|
139
179
|
createdAt: Date;
|
|
140
180
|
updatedAt: Date;
|
|
141
181
|
}[];
|
|
182
|
+
contactAssignments: {
|
|
183
|
+
metadata: unknown;
|
|
184
|
+
id: string;
|
|
185
|
+
createdAt: Date;
|
|
186
|
+
updatedAt: Date;
|
|
187
|
+
email: string | null;
|
|
188
|
+
role: "other" | "primary_contact";
|
|
189
|
+
notes: string | null;
|
|
190
|
+
firstName: string;
|
|
191
|
+
lastName: string;
|
|
192
|
+
offerId: string;
|
|
193
|
+
personId: string | null;
|
|
194
|
+
phone: string | null;
|
|
195
|
+
preferredLanguage: string | null;
|
|
196
|
+
isPrimary: boolean;
|
|
197
|
+
offerItemId: string | null;
|
|
198
|
+
}[];
|
|
199
|
+
staffAssignments: {
|
|
200
|
+
metadata: unknown;
|
|
201
|
+
id: string;
|
|
202
|
+
createdAt: Date;
|
|
203
|
+
updatedAt: Date;
|
|
204
|
+
email: string | null;
|
|
205
|
+
role: "other" | "service_assignee";
|
|
206
|
+
notes: string | null;
|
|
207
|
+
firstName: string;
|
|
208
|
+
lastName: string;
|
|
209
|
+
offerId: string;
|
|
210
|
+
personId: string | null;
|
|
211
|
+
phone: string | null;
|
|
212
|
+
preferredLanguage: string | null;
|
|
213
|
+
isPrimary: boolean;
|
|
214
|
+
offerItemId: string | null;
|
|
215
|
+
}[];
|
|
142
216
|
items: {
|
|
143
217
|
metadata: unknown;
|
|
144
218
|
id: string;
|
|
@@ -167,11 +241,11 @@ export declare function createOfferBundle(db: PostgresJsDatabase, input: CreateO
|
|
|
167
241
|
unitCostAmountCents: number | null;
|
|
168
242
|
totalCostAmountCents: number | null;
|
|
169
243
|
}[];
|
|
170
|
-
|
|
244
|
+
itemTravelers: {
|
|
171
245
|
id: string;
|
|
172
246
|
createdAt: Date;
|
|
173
247
|
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
174
|
-
|
|
248
|
+
travelerId: string;
|
|
175
249
|
isPrimary: boolean;
|
|
176
250
|
offerItemId: string;
|
|
177
251
|
}[];
|
|
@@ -187,6 +261,16 @@ export declare function updateOffer(db: PostgresJsDatabase, id: string, data: Up
|
|
|
187
261
|
quoteId: string | null;
|
|
188
262
|
marketId: string | null;
|
|
189
263
|
sourceChannelId: string | null;
|
|
264
|
+
contactFirstName: string | null;
|
|
265
|
+
contactLastName: string | null;
|
|
266
|
+
contactEmail: string | null;
|
|
267
|
+
contactPhone: string | null;
|
|
268
|
+
contactPreferredLanguage: string | null;
|
|
269
|
+
contactCountry: string | null;
|
|
270
|
+
contactRegion: string | null;
|
|
271
|
+
contactCity: string | null;
|
|
272
|
+
contactAddressLine1: string | null;
|
|
273
|
+
contactPostalCode: string | null;
|
|
190
274
|
currency: string;
|
|
191
275
|
baseCurrency: string | null;
|
|
192
276
|
fxRateSetId: string | null;
|
|
@@ -208,12 +292,12 @@ export declare function updateOffer(db: PostgresJsDatabase, id: string, data: Up
|
|
|
208
292
|
export declare function deleteOffer(db: PostgresJsDatabase, id: string): Promise<{
|
|
209
293
|
id: string;
|
|
210
294
|
} | null>;
|
|
211
|
-
export declare function
|
|
295
|
+
export declare function listOfferTravelers(db: PostgresJsDatabase, query: OfferTravelerListQuery): Promise<{
|
|
212
296
|
data: {
|
|
213
297
|
id: string;
|
|
214
298
|
offerId: string;
|
|
215
299
|
personId: string | null;
|
|
216
|
-
participantType: "staff" | "other" | "traveler" | "
|
|
300
|
+
participantType: "staff" | "other" | "traveler" | "occupant";
|
|
217
301
|
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
218
302
|
firstName: string;
|
|
219
303
|
lastName: string;
|
|
@@ -230,11 +314,12 @@ export declare function listOfferParticipants(db: PostgresJsDatabase, query: Off
|
|
|
230
314
|
limit: number;
|
|
231
315
|
offset: number;
|
|
232
316
|
}>;
|
|
233
|
-
export declare
|
|
317
|
+
export declare const listOfferParticipants: typeof listOfferTravelers;
|
|
318
|
+
export declare function getOfferTravelerById(db: PostgresJsDatabase, id: string): Promise<{
|
|
234
319
|
id: string;
|
|
235
320
|
offerId: string;
|
|
236
321
|
personId: string | null;
|
|
237
|
-
participantType: "staff" | "other" | "traveler" | "
|
|
322
|
+
participantType: "staff" | "other" | "traveler" | "occupant";
|
|
238
323
|
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
239
324
|
firstName: string;
|
|
240
325
|
lastName: string;
|
|
@@ -247,11 +332,12 @@ export declare function getOfferParticipantById(db: PostgresJsDatabase, id: stri
|
|
|
247
332
|
createdAt: Date;
|
|
248
333
|
updatedAt: Date;
|
|
249
334
|
} | null>;
|
|
250
|
-
export declare
|
|
335
|
+
export declare const getOfferParticipantById: typeof getOfferTravelerById;
|
|
336
|
+
export declare function createOfferTraveler(db: PostgresJsDatabase, data: CreateOfferTravelerInput): Promise<{
|
|
251
337
|
id: string;
|
|
252
338
|
offerId: string;
|
|
253
339
|
personId: string | null;
|
|
254
|
-
participantType: "staff" | "other" | "traveler" | "
|
|
340
|
+
participantType: "staff" | "other" | "traveler" | "occupant";
|
|
255
341
|
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
256
342
|
firstName: string;
|
|
257
343
|
lastName: string;
|
|
@@ -264,11 +350,12 @@ export declare function createOfferParticipant(db: PostgresJsDatabase, data: Cre
|
|
|
264
350
|
createdAt: Date;
|
|
265
351
|
updatedAt: Date;
|
|
266
352
|
} | null>;
|
|
267
|
-
export declare
|
|
353
|
+
export declare const createOfferParticipant: typeof createOfferTraveler;
|
|
354
|
+
export declare function updateOfferTraveler(db: PostgresJsDatabase, id: string, data: UpdateOfferTravelerInput): Promise<{
|
|
268
355
|
id: string;
|
|
269
356
|
offerId: string;
|
|
270
357
|
personId: string | null;
|
|
271
|
-
participantType: "staff" | "other" | "traveler" | "
|
|
358
|
+
participantType: "staff" | "other" | "traveler" | "occupant";
|
|
272
359
|
travelerCategory: "other" | "adult" | "child" | "infant" | "senior" | null;
|
|
273
360
|
firstName: string;
|
|
274
361
|
lastName: string;
|
|
@@ -281,7 +368,161 @@ export declare function updateOfferParticipant(db: PostgresJsDatabase, id: strin
|
|
|
281
368
|
createdAt: Date;
|
|
282
369
|
updatedAt: Date;
|
|
283
370
|
} | null>;
|
|
284
|
-
export declare
|
|
371
|
+
export declare const updateOfferParticipant: typeof updateOfferTraveler;
|
|
372
|
+
export declare function deleteOfferTraveler(db: PostgresJsDatabase, id: string): Promise<{
|
|
373
|
+
id: string;
|
|
374
|
+
} | null>;
|
|
375
|
+
export declare const deleteOfferParticipant: typeof deleteOfferTraveler;
|
|
376
|
+
export declare function listOfferContactAssignments(db: PostgresJsDatabase, query: OfferContactAssignmentListQuery): Promise<{
|
|
377
|
+
data: {
|
|
378
|
+
metadata: unknown;
|
|
379
|
+
id: string;
|
|
380
|
+
createdAt: Date;
|
|
381
|
+
updatedAt: Date;
|
|
382
|
+
email: string | null;
|
|
383
|
+
role: "other" | "primary_contact";
|
|
384
|
+
notes: string | null;
|
|
385
|
+
firstName: string;
|
|
386
|
+
lastName: string;
|
|
387
|
+
offerId: string;
|
|
388
|
+
personId: string | null;
|
|
389
|
+
phone: string | null;
|
|
390
|
+
preferredLanguage: string | null;
|
|
391
|
+
isPrimary: boolean;
|
|
392
|
+
offerItemId: string | null;
|
|
393
|
+
}[];
|
|
394
|
+
total: number;
|
|
395
|
+
limit: number;
|
|
396
|
+
offset: number;
|
|
397
|
+
}>;
|
|
398
|
+
export declare function getOfferContactAssignmentById(db: PostgresJsDatabase, id: string): Promise<{
|
|
399
|
+
metadata: unknown;
|
|
400
|
+
id: string;
|
|
401
|
+
createdAt: Date;
|
|
402
|
+
updatedAt: Date;
|
|
403
|
+
email: string | null;
|
|
404
|
+
role: "other" | "primary_contact";
|
|
405
|
+
notes: string | null;
|
|
406
|
+
firstName: string;
|
|
407
|
+
lastName: string;
|
|
408
|
+
offerId: string;
|
|
409
|
+
personId: string | null;
|
|
410
|
+
phone: string | null;
|
|
411
|
+
preferredLanguage: string | null;
|
|
412
|
+
isPrimary: boolean;
|
|
413
|
+
offerItemId: string | null;
|
|
414
|
+
} | null>;
|
|
415
|
+
export declare function createOfferContactAssignment(db: PostgresJsDatabase, data: CreateOfferContactAssignmentInput): Promise<{
|
|
416
|
+
metadata: unknown;
|
|
417
|
+
id: string;
|
|
418
|
+
createdAt: Date;
|
|
419
|
+
updatedAt: Date;
|
|
420
|
+
email: string | null;
|
|
421
|
+
role: "other" | "primary_contact";
|
|
422
|
+
notes: string | null;
|
|
423
|
+
firstName: string;
|
|
424
|
+
lastName: string;
|
|
425
|
+
offerId: string;
|
|
426
|
+
personId: string | null;
|
|
427
|
+
phone: string | null;
|
|
428
|
+
preferredLanguage: string | null;
|
|
429
|
+
isPrimary: boolean;
|
|
430
|
+
offerItemId: string | null;
|
|
431
|
+
} | null>;
|
|
432
|
+
export declare function updateOfferContactAssignment(db: PostgresJsDatabase, id: string, data: UpdateOfferContactAssignmentInput): Promise<{
|
|
433
|
+
metadata: unknown;
|
|
434
|
+
id: string;
|
|
435
|
+
createdAt: Date;
|
|
436
|
+
updatedAt: Date;
|
|
437
|
+
email: string | null;
|
|
438
|
+
role: "other" | "primary_contact";
|
|
439
|
+
notes: string | null;
|
|
440
|
+
firstName: string;
|
|
441
|
+
lastName: string;
|
|
442
|
+
offerId: string;
|
|
443
|
+
personId: string | null;
|
|
444
|
+
phone: string | null;
|
|
445
|
+
preferredLanguage: string | null;
|
|
446
|
+
isPrimary: boolean;
|
|
447
|
+
offerItemId: string | null;
|
|
448
|
+
} | null>;
|
|
449
|
+
export declare function deleteOfferContactAssignment(db: PostgresJsDatabase, id: string): Promise<{
|
|
450
|
+
id: string;
|
|
451
|
+
} | null>;
|
|
452
|
+
export declare function listOfferStaffAssignments(db: PostgresJsDatabase, query: OfferStaffAssignmentListQuery): Promise<{
|
|
453
|
+
data: {
|
|
454
|
+
metadata: unknown;
|
|
455
|
+
id: string;
|
|
456
|
+
createdAt: Date;
|
|
457
|
+
updatedAt: Date;
|
|
458
|
+
email: string | null;
|
|
459
|
+
role: "other" | "service_assignee";
|
|
460
|
+
notes: string | null;
|
|
461
|
+
firstName: string;
|
|
462
|
+
lastName: string;
|
|
463
|
+
offerId: string;
|
|
464
|
+
personId: string | null;
|
|
465
|
+
phone: string | null;
|
|
466
|
+
preferredLanguage: string | null;
|
|
467
|
+
isPrimary: boolean;
|
|
468
|
+
offerItemId: string | null;
|
|
469
|
+
}[];
|
|
470
|
+
total: number;
|
|
471
|
+
limit: number;
|
|
472
|
+
offset: number;
|
|
473
|
+
}>;
|
|
474
|
+
export declare function getOfferStaffAssignmentById(db: PostgresJsDatabase, id: string): Promise<{
|
|
475
|
+
metadata: unknown;
|
|
476
|
+
id: string;
|
|
477
|
+
createdAt: Date;
|
|
478
|
+
updatedAt: Date;
|
|
479
|
+
email: string | null;
|
|
480
|
+
role: "other" | "service_assignee";
|
|
481
|
+
notes: string | null;
|
|
482
|
+
firstName: string;
|
|
483
|
+
lastName: string;
|
|
484
|
+
offerId: string;
|
|
485
|
+
personId: string | null;
|
|
486
|
+
phone: string | null;
|
|
487
|
+
preferredLanguage: string | null;
|
|
488
|
+
isPrimary: boolean;
|
|
489
|
+
offerItemId: string | null;
|
|
490
|
+
} | null>;
|
|
491
|
+
export declare function createOfferStaffAssignment(db: PostgresJsDatabase, data: CreateOfferStaffAssignmentInput): Promise<{
|
|
492
|
+
metadata: unknown;
|
|
493
|
+
id: string;
|
|
494
|
+
createdAt: Date;
|
|
495
|
+
updatedAt: Date;
|
|
496
|
+
email: string | null;
|
|
497
|
+
role: "other" | "service_assignee";
|
|
498
|
+
notes: string | null;
|
|
499
|
+
firstName: string;
|
|
500
|
+
lastName: string;
|
|
501
|
+
offerId: string;
|
|
502
|
+
personId: string | null;
|
|
503
|
+
phone: string | null;
|
|
504
|
+
preferredLanguage: string | null;
|
|
505
|
+
isPrimary: boolean;
|
|
506
|
+
offerItemId: string | null;
|
|
507
|
+
} | null>;
|
|
508
|
+
export declare function updateOfferStaffAssignment(db: PostgresJsDatabase, id: string, data: UpdateOfferStaffAssignmentInput): Promise<{
|
|
509
|
+
metadata: unknown;
|
|
510
|
+
id: string;
|
|
511
|
+
createdAt: Date;
|
|
512
|
+
updatedAt: Date;
|
|
513
|
+
email: string | null;
|
|
514
|
+
role: "other" | "service_assignee";
|
|
515
|
+
notes: string | null;
|
|
516
|
+
firstName: string;
|
|
517
|
+
lastName: string;
|
|
518
|
+
offerId: string;
|
|
519
|
+
personId: string | null;
|
|
520
|
+
phone: string | null;
|
|
521
|
+
preferredLanguage: string | null;
|
|
522
|
+
isPrimary: boolean;
|
|
523
|
+
offerItemId: string | null;
|
|
524
|
+
} | null>;
|
|
525
|
+
export declare function deleteOfferStaffAssignment(db: PostgresJsDatabase, id: string): Promise<{
|
|
285
526
|
id: string;
|
|
286
527
|
} | null>;
|
|
287
528
|
export declare function listOfferItems(db: PostgresJsDatabase, query: OfferItemListQuery): Promise<{
|
|
@@ -404,44 +645,49 @@ export declare function updateOfferItem(db: PostgresJsDatabase, id: string, data
|
|
|
404
645
|
export declare function deleteOfferItem(db: PostgresJsDatabase, id: string): Promise<{
|
|
405
646
|
id: string;
|
|
406
647
|
} | null>;
|
|
407
|
-
export declare function
|
|
648
|
+
export declare function listOfferItemTravelers(db: PostgresJsDatabase, query: OfferItemTravelerListQuery): Promise<{
|
|
408
649
|
data: {
|
|
409
650
|
id: string;
|
|
410
|
-
|
|
411
|
-
participantId: string;
|
|
651
|
+
createdAt: Date;
|
|
412
652
|
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
653
|
+
travelerId: string;
|
|
413
654
|
isPrimary: boolean;
|
|
414
|
-
|
|
655
|
+
offerItemId: string;
|
|
415
656
|
}[];
|
|
416
657
|
total: number;
|
|
417
658
|
limit: number;
|
|
418
659
|
offset: number;
|
|
419
660
|
}>;
|
|
420
|
-
export declare
|
|
661
|
+
export declare const listOfferItemParticipants: typeof listOfferItemTravelers;
|
|
662
|
+
export declare function getOfferItemTravelerById(db: PostgresJsDatabase, id: string): Promise<{
|
|
421
663
|
id: string;
|
|
422
|
-
|
|
423
|
-
participantId: string;
|
|
664
|
+
createdAt: Date;
|
|
424
665
|
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
666
|
+
travelerId: string;
|
|
425
667
|
isPrimary: boolean;
|
|
426
|
-
|
|
668
|
+
offerItemId: string;
|
|
427
669
|
} | null>;
|
|
428
|
-
export declare
|
|
670
|
+
export declare const getOfferItemParticipantById: typeof getOfferItemTravelerById;
|
|
671
|
+
export declare function createOfferItemTraveler(db: PostgresJsDatabase, data: CreateOfferItemTravelerInput): Promise<{
|
|
429
672
|
id: string;
|
|
430
673
|
createdAt: Date;
|
|
431
674
|
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
432
|
-
|
|
675
|
+
travelerId: string;
|
|
433
676
|
isPrimary: boolean;
|
|
434
677
|
offerItemId: string;
|
|
435
678
|
} | null>;
|
|
436
|
-
export declare
|
|
679
|
+
export declare const createOfferItemParticipant: typeof createOfferItemTraveler;
|
|
680
|
+
export declare function updateOfferItemTraveler(db: PostgresJsDatabase, id: string, data: UpdateOfferItemTravelerInput): Promise<{
|
|
437
681
|
id: string;
|
|
438
|
-
|
|
439
|
-
participantId: string;
|
|
682
|
+
createdAt: Date;
|
|
440
683
|
role: "other" | "traveler" | "occupant" | "primary_contact" | "beneficiary" | "service_assignee";
|
|
684
|
+
travelerId: string;
|
|
441
685
|
isPrimary: boolean;
|
|
442
|
-
|
|
686
|
+
offerItemId: string;
|
|
443
687
|
} | null>;
|
|
444
|
-
export declare
|
|
688
|
+
export declare const updateOfferItemParticipant: typeof updateOfferItemTraveler;
|
|
689
|
+
export declare function deleteOfferItemTraveler(db: PostgresJsDatabase, id: string): Promise<{
|
|
445
690
|
id: string;
|
|
446
691
|
} | null>;
|
|
692
|
+
export declare const deleteOfferItemParticipant: typeof deleteOfferItemTraveler;
|
|
447
693
|
//# sourceMappingURL=service-offers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-offers.d.ts","sourceRoot":"","sources":["../src/service-offers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"service-offers.d.ts","sourceRoot":"","sources":["../src/service-offers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAUjE,OAAO,KAAK,EACV,sBAAsB,EACtB,iCAAiC,EACjC,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,+BAA+B,EAC/B,wBAAwB,EACxB,+BAA+B,EAC/B,kBAAkB,EAClB,0BAA0B,EAC1B,cAAc,EACd,6BAA6B,EAC7B,sBAAsB,EACtB,iCAAiC,EACjC,gBAAgB,EAChB,oBAAoB,EACpB,4BAA4B,EAC5B,+BAA+B,EAC/B,wBAAwB,EACzB,MAAM,qBAAqB,CAAA;AAmF5B,wBAAsB,UAAU,CAAC,EAAE,EAAE,kBAAkB,EAAE,KAAK,EAAE,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0B7E;AAED,wBAAsB,YAAY,CAAC,EAAE,EAAE,kBAAkB,EAAE,EAAE,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAGpE;AAED,wBAAsB,WAAW,CAAC,EAAE,EAAE,kBAAkB,EAAE,IAAI,EAAE,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAY/E;AAED,wBAAsB,iBAAiB,CAAC,EAAE,EAAE,kBAAkB,EAAE,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