@owneraio/finp2p-sdk-js 0.29.18 → 0.29.19

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.
@@ -15,7 +15,7 @@ export type CollateralAgreementRole = 'pledger' | 'receiver' | 'vault-controller
15
15
  /**
16
16
  * Roles that a collateral agreement may expose on reads.
17
17
  *
18
- * collateral-terms/v3 binds ONE `approver` role to both party orgs: each side approves what the
18
+ * collateral-terms/v3 and v4 bind ONE `approver` role to both party orgs: each side approves what the
19
19
  * other posts, and the side a report calls may not decide its own list. The node binds it itself:
20
20
  * a propose carries no approver field, and approve, reject and `consentRoles` never accept it.
21
21
  *
@@ -25,7 +25,7 @@ export type CollateralAgreementRole = 'pledger' | 'receiver' | 'vault-controller
25
25
  */
26
26
  export type CollateralAgreementBoundRole = CollateralAgreementRole | 'approver';
27
27
  /** The schema bundle an agreement is governed by; it becomes the agreement's termsType */
28
- export type CollateralDefinitionTemplate = 'collateral-terms/v3';
28
+ export type CollateralDefinitionTemplate = 'collateral-terms/v3' | 'collateral-terms/v4';
29
29
  export interface CollateralEligibleAssetTerm {
30
30
  assetId: string;
31
31
  /** Decimal fraction (0.10 = 10%) */
@@ -136,8 +136,8 @@ export interface ProposeCollateralAgreementRequest {
136
136
  validUntil?: number;
137
137
  settings?: CollateralOrgSettings;
138
138
  /**
139
- * Defaults to collateral-terms/v3 in the SDK. Reports carry only the nominal amount;
140
- * the called side proposes the priced asset list for attribution approval.
139
+ * Defaults to collateral-terms/v4 in the SDK. v4 runs the v3 flow: reports carry only the
140
+ * nominal amount; the called side proposes the priced asset list for attribution approval.
141
141
  */
142
142
  definitionTemplate?: CollateralDefinitionTemplate;
143
143
  }
@@ -182,7 +182,7 @@ export interface CollateralReportAction {
182
182
  */
183
183
  export type CollateralHaircutApplyMethod = 'reduce-from-price' | 'add-to-total';
184
184
  /**
185
- * Nominal-only `POST /collateral/agreements/{agreementId}/reports` body for collateral-terms/v3.
185
+ * Nominal-only `POST /collateral/agreements/{agreementId}/reports` body for collateral-terms/v3 and v4.
186
186
  * The single empty action authors the nominal call; the called side later proposes the priced
187
187
  * asset list for approval. The haircut method comes from the agreement's terms.
188
188
  */
@@ -233,14 +233,14 @@ export interface CollateralAttributionLineValuation {
233
233
  /** Units after the haircut; the amount the facade transfers */
234
234
  finalUnits: string;
235
235
  }
236
- /** One asset and quantity offered by the called side against a v3 nominal report. */
236
+ /** One asset and quantity offered by the called side against a v3/v4 nominal report. */
237
237
  export interface CollateralAttributionLine {
238
238
  assetId: string;
239
239
  /** Units offered, as a decimal string */
240
240
  quantity: string;
241
241
  metadata: CollateralAttributionLineValuation;
242
242
  }
243
- /** `POST /collateral/reports/{reportId}/attribution-proposals` body (v3 only). */
243
+ /** `POST /collateral/reports/{reportId}/attribution-proposals` body (v3 and v4). */
244
244
  export interface ProposeCollateralAttributionRequest {
245
245
  /** At least one fully valued line */
246
246
  lines: [CollateralAttributionLine, ...CollateralAttributionLine[]];
@@ -457,14 +457,14 @@ export interface CollateralDomainError {
457
457
  }
458
458
  /**
459
459
  * Collateral facade commands: agreement-level (`/collateral/agreements*`) and the report-level
460
- * dispositions, manual transfer, negotiation, exception and v3 attribution flows
460
+ * dispositions, manual transfer, negotiation, exception and v3/v4 attribution flows
461
461
  * (`/collateral/reports*`).
462
462
  *
463
463
  * Negotiation is round-based: the caller must cite the thread's standing round, and only the org
464
464
  * that did NOT author the standing proposal may counter, agree or reject it (the opener withdraws).
465
465
  * Requires finp2p-core feat/2685 at or after 885d0b99c.
466
466
  *
467
- * `CreateCollateralReportRequest.deadline`, v3 attribution approval and the report-exception commands (`raiseReportException`,
467
+ * `CreateCollateralReportRequest.deadline`, v3/v4 attribution approval and the report-exception commands (`raiseReportException`,
468
468
  * `requestReportManualResolve`, `respondReportManualResolve`, `requestReportCoverageRecheck`) require
469
469
  * finp2p-core `feat/attribution-approval` at or after 96b1f18c. An agreement keeps the definition it
470
470
  * was proposed with. Exception commands work only while the agreement is in `reportProcessing`
@@ -481,7 +481,7 @@ export interface Collateral {
481
481
  getAgreementSettings(agreementId: string, options?: RequestOptions): Promise<CollateralOrgSettingsState>;
482
482
  /** Update the calling org's per-agreement settings (an omitted field keeps its stored value). */
483
483
  updateAgreementSettings(agreementId: string, request: CollateralOrgSettings, options?: RequestOptions): Promise<CollateralOrgSettingsState>;
484
- /** Author a nominal margin report (valuation-engine authority) under collateral-terms/v3. */
484
+ /** Author a nominal margin report (valuation-engine authority) under collateral-terms/v3 and v4. */
485
485
  createReport(agreementId: string, request: CreateCollateralReportRequest, options?: RequestOptions): Promise<CreateCollateralReportResponse>;
486
486
  /** Declare the normal close-out of an agreement. */
487
487
  closeout(agreementId: string, request?: CollateralCloseoutRequest, options?: RequestOptions): Promise<CollateralCloseoutResponse>;
@@ -500,7 +500,7 @@ export interface Collateral {
500
500
  /**
501
501
  * Post one collateral line against a report, returning the execution plan it opened.
502
502
  *
503
- * On v3 the node does not check attribution consent before submitting the transfer. A later
503
+ * On v3 and v4 the node does not check attribution consent before submitting the transfer. A later
504
504
  * attribution declaration can therefore be refused after a plan may already have been created and
505
505
  * may settle; policy can also reject the transfer before plan creation, and a created plan can fail.
506
506
  */
@@ -543,19 +543,19 @@ export interface Collateral {
543
543
  */
544
544
  requestReportCoverageRecheck(reportId: string, request: RequestCollateralCoverageRecheckRequest, options?: RequestOptions): Promise<RequestCollateralCoverageRecheckResponse>;
545
545
  /**
546
- * Offer the fully valued asset list for a v3 report. The caller must be the called side
546
+ * Offer the fully valued asset list for a v3/v4 report. The caller must be the called side
547
547
  * (`report.senderOrgId`, pledger or receiver). Forward an Idempotency-Key: an uncached retry
548
548
  * creates another proposal.
549
549
  */
550
550
  proposeReportAttribution(reportId: string, request: ProposeCollateralAttributionRequest, options?: RequestOptions): Promise<ProposeCollateralAttributionResponse>;
551
551
  /**
552
- * Approve or reject a v3 attribution proposal. The caller must be an org bound to the `approver`
552
+ * Approve or reject a v3/v4 attribution proposal. The caller must be an org bound to the `approver`
553
553
  * role and must not be the called side (`report.senderOrgId`), which is refused with `SelfApproval`.
554
554
  * The request options are forwarded, including Idempotency-Key.
555
555
  */
556
556
  respondReportAttributionProposal(reportId: string, proposalId: string, request: RespondCollateralAttributionProposalRequest, options?: RequestOptions): Promise<RespondCollateralAttributionProposalResponse>;
557
557
  /**
558
- * Close an approved v3 attribution round. The caller must be the called side
558
+ * Close an approved v3/v4 attribution round. The caller must be the called side
559
559
  * (`report.senderOrgId`, pledger or receiver). An unapproved proposal returns `ProposalNotApproved`.
560
560
  * The request options are forwarded, including Idempotency-Key. The node's `{}` response is
561
561
  * discarded and the promise resolves void.
@@ -223,6 +223,23 @@ export interface AgreementDefinitionOss {
223
223
  transitions: AgreementDefinitionTransitionOss[];
224
224
  allowedEvents: AgreementDefinitionAllowedEventOss[];
225
225
  }
226
+ /** One failed provisioning step of a container. `step` and `status` are open strings on the platform. */
227
+ export interface AgreementContainerIssueOss {
228
+ /** 'asset-onboarding' | 'profile-share' today */
229
+ step: string;
230
+ /** Asset id, `network:standard:tokenId` for an unresolved asset, or the participant org id for a share */
231
+ subject: string;
232
+ /** Asset identity; null when the issue is not about an asset */
233
+ network: string | null;
234
+ standard: string | null;
235
+ tokenId: string | null;
236
+ /** 'failed' today */
237
+ status: string;
238
+ errorCode: number | null;
239
+ errorMessage: string | null;
240
+ }
241
+ /** Known registry statuses, with support for future platform values. */
242
+ export type AgreementAccountStatusOss = 'ACTIVE' | 'DEGRADED' | 'ONBOARDING_FAILED' | 'RETIRED' | (string & {});
226
243
  /** One entry of an agreement's container accounts registry */
227
244
  export interface AgreementAccountOss {
228
245
  agreementId: string;
@@ -236,9 +253,11 @@ export interface AgreementAccountOss {
236
253
  policyVersion: number;
237
254
  servesRoles: string[];
238
255
  provisionerRole: string;
239
- /** Registry entry status (ACTIVE, RETIRED) */
240
- status: string;
256
+ /** Registry entry status (ACTIVE, DEGRADED, ONBOARDING_FAILED, RETIRED) */
257
+ status: AgreementAccountStatusOss;
241
258
  footprints: AgreementAssetFootprintOss[];
259
+ /** Failed provisioning steps; empty for a healthy container. Requires OSS with owneraio/oss#665. */
260
+ issues: AgreementContainerIssueOss[];
242
261
  /** The authored container declaration this entry materializes */
243
262
  spec: ContainerSpecOss | null;
244
263
  }
@@ -378,7 +397,8 @@ export interface CollateralContainerOss {
378
397
  key: string;
379
398
  finId: string;
380
399
  orgId: string | null;
381
- status: string;
400
+ /** Registry entry status (ACTIVE, DEGRADED, ONBOARDING_FAILED, RETIRED) */
401
+ status: AgreementAccountStatusOss;
382
402
  /** FinId of the dedicated investor; null for shared containers */
383
403
  boundParty: string | null;
384
404
  }
@@ -500,14 +520,14 @@ export interface CollateralExceptionDetailOss {
500
520
  export interface CollateralReportExceptionOss {
501
521
  exceptionId: string;
502
522
  status: CollateralReportExceptionStatusOss;
503
- /** The role whose side the problem is on, not an allocation of fault; engine-raised v3 exceptions always use `pledger`. */
523
+ /** The role whose side the problem is on, not an allocation of fault; engine-raised v3/v4 exceptions always use `pledger`. */
504
524
  blame: string | null;
505
525
  reason: string | null;
506
526
  /** Org id that raised it */
507
527
  raisedBy: string | null;
508
528
  /**
509
529
  * The legs this exception is about; empty for a report-level exception (OSS serves `[]`). Engine
510
- * exceptions on v3 carry assetId and quantity without an executionPlanId.
530
+ * exceptions on v3 and v4 carry assetId and quantity without an executionPlanId.
511
531
  */
512
532
  details: CollateralExceptionDetailOss[] | null;
513
533
  /** The exception's own log event; a manual resolve cites it */
@@ -545,16 +565,16 @@ export interface CollateralReportCoverageRecheckOss {
545
565
  sequence: number;
546
566
  timestamp: number | null;
547
567
  }
548
- /** One priced asset line offered for approval against a v3 report. */
568
+ /** One priced asset line offered for approval against a v3/v4 report. */
549
569
  export interface CollateralAttributionLineOss {
550
570
  assetId: string;
551
571
  /** Units offered, as a decimal string */
552
572
  quantity: string;
553
573
  metadata: CollateralReportAssetMetadataOss | null;
554
574
  }
555
- /** The approval state of one proposed v3 attribution list. */
575
+ /** The approval state of one proposed v3/v4 attribution list. */
556
576
  export type CollateralReportAttributionProposalStatusOss = 'proposed' | 'approved' | 'rejected';
557
- /** One priced list offered against a v3 report, with its whole-list approval decision. */
577
+ /** One priced list offered against a v3/v4 report, with its whole-list approval decision. */
558
578
  export interface CollateralReportAttributionProposalOss {
559
579
  proposalId: string;
560
580
  round: number;
@@ -615,7 +635,7 @@ export interface CollateralReportOss {
615
635
  /** Oldest first: recorded asks to re-evaluate after late collateral; nothing acts on them yet */
616
636
  coverageRechecks: CollateralReportCoverageRecheckOss[] | null;
617
637
  executionPlans: CollateralExecutionPlanOss[] | null;
618
- /** Oldest first: the priced lists offered against this v3 report and their decisions. */
638
+ /** Oldest first: the priced lists offered against this v3/v4 report and their decisions. */
619
639
  attributionProposals: CollateralReportAttributionProposalOss[] | null;
620
640
  }
621
641
  /** The folded collateral agreement view — decoded terms, no base64, no raw events */
@@ -624,7 +644,7 @@ export interface CollateralAgreementOss {
624
644
  orgId: string;
625
645
  status: string;
626
646
  version: number;
627
- /** The bundle the terms are written against; the SDK authors collateral-terms/v3. */
647
+ /** The bundle the terms are written against; the SDK authors collateral-terms/v3 and v4, defaulting to v4. */
628
648
  termsType: string | null;
629
649
  /** Roles whose signatures bind the agreement */
630
650
  consentRoles: string[] | null;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@owneraio/finp2p-sdk-js",
3
3
  "main": "lib/index.js",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
- "version": "0.29.18",
5
+ "version": "0.29.19",
6
6
  "homepage": "https://ownera.io/",
7
7
  "scripts": {
8
8
  "build": "yarn clean && tsc",