@spoketech/hub-client 0.1.22 → 0.1.23
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 +28 -0
- package/dist/index.d.ts +335 -2
- package/dist/index.js +53 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -607,7 +607,7 @@ var MemberSchema = Schema2.Struct({
|
|
|
607
607
|
organizationId: Schema2.String,
|
|
608
608
|
organizationMemberSourceId: NullableString,
|
|
609
609
|
status: Schema2.Literals([...memberComputedStatuses]).annotate({
|
|
610
|
-
description: "Computed member status for display and filtering. `active` means a non-suspended member has not expired, `active-expired` means a non-suspended member has expired but remains within the organization's grace period, `suspended` reflects suspended non-archived members, `expired` means a non-suspended member's grace period has elapsed, and `archived` is the stored archived state."
|
|
610
|
+
description: "Computed member status for display and filtering. `active` means a non-suspended member has not expired, `active-expired` means a non-suspended member has expired but remains within the organization's grace period, `suspended` reflects suspended non-archived members, `expired` means a non-suspended member's grace period has elapsed, and `archived` is the stored archived state. MAX source-managed members with an explicit non-ACT source status are expired unless archived or suspended. Missing source status falls back to a supplied expiry date and the normal grace-period rules; missing both status and expiry means expired."
|
|
611
611
|
}),
|
|
612
612
|
isSuspended: Schema2.Boolean,
|
|
613
613
|
recordMode: Schema2.Literals([...memberRecordModes]),
|
|
@@ -910,7 +910,7 @@ var OrganizationMembersListUrlParamsSchema = Schema2.Struct({
|
|
|
910
910
|
),
|
|
911
911
|
memberStatus: Schema2.optional(
|
|
912
912
|
OrganizationMembersStatusFilterSchema.annotate({
|
|
913
|
-
description: "Computed member status filter. `notArchived` returns every non-archived member, `active` returns members with `active` or `active-expired` status, `suspended` returns suspended non-archived members, and `expired` returns members whose grace period has elapsed.",
|
|
913
|
+
description: "Computed member status filter. `notArchived` returns every non-archived member, `active` returns members with `active` or `active-expired` status, `suspended` returns suspended non-archived members, and `expired` returns members whose grace period has elapsed or whose MAX source membership status is explicitly non-ACT or missing together with the expiry date.",
|
|
914
914
|
example: "active"
|
|
915
915
|
})
|
|
916
916
|
),
|
|
@@ -2706,6 +2706,34 @@ function memberSourceEnsureActiveMembershipEnabled(config) {
|
|
|
2706
2706
|
)(config);
|
|
2707
2707
|
return Result.isSuccess(decoded) && decoded.success.ensureActiveMembershipEnabled === true;
|
|
2708
2708
|
}
|
|
2709
|
+
var OrganizationCapabilitySchema = Schema2.Struct({
|
|
2710
|
+
supported: Schema2.Boolean,
|
|
2711
|
+
enabled: Schema2.Boolean,
|
|
2712
|
+
reason: Schema2.Union([
|
|
2713
|
+
Schema2.Literals([
|
|
2714
|
+
"not_configured",
|
|
2715
|
+
"unsupported_provider",
|
|
2716
|
+
"unsupported_transport",
|
|
2717
|
+
"source_inactive",
|
|
2718
|
+
"provider_inactive",
|
|
2719
|
+
"agent_missing",
|
|
2720
|
+
"agent_inactive",
|
|
2721
|
+
"feature_disabled",
|
|
2722
|
+
"agent_upgrade_required"
|
|
2723
|
+
]),
|
|
2724
|
+
Schema2.Null
|
|
2725
|
+
])
|
|
2726
|
+
});
|
|
2727
|
+
var OrganizationCapabilitiesSchema = Schema2.Struct({
|
|
2728
|
+
organizationId: Schema2.String,
|
|
2729
|
+
points: OrganizationCapabilitySchema,
|
|
2730
|
+
vouchers: OrganizationCapabilitySchema,
|
|
2731
|
+
onsiteMemberLookup: OrganizationCapabilitySchema,
|
|
2732
|
+
memberCreation: Schema2.Struct({
|
|
2733
|
+
...OrganizationCapabilitySchema.fields,
|
|
2734
|
+
mode: Schema2.Union([Schema2.Literals(["local", "source_managed"]), Schema2.Null])
|
|
2735
|
+
})
|
|
2736
|
+
});
|
|
2709
2737
|
var OrganizationMemberSourceSchema = Schema2.Struct({
|
|
2710
2738
|
id: Schema2.String,
|
|
2711
2739
|
organizationId: Schema2.String,
|
|
@@ -3682,6 +3710,9 @@ var ImportedMemberRecordSchema = Schema2.Struct({
|
|
|
3682
3710
|
ratingGrade: NullableString,
|
|
3683
3711
|
ratingGradeId: NullableString,
|
|
3684
3712
|
sourceStatus: NullableString,
|
|
3713
|
+
sourceStatusObserved: Schema2.optional(Schema2.Boolean).annotate({
|
|
3714
|
+
description: "True when the source supplied a status field, including an explicitly blank value. A blank observed status clears the previous observation; an absent field preserves it."
|
|
3715
|
+
}),
|
|
3685
3716
|
isSuspended: Schema2.optional(Schema2.Boolean),
|
|
3686
3717
|
marketingPreferences: Schema2.optional(MarketingPreferencesSchema),
|
|
3687
3718
|
expiresAt: Schema2.Union([TimestampSchema, Schema2.Null]),
|
|
@@ -4013,6 +4044,21 @@ var authGroup = HttpApiGroup.make("auth").add(
|
|
|
4013
4044
|
)
|
|
4014
4045
|
);
|
|
4015
4046
|
var organizationsGroup = HttpApiGroup.make("organizations").add(
|
|
4047
|
+
HttpApiEndpoint.get(
|
|
4048
|
+
"getOrganizationCapabilities",
|
|
4049
|
+
"/organizations/:organizationId/capabilities",
|
|
4050
|
+
{
|
|
4051
|
+
params: OrganizationIdParams,
|
|
4052
|
+
success: OrganizationCapabilitiesSchema,
|
|
4053
|
+
error: CommonErrorSchemas
|
|
4054
|
+
}
|
|
4055
|
+
).annotateMerge(
|
|
4056
|
+
OpenApi.annotations({
|
|
4057
|
+
summary: "Get configured organization capabilities",
|
|
4058
|
+
description: "Requires organizations:read. Reports venue configuration, not caller write permissions or live connectivity. Points means live provider points; vouchers means provider voucher issuing."
|
|
4059
|
+
})
|
|
4060
|
+
)
|
|
4061
|
+
).add(
|
|
4016
4062
|
HttpApiEndpoint.get(
|
|
4017
4063
|
"listOrganizationProductOptions",
|
|
4018
4064
|
"/organization-products",
|
|
@@ -6227,6 +6273,9 @@ function makeSpokeClient(hubClient) {
|
|
|
6227
6273
|
const onsite = makeOnsiteResourceClient(hubClient);
|
|
6228
6274
|
return {
|
|
6229
6275
|
organizations: {
|
|
6276
|
+
capabilities: (input) => unwrap(
|
|
6277
|
+
hubClient.organizations.getOrganizationCapabilities({ params: input })
|
|
6278
|
+
),
|
|
6230
6279
|
list: (input = {}) => unwrap(
|
|
6231
6280
|
hubClient.organizations.listOrganizations({
|
|
6232
6281
|
query: cleanParams(input)
|
|
@@ -6797,6 +6846,8 @@ export {
|
|
|
6797
6846
|
OnsiteResourcePointCallResponseSchema,
|
|
6798
6847
|
OnsiteResourceVoucherCallResponseSchema,
|
|
6799
6848
|
OnsiteVoucherCommandSchema,
|
|
6849
|
+
OrganizationCapabilitiesSchema,
|
|
6850
|
+
OrganizationCapabilitySchema,
|
|
6800
6851
|
OrganizationMemberGenderSchema,
|
|
6801
6852
|
OrganizationMemberMembershipTypeSchema,
|
|
6802
6853
|
OrganizationMemberRatingGradeSchema,
|