@registrystack/client 0.28.0 → 0.30.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/breg/client.js CHANGED
@@ -12,7 +12,7 @@ class BaseRegistryClientError extends Error {
12
12
  super(envelope.message);
13
13
  this.name = 'BaseRegistryClientError';
14
14
  this.kind = envelope.kind;
15
- for (const field of ['code', 'planRefusal', 'status', 'traceId', 'transportKind', 'tokenKind']) {
15
+ for (const field of ['code', 'planRefusal', 'refusalCode', 'status', 'traceId', 'transportKind', 'tokenKind']) {
16
16
  if (envelope[field] !== undefined && envelope[field] !== null) this[field] = envelope[field];
17
17
  }
18
18
  }
@@ -65,7 +65,8 @@ function cloneJson(value, budget, depth, kind) {
65
65
  return value;
66
66
  }
67
67
  if (typeof value === 'number') {
68
- if (!Number.isFinite(value)) throw inputError(kind);
68
+ if (!Number.isFinite(value)
69
+ || (Number.isInteger(value) && !Number.isSafeInteger(value))) throw inputError(kind);
69
70
  return value;
70
71
  }
71
72
  if (value === undefined || typeof value !== 'object' || isProxy(value)) throw inputError(kind);
@@ -138,13 +139,95 @@ function wrapAsync(name, jsonIndexes = [], requiredIndexes = []) {
138
139
 
139
140
  for (const [method, jsonIndexes, requiredIndexes] of [
140
141
  ['health'], ['ready'], ['openapi'], ['registryMetadata'], ['registryContract'], ['entitySchema'],
142
+ ['recordRevisions'], ['getRecordRevision', [3]],
141
143
  ['getRecord', [2]], ['listRecords', [1]], ['continueList', [0], [0]],
144
+ ['getGeoJsonRecord', [2]], ['listGeoJsonRecords', [1]], ['continueGeoJsonList', [0], [0]],
145
+ ['listCurrentRecords', [1]], ['continueCurrentList', [0], [0]],
146
+ ['listRecordsAsOf', [1], [1]], ['continueAsOfList', [0], [0]],
147
+ ['listSnapshotRecords', [1]], ['continueSnapshotList', [0], [0]],
148
+ ['listRelationshipRecords', [3]], ['continueRelationshipList', [0], [0]],
142
149
  ['lookupRecord', [2, 3]], ['createRecord', [1], [1]],
143
- ['patchRecord', [3], [3]], ['executeLifecycleAction'],
150
+ ['actionTargetConditions', [1], [1]], ['invokeAction', [1], [1]],
151
+ ['executeRecoveredCreate'],
152
+ ['patchRecord', [3], [3]], ['batchRecords', [1], [1]], ['tombstoneRecord'],
153
+ ['executeLifecycleAction'],
154
+ ['executeRecoveredLifecycleAction'],
155
+ ['uploadAttachment'], ['downloadAttachment'], ['deleteAttachment'],
144
156
  ['getRecordJson', [2]], ['listRecordsJson', [1]], ['continueListJson', [0], [0]],
157
+ ['getGeoJsonRecordJson', [2]], ['listGeoJsonRecordsJson', [1]],
158
+ ['continueGeoJsonListJson', [0], [0]],
159
+ ['listCurrentRecordsJson', [1]], ['continueCurrentListJson', [0], [0]],
160
+ ['listRecordsAsOfJson', [1], [1]], ['continueAsOfListJson', [0], [0]],
161
+ ['listSnapshotRecordsJson', [1]], ['continueSnapshotListJson', [0], [0]],
162
+ ['listRelationshipRecordsJson', [3]], ['continueRelationshipListJson', [0], [0]],
145
163
  ['lookupRecordJson', [3]], ['createRecordJson'], ['patchRecordJson'], ['executeLifecycleActionJson'],
164
+ ['actionTargetConditionsJson'], ['invokeActionJson'], ['batchRecordsJson'], ['tombstoneRecordJson'],
165
+ ['executeRecoveredCreateJson'], ['executeRecoveredLifecycleActionJson'],
166
+ ['uploadAttachmentJson'], ['deleteAttachmentJson'],
146
167
  ]) wrapAsync(method, jsonIndexes, requiredIndexes);
147
168
 
169
+ for (const [method, jsonIndexes, requiredIndexes] of [
170
+ ['prepareCreate', [1], [1]], ['prepareCreateJson'], ['recoverCreate'],
171
+ ['prepareLifecycleAction', [1], [1]], ['prepareLifecycleActionJson'],
172
+ ['recoverLifecycleAction'],
173
+ ]) {
174
+ const original = native.BaseRegistryClient.prototype[method];
175
+ native.BaseRegistryClient.prototype[method] = function (...args) {
176
+ try {
177
+ return original.apply(this, sanitizeArguments(
178
+ args, new Set(jsonIndexes), new Set(requiredIndexes),
179
+ ));
180
+ } catch (error) {
181
+ throw normalize(error, 'invalid_request');
182
+ }
183
+ };
184
+ }
185
+
186
+ function preparedClass(Class, label) {
187
+ Object.defineProperty(Class.prototype, Symbol.for('nodejs.util.inspect.custom'), {
188
+ value() { return `${label}(<redacted>)`; },
189
+ });
190
+ Object.defineProperty(Class.prototype, 'toString', {
191
+ value() { return `${label}(<redacted>)`; },
192
+ });
193
+ const Facade = function () {
194
+ throw new TypeError(`${label} has no public constructor`);
195
+ };
196
+ Object.defineProperties(Facade, {
197
+ name: { value: label },
198
+ fromBytes: {
199
+ value(bytes) {
200
+ try {
201
+ if (!Buffer.isBuffer(bytes)) throw inputError('invalid_request');
202
+ return Class.fromBytes(bytes);
203
+ } catch (error) {
204
+ throw normalize(error, 'invalid_request');
205
+ }
206
+ },
207
+ },
208
+ [Symbol.hasInstance]: {
209
+ value(value) { return value instanceof Class; },
210
+ },
211
+ });
212
+ Facade.prototype = Class.prototype;
213
+ return Facade;
214
+ }
215
+
216
+ const BRegPreparedCreate = preparedClass(native.BRegPreparedCreate, 'BRegPreparedCreate');
217
+ const BRegPreparedLifecycle = preparedClass(
218
+ native.BRegPreparedLifecycle, 'BRegPreparedLifecycle',
219
+ );
220
+
221
+ const withReason = native.BRegLifecycleAction.prototype.withReason;
222
+ native.BRegLifecycleAction.prototype.withReason = function (reason) {
223
+ try {
224
+ if (typeof reason !== 'string' || !reason.isWellFormed()) throw inputError('invalid_request');
225
+ return withReason.call(this, reason);
226
+ } catch (error) {
227
+ throw normalize(error, 'invalid_request');
228
+ }
229
+ };
230
+
148
231
  const lifecycleActionsJson = native.BaseRegistryClient.prototype.lifecycleActionsJson;
149
232
  native.BaseRegistryClient.prototype.lifecycleActionsJson = function (...args) {
150
233
  try { return lifecycleActionsJson.apply(this, args); }
@@ -161,7 +244,30 @@ native.BaseRegistryClient.prototype.lifecycleActions = function (...args) {
161
244
  }
162
245
  };
163
246
 
164
- for (const name of ['selectCreate', 'selectPatch', 'selectLifecycle']) {
247
+ const valueIn = native.BRegAttachmentSlot.prototype.valueIn;
248
+ native.BRegAttachmentSlot.prototype.valueIn = function (...args) {
249
+ try {
250
+ return valueIn.apply(this, sanitizeArguments(args, new Set([0]), new Set([0])));
251
+ } catch (error) {
252
+ throw normalize(error, 'invalid_request');
253
+ }
254
+ };
255
+
256
+ for (const name of ['prepareUpload', 'acceptsContentType']) {
257
+ const original = native.BRegAttachmentSlot.prototype[name];
258
+ native.BRegAttachmentSlot.prototype[name] = function (...args) {
259
+ try {
260
+ return original.apply(this, args);
261
+ } catch (error) {
262
+ throw normalize(error, 'invalid_request');
263
+ }
264
+ };
265
+ }
266
+
267
+ for (const name of [
268
+ 'selectCreate', 'selectPatch', 'selectLifecycle', 'selectAttachments',
269
+ 'selectImmediateAction', 'selectTombstone', 'selectBatch', 'changeRequestCapability',
270
+ ]) {
165
271
  const original = native.BRegMetadata.prototype[name];
166
272
  native.BRegMetadata.prototype[name] = function (...args) {
167
273
  try {
@@ -190,4 +296,14 @@ module.exports = {
190
296
  BRegPatchBinding: native.BRegPatchBinding,
191
297
  BRegLifecycleAuthority: native.BRegLifecycleAuthority,
192
298
  BRegLifecycleAction: native.BRegLifecycleAction,
299
+ BRegAttachmentSlot: native.BRegAttachmentSlot,
300
+ BRegAttachmentUpload: native.BRegAttachmentUpload,
301
+ BRegImmediateActionBinding: native.BRegImmediateActionBinding,
302
+ BRegActionTargetConditions: native.BRegActionTargetConditions,
303
+ BRegTombstoneBinding: native.BRegTombstoneBinding,
304
+ BRegBatchBinding: native.BRegBatchBinding,
305
+ BRegPreparedCreate,
306
+ BRegPreparedLifecycle,
307
+ BRegRecoveredCreate: native.BRegRecoveredCreate,
308
+ BRegRecoveredLifecycle: native.BRegRecoveredLifecycle,
193
309
  };
package/breg/index.d.ts CHANGED
@@ -8,30 +8,151 @@ export declare class BaseRegistryClient {
8
8
  registryMetadata(accessProfile?: string | undefined | null): Promise<RawOutcome>
9
9
  registryContract(accessProfile?: string | undefined | null): Promise<BRegMetadata>
10
10
  entitySchema(entityIdentifier: string, accessProfile?: string | undefined | null): Promise<RawOutcome>
11
+ /** Retrieve one bounded first page of record revisions as inert JSON. */
12
+ recordRevisions(entityRoute: string, recordIdentifier: string, accessProfile?: string | undefined | null): Promise<RawOutcome>
13
+ /** Retrieve one exact retained revision as validated inert record JSON. */
14
+ getRecordRevision(entityRoute: string, recordIdentifier: string, revision: number, options?: any | undefined | null): Promise<RawOutcome>
11
15
  getRecord(entityRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<CompleteOutcome>
12
16
  listRecords(entityRoute: string, options?: any | undefined | null): Promise<PageOutcome>
13
17
  continueList(value: any): Promise<PageOutcome>
18
+ getGeoJsonRecord(entityRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<CompleteOutcome>
19
+ listGeoJsonRecords(entityRoute: string, options?: any | undefined | null): Promise<PageOutcome>
20
+ continueGeoJsonList(value: any): Promise<PageOutcome>
21
+ listCurrentRecords(entityRoute: string, options?: any | undefined | null): Promise<PageOutcome>
22
+ continueCurrentList(value: any): Promise<PageOutcome>
23
+ listRecordsAsOf(entityRoute: string, options?: any | undefined | null): Promise<PageOutcome>
24
+ continueAsOfList(value: any): Promise<PageOutcome>
25
+ listSnapshotRecords(entityRoute: string, options?: any | undefined | null): Promise<PageOutcome>
26
+ continueSnapshotList(value: any): Promise<PageOutcome>
27
+ listRelationshipRecords(entityRoute: string, recordIdentifier: string, pathRoute: string, options?: any | undefined | null): Promise<PageOutcome>
28
+ continueRelationshipList(value: any): Promise<PageOutcome>
14
29
  lookupRecord(entityRoute: string, selector: string, values?: any | undefined | null, options?: any | undefined | null): Promise<CompleteOutcome>
30
+ /** Fetch opaque target conditions for one metadata-selected action. */
31
+ actionTargetConditions(binding: BRegImmediateActionBinding, inputs: any): Promise<BRegActionTargetConditions>
32
+ /** Invoke one metadata-selected immediate action without automatic retry. */
33
+ invokeAction(binding: BRegImmediateActionBinding, inputs: any, idempotencyKey: string, conditions?: BRegActionTargetConditions | undefined | null): Promise<CompleteOutcome>
15
34
  createRecord(binding: BRegCreateBinding, data: any, idempotencyKey: string, formatValue?: string | undefined | null): Promise<CompleteOutcome>
35
+ /** Prepare inert Create evidence before any token acquisition or I/O. */
36
+ prepareCreate(binding: BRegCreateBinding, data: any, idempotencyKey: string, formatValue?: string | undefined | null): BRegPreparedCreate
37
+ /** Revalidate saved Create evidence against freshly selected authority. */
38
+ recoverCreate(binding: BRegCreateBinding, prepared: BRegPreparedCreate): BRegRecoveredCreate
39
+ /** Explicitly send a recovered Create request with fresh authority. */
40
+ executeRecoveredCreate(binding: BRegCreateBinding, recovered: BRegRecoveredCreate): Promise<CompleteOutcome>
16
41
  patchRecord(binding: BRegPatchBinding, recordIdentifier: string, etag: string, operations: any, idempotencyKey: string, formatValue?: string | undefined | null): Promise<CompleteOutcome>
42
+ /** Execute one metadata-selected atomic batch without automatic retry. */
43
+ batchRecords(binding: BRegBatchBinding, request: any, idempotencyKey: string): Promise<CompleteOutcome>
44
+ /** Tombstone one record against its current strong ETag. */
45
+ tombstoneRecord(binding: BRegTombstoneBinding, recordIdentifier: string, etag: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<CompleteOutcome>
46
+ /**
47
+ * Replace one governed attachment slot with exact bytes. The prepared
48
+ * upload already satisfies the slot's served size and content-type policy.
49
+ */
50
+ uploadAttachment(slot: BRegAttachmentSlot, recordIdentifier: string, etag: string, upload: BRegAttachmentUpload, idempotencyKey: string, formatValue?: string | undefined | null): Promise<CompleteOutcome>
51
+ /** Read the exact bytes one governed slot holds for one proposal version. */
52
+ downloadAttachment(slot: BRegAttachmentSlot, recordIdentifier: string, proposalVersion: number): Promise<RawOutcome>
53
+ /** Empty one governed attachment slot. */
54
+ deleteAttachment(slot: BRegAttachmentSlot, recordIdentifier: string, etag: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<CompleteOutcome>
17
55
  lifecycleActions(authority: BRegLifecycleAuthority, record: any, formatValue?: string | undefined | null): Array<BRegLifecycleAction>
18
56
  executeLifecycleAction(action: BRegLifecycleAction, idempotencyKey: string): Promise<CompleteOutcome>
57
+ /** Prepare inert lifecycle evidence before any token acquisition or I/O. */
58
+ prepareLifecycleAction(authority: BRegLifecycleAuthority, record: any, action: BRegLifecycleAction, idempotencyKey: string, formatValue?: string | undefined | null): BRegPreparedLifecycle
59
+ /** Revalidate saved lifecycle evidence against freshly selected authority. */
60
+ recoverLifecycleAction(authority: BRegLifecycleAuthority, prepared: BRegPreparedLifecycle): BRegRecoveredLifecycle
61
+ /** Explicitly send a recovered lifecycle action. */
62
+ executeRecoveredLifecycleAction(recovered: BRegRecoveredLifecycle): Promise<CompleteOutcome>
19
63
  getRecordJson(entityRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<JsonOutcome>
20
64
  listRecordsJson(entityRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
21
65
  continueListJson(value: any): Promise<JsonOutcome>
66
+ getGeoJsonRecordJson(entityRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<JsonOutcome>
67
+ listGeoJsonRecordsJson(entityRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
68
+ continueGeoJsonListJson(value: any): Promise<JsonOutcome>
69
+ listCurrentRecordsJson(entityRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
70
+ continueCurrentListJson(value: any): Promise<JsonOutcome>
71
+ listRecordsAsOfJson(entityRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
72
+ continueAsOfListJson(value: any): Promise<JsonOutcome>
73
+ listSnapshotRecordsJson(entityRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
74
+ continueSnapshotListJson(value: any): Promise<JsonOutcome>
75
+ listRelationshipRecordsJson(entityRoute: string, recordIdentifier: string, pathRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
76
+ continueRelationshipListJson(value: any): Promise<JsonOutcome>
22
77
  lookupRecordJson(entityRoute: string, selector: string, valuesJson?: string | undefined | null, options?: any | undefined | null): Promise<JsonOutcome>
78
+ /** Fetch opaque target conditions from exact action-input JSON. */
79
+ actionTargetConditionsJson(binding: BRegImmediateActionBinding, inputsJson: string): Promise<BRegActionTargetConditions>
80
+ /** Invoke an action from exact JSON and preserve exact receipt values. */
81
+ invokeActionJson(binding: BRegImmediateActionBinding, inputsJson: string, idempotencyKey: string, conditions?: BRegActionTargetConditions | undefined | null): Promise<JsonOutcome>
23
82
  createRecordJson(binding: BRegCreateBinding, dataJson: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<JsonOutcome>
83
+ /** Prepare inert Create evidence from exact JSON text. */
84
+ prepareCreateJson(binding: BRegCreateBinding, dataJson: string, idempotencyKey: string, formatValue?: string | undefined | null): BRegPreparedCreate
85
+ /** Explicitly send a recovered Create request and preserve exact values. */
86
+ executeRecoveredCreateJson(binding: BRegCreateBinding, recovered: BRegRecoveredCreate): Promise<JsonOutcome>
24
87
  patchRecordJson(binding: BRegPatchBinding, recordIdentifier: string, etag: string, operationsJson: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<JsonOutcome>
88
+ /** Execute one metadata-selected atomic batch from exact JSON. */
89
+ batchRecordsJson(binding: BRegBatchBinding, requestJson: string, idempotencyKey: string): Promise<JsonOutcome>
90
+ /** Tombstone one record and preserve exact response values. */
91
+ tombstoneRecordJson(binding: BRegTombstoneBinding, recordIdentifier: string, etag: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<JsonOutcome>
92
+ uploadAttachmentJson(slot: BRegAttachmentSlot, recordIdentifier: string, etag: string, upload: BRegAttachmentUpload, idempotencyKey: string, formatValue?: string | undefined | null): Promise<JsonOutcome>
93
+ deleteAttachmentJson(slot: BRegAttachmentSlot, recordIdentifier: string, etag: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<JsonOutcome>
25
94
  lifecycleActionsJson(authority: BRegLifecycleAuthority, recordJson: string, formatValue?: string | undefined | null): Array<BRegLifecycleAction>
95
+ /** Prepare inert lifecycle evidence from an exact Registry Record response. */
96
+ prepareLifecycleActionJson(authority: BRegLifecycleAuthority, recordJson: string, action: BRegLifecycleAction, idempotencyKey: string, formatValue?: string | undefined | null): BRegPreparedLifecycle
26
97
  executeLifecycleActionJson(action: BRegLifecycleAction, idempotencyKey: string): Promise<JsonOutcome>
98
+ /** Explicitly send a recovered lifecycle action and preserve exact values. */
99
+ executeRecoveredLifecycleActionJson(recovered: BRegRecoveredLifecycle): Promise<JsonOutcome>
27
100
  }
28
101
 
102
+ /** Opaque server-validated target conditions for one immediate action. */
103
+ export declare class BRegActionTargetConditions {
104
+ get preconditionKeys(): Array<string>
105
+ get valueJson(): string
106
+ get traceId(): string
107
+ }
108
+ export type ActionTargetConditions = BRegActionTargetConditions
109
+
110
+ /** Opaque governed attachment slot selected from metadata fetched by this client source. */
111
+ export declare class BRegAttachmentSlot {
112
+ get slotIdentifier(): string
113
+ get entityIdentifier(): string
114
+ get accessProfile(): string
115
+ get requiredForSubmit(): boolean
116
+ /** Largest body the served slot policy accepts, in bytes. */
117
+ get maximumBytes(): number
118
+ get contentTypes(): Array<string>
119
+ /** Authored sensitivity of this slot's content. */
120
+ get classification(): string
121
+ get canDownload(): boolean
122
+ get canUpload(): boolean
123
+ get canRemove(): boolean
124
+ acceptsContentType(contentType: string): boolean
125
+ /** Bind exact bytes to this slot. Refusals happen here, before any request. */
126
+ prepareUpload(contentType: string, body: Buffer): BRegAttachmentUpload
127
+ /** Read this slot's engine-owned state out of one Registry Record envelope. */
128
+ valueIn(record: any, formatValue?: string | undefined | null): any
129
+ }
130
+ export type AttachmentSlot = BRegAttachmentSlot
131
+
132
+ /** Opaque bytes already accepted by one slot's served upload policy. */
133
+ export declare class BRegAttachmentUpload {
134
+ get contentType(): string
135
+ get byteSize(): number
136
+ }
137
+ export type AttachmentUpload = BRegAttachmentUpload
138
+
139
+ export declare class BRegBatchBinding {
140
+
141
+ }
142
+ export type BatchBinding = BRegBatchBinding
143
+
29
144
  export declare class BRegCreateBinding {
30
145
 
31
146
  }
32
147
  export type CreateBinding = BRegCreateBinding
33
148
 
149
+ export declare class BRegImmediateActionBinding {
150
+
151
+ }
152
+ export type ImmediateActionBinding = BRegImmediateActionBinding
153
+
34
154
  export declare class BRegLifecycleAction {
155
+ withReason(reason: string): BRegLifecycleAction
35
156
  get bodyJson(): string
36
157
  get reviewJson(): string | null
37
158
  get operation(): string
@@ -50,6 +171,12 @@ export type LifecycleAuthority = BRegLifecycleAuthority
50
171
  export declare class BRegMetadata {
51
172
  /** Caller-filtered inert descriptors. Selectors below remain the only authority constructors. */
52
173
  get operations(): any
174
+ /** Complete typed caller-filtered immediate-action descriptors. */
175
+ get immediateActions(): any
176
+ /** Original caller-filtered action metadata as exact JSON text. */
177
+ get actionsJson(): string | null
178
+ /** Descriptive change-request capability for one entity, when advertised. */
179
+ changeRequestCapability(entityIdentifier: string): any | null
53
180
  get registryIdentifier(): string
54
181
  get registryVersion(): string
55
182
  get registryRevision(): string
@@ -58,6 +185,10 @@ export declare class BRegMetadata {
58
185
  selectCreate(operationIdentifier: string, expectedProfile: string): BRegCreateBinding
59
186
  selectPatch(operationIdentifier: string, expectedProfile: string): BRegPatchBinding
60
187
  selectLifecycle(entityIdentifier: string, expectedProfile: string): BRegLifecycleAuthority
188
+ selectAttachments(entityIdentifier: string, expectedProfile: string): Array<BRegAttachmentSlot>
189
+ selectImmediateAction(actionIdentifier: string, expectedProfile: string): BRegImmediateActionBinding
190
+ selectTombstone(entityIdentifier: string, expectedProfile: string): BRegTombstoneBinding
191
+ selectBatch(entityIdentifier: string, expectedProfile: string): BRegBatchBinding
61
192
  }
62
193
  export type Metadata = BRegMetadata
63
194
 
@@ -66,6 +197,53 @@ export declare class BRegPatchBinding {
66
197
  }
67
198
  export type PatchBinding = BRegPatchBinding
68
199
 
200
+ /**
201
+ * Inert original Create request evidence. The bytes carry values and an
202
+ * idempotency key, but no token or executable metadata authority.
203
+ */
204
+ export declare class BRegPreparedCreate {
205
+ /** Restore bounded inert evidence previously returned by `toBytes`. */
206
+ static fromBytes(bytes: Buffer): BRegPreparedCreate
207
+ /** Copy the exact evidence bytes for owner-protected persistence. */
208
+ toBytes(): Buffer
209
+ }
210
+ export type PreparedCreate = BRegPreparedCreate
211
+
212
+ /**
213
+ * Inert original lifecycle request evidence. The bytes carry record values
214
+ * and an idempotency key, but no token or executable metadata authority.
215
+ */
216
+ export declare class BRegPreparedLifecycle {
217
+ /** Restore bounded inert evidence previously returned by `toBytes`. */
218
+ static fromBytes(bytes: Buffer): BRegPreparedLifecycle
219
+ /** Copy the exact evidence bytes for owner-protected persistence. */
220
+ toBytes(): Buffer
221
+ }
222
+ export type PreparedLifecycle = BRegPreparedLifecycle
223
+
224
+ /**
225
+ * A recovered Create request, key, and representation. This remains inert
226
+ * until `executeRecoveredCreate` is explicitly called with fresh authority.
227
+ */
228
+ export declare class BRegRecoveredCreate {
229
+
230
+ }
231
+ export type RecoveredCreate = BRegRecoveredCreate
232
+
233
+ /**
234
+ * A recovered lifecycle action and key. This remains inert until
235
+ * `executeRecoveredLifecycleAction` is explicitly called.
236
+ */
237
+ export declare class BRegRecoveredLifecycle {
238
+
239
+ }
240
+ export type RecoveredLifecycle = BRegRecoveredLifecycle
241
+
242
+ export declare class BRegTombstoneBinding {
243
+
244
+ }
245
+ export type TombstoneBinding = BRegTombstoneBinding
246
+
69
247
  export interface CompleteOutcome {
70
248
  kind: string
71
249
  value: any
@@ -82,6 +260,8 @@ export interface JsonOutcome {
82
260
  traceId: string
83
261
  etag?: string
84
262
  location?: string
263
+ snapshot?: string
264
+ validAt?: string
85
265
  }
86
266
 
87
267
  export interface PageOutcome {
@@ -90,6 +270,8 @@ export interface PageOutcome {
90
270
  continuation?: any
91
271
  traceId: string
92
272
  etag?: string
273
+ snapshot?: string
274
+ validAt?: string
93
275
  }
94
276
 
95
277
  export interface RawOutcome {