@spoketech/hub-client 0.1.16 → 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 +4304 -432
- package/dist/index.js +184 -2
- 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,15 +3119,138 @@ 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
|
+
)
|
|
3159
|
+
});
|
|
3160
|
+
var EnsureActiveMembershipWorkflowStepSchema = Schema2.Literal(
|
|
3161
|
+
"identity_observed",
|
|
3162
|
+
"rate_confirmed",
|
|
3163
|
+
"profile_confirmed",
|
|
3164
|
+
"preferences_confirmed",
|
|
3165
|
+
"renewal_submitted",
|
|
3166
|
+
"membership_verified",
|
|
3167
|
+
"hub_refreshed"
|
|
3168
|
+
);
|
|
3169
|
+
var EnsureActiveMembershipWorkflowStepStateSchema = Schema2.Literal(
|
|
3170
|
+
"pending",
|
|
3171
|
+
"in_progress",
|
|
3172
|
+
"confirmed",
|
|
3173
|
+
"ambiguous",
|
|
3174
|
+
"failed"
|
|
3175
|
+
);
|
|
3176
|
+
var EnsureActiveMembershipWorkflowProgressSchema = Schema2.Struct({
|
|
3177
|
+
revision: Schema2.Number,
|
|
3178
|
+
steps: Schema2.Struct({
|
|
3179
|
+
identity_observed: Schema2.optional(EnsureActiveMembershipWorkflowStepStateSchema),
|
|
3180
|
+
rate_confirmed: Schema2.optional(EnsureActiveMembershipWorkflowStepStateSchema),
|
|
3181
|
+
profile_confirmed: Schema2.optional(EnsureActiveMembershipWorkflowStepStateSchema),
|
|
3182
|
+
preferences_confirmed: Schema2.optional(EnsureActiveMembershipWorkflowStepStateSchema),
|
|
3183
|
+
renewal_submitted: Schema2.optional(EnsureActiveMembershipWorkflowStepStateSchema),
|
|
3184
|
+
membership_verified: Schema2.optional(EnsureActiveMembershipWorkflowStepStateSchema),
|
|
3185
|
+
hub_refreshed: Schema2.optional(EnsureActiveMembershipWorkflowStepStateSchema)
|
|
3186
|
+
})
|
|
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
|
+
});
|
|
3211
|
+
var OnsiteAgentEnsureActiveMembershipProgressUpdateSchema = Schema2.Struct({
|
|
3212
|
+
expectedRevision: Schema2.Number,
|
|
3213
|
+
steps: EnsureActiveMembershipWorkflowProgressSchema.fields.steps,
|
|
3214
|
+
lastSafeStep: Schema2.optional(EnsureActiveMembershipWorkflowStepSchema),
|
|
3215
|
+
auditEvents: Schema2.optional(Schema2.Array(OnsiteAgentEnsureActiveMembershipAuditEventSchema))
|
|
3125
3216
|
});
|
|
3126
3217
|
var RequestEnsureActiveMembershipSchema = Schema2.Struct({
|
|
3127
3218
|
idempotencyKey: EnsureActiveMembershipIdempotencyKeySchema,
|
|
3128
3219
|
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
3129
3220
|
member: EnsureActiveMembershipMemberSchema
|
|
3130
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
|
+
});
|
|
3131
3254
|
var EnsureActiveMembershipCommandSchema = Schema2.Struct({
|
|
3132
3255
|
...OrganizationMemberSourceCommandSchema.fields,
|
|
3133
3256
|
kind: Schema2.Literal("ensure_active_membership"),
|
|
@@ -3394,6 +3517,7 @@ var OnsiteAgentEnsureActiveMembershipCommandSchema = Schema2.Struct({
|
|
|
3394
3517
|
connectorType: Schema2.Literal("odyssey_gaming"),
|
|
3395
3518
|
requestedAt: TimestampSchema,
|
|
3396
3519
|
payload: EnsureActiveMembershipCommandPayloadSchema,
|
|
3520
|
+
workflow: EnsureActiveMembershipWorkflowProgressSchema,
|
|
3397
3521
|
config: JsonObjectSchema,
|
|
3398
3522
|
secrets: Schema2.Array(OrganizationMemberSourceSecretInputSchema)
|
|
3399
3523
|
});
|
|
@@ -4228,6 +4352,29 @@ var memberSourcesGroup = HttpApiGroup.make("memberSources").add(
|
|
|
4228
4352
|
summary: "Get a specific member-source command for an organization"
|
|
4229
4353
|
})
|
|
4230
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
|
+
)
|
|
4231
4378
|
).add(
|
|
4232
4379
|
HttpApiEndpoint.post(
|
|
4233
4380
|
"triggerOrganizationMemberSync",
|
|
@@ -4344,6 +4491,32 @@ var onsiteAgentsGroup = HttpApiGroup.make("onsiteAgents").add(
|
|
|
4344
4491
|
summary: "Submit an Ensure Active Membership terminal outcome"
|
|
4345
4492
|
})
|
|
4346
4493
|
)
|
|
4494
|
+
).add(
|
|
4495
|
+
HttpApiEndpoint.post(
|
|
4496
|
+
"heartbeatOnsiteAgentEnsureActiveMembership",
|
|
4497
|
+
"/onsite-agent/ensure-active-membership-commands/:commandId/heartbeat"
|
|
4498
|
+
).setPath(
|
|
4499
|
+
Schema2.Struct({
|
|
4500
|
+
commandId: HttpApiSchema2.param("commandId", Schema2.String)
|
|
4501
|
+
})
|
|
4502
|
+
).addSuccess(EnsureActiveMembershipCommandSchema).annotateContext(
|
|
4503
|
+
OpenApi.annotations({
|
|
4504
|
+
summary: "Renew and verify an Ensure Active Membership identity lease"
|
|
4505
|
+
})
|
|
4506
|
+
)
|
|
4507
|
+
).add(
|
|
4508
|
+
HttpApiEndpoint.post(
|
|
4509
|
+
"recordOnsiteAgentEnsureActiveMembershipProgress",
|
|
4510
|
+
"/onsite-agent/ensure-active-membership-commands/:commandId/progress"
|
|
4511
|
+
).setPath(
|
|
4512
|
+
Schema2.Struct({
|
|
4513
|
+
commandId: HttpApiSchema2.param("commandId", Schema2.String)
|
|
4514
|
+
})
|
|
4515
|
+
).setPayload(OnsiteAgentEnsureActiveMembershipProgressUpdateSchema).addSuccess(EnsureActiveMembershipWorkflowProgressSchema).annotateContext(
|
|
4516
|
+
OpenApi.annotations({
|
|
4517
|
+
summary: "Persist durable Ensure Active Membership workflow progress"
|
|
4518
|
+
})
|
|
4519
|
+
)
|
|
4347
4520
|
).add(
|
|
4348
4521
|
HttpApiEndpoint.post(
|
|
4349
4522
|
"completeOnsiteAgentMemberUpdate",
|
|
@@ -5467,6 +5640,7 @@ var makePromiseSpokeClient = async (options) => {
|
|
|
5467
5640
|
export {
|
|
5468
5641
|
AddressSchema,
|
|
5469
5642
|
AdminSessionSchema,
|
|
5643
|
+
AuthorizeEnsureActiveMembershipRenewalSchema,
|
|
5470
5644
|
BadRequestErrorSchema,
|
|
5471
5645
|
BootstrapOrganizationMemberSourceAgentResponseSchema,
|
|
5472
5646
|
BootstrapOrganizationMemberSourceAgentSchema,
|
|
@@ -5494,6 +5668,8 @@ export {
|
|
|
5494
5668
|
DeleteServiceClientSchema,
|
|
5495
5669
|
EnsureActiveMembershipCommandPayloadSchema,
|
|
5496
5670
|
EnsureActiveMembershipCommandSchema,
|
|
5671
|
+
EnsureActiveMembershipManualReviewItemSchema,
|
|
5672
|
+
EnsureActiveMembershipManualReviewQueueSchema,
|
|
5497
5673
|
EnsureActiveMembershipMemberSchema,
|
|
5498
5674
|
EnsureActiveMembershipNonSuccessOutcomeSchema,
|
|
5499
5675
|
EnsureActiveMembershipNonSuccessResultSchema,
|
|
@@ -5502,6 +5678,9 @@ export {
|
|
|
5502
5678
|
EnsureActiveMembershipResultSchema,
|
|
5503
5679
|
EnsureActiveMembershipSuccessOutcomeSchema,
|
|
5504
5680
|
EnsureActiveMembershipSuccessResultSchema,
|
|
5681
|
+
EnsureActiveMembershipWorkflowProgressSchema,
|
|
5682
|
+
EnsureActiveMembershipWorkflowStepSchema,
|
|
5683
|
+
EnsureActiveMembershipWorkflowStepStateSchema,
|
|
5505
5684
|
ForbiddenErrorSchema,
|
|
5506
5685
|
GuestContactMatchSchema,
|
|
5507
5686
|
GuestSchema,
|
|
@@ -5536,8 +5715,10 @@ export {
|
|
|
5536
5715
|
OnsiteAgentCompleteRunSchema,
|
|
5537
5716
|
OnsiteAgentCsvUploadTargetSchema,
|
|
5538
5717
|
OnsiteAgentCustomFieldsCommandSchema,
|
|
5718
|
+
OnsiteAgentEnsureActiveMembershipAuditEventSchema,
|
|
5539
5719
|
OnsiteAgentEnsureActiveMembershipCommandSchema,
|
|
5540
5720
|
OnsiteAgentEnsureActiveMembershipCompletionResultSchema,
|
|
5721
|
+
OnsiteAgentEnsureActiveMembershipProgressUpdateSchema,
|
|
5541
5722
|
OnsiteAgentHeartbeatResponseSchema,
|
|
5542
5723
|
OnsiteAgentHeartbeatSchema,
|
|
5543
5724
|
OnsiteAgentIngestLiveFbiBatchSchema,
|
|
@@ -5606,6 +5787,7 @@ export {
|
|
|
5606
5787
|
PaginatedOrganizationsSchema,
|
|
5607
5788
|
PaginatedServiceClientsSchema,
|
|
5608
5789
|
PresignedPostSchema,
|
|
5790
|
+
ReconcileEnsureActiveMembershipManualReviewSchema,
|
|
5609
5791
|
RequestEnsureActiveMembershipSchema,
|
|
5610
5792
|
RequestPointDebitSchema,
|
|
5611
5793
|
RequestPointLookupSchema,
|