@owneraio/finp2p-sdk-js 0.28.41 → 0.29.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 +22 -1
- package/lib/OwneraAPI/__tests__/utils.test.d.ts +1 -0
- package/lib/OwneraAPI/__tests__/utils.test.js +82 -0
- package/lib/OwneraAPI/__tests__/utils.test.js.map +1 -0
- package/lib/OwneraAPI/finp2p-node-api/__tests__/agreements.test.d.ts +1 -0
- package/lib/OwneraAPI/finp2p-node-api/__tests__/agreements.test.js +149 -0
- package/lib/OwneraAPI/finp2p-node-api/__tests__/agreements.test.js.map +1 -0
- package/lib/OwneraAPI/finp2p-node-api/__tests__/collateral.test.d.ts +1 -0
- package/lib/OwneraAPI/finp2p-node-api/__tests__/collateral.test.js +502 -0
- package/lib/OwneraAPI/finp2p-node-api/__tests__/collateral.test.js.map +1 -0
- package/lib/OwneraAPI/finp2p-node-api/agreements.d.ts +8 -0
- package/lib/OwneraAPI/finp2p-node-api/agreements.js +31 -0
- package/lib/OwneraAPI/finp2p-node-api/agreements.js.map +1 -0
- package/lib/OwneraAPI/finp2p-node-api/collateral.d.ts +16 -0
- package/lib/OwneraAPI/finp2p-node-api/collateral.js +131 -0
- package/lib/OwneraAPI/finp2p-node-api/collateral.js.map +1 -0
- package/lib/OwneraAPI/index.js +4 -0
- package/lib/OwneraAPI/index.js.map +1 -1
- package/lib/OwneraAPI/oss-api/__tests__/filterUtils.test.d.ts +1 -0
- package/lib/OwneraAPI/oss-api/__tests__/filterUtils.test.js +15 -0
- package/lib/OwneraAPI/oss-api/__tests__/filterUtils.test.js.map +1 -0
- package/lib/OwneraAPI/oss-api/__tests__/getAgreements.test.d.ts +1 -0
- package/lib/OwneraAPI/oss-api/__tests__/getAgreements.test.js +175 -0
- package/lib/OwneraAPI/oss-api/__tests__/getAgreements.test.js.map +1 -0
- package/lib/OwneraAPI/oss-api/__tests__/getCollateralAgreements.test.d.ts +1 -0
- package/lib/OwneraAPI/oss-api/__tests__/getCollateralAgreements.test.js +321 -0
- package/lib/OwneraAPI/oss-api/__tests__/getCollateralAgreements.test.js.map +1 -0
- package/lib/OwneraAPI/oss-api/__tests__/getCollateralReports.test.d.ts +1 -0
- package/lib/OwneraAPI/oss-api/__tests__/getCollateralReports.test.js +152 -0
- package/lib/OwneraAPI/oss-api/__tests__/getCollateralReports.test.js.map +1 -0
- package/lib/OwneraAPI/oss-api/oss.js +576 -0
- package/lib/OwneraAPI/oss-api/oss.js.map +1 -1
- package/lib/OwneraAPI/utils.js +51 -9
- package/lib/OwneraAPI/utils.js.map +1 -1
- package/lib/types/Agreements/Agreements.d.ts +355 -0
- package/lib/types/Agreements/Agreements.js +3 -0
- package/lib/types/Agreements/Agreements.js.map +1 -0
- package/lib/types/Agreements/index.d.ts +1 -0
- package/lib/types/Agreements/index.js +18 -0
- package/lib/types/Agreements/index.js.map +1 -0
- package/lib/types/Collateral/Collateral.d.ts +564 -0
- package/lib/types/Collateral/Collateral.js +3 -0
- package/lib/types/Collateral/Collateral.js.map +1 -0
- package/lib/types/Collateral/index.d.ts +1 -0
- package/lib/types/Collateral/index.js +18 -0
- package/lib/types/Collateral/index.js.map +1 -0
- package/lib/types/Core/OwneraAPI.d.ts +4 -0
- package/lib/types/Oss/Agreements.d.ts +671 -0
- package/lib/types/Oss/Agreements.js +3 -0
- package/lib/types/Oss/Agreements.js.map +1 -0
- package/lib/types/Oss/Oss.d.ts +63 -0
- package/lib/types/Oss/index.d.ts +1 -0
- package/lib/types/Oss/index.js +1 -0
- package/lib/types/Oss/index.js.map +1 -1
- package/lib/types/Oss/utils.d.ts +7 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +2 -0
- package/lib/types/index.js.map +1 -1
- package/lib/types/utils.d.ts +5 -0
- package/lib/types/utils.js.map +1 -1
- package/package.json +1 -1
package/lib/types/Oss/Oss.d.ts
CHANGED
|
@@ -7,10 +7,13 @@ import { ReceiptSchemaOss, MinimizedAssetSchemaOss, LedgerSchemaOss, CustodyProv
|
|
|
7
7
|
import { UserAccount } from './OssResponses';
|
|
8
8
|
import { ExecutionPlanLimitedData, ExecutionPlanStatus, GetExecutionPlanResponse, IntentData } from './ExecutionPlan';
|
|
9
9
|
import { GetRouterWorkflowsFilter, WorkflowSchemaOss } from './RouterWorkflows';
|
|
10
|
+
import { AgreementAccountOss, AgreementNodeOss, CollateralAgreementOss, CollateralContainerBookOss, CollateralReportChangeKindOss, CollateralReportOss, GetAgreementAccountsFilter, GetAgreementsFilter, GetCollateralAgreementsFilter, GetCollateralReportsFilter } from './Agreements';
|
|
10
11
|
import { Paginated } from './Pagination';
|
|
11
12
|
import { GetExecutionPlanLightResponse } from './ExecutionPlan/OssResponses';
|
|
12
13
|
export interface Subscription {
|
|
13
14
|
terminate: () => void;
|
|
15
|
+
/** End only this subscription operation, leaving the shared graphql-ws client connected. */
|
|
16
|
+
dispose: () => void;
|
|
14
17
|
}
|
|
15
18
|
/**
|
|
16
19
|
* OSS interface provides methods to get data from the platform
|
|
@@ -326,6 +329,34 @@ export interface OSS {
|
|
|
326
329
|
getWorkflowById: (r: {
|
|
327
330
|
id: string;
|
|
328
331
|
}) => Promise<WorkflowSchemaOss>;
|
|
332
|
+
/**
|
|
333
|
+
* Get a paginated list of {@link AgreementNodeOss}: the co-signed contract zone, consent
|
|
334
|
+
* signatures, the append-only event log, the container accounts registry, the setup
|
|
335
|
+
* outline and the co-signed definition. Filter keys honored by OSS: id, organizationId,
|
|
336
|
+
* status.
|
|
337
|
+
*/
|
|
338
|
+
getAgreements: (r?: {
|
|
339
|
+
filter?: GetAgreementsFilter;
|
|
340
|
+
}) => Promise<Paginated<AgreementNodeOss[]>>;
|
|
341
|
+
/**
|
|
342
|
+
* Get a paginated list of {@link AgreementAccountOss}: the container accounts registry across
|
|
343
|
+
* agreements. Filter keys honored by OSS: agreementId, finId, orgId, status.
|
|
344
|
+
*/
|
|
345
|
+
getAgreementAccounts: (r?: {
|
|
346
|
+
filter?: GetAgreementAccountsFilter;
|
|
347
|
+
}) => Promise<Paginated<AgreementAccountOss[]>>;
|
|
348
|
+
/** Folded collateral agreements with decoded terms and containers. */
|
|
349
|
+
getCollateralAgreements: (r?: {
|
|
350
|
+
filter?: GetCollateralAgreementsFilter;
|
|
351
|
+
}) => Promise<Paginated<CollateralAgreementOss[]>>;
|
|
352
|
+
/** Folded margin reports with evaluation, dispositions, negotiations and execution plans. */
|
|
353
|
+
getCollateralReports: (r?: {
|
|
354
|
+
filter?: GetCollateralReportsFilter;
|
|
355
|
+
}) => Promise<Paginated<CollateralReportOss[]>>;
|
|
356
|
+
/** Container books (holdings, activity, earmarks, unattributed pool) of one agreement. */
|
|
357
|
+
getCollateralContainerBooks: (r: {
|
|
358
|
+
agreementId: string;
|
|
359
|
+
}) => Promise<CollateralContainerBookOss[]>;
|
|
329
360
|
/**
|
|
330
361
|
* Subscribe to receipt
|
|
331
362
|
*
|
|
@@ -350,6 +381,38 @@ export interface OSS {
|
|
|
350
381
|
*
|
|
351
382
|
*/
|
|
352
383
|
getPlanChangedBySubscription: (r: Omit<SubscribeRequestOss, 'query'>) => void;
|
|
384
|
+
/** Fires when a new agreement is committed to the read model (`agreementAdded(orgIds)`). */
|
|
385
|
+
getAgreementAddedSubscription: (r: Omit<SubscribeRequestOss, 'query'> & {
|
|
386
|
+
orgIds?: string[];
|
|
387
|
+
}) => Subscription;
|
|
388
|
+
/** Fires when an existing agreement changes (`agreementChanged(agreementIds, orgIds)`). */
|
|
389
|
+
getAgreementChangedSubscription: (r: Omit<SubscribeRequestOss, 'query'> & {
|
|
390
|
+
agreementIds?: string[];
|
|
391
|
+
orgIds?: string[];
|
|
392
|
+
}) => Subscription;
|
|
393
|
+
/** Fires when a folded collateral agreement is committed (collateral module). */
|
|
394
|
+
getCollateralAgreementAddedSubscription: (r: Omit<SubscribeRequestOss, 'query'> & {
|
|
395
|
+
orgIds?: string[];
|
|
396
|
+
}) => Subscription;
|
|
397
|
+
/** Fires when a folded collateral agreement changes (status, version, terms, containers). */
|
|
398
|
+
getCollateralAgreementChangedSubscription: (r: Omit<SubscribeRequestOss, 'query'> & {
|
|
399
|
+
agreementIds?: string[];
|
|
400
|
+
orgIds?: string[];
|
|
401
|
+
}) => Subscription;
|
|
402
|
+
/**
|
|
403
|
+
* Fires when a folded report changes; kind = CREATED | STATUS_CHANGED | RESOLVED | NEGOTIATION | REJECTED | EXCEPTION.
|
|
404
|
+
* @throws `{ code: 400, name: 'UnknownChangeKind' }` synchronously, before subscribing, when `changeKinds`
|
|
405
|
+
* holds a value outside {@link CollateralReportChangeKindOss}.
|
|
406
|
+
*/
|
|
407
|
+
getCollateralReportChangedSubscription: (r: Omit<SubscribeRequestOss, 'query'> & {
|
|
408
|
+
agreementIds?: string[];
|
|
409
|
+
reportIds?: string[];
|
|
410
|
+
changeKinds?: CollateralReportChangeKindOss[];
|
|
411
|
+
}) => Subscription;
|
|
412
|
+
/** Fires when a container's folded books change. */
|
|
413
|
+
getCollateralContainerBookChangedSubscription: (r: Omit<SubscribeRequestOss, 'query'> & {
|
|
414
|
+
agreementIds?: string[];
|
|
415
|
+
}) => Subscription;
|
|
353
416
|
/**
|
|
354
417
|
* Subscribe to a user holding changing
|
|
355
418
|
*
|
package/lib/types/Oss/index.d.ts
CHANGED
package/lib/types/Oss/index.js
CHANGED
|
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Agreements"), exports);
|
|
17
18
|
__exportStar(require("./ExecutionPlan"), exports);
|
|
18
19
|
__exportStar(require("./Pagination"), exports);
|
|
19
20
|
__exportStar(require("./Oss"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/Oss/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,+CAA6B;AAC7B,wCAAsB;AACtB,iDAA+B;AAC/B,+CAA6B;AAC7B,oDAAkC;AAClC,mDAAiC;AACjC,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/Oss/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,kDAAgC;AAChC,+CAA6B;AAC7B,wCAAsB;AACtB,iDAA+B;AAC/B,+CAA6B;AAC7B,oDAAkC;AAClC,mDAAiC;AACjC,0CAAwB"}
|
package/lib/types/Oss/utils.d.ts
CHANGED
|
@@ -42,6 +42,13 @@ export interface SubscribeRequestOss {
|
|
|
42
42
|
query: string;
|
|
43
43
|
onNext: (data: any) => void;
|
|
44
44
|
onError: (error: any) => void;
|
|
45
|
+
/**
|
|
46
|
+
* The operation ended with an error and will not resume: either the server's `GraphQLError[]` for
|
|
47
|
+
* this operation, or the CloseEvent / Error of a fatal connection close. A fatal close is ALSO
|
|
48
|
+
* reported through the shared `onClose` / `onError`, which fire on every reconnect too — so this is
|
|
49
|
+
* the callback that means "this subscription is dead for good".
|
|
50
|
+
*/
|
|
51
|
+
onOperationError?: (error: unknown) => void;
|
|
45
52
|
onComplete: () => void;
|
|
46
53
|
onStart: () => void;
|
|
47
54
|
onClose: (data: any) => void;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
export * from './Agreements';
|
|
1
2
|
export * from './ApprovalsConfig';
|
|
2
3
|
export * from './AssetData';
|
|
3
4
|
export * from './Auth';
|
|
4
5
|
export * from './Certificates';
|
|
6
|
+
export * from './Collateral';
|
|
5
7
|
export * from './Commons';
|
|
6
8
|
export * from './Core';
|
|
7
9
|
export * from './Documents';
|
package/lib/types/index.js
CHANGED
|
@@ -14,10 +14,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Agreements"), exports);
|
|
17
18
|
__exportStar(require("./ApprovalsConfig"), exports);
|
|
18
19
|
__exportStar(require("./AssetData"), exports);
|
|
19
20
|
__exportStar(require("./Auth"), exports);
|
|
20
21
|
__exportStar(require("./Certificates"), exports);
|
|
22
|
+
__exportStar(require("./Collateral"), exports);
|
|
21
23
|
__exportStar(require("./Commons"), exports);
|
|
22
24
|
__exportStar(require("./Core"), exports);
|
|
23
25
|
__exportStar(require("./Documents"), exports);
|
package/lib/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,8CAA4B;AAC5B,yCAAuB;AACvB,iDAA+B;AAC/B,4CAA0B;AAC1B,yCAAuB;AACvB,8CAA4B;AAC5B,qDAAmC;AACnC,4CAA0B;AAC1B,6CAA2B;AAC3B,+CAA6B;AAC7B,kDAAgC;AAChC,wCAAsB;AACtB,mDAAiC;AACjC,6CAA2B;AAC3B,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA2B;AAC3B,wDAAsC;AACtC,2CAAyB;AACzB,0CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,oDAAkC;AAClC,8CAA4B;AAC5B,yCAAuB;AACvB,iDAA+B;AAC/B,+CAA6B;AAC7B,4CAA0B;AAC1B,yCAAuB;AACvB,8CAA4B;AAC5B,qDAAmC;AACnC,4CAA0B;AAC1B,6CAA2B;AAC3B,+CAA6B;AAC7B,kDAAgC;AAChC,wCAAsB;AACtB,mDAAiC;AACjC,6CAA2B;AAC3B,kDAAgC;AAChC,6CAA2B;AAC3B,6CAA2B;AAC3B,wDAAsC;AACtC,2CAAyB;AACzB,0CAAwB"}
|
package/lib/types/utils.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ export interface OssRetryCondition {
|
|
|
2
2
|
match: (c: any[]) => boolean;
|
|
3
3
|
name: string;
|
|
4
4
|
data?: Record<string, any>;
|
|
5
|
+
/**
|
|
6
|
+
* Fail at once on any GraphQL error instead of accepting partial data or retrying: a nullable
|
|
7
|
+
* field nulled by a resolver error is indistinguishable from a real null, and the error repeats.
|
|
8
|
+
*/
|
|
9
|
+
strict?: boolean;
|
|
5
10
|
}
|
|
6
11
|
export declare const Iso4217Codes: readonly ["AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD", "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF", "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYN", "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC", "CUC", "CUP", "CVE", "CZK", "DJF", "DKK", "DOP", "DZD", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP", "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD", "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP", "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP", "MRU", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN", "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB", "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON", "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK", "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STN", "SVC", "SYP", "SZL", "THB", "TJS", "TMT", "TND", "TOP", "TRY", "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU", "UZS", "VEF", "VND", "VUV", "WST", "XAF", "XCD", "XDR", "XOF", "XPF", "YER", "ZAR", "ZMW", "ZWD"];
|
|
7
12
|
export declare const assetFinP2PType = "finp2p";
|
package/lib/types/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":";;;AAWa,QAAA,YAAY,GAAG;IAC1B,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;IACL,KAAK;CACG,CAAC;AAEE,QAAA,eAAe,GAAG,QAAQ,CAAC;AAIxC,0BAA0B;AACb,QAAA,mBAAmB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAU,CAAC"}
|