@voyantjs/facilities 0.1.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.
@@ -0,0 +1,585 @@
1
+ import type { InsertAddressForEntity, InsertContactPointForEntity, UpdateAddress as UpdateIdentityAddress, UpdateContactPoint as UpdateIdentityContactPoint } from "@voyantjs/identity/validation";
2
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
3
+ import type { z } from "zod";
4
+ import type { facilityContactListQuerySchema, facilityFeatureListQuerySchema, facilityListQuerySchema, facilityOperationScheduleListQuerySchema, insertFacilityContactSchema, insertFacilityFeatureSchema, insertFacilityOperationScheduleSchema, insertFacilitySchema, insertPropertyGroupMemberSchema, insertPropertyGroupSchema, insertPropertySchema, propertyGroupListQuerySchema, propertyGroupMemberListQuerySchema, propertyListQuerySchema, updateFacilityContactSchema, updateFacilityFeatureSchema, updateFacilityOperationScheduleSchema, updateFacilitySchema, updatePropertyGroupMemberSchema, updatePropertyGroupSchema, updatePropertySchema } from "./validation.js";
5
+ type FacilityListQuery = z.infer<typeof facilityListQuerySchema>;
6
+ type CreateFacilityInput = z.infer<typeof insertFacilitySchema>;
7
+ type UpdateFacilityInput = z.infer<typeof updateFacilitySchema>;
8
+ type FacilityContactListQuery = z.infer<typeof facilityContactListQuerySchema>;
9
+ type CreateFacilityContactInput = z.infer<typeof insertFacilityContactSchema>;
10
+ type UpdateFacilityContactInput = z.infer<typeof updateFacilityContactSchema>;
11
+ type FacilityFeatureListQuery = z.infer<typeof facilityFeatureListQuerySchema>;
12
+ type CreateFacilityFeatureInput = z.infer<typeof insertFacilityFeatureSchema>;
13
+ type UpdateFacilityFeatureInput = z.infer<typeof updateFacilityFeatureSchema>;
14
+ type FacilityOperationScheduleListQuery = z.infer<typeof facilityOperationScheduleListQuerySchema>;
15
+ type CreateFacilityOperationScheduleInput = z.infer<typeof insertFacilityOperationScheduleSchema>;
16
+ type UpdateFacilityOperationScheduleInput = z.infer<typeof updateFacilityOperationScheduleSchema>;
17
+ type PropertyListQuery = z.infer<typeof propertyListQuerySchema>;
18
+ type CreatePropertyInput = z.infer<typeof insertPropertySchema>;
19
+ type UpdatePropertyInput = z.infer<typeof updatePropertySchema>;
20
+ type PropertyGroupListQuery = z.infer<typeof propertyGroupListQuerySchema>;
21
+ type CreatePropertyGroupInput = z.infer<typeof insertPropertyGroupSchema>;
22
+ type UpdatePropertyGroupInput = z.infer<typeof updatePropertyGroupSchema>;
23
+ type PropertyGroupMemberListQuery = z.infer<typeof propertyGroupMemberListQuerySchema>;
24
+ type CreatePropertyGroupMemberInput = z.infer<typeof insertPropertyGroupMemberSchema>;
25
+ type UpdatePropertyGroupMemberInput = z.infer<typeof updatePropertyGroupMemberSchema>;
26
+ export declare const facilitiesService: {
27
+ listFacilities(db: PostgresJsDatabase, query: FacilityListQuery): Promise<{
28
+ data: ({
29
+ id: string;
30
+ parentFacilityId: string | null;
31
+ ownerType: "internal" | "supplier" | "other" | "organization" | null;
32
+ ownerId: string | null;
33
+ kind: "other" | "property" | "hotel" | "resort" | "venue" | "meeting_point" | "transfer_hub" | "airport" | "station" | "marina" | "camp" | "lodge" | "office" | "attraction" | "restaurant";
34
+ status: "active" | "inactive" | "archived";
35
+ name: string;
36
+ code: string | null;
37
+ description: string | null;
38
+ timezone: string | null;
39
+ tags: string[];
40
+ createdAt: Date;
41
+ updatedAt: Date;
42
+ } & {
43
+ addressLine1: string | null;
44
+ addressLine2: string | null;
45
+ city: string | null;
46
+ region: string | null;
47
+ country: string | null;
48
+ postalCode: string | null;
49
+ latitude: number | null;
50
+ longitude: number | null;
51
+ address: string | null;
52
+ })[];
53
+ total: number;
54
+ limit: number;
55
+ offset: number;
56
+ }>;
57
+ getFacilityById(db: PostgresJsDatabase, id: string): Promise<({
58
+ id: string;
59
+ parentFacilityId: string | null;
60
+ ownerType: "internal" | "supplier" | "other" | "organization" | null;
61
+ ownerId: string | null;
62
+ kind: "other" | "property" | "hotel" | "resort" | "venue" | "meeting_point" | "transfer_hub" | "airport" | "station" | "marina" | "camp" | "lodge" | "office" | "attraction" | "restaurant";
63
+ status: "active" | "inactive" | "archived";
64
+ name: string;
65
+ code: string | null;
66
+ description: string | null;
67
+ timezone: string | null;
68
+ tags: string[];
69
+ createdAt: Date;
70
+ updatedAt: Date;
71
+ } & {
72
+ addressLine1: string | null;
73
+ addressLine2: string | null;
74
+ city: string | null;
75
+ region: string | null;
76
+ country: string | null;
77
+ postalCode: string | null;
78
+ latitude: number | null;
79
+ longitude: number | null;
80
+ address: string | null;
81
+ }) | null>;
82
+ createFacility(db: PostgresJsDatabase, data: CreateFacilityInput): Promise<{
83
+ addressLine1: string | null;
84
+ addressLine2: string | null;
85
+ city: string | null;
86
+ region: string | null;
87
+ postalCode: string | null;
88
+ country: string | null;
89
+ latitude: number | null;
90
+ longitude: number | null;
91
+ address: string | null;
92
+ name: string;
93
+ kind: "other" | "property" | "hotel" | "resort" | "venue" | "meeting_point" | "transfer_hub" | "airport" | "station" | "marina" | "camp" | "lodge" | "office" | "attraction" | "restaurant";
94
+ timezone: string | null;
95
+ id: string;
96
+ createdAt: Date;
97
+ updatedAt: Date;
98
+ description: string | null;
99
+ parentFacilityId: string | null;
100
+ ownerType: "internal" | "supplier" | "other" | "organization" | null;
101
+ ownerId: string | null;
102
+ status: "active" | "inactive" | "archived";
103
+ code: string | null;
104
+ tags: string[];
105
+ }>;
106
+ updateFacility(db: PostgresJsDatabase, id: string, data: UpdateFacilityInput): Promise<{
107
+ addressLine1: string | null;
108
+ addressLine2: string | null;
109
+ city: string | null;
110
+ region: string | null;
111
+ postalCode: string | null;
112
+ country: string | null;
113
+ latitude: number | null;
114
+ longitude: number | null;
115
+ address: string | null;
116
+ id: string;
117
+ parentFacilityId: string | null;
118
+ ownerType: "internal" | "supplier" | "other" | "organization" | null;
119
+ ownerId: string | null;
120
+ kind: "other" | "property" | "hotel" | "resort" | "venue" | "meeting_point" | "transfer_hub" | "airport" | "station" | "marina" | "camp" | "lodge" | "office" | "attraction" | "restaurant";
121
+ status: "active" | "inactive" | "archived";
122
+ name: string;
123
+ code: string | null;
124
+ description: string | null;
125
+ timezone: string | null;
126
+ tags: string[];
127
+ createdAt: Date;
128
+ updatedAt: Date;
129
+ } | null>;
130
+ deleteFacility(db: PostgresJsDatabase, id: string): Promise<{
131
+ id: string;
132
+ } | null>;
133
+ listContactPoints(db: PostgresJsDatabase, facilityId: string): Promise<{
134
+ id: string;
135
+ entityType: string;
136
+ entityId: string;
137
+ kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
138
+ label: string | null;
139
+ value: string;
140
+ normalizedValue: string | null;
141
+ isPrimary: boolean;
142
+ notes: string | null;
143
+ metadata: Record<string, unknown> | null;
144
+ createdAt: Date;
145
+ updatedAt: Date;
146
+ }[]>;
147
+ createContactPoint(db: PostgresJsDatabase, facilityId: string, data: InsertContactPointForEntity): Promise<{
148
+ value: string;
149
+ kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
150
+ entityType: string;
151
+ entityId: string;
152
+ label: string | null;
153
+ normalizedValue: string | null;
154
+ isPrimary: boolean;
155
+ notes: string | null;
156
+ metadata: Record<string, unknown> | null;
157
+ id: string;
158
+ createdAt: Date;
159
+ updatedAt: Date;
160
+ } | null>;
161
+ updateContactPoint(db: PostgresJsDatabase, id: string, data: UpdateIdentityContactPoint): Promise<{
162
+ id: string;
163
+ entityType: string;
164
+ entityId: string;
165
+ kind: "email" | "phone" | "mobile" | "whatsapp" | "website" | "sms" | "fax" | "social" | "other";
166
+ label: string | null;
167
+ value: string;
168
+ normalizedValue: string | null;
169
+ isPrimary: boolean;
170
+ notes: string | null;
171
+ metadata: Record<string, unknown> | null;
172
+ createdAt: Date;
173
+ updatedAt: Date;
174
+ } | null>;
175
+ deleteContactPoint(db: PostgresJsDatabase, id: string): Promise<{
176
+ id: string;
177
+ } | null>;
178
+ listAddresses(db: PostgresJsDatabase, facilityId: string): Promise<{
179
+ id: string;
180
+ entityType: string;
181
+ entityId: string;
182
+ label: "other" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
183
+ fullText: string | null;
184
+ line1: string | null;
185
+ line2: string | null;
186
+ city: string | null;
187
+ region: string | null;
188
+ postalCode: string | null;
189
+ country: string | null;
190
+ latitude: number | null;
191
+ longitude: number | null;
192
+ timezone: string | null;
193
+ isPrimary: boolean;
194
+ notes: string | null;
195
+ metadata: Record<string, unknown> | null;
196
+ createdAt: Date;
197
+ updatedAt: Date;
198
+ }[]>;
199
+ createAddress(db: PostgresJsDatabase, facilityId: string, data: InsertAddressForEntity): Promise<{
200
+ entityType: string;
201
+ entityId: string;
202
+ label: "other" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
203
+ isPrimary: boolean;
204
+ notes: string | null;
205
+ metadata: Record<string, unknown> | null;
206
+ fullText: string | null;
207
+ line1: string | null;
208
+ line2: string | null;
209
+ city: string | null;
210
+ region: string | null;
211
+ postalCode: string | null;
212
+ country: string | null;
213
+ latitude: number | null;
214
+ longitude: number | null;
215
+ timezone: string | null;
216
+ id: string;
217
+ createdAt: Date;
218
+ updatedAt: Date;
219
+ } | null>;
220
+ updateAddress(db: PostgresJsDatabase, id: string, data: UpdateIdentityAddress): Promise<{
221
+ id: string;
222
+ entityType: string;
223
+ entityId: string;
224
+ label: "other" | "primary" | "billing" | "shipping" | "mailing" | "meeting" | "service" | "legal";
225
+ fullText: string | null;
226
+ line1: string | null;
227
+ line2: string | null;
228
+ city: string | null;
229
+ region: string | null;
230
+ postalCode: string | null;
231
+ country: string | null;
232
+ latitude: number | null;
233
+ longitude: number | null;
234
+ timezone: string | null;
235
+ isPrimary: boolean;
236
+ notes: string | null;
237
+ metadata: Record<string, unknown> | null;
238
+ createdAt: Date;
239
+ updatedAt: Date;
240
+ } | null>;
241
+ deleteAddress(db: PostgresJsDatabase, id: string): Promise<{
242
+ id: string;
243
+ } | null>;
244
+ listFacilityContacts(db: PostgresJsDatabase, query: FacilityContactListQuery): Promise<{
245
+ data: {
246
+ id: string;
247
+ entityType: string;
248
+ entityId: string;
249
+ role: "other" | "primary" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
250
+ name: string;
251
+ title: string | null;
252
+ email: string | null;
253
+ phone: string | null;
254
+ isPrimary: boolean;
255
+ notes: string | null;
256
+ metadata: Record<string, unknown> | null;
257
+ createdAt: Date;
258
+ updatedAt: Date;
259
+ }[];
260
+ total: number;
261
+ limit: number;
262
+ offset: number;
263
+ }>;
264
+ createFacilityContact(db: PostgresJsDatabase, facilityId: string, data: CreateFacilityContactInput): Promise<{
265
+ name: string;
266
+ email: string | null;
267
+ phone: string | null;
268
+ entityType: string;
269
+ entityId: string;
270
+ isPrimary: boolean;
271
+ notes: string | null;
272
+ metadata: Record<string, unknown> | null;
273
+ role: "other" | "primary" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
274
+ title: string | null;
275
+ id: string;
276
+ createdAt: Date;
277
+ updatedAt: Date;
278
+ } | null>;
279
+ updateFacilityContact(db: PostgresJsDatabase, id: string, data: UpdateFacilityContactInput): Promise<{
280
+ id: string;
281
+ entityType: string;
282
+ entityId: string;
283
+ role: "other" | "primary" | "legal" | "general" | "reservations" | "operations" | "front_desk" | "sales" | "emergency" | "accounting";
284
+ name: string;
285
+ title: string | null;
286
+ email: string | null;
287
+ phone: string | null;
288
+ isPrimary: boolean;
289
+ notes: string | null;
290
+ metadata: Record<string, unknown> | null;
291
+ createdAt: Date;
292
+ updatedAt: Date;
293
+ } | null>;
294
+ deleteFacilityContact(db: PostgresJsDatabase, id: string): Promise<{
295
+ id: string;
296
+ } | null>;
297
+ listFacilityFeatures(db: PostgresJsDatabase, query: FacilityFeatureListQuery): Promise<{
298
+ data: {
299
+ id: string;
300
+ facilityId: string;
301
+ category: "other" | "service" | "amenity" | "accessibility" | "security" | "policy";
302
+ code: string | null;
303
+ name: string;
304
+ description: string | null;
305
+ valueText: string | null;
306
+ highlighted: boolean;
307
+ sortOrder: number;
308
+ createdAt: Date;
309
+ updatedAt: Date;
310
+ }[];
311
+ total: number;
312
+ limit: number;
313
+ offset: number;
314
+ }>;
315
+ createFacilityFeature(db: PostgresJsDatabase, facilityId: string, data: CreateFacilityFeatureInput): Promise<{
316
+ name: string;
317
+ id: string;
318
+ createdAt: Date;
319
+ updatedAt: Date;
320
+ description: string | null;
321
+ code: string | null;
322
+ facilityId: string;
323
+ category: "other" | "service" | "amenity" | "accessibility" | "security" | "policy";
324
+ valueText: string | null;
325
+ highlighted: boolean;
326
+ sortOrder: number;
327
+ } | null>;
328
+ updateFacilityFeature(db: PostgresJsDatabase, id: string, data: UpdateFacilityFeatureInput): Promise<{
329
+ id: string;
330
+ facilityId: string;
331
+ category: "other" | "service" | "amenity" | "accessibility" | "security" | "policy";
332
+ code: string | null;
333
+ name: string;
334
+ description: string | null;
335
+ valueText: string | null;
336
+ highlighted: boolean;
337
+ sortOrder: number;
338
+ createdAt: Date;
339
+ updatedAt: Date;
340
+ } | null>;
341
+ deleteFacilityFeature(db: PostgresJsDatabase, id: string): Promise<{
342
+ id: string;
343
+ } | null>;
344
+ listFacilityOperationSchedules(db: PostgresJsDatabase, query: FacilityOperationScheduleListQuery): Promise<{
345
+ data: {
346
+ id: string;
347
+ facilityId: string;
348
+ dayOfWeek: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" | null;
349
+ validFrom: string | null;
350
+ validTo: string | null;
351
+ opensAt: string | null;
352
+ closesAt: string | null;
353
+ closed: boolean;
354
+ notes: string | null;
355
+ createdAt: Date;
356
+ updatedAt: Date;
357
+ }[];
358
+ total: number;
359
+ limit: number;
360
+ offset: number;
361
+ }>;
362
+ createFacilityOperationSchedule(db: PostgresJsDatabase, facilityId: string, data: CreateFacilityOperationScheduleInput): Promise<{
363
+ notes: string | null;
364
+ id: string;
365
+ createdAt: Date;
366
+ updatedAt: Date;
367
+ facilityId: string;
368
+ dayOfWeek: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" | null;
369
+ validFrom: string | null;
370
+ validTo: string | null;
371
+ opensAt: string | null;
372
+ closesAt: string | null;
373
+ closed: boolean;
374
+ } | null>;
375
+ updateFacilityOperationSchedule(db: PostgresJsDatabase, id: string, data: UpdateFacilityOperationScheduleInput): Promise<{
376
+ id: string;
377
+ facilityId: string;
378
+ dayOfWeek: "monday" | "tuesday" | "wednesday" | "thursday" | "friday" | "saturday" | "sunday" | null;
379
+ validFrom: string | null;
380
+ validTo: string | null;
381
+ opensAt: string | null;
382
+ closesAt: string | null;
383
+ closed: boolean;
384
+ notes: string | null;
385
+ createdAt: Date;
386
+ updatedAt: Date;
387
+ } | null>;
388
+ deleteFacilityOperationSchedule(db: PostgresJsDatabase, id: string): Promise<{
389
+ id: string;
390
+ } | null>;
391
+ listProperties(db: PostgresJsDatabase, query: PropertyListQuery): Promise<{
392
+ data: {
393
+ id: string;
394
+ facilityId: string;
395
+ propertyType: "other" | "hotel" | "resort" | "camp" | "lodge" | "villa" | "apartment" | "hostel";
396
+ brandName: string | null;
397
+ groupName: string | null;
398
+ rating: number | null;
399
+ ratingScale: number | null;
400
+ checkInTime: string | null;
401
+ checkOutTime: string | null;
402
+ policyNotes: string | null;
403
+ amenityNotes: string | null;
404
+ createdAt: Date;
405
+ updatedAt: Date;
406
+ }[];
407
+ total: number;
408
+ limit: number;
409
+ offset: number;
410
+ }>;
411
+ getPropertyById(db: PostgresJsDatabase, id: string): Promise<{
412
+ id: string;
413
+ facilityId: string;
414
+ propertyType: "other" | "hotel" | "resort" | "camp" | "lodge" | "villa" | "apartment" | "hostel";
415
+ brandName: string | null;
416
+ groupName: string | null;
417
+ rating: number | null;
418
+ ratingScale: number | null;
419
+ checkInTime: string | null;
420
+ checkOutTime: string | null;
421
+ policyNotes: string | null;
422
+ amenityNotes: string | null;
423
+ createdAt: Date;
424
+ updatedAt: Date;
425
+ } | null>;
426
+ createProperty(db: PostgresJsDatabase, data: CreatePropertyInput): Promise<{
427
+ id: string;
428
+ createdAt: Date;
429
+ updatedAt: Date;
430
+ facilityId: string;
431
+ propertyType: "other" | "hotel" | "resort" | "camp" | "lodge" | "villa" | "apartment" | "hostel";
432
+ brandName: string | null;
433
+ groupName: string | null;
434
+ rating: number | null;
435
+ ratingScale: number | null;
436
+ checkInTime: string | null;
437
+ checkOutTime: string | null;
438
+ policyNotes: string | null;
439
+ amenityNotes: string | null;
440
+ } | null>;
441
+ updateProperty(db: PostgresJsDatabase, id: string, data: UpdatePropertyInput): Promise<{
442
+ id: string;
443
+ facilityId: string;
444
+ propertyType: "other" | "hotel" | "resort" | "camp" | "lodge" | "villa" | "apartment" | "hostel";
445
+ brandName: string | null;
446
+ groupName: string | null;
447
+ rating: number | null;
448
+ ratingScale: number | null;
449
+ checkInTime: string | null;
450
+ checkOutTime: string | null;
451
+ policyNotes: string | null;
452
+ amenityNotes: string | null;
453
+ createdAt: Date;
454
+ updatedAt: Date;
455
+ } | null>;
456
+ deleteProperty(db: PostgresJsDatabase, id: string): Promise<{
457
+ id: string;
458
+ } | null>;
459
+ listPropertyGroups(db: PostgresJsDatabase, query: PropertyGroupListQuery): Promise<{
460
+ data: {
461
+ id: string;
462
+ parentGroupId: string | null;
463
+ groupType: "other" | "brand" | "chain" | "management_company" | "collection" | "portfolio" | "cluster";
464
+ status: "active" | "inactive" | "archived";
465
+ name: string;
466
+ code: string | null;
467
+ brandName: string | null;
468
+ legalName: string | null;
469
+ website: string | null;
470
+ notes: string | null;
471
+ metadata: Record<string, unknown> | null;
472
+ createdAt: Date;
473
+ updatedAt: Date;
474
+ }[];
475
+ total: number;
476
+ limit: number;
477
+ offset: number;
478
+ }>;
479
+ getPropertyGroupById(db: PostgresJsDatabase, id: string): Promise<{
480
+ id: string;
481
+ parentGroupId: string | null;
482
+ groupType: "other" | "brand" | "chain" | "management_company" | "collection" | "portfolio" | "cluster";
483
+ status: "active" | "inactive" | "archived";
484
+ name: string;
485
+ code: string | null;
486
+ brandName: string | null;
487
+ legalName: string | null;
488
+ website: string | null;
489
+ notes: string | null;
490
+ metadata: Record<string, unknown> | null;
491
+ createdAt: Date;
492
+ updatedAt: Date;
493
+ } | null>;
494
+ createPropertyGroup(db: PostgresJsDatabase, data: CreatePropertyGroupInput): Promise<{
495
+ name: string;
496
+ website: string | null;
497
+ notes: string | null;
498
+ metadata: Record<string, unknown> | null;
499
+ id: string;
500
+ createdAt: Date;
501
+ updatedAt: Date;
502
+ status: "active" | "inactive" | "archived";
503
+ code: string | null;
504
+ brandName: string | null;
505
+ parentGroupId: string | null;
506
+ groupType: "other" | "brand" | "chain" | "management_company" | "collection" | "portfolio" | "cluster";
507
+ legalName: string | null;
508
+ } | null>;
509
+ updatePropertyGroup(db: PostgresJsDatabase, id: string, data: UpdatePropertyGroupInput): Promise<{
510
+ id: string;
511
+ parentGroupId: string | null;
512
+ groupType: "other" | "brand" | "chain" | "management_company" | "collection" | "portfolio" | "cluster";
513
+ status: "active" | "inactive" | "archived";
514
+ name: string;
515
+ code: string | null;
516
+ brandName: string | null;
517
+ legalName: string | null;
518
+ website: string | null;
519
+ notes: string | null;
520
+ metadata: Record<string, unknown> | null;
521
+ createdAt: Date;
522
+ updatedAt: Date;
523
+ } | null>;
524
+ deletePropertyGroup(db: PostgresJsDatabase, id: string): Promise<{
525
+ id: string;
526
+ } | null>;
527
+ listPropertyGroupMembers(db: PostgresJsDatabase, query: PropertyGroupMemberListQuery): Promise<{
528
+ data: {
529
+ id: string;
530
+ groupId: string;
531
+ propertyId: string;
532
+ membershipRole: "other" | "member" | "flagship" | "managed" | "franchise";
533
+ isPrimary: boolean;
534
+ validFrom: string | null;
535
+ validTo: string | null;
536
+ notes: string | null;
537
+ createdAt: Date;
538
+ updatedAt: Date;
539
+ }[];
540
+ total: number;
541
+ limit: number;
542
+ offset: number;
543
+ }>;
544
+ getPropertyGroupMemberById(db: PostgresJsDatabase, id: string): Promise<{
545
+ id: string;
546
+ groupId: string;
547
+ propertyId: string;
548
+ membershipRole: "other" | "member" | "flagship" | "managed" | "franchise";
549
+ isPrimary: boolean;
550
+ validFrom: string | null;
551
+ validTo: string | null;
552
+ notes: string | null;
553
+ createdAt: Date;
554
+ updatedAt: Date;
555
+ } | null>;
556
+ createPropertyGroupMember(db: PostgresJsDatabase, data: CreatePropertyGroupMemberInput): Promise<{
557
+ isPrimary: boolean;
558
+ notes: string | null;
559
+ id: string;
560
+ createdAt: Date;
561
+ updatedAt: Date;
562
+ validFrom: string | null;
563
+ validTo: string | null;
564
+ groupId: string;
565
+ propertyId: string;
566
+ membershipRole: "other" | "member" | "flagship" | "managed" | "franchise";
567
+ } | null>;
568
+ updatePropertyGroupMember(db: PostgresJsDatabase, id: string, data: UpdatePropertyGroupMemberInput): Promise<{
569
+ id: string;
570
+ groupId: string;
571
+ propertyId: string;
572
+ membershipRole: "other" | "member" | "flagship" | "managed" | "franchise";
573
+ isPrimary: boolean;
574
+ validFrom: string | null;
575
+ validTo: string | null;
576
+ notes: string | null;
577
+ createdAt: Date;
578
+ updatedAt: Date;
579
+ } | null>;
580
+ deletePropertyGroupMember(db: PostgresJsDatabase, id: string): Promise<{
581
+ id: string;
582
+ } | null>;
583
+ };
584
+ export {};
585
+ //# sourceMappingURL=service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../src/service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,sBAAsB,EACtB,2BAA2B,EAC3B,aAAa,IAAI,qBAAqB,EACtC,kBAAkB,IAAI,0BAA0B,EACjD,MAAM,+BAA+B,CAAA;AAEtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AACjE,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAU5B,OAAO,KAAK,EACV,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,wCAAwC,EACxC,2BAA2B,EAC3B,2BAA2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