@spoketech/hub-client 0.1.9 → 0.1.10
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 +26 -2
- package/dist/index.d.ts +11840 -7462
- package/dist/index.js +292 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53,6 +53,21 @@ var organizationVoucherCommandStatuses = [
|
|
|
53
53
|
"completed",
|
|
54
54
|
"failed"
|
|
55
55
|
];
|
|
56
|
+
var organizationPointProviderProviders = ["ebet_pos"];
|
|
57
|
+
var organizationPointProviderTransports = ["onsite_client"];
|
|
58
|
+
var organizationPointProviderStatuses = ["active", "disabled"];
|
|
59
|
+
var organizationPointCommandKinds = [
|
|
60
|
+
"lookup_points",
|
|
61
|
+
"add_points",
|
|
62
|
+
"redeem_points",
|
|
63
|
+
"refund_points"
|
|
64
|
+
];
|
|
65
|
+
var organizationPointCommandStatuses = [
|
|
66
|
+
"requested",
|
|
67
|
+
"accepted",
|
|
68
|
+
"completed",
|
|
69
|
+
"failed"
|
|
70
|
+
];
|
|
56
71
|
var organizationPointTypeStatuses = ["active", "archived"];
|
|
57
72
|
var organizationMemberSyncTriggerKinds = [
|
|
58
73
|
"manual",
|
|
@@ -316,6 +331,83 @@ var CompleteOnsiteVoucherCommandSchema = Schema2.Struct({
|
|
|
316
331
|
rawRecord: Schema2.optional(Schema2.Unknown),
|
|
317
332
|
errorMessage: OptionalNullableString
|
|
318
333
|
});
|
|
334
|
+
var OrganizationPointProviderSchema = Schema2.Struct({
|
|
335
|
+
id: Schema2.String,
|
|
336
|
+
organizationId: Schema2.String,
|
|
337
|
+
provider: Schema2.Literal(...organizationPointProviderProviders),
|
|
338
|
+
transport: Schema2.Literal(...organizationPointProviderTransports),
|
|
339
|
+
status: Schema2.Literal(...organizationPointProviderStatuses),
|
|
340
|
+
config: JsonObjectSchema,
|
|
341
|
+
hasSecrets: Schema2.Boolean,
|
|
342
|
+
secretNames: Schema2.Array(Schema2.Struct({ name: Schema2.String })),
|
|
343
|
+
lastError: NullableString,
|
|
344
|
+
createdAt: TimestampSchema,
|
|
345
|
+
updatedAt: TimestampSchema,
|
|
346
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
347
|
+
});
|
|
348
|
+
var OrganizationPointCommandSchema = Schema2.Struct({
|
|
349
|
+
id: Schema2.String,
|
|
350
|
+
organizationId: Schema2.String,
|
|
351
|
+
organizationPointProviderId: Schema2.String,
|
|
352
|
+
serviceClientId: NullableString,
|
|
353
|
+
kind: Schema2.Literal(...organizationPointCommandKinds),
|
|
354
|
+
status: Schema2.Literal(...organizationPointCommandStatuses),
|
|
355
|
+
payload: JsonObjectSchema,
|
|
356
|
+
result: Schema2.Union(JsonObjectSchema, Schema2.Null),
|
|
357
|
+
errorMessage: NullableString,
|
|
358
|
+
requestedAt: TimestampSchema,
|
|
359
|
+
acceptedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
360
|
+
completedAt: Schema2.Union(TimestampSchema, Schema2.Null),
|
|
361
|
+
createdAt: TimestampSchema,
|
|
362
|
+
updatedAt: TimestampSchema,
|
|
363
|
+
deletedAt: Schema2.Union(TimestampSchema, Schema2.Null)
|
|
364
|
+
});
|
|
365
|
+
var UpsertOrganizationPointProviderSchema = Schema2.Struct({
|
|
366
|
+
provider: Schema2.Literal(...organizationPointProviderProviders),
|
|
367
|
+
transport: Schema2.Literal(...organizationPointProviderTransports),
|
|
368
|
+
status: Schema2.optional(Schema2.Literal(...organizationPointProviderStatuses)),
|
|
369
|
+
config: JsonObjectSchema,
|
|
370
|
+
secrets: Schema2.optional(Schema2.Array(OrganizationVoucherProviderSecretInputSchema))
|
|
371
|
+
});
|
|
372
|
+
var RequestPointLookupSchema = Schema2.Struct({
|
|
373
|
+
memberId: Schema2.optional(Schema2.String),
|
|
374
|
+
externalSystemMemberId: OptionalNullableString,
|
|
375
|
+
memberNumber: OptionalNullableString,
|
|
376
|
+
cardData: OptionalNullableString,
|
|
377
|
+
account: Schema2.optional(Schema2.Union(Schema2.String, Schema2.Number)),
|
|
378
|
+
packetNumber: Schema2.optional(Schema2.Union(Schema2.String, Schema2.Number)),
|
|
379
|
+
metadata: Schema2.optional(JsonObjectSchema)
|
|
380
|
+
});
|
|
381
|
+
var RequestPointDebitSchema = Schema2.Struct({
|
|
382
|
+
memberId: Schema2.optional(Schema2.String),
|
|
383
|
+
externalSystemMemberId: OptionalNullableString,
|
|
384
|
+
memberNumber: OptionalNullableString,
|
|
385
|
+
cardData: OptionalNullableString,
|
|
386
|
+
amount: Schema2.Number,
|
|
387
|
+
account: Schema2.optional(Schema2.Union(Schema2.String, Schema2.Number)),
|
|
388
|
+
packetNumber: Schema2.optional(Schema2.Union(Schema2.String, Schema2.Number)),
|
|
389
|
+
metadata: Schema2.optional(JsonObjectSchema)
|
|
390
|
+
});
|
|
391
|
+
var OnsitePointCommandSchema = Schema2.Struct({
|
|
392
|
+
commandId: Schema2.String,
|
|
393
|
+
organizationId: Schema2.String,
|
|
394
|
+
organizationPointProviderId: Schema2.String,
|
|
395
|
+
provider: Schema2.Literal(...organizationPointProviderProviders),
|
|
396
|
+
transport: Schema2.Literal(...organizationPointProviderTransports),
|
|
397
|
+
requestedAt: TimestampSchema,
|
|
398
|
+
kind: Schema2.Literal(...organizationPointCommandKinds),
|
|
399
|
+
payload: JsonObjectSchema,
|
|
400
|
+
config: JsonObjectSchema,
|
|
401
|
+
secrets: Schema2.Array(OrganizationVoucherProviderSecretInputSchema)
|
|
402
|
+
});
|
|
403
|
+
var CompleteOnsitePointCommandSchema = Schema2.Struct({
|
|
404
|
+
balance: OptionalNullableNumber,
|
|
405
|
+
scaledBalance: OptionalNullableNumber,
|
|
406
|
+
memberName: OptionalNullableString,
|
|
407
|
+
memberNumber: OptionalNullableString,
|
|
408
|
+
rawResponse: Schema2.optional(Schema2.Unknown),
|
|
409
|
+
errorMessage: OptionalNullableString
|
|
410
|
+
});
|
|
319
411
|
var OrganizationPointTypeSchema = Schema2.Struct({
|
|
320
412
|
id: Schema2.String,
|
|
321
413
|
organizationId: Schema2.String,
|
|
@@ -614,11 +706,7 @@ var OrganizationMembersSearchFieldSchema = Schema2.Literal(
|
|
|
614
706
|
"cardId",
|
|
615
707
|
"externalSystemMemberId"
|
|
616
708
|
);
|
|
617
|
-
var OrganizationMembersSortFieldSchema = Schema2.Literal(
|
|
618
|
-
"memberNumber",
|
|
619
|
-
"name",
|
|
620
|
-
"dob"
|
|
621
|
-
);
|
|
709
|
+
var OrganizationMembersSortFieldSchema = Schema2.Literal("memberNumber", "name", "dob");
|
|
622
710
|
var SortDirectionSchema = Schema2.Literal("asc", "desc");
|
|
623
711
|
var OrganizationMembersListUrlParamsSchema = Schema2.Struct({
|
|
624
712
|
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
@@ -2763,6 +2851,26 @@ var OnsiteResourceCallRequestSchema = Schema2.Union(
|
|
|
2763
2851
|
operation: Schema2.Literal("voucher.issue"),
|
|
2764
2852
|
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
2765
2853
|
payload: RequestVoucherIssueSchema
|
|
2854
|
+
}),
|
|
2855
|
+
Schema2.Struct({
|
|
2856
|
+
operation: Schema2.Literal("points.lookup"),
|
|
2857
|
+
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
2858
|
+
payload: RequestPointLookupSchema
|
|
2859
|
+
}),
|
|
2860
|
+
Schema2.Struct({
|
|
2861
|
+
operation: Schema2.Literal("points.add"),
|
|
2862
|
+
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
2863
|
+
payload: RequestPointDebitSchema
|
|
2864
|
+
}),
|
|
2865
|
+
Schema2.Struct({
|
|
2866
|
+
operation: Schema2.Literal("points.redeem"),
|
|
2867
|
+
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
2868
|
+
payload: RequestPointDebitSchema
|
|
2869
|
+
}),
|
|
2870
|
+
Schema2.Struct({
|
|
2871
|
+
operation: Schema2.Literal("points.refund"),
|
|
2872
|
+
waitMs: OnsiteResourceCallWaitMsSchema,
|
|
2873
|
+
payload: RequestPointDebitSchema
|
|
2766
2874
|
})
|
|
2767
2875
|
);
|
|
2768
2876
|
var OnsiteResourceMemberCallResponseSchema = Schema2.Struct({
|
|
@@ -2779,9 +2887,17 @@ var OnsiteResourceVoucherCallResponseSchema = Schema2.Struct({
|
|
|
2779
2887
|
timedOut: Schema2.Boolean,
|
|
2780
2888
|
command: OrganizationVoucherCommandSchema
|
|
2781
2889
|
});
|
|
2890
|
+
var OnsiteResourcePointCallResponseSchema = Schema2.Struct({
|
|
2891
|
+
kind: Schema2.Literal("points"),
|
|
2892
|
+
operation: Schema2.Literal("points.lookup", "points.add", "points.redeem", "points.refund"),
|
|
2893
|
+
settled: Schema2.Boolean,
|
|
2894
|
+
timedOut: Schema2.Boolean,
|
|
2895
|
+
command: OrganizationPointCommandSchema
|
|
2896
|
+
});
|
|
2782
2897
|
var OnsiteResourceCallResponseSchema = Schema2.Union(
|
|
2783
2898
|
OnsiteResourceMemberCallResponseSchema,
|
|
2784
|
-
OnsiteResourceVoucherCallResponseSchema
|
|
2899
|
+
OnsiteResourceVoucherCallResponseSchema,
|
|
2900
|
+
OnsiteResourcePointCallResponseSchema
|
|
2785
2901
|
);
|
|
2786
2902
|
var SourceManagedMemberUpdateCommandPayloadSchema = Schema2.Struct({
|
|
2787
2903
|
memberId: Schema2.String,
|
|
@@ -3009,10 +3125,7 @@ var OrganizationProductOptionParams = Schema2.Struct({
|
|
|
3009
3125
|
organizationProductOptionId: HttpApiSchema2.param("organizationProductOptionId", Schema2.String)
|
|
3010
3126
|
});
|
|
3011
3127
|
var OrganizationProductWebhookParams = Schema2.Struct({
|
|
3012
|
-
organizationProductWebhookId: HttpApiSchema2.param(
|
|
3013
|
-
"organizationProductWebhookId",
|
|
3014
|
-
Schema2.String
|
|
3015
|
-
)
|
|
3128
|
+
organizationProductWebhookId: HttpApiSchema2.param("organizationProductWebhookId", Schema2.String)
|
|
3016
3129
|
});
|
|
3017
3130
|
var OrganizationMemberSourceCommandParams = Schema2.Struct({
|
|
3018
3131
|
organizationId: HttpApiSchema2.param("organizationId", Schema2.String),
|
|
@@ -3081,12 +3194,9 @@ var organizationsGroup = HttpApiGroup.make("organizations").add(
|
|
|
3081
3194
|
"/organization-products/:organizationProductOptionId/webhooks"
|
|
3082
3195
|
).setPath(OrganizationProductOptionParams).setUrlParams(
|
|
3083
3196
|
Schema2.Struct({
|
|
3084
|
-
page: optionalQueryString(
|
|
3085
|
-
"1
|
|
3086
|
-
|
|
3087
|
-
example: "1"
|
|
3088
|
-
}
|
|
3089
|
-
),
|
|
3197
|
+
page: optionalQueryString("1-based page number. Defaults to 1 when omitted or invalid.", {
|
|
3198
|
+
example: "1"
|
|
3199
|
+
}),
|
|
3090
3200
|
pageSize: optionalQueryString(
|
|
3091
3201
|
"Number of organization product webhooks per page. Defaults to 25 and is capped at 100.",
|
|
3092
3202
|
{
|
|
@@ -3095,7 +3205,9 @@ var organizationsGroup = HttpApiGroup.make("organizations").add(
|
|
|
3095
3205
|
)
|
|
3096
3206
|
})
|
|
3097
3207
|
).addSuccess(PaginatedOrganizationProductWebhooksSchema).annotateContext(
|
|
3098
|
-
OpenApi.annotations({
|
|
3208
|
+
OpenApi.annotations({
|
|
3209
|
+
summary: "List configured webhooks for an organization product option"
|
|
3210
|
+
})
|
|
3099
3211
|
)
|
|
3100
3212
|
).add(
|
|
3101
3213
|
HttpApiEndpoint.post(
|
|
@@ -3126,16 +3238,12 @@ var organizationsGroup = HttpApiGroup.make("organizations").add(
|
|
|
3126
3238
|
HttpApiEndpoint.put(
|
|
3127
3239
|
"updateOrganizationProductWebhook",
|
|
3128
3240
|
"/organization-product-webhooks/:organizationProductWebhookId"
|
|
3129
|
-
).setPath(OrganizationProductWebhookParams).setPayload(UpdateOrganizationProductWebhookSchema).addSuccess(OrganizationProductWebhookUpsertResponseSchema).annotateContext(
|
|
3130
|
-
OpenApi.annotations({ summary: "Update an organization product webhook" })
|
|
3131
|
-
)
|
|
3241
|
+
).setPath(OrganizationProductWebhookParams).setPayload(UpdateOrganizationProductWebhookSchema).addSuccess(OrganizationProductWebhookUpsertResponseSchema).annotateContext(OpenApi.annotations({ summary: "Update an organization product webhook" }))
|
|
3132
3242
|
).add(
|
|
3133
3243
|
HttpApiEndpoint.del(
|
|
3134
3244
|
"deleteOrganizationProductWebhook",
|
|
3135
3245
|
"/organization-product-webhooks/:organizationProductWebhookId"
|
|
3136
|
-
).setPath(OrganizationProductWebhookParams).addSuccess(OrganizationProductWebhookSchema).annotateContext(
|
|
3137
|
-
OpenApi.annotations({ summary: "Delete an organization product webhook" })
|
|
3138
|
-
)
|
|
3246
|
+
).setPath(OrganizationProductWebhookParams).addSuccess(OrganizationProductWebhookSchema).annotateContext(OpenApi.annotations({ summary: "Delete an organization product webhook" }))
|
|
3139
3247
|
).add(
|
|
3140
3248
|
HttpApiEndpoint.get("listOrganizations", "/organizations").setUrlParams(OrganizationsListUrlParamsSchema).addSuccess(PaginatedOrganizationsSchema).annotateContext(OpenApi.annotations({ summary: "List organizations" }))
|
|
3141
3249
|
).add(
|
|
@@ -3194,7 +3302,10 @@ var membersGroup = HttpApiGroup.make("members").add(
|
|
|
3194
3302
|
})
|
|
3195
3303
|
)
|
|
3196
3304
|
).add(
|
|
3197
|
-
HttpApiEndpoint.post(
|
|
3305
|
+
HttpApiEndpoint.post(
|
|
3306
|
+
"bulkGetOrganizationMembers",
|
|
3307
|
+
"/organizations/:organizationId/members/bulk"
|
|
3308
|
+
).setPath(OrganizationIdParams).setPayload(BulkGetOrganizationMembersSchema).addSuccess(BulkOrganizationMembersResponseUnionSchema).annotateContext(
|
|
3198
3309
|
OpenApi.annotations({
|
|
3199
3310
|
summary: "Fetch up to 50 members by Spoke Hub member ID for an organization",
|
|
3200
3311
|
transform: bulkMemberExamplesTransform
|
|
@@ -3337,7 +3448,10 @@ var memberPointsGroup = HttpApiGroup.make("memberPoints").add(
|
|
|
3337
3448
|
})
|
|
3338
3449
|
)
|
|
3339
3450
|
).add(
|
|
3340
|
-
HttpApiEndpoint.post(
|
|
3451
|
+
HttpApiEndpoint.post(
|
|
3452
|
+
"createOrganizationPointType",
|
|
3453
|
+
"/organizations/:organizationId/point-types"
|
|
3454
|
+
).setPath(OrganizationIdParams).setPayload(CreateOrganizationPointTypeSchema).addSuccess(OrganizationPointTypeSchema, { status: 201 }).annotateContext(
|
|
3341
3455
|
OpenApi.annotations({
|
|
3342
3456
|
summary: "Create a point type for an organization"
|
|
3343
3457
|
})
|
|
@@ -3382,11 +3496,22 @@ var vouchersGroup = HttpApiGroup.make("vouchers").add(
|
|
|
3382
3496
|
"upsertOrganizationVoucherProvider",
|
|
3383
3497
|
"/organizations/:organizationId/voucher-provider"
|
|
3384
3498
|
).setPath(OrganizationIdParams).setPayload(UpsertOrganizationVoucherProviderSchema).addSuccess(OrganizationVoucherProviderSchema).annotateContext(
|
|
3385
|
-
OpenApi.annotations({
|
|
3499
|
+
OpenApi.annotations({
|
|
3500
|
+
summary: "Create or update the voucher provider for an organization"
|
|
3501
|
+
})
|
|
3386
3502
|
)
|
|
3387
3503
|
).add(
|
|
3388
3504
|
HttpApiEndpoint.post("requestVoucherIssue", "/organizations/:organizationId/vouchers/issue").setPath(OrganizationIdParams).setPayload(RequestVoucherIssueSchema).addSuccess(OrganizationVoucherCommandSchema, { status: 202 }).annotateContext(
|
|
3389
|
-
OpenApi.annotations({
|
|
3505
|
+
OpenApi.annotations({
|
|
3506
|
+
summary: "Request a voucher issue through the onsite voucher client"
|
|
3507
|
+
})
|
|
3508
|
+
)
|
|
3509
|
+
).add(
|
|
3510
|
+
HttpApiEndpoint.get(
|
|
3511
|
+
"getOrganizationVoucherCommand",
|
|
3512
|
+
"/organizations/:organizationId/voucher-commands/:commandId"
|
|
3513
|
+
).setPath(OrganizationVoucherCommandParams).addSuccess(OrganizationVoucherCommandSchema).annotateContext(
|
|
3514
|
+
OpenApi.annotations({ summary: "Get a specific voucher command for an organization" })
|
|
3390
3515
|
)
|
|
3391
3516
|
).add(
|
|
3392
3517
|
HttpApiEndpoint.post(
|
|
@@ -3405,14 +3530,74 @@ var vouchersGroup = HttpApiGroup.make("vouchers").add(
|
|
|
3405
3530
|
HttpApiEndpoint.post(
|
|
3406
3531
|
"completeOnsiteVoucherCommand",
|
|
3407
3532
|
"/organizations/:organizationId/onsite-voucher-commands/:commandId/complete"
|
|
3408
|
-
).setPath(OrganizationVoucherCommandParams).setPayload(CompleteOnsiteVoucherCommandSchema).addSuccess(OrganizationVoucherCommandSchema).annotateContext(
|
|
3409
|
-
|
|
3533
|
+
).setPath(OrganizationVoucherCommandParams).setPayload(CompleteOnsiteVoucherCommandSchema).addSuccess(OrganizationVoucherCommandSchema).annotateContext(OpenApi.annotations({ summary: "Complete an onsite voucher command" }))
|
|
3534
|
+
);
|
|
3535
|
+
var pointProvidersGroup = HttpApiGroup.make("pointProviders").add(
|
|
3536
|
+
HttpApiEndpoint.get(
|
|
3537
|
+
"getOrganizationPointProvider",
|
|
3538
|
+
"/organizations/:organizationId/point-provider"
|
|
3539
|
+
).setPath(OrganizationIdParams).addSuccess(Schema2.Union(OrganizationPointProviderSchema, Schema2.Null)).annotateContext(
|
|
3540
|
+
OpenApi.annotations({ summary: "Get the live points provider for an organization" })
|
|
3410
3541
|
)
|
|
3542
|
+
).add(
|
|
3543
|
+
HttpApiEndpoint.put(
|
|
3544
|
+
"upsertOrganizationPointProvider",
|
|
3545
|
+
"/organizations/:organizationId/point-provider"
|
|
3546
|
+
).setPath(OrganizationIdParams).setPayload(UpsertOrganizationPointProviderSchema).addSuccess(OrganizationPointProviderSchema).annotateContext(
|
|
3547
|
+
OpenApi.annotations({
|
|
3548
|
+
summary: "Create or update the live points provider for an organization"
|
|
3549
|
+
})
|
|
3550
|
+
)
|
|
3551
|
+
).add(
|
|
3552
|
+
HttpApiEndpoint.post("requestPointLookup", "/organizations/:organizationId/points/lookup").setPath(OrganizationIdParams).setPayload(RequestPointLookupSchema).addSuccess(OrganizationPointCommandSchema, { status: 202 }).annotateContext(
|
|
3553
|
+
OpenApi.annotations({ summary: "Request a live points lookup through the onsite client" })
|
|
3554
|
+
)
|
|
3555
|
+
).add(
|
|
3556
|
+
HttpApiEndpoint.post("requestPointAdd", "/organizations/:organizationId/points/add").setPath(OrganizationIdParams).setPayload(RequestPointDebitSchema).addSuccess(OrganizationPointCommandSchema, { status: 202 }).annotateContext(
|
|
3557
|
+
OpenApi.annotations({
|
|
3558
|
+
summary: "Request a live points add through the onsite client"
|
|
3559
|
+
})
|
|
3560
|
+
)
|
|
3561
|
+
).add(
|
|
3562
|
+
HttpApiEndpoint.post("requestPointRedeem", "/organizations/:organizationId/points/redeem").setPath(OrganizationIdParams).setPayload(RequestPointDebitSchema).addSuccess(OrganizationPointCommandSchema, { status: 202 }).annotateContext(
|
|
3563
|
+
OpenApi.annotations({
|
|
3564
|
+
summary: "Request a live points redemption through the onsite client"
|
|
3565
|
+
})
|
|
3566
|
+
)
|
|
3567
|
+
).add(
|
|
3568
|
+
HttpApiEndpoint.post("requestPointRefund", "/organizations/:organizationId/points/refund").setPath(OrganizationIdParams).setPayload(RequestPointDebitSchema).addSuccess(OrganizationPointCommandSchema, { status: 202 }).annotateContext(
|
|
3569
|
+
OpenApi.annotations({ summary: "Request a live points refund through the onsite client" })
|
|
3570
|
+
)
|
|
3571
|
+
).add(
|
|
3572
|
+
HttpApiEndpoint.get(
|
|
3573
|
+
"getOrganizationPointCommand",
|
|
3574
|
+
"/organizations/:organizationId/point-commands/:commandId"
|
|
3575
|
+
).setPath(OrganizationVoucherCommandParams).addSuccess(OrganizationPointCommandSchema).annotateContext(
|
|
3576
|
+
OpenApi.annotations({ summary: "Get a specific point command for an organization" })
|
|
3577
|
+
)
|
|
3578
|
+
).add(
|
|
3579
|
+
HttpApiEndpoint.post(
|
|
3580
|
+
"pollOnsitePointCommand",
|
|
3581
|
+
"/organizations/:organizationId/onsite-point-commands/poll"
|
|
3582
|
+
).setPath(OrganizationIdParams).addSuccess(Schema2.Union(OnsitePointCommandSchema, Schema2.Null)).annotateContext(
|
|
3583
|
+
OpenApi.annotations({ summary: "Poll for the next pending onsite point command" })
|
|
3584
|
+
)
|
|
3585
|
+
).add(
|
|
3586
|
+
HttpApiEndpoint.post("pollCurrentOnsitePointCommand", "/onsite-point-commands/poll").addSuccess(Schema2.Union(OnsitePointCommandSchema, Schema2.Null)).annotateContext(
|
|
3587
|
+
OpenApi.annotations({
|
|
3588
|
+
summary: "Poll for the next pending onsite point command for the signed credential"
|
|
3589
|
+
})
|
|
3590
|
+
)
|
|
3591
|
+
).add(
|
|
3592
|
+
HttpApiEndpoint.post(
|
|
3593
|
+
"completeOnsitePointCommand",
|
|
3594
|
+
"/organizations/:organizationId/onsite-point-commands/:commandId/complete"
|
|
3595
|
+
).setPath(OrganizationVoucherCommandParams).setPayload(CompleteOnsitePointCommandSchema).addSuccess(OrganizationPointCommandSchema).annotateContext(OpenApi.annotations({ summary: "Complete an onsite point command" }))
|
|
3411
3596
|
);
|
|
3412
3597
|
var onsiteCallsGroup = HttpApiGroup.make("onsiteCalls").add(
|
|
3413
3598
|
HttpApiEndpoint.post("callOnsiteResource", "/organizations/:organizationId/onsite-calls").setPath(OrganizationIdParams).setPayload(OnsiteResourceCallRequestSchema).addSuccess(OnsiteResourceCallResponseSchema).annotateContext(
|
|
3414
3599
|
OpenApi.annotations({
|
|
3415
|
-
summary: "Call a live onsite member or
|
|
3600
|
+
summary: "Call a live onsite member, voucher, or points resource and wait briefly for completion"
|
|
3416
3601
|
})
|
|
3417
3602
|
)
|
|
3418
3603
|
);
|
|
@@ -3700,7 +3885,7 @@ var serviceClientsGroup = HttpApiGroup.make("serviceClients").add(
|
|
|
3700
3885
|
})
|
|
3701
3886
|
)
|
|
3702
3887
|
);
|
|
3703
|
-
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(
|
|
3888
|
+
var HubApi = HttpApi.make("hub").add(authGroup).add(organizationsGroup).add(membersGroup).add(memberPointsGroup).add(vouchersGroup).add(pointProvidersGroup).add(onsiteCallsGroup).add(memberSourcesGroup).add(onsiteAgentsGroup).add(guestsGroup).add(serviceClientsGroup).prefix("/v1").addError(UnauthorizedErrorSchema).addError(ForbiddenErrorSchema).addError(NotFoundErrorSchema).addError(ConflictErrorSchema).addError(BadRequestErrorSchema).annotateContext(
|
|
3704
3889
|
OpenApi.annotations({
|
|
3705
3890
|
title: "Spoke Hub API",
|
|
3706
3891
|
version: "1.0.0",
|
|
@@ -4124,6 +4309,32 @@ function makeOnsiteResourceClient(client) {
|
|
|
4124
4309
|
operation: "voucher.issue",
|
|
4125
4310
|
payload: input.payload
|
|
4126
4311
|
})
|
|
4312
|
+
},
|
|
4313
|
+
points: {
|
|
4314
|
+
lookup: (input) => call({
|
|
4315
|
+
organizationId: input.organizationId,
|
|
4316
|
+
waitMs: input.waitMs,
|
|
4317
|
+
operation: "points.lookup",
|
|
4318
|
+
payload: input.payload
|
|
4319
|
+
}),
|
|
4320
|
+
add: (input) => call({
|
|
4321
|
+
organizationId: input.organizationId,
|
|
4322
|
+
waitMs: input.waitMs,
|
|
4323
|
+
operation: "points.add",
|
|
4324
|
+
payload: input.payload
|
|
4325
|
+
}),
|
|
4326
|
+
redeem: (input) => call({
|
|
4327
|
+
organizationId: input.organizationId,
|
|
4328
|
+
waitMs: input.waitMs,
|
|
4329
|
+
operation: "points.redeem",
|
|
4330
|
+
payload: input.payload
|
|
4331
|
+
}),
|
|
4332
|
+
refund: (input) => call({
|
|
4333
|
+
organizationId: input.organizationId,
|
|
4334
|
+
waitMs: input.waitMs,
|
|
4335
|
+
operation: "points.refund",
|
|
4336
|
+
payload: input.payload
|
|
4337
|
+
})
|
|
4127
4338
|
}
|
|
4128
4339
|
};
|
|
4129
4340
|
}
|
|
@@ -4491,6 +4702,43 @@ function makeSpokeClient(hubClient) {
|
|
|
4491
4702
|
)
|
|
4492
4703
|
}
|
|
4493
4704
|
},
|
|
4705
|
+
posPoints: {
|
|
4706
|
+
getProvider: (input) => unwrap(
|
|
4707
|
+
hubClient.pointProviders.getOrganizationPointProvider({
|
|
4708
|
+
path: { organizationId: input.organizationId }
|
|
4709
|
+
})
|
|
4710
|
+
),
|
|
4711
|
+
upsertProvider: (input) => unwrap(
|
|
4712
|
+
hubClient.pointProviders.upsertOrganizationPointProvider({
|
|
4713
|
+
path: { organizationId: input.organizationId },
|
|
4714
|
+
payload: input.payload
|
|
4715
|
+
})
|
|
4716
|
+
),
|
|
4717
|
+
requestLookup: (input) => unwrap(
|
|
4718
|
+
hubClient.pointProviders.requestPointLookup({
|
|
4719
|
+
path: { organizationId: input.organizationId },
|
|
4720
|
+
payload: input.payload
|
|
4721
|
+
})
|
|
4722
|
+
),
|
|
4723
|
+
requestAdd: (input) => unwrap(
|
|
4724
|
+
hubClient.pointProviders.requestPointAdd({
|
|
4725
|
+
path: { organizationId: input.organizationId },
|
|
4726
|
+
payload: input.payload
|
|
4727
|
+
})
|
|
4728
|
+
),
|
|
4729
|
+
requestRedeem: (input) => unwrap(
|
|
4730
|
+
hubClient.pointProviders.requestPointRedeem({
|
|
4731
|
+
path: { organizationId: input.organizationId },
|
|
4732
|
+
payload: input.payload
|
|
4733
|
+
})
|
|
4734
|
+
),
|
|
4735
|
+
requestRefund: (input) => unwrap(
|
|
4736
|
+
hubClient.pointProviders.requestPointRefund({
|
|
4737
|
+
path: { organizationId: input.organizationId },
|
|
4738
|
+
payload: input.payload
|
|
4739
|
+
})
|
|
4740
|
+
)
|
|
4741
|
+
},
|
|
4494
4742
|
vouchers: {
|
|
4495
4743
|
getProvider: (input) => unwrap(
|
|
4496
4744
|
hubClient.vouchers.getOrganizationVoucherProvider({
|
|
@@ -4574,6 +4822,7 @@ export {
|
|
|
4574
4822
|
BulkOrganizationMembersMedResponseSchema,
|
|
4575
4823
|
BulkOrganizationMembersResponseSchema,
|
|
4576
4824
|
BulkOrganizationMembersResponseUnionSchema,
|
|
4825
|
+
CompleteOnsitePointCommandSchema,
|
|
4577
4826
|
CompleteOnsiteVoucherCommandSchema,
|
|
4578
4827
|
ConflictErrorSchema,
|
|
4579
4828
|
CreateGuestSchema,
|
|
@@ -4625,9 +4874,11 @@ export {
|
|
|
4625
4874
|
OnsiteAgentMemberLookupCommandSchema,
|
|
4626
4875
|
OnsiteAgentMemberRenewalCommandSchema,
|
|
4627
4876
|
OnsiteAgentMemberUpdateCommandSchema,
|
|
4877
|
+
OnsitePointCommandSchema,
|
|
4628
4878
|
OnsiteResourceCallRequestSchema,
|
|
4629
4879
|
OnsiteResourceCallResponseSchema,
|
|
4630
4880
|
OnsiteResourceMemberCallResponseSchema,
|
|
4881
|
+
OnsiteResourcePointCallResponseSchema,
|
|
4631
4882
|
OnsiteResourceVoucherCallResponseSchema,
|
|
4632
4883
|
OnsiteVoucherCommandSchema,
|
|
4633
4884
|
OrganizationMemberGenderSchema,
|
|
@@ -4649,6 +4900,8 @@ export {
|
|
|
4649
4900
|
OrganizationMembersSortFieldSchema,
|
|
4650
4901
|
OrganizationMembersStatusFilterSchema,
|
|
4651
4902
|
OrganizationPeopleContactLookupResponseSchema,
|
|
4903
|
+
OrganizationPointCommandSchema,
|
|
4904
|
+
OrganizationPointProviderSchema,
|
|
4652
4905
|
OrganizationPointTypeSchema,
|
|
4653
4906
|
OrganizationPointTypesResponseSchema,
|
|
4654
4907
|
OrganizationProductOptionSchema,
|
|
@@ -4675,6 +4928,8 @@ export {
|
|
|
4675
4928
|
PaginatedOrganizationsSchema,
|
|
4676
4929
|
PaginatedServiceClientsSchema,
|
|
4677
4930
|
PresignedPostSchema,
|
|
4931
|
+
RequestPointDebitSchema,
|
|
4932
|
+
RequestPointLookupSchema,
|
|
4678
4933
|
RequestSourceManagedMemberCreateSchema,
|
|
4679
4934
|
RequestSourceManagedMemberRenewalSchema,
|
|
4680
4935
|
RequestSourceManagedMemberUpdateSchema,
|
|
@@ -4701,6 +4956,7 @@ export {
|
|
|
4701
4956
|
UpsertOrganizationMemberSourceCsvMappingSchema,
|
|
4702
4957
|
UpsertOrganizationMemberSourceSchema,
|
|
4703
4958
|
UpsertOrganizationMemberSourceWebhookSchema,
|
|
4959
|
+
UpsertOrganizationPointProviderSchema,
|
|
4704
4960
|
UpsertOrganizationProductWebhookSchema,
|
|
4705
4961
|
UpsertOrganizationVoucherProviderSchema,
|
|
4706
4962
|
adminRoles,
|
|
@@ -4738,6 +4994,11 @@ export {
|
|
|
4738
4994
|
organizationMemberSyncRunStatuses,
|
|
4739
4995
|
organizationMemberSyncTransports,
|
|
4740
4996
|
organizationMemberSyncTriggerKinds,
|
|
4997
|
+
organizationPointCommandKinds,
|
|
4998
|
+
organizationPointCommandStatuses,
|
|
4999
|
+
organizationPointProviderProviders,
|
|
5000
|
+
organizationPointProviderStatuses,
|
|
5001
|
+
organizationPointProviderTransports,
|
|
4741
5002
|
organizationPointTypeStatuses,
|
|
4742
5003
|
organizationProductWebhookDeliveryStatuses,
|
|
4743
5004
|
organizationProductWebhookStatuses,
|