@registrystack/client 0.41.0 → 0.42.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
@@ -13,16 +13,18 @@ class BaseRegistryClientError extends Error {
13
13
  this.name = 'BaseRegistryClientError';
14
14
  this.kind = envelope.kind;
15
15
  this.outcomeUnknown = envelope.outcomeUnknown === true;
16
- for (const field of ['code', 'planRefusal', 'refusalCode', 'reasonCode', 'status', 'traceId', 'transportKind', 'tokenKind']) {
16
+ for (const field of ['code', 'refusalCode', 'reasonCode', 'status', 'traceId', 'transportKind', 'tokenKind']) {
17
17
  if (envelope[field] !== undefined && envelope[field] !== null) this[field] = envelope[field];
18
18
  }
19
- if (envelope.fieldPath !== undefined && envelope.fieldPath !== null) {
20
- Object.defineProperty(this, 'fieldPath', {
21
- value: envelope.fieldPath,
22
- configurable: true,
23
- enumerable: false,
24
- writable: true,
25
- });
19
+ for (const field of ['fieldPath', 'constraint']) {
20
+ if (envelope[field] !== undefined && envelope[field] !== null) {
21
+ Object.defineProperty(this, field, {
22
+ value: envelope[field],
23
+ configurable: true,
24
+ enumerable: false,
25
+ writable: true,
26
+ });
27
+ }
26
28
  }
27
29
  }
28
30
  }
@@ -217,12 +219,15 @@ for (const [method, jsonIndexes, requiredIndexes] of [
217
219
  ['listSnapshotRecords', [1]], ['continueSnapshotList', [0], [0]],
218
220
  ['listRelationshipRecords', [3]], ['continueRelationshipList', [0], [0]],
219
221
  ['lookupRecord', [2, 3]], ['createRecord', [1], [1]],
220
- ['actionTargetConditions', [1], [1]], ['invokeAction', [1], [1]],
221
- ['executeRecoveredAction'], ['executeRecoveredCreate'],
222
+ ['actionTargetConditions', [1], [1]], ['actionAvailability', [2], [2]],
223
+ ['invokeAction', [1], [1]],
224
+ ['executeRecoveredAction'], ['executeRecoveredProposalStart'], ['executeRecoveredCreate'],
222
225
  ['patchRecord', [3], [3]], ['batchRecords', [1], [1]], ['tombstoneRecord'],
223
- ['executeLifecycleAction'],
224
- ['executeRecoveredLifecycleAction'],
225
- ['uploadAttachment'], ['downloadAttachment'], ['deleteAttachment'],
226
+ ['startProposal'], ['readProposal'], ['readProposalSubmission'], ['getProposal'], ['listProposals'], ['executeProposal'],
227
+ ['downloadProposalAttachment'], ['uploadProposalAttachment'], ['deleteProposalAttachment'],
228
+ ['readProposalReviewStatus'], ['readProposalReviewContext'],
229
+ ['readProposalReviewContextBatch', [1], [1]],
230
+ ['readProposalReviewById'], ['downloadProposalReviewDocument', [1], [1]],
226
231
  ['getRecordJson', [2]], ['listRecordsJson', [1]], ['continueListJson', [0], [0]],
227
232
  ['getGeoJsonRecordJson', [2]], ['listGeoJsonRecordsJson', [1]],
228
233
  ['continueGeoJsonListJson', [0], [0]],
@@ -230,11 +235,10 @@ for (const [method, jsonIndexes, requiredIndexes] of [
230
235
  ['listRecordsAsOfJson', [1], [1]], ['continueAsOfListJson', [0], [0]],
231
236
  ['listSnapshotRecordsJson', [1]], ['continueSnapshotListJson', [0], [0]],
232
237
  ['listRelationshipRecordsJson', [3]], ['continueRelationshipListJson', [0], [0]],
233
- ['lookupRecordJson', [3]], ['createRecordJson'], ['patchRecordJson'], ['executeLifecycleActionJson'],
234
- ['actionTargetConditionsJson'], ['invokeActionJson'], ['batchRecordsJson'], ['tombstoneRecordJson'],
238
+ ['lookupRecordJson', [3]], ['createRecordJson'], ['patchRecordJson'],
239
+ ['actionTargetConditionsJson'], ['actionAvailabilityJson'], ['invokeActionJson'],
240
+ ['batchRecordsJson'], ['tombstoneRecordJson'],
235
241
  ['executeRecoveredActionJson'], ['executeRecoveredCreateJson'],
236
- ['executeRecoveredLifecycleActionJson'],
237
- ['uploadAttachmentJson'], ['deleteAttachmentJson'],
238
242
  ['createIngestionRun', [1], [1]], ['listIngestionRuns', [1]],
239
243
  ['readIngestionRun'], ['submitIngestionChunk'], ['cancelIngestionRun'],
240
244
  ]) wrapAsync(method, jsonIndexes, requiredIndexes);
@@ -243,8 +247,7 @@ for (const [method, jsonIndexes, requiredIndexes] of [
243
247
  ['prepareAction', [1], [1]], ['prepareActionJson'],
244
248
  ['recoverAction', [2], [2]], ['recoverActionJson'],
245
249
  ['prepareCreate', [1], [1]], ['prepareCreateJson'], ['recoverCreate'],
246
- ['prepareLifecycleAction', [1], [1]], ['prepareLifecycleActionJson'],
247
- ['recoverLifecycleAction'],
250
+ ['prepareProposal'], ['recoverProposal'],
248
251
  ]) {
249
252
  const original = native.BaseRegistryClient.prototype[method];
250
253
  native.BaseRegistryClient.prototype[method] = function (...args) {
@@ -290,85 +293,12 @@ function preparedClass(Class, label) {
290
293
 
291
294
  const BRegPreparedAction = preparedClass(native.BRegPreparedAction, 'BRegPreparedAction');
292
295
  const BRegPreparedCreate = preparedClass(native.BRegPreparedCreate, 'BRegPreparedCreate');
293
- const BRegPreparedLifecycle = preparedClass(
294
- native.BRegPreparedLifecycle, 'BRegPreparedLifecycle',
295
- );
296
-
297
- const withReason = native.BRegLifecycleAction.prototype.withReason;
298
- native.BRegLifecycleAction.prototype.withReason = function (reason) {
299
- try {
300
- if (typeof reason !== 'string' || !reason.isWellFormed()) throw inputError('invalid-request');
301
- return withReason.call(this, reason);
302
- } catch (error) {
303
- throw normalize(error, 'invalid-request');
304
- }
305
- };
306
-
307
- const lifecycleActionsJson = native.BaseRegistryClient.prototype.lifecycleActionsJson;
308
- native.BaseRegistryClient.prototype.lifecycleActionsJson = function (...args) {
309
- try { return lifecycleActionsJson.apply(this, args); }
310
- catch (error) { throw normalize(error, 'invalid-request'); }
311
- };
312
-
313
- const lifecycleActions = native.BaseRegistryClient.prototype.lifecycleActions;
314
- native.BaseRegistryClient.prototype.lifecycleActions = function (...args) {
315
- try {
316
- const sanitized = sanitizeArguments(args, new Set([1]), new Set([1]));
317
- return lifecycleActions.apply(this, sanitized);
318
- } catch (error) {
319
- throw normalize(error, 'invalid-request');
320
- }
321
- };
322
-
323
- const requestHistory = native.BaseRegistryClient.prototype.requestHistory;
324
- native.BaseRegistryClient.prototype.requestHistory = function (...args) {
325
- try {
326
- const sanitized = sanitizeArguments(args, new Set([0]), new Set([0]));
327
- return requestHistory.apply(this, sanitized);
328
- } catch (error) {
329
- throw normalize(error, 'invalid-request');
330
- }
331
- };
332
-
333
- for (const name of ['findProposal', 'findApplication']) {
334
- const original = native.RetainedRequestHistoryPage.prototype[name];
335
- native.RetainedRequestHistoryPage.prototype[name] = function (...args) {
336
- try {
337
- const proposalVersion = args[2];
338
- if (!Number.isSafeInteger(proposalVersion)
339
- || proposalVersion < 1 || proposalVersion > 0xffff_ffff) {
340
- throw inputError('invalid-request');
341
- }
342
- return original.apply(this, args);
343
- } catch (error) {
344
- throw normalize(error, 'invalid-request');
345
- }
346
- };
347
- }
348
-
349
- const valueIn = native.BRegAttachmentSlot.prototype.valueIn;
350
- native.BRegAttachmentSlot.prototype.valueIn = function (...args) {
351
- try {
352
- return valueIn.apply(this, sanitizeArguments(args, new Set([0]), new Set([0])));
353
- } catch (error) {
354
- throw normalize(error, 'invalid-request');
355
- }
356
- };
357
-
358
- for (const name of ['prepareUpload', 'acceptsContentType']) {
359
- const original = native.BRegAttachmentSlot.prototype[name];
360
- native.BRegAttachmentSlot.prototype[name] = function (...args) {
361
- try {
362
- return original.apply(this, args);
363
- } catch (error) {
364
- throw normalize(error, 'invalid-request');
365
- }
366
- };
367
- }
296
+ const BRegPreparedProposal = preparedClass(native.BRegPreparedProposal, 'BRegPreparedProposal');
368
297
 
369
298
  for (const name of [
370
- 'selectCreate', 'selectPatch', 'selectLifecycle', 'selectAttachments',
371
- 'selectImmediateAction', 'selectTombstone', 'selectBatch', 'changeRequestCapability',
299
+ 'selectCreate', 'selectPatch',
300
+ 'selectAction', 'selectTombstone', 'selectBatch', 'selectProposals', 'selectProposalGet',
301
+ 'selectProposalReviewContext', 'selectProposalReviewStatus',
372
302
  ]) {
373
303
  const original = native.BRegMetadata.prototype[name];
374
304
  native.BRegMetadata.prototype[name] = function (...args) {
@@ -450,23 +380,19 @@ module.exports = {
450
380
  BRegMetadata: native.BRegMetadata,
451
381
  BRegCreateBinding: native.BRegCreateBinding,
452
382
  BRegPatchBinding: native.BRegPatchBinding,
453
- BRegLifecycleAuthority: native.BRegLifecycleAuthority,
454
- BRegLifecycleAction: native.BRegLifecycleAction,
455
- BRegRequestResultReference: native.RequestResultReference,
456
- BRegRetainedRequestProposalView: native.RetainedRequestProposal,
457
- BRegRetainedRequestHistoryPage: native.RetainedRequestHistoryPage,
458
- BRegAttachmentSlot: native.BRegAttachmentSlot,
459
- BRegAttachmentUpload: native.BRegAttachmentUpload,
460
- BRegImmediateActionBinding: native.BRegImmediateActionBinding,
383
+ BRegProposal: native.BRegProposal,
384
+ BRegProposalCollection: native.BRegProposalCollection,
385
+ BRegProposalGetBinding: native.BRegProposalGetBinding,
386
+ BRegProposalReviewBinding: native.BRegProposalReviewBinding,
387
+ BRegActionBinding: native.BRegActionBinding,
461
388
  BRegActionTargetConditions: native.BRegActionTargetConditions,
462
389
  BRegTombstoneBinding: native.BRegTombstoneBinding,
463
390
  BRegBatchBinding: native.BRegBatchBinding,
464
391
  BRegPreparedAction,
465
392
  BRegPreparedCreate,
466
- BRegPreparedLifecycle,
393
+ BRegPreparedProposal,
467
394
  BRegRecoveredAction: native.BRegRecoveredAction,
468
395
  BRegRecoveredCreate: native.BRegRecoveredCreate,
469
- BRegRecoveredLifecycle: native.BRegRecoveredLifecycle,
470
396
  BRegIngestionChunk: native.BRegIngestionChunk,
471
397
  BRegIngestionPrefixDigest: native.BRegIngestionPrefixDigest,
472
398
  encodeIngestionChunk,
package/breg/index.d.ts CHANGED
@@ -15,7 +15,7 @@ export declare class BaseRegistryClient {
15
15
  statisticsPublish(dataset: string, period: string, status: string, accessProfile: string, idempotencyKey: string): Promise<RawOutcome>
16
16
  statisticsWithdraw(dataset: string, period: string, version: number, reason: string, accessProfile: string, idempotencyKey: string): Promise<RawOutcome>
17
17
  registryContract(accessProfile?: string | undefined | null): Promise<BRegMetadata>
18
- entitySchema(entityIdentifier: string, accessProfile?: string | undefined | null): Promise<RawOutcome>
18
+ entitySchema(recordTypeIdentifier: string, accessProfile?: string | undefined | null): Promise<RawOutcome>
19
19
  /** Retrieve one bounded first page of record revisions as inert JSON. */
20
20
  recordRevisions(entityRoute: string, recordIdentifier: string, accessProfile?: string | undefined | null): Promise<RawOutcome>
21
21
  /** Retrieve one exact retained revision as validated inert record JSON. */
@@ -35,31 +35,51 @@ export declare class BaseRegistryClient {
35
35
  listRelationshipRecords(entityRoute: string, recordIdentifier: string, pathRoute: string, options?: any | undefined | null): Promise<PageOutcome>
36
36
  continueRelationshipList(value: any): Promise<PageOutcome>
37
37
  lookupRecord(entityRoute: string, selector: string, values?: any | undefined | null, options?: any | undefined | null): Promise<CompleteOutcome>
38
+ startProposal(binding: BRegActionBinding, inputsJson: string, key: string): Promise<BRegProposal>
39
+ readProposal(proposal: BRegProposal): Promise<BRegProposal>
40
+ readProposalSubmission(proposal: BRegProposal, version: number): Promise<CompleteOutcome>
41
+ getProposal(binding: BRegProposalGetBinding, id: string): Promise<BRegProposal>
42
+ downloadProposalAttachment(proposal: BRegProposal, slot: string): Promise<RawOutcome>
43
+ readProposalReviewById(binding: BRegProposalReviewBinding, id: string): Promise<CompleteOutcome>
44
+ downloadProposalReviewDocument(binding: BRegProposalReviewBinding, context: any, field: string): Promise<RawOutcome>
45
+ readProposalReviewStatus(proposal: BRegProposal): Promise<CompleteOutcome>
46
+ readProposalReviewContext(proposal: BRegProposal): Promise<CompleteOutcome>
47
+ readProposalReviewContextBatch(binding: BRegProposalReviewBinding, ids: Array<string>): Promise<CompleteOutcome>
48
+ uploadProposalAttachment(proposal: BRegProposal, slot: string, contentType: string, bytes: Buffer, key: string): Promise<BRegProposal>
49
+ deleteProposalAttachment(proposal: BRegProposal, slot: string, key: string): Promise<BRegProposal>
50
+ listProposals(collection: BRegProposalCollection, queryJson: string): Promise<ProposalPage>
51
+ prepareProposal(proposal: BRegProposal, operation: string, bodyJson: string, key: string): BRegPreparedProposal
52
+ recoverProposal(proposal: BRegProposal, attempt: BRegPreparedProposal): BRegPreparedProposal
53
+ executeProposal(attempt: BRegPreparedProposal): Promise<BRegProposal>
38
54
  /** Fetch opaque target conditions for one metadata-selected action. */
39
- actionTargetConditions(binding: BRegImmediateActionBinding, inputs: any): Promise<BRegActionTargetConditions>
55
+ actionTargetConditions(binding: BRegActionBinding, inputs: any): Promise<BRegActionTargetConditions>
56
+ /** Read current field-guard availability for one selected reference. */
57
+ actionAvailability(binding: BRegActionBinding, targetInput: string, inputs: any): Promise<CompleteOutcome>
40
58
  /**
41
59
  * Invoke one metadata-selected immediate action. An invocation whose
42
60
  * outcome is unknown is resent identically under the same key, at most
43
61
  * `maxMutationRetries` times.
44
62
  */
45
- invokeAction(binding: BRegImmediateActionBinding, inputs: any, idempotencyKey: string, conditions?: BRegActionTargetConditions | undefined | null): Promise<CompleteOutcome>
63
+ invokeAction(binding: BRegActionBinding, inputs: any, idempotencyKey: string, conditions?: BRegActionTargetConditions | undefined | null): Promise<CompleteOutcome>
46
64
  /**
47
65
  * Prepare inert invocation evidence before any token acquisition or I/O.
48
66
  * Persist `toBytes` before invoking so a lost response can be recovered.
49
67
  */
50
- prepareAction(binding: BRegImmediateActionBinding, inputs: any, idempotencyKey: string, conditions?: BRegActionTargetConditions | undefined | null): BRegPreparedAction
68
+ prepareAction(binding: BRegActionBinding, inputs: any, idempotencyKey: string, conditions?: BRegActionTargetConditions | undefined | null): BRegPreparedAction
51
69
  /**
52
70
  * Revalidate saved invocation evidence against freshly selected authority
53
71
  * and the caller's original inputs and key. The saved target conditions
54
72
  * are reused exactly; this never fetches conditions or sends a request.
55
73
  */
56
- recoverAction(binding: BRegImmediateActionBinding, prepared: BRegPreparedAction, inputs: any, idempotencyKey: string): BRegRecoveredAction
74
+ recoverAction(binding: BRegActionBinding, prepared: BRegPreparedAction, inputs: any, idempotencyKey: string): BRegRecoveredAction
57
75
  /**
58
76
  * Explicitly send a recovered invocation under its original key. An
59
77
  * invocation whose outcome is unknown is resent identically under that
60
78
  * key, at most `maxMutationRetries` times.
61
79
  */
62
- executeRecoveredAction(binding: BRegImmediateActionBinding, recovered: BRegRecoveredAction): Promise<CompleteOutcome>
80
+ executeRecoveredAction(binding: BRegActionBinding, recovered: BRegRecoveredAction): Promise<CompleteOutcome>
81
+ /** Execute a recovered proposal start with its exact original request and key. */
82
+ executeRecoveredProposalStart(binding: BRegActionBinding, recovered: BRegRecoveredAction): Promise<BRegProposal>
63
83
  createRecord(binding: BRegCreateBinding, data: any, idempotencyKey: string, formatValue?: string | undefined | null): Promise<CompleteOutcome>
64
84
  /** Prepare inert Create evidence before any token acquisition or I/O. */
65
85
  prepareCreate(binding: BRegCreateBinding, data: any, idempotencyKey: string, formatValue?: string | undefined | null): BRegPreparedCreate
@@ -100,28 +120,6 @@ export declare class BaseRegistryClient {
100
120
  ingestionChunkReceipt(entityRoute: string, runId: string, chunkIndex: number, profileId: string): Promise<CompleteOutcome>
101
121
  /** Tombstone one record against its current strong ETag. */
102
122
  tombstoneRecord(binding: BRegTombstoneBinding, recordIdentifier: string, etag: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<CompleteOutcome>
103
- /**
104
- * Replace one governed attachment slot with exact bytes. The prepared
105
- * upload already satisfies the slot's served size and content-type policy.
106
- */
107
- uploadAttachment(slot: BRegAttachmentSlot, recordIdentifier: string, etag: string, upload: BRegAttachmentUpload, idempotencyKey: string, formatValue?: string | undefined | null): Promise<CompleteOutcome>
108
- /** Read the exact bytes one governed slot holds for one proposal version. */
109
- downloadAttachment(slot: BRegAttachmentSlot, recordIdentifier: string, proposalVersion: number): Promise<RawOutcome>
110
- /** Empty one governed attachment slot. */
111
- deleteAttachment(slot: BRegAttachmentSlot, recordIdentifier: string, etag: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<CompleteOutcome>
112
- lifecycleActions(authority: BRegLifecycleAuthority, record: any, formatValue?: string | undefined | null): Array<BRegLifecycleAction>
113
- /**
114
- * Decode one already loaded record's retained request-history page.
115
- * This performs no I/O and does not advance the returned continuation.
116
- */
117
- requestHistory(record: any, formatValue?: string | undefined | null): RetainedRequestHistoryPage | null
118
- executeLifecycleAction(action: BRegLifecycleAction, idempotencyKey: string): Promise<CompleteOutcome>
119
- /** Prepare inert lifecycle evidence before any token acquisition or I/O. */
120
- prepareLifecycleAction(authority: BRegLifecycleAuthority, record: any, action: BRegLifecycleAction, idempotencyKey: string, formatValue?: string | undefined | null): BRegPreparedLifecycle
121
- /** Revalidate saved lifecycle evidence against freshly selected authority. */
122
- recoverLifecycleAction(authority: BRegLifecycleAuthority, prepared: BRegPreparedLifecycle): BRegRecoveredLifecycle
123
- /** Explicitly send a recovered lifecycle action. */
124
- executeRecoveredLifecycleAction(recovered: BRegRecoveredLifecycle): Promise<CompleteOutcome>
125
123
  getRecordJson(entityRoute: string, recordIdentifier: string, options?: any | undefined | null): Promise<JsonOutcome>
126
124
  listRecordsJson(entityRoute: string, options?: any | undefined | null): Promise<JsonOutcome>
127
125
  continueListJson(value: any): Promise<JsonOutcome>
@@ -138,15 +136,17 @@ export declare class BaseRegistryClient {
138
136
  continueRelationshipListJson(value: any): Promise<JsonOutcome>
139
137
  lookupRecordJson(entityRoute: string, selector: string, valuesJson?: string | undefined | null, options?: any | undefined | null): Promise<JsonOutcome>
140
138
  /** Fetch opaque target conditions from exact action-input JSON. */
141
- actionTargetConditionsJson(binding: BRegImmediateActionBinding, inputsJson: string): Promise<BRegActionTargetConditions>
139
+ actionTargetConditionsJson(binding: BRegActionBinding, inputsJson: string): Promise<BRegActionTargetConditions>
140
+ /** Read field-guard availability from exact action-input JSON. */
141
+ actionAvailabilityJson(binding: BRegActionBinding, targetInput: string, inputsJson: string): Promise<JsonOutcome>
142
142
  /** Invoke an action from exact JSON and preserve exact receipt values. */
143
- invokeActionJson(binding: BRegImmediateActionBinding, inputsJson: string, idempotencyKey: string, conditions?: BRegActionTargetConditions | undefined | null): Promise<JsonOutcome>
143
+ invokeActionJson(binding: BRegActionBinding, inputsJson: string, idempotencyKey: string, conditions?: BRegActionTargetConditions | undefined | null): Promise<JsonOutcome>
144
144
  /** Prepare inert invocation evidence from exact action-input JSON. */
145
- prepareActionJson(binding: BRegImmediateActionBinding, inputsJson: string, idempotencyKey: string, conditions?: BRegActionTargetConditions | undefined | null): BRegPreparedAction
145
+ prepareActionJson(binding: BRegActionBinding, inputsJson: string, idempotencyKey: string, conditions?: BRegActionTargetConditions | undefined | null): BRegPreparedAction
146
146
  /** Revalidate saved invocation evidence against exact original input JSON. */
147
- recoverActionJson(binding: BRegImmediateActionBinding, prepared: BRegPreparedAction, inputsJson: string, idempotencyKey: string): BRegRecoveredAction
147
+ recoverActionJson(binding: BRegActionBinding, prepared: BRegPreparedAction, inputsJson: string, idempotencyKey: string): BRegRecoveredAction
148
148
  /** Explicitly send a recovered invocation and preserve exact receipt values. */
149
- executeRecoveredActionJson(binding: BRegImmediateActionBinding, recovered: BRegRecoveredAction): Promise<JsonOutcome>
149
+ executeRecoveredActionJson(binding: BRegActionBinding, recovered: BRegRecoveredAction): Promise<JsonOutcome>
150
150
  createRecordJson(binding: BRegCreateBinding, dataJson: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<JsonOutcome>
151
151
  /** Prepare inert Create evidence from exact JSON text. */
152
152
  prepareCreateJson(binding: BRegCreateBinding, dataJson: string, idempotencyKey: string, formatValue?: string | undefined | null): BRegPreparedCreate
@@ -157,16 +157,11 @@ export declare class BaseRegistryClient {
157
157
  batchRecordsJson(binding: BRegBatchBinding, requestJson: string, idempotencyKey: string): Promise<JsonOutcome>
158
158
  /** Tombstone one record and preserve exact response values. */
159
159
  tombstoneRecordJson(binding: BRegTombstoneBinding, recordIdentifier: string, etag: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<JsonOutcome>
160
- uploadAttachmentJson(slot: BRegAttachmentSlot, recordIdentifier: string, etag: string, upload: BRegAttachmentUpload, idempotencyKey: string, formatValue?: string | undefined | null): Promise<JsonOutcome>
161
- deleteAttachmentJson(slot: BRegAttachmentSlot, recordIdentifier: string, etag: string, idempotencyKey: string, formatValue?: string | undefined | null): Promise<JsonOutcome>
162
- lifecycleActionsJson(authority: BRegLifecycleAuthority, recordJson: string, formatValue?: string | undefined | null): Array<BRegLifecycleAction>
163
- /** Prepare inert lifecycle evidence from an exact Registry Record response. */
164
- prepareLifecycleActionJson(authority: BRegLifecycleAuthority, recordJson: string, action: BRegLifecycleAction, idempotencyKey: string, formatValue?: string | undefined | null): BRegPreparedLifecycle
165
- executeLifecycleActionJson(action: BRegLifecycleAction, idempotencyKey: string): Promise<JsonOutcome>
166
- /** Explicitly send a recovered lifecycle action and preserve exact values. */
167
- executeRecoveredLifecycleActionJson(recovered: BRegRecoveredLifecycle): Promise<JsonOutcome>
168
160
  }
169
161
 
162
+ export declare class BRegActionBinding {}
163
+ export type ActionBinding = BRegActionBinding
164
+
170
165
  /** Opaque server-validated target conditions for one immediate action. */
171
166
  export declare class BRegActionTargetConditions {
172
167
  get preconditionKeys(): Array<string>
@@ -175,44 +170,12 @@ export declare class BRegActionTargetConditions {
175
170
  }
176
171
  export type ActionTargetConditions = BRegActionTargetConditions
177
172
 
178
- /** Opaque governed attachment slot selected from metadata fetched by this client source. */
179
- export declare class BRegAttachmentSlot {
180
- get slotIdentifier(): string
181
- get entityIdentifier(): string
182
- get accessProfile(): string
183
- get requiredForSubmit(): boolean
184
- /** Largest body the served slot policy accepts, in bytes. */
185
- get maximumBytes(): number
186
- get contentTypes(): Array<string>
187
- /** Authored sensitivity of this slot's content. */
188
- get classification(): string
189
- get canDownload(): boolean
190
- get canUpload(): boolean
191
- get canRemove(): boolean
192
- acceptsContentType(contentType: string): boolean
193
- /** Bind exact bytes to this slot. Refusals happen here, before any request. */
194
- prepareUpload(contentType: string, body: Buffer): BRegAttachmentUpload
195
- /** Read this slot's engine-owned state out of one Registry Record envelope. */
196
- valueIn(record: any, formatValue?: string | undefined | null): any
197
- }
198
- export type AttachmentSlot = BRegAttachmentSlot
199
-
200
- /** Opaque bytes already accepted by one slot's served upload policy. */
201
- export declare class BRegAttachmentUpload {
202
- get contentType(): string
203
- get byteSize(): number
204
- }
205
- export type AttachmentUpload = BRegAttachmentUpload
206
-
207
173
  export declare class BRegBatchBinding {}
208
174
  export type BatchBinding = BRegBatchBinding
209
175
 
210
176
  export declare class BRegCreateBinding {}
211
177
  export type CreateBinding = BRegCreateBinding
212
178
 
213
- export declare class BRegImmediateActionBinding {}
214
- export type ImmediateActionBinding = BRegImmediateActionBinding
215
-
216
179
  /**
217
180
  * One bounded, digest-bound chunk of an ingestion run. The chunk digest is
218
181
  * derived in Rust from the exact canonical batch body the items hash to.
@@ -243,29 +206,21 @@ export declare class BRegIngestionPrefixDigest {
243
206
  }
244
207
  export type IngestionPrefixDigest = BRegIngestionPrefixDigest
245
208
 
246
- export declare class BRegLifecycleAction {
247
- withReason(reason: string): BRegLifecycleAction
248
- get bodyJson(): string
249
- get operation(): string
250
- get href(): string
251
- get body(): any
252
- }
253
- export type LifecycleAction = BRegLifecycleAction
254
-
255
- export declare class BRegLifecycleAuthority {}
256
- export type LifecycleAuthority = BRegLifecycleAuthority
257
-
258
209
  export declare class BRegMetadata {
210
+ /** Read-only capability inventory for each exact Action/profile pair. */
211
+ get proposalActions(): any
259
212
  /** Caller-filtered inert descriptors. Selectors below remain the only authority constructors. */
260
213
  get operations(): any
261
- /** Complete typed caller-filtered immediate-action descriptors. */
262
- get immediateActions(): any
214
+ selectProposals(profile: string): BRegProposalCollection
215
+ selectProposalGet(profile: string): BRegProposalGetBinding
216
+ selectProposalReviewContext(profile: string, action: string): BRegProposalReviewBinding
217
+ selectProposalReviewStatus(profile: string, action: string): BRegProposalReviewBinding
218
+ /** Complete typed caller-filtered Action descriptors. */
219
+ get actions(): any
263
220
  /** Original caller-filtered action metadata as exact JSON text. */
264
221
  get actionsJson(): string | null
265
222
  /** Validated caller-filtered statistical dataset descriptions, without entity authority. */
266
223
  get statisticalDatasets(): any | null
267
- /** Descriptive change-request capability for one entity, when advertised. */
268
- changeRequestCapability(entityIdentifier: string): any | null
269
224
  get registryIdentifier(): string
270
225
  get registryVersion(): string
271
226
  get registryRevision(): string
@@ -273,11 +228,9 @@ export declare class BRegMetadata {
273
228
  get etag(): string | null
274
229
  selectCreate(operationIdentifier: string, expectedProfile: string): BRegCreateBinding
275
230
  selectPatch(operationIdentifier: string, expectedProfile: string): BRegPatchBinding
276
- selectLifecycle(entityIdentifier: string, expectedProfile: string): BRegLifecycleAuthority
277
- selectAttachments(entityIdentifier: string, expectedProfile: string): Array<BRegAttachmentSlot>
278
- selectImmediateAction(actionIdentifier: string, expectedProfile: string): BRegImmediateActionBinding
279
- selectTombstone(entityIdentifier: string, expectedProfile: string): BRegTombstoneBinding
280
- selectBatch(entityIdentifier: string, expectedProfile: string): BRegBatchBinding
231
+ selectAction(actionIdentifier: string, expectedProfile: string): BRegActionBinding
232
+ selectTombstone(recordTypeIdentifier: string, expectedProfile: string): BRegTombstoneBinding
233
+ selectBatch(recordTypeIdentifier: string, expectedProfile: string): BRegBatchBinding
281
234
  }
282
235
  export type Metadata = BRegMetadata
283
236
 
@@ -309,17 +262,28 @@ export declare class BRegPreparedCreate {
309
262
  }
310
263
  export type PreparedCreate = BRegPreparedCreate
311
264
 
312
- /**
313
- * Inert original lifecycle request evidence. The bytes carry record values
314
- * and an idempotency key, but no token or executable metadata authority.
315
- */
316
- export declare class BRegPreparedLifecycle {
317
- /** Restore bounded inert evidence previously returned by `toBytes`. */
318
- static fromBytes(bytes: Buffer): BRegPreparedLifecycle
319
- /** Copy the exact evidence bytes for owner-protected persistence. */
265
+ export declare class BRegPreparedProposal {
266
+ static fromBytes(bytes: Buffer): BRegPreparedProposal
320
267
  toBytes(): Buffer
321
268
  }
322
- export type PreparedLifecycle = BRegPreparedLifecycle
269
+ export type PreparedProposal = BRegPreparedProposal
270
+
271
+ export declare class BRegProposal {
272
+ get inputJson(): string | null
273
+ get identifier(): string
274
+ get actionIdentifier(): string
275
+ get documentJson(): string
276
+ }
277
+ export type Proposal = BRegProposal
278
+
279
+ export declare class BRegProposalCollection {}
280
+ export type ProposalCollection = BRegProposalCollection
281
+
282
+ export declare class BRegProposalGetBinding {}
283
+ export type ProposalGetBinding = BRegProposalGetBinding
284
+
285
+ export declare class BRegProposalReviewBinding {}
286
+ export type ProposalReviewBinding = BRegProposalReviewBinding
323
287
 
324
288
  /**
325
289
  * A recovered immediate-action invocation and key. This remains inert until
@@ -336,13 +300,6 @@ export type RecoveredAction = BRegRecoveredAction
336
300
  export declare class BRegRecoveredCreate {}
337
301
  export type RecoveredCreate = BRegRecoveredCreate
338
302
 
339
- /**
340
- * A recovered lifecycle action and key. This remains inert until
341
- * `executeRecoveredLifecycleAction` is explicitly called.
342
- */
343
- export declare class BRegRecoveredLifecycle {}
344
- export type RecoveredLifecycle = BRegRecoveredLifecycle
345
-
346
303
  export declare class BRegTombstoneBinding {}
347
304
  export type TombstoneBinding = BRegTombstoneBinding
348
305
 
@@ -354,37 +311,6 @@ export declare class PrivateKeyJwt {
354
311
  }
355
312
  export type PrivateKeyJwtBinding = PrivateKeyJwt
356
313
 
357
- /** One inert caller-visible target written by an applied request. */
358
- export declare class RequestResultReference {
359
- get targetEntityIdentifier(): string
360
- get targetRecordIdentifier(): string
361
- get targetRevision(): number
362
- toString(): string
363
- }
364
-
365
- /** One explicitly loaded retained request-history page. */
366
- export declare class RetainedRequestHistoryPage {
367
- get proposals(): Array<RetainedRequestProposal>
368
- get nextAfterProposalVersion(): number | null
369
- findProposal(requestEntityIdentifier: string, requestIdentifier: string, proposalVersion: number): RetainedRequestProposal | null
370
- findApplication(requestEntityIdentifier: string, requestIdentifier: string, proposalVersion: number, applicationIdentifier: string): RetainedRequestProposal | null
371
- toString(): string
372
- }
373
-
374
- /** One exact retained proposal in an explicitly loaded history page. */
375
- export declare class RetainedRequestProposal {
376
- get requestEntityIdentifier(): string
377
- get requestIdentifier(): string
378
- get proposalVersion(): number
379
- get bregState(): string
380
- get current(): boolean
381
- get detailErased(): boolean
382
- get applicationIdentifier(): string | null
383
- get resultLinkCount(): number
384
- get resultReferences(): Array<RequestResultReference>
385
- toString(): string
386
- }
387
-
388
314
  export interface CompleteOutcome {
389
315
  kind: string
390
316
  value: any
@@ -424,6 +350,11 @@ export interface PageOutcome {
424
350
  validAt?: string
425
351
  }
426
352
 
353
+ export interface ProposalPage {
354
+ items: Array<BRegProposal>
355
+ nextCursor?: string
356
+ }
357
+
427
358
  export interface RawOutcome {
428
359
  kind: string
429
360
  body: Buffer