@spoketech/hub-client 0.1.22 → 0.1.24
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 +40 -0
- package/dist/index.d.ts +1141 -2
- package/dist/index.js +78 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -293,6 +293,7 @@ All routes below are relative to `/api/v1`. The promise client and the Effect cl
|
|
|
293
293
|
| --- | --- | --- | --- |
|
|
294
294
|
| `client.members.listOrganizationMembers({ params, query })` | `GET /organizations/:organizationId/members` | `params.organizationId`, optional paging and search `query` | `OrganizationMembersListResponse` |
|
|
295
295
|
| `client.members.getOrganizationMember({ params, query })` | `GET /organizations/:organizationId/members/:memberId` | `params.organizationId`, `params.memberId`, optional `responseMode` | `MemberResponse` |
|
|
296
|
+
| `client.members.getOrganizationMemberByExternalSystemId({ params, query })` | `GET /organizations/:organizationId/members/by-external-system-id/:externalSystemMemberId` | `params.organizationId`, `params.externalSystemMemberId`, optional `responseMode` | One `MemberResponse`; 404 when missing |
|
|
296
297
|
| `client.members.listOrganizationMemberMembershipTypes({ params, query })` | `GET /organizations/:organizationId/members/membership-types` | `params.organizationId`, optional `page`, `pageSize` | `PaginatedOrganizationMemberMembershipTypes` |
|
|
297
298
|
| `client.members.listOrganizationMemberRatingGrades({ params, query })` | `GET /organizations/:organizationId/members/rating-grades` | `params.organizationId`, optional `page`, `pageSize` | `PaginatedOrganizationMemberRatingGrades` |
|
|
298
299
|
| `client.members.createOrganizationMember({ params, payload })` | `POST /organizations/:organizationId/members` | `params.organizationId`, `CreateMemberInput` for local-member creation | `Member` |
|
|
@@ -386,3 +387,42 @@ import type {
|
|
|
386
387
|
OrganizationMembersListResponse,
|
|
387
388
|
} from "@spoketech/hub-client";
|
|
388
389
|
```
|
|
390
|
+
|
|
391
|
+
## Organization capabilities
|
|
392
|
+
|
|
393
|
+
Use `GET /organizations/:organizationId/capabilities` with `organizations:read`
|
|
394
|
+
access to the organization, or the convenience client:
|
|
395
|
+
|
|
396
|
+
```ts
|
|
397
|
+
const [capabilities, error] = await client.organizations.capabilities({ organizationId });
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
The raw client exposes `client.organizations.getOrganizationCapabilities({ params: { organizationId } })`.
|
|
401
|
+
The response contains `organizationId`, `points`, `vouchers`, `onsiteMemberLookup`,
|
|
402
|
+
and `memberCreation`. Each capability has `supported`, `enabled`, and a nullable
|
|
403
|
+
machine-readable `reason`. Member creation also has `mode`: `local` for Hub member
|
|
404
|
+
creation, or `source_managed` for Odyssey Ensure Active Membership.
|
|
405
|
+
|
|
406
|
+
`points` describes live provider points operations, and `vouchers` describes
|
|
407
|
+
provider voucher issuing. `supported` means the configured integration supports
|
|
408
|
+
the feature; `enabled` additionally checks configuration status and, for member
|
|
409
|
+
operations, agent configuration. Reasons include `not_configured`,
|
|
410
|
+
`unsupported_provider`, `unsupported_transport`, `source_inactive`,
|
|
411
|
+
`provider_inactive`, `agent_missing`, `agent_inactive`, `feature_disabled`, and
|
|
412
|
+
`agent_upgrade_required`.
|
|
413
|
+
|
|
414
|
+
This is configuration discovery: it does not probe onsite connectivity or grant
|
|
415
|
+
operation permissions. An enabled capability can still fail at runtime. No
|
|
416
|
+
provider configuration, credentials, or agent metadata are returned. Missing
|
|
417
|
+
organizations return 404; callers without organization access are rejected.
|
|
418
|
+
|
|
419
|
+
Look up one member by its external system ID within an organization:
|
|
420
|
+
|
|
421
|
+
```ts
|
|
422
|
+
const [member, error] = await client.members.getByExternalSystemId({
|
|
423
|
+
organizationId: "org_123",
|
|
424
|
+
externalSystemMemberId: "EXT-1001",
|
|
425
|
+
});
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
This lookup excludes deleted members, returns a 404 when no member matches, and returns a 409 conflict if multiple members match. The database enforces external system ID uniqueness within each organization; the conflict check guards against a missing constraint.
|