@voyant-travel/distribution 0.109.8
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/LICENSE +201 -0
- package/README.md +42 -0
- package/dist/booking-extension.d.ts +168 -0
- package/dist/booking-extension.d.ts.map +1 -0
- package/dist/booking-extension.js +102 -0
- package/dist/channel-push/admin-routes.d.ts +31 -0
- package/dist/channel-push/admin-routes.d.ts.map +1 -0
- package/dist/channel-push/admin-routes.js +165 -0
- package/dist/channel-push/availability-push.d.ts +76 -0
- package/dist/channel-push/availability-push.d.ts.map +1 -0
- package/dist/channel-push/availability-push.js +236 -0
- package/dist/channel-push/booking-push-helpers.d.ts +36 -0
- package/dist/channel-push/booking-push-helpers.d.ts.map +1 -0
- package/dist/channel-push/booking-push-helpers.js +169 -0
- package/dist/channel-push/booking-push.d.ts +108 -0
- package/dist/channel-push/booking-push.d.ts.map +1 -0
- package/dist/channel-push/booking-push.js +335 -0
- package/dist/channel-push/boundary-sql.d.ts +23 -0
- package/dist/channel-push/boundary-sql.d.ts.map +1 -0
- package/dist/channel-push/boundary-sql.js +75 -0
- package/dist/channel-push/content-push.d.ts +60 -0
- package/dist/channel-push/content-push.d.ts.map +1 -0
- package/dist/channel-push/content-push.js +252 -0
- package/dist/channel-push/index.d.ts +15 -0
- package/dist/channel-push/index.d.ts.map +1 -0
- package/dist/channel-push/index.js +18 -0
- package/dist/channel-push/plugin.d.ts +18 -0
- package/dist/channel-push/plugin.d.ts.map +1 -0
- package/dist/channel-push/plugin.js +21 -0
- package/dist/channel-push/reconciler.d.ts +85 -0
- package/dist/channel-push/reconciler.d.ts.map +1 -0
- package/dist/channel-push/reconciler.js +179 -0
- package/dist/channel-push/subscriber.d.ts +40 -0
- package/dist/channel-push/subscriber.d.ts.map +1 -0
- package/dist/channel-push/subscriber.js +199 -0
- package/dist/channel-push/types.d.ts +43 -0
- package/dist/channel-push/types.d.ts.map +1 -0
- package/dist/channel-push/types.js +32 -0
- package/dist/channel-push/workflows.d.ts +56 -0
- package/dist/channel-push/workflows.d.ts.map +1 -0
- package/dist/channel-push/workflows.js +100 -0
- package/dist/external-refs/index.d.ts +11 -0
- package/dist/external-refs/index.d.ts.map +1 -0
- package/dist/external-refs/index.js +12 -0
- package/dist/external-refs/routes.d.ts +253 -0
- package/dist/external-refs/routes.d.ts.map +1 -0
- package/dist/external-refs/routes.js +52 -0
- package/dist/external-refs/schema.d.ts +251 -0
- package/dist/external-refs/schema.d.ts.map +1 -0
- package/dist/external-refs/schema.js +32 -0
- package/dist/external-refs/service.d.ts +82 -0
- package/dist/external-refs/service.d.ts.map +1 -0
- package/dist/external-refs/service.js +112 -0
- package/dist/external-refs/validation.d.ts +91 -0
- package/dist/external-refs/validation.d.ts.map +1 -0
- package/dist/external-refs/validation.js +40 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/interface-types.d.ts +128 -0
- package/dist/interface-types.d.ts.map +1 -0
- package/dist/interface-types.js +1 -0
- package/dist/interface.d.ts +10 -0
- package/dist/interface.d.ts.map +1 -0
- package/dist/interface.js +286 -0
- package/dist/rate-limit.d.ts +69 -0
- package/dist/rate-limit.d.ts.map +1 -0
- package/dist/rate-limit.js +135 -0
- package/dist/routes/batch.d.ts +200 -0
- package/dist/routes/batch.d.ts.map +1 -0
- package/dist/routes/batch.js +52 -0
- package/dist/routes/env.d.ts +8 -0
- package/dist/routes/env.d.ts.map +1 -0
- package/dist/routes/env.js +1 -0
- package/dist/routes/inventory.d.ts +604 -0
- package/dist/routes/inventory.d.ts.map +1 -0
- package/dist/routes/inventory.js +138 -0
- package/dist/routes/settlements.d.ts +1649 -0
- package/dist/routes/settlements.d.ts.map +1 -0
- package/dist/routes/settlements.js +265 -0
- package/dist/routes.d.ts +3909 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +323 -0
- package/dist/schema-automation.d.ts +680 -0
- package/dist/schema-automation.d.ts.map +1 -0
- package/dist/schema-automation.js +76 -0
- package/dist/schema-core.d.ts +1674 -0
- package/dist/schema-core.d.ts.map +1 -0
- package/dist/schema-core.js +227 -0
- package/dist/schema-finance.d.ts +1372 -0
- package/dist/schema-finance.d.ts.map +1 -0
- package/dist/schema-finance.js +153 -0
- package/dist/schema-inventory.d.ts +855 -0
- package/dist/schema-inventory.d.ts.map +1 -0
- package/dist/schema-inventory.js +102 -0
- package/dist/schema-push-intents.d.ts +387 -0
- package/dist/schema-push-intents.d.ts.map +1 -0
- package/dist/schema-push-intents.js +77 -0
- package/dist/schema-relations.d.ts +95 -0
- package/dist/schema-relations.d.ts.map +1 -0
- package/dist/schema-relations.js +196 -0
- package/dist/schema-shared.d.ts +24 -0
- package/dist/schema-shared.d.ts.map +1 -0
- package/dist/schema-shared.js +123 -0
- package/dist/schema.d.ts +9 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +8 -0
- package/dist/service/channels.d.ts +167 -0
- package/dist/service/channels.d.ts.map +1 -0
- package/dist/service/channels.js +305 -0
- package/dist/service/commercial.d.ts +385 -0
- package/dist/service/commercial.d.ts.map +1 -0
- package/dist/service/commercial.js +248 -0
- package/dist/service/helpers.d.ts +10 -0
- package/dist/service/helpers.d.ts.map +1 -0
- package/dist/service/helpers.js +7 -0
- package/dist/service/inventory.d.ts +193 -0
- package/dist/service/inventory.d.ts.map +1 -0
- package/dist/service/inventory.js +154 -0
- package/dist/service/settlement-policies.d.ts +325 -0
- package/dist/service/settlement-policies.d.ts.map +1 -0
- package/dist/service/settlement-policies.js +272 -0
- package/dist/service/settlements.d.ts +357 -0
- package/dist/service/settlements.d.ts.map +1 -0
- package/dist/service/settlements.js +319 -0
- package/dist/service/types.d.ts +60 -0
- package/dist/service/types.d.ts.map +1 -0
- package/dist/service/types.js +1 -0
- package/dist/service.d.ts +1418 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +17 -0
- package/dist/suppliers/index.d.ts +15 -0
- package/dist/suppliers/index.d.ts.map +1 -0
- package/dist/suppliers/index.js +23 -0
- package/dist/suppliers/routes.d.ts +1202 -0
- package/dist/suppliers/routes.d.ts.map +1 -0
- package/dist/suppliers/routes.js +290 -0
- package/dist/suppliers/schema.d.ts +1272 -0
- package/dist/suppliers/schema.d.ts.map +1 -0
- package/dist/suppliers/schema.js +219 -0
- package/dist/suppliers/service-aggregates.d.ts +23 -0
- package/dist/suppliers/service-aggregates.d.ts.map +1 -0
- package/dist/suppliers/service-aggregates.js +51 -0
- package/dist/suppliers/service-core.d.ts +89 -0
- package/dist/suppliers/service-core.d.ts.map +1 -0
- package/dist/suppliers/service-core.js +164 -0
- package/dist/suppliers/service-identity.d.ts +162 -0
- package/dist/suppliers/service-identity.d.ts.map +1 -0
- package/dist/suppliers/service-identity.js +101 -0
- package/dist/suppliers/service-operations.d.ts +1500 -0
- package/dist/suppliers/service-operations.d.ts.map +1 -0
- package/dist/suppliers/service-operations.js +157 -0
- package/dist/suppliers/service-shared.d.ts +45 -0
- package/dist/suppliers/service-shared.d.ts.map +1 -0
- package/dist/suppliers/service-shared.js +294 -0
- package/dist/suppliers/service.d.ts +41 -0
- package/dist/suppliers/service.d.ts.map +1 -0
- package/dist/suppliers/service.js +40 -0
- package/dist/suppliers/validation.d.ts +2 -0
- package/dist/suppliers/validation.d.ts.map +1 -0
- package/dist/suppliers/validation.js +1 -0
- package/dist/validation.d.ts +1371 -0
- package/dist/validation.d.ts.map +1 -0
- package/dist/validation.js +445 -0
- package/dist/webhook-deliveries.d.ts +86 -0
- package/dist/webhook-deliveries.d.ts.map +1 -0
- package/dist/webhook-deliveries.js +296 -0
- package/package.json +71 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-inventory.d.ts","sourceRoot":"","sources":["../src/schema-inventory.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqCtC,CAAA;AAED,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsC5C,CAAA;AAED,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4BxC,CAAA;AAED,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8C7C,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG,OAAO,0BAA0B,CAAC,YAAY,CAAA;AACtF,MAAM,MAAM,4BAA4B,GAAG,OAAO,0BAA0B,CAAC,YAAY,CAAA;AACzF,MAAM,MAAM,+BAA+B,GAAG,OAAO,gCAAgC,CAAC,YAAY,CAAA;AAClG,MAAM,MAAM,kCAAkC,GAC5C,OAAO,gCAAgC,CAAC,YAAY,CAAA;AACtD,MAAM,MAAM,2BAA2B,GAAG,OAAO,4BAA4B,CAAC,YAAY,CAAA;AAC1F,MAAM,MAAM,8BAA8B,GAAG,OAAO,4BAA4B,CAAC,YAAY,CAAA;AAC7F,MAAM,MAAM,gCAAgC,GAAG,OAAO,iCAAiC,CAAC,YAAY,CAAA;AACpG,MAAM,MAAM,mCAAmC,GAC7C,OAAO,iCAAiC,CAAC,YAAY,CAAA"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { typeId, typeIdRef } from "@voyant-travel/db/lib/typeid-column";
|
|
2
|
+
import { boolean, date, index, integer, jsonb, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
3
|
+
import { channelContracts, channels } from "./schema-core.js";
|
|
4
|
+
import { channelAllotmentReleaseModeEnum, channelAllotmentUnsoldActionEnum, channelReleaseExecutionActionEnum, channelReleaseExecutionStatusEnum, } from "./schema-shared.js";
|
|
5
|
+
export const channelInventoryAllotments = pgTable("channel_inventory_allotments", {
|
|
6
|
+
id: typeId("channel_inventory_allotments"),
|
|
7
|
+
channelId: typeIdRef("channel_id")
|
|
8
|
+
.notNull()
|
|
9
|
+
.references(() => channels.id, { onDelete: "cascade" }),
|
|
10
|
+
contractId: typeIdRef("contract_id").references(() => channelContracts.id, {
|
|
11
|
+
onDelete: "set null",
|
|
12
|
+
}),
|
|
13
|
+
productId: typeIdRef("product_id").notNull(),
|
|
14
|
+
optionId: typeIdRef("option_id"),
|
|
15
|
+
startTimeId: typeIdRef("start_time_id"),
|
|
16
|
+
validFrom: date("valid_from"),
|
|
17
|
+
validTo: date("valid_to"),
|
|
18
|
+
guaranteedCapacity: integer("guaranteed_capacity"),
|
|
19
|
+
maxCapacity: integer("max_capacity"),
|
|
20
|
+
active: boolean("active").notNull().default(true),
|
|
21
|
+
notes: text("notes"),
|
|
22
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
23
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
24
|
+
}, (table) => [
|
|
25
|
+
index("idx_channel_inventory_allotments_updated").on(table.updatedAt),
|
|
26
|
+
index("idx_channel_inventory_allotments_channel_updated").on(table.channelId, table.updatedAt),
|
|
27
|
+
index("idx_channel_inventory_allotments_contract_updated").on(table.contractId, table.updatedAt),
|
|
28
|
+
index("idx_channel_inventory_allotments_product_updated").on(table.productId, table.updatedAt),
|
|
29
|
+
index("idx_channel_inventory_allotments_option_updated").on(table.optionId, table.updatedAt),
|
|
30
|
+
index("idx_channel_inventory_allotments_start_time_updated").on(table.startTimeId, table.updatedAt),
|
|
31
|
+
index("idx_channel_inventory_allotments_active_updated").on(table.active, table.updatedAt),
|
|
32
|
+
]);
|
|
33
|
+
export const channelInventoryAllotmentTargets = pgTable("channel_inventory_allotment_targets", {
|
|
34
|
+
id: typeId("channel_inventory_allotment_targets"),
|
|
35
|
+
allotmentId: typeIdRef("allotment_id")
|
|
36
|
+
.notNull()
|
|
37
|
+
.references(() => channelInventoryAllotments.id, { onDelete: "cascade" }),
|
|
38
|
+
slotId: typeIdRef("slot_id"),
|
|
39
|
+
startTimeId: typeIdRef("start_time_id"),
|
|
40
|
+
dateLocal: date("date_local"),
|
|
41
|
+
guaranteedCapacity: integer("guaranteed_capacity"),
|
|
42
|
+
maxCapacity: integer("max_capacity"),
|
|
43
|
+
soldCapacity: integer("sold_capacity"),
|
|
44
|
+
remainingCapacity: integer("remaining_capacity"),
|
|
45
|
+
active: boolean("active").notNull().default(true),
|
|
46
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
47
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
48
|
+
}, (table) => [
|
|
49
|
+
index("idx_channel_inventory_allotment_targets_updated").on(table.updatedAt),
|
|
50
|
+
index("idx_channel_inventory_allotment_targets_allotment_updated").on(table.allotmentId, table.updatedAt),
|
|
51
|
+
index("idx_channel_inventory_allotment_targets_slot_updated").on(table.slotId, table.updatedAt),
|
|
52
|
+
index("idx_channel_inventory_allotment_targets_start_time_updated").on(table.startTimeId, table.updatedAt),
|
|
53
|
+
index("idx_channel_inventory_allotment_targets_date_updated").on(table.dateLocal, table.updatedAt),
|
|
54
|
+
index("idx_channel_inventory_allotment_targets_active_updated").on(table.active, table.updatedAt),
|
|
55
|
+
]);
|
|
56
|
+
export const channelInventoryReleaseRules = pgTable("channel_inventory_release_rules", {
|
|
57
|
+
id: typeId("channel_inventory_release_rules"),
|
|
58
|
+
allotmentId: typeIdRef("allotment_id")
|
|
59
|
+
.notNull()
|
|
60
|
+
.references(() => channelInventoryAllotments.id, { onDelete: "cascade" }),
|
|
61
|
+
releaseMode: channelAllotmentReleaseModeEnum("release_mode").notNull().default("automatic"),
|
|
62
|
+
releaseDaysBeforeStart: integer("release_days_before_start"),
|
|
63
|
+
releaseHoursBeforeStart: integer("release_hours_before_start"),
|
|
64
|
+
unsoldAction: channelAllotmentUnsoldActionEnum("unsold_action")
|
|
65
|
+
.notNull()
|
|
66
|
+
.default("release_to_general_pool"),
|
|
67
|
+
notes: text("notes"),
|
|
68
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
69
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
70
|
+
}, (table) => [
|
|
71
|
+
index("idx_channel_inventory_release_rules_updated").on(table.updatedAt),
|
|
72
|
+
index("idx_channel_inventory_release_rules_allotment_updated").on(table.allotmentId, table.updatedAt),
|
|
73
|
+
index("idx_channel_inventory_release_rules_mode_updated").on(table.releaseMode, table.updatedAt),
|
|
74
|
+
]);
|
|
75
|
+
export const channelInventoryReleaseExecutions = pgTable("channel_inventory_release_executions", {
|
|
76
|
+
id: typeId("channel_inventory_release_executions"),
|
|
77
|
+
allotmentId: typeIdRef("allotment_id")
|
|
78
|
+
.notNull()
|
|
79
|
+
.references(() => channelInventoryAllotments.id, { onDelete: "cascade" }),
|
|
80
|
+
releaseRuleId: typeIdRef("release_rule_id").references(() => channelInventoryReleaseRules.id, {
|
|
81
|
+
onDelete: "set null",
|
|
82
|
+
}),
|
|
83
|
+
targetId: typeIdRef("target_id").references(() => channelInventoryAllotmentTargets.id, {
|
|
84
|
+
onDelete: "set null",
|
|
85
|
+
}),
|
|
86
|
+
slotId: typeIdRef("slot_id"),
|
|
87
|
+
actionTaken: channelReleaseExecutionActionEnum("action_taken").notNull().default("released"),
|
|
88
|
+
status: channelReleaseExecutionStatusEnum("status").notNull().default("pending"),
|
|
89
|
+
releasedCapacity: integer("released_capacity"),
|
|
90
|
+
executedAt: timestamp("executed_at", { withTimezone: true }),
|
|
91
|
+
notes: text("notes"),
|
|
92
|
+
metadata: jsonb("metadata").$type(),
|
|
93
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
94
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
95
|
+
}, (table) => [
|
|
96
|
+
index("idx_channel_inventory_release_executions_updated").on(table.updatedAt),
|
|
97
|
+
index("idx_channel_inventory_release_executions_allotment_updated").on(table.allotmentId, table.updatedAt),
|
|
98
|
+
index("idx_channel_inventory_release_executions_rule_updated").on(table.releaseRuleId, table.updatedAt),
|
|
99
|
+
index("idx_channel_inventory_release_executions_target_updated").on(table.targetId, table.updatedAt),
|
|
100
|
+
index("idx_channel_inventory_release_executions_slot_updated").on(table.slotId, table.updatedAt),
|
|
101
|
+
index("idx_channel_inventory_release_executions_status_updated").on(table.status, table.updatedAt),
|
|
102
|
+
]);
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Durable handoff rows for the channel-push availability and content
|
|
3
|
+
* flows. Subscribers INSERT into these tables (returning immediately
|
|
4
|
+
* per the EventBus contract); the scheduled push workflows drain them.
|
|
5
|
+
*
|
|
6
|
+
* Booking push doesn't need its own intent table — `channel_booking_links`
|
|
7
|
+
* already serves both roles (push_status = 'pending' for in-flight,
|
|
8
|
+
* 'ok' on success).
|
|
9
|
+
*
|
|
10
|
+
* Per docs/architecture/channel-push-architecture.md §7.3 and §12.
|
|
11
|
+
*/
|
|
12
|
+
export declare const channelAvailabilityPushIntents: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
13
|
+
name: "channel_availability_push_intents";
|
|
14
|
+
schema: undefined;
|
|
15
|
+
columns: {
|
|
16
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
17
|
+
name: string;
|
|
18
|
+
tableName: "channel_availability_push_intents";
|
|
19
|
+
dataType: "string";
|
|
20
|
+
columnType: "PgText";
|
|
21
|
+
data: string;
|
|
22
|
+
driverParam: string;
|
|
23
|
+
notNull: true;
|
|
24
|
+
hasDefault: true;
|
|
25
|
+
isPrimaryKey: true;
|
|
26
|
+
isAutoincrement: false;
|
|
27
|
+
hasRuntimeDefault: true;
|
|
28
|
+
enumValues: [string, ...string[]];
|
|
29
|
+
baseColumn: never;
|
|
30
|
+
identity: undefined;
|
|
31
|
+
generated: undefined;
|
|
32
|
+
}, {}, {}>;
|
|
33
|
+
channelId: import("drizzle-orm/pg-core").PgColumn<{
|
|
34
|
+
name: string;
|
|
35
|
+
tableName: "channel_availability_push_intents";
|
|
36
|
+
dataType: "string";
|
|
37
|
+
columnType: "PgText";
|
|
38
|
+
data: string;
|
|
39
|
+
driverParam: string;
|
|
40
|
+
notNull: true;
|
|
41
|
+
hasDefault: false;
|
|
42
|
+
isPrimaryKey: false;
|
|
43
|
+
isAutoincrement: false;
|
|
44
|
+
hasRuntimeDefault: false;
|
|
45
|
+
enumValues: [string, ...string[]];
|
|
46
|
+
baseColumn: never;
|
|
47
|
+
identity: undefined;
|
|
48
|
+
generated: undefined;
|
|
49
|
+
}, {}, {}>;
|
|
50
|
+
sourceConnectionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
51
|
+
name: "source_connection_id";
|
|
52
|
+
tableName: "channel_availability_push_intents";
|
|
53
|
+
dataType: "string";
|
|
54
|
+
columnType: "PgText";
|
|
55
|
+
data: string;
|
|
56
|
+
driverParam: string;
|
|
57
|
+
notNull: true;
|
|
58
|
+
hasDefault: false;
|
|
59
|
+
isPrimaryKey: false;
|
|
60
|
+
isAutoincrement: false;
|
|
61
|
+
hasRuntimeDefault: false;
|
|
62
|
+
enumValues: [string, ...string[]];
|
|
63
|
+
baseColumn: never;
|
|
64
|
+
identity: undefined;
|
|
65
|
+
generated: undefined;
|
|
66
|
+
}, {}, {}>;
|
|
67
|
+
slotId: import("drizzle-orm/pg-core").PgColumn<{
|
|
68
|
+
name: "slot_id";
|
|
69
|
+
tableName: "channel_availability_push_intents";
|
|
70
|
+
dataType: "string";
|
|
71
|
+
columnType: "PgText";
|
|
72
|
+
data: string;
|
|
73
|
+
driverParam: string;
|
|
74
|
+
notNull: true;
|
|
75
|
+
hasDefault: false;
|
|
76
|
+
isPrimaryKey: false;
|
|
77
|
+
isAutoincrement: false;
|
|
78
|
+
hasRuntimeDefault: false;
|
|
79
|
+
enumValues: [string, ...string[]];
|
|
80
|
+
baseColumn: never;
|
|
81
|
+
identity: undefined;
|
|
82
|
+
generated: undefined;
|
|
83
|
+
}, {}, {}>;
|
|
84
|
+
productId: import("drizzle-orm/pg-core").PgColumn<{
|
|
85
|
+
name: "product_id";
|
|
86
|
+
tableName: "channel_availability_push_intents";
|
|
87
|
+
dataType: "string";
|
|
88
|
+
columnType: "PgText";
|
|
89
|
+
data: string;
|
|
90
|
+
driverParam: string;
|
|
91
|
+
notNull: true;
|
|
92
|
+
hasDefault: false;
|
|
93
|
+
isPrimaryKey: false;
|
|
94
|
+
isAutoincrement: false;
|
|
95
|
+
hasRuntimeDefault: false;
|
|
96
|
+
enumValues: [string, ...string[]];
|
|
97
|
+
baseColumn: never;
|
|
98
|
+
identity: undefined;
|
|
99
|
+
generated: undefined;
|
|
100
|
+
}, {}, {}>;
|
|
101
|
+
optionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
102
|
+
name: "option_id";
|
|
103
|
+
tableName: "channel_availability_push_intents";
|
|
104
|
+
dataType: "string";
|
|
105
|
+
columnType: "PgText";
|
|
106
|
+
data: string;
|
|
107
|
+
driverParam: string;
|
|
108
|
+
notNull: false;
|
|
109
|
+
hasDefault: false;
|
|
110
|
+
isPrimaryKey: false;
|
|
111
|
+
isAutoincrement: false;
|
|
112
|
+
hasRuntimeDefault: false;
|
|
113
|
+
enumValues: [string, ...string[]];
|
|
114
|
+
baseColumn: never;
|
|
115
|
+
identity: undefined;
|
|
116
|
+
generated: undefined;
|
|
117
|
+
}, {}, {}>;
|
|
118
|
+
startsAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
119
|
+
name: "starts_at";
|
|
120
|
+
tableName: "channel_availability_push_intents";
|
|
121
|
+
dataType: "date";
|
|
122
|
+
columnType: "PgTimestamp";
|
|
123
|
+
data: Date;
|
|
124
|
+
driverParam: string;
|
|
125
|
+
notNull: true;
|
|
126
|
+
hasDefault: false;
|
|
127
|
+
isPrimaryKey: false;
|
|
128
|
+
isAutoincrement: false;
|
|
129
|
+
hasRuntimeDefault: false;
|
|
130
|
+
enumValues: undefined;
|
|
131
|
+
baseColumn: never;
|
|
132
|
+
identity: undefined;
|
|
133
|
+
generated: undefined;
|
|
134
|
+
}, {}, {}>;
|
|
135
|
+
requestedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
136
|
+
name: "requested_at";
|
|
137
|
+
tableName: "channel_availability_push_intents";
|
|
138
|
+
dataType: "date";
|
|
139
|
+
columnType: "PgTimestamp";
|
|
140
|
+
data: Date;
|
|
141
|
+
driverParam: string;
|
|
142
|
+
notNull: true;
|
|
143
|
+
hasDefault: true;
|
|
144
|
+
isPrimaryKey: false;
|
|
145
|
+
isAutoincrement: false;
|
|
146
|
+
hasRuntimeDefault: false;
|
|
147
|
+
enumValues: undefined;
|
|
148
|
+
baseColumn: never;
|
|
149
|
+
identity: undefined;
|
|
150
|
+
generated: undefined;
|
|
151
|
+
}, {}, {}>;
|
|
152
|
+
attempts: import("drizzle-orm/pg-core").PgColumn<{
|
|
153
|
+
name: "attempts";
|
|
154
|
+
tableName: "channel_availability_push_intents";
|
|
155
|
+
dataType: "number";
|
|
156
|
+
columnType: "PgInteger";
|
|
157
|
+
data: number;
|
|
158
|
+
driverParam: string | number;
|
|
159
|
+
notNull: true;
|
|
160
|
+
hasDefault: true;
|
|
161
|
+
isPrimaryKey: false;
|
|
162
|
+
isAutoincrement: false;
|
|
163
|
+
hasRuntimeDefault: false;
|
|
164
|
+
enumValues: undefined;
|
|
165
|
+
baseColumn: never;
|
|
166
|
+
identity: undefined;
|
|
167
|
+
generated: undefined;
|
|
168
|
+
}, {}, {}>;
|
|
169
|
+
lastError: import("drizzle-orm/pg-core").PgColumn<{
|
|
170
|
+
name: "last_error";
|
|
171
|
+
tableName: "channel_availability_push_intents";
|
|
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
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
187
|
+
name: "created_at";
|
|
188
|
+
tableName: "channel_availability_push_intents";
|
|
189
|
+
dataType: "date";
|
|
190
|
+
columnType: "PgTimestamp";
|
|
191
|
+
data: Date;
|
|
192
|
+
driverParam: string;
|
|
193
|
+
notNull: true;
|
|
194
|
+
hasDefault: true;
|
|
195
|
+
isPrimaryKey: false;
|
|
196
|
+
isAutoincrement: false;
|
|
197
|
+
hasRuntimeDefault: false;
|
|
198
|
+
enumValues: undefined;
|
|
199
|
+
baseColumn: never;
|
|
200
|
+
identity: undefined;
|
|
201
|
+
generated: undefined;
|
|
202
|
+
}, {}, {}>;
|
|
203
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
204
|
+
name: "updated_at";
|
|
205
|
+
tableName: "channel_availability_push_intents";
|
|
206
|
+
dataType: "date";
|
|
207
|
+
columnType: "PgTimestamp";
|
|
208
|
+
data: Date;
|
|
209
|
+
driverParam: string;
|
|
210
|
+
notNull: true;
|
|
211
|
+
hasDefault: true;
|
|
212
|
+
isPrimaryKey: false;
|
|
213
|
+
isAutoincrement: false;
|
|
214
|
+
hasRuntimeDefault: false;
|
|
215
|
+
enumValues: undefined;
|
|
216
|
+
baseColumn: never;
|
|
217
|
+
identity: undefined;
|
|
218
|
+
generated: undefined;
|
|
219
|
+
}, {}, {}>;
|
|
220
|
+
};
|
|
221
|
+
dialect: "pg";
|
|
222
|
+
}>;
|
|
223
|
+
export declare const channelContentPushIntents: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
224
|
+
name: "channel_content_push_intents";
|
|
225
|
+
schema: undefined;
|
|
226
|
+
columns: {
|
|
227
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
228
|
+
name: string;
|
|
229
|
+
tableName: "channel_content_push_intents";
|
|
230
|
+
dataType: "string";
|
|
231
|
+
columnType: "PgText";
|
|
232
|
+
data: string;
|
|
233
|
+
driverParam: string;
|
|
234
|
+
notNull: true;
|
|
235
|
+
hasDefault: true;
|
|
236
|
+
isPrimaryKey: true;
|
|
237
|
+
isAutoincrement: false;
|
|
238
|
+
hasRuntimeDefault: true;
|
|
239
|
+
enumValues: [string, ...string[]];
|
|
240
|
+
baseColumn: never;
|
|
241
|
+
identity: undefined;
|
|
242
|
+
generated: undefined;
|
|
243
|
+
}, {}, {}>;
|
|
244
|
+
channelId: import("drizzle-orm/pg-core").PgColumn<{
|
|
245
|
+
name: string;
|
|
246
|
+
tableName: "channel_content_push_intents";
|
|
247
|
+
dataType: "string";
|
|
248
|
+
columnType: "PgText";
|
|
249
|
+
data: string;
|
|
250
|
+
driverParam: string;
|
|
251
|
+
notNull: true;
|
|
252
|
+
hasDefault: false;
|
|
253
|
+
isPrimaryKey: false;
|
|
254
|
+
isAutoincrement: false;
|
|
255
|
+
hasRuntimeDefault: false;
|
|
256
|
+
enumValues: [string, ...string[]];
|
|
257
|
+
baseColumn: never;
|
|
258
|
+
identity: undefined;
|
|
259
|
+
generated: undefined;
|
|
260
|
+
}, {}, {}>;
|
|
261
|
+
sourceConnectionId: import("drizzle-orm/pg-core").PgColumn<{
|
|
262
|
+
name: "source_connection_id";
|
|
263
|
+
tableName: "channel_content_push_intents";
|
|
264
|
+
dataType: "string";
|
|
265
|
+
columnType: "PgText";
|
|
266
|
+
data: string;
|
|
267
|
+
driverParam: string;
|
|
268
|
+
notNull: true;
|
|
269
|
+
hasDefault: false;
|
|
270
|
+
isPrimaryKey: false;
|
|
271
|
+
isAutoincrement: false;
|
|
272
|
+
hasRuntimeDefault: false;
|
|
273
|
+
enumValues: [string, ...string[]];
|
|
274
|
+
baseColumn: never;
|
|
275
|
+
identity: undefined;
|
|
276
|
+
generated: undefined;
|
|
277
|
+
}, {}, {}>;
|
|
278
|
+
productId: import("drizzle-orm/pg-core").PgColumn<{
|
|
279
|
+
name: "product_id";
|
|
280
|
+
tableName: "channel_content_push_intents";
|
|
281
|
+
dataType: "string";
|
|
282
|
+
columnType: "PgText";
|
|
283
|
+
data: string;
|
|
284
|
+
driverParam: string;
|
|
285
|
+
notNull: true;
|
|
286
|
+
hasDefault: false;
|
|
287
|
+
isPrimaryKey: false;
|
|
288
|
+
isAutoincrement: false;
|
|
289
|
+
hasRuntimeDefault: false;
|
|
290
|
+
enumValues: [string, ...string[]];
|
|
291
|
+
baseColumn: never;
|
|
292
|
+
identity: undefined;
|
|
293
|
+
generated: undefined;
|
|
294
|
+
}, {}, {}>;
|
|
295
|
+
requestedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
296
|
+
name: "requested_at";
|
|
297
|
+
tableName: "channel_content_push_intents";
|
|
298
|
+
dataType: "date";
|
|
299
|
+
columnType: "PgTimestamp";
|
|
300
|
+
data: Date;
|
|
301
|
+
driverParam: string;
|
|
302
|
+
notNull: true;
|
|
303
|
+
hasDefault: true;
|
|
304
|
+
isPrimaryKey: false;
|
|
305
|
+
isAutoincrement: false;
|
|
306
|
+
hasRuntimeDefault: false;
|
|
307
|
+
enumValues: undefined;
|
|
308
|
+
baseColumn: never;
|
|
309
|
+
identity: undefined;
|
|
310
|
+
generated: undefined;
|
|
311
|
+
}, {}, {}>;
|
|
312
|
+
attempts: import("drizzle-orm/pg-core").PgColumn<{
|
|
313
|
+
name: "attempts";
|
|
314
|
+
tableName: "channel_content_push_intents";
|
|
315
|
+
dataType: "number";
|
|
316
|
+
columnType: "PgInteger";
|
|
317
|
+
data: number;
|
|
318
|
+
driverParam: string | number;
|
|
319
|
+
notNull: true;
|
|
320
|
+
hasDefault: true;
|
|
321
|
+
isPrimaryKey: false;
|
|
322
|
+
isAutoincrement: false;
|
|
323
|
+
hasRuntimeDefault: false;
|
|
324
|
+
enumValues: undefined;
|
|
325
|
+
baseColumn: never;
|
|
326
|
+
identity: undefined;
|
|
327
|
+
generated: undefined;
|
|
328
|
+
}, {}, {}>;
|
|
329
|
+
lastError: import("drizzle-orm/pg-core").PgColumn<{
|
|
330
|
+
name: "last_error";
|
|
331
|
+
tableName: "channel_content_push_intents";
|
|
332
|
+
dataType: "string";
|
|
333
|
+
columnType: "PgText";
|
|
334
|
+
data: string;
|
|
335
|
+
driverParam: string;
|
|
336
|
+
notNull: false;
|
|
337
|
+
hasDefault: false;
|
|
338
|
+
isPrimaryKey: false;
|
|
339
|
+
isAutoincrement: false;
|
|
340
|
+
hasRuntimeDefault: false;
|
|
341
|
+
enumValues: [string, ...string[]];
|
|
342
|
+
baseColumn: never;
|
|
343
|
+
identity: undefined;
|
|
344
|
+
generated: undefined;
|
|
345
|
+
}, {}, {}>;
|
|
346
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
347
|
+
name: "created_at";
|
|
348
|
+
tableName: "channel_content_push_intents";
|
|
349
|
+
dataType: "date";
|
|
350
|
+
columnType: "PgTimestamp";
|
|
351
|
+
data: Date;
|
|
352
|
+
driverParam: string;
|
|
353
|
+
notNull: true;
|
|
354
|
+
hasDefault: true;
|
|
355
|
+
isPrimaryKey: false;
|
|
356
|
+
isAutoincrement: false;
|
|
357
|
+
hasRuntimeDefault: false;
|
|
358
|
+
enumValues: undefined;
|
|
359
|
+
baseColumn: never;
|
|
360
|
+
identity: undefined;
|
|
361
|
+
generated: undefined;
|
|
362
|
+
}, {}, {}>;
|
|
363
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
364
|
+
name: "updated_at";
|
|
365
|
+
tableName: "channel_content_push_intents";
|
|
366
|
+
dataType: "date";
|
|
367
|
+
columnType: "PgTimestamp";
|
|
368
|
+
data: Date;
|
|
369
|
+
driverParam: string;
|
|
370
|
+
notNull: true;
|
|
371
|
+
hasDefault: true;
|
|
372
|
+
isPrimaryKey: false;
|
|
373
|
+
isAutoincrement: false;
|
|
374
|
+
hasRuntimeDefault: false;
|
|
375
|
+
enumValues: undefined;
|
|
376
|
+
baseColumn: never;
|
|
377
|
+
identity: undefined;
|
|
378
|
+
generated: undefined;
|
|
379
|
+
}, {}, {}>;
|
|
380
|
+
};
|
|
381
|
+
dialect: "pg";
|
|
382
|
+
}>;
|
|
383
|
+
export type ChannelAvailabilityPushIntent = typeof channelAvailabilityPushIntents.$inferSelect;
|
|
384
|
+
export type NewChannelAvailabilityPushIntent = typeof channelAvailabilityPushIntents.$inferInsert;
|
|
385
|
+
export type ChannelContentPushIntent = typeof channelContentPushIntents.$inferSelect;
|
|
386
|
+
export type NewChannelContentPushIntent = typeof channelContentPushIntents.$inferInsert;
|
|
387
|
+
//# sourceMappingURL=schema-push-intents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-push-intents.d.ts","sourceRoot":"","sources":["../src/schema-push-intents.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;GAUG;AAEH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8C1C,CAAA;AAED,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuBrC,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG,OAAO,8BAA8B,CAAC,YAAY,CAAA;AAC9F,MAAM,MAAM,gCAAgC,GAAG,OAAO,8BAA8B,CAAC,YAAY,CAAA;AACjG,MAAM,MAAM,wBAAwB,GAAG,OAAO,yBAAyB,CAAC,YAAY,CAAA;AACpF,MAAM,MAAM,2BAA2B,GAAG,OAAO,yBAAyB,CAAC,YAAY,CAAA"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { typeId, typeIdRef } from "@voyant-travel/db/lib/typeid-column";
|
|
2
|
+
import { index, integer, pgTable, text, timestamp, uniqueIndex } from "drizzle-orm/pg-core";
|
|
3
|
+
import { channels } from "./schema-core.js";
|
|
4
|
+
/**
|
|
5
|
+
* Durable handoff rows for the channel-push availability and content
|
|
6
|
+
* flows. Subscribers INSERT into these tables (returning immediately
|
|
7
|
+
* per the EventBus contract); the scheduled push workflows drain them.
|
|
8
|
+
*
|
|
9
|
+
* Booking push doesn't need its own intent table — `channel_booking_links`
|
|
10
|
+
* already serves both roles (push_status = 'pending' for in-flight,
|
|
11
|
+
* 'ok' on success).
|
|
12
|
+
*
|
|
13
|
+
* Per docs/architecture/channel-push-architecture.md §7.3 and §12.
|
|
14
|
+
*/
|
|
15
|
+
export const channelAvailabilityPushIntents = pgTable("channel_availability_push_intents", {
|
|
16
|
+
id: typeId("channel_availability_push_intents"),
|
|
17
|
+
channelId: typeIdRef("channel_id")
|
|
18
|
+
.notNull()
|
|
19
|
+
.references(() => channels.id, { onDelete: "cascade" }),
|
|
20
|
+
/**
|
|
21
|
+
* Connection id resolving to a registered SourceAdapter. Subscriber
|
|
22
|
+
* reads it from the resolved channel mapping at insert time so the
|
|
23
|
+
* worker doesn't need to re-resolve.
|
|
24
|
+
*/
|
|
25
|
+
sourceConnectionId: text("source_connection_id").notNull(),
|
|
26
|
+
/** Slot id (typeid). Plain text to avoid cross-package FK. */
|
|
27
|
+
slotId: text("slot_id").notNull(),
|
|
28
|
+
/** Product id (typeid). Plain text to avoid cross-package FK. */
|
|
29
|
+
productId: text("product_id").notNull(),
|
|
30
|
+
/** Optional option id when the channel allotment is option-scoped. */
|
|
31
|
+
optionId: text("option_id"),
|
|
32
|
+
/** Slot start time, mirrored from the source event. Diagnostic. */
|
|
33
|
+
startsAt: timestamp("starts_at", { withTimezone: true }).notNull(),
|
|
34
|
+
/**
|
|
35
|
+
* Time the most recent supersession event landed for this
|
|
36
|
+
* (channel, slot) pair. Workers scan oldest-first; the unique
|
|
37
|
+
* constraint below collapses concurrent events to one row, so
|
|
38
|
+
* this is bumped on every UPSERT.
|
|
39
|
+
*/
|
|
40
|
+
requestedAt: timestamp("requested_at", { withTimezone: true }).notNull().defaultNow(),
|
|
41
|
+
/** Number of dispatch attempts so far. */
|
|
42
|
+
attempts: integer("attempts").notNull().default(0),
|
|
43
|
+
/** Most recent error from the last failed attempt. */
|
|
44
|
+
lastError: text("last_error"),
|
|
45
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
46
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
47
|
+
}, (table) => [
|
|
48
|
+
index("idx_chan_avail_push_intents_requested").on(table.channelId, table.requestedAt),
|
|
49
|
+
index("idx_chan_avail_push_intents_product").on(table.productId, table.requestedAt),
|
|
50
|
+
/**
|
|
51
|
+
* Supersession key. Concurrent slot.changed events for the same
|
|
52
|
+
* (channel, slot) collapse to one row — the worker reads the
|
|
53
|
+
* *current* slot state when it processes, so stale event payloads
|
|
54
|
+
* never propagate. Per §5.2.
|
|
55
|
+
*/
|
|
56
|
+
uniqueIndex("uniq_chan_avail_push_intents_per_slot").on(table.channelId, table.slotId),
|
|
57
|
+
]);
|
|
58
|
+
export const channelContentPushIntents = pgTable("channel_content_push_intents", {
|
|
59
|
+
id: typeId("channel_content_push_intents"),
|
|
60
|
+
channelId: typeIdRef("channel_id")
|
|
61
|
+
.notNull()
|
|
62
|
+
.references(() => channels.id, { onDelete: "cascade" }),
|
|
63
|
+
sourceConnectionId: text("source_connection_id").notNull(),
|
|
64
|
+
productId: text("product_id").notNull(),
|
|
65
|
+
requestedAt: timestamp("requested_at", { withTimezone: true }).notNull().defaultNow(),
|
|
66
|
+
attempts: integer("attempts").notNull().default(0),
|
|
67
|
+
lastError: text("last_error"),
|
|
68
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
69
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
70
|
+
}, (table) => [
|
|
71
|
+
index("idx_chan_content_push_intents_requested").on(table.channelId, table.requestedAt),
|
|
72
|
+
/**
|
|
73
|
+
* Supersession key. Concurrent product.content.changed events
|
|
74
|
+
* collapse to one row per (channel, product). Per §6.2.
|
|
75
|
+
*/
|
|
76
|
+
uniqueIndex("uniq_chan_content_push_intents_per_product").on(table.channelId, table.productId),
|
|
77
|
+
]);
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
export declare const channelsRelations: import("drizzle-orm").Relations<"channels", {
|
|
2
|
+
contracts: import("drizzle-orm").Many<"channel_contracts">;
|
|
3
|
+
productMappings: import("drizzle-orm").Many<"channel_product_mappings">;
|
|
4
|
+
bookingLinks: import("drizzle-orm").Many<"channel_booking_links">;
|
|
5
|
+
webhookEvents: import("drizzle-orm").Many<"channel_webhook_events">;
|
|
6
|
+
inventoryAllotments: import("drizzle-orm").Many<"channel_inventory_allotments">;
|
|
7
|
+
settlementRuns: import("drizzle-orm").Many<"channel_settlement_runs">;
|
|
8
|
+
reconciliationRuns: import("drizzle-orm").Many<"channel_reconciliation_runs">;
|
|
9
|
+
settlementPolicies: import("drizzle-orm").Many<"channel_settlement_policies">;
|
|
10
|
+
reconciliationPolicies: import("drizzle-orm").Many<"channel_reconciliation_policies">;
|
|
11
|
+
remittanceExceptions: import("drizzle-orm").Many<"channel_remittance_exceptions">;
|
|
12
|
+
contactProjection: import("drizzle-orm").One<"channel_contact_projections", true>;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const channelContactProjectionsRelations: import("drizzle-orm").Relations<"channel_contact_projections", {
|
|
15
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
16
|
+
}>;
|
|
17
|
+
export declare const channelContractsRelations: import("drizzle-orm").Relations<"channel_contracts", {
|
|
18
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
19
|
+
supplier: import("drizzle-orm").One<"suppliers", false>;
|
|
20
|
+
commissionRules: import("drizzle-orm").Many<"channel_commission_rules">;
|
|
21
|
+
inventoryAllotments: import("drizzle-orm").Many<"channel_inventory_allotments">;
|
|
22
|
+
settlementRuns: import("drizzle-orm").Many<"channel_settlement_runs">;
|
|
23
|
+
reconciliationRuns: import("drizzle-orm").Many<"channel_reconciliation_runs">;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const channelCommissionRulesRelations: import("drizzle-orm").Relations<"channel_commission_rules", {
|
|
26
|
+
contract: import("drizzle-orm").One<"channel_contracts", true>;
|
|
27
|
+
}>;
|
|
28
|
+
export declare const channelProductMappingsRelations: import("drizzle-orm").Relations<"channel_product_mappings", {
|
|
29
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const channelBookingLinksRelations: import("drizzle-orm").Relations<"channel_booking_links", {
|
|
32
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
33
|
+
}>;
|
|
34
|
+
export declare const channelInventoryAllotmentsRelations: import("drizzle-orm").Relations<"channel_inventory_allotments", {
|
|
35
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
36
|
+
contract: import("drizzle-orm").One<"channel_contracts", false>;
|
|
37
|
+
targets: import("drizzle-orm").Many<"channel_inventory_allotment_targets">;
|
|
38
|
+
releaseRules: import("drizzle-orm").Many<"channel_inventory_release_rules">;
|
|
39
|
+
releaseExecutions: import("drizzle-orm").Many<"channel_inventory_release_executions">;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const channelInventoryAllotmentTargetsRelations: import("drizzle-orm").Relations<"channel_inventory_allotment_targets", {
|
|
42
|
+
allotment: import("drizzle-orm").One<"channel_inventory_allotments", true>;
|
|
43
|
+
}>;
|
|
44
|
+
export declare const channelInventoryReleaseRulesRelations: import("drizzle-orm").Relations<"channel_inventory_release_rules", {
|
|
45
|
+
allotment: import("drizzle-orm").One<"channel_inventory_allotments", true>;
|
|
46
|
+
schedules: import("drizzle-orm").Many<"channel_release_schedules">;
|
|
47
|
+
}>;
|
|
48
|
+
export declare const channelSettlementRunsRelations: import("drizzle-orm").Relations<"channel_settlement_runs", {
|
|
49
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
50
|
+
contract: import("drizzle-orm").One<"channel_contracts", false>;
|
|
51
|
+
items: import("drizzle-orm").Many<"channel_settlement_items">;
|
|
52
|
+
approvals: import("drizzle-orm").Many<"channel_settlement_approvals">;
|
|
53
|
+
}>;
|
|
54
|
+
export declare const channelSettlementItemsRelations: import("drizzle-orm").Relations<"channel_settlement_items", {
|
|
55
|
+
settlementRun: import("drizzle-orm").One<"channel_settlement_runs", true>;
|
|
56
|
+
bookingLink: import("drizzle-orm").One<"channel_booking_links", false>;
|
|
57
|
+
commissionRule: import("drizzle-orm").One<"channel_commission_rules", false>;
|
|
58
|
+
}>;
|
|
59
|
+
export declare const channelReconciliationRunsRelations: import("drizzle-orm").Relations<"channel_reconciliation_runs", {
|
|
60
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
61
|
+
contract: import("drizzle-orm").One<"channel_contracts", false>;
|
|
62
|
+
items: import("drizzle-orm").Many<"channel_reconciliation_items">;
|
|
63
|
+
}>;
|
|
64
|
+
export declare const channelReconciliationItemsRelations: import("drizzle-orm").Relations<"channel_reconciliation_items", {
|
|
65
|
+
reconciliationRun: import("drizzle-orm").One<"channel_reconciliation_runs", true>;
|
|
66
|
+
bookingLink: import("drizzle-orm").One<"channel_booking_links", false>;
|
|
67
|
+
}>;
|
|
68
|
+
export declare const channelInventoryReleaseExecutionsRelations: import("drizzle-orm").Relations<"channel_inventory_release_executions", {
|
|
69
|
+
allotment: import("drizzle-orm").One<"channel_inventory_allotments", true>;
|
|
70
|
+
releaseRule: import("drizzle-orm").One<"channel_inventory_release_rules", false>;
|
|
71
|
+
target: import("drizzle-orm").One<"channel_inventory_allotment_targets", false>;
|
|
72
|
+
}>;
|
|
73
|
+
export declare const channelSettlementPoliciesRelations: import("drizzle-orm").Relations<"channel_settlement_policies", {
|
|
74
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
75
|
+
contract: import("drizzle-orm").One<"channel_contracts", false>;
|
|
76
|
+
}>;
|
|
77
|
+
export declare const channelReconciliationPoliciesRelations: import("drizzle-orm").Relations<"channel_reconciliation_policies", {
|
|
78
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
79
|
+
contract: import("drizzle-orm").One<"channel_contracts", false>;
|
|
80
|
+
}>;
|
|
81
|
+
export declare const channelReleaseSchedulesRelations: import("drizzle-orm").Relations<"channel_release_schedules", {
|
|
82
|
+
releaseRule: import("drizzle-orm").One<"channel_inventory_release_rules", true>;
|
|
83
|
+
}>;
|
|
84
|
+
export declare const channelRemittanceExceptionsRelations: import("drizzle-orm").Relations<"channel_remittance_exceptions", {
|
|
85
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
86
|
+
settlementItem: import("drizzle-orm").One<"channel_settlement_items", false>;
|
|
87
|
+
reconciliationItem: import("drizzle-orm").One<"channel_reconciliation_items", false>;
|
|
88
|
+
}>;
|
|
89
|
+
export declare const channelSettlementApprovalsRelations: import("drizzle-orm").Relations<"channel_settlement_approvals", {
|
|
90
|
+
settlementRun: import("drizzle-orm").One<"channel_settlement_runs", true>;
|
|
91
|
+
}>;
|
|
92
|
+
export declare const channelWebhookEventsRelations: import("drizzle-orm").Relations<"channel_webhook_events", {
|
|
93
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
94
|
+
}>;
|
|
95
|
+
//# sourceMappingURL=schema-relations.d.ts.map
|