@voyant-travel/mice 0.7.4 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ import { OpenAPIHono } from "@hono/zod-openapi";
1
2
  import type { HonoExtension } from "@voyant-travel/hono/module";
2
3
  import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
3
4
  import { z } from "zod";
@@ -125,6 +126,14 @@ export declare const miceBookingExtensionService: {
125
126
  bookingId: string;
126
127
  } | null>;
127
128
  };
129
+ type Env = {
130
+ Variables: {
131
+ db: PostgresJsDatabase;
132
+ userId?: string;
133
+ };
134
+ };
135
+ export declare const MICE_BOOKING_OPENAPI_API_ID = "@voyant-travel/mice#booking-extension.api.admin";
136
+ export declare const miceBookingExtensionRoutes: OpenAPIHono<Env, {}, "/">;
128
137
  export declare const miceBookingExtension: HonoExtension;
129
138
  export {};
130
139
  //# sourceMappingURL=booking-extension.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"booking-extension.d.ts","sourceRoot":"","sources":["../src/booking-extension.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAG/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAU9B,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,OAAO,kBAAkB,CAAC,YAAY,CAAA;AACtE,MAAM,MAAM,oBAAoB,GAAG,OAAO,kBAAkB,CAAC,YAAY,CAAA;AAEzE,QAAA,MAAM,uBAAuB;;;iBAG3B,CAAA;AAEF,eAAO,MAAM,2BAA2B;mBAC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AAyB,CAAA;AA4ChE,eAAO,MAAM,oBAAoB,EAAE,aAGlC,CAAA"}
@@ -1,7 +1,7 @@
1
+ import { OpenAPIHono } from "@hono/zod-openapi";
1
2
  import { parseJsonBody } from "@voyant-travel/hono";
2
3
  import { eq } from "drizzle-orm";
3
4
  import { index, pgTable, text, timestamp } from "drizzle-orm/pg-core";
4
- import { Hono } from "hono";
5
5
  import { z } from "zod";
6
6
  /**
7
7
  * MICE booking extension — a 1:1 sidecar that links a booking to its program +
@@ -57,7 +57,9 @@ export const miceBookingExtensionService = {
57
57
  return row ?? null;
58
58
  },
59
59
  };
60
- const miceBookingExtensionRoutes = new Hono()
60
+ export const MICE_BOOKING_OPENAPI_API_ID = "@voyant-travel/mice#booking-extension.api.admin";
61
+ export const miceBookingExtensionRoutes = new OpenAPIHono();
62
+ miceBookingExtensionRoutes
61
63
  .get("/:bookingId/mice-details", async (c) => {
62
64
  const row = await miceBookingExtensionService.getDetails(c.get("db"), c.req.param("bookingId"));
63
65
  return c.json({ data: row });
@@ -73,6 +75,18 @@ const miceBookingExtensionRoutes = new Hono()
73
75
  return c.json({ error: "Not found" }, 404);
74
76
  return c.json({ success: true });
75
77
  });
78
+ for (const [method, path] of [
79
+ ["get", "/{bookingId}/mice-details"],
80
+ ["put", "/{bookingId}/mice-details"],
81
+ ["delete", "/{bookingId}/mice-details"],
82
+ ]) {
83
+ miceBookingExtensionRoutes.openAPIRegistry.registerPath({
84
+ method,
85
+ path,
86
+ responses: { 200: { description: "MICE booking detail response." } },
87
+ "x-voyant-api-id": MICE_BOOKING_OPENAPI_API_ID,
88
+ });
89
+ }
76
90
  const miceBookingExtensionDef = {
77
91
  name: "mice-booking",
78
92
  module: "bookings",
package/dist/index.d.ts CHANGED
@@ -11,6 +11,10 @@ export declare const miceModule: Module;
11
11
  export interface MiceHonoModuleOptions extends MiceRouteRuntimeOptions {
12
12
  }
13
13
  export declare function createMiceHonoModule(options?: MiceHonoModuleOptions): HonoModule;
14
+ /** Package-owned adapter from graph runtime ports to the MICE route factory. */
15
+ export declare const createMiceVoyantRuntime: import("@voyant-travel/core/project").VoyantGraphRuntimeFactory<HonoModule>;
16
+ export type { MiceRuntime } from "./runtime-port.js";
17
+ export { miceRuntimePort } from "./runtime-port.js";
14
18
  export declare const miceHonoModule: HonoModule;
