@spoketech/hub-client 0.1.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.
- package/README.md +252 -0
- package/dist/index.d.ts +37304 -0
- package/dist/index.js +4497 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
- package/skills/spoke-hub-client/SKILL.md +39 -0
- package/skills/spoke-hub-client/agents/openai.yaml +4 -0
- package/skills/spoke-hub-client/references/workflows.md +83 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,4497 @@
|
|
|
1
|
+
// src/client.ts
|
|
2
|
+
import { createPrivateKey, randomUUID, sign } from "crypto";
|
|
3
|
+
import * as FetchHttpClient from "@effect/platform/FetchHttpClient";
|
|
4
|
+
import "@effect/platform/HttpApi";
|
|
5
|
+
import * as HttpApiClient from "@effect/platform/HttpApiClient";
|
|
6
|
+
import * as HttpClient from "@effect/platform/HttpClient";
|
|
7
|
+
import * as HttpClientRequest from "@effect/platform/HttpClientRequest";
|
|
8
|
+
import * as Effect from "effect/Effect";
|
|
9
|
+
|
|
10
|
+
// ../contracts/src/contracts.ts
|
|
11
|
+
import * as HttpApi from "@effect/platform/HttpApi";
|
|
12
|
+
import * as HttpApiEndpoint from "@effect/platform/HttpApiEndpoint";
|
|
13
|
+
import * as HttpApiGroup from "@effect/platform/HttpApiGroup";
|
|
14
|
+
import * as HttpApiSchema2 from "@effect/platform/HttpApiSchema";
|
|
15
|
+
import * as OpenApi from "@effect/platform/OpenApi";
|
|
16
|
+
|
|
17
|
+
// ../contracts/src/constants.ts
|
|
18
|
+
var organizationStatuses = ["active", "archived"];
|
|
19
|
+
var memberStatuses = ["active", "archived"];
|
|
20
|
+
var memberComputedStatuses = ["active", "suspended", "expired", "archived"];
|
|
21
|
+
var memberRecordModes = ["local", "source_managed"];
|
|
22
|
+
var memberPreferredContactMethods = ["sms", "email"];
|
|
23
|
+
var memberCreatedOrigins = [
|
|
24
|
+
"hub_admin",
|
|
25
|
+
"service_api",
|
|
26
|
+
"source_sync",
|
|
27
|
+
"source_create"
|
|
28
|
+
];
|
|
29
|
+
var guestStatuses = ["active", "checked_out", "archived"];
|
|
30
|
+
var adminRoles = ["platform_admin", "org_admin", "auditor"];
|
|
31
|
+
var organizationMemberSourceVendors = [
|
|
32
|
+
"max_gaming",
|
|
33
|
+
"odyssey_gaming",
|
|
34
|
+
"custom"
|
|
35
|
+
];
|
|
36
|
+
var organizationMemberSourceBatchTransports = ["onsite_agent"];
|
|
37
|
+
var organizationMemberSourceManualTransports = ["csv_bucket"];
|
|
38
|
+
var organizationMemberSourceLiveTransports = ["fbi"];
|
|
39
|
+
var organizationMemberSourceStatuses = ["active", "paused", "disabled"];
|
|
40
|
+
var organizationMemberSourceAgentStatuses = [
|
|
41
|
+
"active",
|
|
42
|
+
"paused",
|
|
43
|
+
"disabled"
|
|
44
|
+
];
|
|
45
|
+
var organizationMemberSourceWebhookStatuses = ["active", "disabled"];
|
|
46
|
+
var organizationMemberSourceWebhookDeliveryStatuses = ["success", "failure"];
|
|
47
|
+
var organizationProductWebhookStatuses = ["active", "disabled"];
|
|
48
|
+
var organizationProductWebhookDeliveryStatuses = ["success", "failure"];
|
|
49
|
+
var organizationVoucherProviderProviders = ["senpos"];
|
|
50
|
+
var organizationVoucherProviderTransports = ["onsite_client"];
|
|
51
|
+
var organizationVoucherProviderStatuses = ["active", "disabled"];
|
|
52
|
+
var organizationVoucherCommandKinds = ["issue_voucher"];
|
|
53
|
+
var organizationVoucherCommandStatuses = [
|
|
54
|
+
"requested",
|
|
55
|
+
"accepted",
|
|
56
|
+
"completed",
|
|
57
|
+
"failed"
|
|
58
|
+
];
|
|
59
|
+
var organizationPointTypeStatuses = ["active", "archived"];
|
|
60
|
+
var organizationMemberSyncTriggerKinds = [
|
|
61
|
+
"manual",
|
|
62
|
+
"scheduled",
|
|
63
|
+
"bucket",
|
|
64
|
+
"live_feed"
|
|
65
|
+
];
|
|
66
|
+
var organizationMemberSyncModes = ["full_snapshot", "delta"];
|
|
67
|
+
var organizationMemberSyncRunStatuses = [
|
|
68
|
+
"pending",
|
|
69
|
+
"running",
|
|
70
|
+
"success",
|
|
71
|
+
"partial_failure",
|
|
72
|
+
"failure"
|
|
73
|
+
];
|
|
74
|
+
var organizationMemberSyncTransports = [
|
|
75
|
+
"csv_bucket",
|
|
76
|
+
"onsite_agent",
|
|
77
|
+
"live_feed"
|
|
78
|
+
];
|
|
79
|
+
var organizationMemberSourceCommandKinds = [
|
|
80
|
+
"create_member",
|
|
81
|
+
"update_member",
|
|
82
|
+
"renew_member",
|
|
83
|
+
"lookup_member"
|
|
84
|
+
];
|
|
85
|
+
var organizationMemberSourceCommandStatuses = [
|
|
86
|
+
"requested",
|
|
87
|
+
"accepted",
|
|
88
|
+
"completed",
|
|
89
|
+
"failed"
|
|
90
|
+
];
|
|
91
|
+
var organizationMemberSourceCsvImportStatuses = [
|
|
92
|
+
"requested",
|
|
93
|
+
"uploaded",
|
|
94
|
+
"processing",
|
|
95
|
+
"completed",
|
|
96
|
+
"failed"
|
|
97
|
+
];
|
|
98
|
+
|
|
99
|
+
// ../contracts/src/contracts.ts
|
|
100
|
+
import * as Schema2 from "effect/Schema";
|
|
101
|
+
|
|
102
|
+
// ../contracts/src/errors.ts
|
|
103
|
+
import * as HttpApiSchema from "@effect/platform/HttpApiSchema";
|
|
104
|
+
import * as Schema from "effect/Schema";
|
|
105
|
+
var makeErrorSchema = (code, status) => Schema.Struct({
|
|
106
|
+
code: Schema.Literal(code),
|
|
107
|
+
message: Schema.String
|
|
108
|
+
}).annotations(HttpApiSchema.annotations({ status }));
|
|
109
|
+
var UnauthorizedErrorSchema = makeErrorSchema("unauthorized", 401);
|
|
110
|
+
var ForbiddenErrorSchema = makeErrorSchema("forbidden", 403);
|
|
111
|
+
var NotFoundErrorSchema = makeErrorSchema("not_found", 404);
|
|
112
|
+
var ConflictErrorSchema = makeErrorSchema("conflict", 409);
|
|
113
|
+
var BadRequestErrorSchema = makeErrorSchema("bad_request", 400);
|
|
114
|
+
function makeUnauthorized(message = "Authentication required") {
|
|
115
|
+
return { code: "unauthorized", message };
|
|
116
|
+
}
|
|
117
|
+
function makeForbidden(message = "You do not have permission to perform this action") {
|
|
118
|
+
return { code: "forbidden", message };
|
|
119
|
+
}
|
|
120
|
+
function makeNotFound(message = "Resource not found") {
|
|
121
|
+
return { code: "not_found", message };
|
|
122
|
+
}
|
|
123
|
+
function makeConflict(message) {
|
|
124
|
+
return { code: "conflict", message };
|
|
125
|
+
}
|
|
126
|
+
function makeBadRequest(message) {
|
|
127
|
+
return { code: "bad_request", message };
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// ../contracts/src/contracts.ts
|
|
131
|
+
var NullableString = Schema2.Union(Schema2.String, Schema2.Null);
|
|
132
|
+
var OptionalNullableString = Schema2.optional(NullableString);
|
|
133
|
+
var NullableNumber = Schema2.Union(Schema2.Number, Schema2.Null);
|
|
134
|
+
var OptionalNullableNumber = Schema2.optional(NullableNumber);
|
|
135
|
+
var JsonObjectSchema = Schema2.Record({
|
|
136
|
+
key: Schema2.String,
|
|
137
|
+
value: Schema2.Unknown
|
|
138
|
+
});
|
|
139
|
+
var TimestampSchema = Schema2.String.annotations({
|
|
140
|
+
description: "ISO 8601 timestamp.",
|
|
141
|
+
example: "2026-04-07T21:02:05.123Z"
|
|
142
|
+
});
|
|
143
|
+
var DateOnlySchema = Schema2.String.annotations({
|
|
144
|
+
description: "Date in YYYY-MM-DD format.",
|
|
145
|
+
example: "1988-06-14"
|
|
146
|
+
});
|
|
147
|
+
var MobilePhoneSchema = Schema2.String.annotations({
|
|
148
|
+
description: "Mobile phone number, typically normalized to E.164 format.",
|
|
149
|
+
example: "+61490451502"
|
|
150
|
+
});
|
|
151
|
+
var NullableMobilePhoneSchema = Schema2.Union(MobilePhoneSchema, Schema2.Null);
|
|
152
|
+
var OptionalNullableMobilePhoneSchema = Schema2.optional(NullableMobilePhoneSchema);
|
|
153
|
+
var PreferredContactMethodSchema = Schema2.Literal(...memberPreferredContactMethods).annotations({
|
|
154
|
+
description: "Preferred member contact method.",
|
|
155
|
+
example: "sms"
|
|
156
|
+
});
|
|
157
|
+
var NullablePreferredContactMethodSchema = Schema2.Union(
|
|
158
|
+
PreferredContactMethodSchema,
|
|
159
|
+
Schema2.Null
|
|
160
|
+
);
|
|
161
|
+
var OptionalNullablePreferredContactMethodSchema = Schema2.optional(
|
|
162
|
+
NullablePreferredContactMethodSchema
|
|
163
|
+
);
|
|
164
|
+
var OccupationSchema = Schema2.String.annotations({
|
|
165
|
+
description: "Member occupation or job title.",
|
|
166
|
+
example: "Hospitality Manager"
|
|
167
|
+
});
|
|
168
|
+
var NullableOccupationSchema = Schema2.Union(OccupationSchema, Schema2.Null);
|
|
169
|
+
var OptionalNullableOccupationSchema = Schema2.optional(NullableOccupationSchema);
|
|
170
|
+
var AddressSchema = Schema2.Struct({
|
|
171
|
+
line1: NullableString,
|
|
172
|
+
line2: NullableString,
|
|
173
|
+
suburb: NullableString,
|
|
174
|
+
state: NullableString,
|
|
175
|
+
postalCode: NullableString,
|
|
176
|
+
country: NullableString
|
|
177
|
+
});
|
|
178
|
+
var AddressInputSchema = Schema2.Struct({
|
|
179
|
+
line1: OptionalNullableString,
|
|
180
|
+
line2: OptionalNullableString,
|
|
181
|
+
suburb: OptionalNullableString,
|
|
182
|
+
state: OptionalNullableString,
|
|
183
|
+
postalCode: OptionalNullableString,
|
|
184
|
+
country: OptionalNullableString
|
|
185
|
+
});
|
|
186
|
+
var MarketingPreferencesSchema = Schema2.Struct({
|
|
187
|
+
email: Schema2.Boolean,
|
|
188
|
+
sms: Schema2.Boolean,
|
|
189
|
+
post: Schema2.Boolean,
|
|
190
|
+
gamingOptOut: Schema2.Boolean
|
|
191
|
+
});
|
|
192
|
+
var MarketingPreferencesInputSchema = Schema2.Struct({
|
|
193
|
+
email: Schema2.optional(Schema2.Boolean),
|
|
194
|
+
sms: Schema2.optional(Schema2.Boolean),
|
|
195
|
+
post: Schema2.optional(Schema2.Boolean),
|
|
196
|
+
gamingOptOut: Schema2.optional(Schema2.Boolean)
|
|
197
|
+
});
|
|
198
|
+
var OrganizationSchema = Schema2.Struct({
|
|
199
|
+
id: Schema2.String,
|
|
200
|
+
slug: Schema2.String,
|
|
201
|
+
name: Schema2.String,
|
|
202
|
+
legalName: NullableString,
|
|
203
|
+
status: Schema2.Literal(...organizationStatuses),
|
|
204
|
+
description: NullableString,
|
|
205
|
+
externalReference: NullableString,
|
|
206
|
+
products: Schema2.Array(Schema2.String),
|
|
207
|
+
createdAt: TimestampSchema,
|
|
208
|
+
updatedAt: TimestampSchema,
|
|
209
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
210
|
+
});
|
|
211
|
+
var OrganizationProductOptionSchema = Schema2.Struct({
|
|
212
|
+
id: Schema2.String,
|
|
213
|
+
slug: Schema2.String,
|
|
214
|
+
name: Schema2.String,
|
|
215
|
+
createdAt: TimestampSchema,
|
|
216
|
+
updatedAt: TimestampSchema,
|
|
217
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
218
|
+
});
|
|
219
|
+
var OrganizationProductWebhookSchema = Schema2.Struct({
|
|
220
|
+
id: Schema2.String,
|
|
221
|
+
organizationProductOptionId: Schema2.String,
|
|
222
|
+
status: Schema2.Literal(...organizationProductWebhookStatuses),
|
|
223
|
+
url: Schema2.String.annotations({
|
|
224
|
+
description: "Destination URL that receives product-level webhooks for member-source command completions, member updates, and voucher creation.",
|
|
225
|
+
example: "https://product.example.com/webhooks/spoke"
|
|
226
|
+
}),
|
|
227
|
+
hasSigningSecret: Schema2.Boolean,
|
|
228
|
+
lastDeliveredAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
229
|
+
lastDeliveryStatus: Schema2.Union(
|
|
230
|
+
Schema2.Literal(...organizationProductWebhookDeliveryStatuses),
|
|
231
|
+
Schema2.Null
|
|
232
|
+
),
|
|
233
|
+
lastDeliveryError: NullableString,
|
|
234
|
+
createdAt: TimestampSchema,
|
|
235
|
+
updatedAt: TimestampSchema,
|
|
236
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
237
|
+
});
|
|
238
|
+
var OrganizationProductWebhookUpsertResponseSchema = Schema2.Struct({
|
|
239
|
+
webhook: OrganizationProductWebhookSchema,
|
|
240
|
+
signingSecret: Schema2.Union(
|
|
241
|
+
Schema2.String.annotations({
|
|
242
|
+
description: "Webhook signing secret shown only on first creation or explicit rotation. Use it to verify the X-Spoke-Webhook-Signature header.",
|
|
243
|
+
example: "whsec_JuL9C8J7Kz2O2P8N4GqX5YvM6QwT3R1B"
|
|
244
|
+
}),
|
|
245
|
+
Schema2.Null
|
|
246
|
+
)
|
|
247
|
+
});
|
|
248
|
+
var OrganizationVoucherProviderSecretInputSchema = Schema2.Struct({
|
|
249
|
+
name: Schema2.String,
|
|
250
|
+
value: Schema2.String
|
|
251
|
+
});
|
|
252
|
+
var OrganizationVoucherProviderSecretNameSchema = Schema2.Struct({
|
|
253
|
+
name: Schema2.String
|
|
254
|
+
});
|
|
255
|
+
var OrganizationVoucherProviderSchema = Schema2.Struct({
|
|
256
|
+
id: Schema2.String,
|
|
257
|
+
organizationId: Schema2.String,
|
|
258
|
+
provider: Schema2.Literal(...organizationVoucherProviderProviders),
|
|
259
|
+
transport: Schema2.Literal(...organizationVoucherProviderTransports),
|
|
260
|
+
status: Schema2.Literal(...organizationVoucherProviderStatuses),
|
|
261
|
+
config: JsonObjectSchema,
|
|
262
|
+
hasSecrets: Schema2.Boolean,
|
|
263
|
+
secretNames: Schema2.Array(OrganizationVoucherProviderSecretNameSchema),
|
|
264
|
+
lastError: NullableString,
|
|
265
|
+
createdAt: TimestampSchema,
|
|
266
|
+
updatedAt: TimestampSchema,
|
|
267
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
268
|
+
});
|
|
269
|
+
var OrganizationVoucherCommandSchema = Schema2.Struct({
|
|
270
|
+
id: Schema2.String,
|
|
271
|
+
organizationId: Schema2.String,
|
|
272
|
+
organizationVoucherProviderId: Schema2.String,
|
|
273
|
+
serviceClientId: Schema2.Union(Schema2.String, Schema2.Null),
|
|
274
|
+
kind: Schema2.Literal(...organizationVoucherCommandKinds),
|
|
275
|
+
status: Schema2.Literal(...organizationVoucherCommandStatuses),
|
|
276
|
+
payload: JsonObjectSchema,
|
|
277
|
+
result: Schema2.Union(JsonObjectSchema, Schema2.Null),
|
|
278
|
+
errorMessage: NullableString,
|
|
279
|
+
requestedAt: TimestampSchema,
|
|
280
|
+
acceptedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
281
|
+
completedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
282
|
+
createdAt: TimestampSchema,
|
|
283
|
+
updatedAt: TimestampSchema,
|
|
284
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
285
|
+
});
|
|
286
|
+
var UpsertOrganizationVoucherProviderSchema = Schema2.Struct({
|
|
287
|
+
provider: Schema2.Literal(...organizationVoucherProviderProviders),
|
|
288
|
+
transport: Schema2.Literal(...organizationVoucherProviderTransports),
|
|
289
|
+
status: Schema2.optional(Schema2.Literal(...organizationVoucherProviderStatuses)),
|
|
290
|
+
config: JsonObjectSchema,
|
|
291
|
+
secrets: Schema2.optional(Schema2.Array(OrganizationVoucherProviderSecretInputSchema))
|
|
292
|
+
});
|
|
293
|
+
var RequestVoucherIssueSchema = Schema2.Struct({
|
|
294
|
+
memberId: Schema2.optional(Schema2.String),
|
|
295
|
+
externalSystemMemberId: OptionalNullableString,
|
|
296
|
+
memberNumber: OptionalNullableString,
|
|
297
|
+
rewardId: OptionalNullableString,
|
|
298
|
+
quantity: Schema2.optional(Schema2.Number),
|
|
299
|
+
metadata: Schema2.optional(JsonObjectSchema)
|
|
300
|
+
});
|
|
301
|
+
var OnsiteVoucherCommandSchema = Schema2.Struct({
|
|
302
|
+
commandId: Schema2.String,
|
|
303
|
+
organizationId: Schema2.String,
|
|
304
|
+
organizationVoucherProviderId: Schema2.String,
|
|
305
|
+
provider: Schema2.Literal(...organizationVoucherProviderProviders),
|
|
306
|
+
transport: Schema2.Literal(...organizationVoucherProviderTransports),
|
|
307
|
+
requestedAt: TimestampSchema,
|
|
308
|
+
payload: JsonObjectSchema,
|
|
309
|
+
config: JsonObjectSchema,
|
|
310
|
+
secrets: Schema2.Array(OrganizationVoucherProviderSecretInputSchema)
|
|
311
|
+
});
|
|
312
|
+
var CompleteOnsiteVoucherCommandSchema = Schema2.Struct({
|
|
313
|
+
externalRewardId: OptionalNullableString,
|
|
314
|
+
externalGuid: OptionalNullableString,
|
|
315
|
+
rawRecord: Schema2.optional(Schema2.Unknown),
|
|
316
|
+
errorMessage: OptionalNullableString
|
|
317
|
+
});
|
|
318
|
+
var OrganizationPointTypeSchema = Schema2.Struct({
|
|
319
|
+
id: Schema2.String,
|
|
320
|
+
organizationId: Schema2.String,
|
|
321
|
+
code: Schema2.String,
|
|
322
|
+
name: Schema2.String,
|
|
323
|
+
externalSystemId: NullableString,
|
|
324
|
+
pointsPerDollar: NullableNumber,
|
|
325
|
+
description: NullableString,
|
|
326
|
+
status: Schema2.Literal(...organizationPointTypeStatuses),
|
|
327
|
+
createdAt: TimestampSchema,
|
|
328
|
+
updatedAt: TimestampSchema,
|
|
329
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
330
|
+
});
|
|
331
|
+
var OrganizationPointTypesResponseSchema = Schema2.Struct({
|
|
332
|
+
items: Schema2.Array(OrganizationPointTypeSchema)
|
|
333
|
+
});
|
|
334
|
+
var CreateOrganizationPointTypeSchema = Schema2.Struct({
|
|
335
|
+
code: Schema2.String.annotations({
|
|
336
|
+
description: "Stable organization-scoped point type code.",
|
|
337
|
+
example: "gaming"
|
|
338
|
+
}),
|
|
339
|
+
name: Schema2.String.annotations({
|
|
340
|
+
description: "Display name for the point type.",
|
|
341
|
+
example: "Gaming Points"
|
|
342
|
+
}),
|
|
343
|
+
externalSystemId: OptionalNullableString,
|
|
344
|
+
pointsPerDollar: OptionalNullableNumber,
|
|
345
|
+
description: OptionalNullableString,
|
|
346
|
+
status: Schema2.optional(Schema2.Literal(...organizationPointTypeStatuses))
|
|
347
|
+
});
|
|
348
|
+
var UpdateOrganizationPointTypeSchema = Schema2.Struct({
|
|
349
|
+
code: Schema2.optional(Schema2.String),
|
|
350
|
+
name: Schema2.optional(Schema2.String),
|
|
351
|
+
externalSystemId: OptionalNullableString,
|
|
352
|
+
pointsPerDollar: OptionalNullableNumber,
|
|
353
|
+
description: OptionalNullableString,
|
|
354
|
+
status: Schema2.optional(Schema2.Literal(...organizationPointTypeStatuses))
|
|
355
|
+
});
|
|
356
|
+
var MemberPointBalanceSchema = Schema2.Struct({
|
|
357
|
+
memberId: Schema2.String,
|
|
358
|
+
organizationId: Schema2.String,
|
|
359
|
+
pointTypeId: Schema2.String,
|
|
360
|
+
code: Schema2.String,
|
|
361
|
+
name: Schema2.String,
|
|
362
|
+
description: NullableString,
|
|
363
|
+
balance: Schema2.Number,
|
|
364
|
+
updatedAt: TimestampSchema
|
|
365
|
+
});
|
|
366
|
+
var MemberPointBalancesResponseSchema = Schema2.Struct({
|
|
367
|
+
memberId: Schema2.String,
|
|
368
|
+
organizationId: Schema2.String,
|
|
369
|
+
items: Schema2.Array(MemberPointBalanceSchema)
|
|
370
|
+
});
|
|
371
|
+
var UpsertMemberPointBalanceSchema = Schema2.Struct({
|
|
372
|
+
balance: Schema2.Number.annotations({
|
|
373
|
+
description: "Current member balance for this point type.",
|
|
374
|
+
example: 1200
|
|
375
|
+
})
|
|
376
|
+
});
|
|
377
|
+
var MemberSchema = Schema2.Struct({
|
|
378
|
+
id: Schema2.String,
|
|
379
|
+
organizationId: Schema2.String,
|
|
380
|
+
organizationMemberSourceId: NullableString,
|
|
381
|
+
status: Schema2.Literal(...memberComputedStatuses).annotations({
|
|
382
|
+
description: "Computed member status for display and filtering. `active` excludes suspended and expired members, `suspended` reflects suspended active members, `expired` reflects active members whose expiry date is in the past, and `archived` is the stored archived state."
|
|
383
|
+
}),
|
|
384
|
+
isSuspended: Schema2.Boolean,
|
|
385
|
+
recordMode: Schema2.Literal(...memberRecordModes),
|
|
386
|
+
createdOrigin: Schema2.Literal(...memberCreatedOrigins),
|
|
387
|
+
createdOriginName: NullableString,
|
|
388
|
+
archivedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
389
|
+
joinedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
390
|
+
sourceUpdatedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
391
|
+
email: NullableString,
|
|
392
|
+
title: NullableString,
|
|
393
|
+
firstName: Schema2.String,
|
|
394
|
+
middleName: NullableString,
|
|
395
|
+
lastName: Schema2.String,
|
|
396
|
+
displayName: Schema2.String,
|
|
397
|
+
dob: Schema2.Union(DateOnlySchema, Schema2.Null),
|
|
398
|
+
gender: NullableString,
|
|
399
|
+
mobilePhone: NullableMobilePhoneSchema,
|
|
400
|
+
homePhone: NullableString,
|
|
401
|
+
preferredContactMethod: NullablePreferredContactMethodSchema,
|
|
402
|
+
occupation: NullableOccupationSchema,
|
|
403
|
+
address: NullableString.annotations({
|
|
404
|
+
description: "Formatted full street address for display."
|
|
405
|
+
}),
|
|
406
|
+
addressParts: Schema2.Union(AddressSchema, Schema2.Null),
|
|
407
|
+
postalAddress: NullableString.annotations({
|
|
408
|
+
description: "Formatted full postal address for display."
|
|
409
|
+
}),
|
|
410
|
+
postalAddressParts: Schema2.Union(AddressSchema, Schema2.Null),
|
|
411
|
+
membershipType: NullableString,
|
|
412
|
+
membershipTypeId: NullableString,
|
|
413
|
+
ratingGrade: NullableString,
|
|
414
|
+
ratingGradeId: NullableString,
|
|
415
|
+
marketingPreferences: MarketingPreferencesSchema,
|
|
416
|
+
expiresAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
417
|
+
statusCredits: Schema2.Number,
|
|
418
|
+
memberNumber: NullableString,
|
|
419
|
+
externalSystemMemberId: NullableString,
|
|
420
|
+
cardId: NullableString,
|
|
421
|
+
customFields: JsonObjectSchema,
|
|
422
|
+
createdAt: TimestampSchema,
|
|
423
|
+
updatedAt: TimestampSchema,
|
|
424
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
425
|
+
});
|
|
426
|
+
var MemberResponseModeSchema = Schema2.Literal("full", "med", "basic");
|
|
427
|
+
var OrganizationMembersStatusFilterSchema = Schema2.Literal(
|
|
428
|
+
"active",
|
|
429
|
+
"suspended",
|
|
430
|
+
"expired"
|
|
431
|
+
);
|
|
432
|
+
function optionalQueryString(description, options) {
|
|
433
|
+
return Schema2.optional(
|
|
434
|
+
Schema2.String.annotations({
|
|
435
|
+
description,
|
|
436
|
+
example: options?.example
|
|
437
|
+
})
|
|
438
|
+
);
|
|
439
|
+
}
|
|
440
|
+
var MemberMedSchema = Schema2.Struct({
|
|
441
|
+
id: Schema2.String,
|
|
442
|
+
organizationId: Schema2.String,
|
|
443
|
+
status: Schema2.Literal(...memberComputedStatuses),
|
|
444
|
+
isSuspended: Schema2.Boolean,
|
|
445
|
+
displayName: Schema2.String,
|
|
446
|
+
dob: Schema2.Union(DateOnlySchema, Schema2.Null),
|
|
447
|
+
email: NullableString,
|
|
448
|
+
joinedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
449
|
+
preferredContactMethod: NullablePreferredContactMethodSchema,
|
|
450
|
+
occupation: NullableOccupationSchema,
|
|
451
|
+
address: NullableString.annotations({
|
|
452
|
+
description: "Formatted full street address for display."
|
|
453
|
+
}),
|
|
454
|
+
addressParts: Schema2.Union(AddressSchema, Schema2.Null),
|
|
455
|
+
membershipType: NullableString,
|
|
456
|
+
membershipTypeId: NullableString,
|
|
457
|
+
ratingGrade: NullableString,
|
|
458
|
+
ratingGradeId: NullableString,
|
|
459
|
+
statusCredits: Schema2.Number,
|
|
460
|
+
memberNumber: NullableString,
|
|
461
|
+
externalSystemMemberId: NullableString,
|
|
462
|
+
cardId: NullableString,
|
|
463
|
+
customFields: JsonObjectSchema,
|
|
464
|
+
updatedAt: TimestampSchema
|
|
465
|
+
});
|
|
466
|
+
var MemberBasicSchema = Schema2.Struct({
|
|
467
|
+
id: Schema2.String,
|
|
468
|
+
displayName: Schema2.String,
|
|
469
|
+
dob: Schema2.Union(DateOnlySchema, Schema2.Null),
|
|
470
|
+
statusCredits: Schema2.Number,
|
|
471
|
+
memberNumber: NullableString
|
|
472
|
+
});
|
|
473
|
+
var MemberFullResponseSchema = Schema2.Struct({
|
|
474
|
+
id: Schema2.String,
|
|
475
|
+
organizationId: Schema2.String,
|
|
476
|
+
organizationMemberSourceId: NullableString,
|
|
477
|
+
status: Schema2.Literal(...memberComputedStatuses),
|
|
478
|
+
isSuspended: Schema2.Boolean,
|
|
479
|
+
recordMode: Schema2.Literal(...memberRecordModes),
|
|
480
|
+
createdOrigin: Schema2.Literal(...memberCreatedOrigins),
|
|
481
|
+
createdOriginName: NullableString,
|
|
482
|
+
archivedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
483
|
+
joinedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
484
|
+
sourceUpdatedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
485
|
+
email: NullableString,
|
|
486
|
+
title: NullableString,
|
|
487
|
+
firstName: Schema2.String,
|
|
488
|
+
middleName: NullableString,
|
|
489
|
+
lastName: Schema2.String,
|
|
490
|
+
displayName: Schema2.String,
|
|
491
|
+
dob: Schema2.Union(DateOnlySchema, Schema2.Null),
|
|
492
|
+
gender: NullableString,
|
|
493
|
+
mobilePhone: NullableMobilePhoneSchema,
|
|
494
|
+
homePhone: NullableString,
|
|
495
|
+
preferredContactMethod: NullablePreferredContactMethodSchema,
|
|
496
|
+
occupation: NullableOccupationSchema,
|
|
497
|
+
address: NullableString.annotations({
|
|
498
|
+
description: "Formatted full street address for display."
|
|
499
|
+
}),
|
|
500
|
+
addressParts: Schema2.Union(AddressSchema, Schema2.Null),
|
|
501
|
+
postalAddress: NullableString.annotations({
|
|
502
|
+
description: "Formatted full postal address for display."
|
|
503
|
+
}),
|
|
504
|
+
postalAddressParts: Schema2.Union(AddressSchema, Schema2.Null),
|
|
505
|
+
membershipType: NullableString,
|
|
506
|
+
membershipTypeId: NullableString,
|
|
507
|
+
ratingGrade: NullableString,
|
|
508
|
+
ratingGradeId: NullableString,
|
|
509
|
+
marketingPreferences: MarketingPreferencesSchema,
|
|
510
|
+
expiresAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
511
|
+
statusCredits: Schema2.Number,
|
|
512
|
+
memberNumber: NullableString,
|
|
513
|
+
externalSystemMemberId: NullableString,
|
|
514
|
+
cardId: NullableString,
|
|
515
|
+
customFields: JsonObjectSchema,
|
|
516
|
+
createdAt: TimestampSchema,
|
|
517
|
+
updatedAt: TimestampSchema,
|
|
518
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
519
|
+
responseMode: Schema2.Literal("full")
|
|
520
|
+
});
|
|
521
|
+
var MemberMedResponseSchema = Schema2.Struct({
|
|
522
|
+
id: Schema2.String,
|
|
523
|
+
organizationId: Schema2.String,
|
|
524
|
+
status: Schema2.Literal(...memberComputedStatuses),
|
|
525
|
+
isSuspended: Schema2.Boolean,
|
|
526
|
+
displayName: Schema2.String,
|
|
527
|
+
dob: Schema2.Union(DateOnlySchema, Schema2.Null),
|
|
528
|
+
email: NullableString,
|
|
529
|
+
preferredContactMethod: NullablePreferredContactMethodSchema,
|
|
530
|
+
occupation: NullableString,
|
|
531
|
+
joinedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
532
|
+
address: NullableString.annotations({
|
|
533
|
+
description: "Formatted full street address for display."
|
|
534
|
+
}),
|
|
535
|
+
addressParts: Schema2.Union(AddressSchema, Schema2.Null),
|
|
536
|
+
membershipType: NullableString,
|
|
537
|
+
membershipTypeId: NullableString,
|
|
538
|
+
ratingGrade: NullableString,
|
|
539
|
+
ratingGradeId: NullableString,
|
|
540
|
+
statusCredits: Schema2.Number,
|
|
541
|
+
memberNumber: NullableString,
|
|
542
|
+
externalSystemMemberId: NullableString,
|
|
543
|
+
cardId: NullableString,
|
|
544
|
+
customFields: JsonObjectSchema,
|
|
545
|
+
updatedAt: TimestampSchema,
|
|
546
|
+
responseMode: Schema2.Literal("med")
|
|
547
|
+
});
|
|
548
|
+
var MemberBasicResponseSchema = Schema2.Struct({
|
|
549
|
+
id: Schema2.String,
|
|
550
|
+
displayName: Schema2.String,
|
|
551
|
+
dob: Schema2.Union(DateOnlySchema, Schema2.Null),
|
|
552
|
+
statusCredits: Schema2.Number,
|
|
553
|
+
memberNumber: NullableString,
|
|
554
|
+
responseMode: Schema2.Literal("basic")
|
|
555
|
+
});
|
|
556
|
+
var MemberResponseSchema = Schema2.Union(
|
|
557
|
+
MemberFullResponseSchema,
|
|
558
|
+
MemberMedResponseSchema,
|
|
559
|
+
MemberBasicResponseSchema
|
|
560
|
+
);
|
|
561
|
+
var MemberStatusCreditsSchema = Schema2.Struct({
|
|
562
|
+
memberId: Schema2.String,
|
|
563
|
+
organizationId: Schema2.String,
|
|
564
|
+
statusCredits: Schema2.Number,
|
|
565
|
+
updatedAt: TimestampSchema
|
|
566
|
+
});
|
|
567
|
+
var UpdateMemberStatusCreditsSchema = Schema2.Struct({
|
|
568
|
+
statusCredits: Schema2.Number.annotations({
|
|
569
|
+
description: "Current member status credits value.",
|
|
570
|
+
example: 12
|
|
571
|
+
})
|
|
572
|
+
});
|
|
573
|
+
var BulkGetOrganizationMembersSchema = Schema2.Struct({
|
|
574
|
+
ids: Schema2.Array(Schema2.String).annotations({
|
|
575
|
+
description: "Spoke Hub member IDs to fetch. Up to 50 IDs may be requested at once. Duplicate IDs are ignored after the first occurrence.",
|
|
576
|
+
example: ["mem_123", "mem_456"]
|
|
577
|
+
}),
|
|
578
|
+
responseMode: Schema2.optional(
|
|
579
|
+
MemberResponseModeSchema.annotations({
|
|
580
|
+
description: "Response shape to return for each member. Defaults to `full`.",
|
|
581
|
+
example: "med"
|
|
582
|
+
})
|
|
583
|
+
)
|
|
584
|
+
});
|
|
585
|
+
var BulkOrganizationMembersResponseSchema = Schema2.Struct({
|
|
586
|
+
requestedIds: Schema2.Array(Schema2.String),
|
|
587
|
+
missingIds: Schema2.Array(Schema2.String),
|
|
588
|
+
items: Schema2.Array(MemberSchema),
|
|
589
|
+
responseMode: Schema2.Literal("full")
|
|
590
|
+
});
|
|
591
|
+
var BulkOrganizationMembersMedResponseSchema = Schema2.Struct({
|
|
592
|
+
requestedIds: Schema2.Array(Schema2.String),
|
|
593
|
+
missingIds: Schema2.Array(Schema2.String),
|
|
594
|
+
items: Schema2.Array(MemberMedSchema),
|
|
595
|
+
responseMode: Schema2.Literal("med")
|
|
596
|
+
});
|
|
597
|
+
var BulkOrganizationMembersBasicResponseSchema = Schema2.Struct({
|
|
598
|
+
requestedIds: Schema2.Array(Schema2.String),
|
|
599
|
+
missingIds: Schema2.Array(Schema2.String),
|
|
600
|
+
items: Schema2.Array(MemberBasicSchema),
|
|
601
|
+
responseMode: Schema2.Literal("basic")
|
|
602
|
+
});
|
|
603
|
+
var BulkOrganizationMembersResponseUnionSchema = Schema2.Union(
|
|
604
|
+
BulkOrganizationMembersResponseSchema,
|
|
605
|
+
BulkOrganizationMembersMedResponseSchema,
|
|
606
|
+
BulkOrganizationMembersBasicResponseSchema
|
|
607
|
+
);
|
|
608
|
+
var OrganizationMembersSearchFieldSchema = Schema2.Literal(
|
|
609
|
+
"displayName",
|
|
610
|
+
"email",
|
|
611
|
+
"mobilePhone",
|
|
612
|
+
"memberNumber",
|
|
613
|
+
"cardId",
|
|
614
|
+
"externalSystemMemberId"
|
|
615
|
+
);
|
|
616
|
+
var OrganizationMembersSortFieldSchema = Schema2.Literal(
|
|
617
|
+
"memberNumber",
|
|
618
|
+
"name",
|
|
619
|
+
"dob"
|
|
620
|
+
);
|
|
621
|
+
var SortDirectionSchema = Schema2.Literal("asc", "desc");
|
|
622
|
+
var OrganizationMembersListUrlParamsSchema = Schema2.Struct({
|
|
623
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
624
|
+
example: "1"
|
|
625
|
+
}),
|
|
626
|
+
pageSize: optionalQueryString(
|
|
627
|
+
"Number of members per page. Defaults to 25 and is capped at 100.",
|
|
628
|
+
{
|
|
629
|
+
example: "25"
|
|
630
|
+
}
|
|
631
|
+
),
|
|
632
|
+
searchField: Schema2.optional(
|
|
633
|
+
OrganizationMembersSearchFieldSchema.annotations({
|
|
634
|
+
description: "Member field to search against. Only applied when searchValue is provided."
|
|
635
|
+
})
|
|
636
|
+
),
|
|
637
|
+
searchValue: Schema2.optional(
|
|
638
|
+
Schema2.String.annotations({
|
|
639
|
+
description: "Substring match used with searchField to filter members."
|
|
640
|
+
})
|
|
641
|
+
),
|
|
642
|
+
name: Schema2.optional(
|
|
643
|
+
Schema2.String.annotations({
|
|
644
|
+
description: "Partial member name match against the display name."
|
|
645
|
+
})
|
|
646
|
+
),
|
|
647
|
+
mobilePhone: Schema2.optional(
|
|
648
|
+
MobilePhoneSchema.annotations({
|
|
649
|
+
description: "Exact mobile phone match after phone-number normalization."
|
|
650
|
+
})
|
|
651
|
+
),
|
|
652
|
+
memberNumber: Schema2.optional(
|
|
653
|
+
Schema2.String.annotations({
|
|
654
|
+
description: "Exact member number match."
|
|
655
|
+
})
|
|
656
|
+
),
|
|
657
|
+
dob: Schema2.optional(
|
|
658
|
+
DateOnlySchema.annotations({
|
|
659
|
+
description: "Exact date of birth match in YYYY-MM-DD format."
|
|
660
|
+
})
|
|
661
|
+
),
|
|
662
|
+
joinedAfter: Schema2.optional(
|
|
663
|
+
DateOnlySchema.annotations({
|
|
664
|
+
description: "Only include members whose joined date is on or after this date in YYYY-MM-DD format. Older records without a joined date fall back to createdAt.",
|
|
665
|
+
example: "2026-01-01"
|
|
666
|
+
})
|
|
667
|
+
),
|
|
668
|
+
memberStatus: Schema2.optional(
|
|
669
|
+
OrganizationMembersStatusFilterSchema.annotations({
|
|
670
|
+
description: "Computed member status filter. `active` excludes suspended and expired members, `suspended` returns suspended active members, and `expired` returns active members whose expiry date is in the past.",
|
|
671
|
+
example: "active"
|
|
672
|
+
})
|
|
673
|
+
),
|
|
674
|
+
sortBy: Schema2.optional(
|
|
675
|
+
OrganizationMembersSortFieldSchema.annotations({
|
|
676
|
+
description: "Sort field for the result set. `memberNumber` uses numeric ordering, `name` sorts by display name, and `dob` sorts by date of birth.",
|
|
677
|
+
example: "memberNumber"
|
|
678
|
+
})
|
|
679
|
+
),
|
|
680
|
+
sortDirection: Schema2.optional(
|
|
681
|
+
SortDirectionSchema.annotations({
|
|
682
|
+
description: "Sort direction to apply with `sortBy`. Defaults to `asc` when omitted.",
|
|
683
|
+
example: "asc"
|
|
684
|
+
})
|
|
685
|
+
),
|
|
686
|
+
responseMode: Schema2.optional(
|
|
687
|
+
MemberResponseModeSchema.annotations({
|
|
688
|
+
description: "Response shape to return. Defaults to `full`."
|
|
689
|
+
})
|
|
690
|
+
),
|
|
691
|
+
ratingGradeIds: Schema2.optional(
|
|
692
|
+
Schema2.String.annotations({
|
|
693
|
+
description: "Comma-separated list of rating grade IDs to include, for example `12,14,20`."
|
|
694
|
+
})
|
|
695
|
+
)
|
|
696
|
+
});
|
|
697
|
+
var OrganizationMemberSyncRunsListUrlParamsSchema = Schema2.Struct({
|
|
698
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
699
|
+
example: "1"
|
|
700
|
+
}),
|
|
701
|
+
pageSize: optionalQueryString(
|
|
702
|
+
"Number of sync runs per page. Defaults to 5 and is capped at 50.",
|
|
703
|
+
{
|
|
704
|
+
example: "5"
|
|
705
|
+
}
|
|
706
|
+
)
|
|
707
|
+
});
|
|
708
|
+
var MemberResponseModeUrlParamsSchema = Schema2.Struct({
|
|
709
|
+
responseMode: Schema2.optional(
|
|
710
|
+
MemberResponseModeSchema.annotations({
|
|
711
|
+
description: "Response shape to return. Defaults to `full`."
|
|
712
|
+
})
|
|
713
|
+
)
|
|
714
|
+
});
|
|
715
|
+
var GuestsListUrlParamsSchema = Schema2.Struct({
|
|
716
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
717
|
+
example: "1"
|
|
718
|
+
}),
|
|
719
|
+
pageSize: optionalQueryString("Number of guests per page. Defaults to 25 and is capped at 100.", {
|
|
720
|
+
example: "25"
|
|
721
|
+
}),
|
|
722
|
+
name: Schema2.optional(
|
|
723
|
+
Schema2.String.annotations({
|
|
724
|
+
description: "Partial guest name match across first name and last name."
|
|
725
|
+
})
|
|
726
|
+
),
|
|
727
|
+
email: Schema2.optional(
|
|
728
|
+
Schema2.String.annotations({
|
|
729
|
+
description: "Exact guest email match.",
|
|
730
|
+
example: "jane@example.com"
|
|
731
|
+
})
|
|
732
|
+
),
|
|
733
|
+
mobilePhone: Schema2.optional(
|
|
734
|
+
MobilePhoneSchema.annotations({
|
|
735
|
+
description: "Exact guest mobile phone match after phone-number normalization."
|
|
736
|
+
})
|
|
737
|
+
)
|
|
738
|
+
});
|
|
739
|
+
var OrganizationsListUrlParamsSchema = Schema2.Struct({
|
|
740
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
741
|
+
example: "1"
|
|
742
|
+
}),
|
|
743
|
+
pageSize: optionalQueryString(
|
|
744
|
+
"Number of organizations per page. Defaults to 25 and is capped at 100.",
|
|
745
|
+
{
|
|
746
|
+
example: "25"
|
|
747
|
+
}
|
|
748
|
+
),
|
|
749
|
+
name: Schema2.optional(
|
|
750
|
+
Schema2.String.annotations({
|
|
751
|
+
description: "Partial organization name match."
|
|
752
|
+
})
|
|
753
|
+
)
|
|
754
|
+
});
|
|
755
|
+
var OrganizationMemberRatingGradesListUrlParamsSchema = Schema2.Struct({
|
|
756
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
757
|
+
example: "1"
|
|
758
|
+
}),
|
|
759
|
+
pageSize: optionalQueryString(
|
|
760
|
+
"Number of rating grades per page. Defaults to 25 and is capped at 100.",
|
|
761
|
+
{
|
|
762
|
+
example: "25"
|
|
763
|
+
}
|
|
764
|
+
)
|
|
765
|
+
});
|
|
766
|
+
var OrganizationMemberMembershipTypesListUrlParamsSchema = Schema2.Struct({
|
|
767
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
768
|
+
example: "1"
|
|
769
|
+
}),
|
|
770
|
+
pageSize: optionalQueryString(
|
|
771
|
+
"Number of membership types per page. Defaults to 25 and is capped at 100.",
|
|
772
|
+
{
|
|
773
|
+
example: "25"
|
|
774
|
+
}
|
|
775
|
+
)
|
|
776
|
+
});
|
|
777
|
+
var OrganizationMemberTitlesListUrlParamsSchema = Schema2.Struct({
|
|
778
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
779
|
+
example: "1"
|
|
780
|
+
}),
|
|
781
|
+
pageSize: optionalQueryString("Number of titles per page. Defaults to 25 and is capped at 100.", {
|
|
782
|
+
example: "25"
|
|
783
|
+
})
|
|
784
|
+
});
|
|
785
|
+
var OrganizationMemberGendersListUrlParamsSchema = Schema2.Struct({
|
|
786
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
787
|
+
example: "1"
|
|
788
|
+
}),
|
|
789
|
+
pageSize: optionalQueryString(
|
|
790
|
+
"Number of genders per page. Defaults to 25 and is capped at 100.",
|
|
791
|
+
{
|
|
792
|
+
example: "25"
|
|
793
|
+
}
|
|
794
|
+
)
|
|
795
|
+
});
|
|
796
|
+
var OrganizationMemberSourceCommandsListUrlParamsSchema = Schema2.Struct({
|
|
797
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
798
|
+
example: "1"
|
|
799
|
+
}),
|
|
800
|
+
pageSize: optionalQueryString(
|
|
801
|
+
"Number of member-source commands per page. Defaults to 25 and is capped at 100.",
|
|
802
|
+
{
|
|
803
|
+
example: "25"
|
|
804
|
+
}
|
|
805
|
+
)
|
|
806
|
+
});
|
|
807
|
+
var ServiceClientsListUrlParamsSchema = Schema2.Struct({
|
|
808
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
809
|
+
example: "1"
|
|
810
|
+
}),
|
|
811
|
+
pageSize: optionalQueryString(
|
|
812
|
+
"Number of service clients per page. Defaults to 25 and is capped at 100.",
|
|
813
|
+
{
|
|
814
|
+
example: "25"
|
|
815
|
+
}
|
|
816
|
+
)
|
|
817
|
+
});
|
|
818
|
+
var OrganizationProductOptionsListUrlParamsSchema = Schema2.Struct({
|
|
819
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
820
|
+
example: "1"
|
|
821
|
+
}),
|
|
822
|
+
pageSize: optionalQueryString(
|
|
823
|
+
"Number of organization product options per page. Defaults to 25 and is capped at 100.",
|
|
824
|
+
{
|
|
825
|
+
example: "25"
|
|
826
|
+
}
|
|
827
|
+
)
|
|
828
|
+
});
|
|
829
|
+
var OrganizationProductWebhookListUrlParamsSchema = Schema2.Struct({
|
|
830
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
831
|
+
example: "1"
|
|
832
|
+
}),
|
|
833
|
+
pageSize: optionalQueryString(
|
|
834
|
+
"Number of organization product webhooks per page. Defaults to 25 and is capped at 100.",
|
|
835
|
+
{
|
|
836
|
+
example: "25"
|
|
837
|
+
}
|
|
838
|
+
),
|
|
839
|
+
organizationProductOptionId: Schema2.optional(
|
|
840
|
+
Schema2.String.annotations({
|
|
841
|
+
description: "Optional product filter. When provided, only webhooks for that product are returned.",
|
|
842
|
+
example: "prod_123"
|
|
843
|
+
})
|
|
844
|
+
)
|
|
845
|
+
});
|
|
846
|
+
var PaginatedOrganizationsSchema = Schema2.Struct({
|
|
847
|
+
items: Schema2.Array(OrganizationSchema),
|
|
848
|
+
total: Schema2.Number,
|
|
849
|
+
page: Schema2.Number,
|
|
850
|
+
pageSize: Schema2.Number,
|
|
851
|
+
totalPages: Schema2.Number,
|
|
852
|
+
name: Schema2.Union(Schema2.String, Schema2.Null)
|
|
853
|
+
});
|
|
854
|
+
var PaginatedOrganizationProductOptionsSchema = Schema2.Struct({
|
|
855
|
+
items: Schema2.Array(OrganizationProductOptionSchema),
|
|
856
|
+
total: Schema2.Number,
|
|
857
|
+
page: Schema2.Number,
|
|
858
|
+
pageSize: Schema2.Number,
|
|
859
|
+
totalPages: Schema2.Number
|
|
860
|
+
});
|
|
861
|
+
var PaginatedOrganizationProductWebhooksSchema = Schema2.Struct({
|
|
862
|
+
items: Schema2.Array(OrganizationProductWebhookSchema),
|
|
863
|
+
total: Schema2.Number,
|
|
864
|
+
page: Schema2.Number,
|
|
865
|
+
pageSize: Schema2.Number,
|
|
866
|
+
totalPages: Schema2.Number,
|
|
867
|
+
organizationProductOptionId: Schema2.Union(Schema2.String, Schema2.Null)
|
|
868
|
+
});
|
|
869
|
+
var PaginatedOrganizationMembersSchema = Schema2.Struct({
|
|
870
|
+
items: Schema2.Array(MemberSchema),
|
|
871
|
+
total: Schema2.Number,
|
|
872
|
+
page: Schema2.Number,
|
|
873
|
+
pageSize: Schema2.Number,
|
|
874
|
+
totalPages: Schema2.Number,
|
|
875
|
+
searchField: Schema2.Union(OrganizationMembersSearchFieldSchema, Schema2.Null),
|
|
876
|
+
searchValue: Schema2.Union(Schema2.String, Schema2.Null),
|
|
877
|
+
sortBy: Schema2.Union(OrganizationMembersSortFieldSchema, Schema2.Null),
|
|
878
|
+
sortDirection: Schema2.Union(SortDirectionSchema, Schema2.Null),
|
|
879
|
+
responseMode: Schema2.Literal("full")
|
|
880
|
+
});
|
|
881
|
+
var PaginatedOrganizationMembersMedSchema = Schema2.Struct({
|
|
882
|
+
items: Schema2.Array(MemberMedSchema),
|
|
883
|
+
total: Schema2.Number,
|
|
884
|
+
page: Schema2.Number,
|
|
885
|
+
pageSize: Schema2.Number,
|
|
886
|
+
totalPages: Schema2.Number,
|
|
887
|
+
searchField: Schema2.Union(OrganizationMembersSearchFieldSchema, Schema2.Null),
|
|
888
|
+
searchValue: Schema2.Union(Schema2.String, Schema2.Null),
|
|
889
|
+
sortBy: Schema2.Union(OrganizationMembersSortFieldSchema, Schema2.Null),
|
|
890
|
+
sortDirection: Schema2.Union(SortDirectionSchema, Schema2.Null),
|
|
891
|
+
responseMode: Schema2.Literal("med")
|
|
892
|
+
});
|
|
893
|
+
var PaginatedOrganizationMembersBasicSchema = Schema2.Struct({
|
|
894
|
+
items: Schema2.Array(MemberBasicSchema),
|
|
895
|
+
total: Schema2.Number,
|
|
896
|
+
page: Schema2.Number,
|
|
897
|
+
pageSize: Schema2.Number,
|
|
898
|
+
totalPages: Schema2.Number,
|
|
899
|
+
searchField: Schema2.Union(OrganizationMembersSearchFieldSchema, Schema2.Null),
|
|
900
|
+
searchValue: Schema2.Union(Schema2.String, Schema2.Null),
|
|
901
|
+
sortBy: Schema2.Union(OrganizationMembersSortFieldSchema, Schema2.Null),
|
|
902
|
+
sortDirection: Schema2.Union(SortDirectionSchema, Schema2.Null),
|
|
903
|
+
responseMode: Schema2.Literal("basic")
|
|
904
|
+
});
|
|
905
|
+
var PaginatedOrganizationMembersResponseSchema = Schema2.Union(
|
|
906
|
+
PaginatedOrganizationMembersSchema,
|
|
907
|
+
PaginatedOrganizationMembersMedSchema,
|
|
908
|
+
PaginatedOrganizationMembersBasicSchema
|
|
909
|
+
);
|
|
910
|
+
var organizationMembersListExamples = {
|
|
911
|
+
full: {
|
|
912
|
+
summary: "Full response",
|
|
913
|
+
value: {
|
|
914
|
+
items: [
|
|
915
|
+
{
|
|
916
|
+
id: "mem_123",
|
|
917
|
+
organizationId: "org_1",
|
|
918
|
+
organizationMemberSourceId: "src_9",
|
|
919
|
+
status: "active",
|
|
920
|
+
isSuspended: false,
|
|
921
|
+
recordMode: "source_managed",
|
|
922
|
+
createdOrigin: "source_sync",
|
|
923
|
+
createdOriginName: "Odyssey Gaming",
|
|
924
|
+
archivedAt: null,
|
|
925
|
+
sourceUpdatedAt: "2026-04-02T01:23:45.000Z",
|
|
926
|
+
email: "jane@example.com",
|
|
927
|
+
title: "Ms",
|
|
928
|
+
firstName: "Jane",
|
|
929
|
+
middleName: null,
|
|
930
|
+
lastName: "Smith",
|
|
931
|
+
displayName: "Jane Smith",
|
|
932
|
+
dob: "1988-06-14",
|
|
933
|
+
gender: null,
|
|
934
|
+
mobilePhone: "+61400000000",
|
|
935
|
+
homePhone: null,
|
|
936
|
+
preferredContactMethod: "sms",
|
|
937
|
+
occupation: "Hospitality Manager",
|
|
938
|
+
address: "12 Queen St, Cleveland, QLD, 4163, AU",
|
|
939
|
+
addressParts: {
|
|
940
|
+
line1: "12 Queen St",
|
|
941
|
+
line2: null,
|
|
942
|
+
suburb: "Cleveland",
|
|
943
|
+
state: "QLD",
|
|
944
|
+
postalCode: "4163",
|
|
945
|
+
country: "AU"
|
|
946
|
+
},
|
|
947
|
+
postalAddress: "PO Box 10, Cleveland, QLD, 4163, AU",
|
|
948
|
+
postalAddressParts: {
|
|
949
|
+
line1: "PO Box 10",
|
|
950
|
+
line2: null,
|
|
951
|
+
suburb: "Cleveland",
|
|
952
|
+
state: "QLD",
|
|
953
|
+
postalCode: "4163",
|
|
954
|
+
country: "AU"
|
|
955
|
+
},
|
|
956
|
+
membershipType: "Gold",
|
|
957
|
+
membershipTypeId: "Gold",
|
|
958
|
+
ratingGrade: "VIP",
|
|
959
|
+
ratingGradeId: "12",
|
|
960
|
+
marketingPreferences: {
|
|
961
|
+
email: true,
|
|
962
|
+
sms: false,
|
|
963
|
+
post: false,
|
|
964
|
+
gamingOptOut: false
|
|
965
|
+
},
|
|
966
|
+
expiresAt: null,
|
|
967
|
+
memberNumber: "12345",
|
|
968
|
+
externalSystemMemberId: "ext_998",
|
|
969
|
+
cardId: "card_77",
|
|
970
|
+
customFields: {},
|
|
971
|
+
createdAt: "2026-03-01T10:00:00.000Z",
|
|
972
|
+
updatedAt: "2026-04-02T01:23:45.000Z",
|
|
973
|
+
deletedAt: null
|
|
974
|
+
}
|
|
975
|
+
],
|
|
976
|
+
total: 1,
|
|
977
|
+
page: 1,
|
|
978
|
+
pageSize: 25,
|
|
979
|
+
totalPages: 1,
|
|
980
|
+
searchField: null,
|
|
981
|
+
searchValue: null,
|
|
982
|
+
sortBy: "memberNumber",
|
|
983
|
+
sortDirection: "asc",
|
|
984
|
+
responseMode: "full"
|
|
985
|
+
}
|
|
986
|
+
},
|
|
987
|
+
med: {
|
|
988
|
+
summary: "Medium response",
|
|
989
|
+
value: {
|
|
990
|
+
items: [
|
|
991
|
+
{
|
|
992
|
+
id: "mem_123",
|
|
993
|
+
organizationId: "org_1",
|
|
994
|
+
status: "active",
|
|
995
|
+
isSuspended: false,
|
|
996
|
+
displayName: "Jane Smith",
|
|
997
|
+
dob: "1988-06-14",
|
|
998
|
+
email: "jane@example.com",
|
|
999
|
+
preferredContactMethod: "sms",
|
|
1000
|
+
occupation: "Hospitality Manager",
|
|
1001
|
+
address: "12 Queen St, Cleveland, QLD, 4163, AU",
|
|
1002
|
+
addressParts: {
|
|
1003
|
+
line1: "12 Queen St",
|
|
1004
|
+
line2: null,
|
|
1005
|
+
suburb: "Cleveland",
|
|
1006
|
+
state: "QLD",
|
|
1007
|
+
postalCode: "4163",
|
|
1008
|
+
country: "AU"
|
|
1009
|
+
},
|
|
1010
|
+
membershipType: "Gold",
|
|
1011
|
+
membershipTypeId: "Gold",
|
|
1012
|
+
ratingGrade: "VIP",
|
|
1013
|
+
ratingGradeId: "12",
|
|
1014
|
+
memberNumber: "12345",
|
|
1015
|
+
externalSystemMemberId: "ext_998",
|
|
1016
|
+
cardId: "card_77",
|
|
1017
|
+
customFields: {},
|
|
1018
|
+
updatedAt: "2026-04-02T01:23:45.000Z"
|
|
1019
|
+
}
|
|
1020
|
+
],
|
|
1021
|
+
total: 1,
|
|
1022
|
+
page: 1,
|
|
1023
|
+
pageSize: 25,
|
|
1024
|
+
totalPages: 1,
|
|
1025
|
+
searchField: null,
|
|
1026
|
+
searchValue: null,
|
|
1027
|
+
sortBy: "name",
|
|
1028
|
+
sortDirection: "asc",
|
|
1029
|
+
responseMode: "med"
|
|
1030
|
+
}
|
|
1031
|
+
},
|
|
1032
|
+
basic: {
|
|
1033
|
+
summary: "Basic response",
|
|
1034
|
+
value: {
|
|
1035
|
+
items: [
|
|
1036
|
+
{
|
|
1037
|
+
id: "mem_123",
|
|
1038
|
+
displayName: "Jane Smith",
|
|
1039
|
+
dob: "1988-06-14",
|
|
1040
|
+
memberNumber: "12345"
|
|
1041
|
+
}
|
|
1042
|
+
],
|
|
1043
|
+
total: 1,
|
|
1044
|
+
page: 1,
|
|
1045
|
+
pageSize: 25,
|
|
1046
|
+
totalPages: 1,
|
|
1047
|
+
searchField: null,
|
|
1048
|
+
searchValue: null,
|
|
1049
|
+
sortBy: "dob",
|
|
1050
|
+
sortDirection: "desc",
|
|
1051
|
+
responseMode: "basic"
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
};
|
|
1055
|
+
var memberListExamplesTransform = (operation) => {
|
|
1056
|
+
const response = operation.responses?.["200"];
|
|
1057
|
+
const jsonContent = response?.content?.["application/json"];
|
|
1058
|
+
if (!response || !jsonContent) {
|
|
1059
|
+
return operation;
|
|
1060
|
+
}
|
|
1061
|
+
return {
|
|
1062
|
+
...operation,
|
|
1063
|
+
responses: {
|
|
1064
|
+
...operation.responses,
|
|
1065
|
+
200: {
|
|
1066
|
+
...response,
|
|
1067
|
+
content: {
|
|
1068
|
+
...response.content,
|
|
1069
|
+
"application/json": {
|
|
1070
|
+
...jsonContent,
|
|
1071
|
+
examples: organizationMembersListExamples
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
};
|
|
1077
|
+
};
|
|
1078
|
+
var memberExamples = {
|
|
1079
|
+
full: {
|
|
1080
|
+
summary: "Full response",
|
|
1081
|
+
value: {
|
|
1082
|
+
id: "mem_123",
|
|
1083
|
+
organizationId: "org_1",
|
|
1084
|
+
organizationMemberSourceId: "src_9",
|
|
1085
|
+
status: "active",
|
|
1086
|
+
isSuspended: false,
|
|
1087
|
+
recordMode: "source_managed",
|
|
1088
|
+
createdOrigin: "source_sync",
|
|
1089
|
+
createdOriginName: "Odyssey Gaming",
|
|
1090
|
+
archivedAt: null,
|
|
1091
|
+
sourceUpdatedAt: "2026-04-02T01:23:45.000Z",
|
|
1092
|
+
email: "jane@example.com",
|
|
1093
|
+
title: "Ms",
|
|
1094
|
+
firstName: "Jane",
|
|
1095
|
+
middleName: null,
|
|
1096
|
+
lastName: "Smith",
|
|
1097
|
+
displayName: "Jane Smith",
|
|
1098
|
+
dob: "1988-06-14",
|
|
1099
|
+
gender: null,
|
|
1100
|
+
mobilePhone: "+61400000000",
|
|
1101
|
+
homePhone: null,
|
|
1102
|
+
preferredContactMethod: "sms",
|
|
1103
|
+
occupation: "Hospitality Manager",
|
|
1104
|
+
address: "12 Queen St, Cleveland, QLD, 4163, AU",
|
|
1105
|
+
addressParts: {
|
|
1106
|
+
line1: "12 Queen St",
|
|
1107
|
+
line2: null,
|
|
1108
|
+
suburb: "Cleveland",
|
|
1109
|
+
state: "QLD",
|
|
1110
|
+
postalCode: "4163",
|
|
1111
|
+
country: "AU"
|
|
1112
|
+
},
|
|
1113
|
+
postalAddress: "PO Box 10, Cleveland, QLD, 4163, AU",
|
|
1114
|
+
postalAddressParts: {
|
|
1115
|
+
line1: "PO Box 10",
|
|
1116
|
+
line2: null,
|
|
1117
|
+
suburb: "Cleveland",
|
|
1118
|
+
state: "QLD",
|
|
1119
|
+
postalCode: "4163",
|
|
1120
|
+
country: "AU"
|
|
1121
|
+
},
|
|
1122
|
+
membershipType: "Gold",
|
|
1123
|
+
membershipTypeId: "Gold",
|
|
1124
|
+
ratingGrade: "VIP",
|
|
1125
|
+
ratingGradeId: "12",
|
|
1126
|
+
marketingPreferences: {
|
|
1127
|
+
email: true,
|
|
1128
|
+
sms: false,
|
|
1129
|
+
post: false,
|
|
1130
|
+
gamingOptOut: false
|
|
1131
|
+
},
|
|
1132
|
+
expiresAt: null,
|
|
1133
|
+
memberNumber: "12345",
|
|
1134
|
+
externalSystemMemberId: "ext_998",
|
|
1135
|
+
cardId: "card_77",
|
|
1136
|
+
customFields: {},
|
|
1137
|
+
createdAt: "2026-03-01T10:00:00.000Z",
|
|
1138
|
+
updatedAt: "2026-04-02T01:23:45.000Z",
|
|
1139
|
+
deletedAt: null,
|
|
1140
|
+
responseMode: "full"
|
|
1141
|
+
}
|
|
1142
|
+
},
|
|
1143
|
+
med: {
|
|
1144
|
+
summary: "Medium response",
|
|
1145
|
+
value: {
|
|
1146
|
+
id: "mem_123",
|
|
1147
|
+
organizationId: "org_1",
|
|
1148
|
+
status: "active",
|
|
1149
|
+
isSuspended: false,
|
|
1150
|
+
displayName: "Jane Smith",
|
|
1151
|
+
dob: "1988-06-14",
|
|
1152
|
+
email: "jane@example.com",
|
|
1153
|
+
preferredContactMethod: "sms",
|
|
1154
|
+
occupation: "Hospitality Manager",
|
|
1155
|
+
address: "12 Queen St, Cleveland, QLD, 4163, AU",
|
|
1156
|
+
addressParts: {
|
|
1157
|
+
line1: "12 Queen St",
|
|
1158
|
+
line2: null,
|
|
1159
|
+
suburb: "Cleveland",
|
|
1160
|
+
state: "QLD",
|
|
1161
|
+
postalCode: "4163",
|
|
1162
|
+
country: "AU"
|
|
1163
|
+
},
|
|
1164
|
+
membershipType: "Gold",
|
|
1165
|
+
membershipTypeId: "Gold",
|
|
1166
|
+
ratingGrade: "VIP",
|
|
1167
|
+
ratingGradeId: "12",
|
|
1168
|
+
memberNumber: "12345",
|
|
1169
|
+
externalSystemMemberId: "ext_998",
|
|
1170
|
+
cardId: "card_77",
|
|
1171
|
+
customFields: {},
|
|
1172
|
+
updatedAt: "2026-04-02T01:23:45.000Z",
|
|
1173
|
+
responseMode: "med"
|
|
1174
|
+
}
|
|
1175
|
+
},
|
|
1176
|
+
basic: {
|
|
1177
|
+
summary: "Basic response",
|
|
1178
|
+
value: {
|
|
1179
|
+
id: "mem_123",
|
|
1180
|
+
displayName: "Jane Smith",
|
|
1181
|
+
dob: "1988-06-14",
|
|
1182
|
+
memberNumber: "12345",
|
|
1183
|
+
responseMode: "basic"
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
};
|
|
1187
|
+
var bulkMemberExamples = {
|
|
1188
|
+
requestExamples: {
|
|
1189
|
+
default: {
|
|
1190
|
+
summary: "Bulk member lookup request",
|
|
1191
|
+
value: {
|
|
1192
|
+
ids: ["mem_123", "mem_999", "mem_456"],
|
|
1193
|
+
responseMode: "med"
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
},
|
|
1197
|
+
responseExamples: {
|
|
1198
|
+
med: {
|
|
1199
|
+
summary: "Bulk member lookup response",
|
|
1200
|
+
value: {
|
|
1201
|
+
requestedIds: ["mem_123", "mem_999", "mem_456"],
|
|
1202
|
+
missingIds: ["mem_999"],
|
|
1203
|
+
items: [
|
|
1204
|
+
{
|
|
1205
|
+
id: "mem_123",
|
|
1206
|
+
organizationId: "org_1",
|
|
1207
|
+
status: "active",
|
|
1208
|
+
isSuspended: false,
|
|
1209
|
+
displayName: "Jane Smith",
|
|
1210
|
+
dob: "1988-06-14",
|
|
1211
|
+
email: "jane@example.com",
|
|
1212
|
+
preferredContactMethod: "sms",
|
|
1213
|
+
occupation: "Hospitality Manager",
|
|
1214
|
+
address: "12 Queen St, Cleveland, QLD, 4163, AU",
|
|
1215
|
+
addressParts: {
|
|
1216
|
+
line1: "12 Queen St",
|
|
1217
|
+
line2: null,
|
|
1218
|
+
suburb: "Cleveland",
|
|
1219
|
+
state: "QLD",
|
|
1220
|
+
postalCode: "4163",
|
|
1221
|
+
country: "AU"
|
|
1222
|
+
},
|
|
1223
|
+
membershipType: "Gold",
|
|
1224
|
+
membershipTypeId: "Gold",
|
|
1225
|
+
ratingGrade: "VIP",
|
|
1226
|
+
ratingGradeId: "12",
|
|
1227
|
+
memberNumber: "12345",
|
|
1228
|
+
externalSystemMemberId: "ext_998",
|
|
1229
|
+
cardId: "card_77",
|
|
1230
|
+
customFields: {},
|
|
1231
|
+
updatedAt: "2026-04-02T01:23:45.000Z"
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
id: "mem_456",
|
|
1235
|
+
organizationId: "org_1",
|
|
1236
|
+
status: "expired",
|
|
1237
|
+
isSuspended: false,
|
|
1238
|
+
displayName: "Howard Sorrell",
|
|
1239
|
+
dob: "1967-05-09",
|
|
1240
|
+
email: null,
|
|
1241
|
+
preferredContactMethod: null,
|
|
1242
|
+
occupation: null,
|
|
1243
|
+
address: null,
|
|
1244
|
+
addressParts: null,
|
|
1245
|
+
membershipType: "Standard",
|
|
1246
|
+
membershipTypeId: "Standard",
|
|
1247
|
+
ratingGrade: null,
|
|
1248
|
+
ratingGradeId: null,
|
|
1249
|
+
memberNumber: "560",
|
|
1250
|
+
externalSystemMemberId: null,
|
|
1251
|
+
cardId: null,
|
|
1252
|
+
customFields: {},
|
|
1253
|
+
updatedAt: "2026-04-16T04:10:58.275Z"
|
|
1254
|
+
}
|
|
1255
|
+
],
|
|
1256
|
+
responseMode: "med"
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1259
|
+
}
|
|
1260
|
+
};
|
|
1261
|
+
var memberExamplesTransform = (operation) => {
|
|
1262
|
+
const response = operation.responses?.["200"];
|
|
1263
|
+
const jsonContent = response?.content?.["application/json"];
|
|
1264
|
+
if (!response || !jsonContent) {
|
|
1265
|
+
return operation;
|
|
1266
|
+
}
|
|
1267
|
+
return {
|
|
1268
|
+
...operation,
|
|
1269
|
+
responses: {
|
|
1270
|
+
...operation.responses,
|
|
1271
|
+
200: {
|
|
1272
|
+
...response,
|
|
1273
|
+
content: {
|
|
1274
|
+
...response.content,
|
|
1275
|
+
"application/json": {
|
|
1276
|
+
...jsonContent,
|
|
1277
|
+
examples: memberExamples
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
}
|
|
1281
|
+
}
|
|
1282
|
+
};
|
|
1283
|
+
};
|
|
1284
|
+
var guestListExamples = {
|
|
1285
|
+
default: {
|
|
1286
|
+
summary: "Paginated guest list",
|
|
1287
|
+
value: {
|
|
1288
|
+
items: [
|
|
1289
|
+
{
|
|
1290
|
+
id: "gst_123",
|
|
1291
|
+
organizationId: "org_1",
|
|
1292
|
+
email: "jane.guest@example.com",
|
|
1293
|
+
mobilePhone: "+61490451502",
|
|
1294
|
+
firstName: "Jane",
|
|
1295
|
+
lastName: "Citizen",
|
|
1296
|
+
meta: {
|
|
1297
|
+
loyaltyTier: "silver",
|
|
1298
|
+
preferredHost: "Alex"
|
|
1299
|
+
},
|
|
1300
|
+
marketingPreferences: {
|
|
1301
|
+
email: true,
|
|
1302
|
+
sms: true,
|
|
1303
|
+
post: false,
|
|
1304
|
+
gamingOptOut: false
|
|
1305
|
+
},
|
|
1306
|
+
status: "active",
|
|
1307
|
+
createdAt: "2026-03-12T09:15:00.000Z",
|
|
1308
|
+
updatedAt: "2026-04-02T01:23:45.000Z",
|
|
1309
|
+
deletedAt: null
|
|
1310
|
+
}
|
|
1311
|
+
],
|
|
1312
|
+
total: 1,
|
|
1313
|
+
page: 1,
|
|
1314
|
+
pageSize: 25,
|
|
1315
|
+
totalPages: 1,
|
|
1316
|
+
name: null,
|
|
1317
|
+
email: null,
|
|
1318
|
+
mobilePhone: null
|
|
1319
|
+
}
|
|
1320
|
+
},
|
|
1321
|
+
mobileOnly: {
|
|
1322
|
+
summary: "Guest with mobile phone only",
|
|
1323
|
+
value: {
|
|
1324
|
+
items: [
|
|
1325
|
+
{
|
|
1326
|
+
id: "gst_456",
|
|
1327
|
+
organizationId: "org_1",
|
|
1328
|
+
email: null,
|
|
1329
|
+
mobilePhone: "+61411111111",
|
|
1330
|
+
firstName: "Morgan",
|
|
1331
|
+
lastName: "Walker",
|
|
1332
|
+
meta: {},
|
|
1333
|
+
marketingPreferences: {
|
|
1334
|
+
email: false,
|
|
1335
|
+
sms: true,
|
|
1336
|
+
post: false,
|
|
1337
|
+
gamingOptOut: false
|
|
1338
|
+
},
|
|
1339
|
+
status: "active",
|
|
1340
|
+
createdAt: "2026-04-10T02:15:00.000Z",
|
|
1341
|
+
updatedAt: "2026-04-10T02:15:00.000Z",
|
|
1342
|
+
deletedAt: null
|
|
1343
|
+
}
|
|
1344
|
+
],
|
|
1345
|
+
total: 1,
|
|
1346
|
+
page: 1,
|
|
1347
|
+
pageSize: 25,
|
|
1348
|
+
totalPages: 1,
|
|
1349
|
+
name: null,
|
|
1350
|
+
email: null,
|
|
1351
|
+
mobilePhone: "+61411111111"
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
};
|
|
1355
|
+
var guestListExamplesTransform = (operation) => {
|
|
1356
|
+
const response = operation.responses?.["200"];
|
|
1357
|
+
const jsonContent = response?.content?.["application/json"];
|
|
1358
|
+
if (!response || !jsonContent) {
|
|
1359
|
+
return operation;
|
|
1360
|
+
}
|
|
1361
|
+
return {
|
|
1362
|
+
...operation,
|
|
1363
|
+
responses: {
|
|
1364
|
+
...operation.responses,
|
|
1365
|
+
200: {
|
|
1366
|
+
...response,
|
|
1367
|
+
content: {
|
|
1368
|
+
...response.content,
|
|
1369
|
+
"application/json": {
|
|
1370
|
+
...jsonContent,
|
|
1371
|
+
examples: guestListExamples
|
|
1372
|
+
}
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
}
|
|
1376
|
+
};
|
|
1377
|
+
};
|
|
1378
|
+
var peopleContactSearchExamples = {
|
|
1379
|
+
byMobile: {
|
|
1380
|
+
summary: "Matching member and guest by mobile phone",
|
|
1381
|
+
value: {
|
|
1382
|
+
email: null,
|
|
1383
|
+
mobilePhone: "+61490451502",
|
|
1384
|
+
members: [
|
|
1385
|
+
{
|
|
1386
|
+
id: "mem_123",
|
|
1387
|
+
organizationId: "org_1",
|
|
1388
|
+
displayName: "Jane Smith",
|
|
1389
|
+
email: "jane@example.com",
|
|
1390
|
+
mobilePhone: "+61490451502",
|
|
1391
|
+
dob: "1988-06-14",
|
|
1392
|
+
memberNumber: "12345",
|
|
1393
|
+
externalSystemMemberId: "ext_998",
|
|
1394
|
+
cardId: "card_77",
|
|
1395
|
+
status: "active",
|
|
1396
|
+
updatedAt: "2026-04-02T01:23:45.000Z"
|
|
1397
|
+
}
|
|
1398
|
+
],
|
|
1399
|
+
guests: [
|
|
1400
|
+
{
|
|
1401
|
+
id: "gst_123",
|
|
1402
|
+
organizationId: "org_1",
|
|
1403
|
+
firstName: "Jane",
|
|
1404
|
+
lastName: "Citizen",
|
|
1405
|
+
email: "jane.guest@example.com",
|
|
1406
|
+
mobilePhone: "+61490451502",
|
|
1407
|
+
status: "active",
|
|
1408
|
+
updatedAt: "2026-04-01T11:00:00.000Z"
|
|
1409
|
+
}
|
|
1410
|
+
]
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
};
|
|
1414
|
+
var peopleContactSearchExamplesTransform = (operation) => {
|
|
1415
|
+
const response = operation.responses?.["200"];
|
|
1416
|
+
const jsonContent = response?.content?.["application/json"];
|
|
1417
|
+
if (!response || !jsonContent) {
|
|
1418
|
+
return operation;
|
|
1419
|
+
}
|
|
1420
|
+
return {
|
|
1421
|
+
...operation,
|
|
1422
|
+
responses: {
|
|
1423
|
+
...operation.responses,
|
|
1424
|
+
200: {
|
|
1425
|
+
...response,
|
|
1426
|
+
content: {
|
|
1427
|
+
...response.content,
|
|
1428
|
+
"application/json": {
|
|
1429
|
+
...jsonContent,
|
|
1430
|
+
examples: peopleContactSearchExamples
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
};
|
|
1436
|
+
};
|
|
1437
|
+
var withOpenApiExamples = ({
|
|
1438
|
+
requestExamples,
|
|
1439
|
+
responseExamples,
|
|
1440
|
+
responseStatus = "200"
|
|
1441
|
+
}) => {
|
|
1442
|
+
return (operation) => {
|
|
1443
|
+
const requestBody = operation.requestBody;
|
|
1444
|
+
const requestJsonContent = requestBody?.content?.["application/json"];
|
|
1445
|
+
const response = operation.responses?.[responseStatus];
|
|
1446
|
+
const responseJsonContent = response?.content?.["application/json"];
|
|
1447
|
+
return {
|
|
1448
|
+
...operation,
|
|
1449
|
+
requestBody: requestBody && requestJsonContent && requestExamples ? {
|
|
1450
|
+
...requestBody,
|
|
1451
|
+
content: {
|
|
1452
|
+
...requestBody.content,
|
|
1453
|
+
"application/json": {
|
|
1454
|
+
...requestJsonContent,
|
|
1455
|
+
examples: requestExamples
|
|
1456
|
+
}
|
|
1457
|
+
}
|
|
1458
|
+
} : requestBody,
|
|
1459
|
+
responses: response && responseJsonContent && responseExamples ? {
|
|
1460
|
+
...operation.responses,
|
|
1461
|
+
[responseStatus]: {
|
|
1462
|
+
...response,
|
|
1463
|
+
content: {
|
|
1464
|
+
...response.content,
|
|
1465
|
+
"application/json": {
|
|
1466
|
+
...responseJsonContent,
|
|
1467
|
+
examples: responseExamples
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1471
|
+
} : operation.responses
|
|
1472
|
+
};
|
|
1473
|
+
};
|
|
1474
|
+
};
|
|
1475
|
+
var bulkMemberExamplesTransform = withOpenApiExamples(bulkMemberExamples);
|
|
1476
|
+
var organizationWriteExamplesTransform = withOpenApiExamples({
|
|
1477
|
+
requestExamples: {
|
|
1478
|
+
default: {
|
|
1479
|
+
summary: "Create organization request",
|
|
1480
|
+
value: {
|
|
1481
|
+
slug: "redlands-rsl",
|
|
1482
|
+
name: "Redlands RSL",
|
|
1483
|
+
legalName: "Redlands RSL Club Ltd",
|
|
1484
|
+
description: "Main venue organization for Redlands.",
|
|
1485
|
+
externalReference: "venue_redlands",
|
|
1486
|
+
products: ["member_portal", "onsite_kiosk"]
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
},
|
|
1490
|
+
responseExamples: {
|
|
1491
|
+
default: {
|
|
1492
|
+
summary: "Organization response",
|
|
1493
|
+
value: {
|
|
1494
|
+
id: "org_1",
|
|
1495
|
+
slug: "redlands-rsl",
|
|
1496
|
+
name: "Redlands RSL",
|
|
1497
|
+
legalName: "Redlands RSL Club Ltd",
|
|
1498
|
+
status: "active",
|
|
1499
|
+
description: "Main venue organization for Redlands.",
|
|
1500
|
+
externalReference: "venue_redlands",
|
|
1501
|
+
createdAt: "2026-04-07T21:02:05.123Z",
|
|
1502
|
+
updatedAt: "2026-04-07T21:02:05.123Z",
|
|
1503
|
+
products: ["member_portal", "onsite_kiosk"],
|
|
1504
|
+
deletedAt: null
|
|
1505
|
+
}
|
|
1506
|
+
}
|
|
1507
|
+
},
|
|
1508
|
+
responseStatus: "201"
|
|
1509
|
+
});
|
|
1510
|
+
var organizationUpdateExamplesTransform = withOpenApiExamples({
|
|
1511
|
+
requestExamples: {
|
|
1512
|
+
default: {
|
|
1513
|
+
summary: "Update organization request",
|
|
1514
|
+
value: {
|
|
1515
|
+
name: "Redlands RSL and Memorial Club",
|
|
1516
|
+
description: "Primary venue organization and membership operator.",
|
|
1517
|
+
products: ["member_portal", "csv_imports"]
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
},
|
|
1521
|
+
responseExamples: {
|
|
1522
|
+
default: {
|
|
1523
|
+
summary: "Updated organization response",
|
|
1524
|
+
value: {
|
|
1525
|
+
id: "org_1",
|
|
1526
|
+
slug: "redlands-rsl",
|
|
1527
|
+
name: "Redlands RSL and Memorial Club",
|
|
1528
|
+
legalName: "Redlands RSL Club Ltd",
|
|
1529
|
+
status: "active",
|
|
1530
|
+
description: "Primary venue organization and membership operator.",
|
|
1531
|
+
externalReference: "venue_redlands",
|
|
1532
|
+
products: ["member_portal", "csv_imports"],
|
|
1533
|
+
createdAt: "2026-04-01T10:00:00.000Z",
|
|
1534
|
+
updatedAt: "2026-04-07T21:02:05.123Z",
|
|
1535
|
+
deletedAt: null
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
});
|
|
1540
|
+
var deletePayloadExamplesTransform = withOpenApiExamples({
|
|
1541
|
+
requestExamples: {
|
|
1542
|
+
default: {
|
|
1543
|
+
summary: "Archive request",
|
|
1544
|
+
value: {
|
|
1545
|
+
expectedUpdatedAt: "2026-04-07T21:02:05.123Z"
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
}
|
|
1549
|
+
});
|
|
1550
|
+
var createMemberExamplesTransform = withOpenApiExamples({
|
|
1551
|
+
requestExamples: {
|
|
1552
|
+
default: {
|
|
1553
|
+
summary: "Create member request",
|
|
1554
|
+
value: {
|
|
1555
|
+
email: "jane@example.com",
|
|
1556
|
+
title: "Ms",
|
|
1557
|
+
firstName: "Jane",
|
|
1558
|
+
middleName: null,
|
|
1559
|
+
lastName: "Smith",
|
|
1560
|
+
dob: "1988-06-14",
|
|
1561
|
+
gender: null,
|
|
1562
|
+
mobilePhone: "+61490451502",
|
|
1563
|
+
homePhone: null,
|
|
1564
|
+
preferredContactMethod: "sms",
|
|
1565
|
+
occupation: "Hospitality Manager",
|
|
1566
|
+
address: "12 Queen St, Cleveland, QLD, 4163, AU",
|
|
1567
|
+
addressParts: {
|
|
1568
|
+
line1: "12 Queen St",
|
|
1569
|
+
line2: null,
|
|
1570
|
+
suburb: "Cleveland",
|
|
1571
|
+
state: "QLD",
|
|
1572
|
+
postalCode: "4163",
|
|
1573
|
+
country: "AU"
|
|
1574
|
+
},
|
|
1575
|
+
postalAddress: null,
|
|
1576
|
+
postalAddressParts: null,
|
|
1577
|
+
membershipType: "Gold",
|
|
1578
|
+
membershipTypeId: "Gold",
|
|
1579
|
+
ratingGrade: "VIP",
|
|
1580
|
+
ratingGradeId: "12",
|
|
1581
|
+
marketingPreferences: {
|
|
1582
|
+
email: true,
|
|
1583
|
+
sms: true,
|
|
1584
|
+
post: false,
|
|
1585
|
+
gamingOptOut: false
|
|
1586
|
+
},
|
|
1587
|
+
expiresAt: null,
|
|
1588
|
+
memberNumber: "12345",
|
|
1589
|
+
externalSystemMemberId: "ext_998",
|
|
1590
|
+
cardId: "card_77",
|
|
1591
|
+
customFields: {
|
|
1592
|
+
preferredLanguage: "en"
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
},
|
|
1597
|
+
responseExamples: {
|
|
1598
|
+
default: {
|
|
1599
|
+
summary: "Created member response",
|
|
1600
|
+
value: {
|
|
1601
|
+
id: "mem_123",
|
|
1602
|
+
organizationId: "org_1",
|
|
1603
|
+
organizationMemberSourceId: null,
|
|
1604
|
+
status: "active",
|
|
1605
|
+
isSuspended: false,
|
|
1606
|
+
recordMode: "local",
|
|
1607
|
+
createdOrigin: "hub_admin",
|
|
1608
|
+
createdOriginName: null,
|
|
1609
|
+
archivedAt: null,
|
|
1610
|
+
sourceUpdatedAt: null,
|
|
1611
|
+
email: "jane@example.com",
|
|
1612
|
+
title: "Ms",
|
|
1613
|
+
firstName: "Jane",
|
|
1614
|
+
middleName: null,
|
|
1615
|
+
lastName: "Smith",
|
|
1616
|
+
displayName: "Ms Jane Smith",
|
|
1617
|
+
dob: "1988-06-14",
|
|
1618
|
+
gender: null,
|
|
1619
|
+
mobilePhone: "+61490451502",
|
|
1620
|
+
homePhone: null,
|
|
1621
|
+
preferredContactMethod: "sms",
|
|
1622
|
+
occupation: "Hospitality Manager",
|
|
1623
|
+
address: {
|
|
1624
|
+
line1: "12 Queen St",
|
|
1625
|
+
line2: null,
|
|
1626
|
+
suburb: "Cleveland",
|
|
1627
|
+
state: "QLD",
|
|
1628
|
+
postalCode: "4163",
|
|
1629
|
+
country: "AU"
|
|
1630
|
+
},
|
|
1631
|
+
postalAddress: null,
|
|
1632
|
+
membershipType: "Gold",
|
|
1633
|
+
membershipTypeId: "Gold",
|
|
1634
|
+
ratingGrade: "VIP",
|
|
1635
|
+
ratingGradeId: "12",
|
|
1636
|
+
marketingPreferences: {
|
|
1637
|
+
email: true,
|
|
1638
|
+
sms: true,
|
|
1639
|
+
post: false,
|
|
1640
|
+
gamingOptOut: false
|
|
1641
|
+
},
|
|
1642
|
+
expiresAt: null,
|
|
1643
|
+
memberNumber: "12345",
|
|
1644
|
+
externalSystemMemberId: "ext_998",
|
|
1645
|
+
cardId: "card_77",
|
|
1646
|
+
customFields: {
|
|
1647
|
+
preferredLanguage: "en"
|
|
1648
|
+
},
|
|
1649
|
+
createdAt: "2026-04-07T21:02:05.123Z",
|
|
1650
|
+
updatedAt: "2026-04-07T21:02:05.123Z",
|
|
1651
|
+
deletedAt: null
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
responseStatus: "201"
|
|
1656
|
+
});
|
|
1657
|
+
var updateMemberExamplesTransform = withOpenApiExamples({
|
|
1658
|
+
requestExamples: {
|
|
1659
|
+
default: {
|
|
1660
|
+
summary: "Update member request",
|
|
1661
|
+
value: {
|
|
1662
|
+
expectedUpdatedAt: "2026-04-07T21:02:05.123Z",
|
|
1663
|
+
mobilePhone: "+61411111111",
|
|
1664
|
+
preferredContactMethod: "email",
|
|
1665
|
+
occupation: "Events Coordinator",
|
|
1666
|
+
membershipType: "Platinum",
|
|
1667
|
+
membershipTypeId: "Platinum",
|
|
1668
|
+
marketingPreferences: {
|
|
1669
|
+
email: true,
|
|
1670
|
+
sms: false,
|
|
1671
|
+
post: false,
|
|
1672
|
+
gamingOptOut: false
|
|
1673
|
+
},
|
|
1674
|
+
customFields: {
|
|
1675
|
+
preferredLanguage: "en",
|
|
1676
|
+
preferredContactTime: "afternoon"
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
},
|
|
1681
|
+
responseExamples: {
|
|
1682
|
+
default: {
|
|
1683
|
+
summary: "Updated member response",
|
|
1684
|
+
value: {
|
|
1685
|
+
id: "mem_123",
|
|
1686
|
+
organizationId: "org_1",
|
|
1687
|
+
organizationMemberSourceId: null,
|
|
1688
|
+
status: "active",
|
|
1689
|
+
isSuspended: false,
|
|
1690
|
+
recordMode: "local",
|
|
1691
|
+
createdOrigin: "hub_admin",
|
|
1692
|
+
createdOriginName: null,
|
|
1693
|
+
archivedAt: null,
|
|
1694
|
+
sourceUpdatedAt: null,
|
|
1695
|
+
email: "jane@example.com",
|
|
1696
|
+
title: "Ms",
|
|
1697
|
+
firstName: "Jane",
|
|
1698
|
+
middleName: null,
|
|
1699
|
+
lastName: "Smith",
|
|
1700
|
+
displayName: "Ms Jane Smith",
|
|
1701
|
+
dob: "1988-06-14",
|
|
1702
|
+
gender: null,
|
|
1703
|
+
mobilePhone: "+61411111111",
|
|
1704
|
+
homePhone: null,
|
|
1705
|
+
preferredContactMethod: "email",
|
|
1706
|
+
occupation: "Events Coordinator",
|
|
1707
|
+
address: null,
|
|
1708
|
+
addressParts: null,
|
|
1709
|
+
postalAddress: null,
|
|
1710
|
+
postalAddressParts: null,
|
|
1711
|
+
membershipType: "Platinum",
|
|
1712
|
+
membershipTypeId: "Platinum",
|
|
1713
|
+
ratingGrade: "VIP",
|
|
1714
|
+
ratingGradeId: "12",
|
|
1715
|
+
marketingPreferences: {
|
|
1716
|
+
email: true,
|
|
1717
|
+
sms: false,
|
|
1718
|
+
post: false,
|
|
1719
|
+
gamingOptOut: false
|
|
1720
|
+
},
|
|
1721
|
+
expiresAt: null,
|
|
1722
|
+
memberNumber: "12345",
|
|
1723
|
+
externalSystemMemberId: "ext_998",
|
|
1724
|
+
cardId: "card_77",
|
|
1725
|
+
customFields: {
|
|
1726
|
+
preferredLanguage: "en",
|
|
1727
|
+
preferredContactTime: "afternoon"
|
|
1728
|
+
},
|
|
1729
|
+
createdAt: "2026-04-01T10:00:00.000Z",
|
|
1730
|
+
updatedAt: "2026-04-07T21:15:00.000Z",
|
|
1731
|
+
deletedAt: null
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
});
|
|
1736
|
+
var sourceManagedCreateExamplesTransform = withOpenApiExamples({
|
|
1737
|
+
requestExamples: {
|
|
1738
|
+
default: {
|
|
1739
|
+
summary: "Source-managed member create request",
|
|
1740
|
+
value: {
|
|
1741
|
+
email: "jane@example.com",
|
|
1742
|
+
firstName: "Jane",
|
|
1743
|
+
lastName: "Smith",
|
|
1744
|
+
dob: "1988-06-14",
|
|
1745
|
+
mobilePhone: "+61490451502",
|
|
1746
|
+
preferredContactMethod: "sms",
|
|
1747
|
+
occupation: "Hospitality Manager",
|
|
1748
|
+
memberNumber: "12345"
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
},
|
|
1752
|
+
responseExamples: {
|
|
1753
|
+
default: {
|
|
1754
|
+
summary: "Queued source-managed create command",
|
|
1755
|
+
value: {
|
|
1756
|
+
id: "cmd_123",
|
|
1757
|
+
organizationId: "org_1",
|
|
1758
|
+
organizationMemberSourceId: "src_9",
|
|
1759
|
+
organizationMemberSourceAgentId: "agt_1",
|
|
1760
|
+
kind: "create_member",
|
|
1761
|
+
status: "pending",
|
|
1762
|
+
payload: {
|
|
1763
|
+
firstName: "Jane",
|
|
1764
|
+
lastName: "Smith",
|
|
1765
|
+
mobilePhone: "+61490451502",
|
|
1766
|
+
preferredContactMethod: "sms",
|
|
1767
|
+
occupation: "Hospitality Manager"
|
|
1768
|
+
},
|
|
1769
|
+
result: null,
|
|
1770
|
+
errorMessage: null,
|
|
1771
|
+
requestedAt: "2026-04-07T21:02:05.123Z",
|
|
1772
|
+
acceptedAt: null,
|
|
1773
|
+
completedAt: null,
|
|
1774
|
+
createdAt: "2026-04-07T21:02:05.123Z",
|
|
1775
|
+
updatedAt: "2026-04-07T21:02:05.123Z",
|
|
1776
|
+
deletedAt: null
|
|
1777
|
+
}
|
|
1778
|
+
}
|
|
1779
|
+
},
|
|
1780
|
+
responseStatus: "202"
|
|
1781
|
+
});
|
|
1782
|
+
var sourceManagedRenewalExamplesTransform = withOpenApiExamples({
|
|
1783
|
+
requestExamples: {
|
|
1784
|
+
default: {
|
|
1785
|
+
summary: "Source-managed renewal request",
|
|
1786
|
+
value: {
|
|
1787
|
+
expectedUpdatedAt: "2026-04-07T21:02:05.123Z",
|
|
1788
|
+
expiresAt: "2027-06-30T00:00:00.000Z",
|
|
1789
|
+
previousExpiresAt: "2026-06-30T00:00:00.000Z"
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
},
|
|
1793
|
+
responseExamples: {
|
|
1794
|
+
default: {
|
|
1795
|
+
summary: "Queued source-managed renewal command",
|
|
1796
|
+
value: {
|
|
1797
|
+
id: "cmd_456",
|
|
1798
|
+
organizationId: "org_1",
|
|
1799
|
+
organizationMemberSourceId: "src_9",
|
|
1800
|
+
organizationMemberSourceAgentId: "agt_1",
|
|
1801
|
+
kind: "renew_member",
|
|
1802
|
+
status: "pending",
|
|
1803
|
+
payload: {
|
|
1804
|
+
expiresAt: "2027-06-30T00:00:00.000Z",
|
|
1805
|
+
previousExpiresAt: "2026-06-30T00:00:00.000Z"
|
|
1806
|
+
},
|
|
1807
|
+
result: null,
|
|
1808
|
+
errorMessage: null,
|
|
1809
|
+
requestedAt: "2026-04-07T21:02:05.123Z",
|
|
1810
|
+
acceptedAt: null,
|
|
1811
|
+
completedAt: null,
|
|
1812
|
+
createdAt: "2026-04-07T21:02:05.123Z",
|
|
1813
|
+
updatedAt: "2026-04-07T21:02:05.123Z",
|
|
1814
|
+
deletedAt: null
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
},
|
|
1818
|
+
responseStatus: "202"
|
|
1819
|
+
});
|
|
1820
|
+
var sourceManagedUpdateExamplesTransform = withOpenApiExamples({
|
|
1821
|
+
requestExamples: {
|
|
1822
|
+
default: {
|
|
1823
|
+
summary: "Source-managed member update request",
|
|
1824
|
+
value: {
|
|
1825
|
+
expectedUpdatedAt: "2026-04-07T21:02:05.123Z",
|
|
1826
|
+
mobilePhone: "+61411111111",
|
|
1827
|
+
email: "jane.smith.updated@example.com",
|
|
1828
|
+
preferredContactMethod: "email",
|
|
1829
|
+
occupation: "Events Coordinator",
|
|
1830
|
+
marketingPreferences: {
|
|
1831
|
+
email: true,
|
|
1832
|
+
sms: false,
|
|
1833
|
+
post: true,
|
|
1834
|
+
gamingOptOut: false
|
|
1835
|
+
},
|
|
1836
|
+
address: {
|
|
1837
|
+
line1: "12 River Lane",
|
|
1838
|
+
suburb: "Brisbane",
|
|
1839
|
+
state: "QLD",
|
|
1840
|
+
postalCode: "4000",
|
|
1841
|
+
country: "AU"
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
},
|
|
1846
|
+
responseExamples: {
|
|
1847
|
+
default: {
|
|
1848
|
+
summary: "Queued source-managed update command",
|
|
1849
|
+
value: {
|
|
1850
|
+
id: "cmd_457",
|
|
1851
|
+
organizationId: "org_1",
|
|
1852
|
+
organizationMemberSourceId: "src_9",
|
|
1853
|
+
organizationMemberSourceAgentId: "agt_1",
|
|
1854
|
+
kind: "update_member",
|
|
1855
|
+
status: "pending",
|
|
1856
|
+
payload: {
|
|
1857
|
+
memberId: "mem_123",
|
|
1858
|
+
externalSystemMemberId: "ext_456",
|
|
1859
|
+
mobilePhone: "+61411111111",
|
|
1860
|
+
email: "jane.smith.updated@example.com",
|
|
1861
|
+
preferredContactMethod: "email",
|
|
1862
|
+
occupation: "Events Coordinator",
|
|
1863
|
+
marketingPreferences: {
|
|
1864
|
+
email: true,
|
|
1865
|
+
sms: false,
|
|
1866
|
+
post: true,
|
|
1867
|
+
gamingOptOut: false
|
|
1868
|
+
}
|
|
1869
|
+
},
|
|
1870
|
+
result: null,
|
|
1871
|
+
errorMessage: null,
|
|
1872
|
+
requestedAt: "2026-04-07T21:02:05.123Z",
|
|
1873
|
+
acceptedAt: null,
|
|
1874
|
+
completedAt: null,
|
|
1875
|
+
createdAt: "2026-04-07T21:02:05.123Z",
|
|
1876
|
+
updatedAt: "2026-04-07T21:02:05.123Z",
|
|
1877
|
+
deletedAt: null
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
},
|
|
1881
|
+
responseStatus: "202"
|
|
1882
|
+
});
|
|
1883
|
+
var createGuestExamplesTransform = withOpenApiExamples({
|
|
1884
|
+
requestExamples: {
|
|
1885
|
+
default: {
|
|
1886
|
+
summary: "Create guest request",
|
|
1887
|
+
value: {
|
|
1888
|
+
email: "jane.guest@example.com",
|
|
1889
|
+
mobilePhone: "+61490451502",
|
|
1890
|
+
firstName: "Jane",
|
|
1891
|
+
lastName: "Citizen",
|
|
1892
|
+
meta: {
|
|
1893
|
+
loyaltyTier: "silver",
|
|
1894
|
+
referredBy: "front-desk"
|
|
1895
|
+
},
|
|
1896
|
+
marketingPreferences: {
|
|
1897
|
+
email: true,
|
|
1898
|
+
sms: true,
|
|
1899
|
+
post: false,
|
|
1900
|
+
gamingOptOut: false
|
|
1901
|
+
}
|
|
1902
|
+
}
|
|
1903
|
+
},
|
|
1904
|
+
mobileOnly: {
|
|
1905
|
+
summary: "Create guest with mobile phone only",
|
|
1906
|
+
value: {
|
|
1907
|
+
mobilePhone: "+61411111111",
|
|
1908
|
+
firstName: "Morgan",
|
|
1909
|
+
lastName: "Walker",
|
|
1910
|
+
marketingPreferences: {
|
|
1911
|
+
email: false,
|
|
1912
|
+
sms: true,
|
|
1913
|
+
post: false,
|
|
1914
|
+
gamingOptOut: false
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
}
|
|
1918
|
+
},
|
|
1919
|
+
responseExamples: {
|
|
1920
|
+
default: {
|
|
1921
|
+
summary: "Created guest response",
|
|
1922
|
+
value: {
|
|
1923
|
+
id: "gst_123",
|
|
1924
|
+
organizationId: "org_1",
|
|
1925
|
+
email: "jane.guest@example.com",
|
|
1926
|
+
mobilePhone: "+61490451502",
|
|
1927
|
+
firstName: "Jane",
|
|
1928
|
+
lastName: "Citizen",
|
|
1929
|
+
meta: {
|
|
1930
|
+
loyaltyTier: "silver",
|
|
1931
|
+
referredBy: "front-desk"
|
|
1932
|
+
},
|
|
1933
|
+
marketingPreferences: {
|
|
1934
|
+
email: true,
|
|
1935
|
+
sms: true,
|
|
1936
|
+
post: false,
|
|
1937
|
+
gamingOptOut: false
|
|
1938
|
+
},
|
|
1939
|
+
status: "active",
|
|
1940
|
+
createdAt: "2026-04-07T21:02:05.123Z",
|
|
1941
|
+
updatedAt: "2026-04-07T21:02:05.123Z",
|
|
1942
|
+
deletedAt: null
|
|
1943
|
+
}
|
|
1944
|
+
},
|
|
1945
|
+
mobileOnly: {
|
|
1946
|
+
summary: "Created guest without an email",
|
|
1947
|
+
value: {
|
|
1948
|
+
id: "gst_456",
|
|
1949
|
+
organizationId: "org_1",
|
|
1950
|
+
email: null,
|
|
1951
|
+
mobilePhone: "+61411111111",
|
|
1952
|
+
firstName: "Morgan",
|
|
1953
|
+
lastName: "Walker",
|
|
1954
|
+
meta: {},
|
|
1955
|
+
marketingPreferences: {
|
|
1956
|
+
email: false,
|
|
1957
|
+
sms: true,
|
|
1958
|
+
post: false,
|
|
1959
|
+
gamingOptOut: false
|
|
1960
|
+
},
|
|
1961
|
+
status: "active",
|
|
1962
|
+
createdAt: "2026-04-07T21:02:05.123Z",
|
|
1963
|
+
updatedAt: "2026-04-07T21:02:05.123Z",
|
|
1964
|
+
deletedAt: null
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
},
|
|
1968
|
+
responseStatus: "201"
|
|
1969
|
+
});
|
|
1970
|
+
var updateGuestExamplesTransform = withOpenApiExamples({
|
|
1971
|
+
requestExamples: {
|
|
1972
|
+
default: {
|
|
1973
|
+
summary: "Update guest request",
|
|
1974
|
+
value: {
|
|
1975
|
+
expectedUpdatedAt: "2026-04-07T21:02:05.123Z",
|
|
1976
|
+
mobilePhone: "+61411111111",
|
|
1977
|
+
meta: {
|
|
1978
|
+
loyaltyTier: "gold",
|
|
1979
|
+
preferredTableArea: "terrace"
|
|
1980
|
+
},
|
|
1981
|
+
marketingPreferences: {
|
|
1982
|
+
email: true,
|
|
1983
|
+
sms: false,
|
|
1984
|
+
post: false,
|
|
1985
|
+
gamingOptOut: false
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
}
|
|
1989
|
+
},
|
|
1990
|
+
responseExamples: {
|
|
1991
|
+
default: {
|
|
1992
|
+
summary: "Updated guest response",
|
|
1993
|
+
value: {
|
|
1994
|
+
id: "gst_123",
|
|
1995
|
+
organizationId: "org_1",
|
|
1996
|
+
email: "jane.guest@example.com",
|
|
1997
|
+
mobilePhone: "+61411111111",
|
|
1998
|
+
firstName: "Jane",
|
|
1999
|
+
lastName: "Citizen",
|
|
2000
|
+
meta: {
|
|
2001
|
+
loyaltyTier: "gold",
|
|
2002
|
+
preferredTableArea: "terrace"
|
|
2003
|
+
},
|
|
2004
|
+
marketingPreferences: {
|
|
2005
|
+
email: true,
|
|
2006
|
+
sms: false,
|
|
2007
|
+
post: false,
|
|
2008
|
+
gamingOptOut: false
|
|
2009
|
+
},
|
|
2010
|
+
status: "active",
|
|
2011
|
+
createdAt: "2026-04-01T10:00:00.000Z",
|
|
2012
|
+
updatedAt: "2026-04-07T21:15:00.000Z",
|
|
2013
|
+
deletedAt: null
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
});
|
|
2018
|
+
var openApiRequestSignatureSecuritySchemes = {
|
|
2019
|
+
spokeClientId: {
|
|
2020
|
+
type: "apiKey",
|
|
2021
|
+
in: "header",
|
|
2022
|
+
name: "X-Spoke-Client-Id",
|
|
2023
|
+
description: "Service or onsite-agent client ID used to identify the signing key."
|
|
2024
|
+
},
|
|
2025
|
+
spokeTimestamp: {
|
|
2026
|
+
type: "apiKey",
|
|
2027
|
+
in: "header",
|
|
2028
|
+
name: "X-Spoke-Timestamp",
|
|
2029
|
+
description: "Unix timestamp in seconds for the signed request."
|
|
2030
|
+
},
|
|
2031
|
+
spokeNonce: {
|
|
2032
|
+
type: "apiKey",
|
|
2033
|
+
in: "header",
|
|
2034
|
+
name: "X-Spoke-Nonce",
|
|
2035
|
+
description: "Unique nonce for replay protection."
|
|
2036
|
+
},
|
|
2037
|
+
spokeSignature: {
|
|
2038
|
+
type: "apiKey",
|
|
2039
|
+
in: "header",
|
|
2040
|
+
name: "X-Spoke-Signature",
|
|
2041
|
+
description: "Base64url Ed25519 signature of the canonical request string."
|
|
2042
|
+
}
|
|
2043
|
+
};
|
|
2044
|
+
var openApiPublicPaths = /* @__PURE__ */ new Set(["/v1/admin/session"]);
|
|
2045
|
+
var openApiHttpMethods = [
|
|
2046
|
+
"get",
|
|
2047
|
+
"put",
|
|
2048
|
+
"post",
|
|
2049
|
+
"delete",
|
|
2050
|
+
"options",
|
|
2051
|
+
"head",
|
|
2052
|
+
"patch",
|
|
2053
|
+
"trace"
|
|
2054
|
+
];
|
|
2055
|
+
var stripOpenApiVersionPrefix = (path) => path === "/v1" ? "/" : path.replace(/^\/v1(?=\/|$)/, "");
|
|
2056
|
+
var bearerDocsTransform = (spec) => ({
|
|
2057
|
+
...spec,
|
|
2058
|
+
components: {
|
|
2059
|
+
...spec.components,
|
|
2060
|
+
securitySchemes: {
|
|
2061
|
+
...spec.components?.securitySchemes,
|
|
2062
|
+
...openApiRequestSignatureSecuritySchemes
|
|
2063
|
+
}
|
|
2064
|
+
},
|
|
2065
|
+
security: spec.security?.length ? spec.security : [{ spokeClientId: [], spokeTimestamp: [], spokeNonce: [], spokeSignature: [] }],
|
|
2066
|
+
paths: Object.fromEntries(
|
|
2067
|
+
Object.entries(spec.paths ?? {}).map(([path, pathItem]) => {
|
|
2068
|
+
if (!pathItem || typeof pathItem !== "object") {
|
|
2069
|
+
return [stripOpenApiVersionPrefix(path), pathItem];
|
|
2070
|
+
}
|
|
2071
|
+
const updatedPathItem = { ...pathItem };
|
|
2072
|
+
const isPublicPath = openApiPublicPaths.has(path);
|
|
2073
|
+
if (!isPublicPath) {
|
|
2074
|
+
for (const method of openApiHttpMethods) {
|
|
2075
|
+
const operation = updatedPathItem[method];
|
|
2076
|
+
if (!operation || typeof operation !== "object") {
|
|
2077
|
+
continue;
|
|
2078
|
+
}
|
|
2079
|
+
const existingSecurity = Array.isArray(operation.security) ? operation.security : void 0;
|
|
2080
|
+
if (existingSecurity && existingSecurity.length > 0) {
|
|
2081
|
+
continue;
|
|
2082
|
+
}
|
|
2083
|
+
updatedPathItem[method] = {
|
|
2084
|
+
...operation,
|
|
2085
|
+
security: [
|
|
2086
|
+
{ spokeClientId: [], spokeTimestamp: [], spokeNonce: [], spokeSignature: [] }
|
|
2087
|
+
]
|
|
2088
|
+
};
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
return [stripOpenApiVersionPrefix(path), updatedPathItem];
|
|
2092
|
+
})
|
|
2093
|
+
)
|
|
2094
|
+
});
|
|
2095
|
+
var OrganizationMemberRatingGradeSchema = Schema2.Struct({
|
|
2096
|
+
ratingGrade: NullableString,
|
|
2097
|
+
ratingGradeId: NullableString
|
|
2098
|
+
});
|
|
2099
|
+
var PaginatedOrganizationMemberRatingGradesSchema = Schema2.Struct({
|
|
2100
|
+
items: Schema2.Array(OrganizationMemberRatingGradeSchema),
|
|
2101
|
+
total: Schema2.Number,
|
|
2102
|
+
page: Schema2.Number,
|
|
2103
|
+
pageSize: Schema2.Number,
|
|
2104
|
+
totalPages: Schema2.Number
|
|
2105
|
+
});
|
|
2106
|
+
var OrganizationMemberMembershipTypeSchema = Schema2.Struct({
|
|
2107
|
+
membershipType: NullableString,
|
|
2108
|
+
membershipTypeId: NullableString
|
|
2109
|
+
});
|
|
2110
|
+
var PaginatedOrganizationMemberMembershipTypesSchema = Schema2.Struct({
|
|
2111
|
+
items: Schema2.Array(OrganizationMemberMembershipTypeSchema),
|
|
2112
|
+
total: Schema2.Number,
|
|
2113
|
+
page: Schema2.Number,
|
|
2114
|
+
pageSize: Schema2.Number,
|
|
2115
|
+
totalPages: Schema2.Number
|
|
2116
|
+
});
|
|
2117
|
+
var OrganizationMemberTitleSchema = Schema2.Struct({
|
|
2118
|
+
title: Schema2.String.annotations({
|
|
2119
|
+
example: "Mr"
|
|
2120
|
+
})
|
|
2121
|
+
});
|
|
2122
|
+
var PaginatedOrganizationMemberTitlesSchema = Schema2.Struct({
|
|
2123
|
+
items: Schema2.Array(OrganizationMemberTitleSchema),
|
|
2124
|
+
total: Schema2.Number,
|
|
2125
|
+
page: Schema2.Number,
|
|
2126
|
+
pageSize: Schema2.Number,
|
|
2127
|
+
totalPages: Schema2.Number
|
|
2128
|
+
});
|
|
2129
|
+
var OrganizationMemberGenderSchema = Schema2.Struct({
|
|
2130
|
+
gender: Schema2.String.annotations({
|
|
2131
|
+
example: "M"
|
|
2132
|
+
})
|
|
2133
|
+
});
|
|
2134
|
+
var PaginatedOrganizationMemberGendersSchema = Schema2.Struct({
|
|
2135
|
+
items: Schema2.Array(OrganizationMemberGenderSchema),
|
|
2136
|
+
total: Schema2.Number,
|
|
2137
|
+
page: Schema2.Number,
|
|
2138
|
+
pageSize: Schema2.Number,
|
|
2139
|
+
totalPages: Schema2.Number
|
|
2140
|
+
});
|
|
2141
|
+
var GuestSchema = Schema2.Struct({
|
|
2142
|
+
id: Schema2.String,
|
|
2143
|
+
organizationId: Schema2.String,
|
|
2144
|
+
email: NullableString,
|
|
2145
|
+
mobilePhone: NullableMobilePhoneSchema,
|
|
2146
|
+
firstName: Schema2.String,
|
|
2147
|
+
lastName: Schema2.String,
|
|
2148
|
+
meta: JsonObjectSchema,
|
|
2149
|
+
marketingPreferences: MarketingPreferencesSchema,
|
|
2150
|
+
status: Schema2.Literal(...guestStatuses),
|
|
2151
|
+
createdAt: TimestampSchema,
|
|
2152
|
+
updatedAt: TimestampSchema,
|
|
2153
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2154
|
+
});
|
|
2155
|
+
var PaginatedGuestsSchema = Schema2.Struct({
|
|
2156
|
+
items: Schema2.Array(GuestSchema),
|
|
2157
|
+
total: Schema2.Number,
|
|
2158
|
+
page: Schema2.Number,
|
|
2159
|
+
pageSize: Schema2.Number,
|
|
2160
|
+
totalPages: Schema2.Number,
|
|
2161
|
+
name: Schema2.Union(Schema2.String, Schema2.Null),
|
|
2162
|
+
email: Schema2.Union(Schema2.String, Schema2.Null),
|
|
2163
|
+
mobilePhone: NullableMobilePhoneSchema
|
|
2164
|
+
});
|
|
2165
|
+
var MemberContactMatchSchema = Schema2.Struct({
|
|
2166
|
+
id: Schema2.String,
|
|
2167
|
+
organizationId: Schema2.String,
|
|
2168
|
+
displayName: Schema2.String,
|
|
2169
|
+
email: NullableString,
|
|
2170
|
+
mobilePhone: NullableMobilePhoneSchema,
|
|
2171
|
+
dob: Schema2.Union(DateOnlySchema, Schema2.Null),
|
|
2172
|
+
memberNumber: NullableString,
|
|
2173
|
+
externalSystemMemberId: NullableString,
|
|
2174
|
+
cardId: NullableString,
|
|
2175
|
+
status: Schema2.Literal(...memberComputedStatuses),
|
|
2176
|
+
updatedAt: TimestampSchema
|
|
2177
|
+
});
|
|
2178
|
+
var GuestContactMatchSchema = Schema2.Struct({
|
|
2179
|
+
id: Schema2.String,
|
|
2180
|
+
organizationId: Schema2.String,
|
|
2181
|
+
firstName: Schema2.String,
|
|
2182
|
+
lastName: Schema2.String,
|
|
2183
|
+
email: NullableString,
|
|
2184
|
+
mobilePhone: NullableMobilePhoneSchema,
|
|
2185
|
+
status: Schema2.Literal(...guestStatuses),
|
|
2186
|
+
updatedAt: TimestampSchema
|
|
2187
|
+
});
|
|
2188
|
+
var OrganizationPeopleContactLookupUrlParamsSchema = Schema2.Struct({
|
|
2189
|
+
email: Schema2.optional(
|
|
2190
|
+
Schema2.String.annotations({
|
|
2191
|
+
description: "Exact email match. Case-insensitive.",
|
|
2192
|
+
example: "jane@example.com"
|
|
2193
|
+
})
|
|
2194
|
+
),
|
|
2195
|
+
mobilePhone: Schema2.optional(
|
|
2196
|
+
MobilePhoneSchema.annotations({
|
|
2197
|
+
description: "Exact mobile phone match after phone-number normalization."
|
|
2198
|
+
})
|
|
2199
|
+
)
|
|
2200
|
+
});
|
|
2201
|
+
var OrganizationPeopleContactLookupResponseSchema = Schema2.Struct({
|
|
2202
|
+
email: Schema2.Union(Schema2.String, Schema2.Null),
|
|
2203
|
+
mobilePhone: NullableMobilePhoneSchema,
|
|
2204
|
+
members: Schema2.Array(MemberContactMatchSchema),
|
|
2205
|
+
guests: Schema2.Array(GuestContactMatchSchema)
|
|
2206
|
+
});
|
|
2207
|
+
var ServiceClientSchema = Schema2.Struct({
|
|
2208
|
+
id: Schema2.String,
|
|
2209
|
+
clientId: Schema2.String,
|
|
2210
|
+
name: Schema2.String,
|
|
2211
|
+
description: NullableString,
|
|
2212
|
+
organizationId: Schema2.Union(Schema2.String, Schema2.Null),
|
|
2213
|
+
scopes: Schema2.Array(Schema2.String),
|
|
2214
|
+
publicKeyFingerprint: NullableString,
|
|
2215
|
+
keys: Schema2.Array(
|
|
2216
|
+
Schema2.Struct({
|
|
2217
|
+
id: Schema2.String,
|
|
2218
|
+
publicKeyFingerprint: NullableString,
|
|
2219
|
+
createdAt: TimestampSchema,
|
|
2220
|
+
revokesAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2221
|
+
})
|
|
2222
|
+
),
|
|
2223
|
+
lastUsedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2224
|
+
revokesAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2225
|
+
createdAt: TimestampSchema,
|
|
2226
|
+
updatedAt: TimestampSchema,
|
|
2227
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2228
|
+
});
|
|
2229
|
+
var MemberSourceSecretNameSchema = Schema2.Struct({
|
|
2230
|
+
name: Schema2.String
|
|
2231
|
+
});
|
|
2232
|
+
var OrganizationMemberSourceAgentSchema = Schema2.Struct({
|
|
2233
|
+
id: Schema2.String,
|
|
2234
|
+
organizationId: Schema2.String,
|
|
2235
|
+
organizationMemberSourceId: Schema2.String,
|
|
2236
|
+
connectorType: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2237
|
+
siteId: NullableString,
|
|
2238
|
+
status: Schema2.Literal(...organizationMemberSourceAgentStatuses),
|
|
2239
|
+
clientId: Schema2.String,
|
|
2240
|
+
publicKeyFingerprint: NullableString,
|
|
2241
|
+
pollingIntervalSeconds: Schema2.Number,
|
|
2242
|
+
lastUsedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2243
|
+
lastHeartbeatAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2244
|
+
lastVersion: NullableString,
|
|
2245
|
+
lastError: NullableString,
|
|
2246
|
+
metadata: JsonObjectSchema,
|
|
2247
|
+
createdAt: TimestampSchema,
|
|
2248
|
+
updatedAt: TimestampSchema,
|
|
2249
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2250
|
+
});
|
|
2251
|
+
var OrganizationMemberSourceSchema = Schema2.Struct({
|
|
2252
|
+
id: Schema2.String,
|
|
2253
|
+
organizationId: Schema2.String,
|
|
2254
|
+
vendor: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2255
|
+
primaryBatchTransport: Schema2.Union(
|
|
2256
|
+
Schema2.Literal(...organizationMemberSourceBatchTransports),
|
|
2257
|
+
Schema2.Null
|
|
2258
|
+
),
|
|
2259
|
+
manualTransport: Schema2.Union(
|
|
2260
|
+
Schema2.Literal(...organizationMemberSourceManualTransports),
|
|
2261
|
+
Schema2.Null
|
|
2262
|
+
),
|
|
2263
|
+
liveTransport: Schema2.Union(
|
|
2264
|
+
Schema2.Literal(...organizationMemberSourceLiveTransports),
|
|
2265
|
+
Schema2.Null
|
|
2266
|
+
),
|
|
2267
|
+
status: Schema2.Literal(...organizationMemberSourceStatuses),
|
|
2268
|
+
syncSchedule: NullableString,
|
|
2269
|
+
config: JsonObjectSchema,
|
|
2270
|
+
secretNames: Schema2.Array(MemberSourceSecretNameSchema),
|
|
2271
|
+
lastCursor: Schema2.Union(JsonObjectSchema, Schema2.Null),
|
|
2272
|
+
lastSuccessfulSyncAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2273
|
+
lastAttemptedSyncAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2274
|
+
lastError: NullableString,
|
|
2275
|
+
agent: Schema2.Union(OrganizationMemberSourceAgentSchema, Schema2.Null),
|
|
2276
|
+
createdAt: TimestampSchema,
|
|
2277
|
+
updatedAt: TimestampSchema,
|
|
2278
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2279
|
+
});
|
|
2280
|
+
var OrganizationMemberSourceWebhookSchema = Schema2.Struct({
|
|
2281
|
+
id: Schema2.String,
|
|
2282
|
+
organizationId: Schema2.String,
|
|
2283
|
+
organizationMemberSourceId: Schema2.String,
|
|
2284
|
+
status: Schema2.Literal(...organizationMemberSourceWebhookStatuses),
|
|
2285
|
+
url: Schema2.String.annotations({
|
|
2286
|
+
description: "Destination URL that receives member-source webhooks for command completions and live member updates.",
|
|
2287
|
+
example: "https://venue.example.com/webhooks/spoke"
|
|
2288
|
+
}),
|
|
2289
|
+
hasSigningSecret: Schema2.Boolean,
|
|
2290
|
+
lastDeliveredAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2291
|
+
lastDeliveryStatus: Schema2.Union(
|
|
2292
|
+
Schema2.Literal(...organizationMemberSourceWebhookDeliveryStatuses),
|
|
2293
|
+
Schema2.Null
|
|
2294
|
+
),
|
|
2295
|
+
lastDeliveryError: NullableString,
|
|
2296
|
+
createdAt: TimestampSchema,
|
|
2297
|
+
updatedAt: TimestampSchema,
|
|
2298
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2299
|
+
});
|
|
2300
|
+
var OrganizationMemberSourceWebhookUpsertResponseSchema = Schema2.Struct({
|
|
2301
|
+
webhook: OrganizationMemberSourceWebhookSchema,
|
|
2302
|
+
signingSecret: Schema2.Union(
|
|
2303
|
+
Schema2.String.annotations({
|
|
2304
|
+
description: "Webhook signing secret shown only on first creation or explicit rotation. Use it to verify the X-Spoke-Webhook-Signature header.",
|
|
2305
|
+
example: "whsec_JuL9C8J7Kz2O2P8N4GqX5YvM6QwT3R1B"
|
|
2306
|
+
}),
|
|
2307
|
+
Schema2.Null
|
|
2308
|
+
)
|
|
2309
|
+
});
|
|
2310
|
+
var OrganizationMemberSyncRunSummarySchema = Schema2.Struct({
|
|
2311
|
+
totalRecords: Schema2.Number,
|
|
2312
|
+
inserted: Schema2.Number,
|
|
2313
|
+
updated: Schema2.Number,
|
|
2314
|
+
archived: Schema2.Number,
|
|
2315
|
+
skipped: Schema2.Number,
|
|
2316
|
+
errorCount: Schema2.Number
|
|
2317
|
+
});
|
|
2318
|
+
var OrganizationMemberSyncRunErrorSchema = Schema2.Struct({
|
|
2319
|
+
id: Schema2.String,
|
|
2320
|
+
organizationId: Schema2.String,
|
|
2321
|
+
organizationMemberSyncRunId: Schema2.String,
|
|
2322
|
+
lineNumber: Schema2.Union(Schema2.Number, Schema2.Null),
|
|
2323
|
+
externalSystemMemberId: NullableString,
|
|
2324
|
+
memberNumber: NullableString,
|
|
2325
|
+
code: Schema2.String,
|
|
2326
|
+
message: Schema2.String,
|
|
2327
|
+
payload: JsonObjectSchema,
|
|
2328
|
+
occurredAt: TimestampSchema
|
|
2329
|
+
});
|
|
2330
|
+
var OrganizationMemberSyncRunSchema = Schema2.Struct({
|
|
2331
|
+
id: Schema2.String,
|
|
2332
|
+
organizationId: Schema2.String,
|
|
2333
|
+
organizationMemberSourceId: Schema2.String,
|
|
2334
|
+
triggerKind: Schema2.Literal(...organizationMemberSyncTriggerKinds),
|
|
2335
|
+
mode: Schema2.Literal(...organizationMemberSyncModes),
|
|
2336
|
+
transport: Schema2.Literal(...organizationMemberSyncTransports),
|
|
2337
|
+
status: Schema2.Literal(...organizationMemberSyncRunStatuses),
|
|
2338
|
+
inputReference: NullableString,
|
|
2339
|
+
fileName: NullableString,
|
|
2340
|
+
startedAt: TimestampSchema,
|
|
2341
|
+
pickedUpAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2342
|
+
completedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2343
|
+
organizationMemberSourceAgentId: Schema2.Union(Schema2.String, Schema2.Null),
|
|
2344
|
+
cursorBefore: Schema2.Union(JsonObjectSchema, Schema2.Null),
|
|
2345
|
+
cursorAfter: Schema2.Union(JsonObjectSchema, Schema2.Null),
|
|
2346
|
+
summary: OrganizationMemberSyncRunSummarySchema,
|
|
2347
|
+
errorMessage: NullableString,
|
|
2348
|
+
errors: Schema2.Array(OrganizationMemberSyncRunErrorSchema),
|
|
2349
|
+
createdAt: TimestampSchema,
|
|
2350
|
+
updatedAt: TimestampSchema,
|
|
2351
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2352
|
+
});
|
|
2353
|
+
var PaginatedOrganizationMemberSyncRunsSchema = Schema2.Struct({
|
|
2354
|
+
items: Schema2.Array(OrganizationMemberSyncRunSchema),
|
|
2355
|
+
total: Schema2.Number,
|
|
2356
|
+
page: Schema2.Number,
|
|
2357
|
+
pageSize: Schema2.Number,
|
|
2358
|
+
totalPages: Schema2.Number
|
|
2359
|
+
});
|
|
2360
|
+
var OrganizationMemberSourceCommandSchema = Schema2.Struct({
|
|
2361
|
+
id: Schema2.String,
|
|
2362
|
+
organizationId: Schema2.String,
|
|
2363
|
+
organizationMemberSourceId: Schema2.String,
|
|
2364
|
+
organizationMemberSourceAgentId: Schema2.Union(Schema2.String, Schema2.Null),
|
|
2365
|
+
kind: Schema2.Literal("create_member", "update_member", "renew_member", "lookup_member"),
|
|
2366
|
+
status: Schema2.Literal(...organizationMemberSourceCommandStatuses),
|
|
2367
|
+
payload: JsonObjectSchema,
|
|
2368
|
+
result: Schema2.Union(JsonObjectSchema, Schema2.Null),
|
|
2369
|
+
errorMessage: NullableString,
|
|
2370
|
+
requestedAt: TimestampSchema,
|
|
2371
|
+
acceptedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2372
|
+
completedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2373
|
+
createdAt: TimestampSchema,
|
|
2374
|
+
updatedAt: TimestampSchema,
|
|
2375
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2376
|
+
});
|
|
2377
|
+
var PaginatedOrganizationMemberSourceCommandsSchema = Schema2.Struct({
|
|
2378
|
+
items: Schema2.Array(OrganizationMemberSourceCommandSchema),
|
|
2379
|
+
total: Schema2.Number,
|
|
2380
|
+
page: Schema2.Number,
|
|
2381
|
+
pageSize: Schema2.Number,
|
|
2382
|
+
totalPages: Schema2.Number
|
|
2383
|
+
});
|
|
2384
|
+
var PaginatedServiceClientsSchema = Schema2.Struct({
|
|
2385
|
+
items: Schema2.Array(ServiceClientSchema),
|
|
2386
|
+
total: Schema2.Number,
|
|
2387
|
+
page: Schema2.Number,
|
|
2388
|
+
pageSize: Schema2.Number,
|
|
2389
|
+
totalPages: Schema2.Number
|
|
2390
|
+
});
|
|
2391
|
+
var CsvMemberFieldMappingSchema = Schema2.Struct({
|
|
2392
|
+
hasHeader: Schema2.optional(Schema2.Boolean),
|
|
2393
|
+
memberNumber: OptionalNullableString,
|
|
2394
|
+
previousMemberNumber: OptionalNullableString,
|
|
2395
|
+
externalSystemMemberId: OptionalNullableString,
|
|
2396
|
+
cardId: OptionalNullableString,
|
|
2397
|
+
email: OptionalNullableString,
|
|
2398
|
+
title: OptionalNullableString,
|
|
2399
|
+
firstName: OptionalNullableString,
|
|
2400
|
+
middleName: OptionalNullableString,
|
|
2401
|
+
lastName: OptionalNullableString,
|
|
2402
|
+
dob: OptionalNullableString,
|
|
2403
|
+
gender: OptionalNullableString,
|
|
2404
|
+
mobilePhone: OptionalNullableMobilePhoneSchema,
|
|
2405
|
+
homePhone: OptionalNullableString,
|
|
2406
|
+
joinedAt: OptionalNullableString,
|
|
2407
|
+
addressLine1: OptionalNullableString,
|
|
2408
|
+
addressLine2: OptionalNullableString,
|
|
2409
|
+
addressSuburb: OptionalNullableString,
|
|
2410
|
+
addressState: OptionalNullableString,
|
|
2411
|
+
addressPostalCode: OptionalNullableString,
|
|
2412
|
+
addressCountry: OptionalNullableString,
|
|
2413
|
+
postalAddressLine1: OptionalNullableString,
|
|
2414
|
+
postalAddressLine2: OptionalNullableString,
|
|
2415
|
+
postalAddressSuburb: OptionalNullableString,
|
|
2416
|
+
postalAddressState: OptionalNullableString,
|
|
2417
|
+
postalAddressPostalCode: OptionalNullableString,
|
|
2418
|
+
postalAddressCountry: OptionalNullableString,
|
|
2419
|
+
membershipType: OptionalNullableString,
|
|
2420
|
+
membershipTypeId: OptionalNullableString,
|
|
2421
|
+
ratingGrade: OptionalNullableString,
|
|
2422
|
+
ratingGradeId: OptionalNullableString,
|
|
2423
|
+
preferredContactMethod: OptionalNullablePreferredContactMethodSchema,
|
|
2424
|
+
occupation: OptionalNullableString,
|
|
2425
|
+
sourceStatus: OptionalNullableString,
|
|
2426
|
+
gamingOptOutSourceStatuses: OptionalNullableString,
|
|
2427
|
+
suspendedSourceStatuses: OptionalNullableString,
|
|
2428
|
+
retiredSourceStatuses: OptionalNullableString,
|
|
2429
|
+
skippedSourceStatuses: OptionalNullableString,
|
|
2430
|
+
retiredMembershipTypes: OptionalNullableString,
|
|
2431
|
+
skippedMembershipTypes: OptionalNullableString,
|
|
2432
|
+
retiredRatingGrades: OptionalNullableString,
|
|
2433
|
+
skippedRatingGrades: OptionalNullableString,
|
|
2434
|
+
marketingEmail: OptionalNullableString,
|
|
2435
|
+
marketingSms: OptionalNullableString,
|
|
2436
|
+
marketingPost: OptionalNullableString,
|
|
2437
|
+
expiresAt: OptionalNullableString,
|
|
2438
|
+
sourceUpdatedAt: OptionalNullableString
|
|
2439
|
+
});
|
|
2440
|
+
var OrganizationMemberSourceCsvMappingSchema = Schema2.Struct({
|
|
2441
|
+
id: Schema2.String,
|
|
2442
|
+
organizationId: Schema2.String,
|
|
2443
|
+
organizationMemberSourceId: Schema2.String,
|
|
2444
|
+
version: Schema2.Number,
|
|
2445
|
+
mapping: CsvMemberFieldMappingSchema,
|
|
2446
|
+
createdAt: TimestampSchema,
|
|
2447
|
+
updatedAt: TimestampSchema,
|
|
2448
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2449
|
+
});
|
|
2450
|
+
var CsvUploadReadinessSchema = Schema2.Struct({
|
|
2451
|
+
organizationId: Schema2.String,
|
|
2452
|
+
organizationMemberSourceId: Schema2.Union(Schema2.String, Schema2.Null),
|
|
2453
|
+
uploadEnabled: Schema2.Boolean,
|
|
2454
|
+
hasMapping: Schema2.Boolean,
|
|
2455
|
+
mappingVersion: Schema2.Union(Schema2.Number, Schema2.Null),
|
|
2456
|
+
bucketName: NullableString,
|
|
2457
|
+
keyPrefix: NullableString,
|
|
2458
|
+
reason: NullableString,
|
|
2459
|
+
mapping: Schema2.Union(OrganizationMemberSourceCsvMappingSchema, Schema2.Null)
|
|
2460
|
+
});
|
|
2461
|
+
var OrganizationMemberSourceCsvImportSchema = Schema2.Struct({
|
|
2462
|
+
id: Schema2.String,
|
|
2463
|
+
organizationId: Schema2.String,
|
|
2464
|
+
organizationMemberSourceId: Schema2.String,
|
|
2465
|
+
organizationMemberSyncRunId: Schema2.Union(Schema2.String, Schema2.Null),
|
|
2466
|
+
mappingVersion: Schema2.Number,
|
|
2467
|
+
status: Schema2.Literal(...organizationMemberSourceCsvImportStatuses),
|
|
2468
|
+
bucketName: Schema2.String,
|
|
2469
|
+
objectKey: Schema2.String,
|
|
2470
|
+
fileName: Schema2.String,
|
|
2471
|
+
contentType: NullableString,
|
|
2472
|
+
sizeBytes: Schema2.Union(Schema2.Number, Schema2.Null),
|
|
2473
|
+
uploadedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2474
|
+
processedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2475
|
+
errorMessage: NullableString,
|
|
2476
|
+
createdAt: TimestampSchema,
|
|
2477
|
+
updatedAt: TimestampSchema,
|
|
2478
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2479
|
+
});
|
|
2480
|
+
var AdminSessionSchema = Schema2.Struct({
|
|
2481
|
+
principalId: Schema2.String,
|
|
2482
|
+
email: Schema2.String,
|
|
2483
|
+
displayName: Schema2.String,
|
|
2484
|
+
authRole: NullableString,
|
|
2485
|
+
impersonatedBy: NullableString,
|
|
2486
|
+
roles: Schema2.Array(
|
|
2487
|
+
Schema2.Struct({
|
|
2488
|
+
role: Schema2.Literal(...adminRoles),
|
|
2489
|
+
organizationId: Schema2.Union(Schema2.String, Schema2.Null)
|
|
2490
|
+
})
|
|
2491
|
+
)
|
|
2492
|
+
});
|
|
2493
|
+
var IssuedPrivateKeySchema = Schema2.String.annotations({
|
|
2494
|
+
description: "Base64-encoded PKCS#8 Ed25519 private key. Store it securely because it is only shown once."
|
|
2495
|
+
});
|
|
2496
|
+
var DeletePayloadSchema = Schema2.Struct({
|
|
2497
|
+
expectedUpdatedAt: TimestampSchema
|
|
2498
|
+
});
|
|
2499
|
+
var CreateOrganizationSchema = Schema2.Struct({
|
|
2500
|
+
slug: Schema2.String,
|
|
2501
|
+
name: Schema2.String,
|
|
2502
|
+
legalName: OptionalNullableString,
|
|
2503
|
+
description: OptionalNullableString,
|
|
2504
|
+
externalReference: OptionalNullableString,
|
|
2505
|
+
products: Schema2.optional(Schema2.Array(Schema2.String))
|
|
2506
|
+
});
|
|
2507
|
+
var UpdateOrganizationSchema = Schema2.Struct({
|
|
2508
|
+
expectedUpdatedAt: TimestampSchema,
|
|
2509
|
+
slug: Schema2.optional(Schema2.String),
|
|
2510
|
+
name: Schema2.optional(Schema2.String),
|
|
2511
|
+
legalName: OptionalNullableString,
|
|
2512
|
+
description: OptionalNullableString,
|
|
2513
|
+
externalReference: OptionalNullableString,
|
|
2514
|
+
products: Schema2.optional(Schema2.Array(Schema2.String)),
|
|
2515
|
+
status: Schema2.optional(Schema2.Literal(...organizationStatuses))
|
|
2516
|
+
});
|
|
2517
|
+
var CreateOrganizationProductOptionSchema = Schema2.Struct({
|
|
2518
|
+
slug: Schema2.String,
|
|
2519
|
+
name: Schema2.String
|
|
2520
|
+
});
|
|
2521
|
+
var UpsertOrganizationProductWebhookSchema = Schema2.Struct({
|
|
2522
|
+
url: Schema2.String.annotations({
|
|
2523
|
+
description: "Destination URL to notify when a linked organization emits a product event such as a member-source command completion, member update, or voucher creation.",
|
|
2524
|
+
example: "https://product.example.com/webhooks/spoke"
|
|
2525
|
+
}),
|
|
2526
|
+
status: Schema2.optional(Schema2.Literal(...organizationProductWebhookStatuses)),
|
|
2527
|
+
rotateSigningSecret: Schema2.optional(
|
|
2528
|
+
Schema2.Boolean.annotations({
|
|
2529
|
+
description: "When true, rotates the webhook signing secret and returns the new secret once in the response."
|
|
2530
|
+
})
|
|
2531
|
+
)
|
|
2532
|
+
});
|
|
2533
|
+
var CreateOrganizationProductWebhookSchema = Schema2.Struct({
|
|
2534
|
+
url: Schema2.String.annotations({
|
|
2535
|
+
description: "Destination URL to notify when a linked organization emits a product event such as a member-source command completion, member update, or voucher creation.",
|
|
2536
|
+
example: "https://product.example.com/webhooks/spoke"
|
|
2537
|
+
}),
|
|
2538
|
+
status: Schema2.optional(Schema2.Literal(...organizationProductWebhookStatuses))
|
|
2539
|
+
});
|
|
2540
|
+
var UpdateOrganizationProductWebhookSchema = Schema2.Struct({
|
|
2541
|
+
url: Schema2.optional(
|
|
2542
|
+
Schema2.String.annotations({
|
|
2543
|
+
description: "Destination URL to notify when a linked organization emits a product event such as a member-source command completion, member update, or voucher creation.",
|
|
2544
|
+
example: "https://product.example.com/webhooks/spoke"
|
|
2545
|
+
})
|
|
2546
|
+
),
|
|
2547
|
+
status: Schema2.optional(Schema2.Literal(...organizationProductWebhookStatuses)),
|
|
2548
|
+
rotateSigningSecret: Schema2.optional(
|
|
2549
|
+
Schema2.Boolean.annotations({
|
|
2550
|
+
description: "When true, rotates the webhook signing secret and returns the new secret once in the response."
|
|
2551
|
+
})
|
|
2552
|
+
)
|
|
2553
|
+
});
|
|
2554
|
+
var CreateMemberSchema = Schema2.Struct({
|
|
2555
|
+
email: OptionalNullableString,
|
|
2556
|
+
title: OptionalNullableString,
|
|
2557
|
+
firstName: Schema2.String,
|
|
2558
|
+
middleName: OptionalNullableString,
|
|
2559
|
+
lastName: Schema2.String,
|
|
2560
|
+
dob: Schema2.optional(Schema2.Union(DateOnlySchema, Schema2.Null)),
|
|
2561
|
+
gender: OptionalNullableString,
|
|
2562
|
+
mobilePhone: OptionalNullableMobilePhoneSchema,
|
|
2563
|
+
homePhone: OptionalNullableString,
|
|
2564
|
+
joinedAt: Schema2.optional(Schema2.Union(TimestampSchema, Schema2.Null)),
|
|
2565
|
+
preferredContactMethod: OptionalNullablePreferredContactMethodSchema,
|
|
2566
|
+
occupation: OptionalNullableOccupationSchema,
|
|
2567
|
+
address: Schema2.optional(Schema2.Union(AddressInputSchema, Schema2.Null)),
|
|
2568
|
+
postalAddress: Schema2.optional(Schema2.Union(AddressInputSchema, Schema2.Null)),
|
|
2569
|
+
membershipType: OptionalNullableString,
|
|
2570
|
+
membershipTypeId: OptionalNullableString,
|
|
2571
|
+
ratingGrade: OptionalNullableString,
|
|
2572
|
+
ratingGradeId: OptionalNullableString,
|
|
2573
|
+
marketingPreferences: Schema2.optional(MarketingPreferencesInputSchema),
|
|
2574
|
+
expiresAt: Schema2.optional(Schema2.Union(TimestampSchema, Schema2.Null)),
|
|
2575
|
+
memberNumber: OptionalNullableString,
|
|
2576
|
+
externalSystemMemberId: OptionalNullableString,
|
|
2577
|
+
cardId: OptionalNullableString,
|
|
2578
|
+
customFields: Schema2.optional(JsonObjectSchema)
|
|
2579
|
+
});
|
|
2580
|
+
var UpdateMemberSchema = Schema2.Struct({
|
|
2581
|
+
expectedUpdatedAt: TimestampSchema,
|
|
2582
|
+
email: OptionalNullableString,
|
|
2583
|
+
title: OptionalNullableString,
|
|
2584
|
+
firstName: Schema2.optional(Schema2.String),
|
|
2585
|
+
middleName: OptionalNullableString,
|
|
2586
|
+
lastName: Schema2.optional(Schema2.String),
|
|
2587
|
+
dob: Schema2.optional(Schema2.Union(DateOnlySchema, Schema2.Null)),
|
|
2588
|
+
gender: OptionalNullableString,
|
|
2589
|
+
mobilePhone: OptionalNullableMobilePhoneSchema,
|
|
2590
|
+
homePhone: OptionalNullableString,
|
|
2591
|
+
joinedAt: Schema2.optional(Schema2.Union(TimestampSchema, Schema2.Null)),
|
|
2592
|
+
preferredContactMethod: OptionalNullablePreferredContactMethodSchema,
|
|
2593
|
+
occupation: OptionalNullableOccupationSchema,
|
|
2594
|
+
address: Schema2.optional(Schema2.Union(AddressInputSchema, Schema2.Null)),
|
|
2595
|
+
postalAddress: Schema2.optional(Schema2.Union(AddressInputSchema, Schema2.Null)),
|
|
2596
|
+
membershipType: OptionalNullableString,
|
|
2597
|
+
membershipTypeId: OptionalNullableString,
|
|
2598
|
+
ratingGrade: OptionalNullableString,
|
|
2599
|
+
ratingGradeId: OptionalNullableString,
|
|
2600
|
+
marketingPreferences: Schema2.optional(MarketingPreferencesInputSchema),
|
|
2601
|
+
expiresAt: Schema2.optional(Schema2.Union(TimestampSchema, Schema2.Null)),
|
|
2602
|
+
memberNumber: OptionalNullableString,
|
|
2603
|
+
externalSystemMemberId: OptionalNullableString,
|
|
2604
|
+
cardId: OptionalNullableString,
|
|
2605
|
+
customFields: Schema2.optional(JsonObjectSchema)
|
|
2606
|
+
});
|
|
2607
|
+
var CreateGuestSchema = Schema2.Struct({
|
|
2608
|
+
email: OptionalNullableString,
|
|
2609
|
+
mobilePhone: OptionalNullableMobilePhoneSchema,
|
|
2610
|
+
firstName: Schema2.String,
|
|
2611
|
+
lastName: Schema2.String,
|
|
2612
|
+
meta: Schema2.optional(JsonObjectSchema),
|
|
2613
|
+
marketingPreferences: Schema2.optional(MarketingPreferencesInputSchema)
|
|
2614
|
+
}).annotations({
|
|
2615
|
+
description: "Guests must include at least one contact method: email or mobilePhone."
|
|
2616
|
+
});
|
|
2617
|
+
var UpdateGuestSchema = Schema2.Struct({
|
|
2618
|
+
expectedUpdatedAt: TimestampSchema,
|
|
2619
|
+
email: OptionalNullableString,
|
|
2620
|
+
mobilePhone: OptionalNullableMobilePhoneSchema,
|
|
2621
|
+
firstName: Schema2.optional(Schema2.String),
|
|
2622
|
+
lastName: Schema2.optional(Schema2.String),
|
|
2623
|
+
meta: Schema2.optional(JsonObjectSchema),
|
|
2624
|
+
marketingPreferences: Schema2.optional(MarketingPreferencesInputSchema)
|
|
2625
|
+
}).annotations({
|
|
2626
|
+
description: "Guest updates must leave at least one contact method present after the change: email or mobilePhone."
|
|
2627
|
+
});
|
|
2628
|
+
var CreateServiceClientSchema = Schema2.Struct({
|
|
2629
|
+
name: Schema2.String,
|
|
2630
|
+
description: OptionalNullableString,
|
|
2631
|
+
organizationId: Schema2.optional(Schema2.Union(Schema2.String, Schema2.Null)),
|
|
2632
|
+
scopes: Schema2.Array(Schema2.String)
|
|
2633
|
+
});
|
|
2634
|
+
var UpdateServiceClientSchema = Schema2.Struct({
|
|
2635
|
+
expectedUpdatedAt: TimestampSchema,
|
|
2636
|
+
name: Schema2.optional(Schema2.String),
|
|
2637
|
+
description: OptionalNullableString,
|
|
2638
|
+
organizationId: Schema2.optional(Schema2.Union(Schema2.String, Schema2.Null)),
|
|
2639
|
+
scopes: Schema2.optional(Schema2.Array(Schema2.String)),
|
|
2640
|
+
rotateKey: Schema2.optional(Schema2.Boolean),
|
|
2641
|
+
rotateGracePeriodSeconds: Schema2.optional(Schema2.Number),
|
|
2642
|
+
clearRevokesAt: Schema2.optional(Schema2.Boolean)
|
|
2643
|
+
});
|
|
2644
|
+
var DeleteServiceClientSchema = Schema2.Struct({
|
|
2645
|
+
expectedUpdatedAt: TimestampSchema,
|
|
2646
|
+
revokeAfterSeconds: Schema2.optional(Schema2.Number)
|
|
2647
|
+
});
|
|
2648
|
+
var OrganizationMemberSourceSecretInputSchema = Schema2.Struct({
|
|
2649
|
+
name: Schema2.String,
|
|
2650
|
+
value: Schema2.String
|
|
2651
|
+
});
|
|
2652
|
+
var BootstrapOrganizationMemberSourceAgentSchema = Schema2.Struct({
|
|
2653
|
+
siteId: OptionalNullableString,
|
|
2654
|
+
pollingIntervalSeconds: Schema2.optional(Schema2.Number),
|
|
2655
|
+
metadata: Schema2.optional(JsonObjectSchema)
|
|
2656
|
+
});
|
|
2657
|
+
var BootstrapOrganizationMemberSourceAgentResponseSchema = Schema2.Struct({
|
|
2658
|
+
agent: OrganizationMemberSourceAgentSchema,
|
|
2659
|
+
privateKey: IssuedPrivateKeySchema
|
|
2660
|
+
});
|
|
2661
|
+
var UpsertOrganizationMemberSourceSchema = Schema2.Struct({
|
|
2662
|
+
vendor: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2663
|
+
primaryBatchTransport: Schema2.Union(
|
|
2664
|
+
Schema2.Literal(...organizationMemberSourceBatchTransports),
|
|
2665
|
+
Schema2.Null
|
|
2666
|
+
),
|
|
2667
|
+
manualTransport: Schema2.Union(
|
|
2668
|
+
Schema2.Literal(...organizationMemberSourceManualTransports),
|
|
2669
|
+
Schema2.Null
|
|
2670
|
+
),
|
|
2671
|
+
liveTransport: Schema2.Union(
|
|
2672
|
+
Schema2.Literal(...organizationMemberSourceLiveTransports),
|
|
2673
|
+
Schema2.Null
|
|
2674
|
+
),
|
|
2675
|
+
status: Schema2.optional(Schema2.Literal(...organizationMemberSourceStatuses)),
|
|
2676
|
+
syncSchedule: OptionalNullableString,
|
|
2677
|
+
config: JsonObjectSchema,
|
|
2678
|
+
secrets: Schema2.optional(Schema2.Array(OrganizationMemberSourceSecretInputSchema))
|
|
2679
|
+
});
|
|
2680
|
+
var UpsertOrganizationMemberSourceWebhookSchema = Schema2.Struct({
|
|
2681
|
+
url: Schema2.String.annotations({
|
|
2682
|
+
description: "Destination URL to notify when source-managed create, update, renewal, or lookup commands reach a terminal state.",
|
|
2683
|
+
example: "https://venue.example.com/webhooks/spoke"
|
|
2684
|
+
}),
|
|
2685
|
+
status: Schema2.optional(Schema2.Literal(...organizationMemberSourceWebhookStatuses)),
|
|
2686
|
+
rotateSigningSecret: Schema2.optional(
|
|
2687
|
+
Schema2.Boolean.annotations({
|
|
2688
|
+
description: "When true, rotates the webhook signing secret and returns the new secret once in the response."
|
|
2689
|
+
})
|
|
2690
|
+
)
|
|
2691
|
+
});
|
|
2692
|
+
var TriggerOrganizationMemberSyncSchema = Schema2.Struct({
|
|
2693
|
+
mode: Schema2.optional(Schema2.Literal(...organizationMemberSyncModes)),
|
|
2694
|
+
inputReference: OptionalNullableString
|
|
2695
|
+
});
|
|
2696
|
+
var RequestSourceManagedMemberCreateSchema = CreateMemberSchema;
|
|
2697
|
+
var RequestSourceManagedMemberUpdateSchema = UpdateMemberSchema;
|
|
2698
|
+
var RequestSourceManagedMemberRenewalSchema = Schema2.Struct({
|
|
2699
|
+
expectedUpdatedAt: Schema2.optional(Schema2.Union(TimestampSchema, Schema2.Null))
|
|
2700
|
+
});
|
|
2701
|
+
var SourceManagedMemberLookupBySchema = Schema2.Literal(
|
|
2702
|
+
"member_id",
|
|
2703
|
+
"badge_number",
|
|
2704
|
+
"card_number"
|
|
2705
|
+
);
|
|
2706
|
+
var SourceManagedMemberLookupCommandPayloadSchema = Schema2.Struct({
|
|
2707
|
+
lookupBy: SourceManagedMemberLookupBySchema,
|
|
2708
|
+
lookupValue: Schema2.String
|
|
2709
|
+
});
|
|
2710
|
+
var SourceManagedMemberRenewalCommandPayloadSchema = Schema2.Struct({
|
|
2711
|
+
memberId: Schema2.String,
|
|
2712
|
+
externalSystemMemberId: Schema2.String,
|
|
2713
|
+
memberNumber: OptionalNullableString,
|
|
2714
|
+
previousExpiresAt: Schema2.optional(Schema2.Union(TimestampSchema, Schema2.Null))
|
|
2715
|
+
});
|
|
2716
|
+
var OnsiteResourceCallWaitMsSchema = Schema2.optional(
|
|
2717
|
+
Schema2.Number.annotations({
|
|
2718
|
+
description: "How long Hub should wait for the onsite client to complete the command before returning the accepted command.",
|
|
2719
|
+
example: 1e4
|
|
2720
|
+
})
|
|
2721
|
+
);
|
|
2722
|
+
var OnsiteResourceCallRequestSchema = Schema2.Union(
|
|
2723
|
+
Schema2.Struct({
|
|
2724
|
+
operation: Schema2.Literal("member.create"),
|
|
2725
|
+
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
2726
|
+
payload: RequestSourceManagedMemberCreateSchema
|
|
2727
|
+
}),
|
|
2728
|
+
Schema2.Struct({
|
|
2729
|
+
operation: Schema2.Literal("member.update"),
|
|
2730
|
+
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
2731
|
+
memberId: Schema2.String,
|
|
2732
|
+
payload: RequestSourceManagedMemberUpdateSchema
|
|
2733
|
+
}),
|
|
2734
|
+
Schema2.Struct({
|
|
2735
|
+
operation: Schema2.Literal("member.renew"),
|
|
2736
|
+
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
2737
|
+
memberId: Schema2.String,
|
|
2738
|
+
payload: RequestSourceManagedMemberRenewalSchema
|
|
2739
|
+
}),
|
|
2740
|
+
Schema2.Struct({
|
|
2741
|
+
operation: Schema2.Literal("member.lookup"),
|
|
2742
|
+
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
2743
|
+
payload: SourceManagedMemberLookupCommandPayloadSchema
|
|
2744
|
+
}),
|
|
2745
|
+
Schema2.Struct({
|
|
2746
|
+
operation: Schema2.Literal("voucher.issue"),
|
|
2747
|
+
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
2748
|
+
payload: RequestVoucherIssueSchema
|
|
2749
|
+
})
|
|
2750
|
+
);
|
|
2751
|
+
var OnsiteResourceMemberCallResponseSchema = Schema2.Struct({
|
|
2752
|
+
kind: Schema2.Literal("member"),
|
|
2753
|
+
operation: Schema2.Literal("member.create", "member.update", "member.renew", "member.lookup"),
|
|
2754
|
+
settled: Schema2.Boolean,
|
|
2755
|
+
timedOut: Schema2.Boolean,
|
|
2756
|
+
command: OrganizationMemberSourceCommandSchema
|
|
2757
|
+
});
|
|
2758
|
+
var OnsiteResourceVoucherCallResponseSchema = Schema2.Struct({
|
|
2759
|
+
kind: Schema2.Literal("voucher"),
|
|
2760
|
+
operation: Schema2.Literal("voucher.issue"),
|
|
2761
|
+
settled: Schema2.Boolean,
|
|
2762
|
+
timedOut: Schema2.Boolean,
|
|
2763
|
+
command: OrganizationVoucherCommandSchema
|
|
2764
|
+
});
|
|
2765
|
+
var OnsiteResourceCallResponseSchema = Schema2.Union(
|
|
2766
|
+
OnsiteResourceMemberCallResponseSchema,
|
|
2767
|
+
OnsiteResourceVoucherCallResponseSchema
|
|
2768
|
+
);
|
|
2769
|
+
var SourceManagedMemberUpdateCommandPayloadSchema = Schema2.Struct({
|
|
2770
|
+
memberId: Schema2.String,
|
|
2771
|
+
externalSystemMemberId: Schema2.String,
|
|
2772
|
+
expectedUpdatedAt: TimestampSchema,
|
|
2773
|
+
email: OptionalNullableString,
|
|
2774
|
+
title: OptionalNullableString,
|
|
2775
|
+
firstName: Schema2.optional(Schema2.String),
|
|
2776
|
+
middleName: OptionalNullableString,
|
|
2777
|
+
lastName: Schema2.optional(Schema2.String),
|
|
2778
|
+
dob: Schema2.optional(Schema2.Union(DateOnlySchema, Schema2.Null)),
|
|
2779
|
+
gender: OptionalNullableString,
|
|
2780
|
+
mobilePhone: OptionalNullableMobilePhoneSchema,
|
|
2781
|
+
homePhone: OptionalNullableString,
|
|
2782
|
+
joinedAt: Schema2.optional(Schema2.Union(TimestampSchema, Schema2.Null)),
|
|
2783
|
+
preferredContactMethod: OptionalNullablePreferredContactMethodSchema,
|
|
2784
|
+
occupation: OptionalNullableOccupationSchema,
|
|
2785
|
+
address: Schema2.optional(Schema2.Union(AddressInputSchema, Schema2.Null)),
|
|
2786
|
+
postalAddress: Schema2.optional(Schema2.Union(AddressInputSchema, Schema2.Null)),
|
|
2787
|
+
membershipType: OptionalNullableString,
|
|
2788
|
+
membershipTypeId: OptionalNullableString,
|
|
2789
|
+
ratingGrade: OptionalNullableString,
|
|
2790
|
+
ratingGradeId: OptionalNullableString,
|
|
2791
|
+
marketingPreferences: Schema2.optional(MarketingPreferencesInputSchema),
|
|
2792
|
+
expiresAt: Schema2.optional(Schema2.Union(TimestampSchema, Schema2.Null)),
|
|
2793
|
+
memberNumber: OptionalNullableString,
|
|
2794
|
+
cardId: OptionalNullableString,
|
|
2795
|
+
customFields: Schema2.optional(JsonObjectSchema)
|
|
2796
|
+
});
|
|
2797
|
+
var UpsertOrganizationMemberSourceCsvMappingSchema = CsvMemberFieldMappingSchema;
|
|
2798
|
+
var CreateOrganizationMemberSourceCsvUploadSchema = Schema2.Struct({
|
|
2799
|
+
fileName: Schema2.String,
|
|
2800
|
+
contentType: Schema2.optional(Schema2.String),
|
|
2801
|
+
sizeBytes: Schema2.optional(Schema2.Number),
|
|
2802
|
+
mappingId: Schema2.String.annotations({
|
|
2803
|
+
description: "Identifier of a previously saved CSV mapping to use for this upload. Save mappings with the PUT csv-mapping route first."
|
|
2804
|
+
})
|
|
2805
|
+
});
|
|
2806
|
+
var PresignedPostSchema = Schema2.Struct({
|
|
2807
|
+
url: Schema2.String,
|
|
2808
|
+
fields: Schema2.Record({
|
|
2809
|
+
key: Schema2.String,
|
|
2810
|
+
value: Schema2.String
|
|
2811
|
+
})
|
|
2812
|
+
});
|
|
2813
|
+
var CreateOrganizationMemberSourceCsvUploadResponseSchema = Schema2.Struct({
|
|
2814
|
+
importSession: OrganizationMemberSourceCsvImportSchema,
|
|
2815
|
+
mapping: OrganizationMemberSourceCsvMappingSchema,
|
|
2816
|
+
presignedPost: PresignedPostSchema
|
|
2817
|
+
});
|
|
2818
|
+
var OnsiteAgentCsvUploadTargetSchema = Schema2.Struct({
|
|
2819
|
+
importId: Schema2.String,
|
|
2820
|
+
fileName: Schema2.String,
|
|
2821
|
+
contentType: Schema2.String,
|
|
2822
|
+
bucketName: Schema2.String,
|
|
2823
|
+
objectKey: Schema2.String,
|
|
2824
|
+
presignedPost: PresignedPostSchema
|
|
2825
|
+
});
|
|
2826
|
+
var ImportedMemberRecordSchema = Schema2.Struct({
|
|
2827
|
+
lineNumber: Schema2.Union(Schema2.Number, Schema2.Null),
|
|
2828
|
+
previousMemberNumber: NullableString,
|
|
2829
|
+
memberNumber: NullableString,
|
|
2830
|
+
externalSystemMemberId: NullableString,
|
|
2831
|
+
cardId: NullableString,
|
|
2832
|
+
email: NullableString,
|
|
2833
|
+
title: NullableString,
|
|
2834
|
+
firstName: NullableString,
|
|
2835
|
+
middleName: NullableString,
|
|
2836
|
+
lastName: NullableString,
|
|
2837
|
+
dob: Schema2.Union(DateOnlySchema, Schema2.Null),
|
|
2838
|
+
gender: NullableString,
|
|
2839
|
+
mobilePhone: NullableMobilePhoneSchema,
|
|
2840
|
+
homePhone: NullableString,
|
|
2841
|
+
joinedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2842
|
+
preferredContactMethod: NullablePreferredContactMethodSchema,
|
|
2843
|
+
occupation: NullableOccupationSchema,
|
|
2844
|
+
address: Schema2.Union(AddressSchema, Schema2.Null),
|
|
2845
|
+
postalAddress: Schema2.Union(AddressSchema, Schema2.Null),
|
|
2846
|
+
membershipType: NullableString,
|
|
2847
|
+
membershipTypeId: NullableString,
|
|
2848
|
+
ratingGrade: NullableString,
|
|
2849
|
+
ratingGradeId: NullableString,
|
|
2850
|
+
sourceStatus: NullableString,
|
|
2851
|
+
marketingPreferences: Schema2.optional(MarketingPreferencesSchema),
|
|
2852
|
+
expiresAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2853
|
+
sourceUpdatedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2854
|
+
});
|
|
2855
|
+
var OnsiteAgentCommandSchema = Schema2.Struct({
|
|
2856
|
+
runId: Schema2.String,
|
|
2857
|
+
organizationId: Schema2.String,
|
|
2858
|
+
organizationMemberSourceId: Schema2.String,
|
|
2859
|
+
vendor: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2860
|
+
connectorType: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2861
|
+
mode: Schema2.Literal(...organizationMemberSyncModes),
|
|
2862
|
+
inputReference: NullableString,
|
|
2863
|
+
requestedAt: TimestampSchema,
|
|
2864
|
+
cursorBefore: Schema2.Union(JsonObjectSchema, Schema2.Null),
|
|
2865
|
+
config: JsonObjectSchema,
|
|
2866
|
+
secrets: Schema2.Array(OrganizationMemberSourceSecretInputSchema),
|
|
2867
|
+
csvUpload: Schema2.optional(OnsiteAgentCsvUploadTargetSchema)
|
|
2868
|
+
});
|
|
2869
|
+
var OnsiteAgentMemberCreateCommandSchema = Schema2.Struct({
|
|
2870
|
+
commandId: Schema2.String,
|
|
2871
|
+
organizationId: Schema2.String,
|
|
2872
|
+
organizationMemberSourceId: Schema2.String,
|
|
2873
|
+
vendor: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2874
|
+
connectorType: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2875
|
+
requestedAt: TimestampSchema,
|
|
2876
|
+
payload: RequestSourceManagedMemberCreateSchema,
|
|
2877
|
+
config: JsonObjectSchema,
|
|
2878
|
+
secrets: Schema2.Array(OrganizationMemberSourceSecretInputSchema)
|
|
2879
|
+
});
|
|
2880
|
+
var OnsiteAgentMemberUpdateCommandSchema = Schema2.Struct({
|
|
2881
|
+
commandId: Schema2.String,
|
|
2882
|
+
organizationId: Schema2.String,
|
|
2883
|
+
organizationMemberSourceId: Schema2.String,
|
|
2884
|
+
vendor: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2885
|
+
connectorType: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2886
|
+
requestedAt: TimestampSchema,
|
|
2887
|
+
payload: SourceManagedMemberUpdateCommandPayloadSchema,
|
|
2888
|
+
config: JsonObjectSchema,
|
|
2889
|
+
secrets: Schema2.Array(OrganizationMemberSourceSecretInputSchema)
|
|
2890
|
+
});
|
|
2891
|
+
var OnsiteAgentMemberRenewalCommandSchema = Schema2.Struct({
|
|
2892
|
+
commandId: Schema2.String,
|
|
2893
|
+
organizationId: Schema2.String,
|
|
2894
|
+
organizationMemberSourceId: Schema2.String,
|
|
2895
|
+
vendor: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2896
|
+
connectorType: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2897
|
+
requestedAt: TimestampSchema,
|
|
2898
|
+
payload: SourceManagedMemberRenewalCommandPayloadSchema,
|
|
2899
|
+
config: JsonObjectSchema,
|
|
2900
|
+
secrets: Schema2.Array(OrganizationMemberSourceSecretInputSchema)
|
|
2901
|
+
});
|
|
2902
|
+
var OnsiteAgentMemberLookupCommandSchema = Schema2.Struct({
|
|
2903
|
+
commandId: Schema2.String,
|
|
2904
|
+
organizationId: Schema2.String,
|
|
2905
|
+
organizationMemberSourceId: Schema2.String,
|
|
2906
|
+
vendor: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2907
|
+
connectorType: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2908
|
+
requestedAt: TimestampSchema,
|
|
2909
|
+
payload: SourceManagedMemberLookupCommandPayloadSchema,
|
|
2910
|
+
config: JsonObjectSchema,
|
|
2911
|
+
secrets: Schema2.Array(OrganizationMemberSourceSecretInputSchema)
|
|
2912
|
+
});
|
|
2913
|
+
var OnsiteAgentHeartbeatSchema = Schema2.Struct({
|
|
2914
|
+
version: Schema2.String,
|
|
2915
|
+
pollingIntervalSeconds: Schema2.optional(Schema2.Number),
|
|
2916
|
+
metadata: Schema2.optional(JsonObjectSchema),
|
|
2917
|
+
lastError: OptionalNullableString
|
|
2918
|
+
});
|
|
2919
|
+
var OnsiteAgentHeartbeatResponseSchema = Schema2.Struct({
|
|
2920
|
+
id: Schema2.String,
|
|
2921
|
+
organizationId: Schema2.String,
|
|
2922
|
+
organizationMemberSourceId: Schema2.String,
|
|
2923
|
+
connectorType: Schema2.Literal(...organizationMemberSourceVendors),
|
|
2924
|
+
siteId: NullableString,
|
|
2925
|
+
status: Schema2.Literal(...organizationMemberSourceAgentStatuses),
|
|
2926
|
+
clientId: Schema2.String,
|
|
2927
|
+
publicKeyFingerprint: NullableString,
|
|
2928
|
+
pollingIntervalSeconds: Schema2.Number,
|
|
2929
|
+
lastUsedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2930
|
+
lastHeartbeatAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2931
|
+
lastVersion: NullableString,
|
|
2932
|
+
lastError: NullableString,
|
|
2933
|
+
metadata: JsonObjectSchema,
|
|
2934
|
+
syncSchedule: NullableString,
|
|
2935
|
+
nextSyncAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
2936
|
+
syncDue: Schema2.Boolean,
|
|
2937
|
+
syncStateReason: Schema2.Literal("not_due", "enqueued", "existing_run", "none", "error"),
|
|
2938
|
+
activeSyncRunId: Schema2.Union(Schema2.String, Schema2.Null),
|
|
2939
|
+
activeSyncRunStatus: Schema2.Union(
|
|
2940
|
+
Schema2.Literal(...organizationMemberSyncRunStatuses),
|
|
2941
|
+
Schema2.Null
|
|
2942
|
+
),
|
|
2943
|
+
pendingSyncRunId: Schema2.Union(Schema2.String, Schema2.Null),
|
|
2944
|
+
syncCommand: Schema2.optional(Schema2.Union(OnsiteAgentCommandSchema, Schema2.Null)),
|
|
2945
|
+
createdAt: TimestampSchema,
|
|
2946
|
+
updatedAt: TimestampSchema,
|
|
2947
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
2948
|
+
});
|
|
2949
|
+
var OnsiteAgentCompleteRunErrorSchema = Schema2.Struct({
|
|
2950
|
+
lineNumber: Schema2.Union(Schema2.Number, Schema2.Null),
|
|
2951
|
+
externalSystemMemberId: OptionalNullableString,
|
|
2952
|
+
memberNumber: OptionalNullableString,
|
|
2953
|
+
code: Schema2.String,
|
|
2954
|
+
message: Schema2.String,
|
|
2955
|
+
payload: Schema2.optional(JsonObjectSchema)
|
|
2956
|
+
});
|
|
2957
|
+
var OnsiteAgentCompleteRunSchema = Schema2.Struct({
|
|
2958
|
+
records: Schema2.Array(ImportedMemberRecordSchema),
|
|
2959
|
+
cursorAfter: Schema2.optional(Schema2.Union(JsonObjectSchema, Schema2.Null)),
|
|
2960
|
+
rowErrors: Schema2.optional(Schema2.Array(OnsiteAgentCompleteRunErrorSchema)),
|
|
2961
|
+
csvImportUploaded: Schema2.optional(Schema2.Boolean),
|
|
2962
|
+
errorMessage: OptionalNullableString
|
|
2963
|
+
});
|
|
2964
|
+
var OnsiteAgentCompleteMemberCreateSchema = Schema2.Struct({
|
|
2965
|
+
record: Schema2.optional(ImportedMemberRecordSchema),
|
|
2966
|
+
errorMessage: OptionalNullableString
|
|
2967
|
+
});
|
|
2968
|
+
var OnsiteAgentCompleteMemberUpdateSchema = Schema2.Struct({
|
|
2969
|
+
record: Schema2.optional(ImportedMemberRecordSchema),
|
|
2970
|
+
errorMessage: OptionalNullableString
|
|
2971
|
+
});
|
|
2972
|
+
var OnsiteAgentCompleteMemberRenewalSchema = Schema2.Struct({
|
|
2973
|
+
record: Schema2.optional(ImportedMemberRecordSchema),
|
|
2974
|
+
receiptNumber: OptionalNullableNumber,
|
|
2975
|
+
errorMessage: OptionalNullableString
|
|
2976
|
+
});
|
|
2977
|
+
var OnsiteAgentCompleteMemberLookupSchema = Schema2.Struct({
|
|
2978
|
+
record: Schema2.optional(ImportedMemberRecordSchema),
|
|
2979
|
+
rawRecord: Schema2.optional(JsonObjectSchema),
|
|
2980
|
+
errorMessage: OptionalNullableString
|
|
2981
|
+
});
|
|
2982
|
+
var OnsiteAgentIngestLiveFbiBatchSchema = Schema2.Struct({
|
|
2983
|
+
sourceFileName: OptionalNullableString,
|
|
2984
|
+
metadata: Schema2.optional(JsonObjectSchema),
|
|
2985
|
+
records: Schema2.Array(ImportedMemberRecordSchema),
|
|
2986
|
+
rowErrors: Schema2.optional(Schema2.Array(OnsiteAgentCompleteRunErrorSchema))
|
|
2987
|
+
});
|
|
2988
|
+
var OrganizationIdParams = Schema2.Struct({
|
|
2989
|
+
organizationId: HttpApiSchema2.param("organizationId", Schema2.String)
|
|
2990
|
+
});
|
|
2991
|
+
var OrganizationProductOptionParams = Schema2.Struct({
|
|
2992
|
+
organizationProductOptionId: HttpApiSchema2.param("organizationProductOptionId", Schema2.String)
|
|
2993
|
+
});
|
|
2994
|
+
var OrganizationProductWebhookParams = Schema2.Struct({
|
|
2995
|
+
organizationProductWebhookId: HttpApiSchema2.param(
|
|
2996
|
+
"organizationProductWebhookId",
|
|
2997
|
+
Schema2.String
|
|
2998
|
+
)
|
|
2999
|
+
});
|
|
3000
|
+
var OrganizationMemberSourceCommandParams = Schema2.Struct({
|
|
3001
|
+
organizationId: HttpApiSchema2.param("organizationId", Schema2.String),
|
|
3002
|
+
commandId: HttpApiSchema2.param("commandId", Schema2.String)
|
|
3003
|
+
});
|
|
3004
|
+
var OrganizationVoucherCommandParams = Schema2.Struct({
|
|
3005
|
+
organizationId: HttpApiSchema2.param("organizationId", Schema2.String),
|
|
3006
|
+
commandId: HttpApiSchema2.param("commandId", Schema2.String)
|
|
3007
|
+
});
|
|
3008
|
+
var OrganizationMemberParams = Schema2.Struct({
|
|
3009
|
+
organizationId: HttpApiSchema2.param("organizationId", Schema2.String),
|
|
3010
|
+
memberId: HttpApiSchema2.param("memberId", Schema2.String)
|
|
3011
|
+
});
|
|
3012
|
+
var OrganizationPointTypeParams = Schema2.Struct({
|
|
3013
|
+
organizationId: HttpApiSchema2.param("organizationId", Schema2.String),
|
|
3014
|
+
pointTypeId: HttpApiSchema2.param("pointTypeId", Schema2.String)
|
|
3015
|
+
});
|
|
3016
|
+
var OrganizationMemberPointTypeParams = Schema2.Struct({
|
|
3017
|
+
organizationId: HttpApiSchema2.param("organizationId", Schema2.String),
|
|
3018
|
+
memberId: HttpApiSchema2.param("memberId", Schema2.String),
|
|
3019
|
+
pointTypeId: HttpApiSchema2.param("pointTypeId", Schema2.String)
|
|
3020
|
+
});
|
|
3021
|
+
var OrganizationSourceLookupByIdParams = Schema2.Struct({
|
|
3022
|
+
organizationId: HttpApiSchema2.param("organizationId", Schema2.String),
|
|
3023
|
+
externalSystemMemberId: HttpApiSchema2.param("externalSystemMemberId", Schema2.String)
|
|
3024
|
+
});
|
|
3025
|
+
var OrganizationSourceLookupByBadgeParams = Schema2.Struct({
|
|
3026
|
+
organizationId: HttpApiSchema2.param("organizationId", Schema2.String),
|
|
3027
|
+
badgeNumber: HttpApiSchema2.param("badgeNumber", Schema2.String)
|
|
3028
|
+
});
|
|
3029
|
+
var OrganizationSourceLookupByCardParams = Schema2.Struct({
|
|
3030
|
+
organizationId: HttpApiSchema2.param("organizationId", Schema2.String),
|
|
3031
|
+
cardNumber: HttpApiSchema2.param("cardNumber", Schema2.String)
|
|
3032
|
+
});
|
|
3033
|
+
var OrganizationGuestParams = Schema2.Struct({
|
|
3034
|
+
organizationId: HttpApiSchema2.param("organizationId", Schema2.String),
|
|
3035
|
+
guestId: HttpApiSchema2.param("guestId", Schema2.String)
|
|
3036
|
+
});
|
|
3037
|
+
var OrganizationParams = Schema2.Struct({
|
|
3038
|
+
organizationId: HttpApiSchema2.param("organizationId", Schema2.String)
|
|
3039
|
+
});
|
|
3040
|
+
var OrganizationMemberSyncRunParams = Schema2.Struct({
|
|
3041
|
+
runId: HttpApiSchema2.param("runId", Schema2.String)
|
|
3042
|
+
});
|
|
3043
|
+
var ServiceClientParams = Schema2.Struct({
|
|
3044
|
+
serviceClientId: HttpApiSchema2.param("serviceClientId", Schema2.String)
|
|
3045
|
+
});
|
|
3046
|
+
var authGroup = HttpApiGroup.make("auth").add(
|
|
3047
|
+
HttpApiEndpoint.get("getAdminSession", "/admin/session").addSuccess(AdminSessionSchema).annotateContext(
|
|
3048
|
+
OpenApi.annotations({ summary: "Get the current authenticated admin session" })
|
|
3049
|
+
)
|
|
3050
|
+
);
|
|
3051
|
+
var organizationsGroup = HttpApiGroup.make("organizations").add(
|
|
3052
|
+
HttpApiEndpoint.get("listOrganizationProductOptions", "/organization-products").setUrlParams(OrganizationProductOptionsListUrlParamsSchema).addSuccess(PaginatedOrganizationProductOptionsSchema).annotateContext(
|
|
3053
|
+
OpenApi.annotations({ summary: "List available organization product options" })
|
|
3054
|
+
)
|
|
3055
|
+
).add(
|
|
3056
|
+
HttpApiEndpoint.post("createOrganizationProductOption", "/organization-products").setPayload(CreateOrganizationProductOptionSchema).addSuccess(OrganizationProductOptionSchema, { status: 201 }).annotateContext(OpenApi.annotations({ summary: "Create an organization product option" }))
|
|
3057
|
+
).add(
|
|
3058
|
+
HttpApiEndpoint.get("listOrganizationProductWebhooks", "/organization-product-webhooks").setUrlParams(OrganizationProductWebhookListUrlParamsSchema).addSuccess(PaginatedOrganizationProductWebhooksSchema).annotateContext(
|
|
3059
|
+
OpenApi.annotations({ summary: "List configured platform product webhooks" })
|
|
3060
|
+
)
|
|
3061
|
+
).add(
|
|
3062
|
+
HttpApiEndpoint.get(
|
|
3063
|
+
"listOrganizationProductOptionWebhooks",
|
|
3064
|
+
"/organization-products/:organizationProductOptionId/webhooks"
|
|
3065
|
+
).setPath(OrganizationProductOptionParams).setUrlParams(
|
|
3066
|
+
Schema2.Struct({
|
|
3067
|
+
page: optionalQueryString(
|
|
3068
|
+
"1-based page number. Defaults to 1 when omitted or invalid.",
|
|
3069
|
+
{
|
|
3070
|
+
example: "1"
|
|
3071
|
+
}
|
|
3072
|
+
),
|
|
3073
|
+
pageSize: optionalQueryString(
|
|
3074
|
+
"Number of organization product webhooks per page. Defaults to 25 and is capped at 100.",
|
|
3075
|
+
{
|
|
3076
|
+
example: "25"
|
|
3077
|
+
}
|
|
3078
|
+
)
|
|
3079
|
+
})
|
|
3080
|
+
).addSuccess(PaginatedOrganizationProductWebhooksSchema).annotateContext(
|
|
3081
|
+
OpenApi.annotations({ summary: "List configured webhooks for an organization product option" })
|
|
3082
|
+
)
|
|
3083
|
+
).add(
|
|
3084
|
+
HttpApiEndpoint.post(
|
|
3085
|
+
"createOrganizationProductWebhook",
|
|
3086
|
+
"/organization-products/:organizationProductOptionId/webhooks"
|
|
3087
|
+
).setPath(OrganizationProductOptionParams).setPayload(CreateOrganizationProductWebhookSchema).addSuccess(OrganizationProductWebhookUpsertResponseSchema, { status: 201 }).annotateContext(
|
|
3088
|
+
OpenApi.annotations({ summary: "Create a webhook for an organization product option" })
|
|
3089
|
+
)
|
|
3090
|
+
).add(
|
|
3091
|
+
HttpApiEndpoint.get(
|
|
3092
|
+
"getOrganizationProductWebhook",
|
|
3093
|
+
"/organization-products/:organizationProductOptionId/webhook"
|
|
3094
|
+
).setPath(OrganizationProductOptionParams).addSuccess(Schema2.Union(OrganizationProductWebhookSchema, Schema2.Null)).annotateContext(
|
|
3095
|
+
OpenApi.annotations({
|
|
3096
|
+
summary: "Legacy single-webhook lookup for an organization product option"
|
|
3097
|
+
})
|
|
3098
|
+
)
|
|
3099
|
+
).add(
|
|
3100
|
+
HttpApiEndpoint.put(
|
|
3101
|
+
"upsertOrganizationProductWebhook",
|
|
3102
|
+
"/organization-products/:organizationProductOptionId/webhook"
|
|
3103
|
+
).setPath(OrganizationProductOptionParams).setPayload(UpsertOrganizationProductWebhookSchema).addSuccess(OrganizationProductWebhookUpsertResponseSchema).annotateContext(
|
|
3104
|
+
OpenApi.annotations({
|
|
3105
|
+
summary: "Legacy single-webhook create-or-update helper for an organization product option"
|
|
3106
|
+
})
|
|
3107
|
+
)
|
|
3108
|
+
).add(
|
|
3109
|
+
HttpApiEndpoint.put(
|
|
3110
|
+
"updateOrganizationProductWebhook",
|
|
3111
|
+
"/organization-product-webhooks/:organizationProductWebhookId"
|
|
3112
|
+
).setPath(OrganizationProductWebhookParams).setPayload(UpdateOrganizationProductWebhookSchema).addSuccess(OrganizationProductWebhookUpsertResponseSchema).annotateContext(
|
|
3113
|
+
OpenApi.annotations({ summary: "Update an organization product webhook" })
|
|
3114
|
+
)
|
|
3115
|
+
).add(
|
|
3116
|
+
HttpApiEndpoint.del(
|
|
3117
|
+
"deleteOrganizationProductWebhook",
|
|
3118
|
+
"/organization-product-webhooks/:organizationProductWebhookId"
|
|
3119
|
+
).setPath(OrganizationProductWebhookParams).addSuccess(OrganizationProductWebhookSchema).annotateContext(
|
|
3120
|
+
OpenApi.annotations({ summary: "Delete an organization product webhook" })
|
|
3121
|
+
)
|
|
3122
|
+
).add(
|
|
3123
|
+
HttpApiEndpoint.get("listOrganizations", "/organizations").setUrlParams(OrganizationsListUrlParamsSchema).addSuccess(PaginatedOrganizationsSchema).annotateContext(OpenApi.annotations({ summary: "List organizations" }))
|
|
3124
|
+
).add(
|
|
3125
|
+
HttpApiEndpoint.post("createOrganization", "/organizations").setPayload(CreateOrganizationSchema).addSuccess(OrganizationSchema, { status: 201 }).annotateContext(
|
|
3126
|
+
OpenApi.annotations({
|
|
3127
|
+
summary: "Create an organization",
|
|
3128
|
+
transform: organizationWriteExamplesTransform
|
|
3129
|
+
})
|
|
3130
|
+
)
|
|
3131
|
+
).add(
|
|
3132
|
+
HttpApiEndpoint.patch("updateOrganization", "/organizations/:organizationId").setPath(OrganizationParams).setPayload(UpdateOrganizationSchema).addSuccess(OrganizationSchema).annotateContext(
|
|
3133
|
+
OpenApi.annotations({
|
|
3134
|
+
summary: "Update an organization",
|
|
3135
|
+
transform: organizationUpdateExamplesTransform
|
|
3136
|
+
})
|
|
3137
|
+
)
|
|
3138
|
+
).add(
|
|
3139
|
+
HttpApiEndpoint.del("deleteOrganization", "/organizations/:organizationId").setPath(OrganizationParams).setPayload(DeletePayloadSchema).annotateContext(
|
|
3140
|
+
OpenApi.annotations({
|
|
3141
|
+
summary: "Archive an organization",
|
|
3142
|
+
transform: deletePayloadExamplesTransform
|
|
3143
|
+
})
|
|
3144
|
+
)
|
|
3145
|
+
).add(
|
|
3146
|
+
HttpApiEndpoint.get(
|
|
3147
|
+
"searchOrganizationPeopleByContact",
|
|
3148
|
+
"/organizations/:organizationId/people/contact-search"
|
|
3149
|
+
).setPath(OrganizationIdParams).setUrlParams(OrganizationPeopleContactLookupUrlParamsSchema).addSuccess(OrganizationPeopleContactLookupResponseSchema).annotateContext(
|
|
3150
|
+
OpenApi.annotations({
|
|
3151
|
+
summary: "Search members and guests by exact email or mobile phone",
|
|
3152
|
+
transform: peopleContactSearchExamplesTransform
|
|
3153
|
+
})
|
|
3154
|
+
)
|
|
3155
|
+
);
|
|
3156
|
+
var membersGroup = HttpApiGroup.make("members").add(
|
|
3157
|
+
HttpApiEndpoint.get("listOrganizationMembers", "/organizations/:organizationId/members").setPath(OrganizationIdParams).setUrlParams(OrganizationMembersListUrlParamsSchema).addSuccess(PaginatedOrganizationMembersResponseSchema).annotateContext(
|
|
3158
|
+
OpenApi.annotations({
|
|
3159
|
+
summary: "List members for an organization",
|
|
3160
|
+
transform: memberListExamplesTransform
|
|
3161
|
+
})
|
|
3162
|
+
)
|
|
3163
|
+
).add(
|
|
3164
|
+
HttpApiEndpoint.get("getOrganizationMember", "/organizations/:organizationId/members/:memberId").setPath(OrganizationMemberParams).setUrlParams(MemberResponseModeUrlParamsSchema).addSuccess(MemberResponseSchema).annotateContext(
|
|
3165
|
+
OpenApi.annotations({
|
|
3166
|
+
summary: "Get a member for an organization",
|
|
3167
|
+
transform: memberExamplesTransform
|
|
3168
|
+
})
|
|
3169
|
+
)
|
|
3170
|
+
).add(
|
|
3171
|
+
HttpApiEndpoint.get(
|
|
3172
|
+
"getOrganizationMemberStatusCredits",
|
|
3173
|
+
"/organizations/:organizationId/members/:memberId/status-credits"
|
|
3174
|
+
).setPath(OrganizationMemberParams).addSuccess(MemberStatusCreditsSchema).annotateContext(
|
|
3175
|
+
OpenApi.annotations({
|
|
3176
|
+
summary: "Get a member's status credits"
|
|
3177
|
+
})
|
|
3178
|
+
)
|
|
3179
|
+
).add(
|
|
3180
|
+
HttpApiEndpoint.post("bulkGetOrganizationMembers", "/organizations/:organizationId/members/bulk").setPath(OrganizationIdParams).setPayload(BulkGetOrganizationMembersSchema).addSuccess(BulkOrganizationMembersResponseUnionSchema).annotateContext(
|
|
3181
|
+
OpenApi.annotations({
|
|
3182
|
+
summary: "Fetch up to 50 members by Spoke Hub member ID for an organization",
|
|
3183
|
+
transform: bulkMemberExamplesTransform
|
|
3184
|
+
})
|
|
3185
|
+
)
|
|
3186
|
+
).add(
|
|
3187
|
+
HttpApiEndpoint.get(
|
|
3188
|
+
"listOrganizationMemberRatingGrades",
|
|
3189
|
+
"/organizations/:organizationId/members/rating-grades"
|
|
3190
|
+
).setPath(OrganizationIdParams).setUrlParams(OrganizationMemberRatingGradesListUrlParamsSchema).addSuccess(PaginatedOrganizationMemberRatingGradesSchema).annotateContext(
|
|
3191
|
+
OpenApi.annotations({
|
|
3192
|
+
summary: "List distinct rating grades for an organization"
|
|
3193
|
+
})
|
|
3194
|
+
)
|
|
3195
|
+
).add(
|
|
3196
|
+
HttpApiEndpoint.get(
|
|
3197
|
+
"listOrganizationMemberMembershipTypes",
|
|
3198
|
+
"/organizations/:organizationId/members/membership-types"
|
|
3199
|
+
).setPath(OrganizationIdParams).setUrlParams(OrganizationMemberMembershipTypesListUrlParamsSchema).addSuccess(PaginatedOrganizationMemberMembershipTypesSchema).annotateContext(
|
|
3200
|
+
OpenApi.annotations({
|
|
3201
|
+
summary: "List distinct membership types for an organization"
|
|
3202
|
+
})
|
|
3203
|
+
)
|
|
3204
|
+
).add(
|
|
3205
|
+
HttpApiEndpoint.get(
|
|
3206
|
+
"listOrganizationMemberTitles",
|
|
3207
|
+
"/organizations/:organizationId/members/titles"
|
|
3208
|
+
).setPath(OrganizationIdParams).setUrlParams(OrganizationMemberTitlesListUrlParamsSchema).addSuccess(PaginatedOrganizationMemberTitlesSchema).annotateContext(
|
|
3209
|
+
OpenApi.annotations({
|
|
3210
|
+
summary: "List distinct member titles for an organization"
|
|
3211
|
+
})
|
|
3212
|
+
)
|
|
3213
|
+
).add(
|
|
3214
|
+
HttpApiEndpoint.get(
|
|
3215
|
+
"listOrganizationMemberGenders",
|
|
3216
|
+
"/organizations/:organizationId/members/genders"
|
|
3217
|
+
).setPath(OrganizationIdParams).setUrlParams(OrganizationMemberGendersListUrlParamsSchema).addSuccess(PaginatedOrganizationMemberGendersSchema).annotateContext(
|
|
3218
|
+
OpenApi.annotations({
|
|
3219
|
+
summary: "List distinct member genders for an organization"
|
|
3220
|
+
})
|
|
3221
|
+
)
|
|
3222
|
+
).add(
|
|
3223
|
+
HttpApiEndpoint.post("createOrganizationMember", "/organizations/:organizationId/members").setPath(OrganizationIdParams).setPayload(CreateMemberSchema).addSuccess(MemberSchema, { status: 201 }).annotateContext(
|
|
3224
|
+
OpenApi.annotations({
|
|
3225
|
+
summary: "Create a member for an organization",
|
|
3226
|
+
transform: createMemberExamplesTransform
|
|
3227
|
+
})
|
|
3228
|
+
)
|
|
3229
|
+
).add(
|
|
3230
|
+
HttpApiEndpoint.post(
|
|
3231
|
+
"requestSourceManagedMemberCreate",
|
|
3232
|
+
"/organizations/:organizationId/members/source-create"
|
|
3233
|
+
).setPath(OrganizationIdParams).setPayload(RequestSourceManagedMemberCreateSchema).addSuccess(OrganizationMemberSourceCommandSchema, { status: 202 }).annotateContext(
|
|
3234
|
+
OpenApi.annotations({
|
|
3235
|
+
summary: "Request member creation via the configured upstream source",
|
|
3236
|
+
transform: sourceManagedCreateExamplesTransform
|
|
3237
|
+
})
|
|
3238
|
+
)
|
|
3239
|
+
).add(
|
|
3240
|
+
HttpApiEndpoint.post(
|
|
3241
|
+
"requestSourceManagedMemberRenewal",
|
|
3242
|
+
"/organizations/:organizationId/members/:memberId/source-renewal"
|
|
3243
|
+
).setPath(OrganizationMemberParams).setPayload(RequestSourceManagedMemberRenewalSchema).addSuccess(OrganizationMemberSourceCommandSchema, { status: 202 }).annotateContext(
|
|
3244
|
+
OpenApi.annotations({
|
|
3245
|
+
summary: "Request membership renewal via the configured upstream source",
|
|
3246
|
+
transform: sourceManagedRenewalExamplesTransform
|
|
3247
|
+
})
|
|
3248
|
+
)
|
|
3249
|
+
).add(
|
|
3250
|
+
HttpApiEndpoint.post(
|
|
3251
|
+
"requestSourceManagedMemberUpdate",
|
|
3252
|
+
"/organizations/:organizationId/members/:memberId/source-update"
|
|
3253
|
+
).setPath(OrganizationMemberParams).setPayload(RequestSourceManagedMemberUpdateSchema).addSuccess(OrganizationMemberSourceCommandSchema, { status: 202 }).annotateContext(
|
|
3254
|
+
OpenApi.annotations({
|
|
3255
|
+
summary: "Request member update via the configured upstream source",
|
|
3256
|
+
transform: sourceManagedUpdateExamplesTransform
|
|
3257
|
+
})
|
|
3258
|
+
)
|
|
3259
|
+
).add(
|
|
3260
|
+
HttpApiEndpoint.post(
|
|
3261
|
+
"requestSourceManagedMemberLookupById",
|
|
3262
|
+
"/organizations/:organizationId/members/source-lookup/by-id/:externalSystemMemberId"
|
|
3263
|
+
).setPath(OrganizationSourceLookupByIdParams).addSuccess(OrganizationMemberSourceCommandSchema, { status: 202 }).annotateContext(
|
|
3264
|
+
OpenApi.annotations({
|
|
3265
|
+
summary: "Request upstream member lookup by source member identifier"
|
|
3266
|
+
})
|
|
3267
|
+
)
|
|
3268
|
+
).add(
|
|
3269
|
+
HttpApiEndpoint.post(
|
|
3270
|
+
"requestSourceManagedMemberLookupByBadgeNumber",
|
|
3271
|
+
"/organizations/:organizationId/members/source-lookup/by-badge/:badgeNumber"
|
|
3272
|
+
).setPath(OrganizationSourceLookupByBadgeParams).addSuccess(OrganizationMemberSourceCommandSchema, { status: 202 }).annotateContext(
|
|
3273
|
+
OpenApi.annotations({
|
|
3274
|
+
summary: "Request upstream member lookup by badge number"
|
|
3275
|
+
})
|
|
3276
|
+
)
|
|
3277
|
+
).add(
|
|
3278
|
+
HttpApiEndpoint.post(
|
|
3279
|
+
"requestSourceManagedMemberLookupByCardNumber",
|
|
3280
|
+
"/organizations/:organizationId/members/source-lookup/by-card/:cardNumber"
|
|
3281
|
+
).setPath(OrganizationSourceLookupByCardParams).addSuccess(OrganizationMemberSourceCommandSchema, { status: 202 }).annotateContext(
|
|
3282
|
+
OpenApi.annotations({
|
|
3283
|
+
summary: "Request upstream member lookup by card number"
|
|
3284
|
+
})
|
|
3285
|
+
)
|
|
3286
|
+
).add(
|
|
3287
|
+
HttpApiEndpoint.patch(
|
|
3288
|
+
"updateOrganizationMember",
|
|
3289
|
+
"/organizations/:organizationId/members/:memberId"
|
|
3290
|
+
).setPath(OrganizationMemberParams).setPayload(UpdateMemberSchema).addSuccess(MemberSchema).annotateContext(
|
|
3291
|
+
OpenApi.annotations({
|
|
3292
|
+
summary: "Update a member for an organization",
|
|
3293
|
+
transform: updateMemberExamplesTransform
|
|
3294
|
+
})
|
|
3295
|
+
)
|
|
3296
|
+
).add(
|
|
3297
|
+
HttpApiEndpoint.patch(
|
|
3298
|
+
"updateOrganizationMemberStatusCredits",
|
|
3299
|
+
"/organizations/:organizationId/members/:memberId/status-credits"
|
|
3300
|
+
).setPath(OrganizationMemberParams).setPayload(UpdateMemberStatusCreditsSchema).addSuccess(MemberStatusCreditsSchema).annotateContext(
|
|
3301
|
+
OpenApi.annotations({
|
|
3302
|
+
summary: "Update a member's status credits"
|
|
3303
|
+
})
|
|
3304
|
+
)
|
|
3305
|
+
).add(
|
|
3306
|
+
HttpApiEndpoint.del(
|
|
3307
|
+
"deleteOrganizationMember",
|
|
3308
|
+
"/organizations/:organizationId/members/:memberId"
|
|
3309
|
+
).setPath(OrganizationMemberParams).setPayload(DeletePayloadSchema).annotateContext(
|
|
3310
|
+
OpenApi.annotations({
|
|
3311
|
+
summary: "Archive a member for an organization",
|
|
3312
|
+
transform: deletePayloadExamplesTransform
|
|
3313
|
+
})
|
|
3314
|
+
)
|
|
3315
|
+
);
|
|
3316
|
+
var memberPointsGroup = HttpApiGroup.make("memberPoints").add(
|
|
3317
|
+
HttpApiEndpoint.get("listOrganizationPointTypes", "/organizations/:organizationId/point-types").setPath(OrganizationIdParams).addSuccess(OrganizationPointTypesResponseSchema).annotateContext(
|
|
3318
|
+
OpenApi.annotations({
|
|
3319
|
+
summary: "List point types for an organization"
|
|
3320
|
+
})
|
|
3321
|
+
)
|
|
3322
|
+
).add(
|
|
3323
|
+
HttpApiEndpoint.post("createOrganizationPointType", "/organizations/:organizationId/point-types").setPath(OrganizationIdParams).setPayload(CreateOrganizationPointTypeSchema).addSuccess(OrganizationPointTypeSchema, { status: 201 }).annotateContext(
|
|
3324
|
+
OpenApi.annotations({
|
|
3325
|
+
summary: "Create a point type for an organization"
|
|
3326
|
+
})
|
|
3327
|
+
)
|
|
3328
|
+
).add(
|
|
3329
|
+
HttpApiEndpoint.patch(
|
|
3330
|
+
"updateOrganizationPointType",
|
|
3331
|
+
"/organizations/:organizationId/point-types/:pointTypeId"
|
|
3332
|
+
).setPath(OrganizationPointTypeParams).setPayload(UpdateOrganizationPointTypeSchema).addSuccess(OrganizationPointTypeSchema).annotateContext(
|
|
3333
|
+
OpenApi.annotations({
|
|
3334
|
+
summary: "Update a point type for an organization"
|
|
3335
|
+
})
|
|
3336
|
+
)
|
|
3337
|
+
).add(
|
|
3338
|
+
HttpApiEndpoint.get(
|
|
3339
|
+
"listOrganizationMemberPointBalances",
|
|
3340
|
+
"/organizations/:organizationId/members/:memberId/points"
|
|
3341
|
+
).setPath(OrganizationMemberParams).addSuccess(MemberPointBalancesResponseSchema).annotateContext(
|
|
3342
|
+
OpenApi.annotations({
|
|
3343
|
+
summary: "List point balances for a member"
|
|
3344
|
+
})
|
|
3345
|
+
)
|
|
3346
|
+
).add(
|
|
3347
|
+
HttpApiEndpoint.put(
|
|
3348
|
+
"upsertOrganizationMemberPointBalance",
|
|
3349
|
+
"/organizations/:organizationId/members/:memberId/points/:pointTypeId"
|
|
3350
|
+
).setPath(OrganizationMemberPointTypeParams).setPayload(UpsertMemberPointBalanceSchema).addSuccess(MemberPointBalanceSchema).annotateContext(
|
|
3351
|
+
OpenApi.annotations({
|
|
3352
|
+
summary: "Create or update a member point balance"
|
|
3353
|
+
})
|
|
3354
|
+
)
|
|
3355
|
+
);
|
|
3356
|
+
var vouchersGroup = HttpApiGroup.make("vouchers").add(
|
|
3357
|
+
HttpApiEndpoint.get(
|
|
3358
|
+
"getOrganizationVoucherProvider",
|
|
3359
|
+
"/organizations/:organizationId/voucher-provider"
|
|
3360
|
+
).setPath(OrganizationIdParams).addSuccess(Schema2.Union(OrganizationVoucherProviderSchema, Schema2.Null)).annotateContext(
|
|
3361
|
+
OpenApi.annotations({ summary: "Get the voucher provider for an organization" })
|
|
3362
|
+
)
|
|
3363
|
+
).add(
|
|
3364
|
+
HttpApiEndpoint.put(
|
|
3365
|
+
"upsertOrganizationVoucherProvider",
|
|
3366
|
+
"/organizations/:organizationId/voucher-provider"
|
|
3367
|
+
).setPath(OrganizationIdParams).setPayload(UpsertOrganizationVoucherProviderSchema).addSuccess(OrganizationVoucherProviderSchema).annotateContext(
|
|
3368
|
+
OpenApi.annotations({ summary: "Create or update the voucher provider for an organization" })
|
|
3369
|
+
)
|
|
3370
|
+
).add(
|
|
3371
|
+
HttpApiEndpoint.post("requestVoucherIssue", "/organizations/:organizationId/vouchers/issue").setPath(OrganizationIdParams).setPayload(RequestVoucherIssueSchema).addSuccess(OrganizationVoucherCommandSchema, { status: 202 }).annotateContext(
|
|
3372
|
+
OpenApi.annotations({ summary: "Request a voucher issue through the onsite voucher client" })
|
|
3373
|
+
)
|
|
3374
|
+
).add(
|
|
3375
|
+
HttpApiEndpoint.post(
|
|
3376
|
+
"pollOnsiteVoucherCommand",
|
|
3377
|
+
"/organizations/:organizationId/onsite-voucher-commands/poll"
|
|
3378
|
+
).setPath(OrganizationIdParams).addSuccess(Schema2.Union(OnsiteVoucherCommandSchema, Schema2.Null)).annotateContext(
|
|
3379
|
+
OpenApi.annotations({ summary: "Poll for the next pending onsite voucher command" })
|
|
3380
|
+
)
|
|
3381
|
+
).add(
|
|
3382
|
+
HttpApiEndpoint.post("pollCurrentOnsiteVoucherCommand", "/onsite-voucher-commands/poll").addSuccess(Schema2.Union(OnsiteVoucherCommandSchema, Schema2.Null)).annotateContext(
|
|
3383
|
+
OpenApi.annotations({
|
|
3384
|
+
summary: "Poll for the next pending onsite voucher command for the signed credential"
|
|
3385
|
+
})
|
|
3386
|
+
)
|
|
3387
|
+
).add(
|
|
3388
|
+
HttpApiEndpoint.post(
|
|
3389
|
+
"completeOnsiteVoucherCommand",
|
|
3390
|
+
"/organizations/:organizationId/onsite-voucher-commands/:commandId/complete"
|
|
3391
|
+
).setPath(OrganizationVoucherCommandParams).setPayload(CompleteOnsiteVoucherCommandSchema).addSuccess(OrganizationVoucherCommandSchema).annotateContext(
|
|
3392
|
+
OpenApi.annotations({ summary: "Complete an onsite voucher command" })
|
|
3393
|
+
)
|
|
3394
|
+
);
|
|
3395
|
+
var onsiteCallsGroup = HttpApiGroup.make("onsiteCalls").add(
|
|
3396
|
+
HttpApiEndpoint.post("callOnsiteResource", "/organizations/:organizationId/onsite-calls").setPath(OrganizationIdParams).setPayload(OnsiteResourceCallRequestSchema).addSuccess(OnsiteResourceCallResponseSchema).annotateContext(
|
|
3397
|
+
OpenApi.annotations({
|
|
3398
|
+
summary: "Call a live onsite member or voucher resource and wait briefly for completion"
|
|
3399
|
+
})
|
|
3400
|
+
)
|
|
3401
|
+
);
|
|
3402
|
+
var memberSourcesGroup = HttpApiGroup.make("memberSources").add(
|
|
3403
|
+
HttpApiEndpoint.get(
|
|
3404
|
+
"getOrganizationMemberSource",
|
|
3405
|
+
"/organizations/:organizationId/member-source"
|
|
3406
|
+
).setPath(OrganizationIdParams).addSuccess(Schema2.Union(OrganizationMemberSourceSchema, Schema2.Null)).annotateContext(
|
|
3407
|
+
OpenApi.annotations({ summary: "Get the member source configuration for an organization" })
|
|
3408
|
+
)
|
|
3409
|
+
).add(
|
|
3410
|
+
HttpApiEndpoint.put(
|
|
3411
|
+
"upsertOrganizationMemberSource",
|
|
3412
|
+
"/organizations/:organizationId/member-source"
|
|
3413
|
+
).setPath(OrganizationIdParams).setPayload(UpsertOrganizationMemberSourceSchema).addSuccess(OrganizationMemberSourceSchema).annotateContext(
|
|
3414
|
+
OpenApi.annotations({ summary: "Create or update the member source for an organization" })
|
|
3415
|
+
)
|
|
3416
|
+
).add(
|
|
3417
|
+
HttpApiEndpoint.post(
|
|
3418
|
+
"bootstrapOrganizationMemberSourceAgent",
|
|
3419
|
+
"/organizations/:organizationId/member-source/agent/bootstrap"
|
|
3420
|
+
).setPath(OrganizationIdParams).setPayload(BootstrapOrganizationMemberSourceAgentSchema).addSuccess(BootstrapOrganizationMemberSourceAgentResponseSchema, { status: 201 }).annotateContext(
|
|
3421
|
+
OpenApi.annotations({
|
|
3422
|
+
summary: "Create or rotate onsite agent credentials for an organization member source"
|
|
3423
|
+
})
|
|
3424
|
+
)
|
|
3425
|
+
).add(
|
|
3426
|
+
HttpApiEndpoint.get(
|
|
3427
|
+
"getOrganizationMemberSourceCsvUploadReadiness",
|
|
3428
|
+
"/organizations/:organizationId/member-source/csv-upload-readiness"
|
|
3429
|
+
).setPath(OrganizationIdParams).addSuccess(CsvUploadReadinessSchema).annotateContext(
|
|
3430
|
+
OpenApi.annotations({
|
|
3431
|
+
summary: "Check whether CSV uploads are enabled and whether a mapping exists"
|
|
3432
|
+
})
|
|
3433
|
+
)
|
|
3434
|
+
).add(
|
|
3435
|
+
HttpApiEndpoint.get(
|
|
3436
|
+
"getOrganizationMemberSourceWebhook",
|
|
3437
|
+
"/organizations/:organizationId/member-source/webhook"
|
|
3438
|
+
).setPath(OrganizationIdParams).addSuccess(Schema2.Union(OrganizationMemberSourceWebhookSchema, Schema2.Null)).annotateContext(
|
|
3439
|
+
OpenApi.annotations({
|
|
3440
|
+
summary: "Get the configured member-source webhook for an organization"
|
|
3441
|
+
})
|
|
3442
|
+
)
|
|
3443
|
+
).add(
|
|
3444
|
+
HttpApiEndpoint.put(
|
|
3445
|
+
"upsertOrganizationMemberSourceWebhook",
|
|
3446
|
+
"/organizations/:organizationId/member-source/webhook"
|
|
3447
|
+
).setPath(OrganizationIdParams).setPayload(UpsertOrganizationMemberSourceWebhookSchema).addSuccess(OrganizationMemberSourceWebhookUpsertResponseSchema).annotateContext(
|
|
3448
|
+
OpenApi.annotations({
|
|
3449
|
+
summary: "Create or update the member-source webhook for an organization"
|
|
3450
|
+
})
|
|
3451
|
+
)
|
|
3452
|
+
).add(
|
|
3453
|
+
HttpApiEndpoint.get(
|
|
3454
|
+
"getOrganizationMemberSourceCsvMapping",
|
|
3455
|
+
"/organizations/:organizationId/member-source/csv-mapping"
|
|
3456
|
+
).setPath(OrganizationIdParams).addSuccess(Schema2.Union(OrganizationMemberSourceCsvMappingSchema, Schema2.Null)).annotateContext(
|
|
3457
|
+
OpenApi.annotations({
|
|
3458
|
+
summary: "Get the current CSV mapping for an organization member source"
|
|
3459
|
+
})
|
|
3460
|
+
)
|
|
3461
|
+
).add(
|
|
3462
|
+
HttpApiEndpoint.put(
|
|
3463
|
+
"upsertOrganizationMemberSourceCsvMapping",
|
|
3464
|
+
"/organizations/:organizationId/member-source/csv-mapping"
|
|
3465
|
+
).setPath(OrganizationIdParams).setPayload(UpsertOrganizationMemberSourceCsvMappingSchema).addSuccess(OrganizationMemberSourceCsvMappingSchema).annotateContext(
|
|
3466
|
+
OpenApi.annotations({
|
|
3467
|
+
summary: "Create or update the CSV mapping for an organization member source"
|
|
3468
|
+
})
|
|
3469
|
+
)
|
|
3470
|
+
).add(
|
|
3471
|
+
HttpApiEndpoint.post(
|
|
3472
|
+
"createOrganizationMemberSourceCsvUpload",
|
|
3473
|
+
"/organizations/:organizationId/member-source/csv-uploads"
|
|
3474
|
+
).setPath(OrganizationIdParams).setPayload(CreateOrganizationMemberSourceCsvUploadSchema).addSuccess(CreateOrganizationMemberSourceCsvUploadResponseSchema, { status: 201 }).annotateContext(
|
|
3475
|
+
OpenApi.annotations({
|
|
3476
|
+
summary: "Create a tracked CSV import session using a saved mapping id and return a presigned POST"
|
|
3477
|
+
})
|
|
3478
|
+
)
|
|
3479
|
+
).add(
|
|
3480
|
+
HttpApiEndpoint.get(
|
|
3481
|
+
"listOrganizationMemberSyncRuns",
|
|
3482
|
+
"/organizations/:organizationId/member-source/runs"
|
|
3483
|
+
).setPath(OrganizationIdParams).setUrlParams(OrganizationMemberSyncRunsListUrlParamsSchema).addSuccess(PaginatedOrganizationMemberSyncRunsSchema).annotateContext(
|
|
3484
|
+
OpenApi.annotations({ summary: "List sync runs for an organization member source" })
|
|
3485
|
+
)
|
|
3486
|
+
).add(
|
|
3487
|
+
HttpApiEndpoint.get(
|
|
3488
|
+
"getLatestOrganizationMemberSourceCsvUploadRun",
|
|
3489
|
+
"/organizations/:organizationId/member-source/csv-uploads/latest-run"
|
|
3490
|
+
).setPath(OrganizationIdParams).addSuccess(Schema2.Union(OrganizationMemberSyncRunSchema, Schema2.Null)).annotateContext(
|
|
3491
|
+
OpenApi.annotations({
|
|
3492
|
+
summary: "Get the latest sync run created from a tracked CSV upload for an organization"
|
|
3493
|
+
})
|
|
3494
|
+
)
|
|
3495
|
+
).add(
|
|
3496
|
+
HttpApiEndpoint.get(
|
|
3497
|
+
"listOrganizationMemberSourceCommands",
|
|
3498
|
+
"/organizations/:organizationId/member-source/commands"
|
|
3499
|
+
).setPath(OrganizationIdParams).setUrlParams(OrganizationMemberSourceCommandsListUrlParamsSchema).addSuccess(PaginatedOrganizationMemberSourceCommandsSchema).annotateContext(
|
|
3500
|
+
OpenApi.annotations({ summary: "List member-source write commands for an organization" })
|
|
3501
|
+
)
|
|
3502
|
+
).add(
|
|
3503
|
+
HttpApiEndpoint.get(
|
|
3504
|
+
"getOrganizationMemberSourceCommand",
|
|
3505
|
+
"/organizations/:organizationId/member-source/commands/:commandId"
|
|
3506
|
+
).setPath(OrganizationMemberSourceCommandParams).addSuccess(OrganizationMemberSourceCommandSchema).annotateContext(
|
|
3507
|
+
OpenApi.annotations({
|
|
3508
|
+
summary: "Get a specific member-source command for an organization"
|
|
3509
|
+
})
|
|
3510
|
+
)
|
|
3511
|
+
).add(
|
|
3512
|
+
HttpApiEndpoint.post(
|
|
3513
|
+
"triggerOrganizationMemberSync",
|
|
3514
|
+
"/organizations/:organizationId/member-source/sync"
|
|
3515
|
+
).setPath(OrganizationIdParams).setPayload(TriggerOrganizationMemberSyncSchema).addSuccess(OrganizationMemberSyncRunSchema, { status: 202 }).annotateContext(
|
|
3516
|
+
OpenApi.annotations({ summary: "Trigger a member sync for an organization" })
|
|
3517
|
+
)
|
|
3518
|
+
);
|
|
3519
|
+
var onsiteAgentsGroup = HttpApiGroup.make("onsiteAgents").add(
|
|
3520
|
+
HttpApiEndpoint.post("heartbeatOnsiteAgent", "/onsite-agent/heartbeat").setPayload(OnsiteAgentHeartbeatSchema).addSuccess(OnsiteAgentHeartbeatResponseSchema).annotateContext(
|
|
3521
|
+
OpenApi.annotations({ summary: "Record onsite agent heartbeat and metadata" })
|
|
3522
|
+
)
|
|
3523
|
+
).add(
|
|
3524
|
+
HttpApiEndpoint.post("ingestOnsiteAgentLiveFbiBatch", "/onsite-agent/live-feed/fbi").setPayload(OnsiteAgentIngestLiveFbiBatchSchema).addSuccess(OrganizationMemberSyncRunSchema, { status: 202 }).annotateContext(
|
|
3525
|
+
OpenApi.annotations({
|
|
3526
|
+
summary: "Submit a debounced MAX FBI live-feed batch for immediate processing"
|
|
3527
|
+
})
|
|
3528
|
+
)
|
|
3529
|
+
).add(
|
|
3530
|
+
HttpApiEndpoint.post("pollOnsiteAgentCommand", "/onsite-agent/commands/poll").addSuccess(Schema2.Union(OnsiteAgentCommandSchema, Schema2.Null)).annotateContext(
|
|
3531
|
+
OpenApi.annotations({ summary: "Poll for the next pending onsite sync command" })
|
|
3532
|
+
)
|
|
3533
|
+
).add(
|
|
3534
|
+
HttpApiEndpoint.post("pollOnsiteAgentMemberCreateCommand", "/onsite-agent/member-commands/poll").addSuccess(Schema2.Union(OnsiteAgentMemberCreateCommandSchema, Schema2.Null)).annotateContext(
|
|
3535
|
+
OpenApi.annotations({ summary: "Poll for the next pending onsite member-create command" })
|
|
3536
|
+
)
|
|
3537
|
+
).add(
|
|
3538
|
+
HttpApiEndpoint.post(
|
|
3539
|
+
"pollOnsiteAgentMemberUpdateCommand",
|
|
3540
|
+
"/onsite-agent/member-update-commands/poll"
|
|
3541
|
+
).addSuccess(Schema2.Union(OnsiteAgentMemberUpdateCommandSchema, Schema2.Null)).annotateContext(
|
|
3542
|
+
OpenApi.annotations({
|
|
3543
|
+
summary: "Poll for the next pending onsite member-update command"
|
|
3544
|
+
})
|
|
3545
|
+
)
|
|
3546
|
+
).add(
|
|
3547
|
+
HttpApiEndpoint.post(
|
|
3548
|
+
"pollOnsiteAgentMemberRenewalCommand",
|
|
3549
|
+
"/onsite-agent/member-renewal-commands/poll"
|
|
3550
|
+
).addSuccess(Schema2.Union(OnsiteAgentMemberRenewalCommandSchema, Schema2.Null)).annotateContext(
|
|
3551
|
+
OpenApi.annotations({
|
|
3552
|
+
summary: "Poll for the next pending onsite member-renewal command"
|
|
3553
|
+
})
|
|
3554
|
+
)
|
|
3555
|
+
).add(
|
|
3556
|
+
HttpApiEndpoint.post(
|
|
3557
|
+
"pollOnsiteAgentMemberLookupCommand",
|
|
3558
|
+
"/onsite-agent/member-lookup-commands/poll"
|
|
3559
|
+
).addSuccess(Schema2.Union(OnsiteAgentMemberLookupCommandSchema, Schema2.Null)).annotateContext(
|
|
3560
|
+
OpenApi.annotations({
|
|
3561
|
+
summary: "Poll for the next pending onsite member-lookup command"
|
|
3562
|
+
})
|
|
3563
|
+
)
|
|
3564
|
+
).add(
|
|
3565
|
+
HttpApiEndpoint.post("completeOnsiteAgentRun", "/onsite-agent/runs/:runId/complete").setPath(OrganizationMemberSyncRunParams).setPayload(OnsiteAgentCompleteRunSchema).addSuccess(OrganizationMemberSyncRunSchema).annotateContext(
|
|
3566
|
+
OpenApi.annotations({ summary: "Submit onsite agent sync results for a claimed run" })
|
|
3567
|
+
)
|
|
3568
|
+
).add(
|
|
3569
|
+
HttpApiEndpoint.post(
|
|
3570
|
+
"completeOnsiteAgentMemberCreate",
|
|
3571
|
+
"/onsite-agent/member-commands/:commandId/complete"
|
|
3572
|
+
).setPath(
|
|
3573
|
+
Schema2.Struct({
|
|
3574
|
+
commandId: HttpApiSchema2.param("commandId", Schema2.String)
|
|
3575
|
+
})
|
|
3576
|
+
).setPayload(OnsiteAgentCompleteMemberCreateSchema).addSuccess(OrganizationMemberSourceCommandSchema).annotateContext(
|
|
3577
|
+
OpenApi.annotations({
|
|
3578
|
+
summary: "Submit onsite agent member-create results for a claimed command"
|
|
3579
|
+
})
|
|
3580
|
+
)
|
|
3581
|
+
).add(
|
|
3582
|
+
HttpApiEndpoint.post(
|
|
3583
|
+
"completeOnsiteAgentMemberUpdate",
|
|
3584
|
+
"/onsite-agent/member-update-commands/:commandId/complete"
|
|
3585
|
+
).setPath(
|
|
3586
|
+
Schema2.Struct({
|
|
3587
|
+
commandId: HttpApiSchema2.param("commandId", Schema2.String)
|
|
3588
|
+
})
|
|
3589
|
+
).setPayload(OnsiteAgentCompleteMemberUpdateSchema).addSuccess(OrganizationMemberSourceCommandSchema).annotateContext(
|
|
3590
|
+
OpenApi.annotations({
|
|
3591
|
+
summary: "Submit onsite agent member-update results for a claimed command"
|
|
3592
|
+
})
|
|
3593
|
+
)
|
|
3594
|
+
).add(
|
|
3595
|
+
HttpApiEndpoint.post(
|
|
3596
|
+
"completeOnsiteAgentMemberLookup",
|
|
3597
|
+
"/onsite-agent/member-lookup-commands/:commandId/complete"
|
|
3598
|
+
).setPath(
|
|
3599
|
+
Schema2.Struct({
|
|
3600
|
+
commandId: HttpApiSchema2.param("commandId", Schema2.String)
|
|
3601
|
+
})
|
|
3602
|
+
).setPayload(OnsiteAgentCompleteMemberLookupSchema).addSuccess(OrganizationMemberSourceCommandSchema).annotateContext(
|
|
3603
|
+
OpenApi.annotations({
|
|
3604
|
+
summary: "Submit onsite agent member-lookup results for a claimed command"
|
|
3605
|
+
})
|
|
3606
|
+
)
|
|
3607
|
+
).add(
|
|
3608
|
+
HttpApiEndpoint.post(
|
|
3609
|
+
"completeOnsiteAgentMemberRenewal",
|
|
3610
|
+
"/onsite-agent/member-renewal-commands/:commandId/complete"
|
|
3611
|
+
).setPath(
|
|
3612
|
+
Schema2.Struct({
|
|
3613
|
+
commandId: HttpApiSchema2.param("commandId", Schema2.String)
|
|
3614
|
+
})
|
|
3615
|
+
).setPayload(OnsiteAgentCompleteMemberRenewalSchema).addSuccess(OrganizationMemberSourceCommandSchema).annotateContext(
|
|
3616
|
+
OpenApi.annotations({
|
|
3617
|
+
summary: "Submit onsite agent member-renewal results for a claimed command"
|
|
3618
|
+
})
|
|
3619
|
+
)
|
|
3620
|
+
);
|
|
3621
|
+
var guestsGroup = HttpApiGroup.make("guests").add(
|
|
3622
|
+
HttpApiEndpoint.get("listGuests", "/organizations/:organizationId/guests").setPath(OrganizationIdParams).setUrlParams(GuestsListUrlParamsSchema).addSuccess(PaginatedGuestsSchema).annotateContext(
|
|
3623
|
+
OpenApi.annotations({
|
|
3624
|
+
summary: "List guests for an organization",
|
|
3625
|
+
transform: guestListExamplesTransform
|
|
3626
|
+
})
|
|
3627
|
+
)
|
|
3628
|
+
).add(
|
|
3629
|
+
HttpApiEndpoint.get("getGuest", "/organizations/:organizationId/guests/:guestId").setPath(OrganizationGuestParams).addSuccess(GuestSchema).annotateContext(
|
|
3630
|
+
OpenApi.annotations({
|
|
3631
|
+
summary: "Get a guest"
|
|
3632
|
+
})
|
|
3633
|
+
)
|
|
3634
|
+
).add(
|
|
3635
|
+
HttpApiEndpoint.post("createGuest", "/organizations/:organizationId/guests").setPath(OrganizationIdParams).setPayload(CreateGuestSchema).addSuccess(GuestSchema, { status: 201 }).annotateContext(
|
|
3636
|
+
OpenApi.annotations({
|
|
3637
|
+
summary: "Create a guest",
|
|
3638
|
+
transform: createGuestExamplesTransform
|
|
3639
|
+
})
|
|
3640
|
+
)
|
|
3641
|
+
).add(
|
|
3642
|
+
HttpApiEndpoint.patch("updateGuest", "/organizations/:organizationId/guests/:guestId").setPath(OrganizationGuestParams).setPayload(UpdateGuestSchema).addSuccess(GuestSchema).annotateContext(
|
|
3643
|
+
OpenApi.annotations({
|
|
3644
|
+
summary: "Update a guest",
|
|
3645
|
+
transform: updateGuestExamplesTransform
|
|
3646
|
+
})
|
|
3647
|
+
)
|
|
3648
|
+
).add(
|
|
3649
|
+
HttpApiEndpoint.del("deleteGuest", "/organizations/:organizationId/guests/:guestId").setPath(OrganizationGuestParams).setPayload(DeletePayloadSchema).annotateContext(
|
|
3650
|
+
OpenApi.annotations({
|
|
3651
|
+
summary: "Archive a guest",
|
|
3652
|
+
transform: deletePayloadExamplesTransform
|
|
3653
|
+
})
|
|
3654
|
+
)
|
|
3655
|
+
);
|
|
3656
|
+
var serviceClientsGroup = HttpApiGroup.make("serviceClients").add(
|
|
3657
|
+
HttpApiEndpoint.get("listServiceClients", "/service-clients").setUrlParams(ServiceClientsListUrlParamsSchema).addSuccess(PaginatedServiceClientsSchema).annotateContext(OpenApi.annotations({ summary: "List service clients" }))
|
|
3658
|
+
).add(
|
|
3659
|
+
HttpApiEndpoint.post("createServiceClient", "/service-clients").setPayload(CreateServiceClientSchema).addSuccess(
|
|
3660
|
+
Schema2.Struct({
|
|
3661
|
+
client: ServiceClientSchema,
|
|
3662
|
+
privateKey: IssuedPrivateKeySchema
|
|
3663
|
+
}),
|
|
3664
|
+
{ status: 201 }
|
|
3665
|
+
).annotateContext(
|
|
3666
|
+
OpenApi.annotations({ summary: "Create a service client and initial Ed25519 keypair" })
|
|
3667
|
+
)
|
|
3668
|
+
).add(
|
|
3669
|
+
HttpApiEndpoint.patch("updateServiceClient", "/service-clients/:serviceClientId").setPath(ServiceClientParams).setPayload(UpdateServiceClientSchema).addSuccess(
|
|
3670
|
+
Schema2.Struct({
|
|
3671
|
+
client: ServiceClientSchema,
|
|
3672
|
+
privateKey: Schema2.optional(IssuedPrivateKeySchema)
|
|
3673
|
+
})
|
|
3674
|
+
).annotateContext(
|
|
3675
|
+
OpenApi.annotations({
|
|
3676
|
+
summary: "Update a service client and optionally rotate its Ed25519 keypair"
|
|
3677
|
+
})
|
|
3678
|
+
)
|
|
3679
|
+
).add(
|
|
3680
|
+
HttpApiEndpoint.del("deleteServiceClient", "/service-clients/:serviceClientId").setPath(ServiceClientParams).setPayload(DeleteServiceClientSchema).annotateContext(
|
|
3681
|
+
OpenApi.annotations({
|
|
3682
|
+
summary: "Archive a service client"
|
|
3683
|
+
})
|
|
3684
|
+
)
|
|
3685
|
+
);
|
|
3686
|
+
var HubApi = HttpApi.make("hub").add(authGroup).add(organizationsGroup).add(membersGroup).add(memberPointsGroup).add(vouchersGroup).add(onsiteCallsGroup).add(memberSourcesGroup).add(onsiteAgentsGroup).add(guestsGroup).add(serviceClientsGroup).prefix("/v1").addError(UnauthorizedErrorSchema).addError(ForbiddenErrorSchema).addError(NotFoundErrorSchema).addError(ConflictErrorSchema).addError(BadRequestErrorSchema).annotateContext(
|
|
3687
|
+
OpenApi.annotations({
|
|
3688
|
+
title: "Spoke Hub API",
|
|
3689
|
+
version: "1.0.0",
|
|
3690
|
+
description: "Version 1 of the Spoke Hub API for managing organizations, members, guests, credentials, and venue member-source integrations.",
|
|
3691
|
+
servers: [{ url: "/api/v1" }],
|
|
3692
|
+
transform: bearerDocsTransform
|
|
3693
|
+
})
|
|
3694
|
+
);
|
|
3695
|
+
|
|
3696
|
+
// src/client.ts
|
|
3697
|
+
var defaultApiBasePath = "/api";
|
|
3698
|
+
function trimSlashes(value) {
|
|
3699
|
+
return value.replace(/^\/+|\/+$/g, "");
|
|
3700
|
+
}
|
|
3701
|
+
function joinUrlPath(left, right) {
|
|
3702
|
+
const segments = [trimSlashes(left), trimSlashes(right)].filter(
|
|
3703
|
+
(segment) => segment.length > 0
|
|
3704
|
+
);
|
|
3705
|
+
return `/${segments.join("/")}`;
|
|
3706
|
+
}
|
|
3707
|
+
function configureHttpClient(client, options) {
|
|
3708
|
+
let configuredClient = client;
|
|
3709
|
+
if (options.headers && Object.keys(options.headers).length > 0) {
|
|
3710
|
+
configuredClient = configuredClient.pipe(
|
|
3711
|
+
HttpClient.mapRequest(HttpClientRequest.setHeaders(options.headers))
|
|
3712
|
+
);
|
|
3713
|
+
}
|
|
3714
|
+
return options.transformClient ? options.transformClient(configuredClient) : configuredClient;
|
|
3715
|
+
}
|
|
3716
|
+
var SPOKE_CLIENT_ID_HEADER = "x-spoke-client-id";
|
|
3717
|
+
var SPOKE_TIMESTAMP_HEADER = "x-spoke-timestamp";
|
|
3718
|
+
var SPOKE_NONCE_HEADER = "x-spoke-nonce";
|
|
3719
|
+
var SPOKE_SIGNATURE_HEADER = "x-spoke-signature";
|
|
3720
|
+
function encodeQueryComponent(value) {
|
|
3721
|
+
return encodeURIComponent(value).replace(
|
|
3722
|
+
/[!'()*]/g,
|
|
3723
|
+
(char) => `%${char.charCodeAt(0).toString(16).toUpperCase()}`
|
|
3724
|
+
);
|
|
3725
|
+
}
|
|
3726
|
+
function normalizeSignedQuery(url) {
|
|
3727
|
+
const entries = [...url.searchParams.entries()].sort(
|
|
3728
|
+
([leftKey, leftValue], [rightKey, rightValue]) => leftKey === rightKey ? leftValue.localeCompare(rightValue) : leftKey.localeCompare(rightKey)
|
|
3729
|
+
);
|
|
3730
|
+
return entries.map(([key, value]) => `${encodeQueryComponent(key)}=${encodeQueryComponent(value)}`).join("&");
|
|
3731
|
+
}
|
|
3732
|
+
function signRequestWithPrivateKey(input) {
|
|
3733
|
+
const payload = [
|
|
3734
|
+
input.method.trim().toUpperCase(),
|
|
3735
|
+
input.path.trim() || "/",
|
|
3736
|
+
input.query,
|
|
3737
|
+
input.timestamp.trim(),
|
|
3738
|
+
input.nonce.trim()
|
|
3739
|
+
].join("\n");
|
|
3740
|
+
const privateKey = createPrivateKey({
|
|
3741
|
+
key: Buffer.from(input.privateKey.replace(/\s+/g, ""), "base64"),
|
|
3742
|
+
format: "der",
|
|
3743
|
+
type: "pkcs8"
|
|
3744
|
+
});
|
|
3745
|
+
return sign(null, Buffer.from(payload, "utf8"), privateKey).toString("base64url");
|
|
3746
|
+
}
|
|
3747
|
+
function configureSignedHttpClient(client, options) {
|
|
3748
|
+
return client.pipe(
|
|
3749
|
+
HttpClient.mapRequest((request) => {
|
|
3750
|
+
const url = new URL(request.url);
|
|
3751
|
+
for (const [key, value] of request.urlParams) {
|
|
3752
|
+
url.searchParams.append(key, value);
|
|
3753
|
+
}
|
|
3754
|
+
const timestamp = String(Math.floor(Date.now() / 1e3));
|
|
3755
|
+
const nonce = randomUUID();
|
|
3756
|
+
const signature = signRequestWithPrivateKey({
|
|
3757
|
+
privateKey: options.privateKey,
|
|
3758
|
+
method: request.method,
|
|
3759
|
+
path: url.pathname,
|
|
3760
|
+
query: normalizeSignedQuery(url),
|
|
3761
|
+
timestamp,
|
|
3762
|
+
nonce
|
|
3763
|
+
});
|
|
3764
|
+
return request.pipe(
|
|
3765
|
+
HttpClientRequest.setHeaders({
|
|
3766
|
+
[SPOKE_CLIENT_ID_HEADER]: options.clientId,
|
|
3767
|
+
[SPOKE_TIMESTAMP_HEADER]: timestamp,
|
|
3768
|
+
[SPOKE_NONCE_HEADER]: nonce,
|
|
3769
|
+
[SPOKE_SIGNATURE_HEADER]: signature
|
|
3770
|
+
})
|
|
3771
|
+
);
|
|
3772
|
+
})
|
|
3773
|
+
);
|
|
3774
|
+
}
|
|
3775
|
+
function resolveHubApiBaseUrl(baseUrl, apiBasePath = defaultApiBasePath) {
|
|
3776
|
+
const resolved = new URL(baseUrl.toString());
|
|
3777
|
+
resolved.pathname = joinUrlPath(resolved.pathname, apiBasePath);
|
|
3778
|
+
resolved.search = "";
|
|
3779
|
+
resolved.hash = "";
|
|
3780
|
+
return resolved.toString().replace(/\/$/, "");
|
|
3781
|
+
}
|
|
3782
|
+
var makeHubApiClient = (options) => HttpApiClient.make(HubApi, {
|
|
3783
|
+
baseUrl: resolveHubApiBaseUrl(options.baseUrl, options.apiBasePath),
|
|
3784
|
+
transformClient: (client) => configureHttpClient(client, options),
|
|
3785
|
+
transformResponse: options.transformResponse
|
|
3786
|
+
}).pipe(Effect.provide(FetchHttpClient.layer));
|
|
3787
|
+
var makeServiceHubApiClient = (options) => Effect.gen(function* () {
|
|
3788
|
+
const client = yield* makeHubApiClient({
|
|
3789
|
+
baseUrl: options.baseUrl,
|
|
3790
|
+
apiBasePath: options.apiBasePath,
|
|
3791
|
+
headers: options.headers,
|
|
3792
|
+
transformClient: (client2) => {
|
|
3793
|
+
const configured = configureSignedHttpClient(client2, {
|
|
3794
|
+
clientId: options.clientId,
|
|
3795
|
+
privateKey: options.privateKey
|
|
3796
|
+
});
|
|
3797
|
+
return options.transformClient ? options.transformClient(configured) : configured;
|
|
3798
|
+
},
|
|
3799
|
+
transformResponse: options.transformResponse
|
|
3800
|
+
});
|
|
3801
|
+
return { client };
|
|
3802
|
+
});
|
|
3803
|
+
function toPromiseClient(value) {
|
|
3804
|
+
const entries = Object.entries(value).map(([key, member]) => {
|
|
3805
|
+
if (typeof member === "function") {
|
|
3806
|
+
return [
|
|
3807
|
+
key,
|
|
3808
|
+
(...args) => Effect.runPromise(
|
|
3809
|
+
member(
|
|
3810
|
+
...args
|
|
3811
|
+
)
|
|
3812
|
+
)
|
|
3813
|
+
];
|
|
3814
|
+
}
|
|
3815
|
+
if (member && typeof member === "object") {
|
|
3816
|
+
return [key, toPromiseClient(member)];
|
|
3817
|
+
}
|
|
3818
|
+
return [key, member];
|
|
3819
|
+
});
|
|
3820
|
+
return Object.fromEntries(entries);
|
|
3821
|
+
}
|
|
3822
|
+
var makePromiseHubApiClient = async (options) => toPromiseClient(await Effect.runPromise(makeHubApiClient(options)));
|
|
3823
|
+
var makePromiseServiceHubApiClient = async (options) => {
|
|
3824
|
+
const { client } = await Effect.runPromise(makeServiceHubApiClient(options));
|
|
3825
|
+
return {
|
|
3826
|
+
client: toPromiseClient(client)
|
|
3827
|
+
};
|
|
3828
|
+
};
|
|
3829
|
+
|
|
3830
|
+
// src/onsite-resource-client.ts
|
|
3831
|
+
function makeOnsiteResourceClient(client) {
|
|
3832
|
+
const call = async (input) => {
|
|
3833
|
+
const { organizationId, ...payload } = input;
|
|
3834
|
+
const result = await client.onsiteCalls.callOnsiteResource({
|
|
3835
|
+
path: { organizationId },
|
|
3836
|
+
payload
|
|
3837
|
+
});
|
|
3838
|
+
return Array.isArray(result) ? result[0] : result;
|
|
3839
|
+
};
|
|
3840
|
+
return {
|
|
3841
|
+
call,
|
|
3842
|
+
members: {
|
|
3843
|
+
create: (input) => call({
|
|
3844
|
+
organizationId: input.organizationId,
|
|
3845
|
+
waitMs: input.waitMs,
|
|
3846
|
+
operation: "member.create",
|
|
3847
|
+
payload: input.payload
|
|
3848
|
+
}),
|
|
3849
|
+
update: (input) => call({
|
|
3850
|
+
organizationId: input.organizationId,
|
|
3851
|
+
waitMs: input.waitMs,
|
|
3852
|
+
operation: "member.update",
|
|
3853
|
+
memberId: input.memberId,
|
|
3854
|
+
payload: input.payload
|
|
3855
|
+
}),
|
|
3856
|
+
renew: (input) => call({
|
|
3857
|
+
organizationId: input.organizationId,
|
|
3858
|
+
waitMs: input.waitMs,
|
|
3859
|
+
operation: "member.renew",
|
|
3860
|
+
memberId: input.memberId,
|
|
3861
|
+
payload: input.payload
|
|
3862
|
+
}),
|
|
3863
|
+
lookup: (input) => call({
|
|
3864
|
+
organizationId: input.organizationId,
|
|
3865
|
+
waitMs: input.waitMs,
|
|
3866
|
+
operation: "member.lookup",
|
|
3867
|
+
payload: {
|
|
3868
|
+
lookupBy: input.lookupBy,
|
|
3869
|
+
lookupValue: input.lookupValue
|
|
3870
|
+
}
|
|
3871
|
+
})
|
|
3872
|
+
},
|
|
3873
|
+
vouchers: {
|
|
3874
|
+
issue: (input) => call({
|
|
3875
|
+
organizationId: input.organizationId,
|
|
3876
|
+
waitMs: input.waitMs,
|
|
3877
|
+
operation: "voucher.issue",
|
|
3878
|
+
payload: input.payload
|
|
3879
|
+
})
|
|
3880
|
+
}
|
|
3881
|
+
};
|
|
3882
|
+
}
|
|
3883
|
+
var makePromiseOnsiteResourceClient = async (options) => {
|
|
3884
|
+
const { client } = await makePromiseServiceHubApiClient(options);
|
|
3885
|
+
return {
|
|
3886
|
+
client: makeOnsiteResourceClient(client),
|
|
3887
|
+
hubClient: client
|
|
3888
|
+
};
|
|
3889
|
+
};
|
|
3890
|
+
|
|
3891
|
+
// src/spoke-client.ts
|
|
3892
|
+
function cleanParams(value) {
|
|
3893
|
+
return Object.fromEntries(
|
|
3894
|
+
Object.entries(value).filter(([, item]) => item !== void 0 && item !== null && item !== "").map(([key, item]) => [
|
|
3895
|
+
key,
|
|
3896
|
+
Array.isArray(item) ? item.join(",") : typeof item === "number" ? String(item) : item
|
|
3897
|
+
])
|
|
3898
|
+
);
|
|
3899
|
+
}
|
|
3900
|
+
async function unwrap(value) {
|
|
3901
|
+
const result = await value;
|
|
3902
|
+
return Array.isArray(result) ? result[0] : result;
|
|
3903
|
+
}
|
|
3904
|
+
function makeSpokeClient(hubClient) {
|
|
3905
|
+
const onsite = makeOnsiteResourceClient(hubClient);
|
|
3906
|
+
return {
|
|
3907
|
+
organizations: {
|
|
3908
|
+
list: (input = {}) => unwrap(
|
|
3909
|
+
hubClient.organizations.listOrganizations({
|
|
3910
|
+
urlParams: cleanParams(input)
|
|
3911
|
+
})
|
|
3912
|
+
),
|
|
3913
|
+
create: (input) => unwrap(
|
|
3914
|
+
hubClient.organizations.createOrganization({
|
|
3915
|
+
payload: input
|
|
3916
|
+
})
|
|
3917
|
+
),
|
|
3918
|
+
update: (input) => unwrap(
|
|
3919
|
+
hubClient.organizations.updateOrganization({
|
|
3920
|
+
path: { organizationId: input.organizationId },
|
|
3921
|
+
payload: input.payload
|
|
3922
|
+
})
|
|
3923
|
+
),
|
|
3924
|
+
delete: (input) => unwrap(
|
|
3925
|
+
hubClient.organizations.deleteOrganization({
|
|
3926
|
+
path: { organizationId: input.organizationId },
|
|
3927
|
+
payload: input.payload
|
|
3928
|
+
})
|
|
3929
|
+
),
|
|
3930
|
+
productOptions: {
|
|
3931
|
+
list: (input = {}) => unwrap(
|
|
3932
|
+
hubClient.organizations.listOrganizationProductOptions({
|
|
3933
|
+
urlParams: cleanParams(input)
|
|
3934
|
+
})
|
|
3935
|
+
),
|
|
3936
|
+
create: (input) => unwrap(
|
|
3937
|
+
hubClient.organizations.createOrganizationProductOption({
|
|
3938
|
+
payload: input
|
|
3939
|
+
})
|
|
3940
|
+
),
|
|
3941
|
+
webhooks: {
|
|
3942
|
+
list: (input = {}) => unwrap(
|
|
3943
|
+
hubClient.organizations.listOrganizationProductWebhooks({
|
|
3944
|
+
urlParams: cleanParams(input)
|
|
3945
|
+
})
|
|
3946
|
+
),
|
|
3947
|
+
get: (input) => unwrap(
|
|
3948
|
+
hubClient.organizations.getOrganizationProductWebhook({
|
|
3949
|
+
path: {
|
|
3950
|
+
organizationProductOptionId: input.organizationProductOptionId
|
|
3951
|
+
}
|
|
3952
|
+
})
|
|
3953
|
+
),
|
|
3954
|
+
upsert: (input) => unwrap(
|
|
3955
|
+
hubClient.organizations.upsertOrganizationProductWebhook({
|
|
3956
|
+
path: {
|
|
3957
|
+
organizationProductOptionId: input.organizationProductOptionId
|
|
3958
|
+
},
|
|
3959
|
+
payload: input.payload
|
|
3960
|
+
})
|
|
3961
|
+
)
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3964
|
+
},
|
|
3965
|
+
members: {
|
|
3966
|
+
list: (input) => unwrap(
|
|
3967
|
+
hubClient.members.listOrganizationMembers({
|
|
3968
|
+
path: { organizationId: input.organizationId },
|
|
3969
|
+
urlParams: cleanParams({
|
|
3970
|
+
page: input.page,
|
|
3971
|
+
pageSize: input.pageSize,
|
|
3972
|
+
searchField: input.searchField,
|
|
3973
|
+
searchValue: input.searchValue,
|
|
3974
|
+
name: input.name,
|
|
3975
|
+
mobilePhone: input.mobilePhone,
|
|
3976
|
+
memberNumber: input.memberNumber,
|
|
3977
|
+
dob: input.dob,
|
|
3978
|
+
joinedAfter: input.joinedAfter,
|
|
3979
|
+
memberStatus: input.memberStatus,
|
|
3980
|
+
sortBy: input.sortBy,
|
|
3981
|
+
sortDirection: input.sortDirection,
|
|
3982
|
+
responseMode: input.responseMode,
|
|
3983
|
+
ratingGradeIds: input.ratingGradeIds
|
|
3984
|
+
})
|
|
3985
|
+
})
|
|
3986
|
+
),
|
|
3987
|
+
get: (input) => unwrap(
|
|
3988
|
+
hubClient.members.getOrganizationMember({
|
|
3989
|
+
path: {
|
|
3990
|
+
organizationId: input.organizationId,
|
|
3991
|
+
memberId: input.memberId
|
|
3992
|
+
},
|
|
3993
|
+
urlParams: cleanParams({ responseMode: input.responseMode })
|
|
3994
|
+
})
|
|
3995
|
+
),
|
|
3996
|
+
bulkGet: (input) => unwrap(
|
|
3997
|
+
hubClient.members.bulkGetOrganizationMembers({
|
|
3998
|
+
path: { organizationId: input.organizationId },
|
|
3999
|
+
payload: input.payload
|
|
4000
|
+
})
|
|
4001
|
+
),
|
|
4002
|
+
create: (input) => unwrap(
|
|
4003
|
+
hubClient.members.createOrganizationMember({
|
|
4004
|
+
path: { organizationId: input.organizationId },
|
|
4005
|
+
payload: input.payload
|
|
4006
|
+
})
|
|
4007
|
+
),
|
|
4008
|
+
update: (input) => unwrap(
|
|
4009
|
+
hubClient.members.updateOrganizationMember({
|
|
4010
|
+
path: {
|
|
4011
|
+
organizationId: input.organizationId,
|
|
4012
|
+
memberId: input.memberId
|
|
4013
|
+
},
|
|
4014
|
+
payload: input.payload
|
|
4015
|
+
})
|
|
4016
|
+
),
|
|
4017
|
+
delete: (input) => unwrap(
|
|
4018
|
+
hubClient.members.deleteOrganizationMember({
|
|
4019
|
+
path: {
|
|
4020
|
+
organizationId: input.organizationId,
|
|
4021
|
+
memberId: input.memberId
|
|
4022
|
+
},
|
|
4023
|
+
payload: input.payload
|
|
4024
|
+
})
|
|
4025
|
+
),
|
|
4026
|
+
statusCredits: {
|
|
4027
|
+
get: (input) => unwrap(
|
|
4028
|
+
hubClient.members.getOrganizationMemberStatusCredits({
|
|
4029
|
+
path: {
|
|
4030
|
+
organizationId: input.organizationId,
|
|
4031
|
+
memberId: input.memberId
|
|
4032
|
+
}
|
|
4033
|
+
})
|
|
4034
|
+
),
|
|
4035
|
+
update: (input) => unwrap(
|
|
4036
|
+
hubClient.members.updateOrganizationMemberStatusCredits({
|
|
4037
|
+
path: {
|
|
4038
|
+
organizationId: input.organizationId,
|
|
4039
|
+
memberId: input.memberId
|
|
4040
|
+
},
|
|
4041
|
+
payload: input.payload
|
|
4042
|
+
})
|
|
4043
|
+
)
|
|
4044
|
+
},
|
|
4045
|
+
metadata: {
|
|
4046
|
+
ratingGrades: (input) => unwrap(
|
|
4047
|
+
hubClient.members.listOrganizationMemberRatingGrades({
|
|
4048
|
+
path: { organizationId: input.organizationId },
|
|
4049
|
+
urlParams: cleanParams(input)
|
|
4050
|
+
})
|
|
4051
|
+
),
|
|
4052
|
+
membershipTypes: (input) => unwrap(
|
|
4053
|
+
hubClient.members.listOrganizationMemberMembershipTypes({
|
|
4054
|
+
path: { organizationId: input.organizationId },
|
|
4055
|
+
urlParams: cleanParams(input)
|
|
4056
|
+
})
|
|
4057
|
+
),
|
|
4058
|
+
titles: (input) => unwrap(
|
|
4059
|
+
hubClient.members.listOrganizationMemberTitles({
|
|
4060
|
+
path: { organizationId: input.organizationId },
|
|
4061
|
+
urlParams: cleanParams(input)
|
|
4062
|
+
})
|
|
4063
|
+
),
|
|
4064
|
+
genders: (input) => unwrap(
|
|
4065
|
+
hubClient.members.listOrganizationMemberGenders({
|
|
4066
|
+
path: { organizationId: input.organizationId },
|
|
4067
|
+
urlParams: cleanParams(input)
|
|
4068
|
+
})
|
|
4069
|
+
)
|
|
4070
|
+
},
|
|
4071
|
+
sourceRequests: {
|
|
4072
|
+
create: (input) => unwrap(
|
|
4073
|
+
hubClient.members.requestSourceManagedMemberCreate({
|
|
4074
|
+
path: { organizationId: input.organizationId },
|
|
4075
|
+
payload: input.payload
|
|
4076
|
+
})
|
|
4077
|
+
),
|
|
4078
|
+
update: (input) => unwrap(
|
|
4079
|
+
hubClient.members.requestSourceManagedMemberUpdate({
|
|
4080
|
+
path: {
|
|
4081
|
+
organizationId: input.organizationId,
|
|
4082
|
+
memberId: input.memberId
|
|
4083
|
+
},
|
|
4084
|
+
payload: input.payload
|
|
4085
|
+
})
|
|
4086
|
+
),
|
|
4087
|
+
renew: (input) => unwrap(
|
|
4088
|
+
hubClient.members.requestSourceManagedMemberRenewal({
|
|
4089
|
+
path: {
|
|
4090
|
+
organizationId: input.organizationId,
|
|
4091
|
+
memberId: input.memberId
|
|
4092
|
+
},
|
|
4093
|
+
payload: input.payload
|
|
4094
|
+
})
|
|
4095
|
+
),
|
|
4096
|
+
lookup: (input) => {
|
|
4097
|
+
if (input.lookupBy === "member_id") {
|
|
4098
|
+
return unwrap(
|
|
4099
|
+
hubClient.members.requestSourceManagedMemberLookupById({
|
|
4100
|
+
path: {
|
|
4101
|
+
organizationId: input.organizationId,
|
|
4102
|
+
externalSystemMemberId: input.lookupValue
|
|
4103
|
+
}
|
|
4104
|
+
})
|
|
4105
|
+
);
|
|
4106
|
+
}
|
|
4107
|
+
if (input.lookupBy === "badge_number") {
|
|
4108
|
+
return unwrap(
|
|
4109
|
+
hubClient.members.requestSourceManagedMemberLookupByBadgeNumber({
|
|
4110
|
+
path: {
|
|
4111
|
+
organizationId: input.organizationId,
|
|
4112
|
+
badgeNumber: input.lookupValue
|
|
4113
|
+
}
|
|
4114
|
+
})
|
|
4115
|
+
);
|
|
4116
|
+
}
|
|
4117
|
+
return unwrap(
|
|
4118
|
+
hubClient.members.requestSourceManagedMemberLookupByCardNumber({
|
|
4119
|
+
path: {
|
|
4120
|
+
organizationId: input.organizationId,
|
|
4121
|
+
cardNumber: input.lookupValue
|
|
4122
|
+
}
|
|
4123
|
+
})
|
|
4124
|
+
);
|
|
4125
|
+
}
|
|
4126
|
+
}
|
|
4127
|
+
},
|
|
4128
|
+
memberSources: {
|
|
4129
|
+
get: (input) => unwrap(
|
|
4130
|
+
hubClient.memberSources.getOrganizationMemberSource({
|
|
4131
|
+
path: { organizationId: input.organizationId }
|
|
4132
|
+
})
|
|
4133
|
+
),
|
|
4134
|
+
upsert: (input) => unwrap(
|
|
4135
|
+
hubClient.memberSources.upsertOrganizationMemberSource({
|
|
4136
|
+
path: { organizationId: input.organizationId },
|
|
4137
|
+
payload: input.payload
|
|
4138
|
+
})
|
|
4139
|
+
),
|
|
4140
|
+
bootstrapAgent: (input) => unwrap(
|
|
4141
|
+
hubClient.memberSources.bootstrapOrganizationMemberSourceAgent({
|
|
4142
|
+
path: { organizationId: input.organizationId },
|
|
4143
|
+
payload: input.payload
|
|
4144
|
+
})
|
|
4145
|
+
),
|
|
4146
|
+
csvUploadReadiness: (input) => unwrap(
|
|
4147
|
+
hubClient.memberSources.getOrganizationMemberSourceCsvUploadReadiness({
|
|
4148
|
+
path: { organizationId: input.organizationId }
|
|
4149
|
+
})
|
|
4150
|
+
),
|
|
4151
|
+
csvMapping: {
|
|
4152
|
+
get: (input) => unwrap(
|
|
4153
|
+
hubClient.memberSources.getOrganizationMemberSourceCsvMapping({
|
|
4154
|
+
path: { organizationId: input.organizationId }
|
|
4155
|
+
})
|
|
4156
|
+
),
|
|
4157
|
+
upsert: (input) => unwrap(
|
|
4158
|
+
hubClient.memberSources.upsertOrganizationMemberSourceCsvMapping({
|
|
4159
|
+
path: { organizationId: input.organizationId },
|
|
4160
|
+
payload: input.payload
|
|
4161
|
+
})
|
|
4162
|
+
)
|
|
4163
|
+
},
|
|
4164
|
+
csvUploads: {
|
|
4165
|
+
create: (input) => unwrap(
|
|
4166
|
+
hubClient.memberSources.createOrganizationMemberSourceCsvUpload({
|
|
4167
|
+
path: { organizationId: input.organizationId },
|
|
4168
|
+
payload: input.payload
|
|
4169
|
+
})
|
|
4170
|
+
)
|
|
4171
|
+
},
|
|
4172
|
+
webhooks: {
|
|
4173
|
+
get: (input) => unwrap(
|
|
4174
|
+
hubClient.memberSources.getOrganizationMemberSourceWebhook({
|
|
4175
|
+
path: { organizationId: input.organizationId }
|
|
4176
|
+
})
|
|
4177
|
+
),
|
|
4178
|
+
upsert: (input) => unwrap(
|
|
4179
|
+
hubClient.memberSources.upsertOrganizationMemberSourceWebhook({
|
|
4180
|
+
path: { organizationId: input.organizationId },
|
|
4181
|
+
payload: input.payload
|
|
4182
|
+
})
|
|
4183
|
+
)
|
|
4184
|
+
},
|
|
4185
|
+
runs: {
|
|
4186
|
+
list: (input) => unwrap(
|
|
4187
|
+
hubClient.memberSources.listOrganizationMemberSyncRuns({
|
|
4188
|
+
path: { organizationId: input.organizationId },
|
|
4189
|
+
urlParams: cleanParams(input)
|
|
4190
|
+
})
|
|
4191
|
+
),
|
|
4192
|
+
trigger: (input) => unwrap(
|
|
4193
|
+
hubClient.memberSources.triggerOrganizationMemberSync({
|
|
4194
|
+
path: { organizationId: input.organizationId },
|
|
4195
|
+
payload: input.payload
|
|
4196
|
+
})
|
|
4197
|
+
)
|
|
4198
|
+
},
|
|
4199
|
+
commands: {
|
|
4200
|
+
list: (input) => unwrap(
|
|
4201
|
+
hubClient.memberSources.listOrganizationMemberSourceCommands({
|
|
4202
|
+
path: { organizationId: input.organizationId },
|
|
4203
|
+
urlParams: cleanParams(input)
|
|
4204
|
+
})
|
|
4205
|
+
)
|
|
4206
|
+
}
|
|
4207
|
+
},
|
|
4208
|
+
points: {
|
|
4209
|
+
listTypes: (input) => unwrap(
|
|
4210
|
+
hubClient.memberPoints.listOrganizationPointTypes({
|
|
4211
|
+
path: { organizationId: input.organizationId }
|
|
4212
|
+
})
|
|
4213
|
+
),
|
|
4214
|
+
createType: (input) => unwrap(
|
|
4215
|
+
hubClient.memberPoints.createOrganizationPointType({
|
|
4216
|
+
path: { organizationId: input.organizationId },
|
|
4217
|
+
payload: input.payload
|
|
4218
|
+
})
|
|
4219
|
+
),
|
|
4220
|
+
balances: {
|
|
4221
|
+
list: (input) => unwrap(
|
|
4222
|
+
hubClient.memberPoints.listOrganizationMemberPointBalances({
|
|
4223
|
+
path: {
|
|
4224
|
+
organizationId: input.organizationId,
|
|
4225
|
+
memberId: input.memberId
|
|
4226
|
+
}
|
|
4227
|
+
})
|
|
4228
|
+
),
|
|
4229
|
+
upsert: (input) => unwrap(
|
|
4230
|
+
hubClient.memberPoints.upsertOrganizationMemberPointBalance({
|
|
4231
|
+
path: {
|
|
4232
|
+
organizationId: input.organizationId,
|
|
4233
|
+
memberId: input.memberId,
|
|
4234
|
+
pointTypeId: input.pointTypeId
|
|
4235
|
+
},
|
|
4236
|
+
payload: input.payload
|
|
4237
|
+
})
|
|
4238
|
+
)
|
|
4239
|
+
}
|
|
4240
|
+
},
|
|
4241
|
+
vouchers: {
|
|
4242
|
+
getProvider: (input) => unwrap(
|
|
4243
|
+
hubClient.vouchers.getOrganizationVoucherProvider({
|
|
4244
|
+
path: { organizationId: input.organizationId }
|
|
4245
|
+
})
|
|
4246
|
+
),
|
|
4247
|
+
upsertProvider: (input) => unwrap(
|
|
4248
|
+
hubClient.vouchers.upsertOrganizationVoucherProvider({
|
|
4249
|
+
path: { organizationId: input.organizationId },
|
|
4250
|
+
payload: input.payload
|
|
4251
|
+
})
|
|
4252
|
+
),
|
|
4253
|
+
requestIssue: (input) => unwrap(
|
|
4254
|
+
hubClient.vouchers.requestVoucherIssue({
|
|
4255
|
+
path: { organizationId: input.organizationId },
|
|
4256
|
+
payload: input.payload
|
|
4257
|
+
})
|
|
4258
|
+
)
|
|
4259
|
+
},
|
|
4260
|
+
guests: {
|
|
4261
|
+
list: (input) => unwrap(
|
|
4262
|
+
hubClient.guests.listGuests({
|
|
4263
|
+
path: { organizationId: input.organizationId },
|
|
4264
|
+
urlParams: cleanParams(input)
|
|
4265
|
+
})
|
|
4266
|
+
),
|
|
4267
|
+
get: (input) => unwrap(
|
|
4268
|
+
hubClient.guests.getGuest({
|
|
4269
|
+
path: {
|
|
4270
|
+
organizationId: input.organizationId,
|
|
4271
|
+
guestId: input.guestId
|
|
4272
|
+
}
|
|
4273
|
+
})
|
|
4274
|
+
),
|
|
4275
|
+
create: (input) => unwrap(
|
|
4276
|
+
hubClient.guests.createGuest({
|
|
4277
|
+
path: { organizationId: input.organizationId },
|
|
4278
|
+
payload: input.payload
|
|
4279
|
+
})
|
|
4280
|
+
),
|
|
4281
|
+
update: (input) => unwrap(
|
|
4282
|
+
hubClient.guests.updateGuest({
|
|
4283
|
+
path: {
|
|
4284
|
+
organizationId: input.organizationId,
|
|
4285
|
+
guestId: input.guestId
|
|
4286
|
+
},
|
|
4287
|
+
payload: input.payload
|
|
4288
|
+
})
|
|
4289
|
+
),
|
|
4290
|
+
delete: (input) => unwrap(
|
|
4291
|
+
hubClient.guests.deleteGuest({
|
|
4292
|
+
path: {
|
|
4293
|
+
organizationId: input.organizationId,
|
|
4294
|
+
guestId: input.guestId
|
|
4295
|
+
},
|
|
4296
|
+
payload: input.payload
|
|
4297
|
+
})
|
|
4298
|
+
)
|
|
4299
|
+
},
|
|
4300
|
+
onsite,
|
|
4301
|
+
callOnsite: (input) => onsite.call(input)
|
|
4302
|
+
};
|
|
4303
|
+
}
|
|
4304
|
+
var makePromiseSpokeClient = async (options) => {
|
|
4305
|
+
const { client: hubClient } = await makePromiseServiceHubApiClient(options);
|
|
4306
|
+
const client = makeSpokeClient(hubClient);
|
|
4307
|
+
return {
|
|
4308
|
+
client,
|
|
4309
|
+
onsiteClient: client.onsite,
|
|
4310
|
+
hubClient
|
|
4311
|
+
};
|
|
4312
|
+
};
|
|
4313
|
+
export {
|
|
4314
|
+
AddressSchema,
|
|
4315
|
+
AdminSessionSchema,
|
|
4316
|
+
BadRequestErrorSchema,
|
|
4317
|
+
BootstrapOrganizationMemberSourceAgentResponseSchema,
|
|
4318
|
+
BootstrapOrganizationMemberSourceAgentSchema,
|
|
4319
|
+
BulkGetOrganizationMembersSchema,
|
|
4320
|
+
BulkOrganizationMembersBasicResponseSchema,
|
|
4321
|
+
BulkOrganizationMembersMedResponseSchema,
|
|
4322
|
+
BulkOrganizationMembersResponseSchema,
|
|
4323
|
+
BulkOrganizationMembersResponseUnionSchema,
|
|
4324
|
+
CompleteOnsiteVoucherCommandSchema,
|
|
4325
|
+
ConflictErrorSchema,
|
|
4326
|
+
CreateGuestSchema,
|
|
4327
|
+
CreateMemberSchema,
|
|
4328
|
+
CreateOrganizationMemberSourceCsvUploadResponseSchema,
|
|
4329
|
+
CreateOrganizationMemberSourceCsvUploadSchema,
|
|
4330
|
+
CreateOrganizationPointTypeSchema,
|
|
4331
|
+
CreateOrganizationProductOptionSchema,
|
|
4332
|
+
CreateOrganizationProductWebhookSchema,
|
|
4333
|
+
CreateOrganizationSchema,
|
|
4334
|
+
CreateServiceClientSchema,
|
|
4335
|
+
CsvUploadReadinessSchema,
|
|
4336
|
+
DateOnlySchema,
|
|
4337
|
+
DeletePayloadSchema,
|
|
4338
|
+
DeleteServiceClientSchema,
|
|
4339
|
+
ForbiddenErrorSchema,
|
|
4340
|
+
GuestContactMatchSchema,
|
|
4341
|
+
GuestSchema,
|
|
4342
|
+
HubApi,
|
|
4343
|
+
ImportedMemberRecordSchema,
|
|
4344
|
+
IssuedPrivateKeySchema,
|
|
4345
|
+
MarketingPreferencesSchema,
|
|
4346
|
+
MemberBasicResponseSchema,
|
|
4347
|
+
MemberBasicSchema,
|
|
4348
|
+
MemberContactMatchSchema,
|
|
4349
|
+
MemberFullResponseSchema,
|
|
4350
|
+
MemberMedResponseSchema,
|
|
4351
|
+
MemberMedSchema,
|
|
4352
|
+
MemberPointBalanceSchema,
|
|
4353
|
+
MemberPointBalancesResponseSchema,
|
|
4354
|
+
MemberResponseModeSchema,
|
|
4355
|
+
MemberResponseSchema,
|
|
4356
|
+
MemberSchema,
|
|
4357
|
+
MemberSourceSecretNameSchema,
|
|
4358
|
+
MemberStatusCreditsSchema,
|
|
4359
|
+
NotFoundErrorSchema,
|
|
4360
|
+
OnsiteAgentCommandSchema,
|
|
4361
|
+
OnsiteAgentCompleteMemberCreateSchema,
|
|
4362
|
+
OnsiteAgentCompleteMemberLookupSchema,
|
|
4363
|
+
OnsiteAgentCompleteMemberRenewalSchema,
|
|
4364
|
+
OnsiteAgentCompleteMemberUpdateSchema,
|
|
4365
|
+
OnsiteAgentCompleteRunErrorSchema,
|
|
4366
|
+
OnsiteAgentCompleteRunSchema,
|
|
4367
|
+
OnsiteAgentCsvUploadTargetSchema,
|
|
4368
|
+
OnsiteAgentHeartbeatResponseSchema,
|
|
4369
|
+
OnsiteAgentHeartbeatSchema,
|
|
4370
|
+
OnsiteAgentIngestLiveFbiBatchSchema,
|
|
4371
|
+
OnsiteAgentMemberCreateCommandSchema,
|
|
4372
|
+
OnsiteAgentMemberLookupCommandSchema,
|
|
4373
|
+
OnsiteAgentMemberRenewalCommandSchema,
|
|
4374
|
+
OnsiteAgentMemberUpdateCommandSchema,
|
|
4375
|
+
OnsiteResourceCallRequestSchema,
|
|
4376
|
+
OnsiteResourceCallResponseSchema,
|
|
4377
|
+
OnsiteResourceMemberCallResponseSchema,
|
|
4378
|
+
OnsiteResourceVoucherCallResponseSchema,
|
|
4379
|
+
OnsiteVoucherCommandSchema,
|
|
4380
|
+
OrganizationMemberGenderSchema,
|
|
4381
|
+
OrganizationMemberMembershipTypeSchema,
|
|
4382
|
+
OrganizationMemberRatingGradeSchema,
|
|
4383
|
+
OrganizationMemberSourceAgentSchema,
|
|
4384
|
+
OrganizationMemberSourceCommandSchema,
|
|
4385
|
+
OrganizationMemberSourceCsvImportSchema,
|
|
4386
|
+
OrganizationMemberSourceCsvMappingSchema,
|
|
4387
|
+
OrganizationMemberSourceSchema,
|
|
4388
|
+
OrganizationMemberSourceSecretInputSchema,
|
|
4389
|
+
OrganizationMemberSourceWebhookSchema,
|
|
4390
|
+
OrganizationMemberSourceWebhookUpsertResponseSchema,
|
|
4391
|
+
OrganizationMemberSyncRunErrorSchema,
|
|
4392
|
+
OrganizationMemberSyncRunSchema,
|
|
4393
|
+
OrganizationMemberSyncRunSummarySchema,
|
|
4394
|
+
OrganizationMemberTitleSchema,
|
|
4395
|
+
OrganizationMembersSearchFieldSchema,
|
|
4396
|
+
OrganizationMembersSortFieldSchema,
|
|
4397
|
+
OrganizationMembersStatusFilterSchema,
|
|
4398
|
+
OrganizationPeopleContactLookupResponseSchema,
|
|
4399
|
+
OrganizationPointTypeSchema,
|
|
4400
|
+
OrganizationPointTypesResponseSchema,
|
|
4401
|
+
OrganizationProductOptionSchema,
|
|
4402
|
+
OrganizationProductWebhookSchema,
|
|
4403
|
+
OrganizationProductWebhookUpsertResponseSchema,
|
|
4404
|
+
OrganizationSchema,
|
|
4405
|
+
OrganizationVoucherCommandSchema,
|
|
4406
|
+
OrganizationVoucherProviderSchema,
|
|
4407
|
+
OrganizationVoucherProviderSecretInputSchema,
|
|
4408
|
+
OrganizationVoucherProviderSecretNameSchema,
|
|
4409
|
+
PaginatedGuestsSchema,
|
|
4410
|
+
PaginatedOrganizationMemberGendersSchema,
|
|
4411
|
+
PaginatedOrganizationMemberMembershipTypesSchema,
|
|
4412
|
+
PaginatedOrganizationMemberRatingGradesSchema,
|
|
4413
|
+
PaginatedOrganizationMemberSourceCommandsSchema,
|
|
4414
|
+
PaginatedOrganizationMemberSyncRunsSchema,
|
|
4415
|
+
PaginatedOrganizationMemberTitlesSchema,
|
|
4416
|
+
PaginatedOrganizationMembersBasicSchema,
|
|
4417
|
+
PaginatedOrganizationMembersMedSchema,
|
|
4418
|
+
PaginatedOrganizationMembersResponseSchema,
|
|
4419
|
+
PaginatedOrganizationMembersSchema,
|
|
4420
|
+
PaginatedOrganizationProductOptionsSchema,
|
|
4421
|
+
PaginatedOrganizationProductWebhooksSchema,
|
|
4422
|
+
PaginatedOrganizationsSchema,
|
|
4423
|
+
PaginatedServiceClientsSchema,
|
|
4424
|
+
PresignedPostSchema,
|
|
4425
|
+
RequestSourceManagedMemberCreateSchema,
|
|
4426
|
+
RequestSourceManagedMemberRenewalSchema,
|
|
4427
|
+
RequestSourceManagedMemberUpdateSchema,
|
|
4428
|
+
RequestVoucherIssueSchema,
|
|
4429
|
+
ServiceClientSchema,
|
|
4430
|
+
SortDirectionSchema,
|
|
4431
|
+
SourceManagedMemberLookupBySchema,
|
|
4432
|
+
SourceManagedMemberLookupCommandPayloadSchema,
|
|
4433
|
+
SourceManagedMemberRenewalCommandPayloadSchema,
|
|
4434
|
+
SourceManagedMemberUpdateCommandPayloadSchema,
|
|
4435
|
+
TimestampSchema,
|
|
4436
|
+
TriggerOrganizationMemberSyncSchema,
|
|
4437
|
+
UnauthorizedErrorSchema,
|
|
4438
|
+
UpdateGuestSchema,
|
|
4439
|
+
UpdateMemberSchema,
|
|
4440
|
+
UpdateMemberStatusCreditsSchema,
|
|
4441
|
+
UpdateOrganizationPointTypeSchema,
|
|
4442
|
+
UpdateOrganizationProductWebhookSchema,
|
|
4443
|
+
UpdateOrganizationSchema,
|
|
4444
|
+
UpdateServiceClientSchema,
|
|
4445
|
+
UpsertMemberPointBalanceSchema,
|
|
4446
|
+
UpsertOrganizationMemberSourceCsvMappingSchema,
|
|
4447
|
+
UpsertOrganizationMemberSourceSchema,
|
|
4448
|
+
UpsertOrganizationMemberSourceWebhookSchema,
|
|
4449
|
+
UpsertOrganizationProductWebhookSchema,
|
|
4450
|
+
UpsertOrganizationVoucherProviderSchema,
|
|
4451
|
+
adminRoles,
|
|
4452
|
+
guestStatuses,
|
|
4453
|
+
makeBadRequest,
|
|
4454
|
+
makeConflict,
|
|
4455
|
+
makeForbidden,
|
|
4456
|
+
makeHubApiClient,
|
|
4457
|
+
makeNotFound,
|
|
4458
|
+
makeOnsiteResourceClient,
|
|
4459
|
+
makePromiseHubApiClient,
|
|
4460
|
+
makePromiseOnsiteResourceClient,
|
|
4461
|
+
makePromiseServiceHubApiClient,
|
|
4462
|
+
makePromiseSpokeClient,
|
|
4463
|
+
makeServiceHubApiClient,
|
|
4464
|
+
makeSpokeClient,
|
|
4465
|
+
makeUnauthorized,
|
|
4466
|
+
memberComputedStatuses,
|
|
4467
|
+
memberCreatedOrigins,
|
|
4468
|
+
memberPreferredContactMethods,
|
|
4469
|
+
memberRecordModes,
|
|
4470
|
+
memberStatuses,
|
|
4471
|
+
organizationMemberSourceAgentStatuses,
|
|
4472
|
+
organizationMemberSourceBatchTransports,
|
|
4473
|
+
organizationMemberSourceCommandKinds,
|
|
4474
|
+
organizationMemberSourceCommandStatuses,
|
|
4475
|
+
organizationMemberSourceCsvImportStatuses,
|
|
4476
|
+
organizationMemberSourceLiveTransports,
|
|
4477
|
+
organizationMemberSourceManualTransports,
|
|
4478
|
+
organizationMemberSourceStatuses,
|
|
4479
|
+
organizationMemberSourceVendors,
|
|
4480
|
+
organizationMemberSourceWebhookDeliveryStatuses,
|
|
4481
|
+
organizationMemberSourceWebhookStatuses,
|
|
4482
|
+
organizationMemberSyncModes,
|
|
4483
|
+
organizationMemberSyncRunStatuses,
|
|
4484
|
+
organizationMemberSyncTransports,
|
|
4485
|
+
organizationMemberSyncTriggerKinds,
|
|
4486
|
+
organizationPointTypeStatuses,
|
|
4487
|
+
organizationProductWebhookDeliveryStatuses,
|
|
4488
|
+
organizationProductWebhookStatuses,
|
|
4489
|
+
organizationStatuses,
|
|
4490
|
+
organizationVoucherCommandKinds,
|
|
4491
|
+
organizationVoucherCommandStatuses,
|
|
4492
|
+
organizationVoucherProviderProviders,
|
|
4493
|
+
organizationVoucherProviderStatuses,
|
|
4494
|
+
organizationVoucherProviderTransports,
|
|
4495
|
+
resolveHubApiBaseUrl
|
|
4496
|
+
};
|
|
4497
|
+
//# sourceMappingURL=index.js.map
|