@registrystack/client 0.40.0 → 0.41.0

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 CHANGED
@@ -9,7 +9,7 @@ Engine, Casework, Messaging, and Scheduling client APIs in Registry Stack.
9
9
  npm install "@registrystack/client@<version>"
10
10
  ```
11
11
 
12
- Requires Node.js 22.12 or newer. Supported targets are macOS arm64, Linux
12
+ Requires Node.js 24.11 or newer. Supported targets are macOS arm64, Linux
13
13
  arm64 with glibc, and Linux x64 with glibc; installing the package pulls in
14
14
  one platform-specific optional dependency containing all six native
15
15
  bindings.
@@ -37,15 +37,21 @@ export interface TaskPermission { collection: string; operations: ReadonlyArray<
37
37
  export interface SchedulingTaskPermission { service: string; location: string; actions: ReadonlyArray<string> }
38
38
  export interface EvidenceRequesterContext { requesterTags: ReadonlyArray<string>; audience: string }
39
39
  export interface TaskApprovalRequest { templateId: string; templateVersion: string }
40
+ /** Deferred authority keeps its approved deadline; execution credentials stay short-lived. */
41
+ export type TaskAuthorizationMode = 'immediate' | 'deferred'
40
42
  export interface TaskTemplatePreview {
41
43
  id: string; version: string; label: string; agent: IssuerPrincipal; client: string; resource: string; scopes: ReadonlyArray<string>; purpose: string
42
44
  evidenceContext?: EvidenceRequesterContext; bounds: TaskGrantBounds; subjects: { readonly [key: string]: Exclude<JsonScalar, null> }; lifetimeSeconds: SafeInteger
45
+ /** Omitted for the existing immediate mode. */
46
+ authorizationMode?: TaskAuthorizationMode
43
47
  }
44
48
  export interface TaskTemplatePreviews { itemRevision: SafeInteger; templates: ReadonlyArray<TaskTemplatePreview> }
45
49
  /** Grant metadata deliberately excludes stored subject values. */
46
50
  export interface TaskGrantView {
47
51
  id: string; templateId: string; templateVersion: string; agent: IssuerPrincipal; client: string; resource: string; scopes: ReadonlyArray<string>; purpose: string
48
52
  evidenceContext?: EvidenceRequesterContext; bounds: TaskGrantBounds; expiresAt: SafeInteger; invalidated: boolean
53
+ /** Omitted for the existing immediate mode. */
54
+ authorizationMode?: TaskAuthorizationMode
49
55
  }
50
56
  export interface TaskGrantList { grants: ReadonlyArray<TaskGrantView> }
51
57
  export interface TaskGrantRevocation { id: string; invalidated: boolean }
@@ -109,6 +109,7 @@ export type MessagingProblemCode =
109
109
  | 'profile.not-authorized'
110
110
  | 'quota.exceeded'
111
111
  | 'rate-limit.exceeded'
112
+ | 'receipt.unresolved'
112
113
  | 'request.body-too-large'
113
114
  | 'request.invalid'
114
115
  | 'request.method-not-allowed'
@@ -156,6 +157,8 @@ export class MessagingClient {
156
157
  health(): Promise<MessagingOutcome<null>>
157
158
  ready(): Promise<MessagingOutcome<null>>
158
159
  submit(token: string, idempotencyKey: string, request: SubmitMessageRequest): Promise<MessagingOutcome<MessageReceipt>>
160
+ /** Observe the original success using the same body/key and current token; never resend or mutate. */
161
+ messageReceipt(token: string, idempotencyKey: string, request: SubmitMessageRequest): Promise<MessagingOutcome<MessageReceipt>>
159
162
  message(token: string, messageId: MessageId): Promise<MessagingOutcome<MessageView>>
160
163
  cancel(token: string, messageId: MessageId): Promise<MessagingOutcome<MessageView>>
161
164
  preview(token: string, templateId: string, version: string, request: TemplatePreviewRequest): Promise<MessagingOutcome<TemplatePreview>>
@@ -113,6 +113,7 @@ for (const [method, jsonIndexes] of [
113
113
  ['health', []],
114
114
  ['ready', []],
115
115
  ['submit', [2]],
116
+ ['messageReceipt', [2]],
116
117
  ['message', []],
117
118
  ['cancel', []],
118
119
  ['preview', [3]],
@@ -6,6 +6,7 @@ export declare class MessagingClient {
6
6
  health(): Promise<MessagingOutcome>
7
7
  ready(): Promise<MessagingOutcome>
8
8
  submit(token: string, idempotencyKey: string, request: any): Promise<MessagingOutcome>
9
+ messageReceipt(token: string, idempotencyKey: string, request: any): Promise<MessagingOutcome>
9
10
  message(token: string, messageId: string): Promise<MessagingOutcome>
10
11
  cancel(token: string, messageId: string): Promise<MessagingOutcome>
11
12
  preview(token: string, templateId: string, version: string, request: any): Promise<MessagingOutcome>
package/native.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const PACKAGE_VERSION = '0.40.0';
3
+ const PACKAGE_VERSION = '0.41.0';
4
4
  const PRODUCTS = new Set(['discovery', 'evidence', 'breg', 'casework', 'messaging', 'scheduling']);
5
5
 
6
6
  function target() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@registrystack/client",
3
- "version": "0.40.0",
3
+ "version": "0.41.0",
4
4
  "description": "Unified Node.js client for Registry Stack products.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://docs.registrystack.org/reference/client-api/",
@@ -46,7 +46,7 @@
46
46
  "scheduling"
47
47
  ],
48
48
  "engines": {
49
- "node": ">=22.12.0"
49
+ "node": ">=24.11.0"
50
50
  },
51
51
  "scripts": {
52
52
  "sync": "python3 ../../release/scripts/sync-registry-client-node.py",
@@ -55,12 +55,12 @@
55
55
  "check:types": "tsc --noEmit --strict --skipLibCheck false --types node --moduleResolution node16 --module node16 --target es2022 index.d.ts __test__/facade.test-d.ts"
56
56
  },
57
57
  "devDependencies": {
58
- "@types/node": "22.20.5",
58
+ "@types/node": "24.19.1",
59
59
  "typescript": "6.0.3"
60
60
  },
61
61
  "optionalDependencies": {
62
- "@registrystack/client-darwin-arm64": "0.40.0",
63
- "@registrystack/client-linux-arm64-gnu": "0.40.0",
64
- "@registrystack/client-linux-x64-gnu": "0.40.0"
62
+ "@registrystack/client-darwin-arm64": "0.41.0",
63
+ "@registrystack/client-linux-arm64-gnu": "0.41.0",
64
+ "@registrystack/client-linux-x64-gnu": "0.41.0"
65
65
  }
66
66
  }
@@ -170,6 +170,7 @@ export type SchedulingProblemCode =
170
170
  | 'precondition.required'
171
171
  | 'prerequisite.missing'
172
172
  | 'profile.not-authorized'
173
+ | 'receipt.unresolved'
173
174
  | 'request.body-too-large'
174
175
  | 'request.invalid'
175
176
  | 'request.method-not-allowed'
@@ -216,6 +217,8 @@ export class SchedulingClient {
216
217
  createHold(token: string, idempotencyKey: string, request: AdmissionRequest): Promise<SchedulingOutcome<HoldDocument>>
217
218
  releaseHold(token: string, holdId: string): Promise<SchedulingOutcome<null>>
218
219
  createAppointment(token: string, idempotencyKey: string, request: CreateAppointmentRequest): Promise<SchedulingOutcome<AppointmentDocument>>
220
+ /** Observe the original success using the same body/key and current token; never resend or mutate. */
221
+ appointmentReceipt(token: string, idempotencyKey: string, request: CreateAppointmentRequest): Promise<SchedulingOutcome<AppointmentDocument>>
219
222
  getAppointment(token: string, appointmentId: string): Promise<SchedulingOutcome<AppointmentDocument>>
220
223
  listAppointments(token: string, reference: ExternalReference, page?: PageQuery | null): Promise<SchedulingOutcome<PageDocument<AppointmentDocument>>>
221
224
  rescheduleAppointment(token: string, appointmentId: string, idempotencyKey: string, request: RescheduleAppointmentRequest): Promise<SchedulingOutcome<AppointmentDocument>>
@@ -118,6 +118,7 @@ for (const [method, jsonIndexes] of [
118
118
  ['createHold', [2]],
119
119
  ['releaseHold', []],
120
120
  ['createAppointment', [2]],
121
+ ['appointmentReceipt', [2]],
121
122
  ['getAppointment', []],
122
123
  ['listAppointments', [1, 2]],
123
124
  ['rescheduleAppointment', [3]],
@@ -11,6 +11,7 @@ export declare class SchedulingClient {
11
11
  createHold(token: string, idempotencyKey: string, request: any): Promise<SchedulingOutcome>
12
12
  releaseHold(token: string, holdId: string): Promise<SchedulingOutcome>
13
13
  createAppointment(token: string, idempotencyKey: string, request: any): Promise<SchedulingOutcome>
14
+ appointmentReceipt(token: string, idempotencyKey: string, request: any): Promise<SchedulingOutcome>
14
15
  getAppointment(token: string, appointmentId: string): Promise<SchedulingOutcome>
15
16
  listAppointments(token: string, reference: any, page?: any | undefined | null): Promise<SchedulingOutcome>
16
17
  rescheduleAppointment(token: string, appointmentId: string, idempotencyKey: string, request: any): Promise<SchedulingOutcome>