15
19
  export declare const miceHonoModules: readonly [HonoModule];
16
20
  export type { MiceRouteRuntime, MiceRouteRuntimeOptions, ResolveMiceDelegatePersonById, } from "./route-runtime.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAG5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAA;AAGjE;;;;GAIG;AACH,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,WAAW,EACX,yBAAyB,EACzB,eAAe,GAChB,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,UAAU,EAAE,MAMxB,CAAA;AAED,MAAM,WAAW,qBAAsB,SAAQ,uBAAuB;CAAG;AAEzE,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,qBAA0B,GAAG,UAAU,CAKpF;AAED,eAAO,MAAM,cAAc,EAAE,UAAmC,CAAA;AAEhE,eAAO,MAAM,eAAe,uBAA4B,CAAA;AAExD,YAAY,EACV,gBAAgB,EAChB,uBAAuB,EACvB,6BAA6B,GAC9B,MAAM,oBAAoB,CAAA;AAC3B,YAAY,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAClD,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AACpE,cAAc,aAAa,CAAA;AAC3B,cAAc,cAAc,CAAA;AAC5B,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;A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A;AAC5B,cAAc,0BAA0B,CAAA;AACxC,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,sBAAsB,CAAA;AACpC,cAAc,uBAAuB,CAAA;AACrC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,2BAA2B,CAAA;AACzC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA"}
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
+ import { defineGraphRuntimeFactory } from "@voyant-travel/core/project";
1
2
  import { miceLinkable } from "./linkables.js";
2
3
  import { createMiceAdminRoutes } from "./routes.js";
4
+ import { miceRuntimePort } from "./runtime-port.js";
3
5
  /**
4
6
  * The MICE spine is operator-local (niche) — registered in the deployment, NOT
5
7
  * the framework standard set. The allotment primitives it links to (room
@@ -19,6 +21,9 @@ export function createMiceHonoModule(options = {}) {
19
21
  adminRoutes: createMiceAdminRoutes(options),
20
22
  };
21
23
  }
24
+ /** Package-owned adapter from graph runtime ports to the MICE route factory. */
25
+ export const createMiceVoyantRuntime = defineGraphRuntimeFactory(async ({ getPort }) => createMiceHonoModule(await getPort(miceRuntimePort)));
26
+ export { miceRuntimePort } from "./runtime-port.js";
22
27
  export const miceHonoModule = createMiceHonoModule();
23
28
  export const miceHonoModules = [miceHonoModule];
24
29
  export { createMiceAdminRoutes, miceAdminRoutes } from "./routes.js";
