@spoketech/hub-client 0.1.25 → 0.1.27
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 +67 -0
- package/dist/index.d.ts +12824 -41795
- package/dist/index.js +135 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -484,3 +484,70 @@ original file as an attachment and expires after five minutes. Missing files ret
|
|
|
484
484
|
404. The SDK method is
|
|
485
485
|
`spoke.memberSources.initialMembershipUploads.download({ organizationId, uploadId })`.
|
|
486
486
|
The SST policy also grants `s3:GetObject` for the initial upload prefix.
|
|
487
|
+
|
|
488
|
+
### Retryable automatic points awards (0.1.26)
|
|
489
|
+
|
|
490
|
+
`posPoints.requestAdd` accepts optional `idempotencyKey` and
|
|
491
|
+
`payload.expectedProviderId`. Retry with the exact original terms to retrieve the
|
|
492
|
+
same command/current status; changed terms return 409. Omit the key for legacy
|
|
493
|
+
behavior. `posPoints.getProvider` adds optional typed `readiness`, including
|
|
494
|
+
concrete configured accounts/default, amount limits, caller access, durable
|
|
495
|
+
request deduplication and recent onsite execution/recovery support. Older Hub
|
|
496
|
+
responses may omit readiness and must not enable automatic awards.
|
|
497
|
+
|
|
498
|
+
Submission still requires `vouchers:write`; provider reads and
|
|
499
|
+
`pointProviders.getOrganizationPointCommand` require `vouchers:read`, with access
|
|
500
|
+
to the target organization. Stored payloads now preserve a supplied Hub
|
|
501
|
+
`memberId`; historical records may omit it. Before accepting completion, verify
|
|
502
|
+
the organization, provider ID, kind, Member, amount and concrete account, and
|
|
503
|
+
require `status === "completed"` with `executionEvidence.outcome === "confirmed"`.
|
|
504
|
+
An `accepted` command with `uncertain` evidence requires reconciliation, never
|
|
505
|
+
another automatic award. Deploy Hub safety protocol 1 and a capable onsite agent
|
|
506
|
+
before enabling keyed awards. See the repository's
|
|
507
|
+
`docs/points-addition-rollout.md` for provider validation and rollout requirements.
|
|
508
|
+
|
|
509
|
+
### Odyssey gaming permissions
|
|
510
|
+
|
|
511
|
+
`onsite.members.update` accepts a separate `gamingPermissions` object:
|
|
512
|
+
|
|
513
|
+
```ts
|
|
514
|
+
await onsite.members.update({
|
|
515
|
+
organizationId,
|
|
516
|
+
memberId,
|
|
517
|
+
payload: {
|
|
518
|
+
expectedUpdatedAt: member.updatedAt,
|
|
519
|
+
gamingPermissions: {
|
|
520
|
+
isGamingEnabled: false,
|
|
521
|
+
isVenuePromotionsEnabled: false,
|
|
522
|
+
isGamingPromotionsEnabled: false,
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
});
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
Omitted flags retain their current Nexus values; explicit `true` re-enables a flag.
|
|
529
|
+
This requires an Odyssey source and an upgraded onsite agent advertising
|
|
530
|
+
`odysseyGamingPermissionsV1`. The agent verifies the values by reading Nexus after
|
|
531
|
+
updating. Hub stores observed permissions separately from marketing preferences
|
|
532
|
+
and returns them on full member responses. `null` or a missing flag means unknown,
|
|
533
|
+
not disabled. Full and delta syncs refresh these values, including staff changes
|
|
534
|
+
in Nexus. Apply the `gaming_permissions` database migration before deploying Hub.
|
|
535
|
+
|
|
536
|
+
`onsite.members.create` also accepts `gamingPermissions` in its payload, and
|
|
537
|
+
`onsite.members.ensureActive` accepts it under `member`. Creation requires
|
|
538
|
+
`odysseyGamingPermissionsCreateV1`; update-only agents are rejected before creation.
|
|
539
|
+
The agent saves the created Nexus member in its encrypted checkpoint before
|
|
540
|
+
applying permissions, then reads Nexus to verify them. A failed or inconclusive
|
|
541
|
+
permission update keeps the command incomplete and retryable; redelivery resumes
|
|
542
|
+
against the saved member instead of creating another. A lost PUT response is
|
|
543
|
+
reconciled with a read, and already-matching permissions are not written again.
|
|
544
|
+
Do not treat an unsettled/timed-out response as completed registration; follow the
|
|
545
|
+
existing command to completion. The workflow records `gaming_permissions_pending_retry`
|
|
546
|
+
when permission verification is incomplete.
|
|
547
|
+
|
|
548
|
+
Omitting the object leaves creation behaviour unchanged. Existing active matches
|
|
549
|
+
retain Ensure Active Membership's existing no-mutation behaviour; use
|
|
550
|
+
`onsite.members.update` to change those members. Renewal-required matches apply
|
|
551
|
+
requested permissions as part of profile preparation before renewal. Demo creation
|
|
552
|
+
supports the same object. Nexus creation and the permission update remain separate
|
|
553
|
+
calls, not an atomic operation.
|