@voyant-travel/mice 0.6.4 → 0.6.6

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/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import type { Module } from "@voyant-travel/core";
2
2
  import type { HonoModule } from "@voyant-travel/hono/module";
3
+ import type { MiceRouteRuntimeOptions } from "./route-runtime.js";
3
4
  /**
4
5
  * The MICE spine is operator-local (niche) — registered in the deployment, NOT
5
6
  * the framework standard set. The allotment primitives it links to (room
@@ -7,10 +8,14 @@ import type { HonoModule } from "@voyant-travel/hono/module";
7
8
  */
8
9
  export { bidLinkable, delegateLinkable, miceLinkable, programLinkable, rfpLinkable, roomingAssignmentLinkable, sessionLinkable, } from "./linkables.js";
9
10
  export declare const miceModule: Module;
11
+ export interface MiceHonoModuleOptions extends MiceRouteRuntimeOptions {
12
+ }
13
+ export declare function createMiceHonoModule(options?: MiceHonoModuleOptions): HonoModule;
10
14
  export declare const miceHonoModule: HonoModule;
11
15
  export declare const miceHonoModules: readonly [HonoModule];
16
+ export type { MiceRouteRuntime, MiceRouteRuntimeOptions, ResolveMiceDelegatePersonById, } from "./route-runtime.js";
12
17
  export type { MiceAdminRoutes } from "./routes.js";
13
- export { miceAdminRoutes } from "./routes.js";
18
+ export { createMiceAdminRoutes, miceAdminRoutes } from "./routes.js";
14
19
  export * from "./schema.js";
15
20
  export * from "./service.js";
16
21
  export * from "./service-commercials.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;AAK5D;;;;GAIG;AACH,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,WAAW,EACX,yBAAyB,EACzB,eAAe,GAChB,MAAM,g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B,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;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,5 @@
1
1
  import { miceLinkable } from "./linkables.js";
2
- import { miceAdminRoutes } from "./routes.js";
2
+ import { createMiceAdminRoutes } from "./routes.js";
3
3
  /**
4
4
  * The MICE spine is operator-local (niche) — registered in the deployment, NOT
5
5
  * the framework standard set. The allotment primitives it links to (room
@@ -13,12 +13,15 @@ export const miceModule = {
13
13
  requiresTransactionalDb: true,
14
14
  linkable: miceLinkable,
15
15
  };
16
- export const miceHonoModule = {
17
- module: miceModule,
18
- adminRoutes: miceAdminRoutes,
19
- };
16
+ export function createMiceHonoModule(options = {}) {
17
+ return {
18
+ module: miceModule,
19
+ adminRoutes: createMiceAdminRoutes(options),
20
+ };
21
+ }
22
+ export const miceHonoModule = createMiceHonoModule();
20
23
  export const miceHonoModules = [miceHonoModule];
21
- export { miceAdminRoutes } from "./routes.js";
24
+ export { createMiceAdminRoutes, miceAdminRoutes } from "./routes.js";
22
25
  export * from "./schema.js";
23
26
  export * from "./service.js";
24
27
  export * from "./service-commercials.js";
@@ -0,0 +1,8 @@
1
+ import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
2
+ export type ResolveMiceDelegatePersonById = (db: PostgresJsDatabase, personId: string) => Promise<boolean>;
3
+ export interface MiceRouteRuntimeOptions {
4
+ resolveDelegatePersonById?: ResolveMiceDelegatePersonById;
5
+ }
6
+ export interface MiceRouteRuntime extends MiceRouteRuntimeOptions {
7
+ }
8
+ //# sourceMappingURL=route-runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route-runtime.d.ts","sourceRoot":"","sources":["../src/route-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,MAAM,MAAM,6BAA6B,GAAG,CAC1C,EAAE,EAAE,kBAAkB,EACtB,QAAQ,EAAE,MAAM,KACb,OAAO,CAAC,OAAO,CAAC,CAAA;AAErB,MAAM,WAAW,uBAAuB;IACtC,yBAAyB,CAAC,EAAE,6BAA6B,CAAA;CAC1D;AAED,MAAM,WAAW,gBAAiB,SAAQ,uBAAuB;CAAG"}
@@ -0,0 +1 @@
1
+ export {};