@@ -0,0 +1,7 @@
1
+ import type { VoyantPort } from "@voyant-travel/core/project";
2
+ export interface MiceRuntimeContributorHost {
3
+ getRuntimePort<T>(port: Pick<VoyantPort<T>, "id">): T | Promise<T>;
4
+ }
5
+ /** Package-owned registration map for MICE deployment adapters. */
6
+ export declare function createMiceRuntimePortContribution(host: MiceRuntimeContributorHost): Readonly<Record<string, unknown>>;
7
+ //# sourceMappingURL=runtime-contributor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-contributor.d.ts","sourceRoot":"","sources":["../src/runtime-contributor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAO7D,MAAM,WAAW,0BAA0B;IACzC,cAAc,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;CACnE;AAED,mEAAmE;AACnE,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,0BAA0B,GAC/B,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CASnC"}
@@ -0,0 +1,11 @@
1
+ import { relationshipsMiceRuntimePort, } from "@voyant-travel/relationships/voyant";
2
+ import { miceRuntimePort } from "./runtime-port.js";
3
+ /** Package-owned registration map for MICE deployment adapters. */
4
+ export function createMiceRuntimePortContribution(host) {
5
+ const mice = Promise.resolve()
6
+ .then(() => host.getRuntimePort(relationshipsMiceRuntimePort))
7
+ .then((relationships) => ({
8
+ resolveDelegatePersonById: (db, personId) => relationships.personExists(db, personId),
9
+ }));
10
+ return { [miceRuntimePort.id]: mice };
11
+ }
@@ -0,0 +1,7 @@
1
+ import type { ResolveMiceDelegatePersonById } from "./route-runtime.js";
2
+ /** Node-host behavior required by the package-owned MICE runtime factory. */
3
+ export interface MiceRuntime {
4
+ resolveDelegatePersonById: ResolveMiceDelegatePersonById;
5
+ }
6
+ export declare const miceRuntimePort: import("@voyant-travel/core/project").VoyantPort<MiceRuntime>;
7
+ //# sourceMappingURL=runtime-port.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime-port.d.ts","sourceRoot":"","sources":["../src/runtime-port.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAEvE,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC1B,yBAAyB,EAAE,6BAA6B,CAAA;CACzD;AAED,eAAO,MAAM,eAAe,+DAU1B,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { definePort } from "@voyant-travel/core/project";
2
+ export const miceRuntimePort = definePort({
3
+ id: "mice.runtime",
4
+ test(provider) {
5
+ if (provider === null || typeof provider !== "object") {
6
+ throw new Error("mice.runtime provider must be an options object.");
7
+ }
8
+ if (typeof provider.resolveDelegatePersonById !== "function") {
9
+ throw new Error("mice.runtime provider must implement resolveDelegatePersonById().");
10
+ }
11
+ },
12
+ });
@@ -0,0 +1,9 @@
1
+ export declare const bidSupplierLink: import("@voyant-travel/core").LinkDefinition;
2
+ export declare const delegateBookingLink: import("@voyant-travel/core").LinkDefinition;
3
+ export declare const delegatePersonLink: import("@voyant-travel/core").LinkDefinition;
4
+ export declare const organizationProgramLink: import("@voyant-travel/core").LinkDefinition;
5
+ export declare const programSpaceBlockLink: import("@voyant-travel/core").LinkDefinition;
6
+ export declare const quoteProgramLink: import("@voyant-travel/core").LinkDefinition;
7
+ export declare const roomingRoomBlockLink: import("@voyant-travel/core").LinkDefinition;
8
+ export declare const sessionFunctionSpaceLink: import("@voyant-travel/core").LinkDefinition;
9
+ //# sourceMappingURL=standard-links.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"standard-links.d.ts","sourceRoot":"","sources":["../src/standard-links.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,eAAe,8CAG1B,CAAA;AAEF,eAAO,MAAM,mBAAmB,8CAE9B,CAAA;AAEF,eAAO,MAAM,kBAAkB,8CAG7B,CAAA;AAEF,eAAO,MAAM,uBAAuB,8CAGlC,CAAA;AAEF,eAAO,MAAM,qBAAqB,8CAGhC,CAAA;AAEF,eAAO,MAAM,gBAAgB,8CAE3B,CAAA;AAEF,eAAO,MAAM,oBAAoB,8CAG/B,CAAA;AAEF,eAAO,MAAM,wBAAwB,8CAGnC,CAAA"}
@@ -0,0 +1,38 @@
1
+ import { roomBlockLinkable } from "@voyant-travel/accommodations/linkables";
2
+ import { bookingLinkable } from "@voyant-travel/bookings/linkables";
3
+ import { defineLink } from "@voyant-travel/core";
4
+ import { supplierLinkable } from "@voyant-travel/distribution/linkables";
5
+ import { functionSpaceLinkable, spaceBlockLinkable } from "@voyant-travel/operations/linkables";
6
+ import { quoteLinkable } from "@voyant-travel/quotes/linkables";
7
+ import { organizationLinkable, personLinkable } from "@voyant-travel/relationships/linkables";
8
+ import { bidLinkable, delegateLinkable, programLinkable, roomingAssignmentLinkable, sessionLinkable, } from "./linkables.js";
9
+ export const bidSupplierLink = defineLink(supplierLinkable, {
10
+ linkable: bidLinkable,
11
+ isList: true,
12
+ });
13
+ export const delegateBookingLink = defineLink(bookingLinkable, {
14
+ linkable: delegateLinkable,
15
+ });
16
+ export const delegatePersonLink = defineLink(personLinkable, {
17
+ linkable: delegateLinkable,
18
+ isList: true,
19
+ });
20
+ export const organizationProgramLink = defineLink(organizationLinkable, {
21
+ linkable: programLinkable,
22
+ isList: true,
23
+ });
24
+ export const programSpaceBlockLink = defineLink(programLinkable, {
25
+ linkable: spaceBlockLinkable,
26
+ isList: true,
27
+ });
28
+ export const quoteProgramLink = defineLink(quoteLinkable, {
29
+ linkable: programLinkable,
30
+ });
31
+ export const roomingRoomBlockLink = defineLink(roomBlockLinkable, {
32
+ linkable: roomingAssignmentLinkable,
33
+ isList: true,
34
+ });
35
+ export const sessionFunctionSpaceLink = defineLink(functionSpaceLinkable, {
36
+ linkable: sessionLinkable,
37
+ isList: true,
38
+ });
@@ -28,13 +28,13 @@ export declare const createRfpSchema: z.ZodObject<{
28
28
  }>>;
