@spoketech/hub-client 0.1.17 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2966 -178
- package/dist/index.js +121 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ var memberCreatedOrigins = [
|
|
|
28
28
|
"source_create"
|
|
29
29
|
];
|
|
30
30
|
var guestStatuses = ["active", "checked_out", "archived"];
|
|
31
|
-
var adminRoles = ["platform_admin", "org_admin", "auditor"];
|
|
31
|
+
var adminRoles = ["platform_admin", "org_admin", "auditor", "workflow_resolver"];
|
|
32
32
|
var organizationMemberSourceVendors = [
|
|
33
33
|
"max_gaming",
|
|
34
34
|
"odyssey_gaming",
|
|
@@ -3119,9 +3119,43 @@ var EnsureActiveMembershipIdempotencyKeySchema = Schema2.String.pipe(
|
|
|
3119
3119
|
description: "Caller-provided key used to replay this operation safely.",
|
|
3120
3120
|
example: "venue-join-123"
|
|
3121
3121
|
});
|
|
3122
|
+
var EnsureActiveMembershipResolutionActionSchema = Schema2.Literal(
|
|
3123
|
+
"reconcile",
|
|
3124
|
+
"authorize_renewal"
|
|
3125
|
+
);
|
|
3126
|
+
var EnsureActiveMembershipReviewCommandIdSchema = Schema2.String.pipe(
|
|
3127
|
+
Schema2.nonEmptyString(),
|
|
3128
|
+
Schema2.maxLength(36)
|
|
3129
|
+
);
|
|
3130
|
+
var EnsureActiveMembershipOperatorActorIdSchema = Schema2.String.pipe(
|
|
3131
|
+
Schema2.nonEmptyString(),
|
|
3132
|
+
Schema2.maxLength(36)
|
|
3133
|
+
);
|
|
3134
|
+
var EnsureActiveMembershipOperatorReasonSchema = Schema2.String.pipe(
|
|
3135
|
+
Schema2.filter((value) => value.trim().length > 0 && value.trim().length <= 500, {
|
|
3136
|
+
message: () => "Operator reason must be between 1 and 500 characters"
|
|
3137
|
+
})
|
|
3138
|
+
);
|
|
3122
3139
|
var EnsureActiveMembershipCommandPayloadSchema = Schema2.Struct({
|
|
3123
3140
|
idempotencyKey: EnsureActiveMembershipIdempotencyKeySchema,
|
|
3124
|
-
member: EnsureActiveMembershipMemberSchema
|
|
3141
|
+
member: EnsureActiveMembershipMemberSchema,
|
|
3142
|
+
continuation: Schema2.optional(
|
|
3143
|
+
Schema2.Union(
|
|
3144
|
+
Schema2.Struct({
|
|
3145
|
+
action: Schema2.Literal("reconcile"),
|
|
3146
|
+
reviewCommandId: EnsureActiveMembershipReviewCommandIdSchema,
|
|
3147
|
+
requestedByActorId: EnsureActiveMembershipOperatorActorIdSchema,
|
|
3148
|
+
reason: Schema2.optional(EnsureActiveMembershipOperatorReasonSchema)
|
|
3149
|
+
}),
|
|
3150
|
+
Schema2.Struct({
|
|
3151
|
+
action: Schema2.Literal("authorize_renewal"),
|
|
3152
|
+
reviewCommandId: EnsureActiveMembershipReviewCommandIdSchema,
|
|
3153
|
+
requestedByActorId: EnsureActiveMembershipOperatorActorIdSchema,
|
|
3154
|
+
reason: EnsureActiveMembershipOperatorReasonSchema,
|
|
3155
|
+
confirmedNotRenewed: Schema2.Literal(true)
|
|
3156
|
+
})
|
|
3157
|
+
)
|
|
3158
|
+
)
|
|
3125
3159
|
});
|
|
3126
3160
|
var EnsureActiveMembershipWorkflowStepSchema = Schema2.Literal(
|
|
3127
3161
|
"identity_observed",
|
|
@@ -3151,16 +3185,72 @@ var EnsureActiveMembershipWorkflowProgressSchema = Schema2.Struct({
|
|
|
3151
3185
|
hub_refreshed: Schema2.optional(EnsureActiveMembershipWorkflowStepStateSchema)
|
|
3152
3186
|
})
|
|
3153
3187
|
});
|
|
3188
|
+
var EnsureActiveMembershipAuditTimestampSchema = Schema2.String.pipe(
|
|
3189
|
+
Schema2.filter((value) => !Number.isNaN(new Date(value).valueOf()), {
|
|
3190
|
+
message: () => "Expected a valid timestamp"
|
|
3191
|
+
})
|
|
3192
|
+
);
|
|
3193
|
+
var OnsiteAgentEnsureActiveMembershipAuditEventSchema = Schema2.Struct({
|
|
3194
|
+
step: EnsureActiveMembershipWorkflowStepSchema,
|
|
3195
|
+
outcome: EnsureActiveMembershipWorkflowStepStateSchema,
|
|
3196
|
+
reasonCode: Schema2.optional(Schema2.String.pipe(Schema2.pattern(/^[a-z0-9_:-]{1,96}$/))),
|
|
3197
|
+
sourceStatus: Schema2.optional(Schema2.String.pipe(Schema2.pattern(/^[A-Z0-9 _-]{1,96}$/))),
|
|
3198
|
+
membershipTypeId: Schema2.optional(Schema2.String.pipe(Schema2.pattern(/^[A-Za-z0-9._:-]{1,64}$/))),
|
|
3199
|
+
membershipExpiry: Schema2.optional(EnsureActiveMembershipAuditTimestampSchema),
|
|
3200
|
+
providerFee: Schema2.optional(Schema2.Finite),
|
|
3201
|
+
providerRestricted: Schema2.optional(Schema2.Boolean),
|
|
3202
|
+
appliedChanges: Schema2.optional(
|
|
3203
|
+
Schema2.Array(Schema2.Literal("rate", "profile", "preferences", "renewal"))
|
|
3204
|
+
),
|
|
3205
|
+
resolutionAction: Schema2.optional(EnsureActiveMembershipResolutionActionSchema),
|
|
3206
|
+
reviewCommandId: Schema2.optional(EnsureActiveMembershipReviewCommandIdSchema),
|
|
3207
|
+
operatorActorId: Schema2.optional(EnsureActiveMembershipOperatorActorIdSchema),
|
|
3208
|
+
operatorReason: Schema2.optional(EnsureActiveMembershipOperatorReasonSchema),
|
|
3209
|
+
operatorConfirmedNotRenewed: Schema2.optional(Schema2.Literal(true))
|
|
3210
|
+
});
|
|
3154
3211
|
var OnsiteAgentEnsureActiveMembershipProgressUpdateSchema = Schema2.Struct({
|
|
3155
3212
|
expectedRevision: Schema2.Number,
|
|
3156
3213
|
steps: EnsureActiveMembershipWorkflowProgressSchema.fields.steps,
|
|
3157
|
-
lastSafeStep: Schema2.optional(EnsureActiveMembershipWorkflowStepSchema)
|
|
3214
|
+
lastSafeStep: Schema2.optional(EnsureActiveMembershipWorkflowStepSchema),
|
|
3215
|
+
auditEvents: Schema2.optional(Schema2.Array(OnsiteAgentEnsureActiveMembershipAuditEventSchema))
|
|
3158
3216
|
});
|
|
3159
3217
|
var RequestEnsureActiveMembershipSchema = Schema2.Struct({
|
|
3160
3218
|
idempotencyKey: EnsureActiveMembershipIdempotencyKeySchema,
|
|
3161
3219
|
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
3162
3220
|
member: EnsureActiveMembershipMemberSchema
|
|
3163
3221
|
});
|
|
3222
|
+
var EnsureActiveMembershipManualReviewItemSchema = Schema2.Struct({
|
|
3223
|
+
workflowId: Schema2.String,
|
|
3224
|
+
commandId: Schema2.String,
|
|
3225
|
+
organizationId: Schema2.String,
|
|
3226
|
+
source: Schema2.Struct({
|
|
3227
|
+
id: Schema2.String,
|
|
3228
|
+
vendor: Schema2.Literal("odyssey_gaming")
|
|
3229
|
+
}),
|
|
3230
|
+
outcome: EnsureActiveMembershipNonSuccessOutcomeSchema,
|
|
3231
|
+
resolutionPath: Schema2.Literal("reconcile", "correct_in_odyssey"),
|
|
3232
|
+
renewalAuthorizationAvailable: Schema2.Boolean,
|
|
3233
|
+
lastSafeStep: Schema2.Union(EnsureActiveMembershipWorkflowStepSchema, Schema2.Null),
|
|
3234
|
+
reasonCode: Schema2.String,
|
|
3235
|
+
ageMs: Schema2.Number,
|
|
3236
|
+
startedAt: TimestampSchema,
|
|
3237
|
+
updatedAt: TimestampSchema,
|
|
3238
|
+
member: Schema2.Struct({
|
|
3239
|
+
firstName: Schema2.String,
|
|
3240
|
+
lastName: Schema2.String,
|
|
3241
|
+
dob: DateOnlySchema,
|
|
3242
|
+
membershipTypeId: Schema2.String
|
|
3243
|
+
})
|
|
3244
|
+
});
|
|
3245
|
+
var EnsureActiveMembershipManualReviewQueueSchema = Schema2.Struct({
|
|
3246
|
+
items: Schema2.Array(EnsureActiveMembershipManualReviewItemSchema),
|
|
3247
|
+
total: Schema2.Number
|
|
3248
|
+
});
|
|
3249
|
+
var ReconcileEnsureActiveMembershipManualReviewSchema = Schema2.Struct({});
|
|
3250
|
+
var AuthorizeEnsureActiveMembershipRenewalSchema = Schema2.Struct({
|
|
3251
|
+
reason: EnsureActiveMembershipOperatorReasonSchema,
|
|
3252
|
+
confirmedNotRenewed: Schema2.Literal(true)
|
|
3253
|
+
});
|
|
3164
3254
|
var EnsureActiveMembershipCommandSchema = Schema2.Struct({
|
|
3165
3255
|
...OrganizationMemberSourceCommandSchema.fields,
|
|
3166
3256
|
kind: Schema2.Literal("ensure_active_membership"),
|
|
@@ -4262,6 +4352,29 @@ var memberSourcesGroup = HttpApiGroup.make("memberSources").add(
|
|
|
4262
4352
|
summary: "Get a specific member-source command for an organization"
|
|
4263
4353
|
})
|
|
4264
4354
|
)
|
|
4355
|
+
).add(
|
|
4356
|
+
HttpApiEndpoint.get(
|
|
4357
|
+
"listEnsureActiveMembershipManualReviews",
|
|
4358
|
+
"/organizations/:organizationId/member-source/manual-reviews"
|
|
4359
|
+
).setPath(OrganizationIdParams).addSuccess(EnsureActiveMembershipManualReviewQueueSchema).annotateContext(
|
|
4360
|
+
OpenApi.annotations({ summary: "List unresolved Ensure Active Membership reviews" })
|
|
4361
|
+
)
|
|
4362
|
+
).add(
|
|
4363
|
+
HttpApiEndpoint.post(
|
|
4364
|
+
"reconcileEnsureActiveMembershipManualReview",
|
|
4365
|
+
"/organizations/:organizationId/member-source/manual-reviews/:commandId/reconcile"
|
|
4366
|
+
).setPath(OrganizationMemberSourceCommandParams).setPayload(ReconcileEnsureActiveMembershipManualReviewSchema).addSuccess(EnsureActiveMembershipCommandSchema, { status: 202 }).annotateContext(
|
|
4367
|
+
OpenApi.annotations({ summary: "Read Nexus state for a manual-review workflow" })
|
|
4368
|
+
)
|
|
4369
|
+
).add(
|
|
4370
|
+
HttpApiEndpoint.post(
|
|
4371
|
+
"authorizeEnsureActiveMembershipRenewal",
|
|
4372
|
+
"/organizations/:organizationId/member-source/manual-reviews/:commandId/authorize-renewal"
|
|
4373
|
+
).setPath(OrganizationMemberSourceCommandParams).setPayload(AuthorizeEnsureActiveMembershipRenewalSchema).addSuccess(EnsureActiveMembershipCommandSchema, { status: 202 }).annotateContext(
|
|
4374
|
+
OpenApi.annotations({
|
|
4375
|
+
summary: "Authorize one audited renewal after inconclusive reconciliation"
|
|
4376
|
+
})
|
|
4377
|
+
)
|
|
4265
4378
|
).add(
|
|
4266
4379
|
HttpApiEndpoint.post(
|
|
4267
4380
|
"triggerOrganizationMemberSync",
|
|
@@ -5527,6 +5640,7 @@ var makePromiseSpokeClient = async (options) => {
|
|
|
5527
5640
|
export {
|
|
5528
5641
|
AddressSchema,
|
|
5529
5642
|
AdminSessionSchema,
|
|
5643
|
+
AuthorizeEnsureActiveMembershipRenewalSchema,
|
|
5530
5644
|
BadRequestErrorSchema,
|
|
5531
5645
|
BootstrapOrganizationMemberSourceAgentResponseSchema,
|
|
5532
5646
|
BootstrapOrganizationMemberSourceAgentSchema,
|
|
@@ -5554,6 +5668,8 @@ export {
|
|
|
5554
5668
|
DeleteServiceClientSchema,
|
|
5555
5669
|
EnsureActiveMembershipCommandPayloadSchema,
|
|
5556
5670
|
EnsureActiveMembershipCommandSchema,
|
|
5671
|
+
EnsureActiveMembershipManualReviewItemSchema,
|
|
5672
|
+
EnsureActiveMembershipManualReviewQueueSchema,
|
|
5557
5673
|
EnsureActiveMembershipMemberSchema,
|
|
5558
5674
|
EnsureActiveMembershipNonSuccessOutcomeSchema,
|
|
5559
5675
|
EnsureActiveMembershipNonSuccessResultSchema,
|
|
@@ -5599,6 +5715,7 @@ export {
|
|
|
5599
5715
|
OnsiteAgentCompleteRunSchema,
|
|
5600
5716
|
OnsiteAgentCsvUploadTargetSchema,
|
|
5601
5717
|
OnsiteAgentCustomFieldsCommandSchema,
|
|
5718
|
+
OnsiteAgentEnsureActiveMembershipAuditEventSchema,
|
|
5602
5719
|
OnsiteAgentEnsureActiveMembershipCommandSchema,
|
|
5603
5720
|
OnsiteAgentEnsureActiveMembershipCompletionResultSchema,
|
|
5604
5721
|
OnsiteAgentEnsureActiveMembershipProgressUpdateSchema,
|
|
@@ -5670,6 +5787,7 @@ export {
|
|
|
5670
5787
|
PaginatedOrganizationsSchema,
|
|
5671
5788
|
PaginatedServiceClientsSchema,
|
|
5672
5789
|
PresignedPostSchema,
|
|
5790
|
+
ReconcileEnsureActiveMembershipManualReviewSchema,
|
|
5673
5791
|
RequestEnsureActiveMembershipSchema,
|
|
5674
5792
|
RequestPointDebitSchema,
|
|
5675
5793
|
RequestPointLookupSchema,
|