@voyantjs/distribution 0.2.0 → 0.3.1
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/routes.d.ts +17 -17
- package/dist/schema-automation.d.ts +680 -0
- package/dist/schema-automation.d.ts.map +1 -0
- package/dist/schema-automation.js +73 -0
- package/dist/schema-core.d.ts +1113 -0
- package/dist/schema-core.d.ts.map +1 -0
- package/dist/schema-core.js +116 -0
- package/dist/schema-finance.d.ts +1372 -0
- package/dist/schema-finance.d.ts.map +1 -0
- package/dist/schema-finance.js +147 -0
- package/dist/schema-inventory.d.ts +855 -0
- package/dist/schema-inventory.d.ts.map +1 -0
- package/dist/schema-inventory.js +105 -0
- package/dist/schema-relations.d.ts +99 -0
- package/dist/schema-relations.d.ts.map +1 -0
- package/dist/schema-relations.js +220 -0
- package/dist/schema-shared.d.ts +24 -0
- package/dist/schema-shared.d.ts.map +1 -0
- package/dist/schema-shared.js +122 -0
- package/dist/schema.d.ts +6 -4137
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +6 -760
- package/dist/service.d.ts +16 -16
- package/dist/validation.d.ts +10 -10
- package/package.json +8 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-inventory.d.ts","sourceRoot":"","sources":["../src/schema-inventory.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCtC,CAAA;AAED,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2B5C,CAAA;AAED,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBxC,CAAA;AAED,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6B7C,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,105 @@
|
|
|
1
|
+
import { availabilitySlots, availabilityStartTimes } from "@voyantjs/availability/schema";
|
|
2
|
+
import { typeId, typeIdRef } from "@voyantjs/db/lib/typeid-column";
|
|
3
|
+
import { productOptions, products } from "@voyantjs/products/schema";
|
|
4
|
+
import { boolean, date, index, integer, jsonb, pgTable, text, timestamp } from "drizzle-orm/pg-core";
|
|
5
|
+
import { channelContracts, channels } from "./schema-core";
|
|
6
|
+
import { channelAllotmentReleaseModeEnum, channelAllotmentUnsoldActionEnum, channelReleaseExecutionActionEnum, channelReleaseExecutionStatusEnum, } from "./schema-shared";
|
|
7
|
+
export const channelInventoryAllotments = pgTable("channel_inventory_allotments", {
|
|
8
|
+
id: typeId("channel_inventory_allotments"),
|
|
9
|
+
channelId: typeIdRef("channel_id")
|
|
10
|
+
.notNull()
|
|
11
|
+
.references(() => channels.id, { onDelete: "cascade" }),
|
|
12
|
+
contractId: typeIdRef("contract_id").references(() => channelContracts.id, {
|
|
13
|
+
onDelete: "set null",
|
|
14
|
+
}),
|
|
15
|
+
productId: typeIdRef("product_id")
|
|
16
|
+
.notNull()
|
|
17
|
+
.references(() => products.id, { onDelete: "cascade" }),
|
|
18
|
+
optionId: typeIdRef("option_id").references(() => productOptions.id, { onDelete: "set null" }),
|
|
19
|
+
startTimeId: typeIdRef("start_time_id").references(() => availabilityStartTimes.id, {
|
|
20
|
+
onDelete: "set null",
|
|
21
|
+
}),
|
|
22
|
+
validFrom: date("valid_from"),
|
|
23
|
+
validTo: date("valid_to"),
|
|
24
|
+
guaranteedCapacity: integer("guaranteed_capacity"),
|
|
25
|
+
maxCapacity: integer("max_capacity"),
|
|
26
|
+
active: boolean("active").notNull().default(true),
|
|
27
|
+
notes: text("notes"),
|
|
28
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
29
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
30
|
+
}, (table) => [
|
|
31
|
+
index("idx_channel_inventory_allotments_channel").on(table.channelId),
|
|
32
|
+
index("idx_channel_inventory_allotments_contract").on(table.contractId),
|
|
33
|
+
index("idx_channel_inventory_allotments_product").on(table.productId),
|
|
34
|
+
index("idx_channel_inventory_allotments_option").on(table.optionId),
|
|
35
|
+
index("idx_channel_inventory_allotments_start_time").on(table.startTimeId),
|
|
36
|
+
index("idx_channel_inventory_allotments_active").on(table.active),
|
|
37
|
+
]);
|
|
38
|
+
export const channelInventoryAllotmentTargets = pgTable("channel_inventory_allotment_targets", {
|
|
39
|
+
id: typeId("channel_inventory_allotment_targets"),
|
|
40
|
+
allotmentId: typeIdRef("allotment_id")
|
|
41
|
+
.notNull()
|
|
42
|
+
.references(() => channelInventoryAllotments.id, { onDelete: "cascade" }),
|
|
43
|
+
slotId: typeIdRef("slot_id").references(() => availabilitySlots.id, { onDelete: "cascade" }),
|
|
44
|
+
startTimeId: typeIdRef("start_time_id").references(() => availabilityStartTimes.id, {
|
|
45
|
+
onDelete: "set null",
|
|
46
|
+
}),
|
|
47
|
+
dateLocal: date("date_local"),
|
|
48
|
+
guaranteedCapacity: integer("guaranteed_capacity"),
|
|
49
|
+
maxCapacity: integer("max_capacity"),
|
|
50
|
+
soldCapacity: integer("sold_capacity"),
|
|
51
|
+
remainingCapacity: integer("remaining_capacity"),
|
|
52
|
+
active: boolean("active").notNull().default(true),
|
|
53
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
54
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
55
|
+
}, (table) => [
|
|
56
|
+
index("idx_channel_inventory_allotment_targets_allotment").on(table.allotmentId),
|
|
57
|
+
index("idx_channel_inventory_allotment_targets_slot").on(table.slotId),
|
|
58
|
+
index("idx_channel_inventory_allotment_targets_start_time").on(table.startTimeId),
|
|
59
|
+
index("idx_channel_inventory_allotment_targets_date").on(table.dateLocal),
|
|
60
|
+
index("idx_channel_inventory_allotment_targets_active").on(table.active),
|
|
61
|
+
]);
|
|
62
|
+
export const channelInventoryReleaseRules = pgTable("channel_inventory_release_rules", {
|
|
63
|
+
id: typeId("channel_inventory_release_rules"),
|
|
64
|
+
allotmentId: typeIdRef("allotment_id")
|
|
65
|
+
.notNull()
|
|
66
|
+
.references(() => channelInventoryAllotments.id, { onDelete: "cascade" }),
|
|
67
|
+
releaseMode: channelAllotmentReleaseModeEnum("release_mode").notNull().default("automatic"),
|
|
68
|
+
releaseDaysBeforeStart: integer("release_days_before_start"),
|
|
69
|
+
releaseHoursBeforeStart: integer("release_hours_before_start"),
|
|
70
|
+
unsoldAction: channelAllotmentUnsoldActionEnum("unsold_action")
|
|
71
|
+
.notNull()
|
|
72
|
+
.default("release_to_general_pool"),
|
|
73
|
+
notes: text("notes"),
|
|
74
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
75
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
76
|
+
}, (table) => [
|
|
77
|
+
index("idx_channel_inventory_release_rules_allotment").on(table.allotmentId),
|
|
78
|
+
index("idx_channel_inventory_release_rules_mode").on(table.releaseMode),
|
|
79
|
+
]);
|
|
80
|
+
export const channelInventoryReleaseExecutions = pgTable("channel_inventory_release_executions", {
|
|
81
|
+
id: typeId("channel_inventory_release_executions"),
|
|
82
|
+
allotmentId: typeIdRef("allotment_id")
|
|
83
|
+
.notNull()
|
|
84
|
+
.references(() => channelInventoryAllotments.id, { onDelete: "cascade" }),
|
|
85
|
+
releaseRuleId: typeIdRef("release_rule_id").references(() => channelInventoryReleaseRules.id, {
|
|
86
|
+
onDelete: "set null",
|
|
87
|
+
}),
|
|
88
|
+
targetId: typeIdRef("target_id").references(() => channelInventoryAllotmentTargets.id, {
|
|
89
|
+
onDelete: "set null",
|
|
90
|
+
}),
|
|
91
|
+
slotId: typeIdRef("slot_id").references(() => availabilitySlots.id, { onDelete: "set null" }),
|
|
92
|
+
actionTaken: channelReleaseExecutionActionEnum("action_taken").notNull().default("released"),
|
|
93
|
+
status: channelReleaseExecutionStatusEnum("status").notNull().default("pending"),
|
|
94
|
+
releasedCapacity: integer("released_capacity"),
|
|
95
|
+
executedAt: timestamp("executed_at", { withTimezone: true }),
|
|
96
|
+
notes: text("notes"),
|
|
97
|
+
metadata: jsonb("metadata").$type(),
|
|
98
|
+
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
|
|
99
|
+
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
|
|
100
|
+
}, (table) => [
|
|
101
|
+
index("idx_channel_inventory_release_executions_allotment").on(table.allotmentId),
|
|
102
|
+
index("idx_channel_inventory_release_executions_rule").on(table.releaseRuleId),
|
|
103
|
+
index("idx_channel_inventory_release_executions_target").on(table.targetId),
|
|
104
|
+
index("idx_channel_inventory_release_executions_status").on(table.status),
|
|
105
|
+
]);
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
}>;
|
|
13
|
+
export declare const channelContractsRelations: import("drizzle-orm").Relations<"channel_contracts", {
|
|
14
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
15
|
+
supplier: import("drizzle-orm").One<"suppliers", false>;
|
|
16
|
+
commissionRules: import("drizzle-orm").Many<"channel_commission_rules">;
|
|
17
|
+
inventoryAllotments: import("drizzle-orm").Many<"channel_inventory_allotments">;
|
|
18
|
+
settlementRuns: import("drizzle-orm").Many<"channel_settlement_runs">;
|
|
19
|
+
reconciliationRuns: import("drizzle-orm").Many<"channel_reconciliation_runs">;
|
|
20
|
+
}>;
|
|
21
|
+
export declare const channelCommissionRulesRelations: import("drizzle-orm").Relations<"channel_commission_rules", {
|
|
22
|
+
contract: import("drizzle-orm").One<"channel_contracts", true>;
|
|
23
|
+
product: import("drizzle-orm").One<"products", false>;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const channelProductMappingsRelations: import("drizzle-orm").Relations<"channel_product_mappings", {
|
|
26
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
27
|
+
product: import("drizzle-orm").One<"products", true>;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const channelBookingLinksRelations: import("drizzle-orm").Relations<"channel_booking_links", {
|
|
30
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
31
|
+
}>;
|
|
32
|
+
export declare const channelInventoryAllotmentsRelations: import("drizzle-orm").Relations<"channel_inventory_allotments", {
|
|
33
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
34
|
+
contract: import("drizzle-orm").One<"channel_contracts", false>;
|
|
35
|
+
product: import("drizzle-orm").One<"products", true>;
|
|
36
|
+
option: import("drizzle-orm").One<"product_options", false>;
|
|
37
|
+
startTime: import("drizzle-orm").One<"availability_start_times", false>;
|
|
38
|
+
targets: import("drizzle-orm").Many<"channel_inventory_allotment_targets">;
|
|
39
|
+
releaseRules: import("drizzle-orm").Many<"channel_inventory_release_rules">;
|
|
40
|
+
releaseExecutions: import("drizzle-orm").Many<"channel_inventory_release_executions">;
|
|
41
|
+
}>;
|
|
42
|
+
export declare const channelInventoryAllotmentTargetsRelations: import("drizzle-orm").Relations<"channel_inventory_allotment_targets", {
|
|
43
|
+
allotment: import("drizzle-orm").One<"channel_inventory_allotments", true>;
|
|
44
|
+
slot: import("drizzle-orm").One<"availability_slots", false>;
|
|
45
|
+
startTime: import("drizzle-orm").One<"availability_start_times", false>;
|
|
46
|
+
}>;
|
|
47
|
+
export declare const channelInventoryReleaseRulesRelations: import("drizzle-orm").Relations<"channel_inventory_release_rules", {
|
|
48
|
+
allotment: import("drizzle-orm").One<"channel_inventory_allotments", true>;
|
|
49
|
+
schedules: import("drizzle-orm").Many<"channel_release_schedules">;
|
|
50
|
+
}>;
|
|
51
|
+
export declare const channelSettlementRunsRelations: import("drizzle-orm").Relations<"channel_settlement_runs", {
|
|
52
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
53
|
+
contract: import("drizzle-orm").One<"channel_contracts", false>;
|
|
54
|
+
items: import("drizzle-orm").Many<"channel_settlement_items">;
|
|
55
|
+
approvals: import("drizzle-orm").Many<"channel_settlement_approvals">;
|
|
56
|
+
}>;
|
|
57
|
+
export declare const channelSettlementItemsRelations: import("drizzle-orm").Relations<"channel_settlement_items", {
|
|
58
|
+
settlementRun: import("drizzle-orm").One<"channel_settlement_runs", true>;
|
|
59
|
+
bookingLink: import("drizzle-orm").One<"channel_booking_links", false>;
|
|
60
|
+
commissionRule: import("drizzle-orm").One<"channel_commission_rules", false>;
|
|
61
|
+
}>;
|
|
62
|
+
export declare const channelReconciliationRunsRelations: import("drizzle-orm").Relations<"channel_reconciliation_runs", {
|
|
63
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
64
|
+
contract: import("drizzle-orm").One<"channel_contracts", false>;
|
|
65
|
+
items: import("drizzle-orm").Many<"channel_reconciliation_items">;
|
|
66
|
+
}>;
|
|
67
|
+
export declare const channelReconciliationItemsRelations: import("drizzle-orm").Relations<"channel_reconciliation_items", {
|
|
68
|
+
reconciliationRun: import("drizzle-orm").One<"channel_reconciliation_runs", true>;
|
|
69
|
+
bookingLink: import("drizzle-orm").One<"channel_booking_links", false>;
|
|
70
|
+
}>;
|
|
71
|
+
export declare const channelInventoryReleaseExecutionsRelations: import("drizzle-orm").Relations<"channel_inventory_release_executions", {
|
|
72
|
+
allotment: import("drizzle-orm").One<"channel_inventory_allotments", true>;
|
|
73
|
+
releaseRule: import("drizzle-orm").One<"channel_inventory_release_rules", false>;
|
|
74
|
+
target: import("drizzle-orm").One<"channel_inventory_allotment_targets", false>;
|
|
75
|
+
slot: import("drizzle-orm").One<"availability_slots", false>;
|
|
76
|
+
}>;
|
|
77
|
+
export declare const channelSettlementPoliciesRelations: import("drizzle-orm").Relations<"channel_settlement_policies", {
|
|
78
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
79
|
+
contract: import("drizzle-orm").One<"channel_contracts", false>;
|
|
80
|
+
}>;
|
|
81
|
+
export declare const channelReconciliationPoliciesRelations: import("drizzle-orm").Relations<"channel_reconciliation_policies", {
|
|
82
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
83
|
+
contract: import("drizzle-orm").One<"channel_contracts", false>;
|
|
84
|
+
}>;
|
|
85
|
+
export declare const channelReleaseSchedulesRelations: import("drizzle-orm").Relations<"channel_release_schedules", {
|
|
86
|
+
releaseRule: import("drizzle-orm").One<"channel_inventory_release_rules", true>;
|
|
87
|
+
}>;
|
|
88
|
+
export declare const channelRemittanceExceptionsRelations: import("drizzle-orm").Relations<"channel_remittance_exceptions", {
|
|
89
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
90
|
+
settlementItem: import("drizzle-orm").One<"channel_settlement_items", false>;
|
|
91
|
+
reconciliationItem: import("drizzle-orm").One<"channel_reconciliation_items", false>;
|
|
92
|
+
}>;
|
|
93
|
+
export declare const channelSettlementApprovalsRelations: import("drizzle-orm").Relations<"channel_settlement_approvals", {
|
|
94
|
+
settlementRun: import("drizzle-orm").One<"channel_settlement_runs", true>;
|
|
95
|
+
}>;
|
|
96
|
+
export declare const channelWebhookEventsRelations: import("drizzle-orm").Relations<"channel_webhook_events", {
|
|
97
|
+
channel: import("drizzle-orm").One<"channels", true>;
|
|
98
|
+
}>;
|
|
99
|
+
//# sourceMappingURL=schema-relations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-relations.d.ts","sourceRoot":"","sources":["../src/schema-relations.ts"],"names":[],"mappings":"AAgCA,eAAO,MAAM,iBAAiB;;;;;;;;;;;EAW3B,CAAA;AAEH,eAAO,MAAM,yBAAyB;;;;;;;EAUnC,CAAA;AAEH,eAAO,MAAM,+BAA+B;;;EASzC,CAAA;AAEH,eAAO,MAAM,+BAA+B;;;EASzC,CAAA;AAEH,eAAO,MAAM,4BAA4B;;EAKtC,CAAA;AAEH,eAAO,MAAM,mCAAmC;;;;;;;;;EA2B/C,CAAA;AAED,eAAO,MAAM,yCAAyC;;;;EAgBrD,CAAA;AAED,eAAO,MAAM,qCAAqC;;;EASjD,CAAA;AAED,eAAO,MAAM,8BAA8B;;;;;EAWxC,CAAA;AAEH,eAAO,MAAM,+BAA+B;;;;EAazC,CAAA;AAEH,eAAO,MAAM,kCAAkC;;;;EAa9C,CAAA;AAED,eAAO,MAAM,mCAAmC;;;EAY/C,CAAA;AAED,eAAO,MAAM,0CAA0C;;;;;EAoBtD,CAAA;AAED,eAAO,MAAM,kCAAkC;;;EAY9C,CAAA;AAED,eAAO,MAAM,sCAAsC;;;EAYlD,CAAA;AAED,eAAO,MAAM,gCAAgC;;EAK1C,CAAA;AAEH,eAAO,MAAM,oCAAoC;;;;EAgBhD,CAAA;AAED,eAAO,MAAM,mCAAmC;;EAQ/C,CAAA;AAED,eAAO,MAAM,6BAA6B;;EAKvC,CAAA"}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { availabilitySlots, availabilityStartTimes } from "@voyantjs/availability/schema";
|
|
2
|
+
import { productOptions, products } from "@voyantjs/products/schema";
|
|
3
|
+
import { suppliers } from "@voyantjs/suppliers/schema";
|
|
4
|
+
import { relations } from "drizzle-orm";
|
|
5
|
+
import { channelReconciliationPolicies, channelReleaseSchedules, channelSettlementPolicies, } from "./schema-automation";
|
|
6
|
+
import { channelBookingLinks, channelCommissionRules, channelContracts, channelProductMappings, channels, channelWebhookEvents, } from "./schema-core";
|
|
7
|
+
import { channelReconciliationItems, channelReconciliationRuns, channelRemittanceExceptions, channelSettlementApprovals, channelSettlementItems, channelSettlementRuns, } from "./schema-finance";
|
|
8
|
+
import { channelInventoryAllotments, channelInventoryAllotmentTargets, channelInventoryReleaseExecutions, channelInventoryReleaseRules, } from "./schema-inventory";
|
|
9
|
+
export const channelsRelations = relations(channels, ({ many }) => ({
|
|
10
|
+
contracts: many(channelContracts),
|
|
11
|
+
productMappings: many(channelProductMappings),
|
|
12
|
+
bookingLinks: many(channelBookingLinks),
|
|
13
|
+
webhookEvents: many(channelWebhookEvents),
|
|
14
|
+
inventoryAllotments: many(channelInventoryAllotments),
|
|
15
|
+
settlementRuns: many(channelSettlementRuns),
|
|
16
|
+
reconciliationRuns: many(channelReconciliationRuns),
|
|
17
|
+
settlementPolicies: many(channelSettlementPolicies),
|
|
18
|
+
reconciliationPolicies: many(channelReconciliationPolicies),
|
|
19
|
+
remittanceExceptions: many(channelRemittanceExceptions),
|
|
20
|
+
}));
|
|
21
|
+
export const channelContractsRelations = relations(channelContracts, ({ one, many }) => ({
|
|
22
|
+
channel: one(channels, { fields: [channelContracts.channelId], references: [channels.id] }),
|
|
23
|
+
supplier: one(suppliers, {
|
|
24
|
+
fields: [channelContracts.supplierId],
|
|
25
|
+
references: [suppliers.id],
|
|
26
|
+
}),
|
|
27
|
+
commissionRules: many(channelCommissionRules),
|
|
28
|
+
inventoryAllotments: many(channelInventoryAllotments),
|
|
29
|
+
settlementRuns: many(channelSettlementRuns),
|
|
30
|
+
reconciliationRuns: many(channelReconciliationRuns),
|
|
31
|
+
}));
|
|
32
|
+
export const channelCommissionRulesRelations = relations(channelCommissionRules, ({ one }) => ({
|
|
33
|
+
contract: one(channelContracts, {
|
|
34
|
+
fields: [channelCommissionRules.contractId],
|
|
35
|
+
references: [channelContracts.id],
|
|
36
|
+
}),
|
|
37
|
+
product: one(products, {
|
|
38
|
+
fields: [channelCommissionRules.productId],
|
|
39
|
+
references: [products.id],
|
|
40
|
+
}),
|
|
41
|
+
}));
|
|
42
|
+
export const channelProductMappingsRelations = relations(channelProductMappings, ({ one }) => ({
|
|
43
|
+
channel: one(channels, {
|
|
44
|
+
fields: [channelProductMappings.channelId],
|
|
45
|
+
references: [channels.id],
|
|
46
|
+
}),
|
|
47
|
+
product: one(products, {
|
|
48
|
+
fields: [channelProductMappings.productId],
|
|
49
|
+
references: [products.id],
|
|
50
|
+
}),
|
|
51
|
+
}));
|
|
52
|
+
export const channelBookingLinksRelations = relations(channelBookingLinks, ({ one }) => ({
|
|
53
|
+
channel: one(channels, {
|
|
54
|
+
fields: [channelBookingLinks.channelId],
|
|
55
|
+
references: [channels.id],
|
|
56
|
+
}),
|
|
57
|
+
}));
|
|
58
|
+
export const channelInventoryAllotmentsRelations = relations(channelInventoryAllotments, ({ one, many }) => ({
|
|
59
|
+
channel: one(channels, {
|
|
60
|
+
fields: [channelInventoryAllotments.channelId],
|
|
61
|
+
references: [channels.id],
|
|
62
|
+
}),
|
|
63
|
+
contract: one(channelContracts, {
|
|
64
|
+
fields: [channelInventoryAllotments.contractId],
|
|
65
|
+
references: [channelContracts.id],
|
|
66
|
+
}),
|
|
67
|
+
product: one(products, {
|
|
68
|
+
fields: [channelInventoryAllotments.productId],
|
|
69
|
+
references: [products.id],
|
|
70
|
+
}),
|
|
71
|
+
option: one(productOptions, {
|
|
72
|
+
fields: [channelInventoryAllotments.optionId],
|
|
73
|
+
references: [productOptions.id],
|
|
74
|
+
}),
|
|
75
|
+
startTime: one(availabilityStartTimes, {
|
|
76
|
+
fields: [channelInventoryAllotments.startTimeId],
|
|
77
|
+
references: [availabilityStartTimes.id],
|
|
78
|
+
}),
|
|
79
|
+
targets: many(channelInventoryAllotmentTargets),
|
|
80
|
+
releaseRules: many(channelInventoryReleaseRules),
|
|
81
|
+
releaseExecutions: many(channelInventoryReleaseExecutions),
|
|
82
|
+
}));
|
|
83
|
+
export const channelInventoryAllotmentTargetsRelations = relations(channelInventoryAllotmentTargets, ({ one }) => ({
|
|
84
|
+
allotment: one(channelInventoryAllotments, {
|
|
85
|
+
fields: [channelInventoryAllotmentTargets.allotmentId],
|
|
86
|
+
references: [channelInventoryAllotments.id],
|
|
87
|
+
}),
|
|
88
|
+
slot: one(availabilitySlots, {
|
|
89
|
+
fields: [channelInventoryAllotmentTargets.slotId],
|
|
90
|
+
references: [availabilitySlots.id],
|
|
91
|
+
}),
|
|
92
|
+
startTime: one(availabilityStartTimes, {
|
|
93
|
+
fields: [channelInventoryAllotmentTargets.startTimeId],
|
|
94
|
+
references: [availabilityStartTimes.id],
|
|
95
|
+
}),
|
|
96
|
+
}));
|
|
97
|
+
export const channelInventoryReleaseRulesRelations = relations(channelInventoryReleaseRules, ({ one, many }) => ({
|
|
98
|
+
allotment: one(channelInventoryAllotments, {
|
|
99
|
+
fields: [channelInventoryReleaseRules.allotmentId],
|
|
100
|
+
references: [channelInventoryAllotments.id],
|
|
101
|
+
}),
|
|
102
|
+
schedules: many(channelReleaseSchedules),
|
|
103
|
+
}));
|
|
104
|
+
export const channelSettlementRunsRelations = relations(channelSettlementRuns, ({ one, many }) => ({
|
|
105
|
+
channel: one(channels, {
|
|
106
|
+
fields: [channelSettlementRuns.channelId],
|
|
107
|
+
references: [channels.id],
|
|
108
|
+
}),
|
|
109
|
+
contract: one(channelContracts, {
|
|
110
|
+
fields: [channelSettlementRuns.contractId],
|
|
111
|
+
references: [channelContracts.id],
|
|
112
|
+
}),
|
|
113
|
+
items: many(channelSettlementItems),
|
|
114
|
+
approvals: many(channelSettlementApprovals),
|
|
115
|
+
}));
|
|
116
|
+
export const channelSettlementItemsRelations = relations(channelSettlementItems, ({ one }) => ({
|
|
117
|
+
settlementRun: one(channelSettlementRuns, {
|
|
118
|
+
fields: [channelSettlementItems.settlementRunId],
|
|
119
|
+
references: [channelSettlementRuns.id],
|
|
120
|
+
}),
|
|
121
|
+
bookingLink: one(channelBookingLinks, {
|
|
122
|
+
fields: [channelSettlementItems.bookingLinkId],
|
|
123
|
+
references: [channelBookingLinks.id],
|
|
124
|
+
}),
|
|
125
|
+
commissionRule: one(channelCommissionRules, {
|
|
126
|
+
fields: [channelSettlementItems.commissionRuleId],
|
|
127
|
+
references: [channelCommissionRules.id],
|
|
128
|
+
}),
|
|
129
|
+
}));
|
|
130
|
+
export const channelReconciliationRunsRelations = relations(channelReconciliationRuns, ({ one, many }) => ({
|
|
131
|
+
channel: one(channels, {
|
|
132
|
+
fields: [channelReconciliationRuns.channelId],
|
|
133
|
+
references: [channels.id],
|
|
134
|
+
}),
|
|
135
|
+
contract: one(channelContracts, {
|
|
136
|
+
fields: [channelReconciliationRuns.contractId],
|
|
137
|
+
references: [channelContracts.id],
|
|
138
|
+
}),
|
|
139
|
+
items: many(channelReconciliationItems),
|
|
140
|
+
}));
|
|
141
|
+
export const channelReconciliationItemsRelations = relations(channelReconciliationItems, ({ one }) => ({
|
|
142
|
+
reconciliationRun: one(channelReconciliationRuns, {
|
|
143
|
+
fields: [channelReconciliationItems.reconciliationRunId],
|
|
144
|
+
references: [channelReconciliationRuns.id],
|
|
145
|
+
}),
|
|
146
|
+
bookingLink: one(channelBookingLinks, {
|
|
147
|
+
fields: [channelReconciliationItems.bookingLinkId],
|
|
148
|
+
references: [channelBookingLinks.id],
|
|
149
|
+
}),
|
|
150
|
+
}));
|
|
151
|
+
export const channelInventoryReleaseExecutionsRelations = relations(channelInventoryReleaseExecutions, ({ one }) => ({
|
|
152
|
+
allotment: one(channelInventoryAllotments, {
|
|
153
|
+
fields: [channelInventoryReleaseExecutions.allotmentId],
|
|
154
|
+
references: [channelInventoryAllotments.id],
|
|
155
|
+
}),
|
|
156
|
+
releaseRule: one(channelInventoryReleaseRules, {
|
|
157
|
+
fields: [channelInventoryReleaseExecutions.releaseRuleId],
|
|
158
|
+
references: [channelInventoryReleaseRules.id],
|
|
159
|
+
}),
|
|
160
|
+
target: one(channelInventoryAllotmentTargets, {
|
|
161
|
+
fields: [channelInventoryReleaseExecutions.targetId],
|
|
162
|
+
references: [channelInventoryAllotmentTargets.id],
|
|
163
|
+
}),
|
|
164
|
+
slot: one(availabilitySlots, {
|
|
165
|
+
fields: [channelInventoryReleaseExecutions.slotId],
|
|
166
|
+
references: [availabilitySlots.id],
|
|
167
|
+
}),
|
|
168
|
+
}));
|
|
169
|
+
export const channelSettlementPoliciesRelations = relations(channelSettlementPolicies, ({ one }) => ({
|
|
170
|
+
channel: one(channels, {
|
|
171
|
+
fields: [channelSettlementPolicies.channelId],
|
|
172
|
+
references: [channels.id],
|
|
173
|
+
}),
|
|
174
|
+
contract: one(channelContracts, {
|
|
175
|
+
fields: [channelSettlementPolicies.contractId],
|
|
176
|
+
references: [channelContracts.id],
|
|
177
|
+
}),
|
|
178
|
+
}));
|
|
179
|
+
export const channelReconciliationPoliciesRelations = relations(channelReconciliationPolicies, ({ one }) => ({
|
|
180
|
+
channel: one(channels, {
|
|
181
|
+
fields: [channelReconciliationPolicies.channelId],
|
|
182
|
+
references: [channels.id],
|
|
183
|
+
}),
|
|
184
|
+
contract: one(channelContracts, {
|
|
185
|
+
fields: [channelReconciliationPolicies.contractId],
|
|
186
|
+
references: [channelContracts.id],
|
|
187
|
+
}),
|
|
188
|
+
}));
|
|
189
|
+
export const channelReleaseSchedulesRelations = relations(channelReleaseSchedules, ({ one }) => ({
|
|
190
|
+
releaseRule: one(channelInventoryReleaseRules, {
|
|
191
|
+
fields: [channelReleaseSchedules.releaseRuleId],
|
|
192
|
+
references: [channelInventoryReleaseRules.id],
|
|
193
|
+
}),
|
|
194
|
+
}));
|
|
195
|
+
export const channelRemittanceExceptionsRelations = relations(channelRemittanceExceptions, ({ one }) => ({
|
|
196
|
+
channel: one(channels, {
|
|
197
|
+
fields: [channelRemittanceExceptions.channelId],
|
|
198
|
+
references: [channels.id],
|
|
199
|
+
}),
|
|
200
|
+
settlementItem: one(channelSettlementItems, {
|
|
201
|
+
fields: [channelRemittanceExceptions.settlementItemId],
|
|
202
|
+
references: [channelSettlementItems.id],
|
|
203
|
+
}),
|
|
204
|
+
reconciliationItem: one(channelReconciliationItems, {
|
|
205
|
+
fields: [channelRemittanceExceptions.reconciliationItemId],
|
|
206
|
+
references: [channelReconciliationItems.id],
|
|
207
|
+
}),
|
|
208
|
+
}));
|
|
209
|
+
export const channelSettlementApprovalsRelations = relations(channelSettlementApprovals, ({ one }) => ({
|
|
210
|
+
settlementRun: one(channelSettlementRuns, {
|
|
211
|
+
fields: [channelSettlementApprovals.settlementRunId],
|
|
212
|
+
references: [channelSettlementRuns.id],
|
|
213
|
+
}),
|
|
214
|
+
}));
|
|
215
|
+
export const channelWebhookEventsRelations = relations(channelWebhookEvents, ({ one }) => ({
|
|
216
|
+
channel: one(channels, {
|
|
217
|
+
fields: [channelWebhookEvents.channelId],
|
|
218
|
+
references: [channels.id],
|
|
219
|
+
}),
|
|
220
|
+
}));
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare const channelKindEnum: import("drizzle-orm/pg-core").PgEnum<["direct", "affiliate", "ota", "reseller", "marketplace", "api_partner"]>;
|
|
2
|
+
export declare const channelStatusEnum: import("drizzle-orm/pg-core").PgEnum<["active", "inactive", "pending", "archived"]>;
|
|
3
|
+
export declare const channelContractStatusEnum: import("drizzle-orm/pg-core").PgEnum<["draft", "active", "expired", "terminated"]>;
|
|
4
|
+
export declare const distributionPaymentOwnerEnum: import("drizzle-orm/pg-core").PgEnum<["operator", "channel", "split"]>;
|
|
5
|
+
export declare const distributionCancellationOwnerEnum: import("drizzle-orm/pg-core").PgEnum<["operator", "channel", "mixed"]>;
|
|
6
|
+
export declare const channelCommissionScopeEnum: import("drizzle-orm/pg-core").PgEnum<["booking", "product", "rate", "category"]>;
|
|
7
|
+
export declare const channelCommissionTypeEnum: import("drizzle-orm/pg-core").PgEnum<["fixed", "percentage"]>;
|
|
8
|
+
export declare const channelWebhookStatusEnum: import("drizzle-orm/pg-core").PgEnum<["pending", "processed", "failed", "ignored"]>;
|
|
9
|
+
export declare const channelAllotmentReleaseModeEnum: import("drizzle-orm/pg-core").PgEnum<["automatic", "manual"]>;
|
|
10
|
+
export declare const channelAllotmentUnsoldActionEnum: import("drizzle-orm/pg-core").PgEnum<["release_to_general_pool", "expire", "retain"]>;
|
|
11
|
+
export declare const channelSettlementRunStatusEnum: import("drizzle-orm/pg-core").PgEnum<["draft", "open", "posted", "paid", "void"]>;
|
|
12
|
+
export declare const channelSettlementItemStatusEnum: import("drizzle-orm/pg-core").PgEnum<["pending", "approved", "disputed", "paid", "void"]>;
|
|
13
|
+
export declare const channelReconciliationRunStatusEnum: import("drizzle-orm/pg-core").PgEnum<["draft", "running", "completed", "archived"]>;
|
|
14
|
+
export declare const channelReconciliationIssueTypeEnum: import("drizzle-orm/pg-core").PgEnum<["missing_booking", "status_mismatch", "amount_mismatch", "cancel_mismatch", "missing_payout", "other"]>;
|
|
15
|
+
export declare const channelReconciliationSeverityEnum: import("drizzle-orm/pg-core").PgEnum<["info", "warning", "error"]>;
|
|
16
|
+
export declare const channelReconciliationResolutionStatusEnum: import("drizzle-orm/pg-core").PgEnum<["open", "ignored", "resolved"]>;
|
|
17
|
+
export declare const channelReleaseExecutionStatusEnum: import("drizzle-orm/pg-core").PgEnum<["pending", "completed", "skipped", "failed"]>;
|
|
18
|
+
export declare const channelReleaseExecutionActionEnum: import("drizzle-orm/pg-core").PgEnum<["released", "expired", "retained", "manual_override"]>;
|
|
19
|
+
export declare const channelSettlementPolicyFrequencyEnum: import("drizzle-orm/pg-core").PgEnum<["manual", "daily", "weekly", "monthly"]>;
|
|
20
|
+
export declare const channelReconciliationPolicyFrequencyEnum: import("drizzle-orm/pg-core").PgEnum<["manual", "daily", "weekly", "monthly"]>;
|
|
21
|
+
export declare const channelReleaseScheduleKindEnum: import("drizzle-orm/pg-core").PgEnum<["manual", "hourly", "daily"]>;
|
|
22
|
+
export declare const channelRemittanceExceptionStatusEnum: import("drizzle-orm/pg-core").PgEnum<["open", "investigating", "resolved", "ignored"]>;
|
|
23
|
+
export declare const channelSettlementApprovalStatusEnum: import("drizzle-orm/pg-core").PgEnum<["pending", "approved", "rejected"]>;
|
|
24
|
+
//# sourceMappingURL=schema-shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-shared.d.ts","sourceRoot":"","sources":["../src/schema-shared.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,gHAO1B,CAAA;AAEF,eAAO,MAAM,iBAAiB,qFAK5B,CAAA;AAEF,eAAO,MAAM,yBAAyB,oFAKpC,CAAA;AAEF,eAAO,MAAM,4BAA4B,wEAIvC,CAAA;AAEF,eAAO,MAAM,iCAAiC,wEAI5C,CAAA;AAEF,eAAO,MAAM,0BAA0B,kFAKrC,CAAA;AAEF,eAAO,MAAM,yBAAyB,+DAA6D,CAAA;AAEnG,eAAO,MAAM,wBAAwB,qFAKnC,CAAA;AAEF,eAAO,MAAM,+BAA+B,+DAG1C,CAAA;AAEF,eAAO,MAAM,gCAAgC,uFAI3C,CAAA;AAEF,eAAO,MAAM,8BAA8B,mFAMzC,CAAA;AAEF,eAAO,MAAM,+BAA+B,2FAM1C,CAAA;AAEF,eAAO,MAAM,kCAAkC,qFAK7C,CAAA;AAEF,eAAO,MAAM,kCAAkC,+IAO7C,CAAA;AAEF,eAAO,MAAM,iCAAiC,oEAI5C,CAAA;AAEF,eAAO,MAAM,yCAAyC,uEAGrD,CAAA;AAED,eAAO,MAAM,iCAAiC,qFAK5C,CAAA;AAEF,eAAO,MAAM,iCAAiC,8FAK5C,CAAA;AAEF,eAAO,MAAM,oCAAoC,gFAK/C,CAAA;AAEF,eAAO,MAAM,wCAAwC,gFAGpD,CAAA;AAED,eAAO,MAAM,8BAA8B,qEAIzC,CAAA;AAEF,eAAO,MAAM,oCAAoC,wFAK/C,CAAA;AAEF,eAAO,MAAM,mCAAmC,2EAI9C,CAAA"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { pgEnum } from "drizzle-orm/pg-core";
|
|
2
|
+
export const channelKindEnum = pgEnum("channel_kind", [
|
|
3
|
+
"direct",
|
|
4
|
+
"affiliate",
|
|
5
|
+
"ota",
|
|
6
|
+
"reseller",
|
|
7
|
+
"marketplace",
|
|
8
|
+
"api_partner",
|
|
9
|
+
]);
|
|
10
|
+
export const channelStatusEnum = pgEnum("channel_status", [
|
|
11
|
+
"active",
|
|
12
|
+
"inactive",
|
|
13
|
+
"pending",
|
|
14
|
+
"archived",
|
|
15
|
+
]);
|
|
16
|
+
export const channelContractStatusEnum = pgEnum("channel_contract_status", [
|
|
17
|
+
"draft",
|
|
18
|
+
"active",
|
|
19
|
+
"expired",
|
|
20
|
+
"terminated",
|
|
21
|
+
]);
|
|
22
|
+
export const distributionPaymentOwnerEnum = pgEnum("distribution_payment_owner", [
|
|
23
|
+
"operator",
|
|
24
|
+
"channel",
|
|
25
|
+
"split",
|
|
26
|
+
]);
|
|
27
|
+
export const distributionCancellationOwnerEnum = pgEnum("distribution_cancellation_owner", [
|
|
28
|
+
"operator",
|
|
29
|
+
"channel",
|
|
30
|
+
"mixed",
|
|
31
|
+
]);
|
|
32
|
+
export const channelCommissionScopeEnum = pgEnum("channel_commission_scope", [
|
|
33
|
+
"booking",
|
|
34
|
+
"product",
|
|
35
|
+
"rate",
|
|
36
|
+
"category",
|
|
37
|
+
]);
|
|
38
|
+
export const channelCommissionTypeEnum = pgEnum("channel_commission_type", ["fixed", "percentage"]);
|
|
39
|
+
export const channelWebhookStatusEnum = pgEnum("channel_webhook_status", [
|
|
40
|
+
"pending",
|
|
41
|
+
"processed",
|
|
42
|
+
"failed",
|
|
43
|
+
"ignored",
|
|
44
|
+
]);
|
|
45
|
+
export const channelAllotmentReleaseModeEnum = pgEnum("channel_allotment_release_mode", [
|
|
46
|
+
"automatic",
|
|
47
|
+
"manual",
|
|
48
|
+
]);
|
|
49
|
+
export const channelAllotmentUnsoldActionEnum = pgEnum("channel_allotment_unsold_action", [
|
|
50
|
+
"release_to_general_pool",
|
|
51
|
+
"expire",
|
|
52
|
+
"retain",
|
|
53
|
+
]);
|
|
54
|
+
export const channelSettlementRunStatusEnum = pgEnum("channel_settlement_run_status", [
|
|
55
|
+
"draft",
|
|
56
|
+
"open",
|
|
57
|
+
"posted",
|
|
58
|
+
"paid",
|
|
59
|
+
"void",
|
|
60
|
+
]);
|
|
61
|
+
export const channelSettlementItemStatusEnum = pgEnum("channel_settlement_item_status", [
|
|
62
|
+
"pending",
|
|
63
|
+
"approved",
|
|
64
|
+
"disputed",
|
|
65
|
+
"paid",
|
|
66
|
+
"void",
|
|
67
|
+
]);
|
|
68
|
+
export const channelReconciliationRunStatusEnum = pgEnum("channel_reconciliation_run_status", [
|
|
69
|
+
"draft",
|
|
70
|
+
"running",
|
|
71
|
+
"completed",
|
|
72
|
+
"archived",
|
|
73
|
+
]);
|
|
74
|
+
export const channelReconciliationIssueTypeEnum = pgEnum("channel_reconciliation_issue_type", [
|
|
75
|
+
"missing_booking",
|
|
76
|
+
"status_mismatch",
|
|
77
|
+
"amount_mismatch",
|
|
78
|
+
"cancel_mismatch",
|
|
79
|
+
"missing_payout",
|
|
80
|
+
"other",
|
|
81
|
+
]);
|
|
82
|
+
export const channelReconciliationSeverityEnum = pgEnum("channel_reconciliation_severity", [
|
|
83
|
+
"info",
|
|
84
|
+
"warning",
|
|
85
|
+
"error",
|
|
86
|
+
]);
|
|
87
|
+
export const channelReconciliationResolutionStatusEnum = pgEnum("channel_reconciliation_resolution_status", ["open", "ignored", "resolved"]);
|
|
88
|
+
export const channelReleaseExecutionStatusEnum = pgEnum("channel_release_execution_status", [
|
|
89
|
+
"pending",
|
|
90
|
+
"completed",
|
|
91
|
+
"skipped",
|
|
92
|
+
"failed",
|
|
93
|
+
]);
|
|
94
|
+
export const channelReleaseExecutionActionEnum = pgEnum("channel_release_execution_action", [
|
|
95
|
+
"released",
|
|
96
|
+
"expired",
|
|
97
|
+
"retained",
|
|
98
|
+
"manual_override",
|
|
99
|
+
]);
|
|
100
|
+
export const channelSettlementPolicyFrequencyEnum = pgEnum("channel_settlement_policy_frequency", [
|
|
101
|
+
"manual",
|
|
102
|
+
"daily",
|
|
103
|
+
"weekly",
|
|
104
|
+
"monthly",
|
|
105
|
+
]);
|
|
106
|
+
export const channelReconciliationPolicyFrequencyEnum = pgEnum("channel_reconciliation_policy_frequency", ["manual", "daily", "weekly", "monthly"]);
|
|
107
|
+
export const channelReleaseScheduleKindEnum = pgEnum("channel_release_schedule_kind", [
|
|
108
|
+
"manual",
|
|
109
|
+
"hourly",
|
|
110
|
+
"daily",
|
|
111
|
+
]);
|
|
112
|
+
export const channelRemittanceExceptionStatusEnum = pgEnum("channel_remittance_exception_status", [
|
|
113
|
+
"open",
|
|
114
|
+
"investigating",
|
|
115
|
+
"resolved",
|
|
116
|
+
"ignored",
|
|
117
|
+
]);
|
|
118
|
+
export const channelSettlementApprovalStatusEnum = pgEnum("channel_settlement_approval_status", [
|
|
119
|
+
"pending",
|
|
120
|
+
"approved",
|
|
121
|
+
"rejected",
|
|
122
|
+
]);
|