@voyant-travel/mice 0.13.0 → 0.15.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.
Files changed (2) hide show
  1. package/dist/voyant.js +87 -7
  2. package/package.json +11 -10
package/dist/voyant.js CHANGED
@@ -1,11 +1,25 @@
1
- import { defineExtension, defineModule, requirePort } from "@voyant-travel/core/project";
1
+ import { defineExtension, defineModule, providePort, requirePort, } from "@voyant-travel/core/project";
2
2
  import { miceRuntimePort } from "./runtime-port.js";
3
3
  const relationshipsMiceRuntimePortReference = { id: "relationships.mice.runtime" };
4
+ const miceRfpAwardedEventPayloadSchema = {
5
+ type: "object",
6
+ properties: {
7
+ rfpId: { type: "string" },
8
+ programId: { type: "string" },
9
+ bidId: { type: "string" },
10
+ supplierId: { type: "string" },
11
+ actorId: { type: ["string", "null"] },
12
+ awardedAt: { type: "string", format: "date-time" },
13
+ },
14
+ required: ["rfpId", "programId", "bidId", "supplierId", "actorId", "awardedAt"],
15
+ additionalProperties: false,
16
+ };
4
17
  /** Import-cheap deployment declarations owned by the MICE package. */
5
18
  export const miceVoyantModule = defineModule({
6
19
  id: "@voyant-travel/mice",
7
20
  packageName: "@voyant-travel/mice",
8
21
  localId: "mice",
22
+ provides: { ports: [providePort(miceRuntimePort)] },
9
23
  runtimePorts: [requirePort(miceRuntimePort), relationshipsMiceRuntimePortReference],
10
24
  api: [
11
25
  {
@@ -33,57 +47,113 @@ export const miceVoyantModule = defineModule({
33
47
  },
34
48
  ],
35
49
  links: [
36
- { id: "@voyant-travel/mice#linkable.program", source: "@voyant-travel/mice/linkables" },
37
- { id: "@voyant-travel/mice#linkable.session", source: "@voyant-travel/mice/linkables" },
38
- { id: "@voyant-travel/mice#linkable.delegate", source: "@voyant-travel/mice/linkables" },
50
+ {
51
+ id: "@voyant-travel/mice#linkable.program",
52
+ kind: "linkable",
53
+ source: "@voyant-travel/mice/linkables",
54
+ },
55
+ {
56
+ id: "@voyant-travel/mice#linkable.session",
57
+ kind: "linkable",
58
+ source: "@voyant-travel/mice/linkables",
59
+ },
60
+ {
61
+ id: "@voyant-travel/mice#linkable.delegate",
62
+ kind: "linkable",
63
+ source: "@voyant-travel/mice/linkables",
64
+ },
39
65
  {
40
66
  id: "@voyant-travel/mice#linkable.roomingAssignment",
67
+ kind: "linkable",
68
+ source: "@voyant-travel/mice/linkables",
69
+ },
70
+ {
71
+ id: "@voyant-travel/mice#linkable.rfp",
72
+ kind: "linkable",
73
+ source: "@voyant-travel/mice/linkables",
74
+ },
75
+ {
76
+ id: "@voyant-travel/mice#linkable.bid",
77
+ kind: "linkable",
41
78
  source: "@voyant-travel/mice/linkables",
42
79
  },
43
- { id: "@voyant-travel/mice#linkable.rfp", source: "@voyant-travel/mice/linkables" },
44
- { id: "@voyant-travel/mice#linkable.bid", source: "@voyant-travel/mice/linkables" },
45
80
  {
46
81
  id: "@voyant-travel/mice#link.bid-supplier",
82
+ kind: "definition",
47
83
  source: "@voyant-travel/mice/standard-links",
48
84
  export: "bidSupplierLink",
49
85
  },
50
86
  {
51
87
  id: "@voyant-travel/mice#link.delegate-booking",
88
+ kind: "definition",
52
89
  source: "@voyant-travel/mice/standard-links",
53
90
  export: "delegateBookingLink",
54
91
  },
55
92
  {
56
93
  id: "@voyant-travel/mice#link.delegate-person",
94
+ kind: "definition",
57
95
  source: "@voyant-travel/mice/standard-links",
58
96
  export: "delegatePersonLink",
59
97
  },
60
98
  {
61
99
  id: "@voyant-travel/mice#link.organization-program",
100
+ kind: "definition",
62
101
  source: "@voyant-travel/mice/standard-links",
63
102
  export: "organizationProgramLink",
64
103
  },
65
104
  {
66
105
  id: "@voyant-travel/mice#link.program-space-block",
106
+ kind: "definition",
67
107
  source: "@voyant-travel/mice/standard-links",
68
108
  export: "programSpaceBlockLink",
69
109
  },
70
110
  {
71
111
  id: "@voyant-travel/mice#link.rooming-room-block",
112
+ kind: "definition",
72
113
  source: "@voyant-travel/mice/standard-links",
73
114
  export: "roomingRoomBlockLink",
74
115
  },
75
116
  {
76
117
  id: "@voyant-travel/mice#link.session-function-space",
118
+ kind: "definition",
77
119
  source: "@voyant-travel/mice/standard-links",
78
120
  export: "sessionFunctionSpaceLink",
79
121
  },
80
122
  ],
123
+ access: {
124
+ resources: [
125
+ {
126
+ id: "@voyant-travel/mice#access.mice",
127
+ resource: "mice",
128
+ label: "MICE programs",
129
+ description: "Meetings and events programs, sessions, delegates, rooming, RFPs, and bids.",
130
+ actions: [
131
+ {
132
+ action: "read",
133
+ label: "View MICE programs",
134
+ description: "View meetings and events programs and related records.",
135
+ },
136
+ {
137
+ action: "write",
138
+ label: "Manage MICE programs",
139
+ description: "Create and update meetings and events programs and related records.",
140
+ },
141
+ {
142
+ action: "delete",
143
+ label: "Delete MICE records",
144
+ description: "Delete sessions and other supported meetings and events records.",
145
+ sensitive: true,
146
+ },
147
+ ],
148
+ },
149
+ ],
150
+ },
81
151
  events: [
82
152
  {
83
153
  id: "@voyant-travel/mice#event.rfp-awarded",
84
154
  eventType: "mice.rfp.awarded",
85
155
  version: "1.0.0",
86
- payloadSchema: { type: "object", additionalProperties: true },
156
+ payloadSchema: miceRfpAwardedEventPayloadSchema,
87
157
  visibility: "internal",
88
158
  audit: { sourceModule: "mice", category: "domain" },
89
159
  },
@@ -98,6 +168,7 @@ export const miceVoyantModule = defineModule({
98
168
  {
99
169
  id: "@voyant-travel/mice#admin.route.programs-index",
100
170
  path: "/mice",
171
+ requiredScopes: ["mice:read"],
101
172
  runtime: {
102
173
  entry: "@voyant-travel/mice-react/admin",
103
174
  export: "createSelectedMiceAdminExtension",
@@ -106,12 +177,20 @@ export const miceVoyantModule = defineModule({
106
177
  {
107
178
  id: "@voyant-travel/mice#admin.route.programs-detail",
108
179
  path: "/mice/$id",
180
+ requiredScopes: ["mice:read"],
109
181
  runtime: {
110
182
  entry: "@voyant-travel/mice-react/admin",
111
183
  export: "createSelectedMiceAdminExtension",
112
184
  },
113
185
  },
114
186
  ],
187
+ nav: [
188
+ {
189
+ id: "@voyant-travel/mice#admin.nav.programs",
190
+ routeId: "@voyant-travel/mice#admin.route.programs-index",
191
+ label: { namespace: "operator.admin.navigation", key: "nav.mice" },
192
+ },
193
+ ],
115
194
  },
116
195
  lifecycle: {
117
196
  uninstall: { default: "retain-data", purge: "not-supported" },
@@ -148,6 +227,7 @@ export const miceStandardProductLinksVoyantExtension = defineExtension({
148
227
  links: [
149
228
  {
150
229
  id: "@voyant-travel/mice#link.quote-program",
230
+ kind: "definition",
151
231
  source: "@voyant-travel/mice/standard-links",
152
232
  export: "quoteProgramLink",
153
233
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyant-travel/mice",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -57,17 +57,17 @@
57
57
  "drizzle-orm": "^0.45.2",
58
58
  "hono": "^4.12.27",
59
59
  "zod": "^4.4.3",
60
- "@voyant-travel/accommodations": "^0.117.0",
61
- "@voyant-travel/core": "^0.122.1",
62
- "@voyant-travel/db": "^0.114.4",
63
- "@voyant-travel/hono": "^0.126.3",
64
- "@voyant-travel/operations": "^0.6.12"
60
+ "@voyant-travel/db": "^0.114.6",
61
+ "@voyant-travel/hono": "^0.127.0",
62
+ "@voyant-travel/operations": "^0.6.14",
63
+ "@voyant-travel/core": "^0.123.0",
64
+ "@voyant-travel/accommodations": "^0.119.0"
65
65
  },
66
66
  "peerDependencies": {
67
- "@voyant-travel/bookings": "^0.157.0",
68
- "@voyant-travel/distribution": "^0.147.0",
69
- "@voyant-travel/quotes": "^0.128.6",
70
- "@voyant-travel/relationships": "^0.125.2"
67
+ "@voyant-travel/bookings": "^0.159.0",
68
+ "@voyant-travel/distribution": "^0.149.0",
69
+ "@voyant-travel/relationships": "^0.125.4",
70
+ "@voyant-travel/quotes": "^0.128.8"
71
71
  },
72
72
  "devDependencies": {
73
73
  "drizzle-kit": "^0.31.10",
@@ -110,6 +110,7 @@
110
110
  },
111
111
  "schema": "./schema",
112
112
  "requiresSchemas": [
113
+ "@voyant-travel/db",
113
114
  "@voyant-travel/accommodations",
114
115
  "@voyant-travel/operations"
115
116
  ]