@voyant-travel/availability 0.2.11 → 0.2.13
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
CHANGED
|
@@ -15,3 +15,14 @@ importing the schema from here.
|
|
|
15
15
|
|
|
16
16
|
- `.` / `./schema` — the `availability_*` Drizzle tables, enums, relations and
|
|
17
17
|
inferred types.
|
|
18
|
+
|
|
19
|
+
## Agent Tool Boundary
|
|
20
|
+
|
|
21
|
+
This foundational package's executable Tool posture is **not applicable**. It owns schema only;
|
|
22
|
+
there is no public availability service or route to bind without querying tables directly. The
|
|
23
|
+
provider-neutral availability services are owned by `@voyant-travel/operations`, whose selected
|
|
24
|
+
Tools cover overview, aggregates, rules, start times, departures, and closeouts.
|
|
25
|
+
|
|
26
|
+
Adding Tools here would first require moving that service ownership out of Operations, including
|
|
27
|
+
its catalog and runtime dependencies. No such migration is selected: duplicate MCP wrappers over
|
|
28
|
+
the same tables would create competing capability ownership rather than fill a coverage gap.
|
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
|
]);
|
package/dist/voyant.js
CHANGED
|
@@ -21,6 +21,10 @@ export const availabilityVoyantModule = defineModule({
|
|
|
21
21
|
},
|
|
22
22
|
meta: {
|
|
23
23
|
ownership: "package",
|
|
24
|
+
agentTools: {
|
|
25
|
+
posture: "not-applicable",
|
|
26
|
+
rationale: "This package owns shared availability schemas only; executable availability and departure services are owned and Tool-backed by Operations.",
|
|
27
|
+
},
|
|
24
28
|
},
|
|
25
29
|
});
|
|
26
30
|
export default availabilityVoyantModule;
|
|
@@ -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.13",
|
|
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.124.0",
|
|
47
|
+
"@voyant-travel/db": "^0.114.7"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"drizzle-kit": "^0.31.10",
|