29
29
  }, z.core.$strip>;
30
30
  export declare const updateRfpSchema: z.ZodObject<{
31
- title: z.ZodOptional<z.ZodString>;
32
31
  status: z.ZodOptional<z.ZodEnum<{
33
32
  cancelled: "cancelled";
34
33
  draft: "draft";
35
34
  issued: "issued";
36
35
  closed: "closed";
37
36
  }>>;
37
+ title: z.ZodOptional<z.ZodString>;
38
38
  notes: z.ZodOptional<z.ZodOptional<z.ZodString>>;
39
39
  requirements: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
40
40
  issuedAt: z.ZodOptional<z.ZodOptional<z.ZodString>>;
package/dist/voyant.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  /** Import-cheap deployment declarations owned by the MICE package. */
2
2
  export declare const miceVoyantModule: import("@voyant-travel/core").VoyantGraphUnitManifest;
3
3
  export declare const miceBookingVoyantPlugin: import("@voyant-travel/core").VoyantGraphUnitManifest;
4
+ /** Neutral association selected explicitly by the standard product BOM. */
5
+ export declare const miceStandardProductLinksVoyantExtension: import("@voyant-travel/core").VoyantGraphUnitManifest;
4
6
  export default miceVoyantModule;
5
7
  //# sourceMappingURL=voyant.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"voyant.d.ts","sourceRoot":"","sources":["../src/voyant.ts"],"names":[],"mappings":"AAEA,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,uDAuE3B,CAAA;AAEF,eAAO,MAAM,uBAAuB,uDAkBlC,CAAA;AAEF,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"voyant.d.ts","sourceRoot":"","sources":["../src/voyant.ts"],"names":[],"mappings":"AAKA,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,uDAqH3B,CAAA;AAEF,eAAO,MAAM,uBAAuB,uDAmBlC,CAAA;AAEF,2EAA2E;AAC3E,eAAO,MAAM,uCAAuC,uDAYlD,CAAA;AAEF,eAAe,gBAAgB,CAAA"}
package/dist/voyant.js CHANGED
@@ -1,18 +1,22 @@
1
- import { defineExtension, defineModule } from "@voyant-travel/core/project";
1
+ import { defineExtension, defineModule, requirePort } from "@voyant-travel/core/project";
2
+ import { miceRuntimePort } from "./runtime-port.js";
3
+ const relationshipsMiceRuntimePortReference = { id: "relationships.mice.runtime" };
2
4
  /** Import-cheap deployment declarations owned by the MICE package. */
3
5
  export const miceVoyantModule = defineModule({
4
6
  id: "@voyant-travel/mice",
5
7
  packageName: "@voyant-travel/mice",
6
8
  localId: "mice",
9
+ runtimePorts: [requirePort(miceRuntimePort), relationshipsMiceRuntimePortReference],
7
10
  api: [
8
11
  {
9
12
  id: "@voyant-travel/mice#api.admin",
10
13
  surface: "admin",
11
14
  mount: "mice",
15
+ openapi: { document: "mice" },
12
16
  transactional: true,
13
17
  runtime: {
14
18
  entry: "@voyant-travel/mice",
15
- export: "createMiceHonoModule",
19
+ export: "createMiceVoyantRuntime",
16
20
  },
17
21
  },
18
22
  ],
@@ -38,21 +42,65 @@ export const miceVoyantModule = defineModule({
38
42
  },
39
43
  { id: "@voyant-travel/mice#linkable.rfp", source: "@voyant-travel/mice/linkables" },
40
44
  { id: "@voyant-travel/mice#linkable.bid", source: "@voyant-travel/mice/linkables" },
45
+ {
46
+ id: "@voyant-travel/mice#link.bid-supplier",
47
+ source: "@voyant-travel/mice/standard-links",
48
+ export: "bidSupplierLink",
49
+ },
50
+ {
51
+ id: "@voyant-travel/mice#link.delegate-booking",
52
+ source: "@voyant-travel/mice/standard-links",
53
+ export: "delegateBookingLink",
54
+ },
55
+ {
56
+ id: "@voyant-travel/mice#link.delegate-person",
57
+ source: "@voyant-travel/mice/standard-links",
58
+ export: "delegatePersonLink",
59
+ },
60
+ {
61
+ id: "@voyant-travel/mice#link.organization-program",
62
+ source: "@voyant-travel/mice/standard-links",
63
+ export: "organizationProgramLink",
64
+ },
65
+ {
66
+ id: "@voyant-travel/mice#link.program-space-block",
67
+ source: "@voyant-travel/mice/standard-links",
68
+ export: "programSpaceBlockLink",
69
+ },
70
+ {
71
+ id: "@voyant-travel/mice#link.rooming-room-block",
72
+ source: "@voyant-travel/mice/standard-links",
73
+ export: "roomingRoomBlockLink",
74
+ },
75
+ {
76
+ id: "@voyant-travel/mice#link.session-function-space",
77
+ source: "@voyant-travel/mice/standard-links",
78
+ export: "sessionFunctionSpaceLink",
79
+ },
41
80
  ],
42
81
  events: [
43
82
  {
44
83
  id: "@voyant-travel/mice#event.rfp-awarded",
45
84
  eventType: "mice.rfp.awarded",
85
+ version: "1.0.0",
86
+ payloadSchema: { type: "object", additionalProperties: true },
87
+ visibility: "internal",
88
+ audit: { sourceModule: "mice", category: "domain" },
46
89
  },
47
90
  ],
48
91
  admin: {
92
+ compositionOrder: 110,
93
+ runtime: {
94
+ entry: "@voyant-travel/mice-react/admin",
95
+ export: "createSelectedMiceAdminExtension",
96
+ },
49
97
  routes: [
50
98
  {
51
99
  id: "@voyant-travel/mice#admin.route.programs-index",
52
100
  path: "/mice",
53
101
  runtime: {
54
102
  entry: "@voyant-travel/mice-react/admin",
55
- export: "createMiceAdminExtension",
103
+ export: "createSelectedMiceAdminExtension",
56
104
  },
57
105
  },
58
106
  {
@@ -60,7 +108,7 @@ export const miceVoyantModule = defineModule({
60
108
  path: "/mice/$id",
61
109
  runtime: {
62
110
  entry: "@voyant-travel/mice-react/admin",
63
- export: "createMiceAdminExtension",
111
+ export: "createSelectedMiceAdminExtension",
64
112
  },
65
113
  },
66
114
  ],
@@ -81,6 +129,7 @@ export const miceBookingVoyantPlugin = defineExtension({
81
129
  id: "@voyant-travel/mice#booking-extension.api.admin",
82
130
  surface: "admin",
83
131
  mount: "bookings",
132
+ openapi: { document: "mice-booking" },
84
133
  runtime: {
85
134
  entry: "@voyant-travel/mice/booking-extension",
86
135
  export: "miceBookingExtension",
@@ -91,4 +140,18 @@ export const miceBookingVoyantPlugin = defineExtension({
91
140
  ownership: "package",
92
141
  },
93
142
  });
143
+ /** Neutral association selected explicitly by the standard product BOM. */
144
+ export const miceStandardProductLinksVoyantExtension = defineExtension({
145
+ id: "@voyant-travel/mice#standard-product-links",
146
+ packageName: "@voyant-travel/mice",
147
+ localId: "mice.standard-product-links",
148
+ links: [
149
+ {
150
+ id: "@voyant-travel/mice#link.quote-program",
151
+ source: "@voyant-travel/mice/standard-links",
152
+ export: "quoteProgramLink",
153
+ },
154
+ ],
155
+ meta: { ownership: "standard-product" },
156
+ });
94
157
  export default miceVoyantModule;
@@ -0,0 +1,96 @@
1
+ CREATE TABLE IF NOT EXISTS "quotes_quote_mice_program" (
2
+ "id" text PRIMARY KEY NOT NULL,
3
+ "quotes_quote_id" text NOT NULL,
4
+ "mice_program_id" text NOT NULL,
5
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
6
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
7
+ "deleted_at" timestamp with time zone
8
+ );
9
+ --> statement-breakpoint
10
+ CREATE TABLE IF NOT EXISTS "relationships_organization_mice_program" (
11
+ "id" text PRIMARY KEY NOT NULL,
12
+ "relationships_organization_id" text NOT NULL,
13
+ "mice_program_id" text NOT NULL,
14
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
15
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
16
+ "deleted_at" timestamp with time zone
17
+ );
18
+ --> statement-breakpoint
19
+ CREATE TABLE IF NOT EXISTS "operations_functionSpace_mice_session" (
20
+ "id" text PRIMARY KEY NOT NULL,
21
+ "operations_functionSpace_id" text NOT NULL,
22
+ "mice_session_id" text NOT NULL,
23
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
24
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
25
+ "deleted_at" timestamp with time zone
26
+ );
27
+ --> statement-breakpoint
28
+ CREATE TABLE IF NOT EXISTS "mice_program_operations_spaceBlock" (
29
+ "id" text PRIMARY KEY NOT NULL,
30
+ "mice_program_id" text NOT NULL,
31
+ "operations_spaceBlock_id" text NOT NULL,
32
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
33
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
34
+ "deleted_at" timestamp with time zone
35
+ );
36
+ --> statement-breakpoint
37
+ CREATE TABLE IF NOT EXISTS "accommodations_roomBlock_mice_roomingAssignment" (
38
+ "id" text PRIMARY KEY NOT NULL,
39
+ "accommodations_roomBlock_id" text NOT NULL,
40
+ "mice_roomingAssignment_id" text NOT NULL,
41
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
42
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
43
+ "deleted_at" timestamp with time zone
44
+ );
45
+ --> statement-breakpoint
46
+ CREATE TABLE IF NOT EXISTS "bookings_booking_mice_delegate" (
47
+ "id" text PRIMARY KEY NOT NULL,
48
+ "bookings_booking_id" text NOT NULL,
49
+ "mice_delegate_id" text NOT NULL,
50
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
51
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
52
+ "deleted_at" timestamp with time zone
53
+ );
54
+ --> statement-breakpoint
55
+ CREATE TABLE IF NOT EXISTS "relationships_person_mice_delegate" (
56
+ "id" text PRIMARY KEY NOT NULL,
57
+ "relationships_person_id" text NOT NULL,
58
+ "mice_delegate_id" text NOT NULL,
59
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
60
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
61
+ "deleted_at" timestamp with time zone
62
+ );
63
+ --> statement-breakpoint
64
+ CREATE TABLE IF NOT EXISTS "suppliers_supplier_mice_bid" (
65
+ "id" text PRIMARY KEY NOT NULL,
66
+ "suppliers_supplier_id" text NOT NULL,
67
+ "mice_bid_id" text NOT NULL,
68
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
69
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL,
70
+ "deleted_at" timestamp with time zone
71
+ );
72
+ --> statement-breakpoint
73
+ CREATE UNIQUE INDEX IF NOT EXISTS "quotes_quote_mice_program_pair_idx" ON "quotes_quote_mice_program" USING btree ("quotes_quote_id","mice_program_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
74
+ CREATE UNIQUE INDEX IF NOT EXISTS "quotes_quote_mice_program_l_uniq" ON "quotes_quote_mice_program" USING btree ("quotes_quote_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
75
+ CREATE UNIQUE INDEX IF NOT EXISTS "quotes_quote_mice_program_r_uniq" ON "quotes_quote_mice_program" USING btree ("mice_program_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
76
+ CREATE UNIQUE INDEX IF NOT EXISTS "relationships_organization_mice_program_pair_idx" ON "relationships_organization_mice_program" USING btree ("relationships_organization_id","mice_program_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
77
+ CREATE INDEX IF NOT EXISTS "relationships_organization_mice_program_l_idx" ON "relationships_organization_mice_program" USING btree ("relationships_organization_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
78
+ CREATE UNIQUE INDEX IF NOT EXISTS "relationships_organization_mice_program_r_uniq" ON "relationships_organization_mice_program" USING btree ("mice_program_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
79
+ CREATE UNIQUE INDEX IF NOT EXISTS "operations_functionSpace_mice_session_pair_idx" ON "operations_functionSpace_mice_session" USING btree ("operations_functionSpace_id","mice_session_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
80
+ CREATE INDEX IF NOT EXISTS "operations_functionSpace_mice_session_l_idx" ON "operations_functionSpace_mice_session" USING btree ("operations_functionSpace_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
81
+ CREATE UNIQUE INDEX IF NOT EXISTS "operations_functionSpace_mice_session_r_uniq" ON "operations_functionSpace_mice_session" USING btree ("mice_session_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
82
+ CREATE UNIQUE INDEX IF NOT EXISTS "mice_program_operations_spaceBlock_pair_idx" ON "mice_program_operations_spaceBlock" USING btree ("mice_program_id","operations_spaceBlock_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
83
+ CREATE INDEX IF NOT EXISTS "mice_program_operations_spaceBlock_l_idx" ON "mice_program_operations_spaceBlock" USING btree ("mice_program_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
84
+ CREATE UNIQUE INDEX IF NOT EXISTS "mice_program_operations_spaceBlock_r_uniq" ON "mice_program_operations_spaceBlock" USING btree ("operations_spaceBlock_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
85
+ CREATE UNIQUE INDEX IF NOT EXISTS "accommodations_roomBlock_mice_roomingAssignment_pair_idx" ON "accommodations_roomBlock_mice_roomingAssignment" USING btree ("accommodations_roomBlock_id","mice_roomingAssignment_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
86
+ CREATE INDEX IF NOT EXISTS "accommodations_roomBlock_mice_roomingAssignment_l_idx" ON "accommodations_roomBlock_mice_roomingAssignment" USING btree ("accommodations_roomBlock_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
87
+ CREATE UNIQUE INDEX IF NOT EXISTS "accommodations_roomBlock_mice_roomingAssignment_r_uniq" ON "accommodations_roomBlock_mice_roomingAssignment" USING btree ("mice_roomingAssignment_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
88
+ CREATE UNIQUE INDEX IF NOT EXISTS "bookings_booking_mice_delegate_pair_idx" ON "bookings_booking_mice_delegate" USING btree ("bookings_booking_id","mice_delegate_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
89
+ CREATE UNIQUE INDEX IF NOT EXISTS "bookings_booking_mice_delegate_l_uniq" ON "bookings_booking_mice_delegate" USING btree ("bookings_booking_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
90
+ CREATE UNIQUE INDEX IF NOT EXISTS "bookings_booking_mice_delegate_r_uniq" ON "bookings_booking_mice_delegate" USING btree ("mice_delegate_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
91
+ CREATE UNIQUE INDEX IF NOT EXISTS "relationships_person_mice_delegate_pair_idx" ON "relationships_person_mice_delegate" USING btree ("relationships_person_id","mice_delegate_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
92
+ CREATE INDEX IF NOT EXISTS "relationships_person_mice_delegate_l_idx" ON "relationships_person_mice_delegate" USING btree ("relationships_person_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
93
+ CREATE UNIQUE INDEX IF NOT EXISTS "relationships_person_mice_delegate_r_uniq" ON "relationships_person_mice_delegate" USING btree ("mice_delegate_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
94
+ CREATE UNIQUE INDEX IF NOT EXISTS "suppliers_supplier_mice_bid_pair_idx" ON "suppliers_supplier_mice_bid" USING btree ("suppliers_supplier_id","mice_bid_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
95
+ CREATE INDEX IF NOT EXISTS "suppliers_supplier_mice_bid_l_idx" ON "suppliers_supplier_mice_bid" USING btree ("suppliers_supplier_id") WHERE "deleted_at" IS NULL;--> statement-breakpoint
96
+ CREATE UNIQUE INDEX IF NOT EXISTS "suppliers_supplier_mice_bid_r_uniq" ON "suppliers_supplier_mice_bid" USING btree ("mice_bid_id") WHERE "deleted_at" IS NULL;
@@ -29,6 +29,13 @@
29
29
  "when": 1782181473510,
30
30
  "tag": "0003_mice_baseline",
31
31
  "breakpoints": true
32
+ },
33
+ {
34
+ "idx": 4,
35
+ "version": "7",
36
+ "when": 1783890180000,
37
+ "tag": "20260713000300_standard_links",
38
+ "breakpoints": true
32
39
  }
33
40
  ]
34
- }
41
+ }
@@ -0,0 +1,71 @@
1
+ {
2
+ "openapi": "3.1.0",
3
+ "info": {
4
+ "title": "Voyant MICE Booking Extension API",
5
+ "version": "1.0.0"
6
+ },
7
+ "paths": {
8
+ "/v1/admin/bookings/{bookingId}/mice-details": {
9
+ "get": {
10
+ "summary": "Get MICE details for a booking",
11
+ "parameters": [
12
+ {
13
+ "name": "bookingId",
14
+ "in": "path",
15
+ "required": true,
16
+ "schema": { "type": "string" }
17
+ }
18
+ ],
19
+ "responses": {
20
+ "200": { "description": "The booking's MICE details, or null when none exist." }
21
+ },
22
+ "x-voyant-api-id": "@voyant-travel/mice#booking-extension.api.admin"
23
+ },
24
+ "put": {
25
+ "summary": "Create or update MICE details for a booking",
26
+ "parameters": [
27
+ {
28
+ "name": "bookingId",
29
+ "in": "path",
30
+ "required": true,
31
+ "schema": { "type": "string" }
32
+ }
33
+ ],
34
+ "requestBody": {
35
+ "required": true,
36
+ "content": {
37
+ "application/json": {
38
+ "schema": {
39
+ "type": "object",
40
+ "properties": {
41
+ "programId": { "type": ["string", "null"] },
42
+ "delegateId": { "type": ["string", "null"] }
43
+ }
44
+ }
45
+ }
46
+ }
47
+ },
48
+ "responses": {
49
+ "200": { "description": "The saved booking MICE details." }
50
+ },
51
+ "x-voyant-api-id": "@voyant-travel/mice#booking-extension.api.admin"
52
+ },
53
+ "delete": {
54
+ "summary": "Remove MICE details from a booking",
55
+ "parameters": [
56
+ {
57
+ "name": "bookingId",
58
+ "in": "path",
59
+ "required": true,
60
+ "schema": { "type": "string" }
61
+ }
62
+ ],
63
+ "responses": {
64
+ "200": { "description": "The MICE details were removed." },
65
+ "404": { "description": "No MICE details exist for the booking." }
66
+ },
67
+ "x-voyant-api-id": "@voyant-travel/mice#booking-extension.api.admin"
68
+ }
69
+ }
70
+ }
71
+ }