@voyant-travel/availability 0.2.11 → 0.2.12
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/schema-holds.d.ts
CHANGED
|
@@ -149,6 +149,57 @@ export declare const availabilityHolds: import("drizzle-orm/pg-core").PgTableWit
|
|
|
149
149
|
identity: undefined;
|
|
150
150
|
generated: undefined;
|
|
151
151
|
}, {}, {}>;
|
|
152
|
+
convertedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
153
|
+
name: "converted_at";
|
|
154
|
+
tableName: "availability_holds";
|
|
155
|
+
dataType: "date";
|
|
156
|
+
columnType: "PgTimestamp";
|
|
157
|
+
data: Date;
|
|
158
|
+
driverParam: string;
|
|
159
|
+
notNull: false;
|
|
160
|
+
hasDefault: false;
|
|
161
|
+
isPrimaryKey: false;
|
|
162
|
+
isAutoincrement: false;
|
|
163
|
+
hasRuntimeDefault: false;
|
|
164
|
+
enumValues: undefined;
|
|
165
|
+
baseColumn: never;
|
|
166
|
+
identity: undefined;
|
|
167
|
+
generated: undefined;
|
|
168
|
+
}, {}, {}>;
|
|
169
|
+
convertedBookingId: import("drizzle-orm/pg-core").PgColumn<{
|
|
170
|
+
name: "converted_booking_id";
|
|
171
|
+
tableName: "availability_holds";
|
|
172
|
+
dataType: "string";
|
|
173
|
+
columnType: "PgText";
|
|
174
|
+
data: string;
|
|
175
|
+
driverParam: string;
|
|
176
|
+
notNull: false;
|
|
177
|
+
hasDefault: false;
|
|
178
|
+
isPrimaryKey: false;
|
|
179
|
+
isAutoincrement: false;
|
|
180
|
+
hasRuntimeDefault: false;
|
|
181
|
+
enumValues: [string, ...string[]];
|
|
182
|
+
baseColumn: never;
|
|
183
|
+
identity: undefined;
|
|
184
|
+
generated: undefined;
|
|
185
|
+
}, {}, {}>;
|
|
186
|
+
convertedAllocationId: import("drizzle-orm/pg-core").PgColumn<{
|
|
187
|
+
name: "converted_allocation_id";
|
|
188
|
+
tableName: "availability_holds";
|
|
189
|
+
dataType: "string";
|
|
190
|
+
columnType: "PgText";
|
|
191
|
+
data: string;
|
|
192
|
+
driverParam: string;
|
|
193
|
+
notNull: false;
|
|
194
|
+
hasDefault: false;
|
|
195
|
+
isPrimaryKey: false;
|
|
196
|
+
isAutoincrement: false;
|
|
197
|
+
hasRuntimeDefault: false;
|
|
198
|
+
enumValues: [string, ...string[]];
|
|
199
|
+
baseColumn: never;
|
|
200
|
+
identity: undefined;
|
|
201
|
+
generated: undefined;
|
|
202
|
+
}, {}, {}>;
|
|
152
203
|
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
153
204
|
name: "created_at";
|
|
154
205
|
tableName: "availability_holds";
|
package/dist/schema-holds.js
CHANGED
|
@@ -26,6 +26,14 @@ export const availabilityHolds = pgTable("availability_holds", {
|
|
|
26
26
|
paxCount: integer("pax_count").notNull(),
|
|
27
27
|
expiresAt: timestamp("expires_at", { withTimezone: true }).notNull(),
|
|
28
28
|
releasedAt: timestamp("released_at", { withTimezone: true }),
|
|
29
|
+
/**
|
|
30
|
+
* Conversion is recorded on the hold without cross-package foreign keys.
|
|
31
|
+
* Bookings owns both referenced rows and writes these fields atomically
|
|
32
|
+
* while turning reserved capacity into a booking allocation.
|
|
33
|
+
*/
|
|
34
|
+
convertedAt: timestamp("converted_at", { withTimezone: true }),
|
|
35
|
+
convertedBookingId: text("converted_booking_id"),
|
|
36
|
+
convertedAllocationId: text("converted_allocation_id"),
|
|
29
37
|
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
30
38
|
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
31
39
|
}, (table) => [
|
|
@@ -33,4 +41,5 @@ export const availabilityHolds = pgTable("availability_holds", {
|
|
|
33
41
|
index("idx_availability_holds_draft").on(table.draftId),
|
|
34
42
|
index("idx_availability_holds_token").on(table.holdToken),
|
|
35
43
|
index("idx_availability_holds_expires").on(table.expiresAt),
|
|
44
|
+
index("idx_availability_holds_converted_booking").on(table.convertedBookingId),
|
|
36
45
|
]);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
ALTER TABLE "availability_holds" ADD COLUMN "converted_at" timestamp with time zone;--> statement-breakpoint
|
|
2
|
+
ALTER TABLE "availability_holds" ADD COLUMN "converted_booking_id" text;--> statement-breakpoint
|
|
3
|
+
ALTER TABLE "availability_holds" ADD COLUMN "converted_allocation_id" text;--> statement-breakpoint
|
|
4
|
+
CREATE INDEX "idx_availability_holds_converted_booking" ON "availability_holds" USING btree ("converted_booking_id");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyant-travel/availability",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "Availability domain schema — bookable slots, rules, start times, holds, pickups and capacity. The foundational owner consumed by bookings, operations and accommodations.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"drizzle-orm": "^0.45.2",
|
|
46
|
-
"@voyant-travel/core": "^0.
|
|
47
|
-
"@voyant-travel/db": "^0.114.
|
|
46
|
+
"@voyant-travel/core": "^0.123.0",
|
|
47
|
+
"@voyant-travel/db": "^0.114.6"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"drizzle-kit": "^0.31.10",
|