@owneraio/finp2p-sdk-js 0.28.11 → 0.28.13

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.
Files changed (40) hide show
  1. package/lib/OwneraAPI/finp2p-node-api/__tests__/approvalsConfig.test.d.ts +1 -0
  2. package/lib/OwneraAPI/finp2p-node-api/__tests__/approvalsConfig.test.js +118 -0
  3. package/lib/OwneraAPI/finp2p-node-api/__tests__/approvalsConfig.test.js.map +1 -0
  4. package/lib/OwneraAPI/finp2p-node-api/approvalsConfig.d.ts +4 -0
  5. package/lib/OwneraAPI/finp2p-node-api/approvalsConfig.js +11 -0
  6. package/lib/OwneraAPI/finp2p-node-api/approvalsConfig.js.map +1 -0
  7. package/lib/OwneraAPI/finp2p-node-api/documents.js +9 -3
  8. package/lib/OwneraAPI/finp2p-node-api/documents.js.map +1 -1
  9. package/lib/OwneraAPI/finp2p-node-api/messages.js +9 -3
  10. package/lib/OwneraAPI/finp2p-node-api/messages.js.map +1 -1
  11. package/lib/OwneraAPI/index.js +11 -2
  12. package/lib/OwneraAPI/index.js.map +1 -1
  13. package/lib/OwneraAPI/oss-api/__tests__/getApproversConfig.test.d.ts +1 -0
  14. package/lib/OwneraAPI/oss-api/__tests__/getApproversConfig.test.js +261 -0
  15. package/lib/OwneraAPI/oss-api/__tests__/getApproversConfig.test.js.map +1 -0
  16. package/lib/OwneraAPI/oss-api/oss.js +94 -0
  17. package/lib/OwneraAPI/oss-api/oss.js.map +1 -1
  18. package/lib/OwneraAPI/payment-adapter-api/utils.d.ts +1 -1
  19. package/lib/OwneraAPI/payment-adapter-api/utils.js +5 -1
  20. package/lib/OwneraAPI/payment-adapter-api/utils.js.map +1 -1
  21. package/lib/OwneraAPI/utils.d.ts +5 -2
  22. package/lib/OwneraAPI/utils.js +31 -11
  23. package/lib/OwneraAPI/utils.js.map +1 -1
  24. package/lib/types/ApprovalsConfig/ApprovalsConfig.d.ts +41 -0
  25. package/lib/types/ApprovalsConfig/ApprovalsConfig.js +6 -0
  26. package/lib/types/ApprovalsConfig/ApprovalsConfig.js.map +1 -0
  27. package/lib/types/ApprovalsConfig/index.d.ts +1 -0
  28. package/lib/types/ApprovalsConfig/index.js +18 -0
  29. package/lib/types/ApprovalsConfig/index.js.map +1 -0
  30. package/lib/types/Commons/index.d.ts +1 -0
  31. package/lib/types/Core/OwneraAPI.d.ts +2 -0
  32. package/lib/types/Documents/Documents.d.ts +4 -1
  33. package/lib/types/Messages/Messages.d.ts +4 -1
  34. package/lib/types/Oss/Oss.d.ts +14 -0
  35. package/lib/types/Oss/OssResponses.d.ts +4 -1
  36. package/lib/types/Oss/OssSchemas.d.ts +7 -0
  37. package/lib/types/index.d.ts +1 -0
  38. package/lib/types/index.js +1 -0
  39. package/lib/types/index.js.map +1 -1
  40. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApprovalsConfig.js","sourceRoot":"","sources":["../../../src/types/ApprovalsConfig/ApprovalsConfig.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAAG,CAAC,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,WAAW,CAAU,CAAC;AAG9E,QAAA,cAAc,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,CAAU,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './ApprovalsConfig';
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ApprovalsConfig"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/ApprovalsConfig/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
@@ -8,4 +8,5 @@ export interface Operation {
8
8
  export interface RequestOptions {
9
9
  idempotency?: string;
10
10
  multipart?: boolean;
11
+ timeout?: number;
11
12
  }
@@ -1,3 +1,4 @@
1
+ import { ApprovalsConfig } from '../ApprovalsConfig';
1
2
  import { Config as AuthConfig } from '../Auth';
2
3
  import { Profiles } from '../Profiles';
3
4
  import { Documents } from '../Documents';
@@ -28,6 +29,7 @@ export interface OwneraAPIInterface {
28
29
  ledgers: Ledgers;
29
30
  custodies: Custodies;
30
31
  policies: Policies;
32
+ approvalsConfig: ApprovalsConfig;
31
33
  getPinningConfig: () => Promise<PinningConfigData[]>;
32
34
  createPinningConfig: (request: CreatePinningConfigRequest, options?: RequestOptions) => Promise<void>;
33
35
  updatePinningConfig: (request: UpdatePinningConfigRequest, options?: RequestOptions) => Promise<void>;
@@ -18,11 +18,14 @@ export interface Documents {
18
18
  * Get document
19
19
  *
20
20
  * @param r
21
+ * @param options Optional. `options.timeout` (ms) overrides the default
22
+ * download timeout for this single call; omit to use the connector default.
23
+ * See the implementation note in OwneraAPI/finp2p-node-api/documents.ts (#4645).
21
24
  *
22
25
  * @returns
23
26
  *
24
27
  */
25
- get(r: GetDocumentRequest): Promise<NodeJS.ReadableStream>;
28
+ get(r: GetDocumentRequest, options?: RequestOptions): Promise<NodeJS.ReadableStream>;
26
29
  /**
27
30
  * Update document
28
31
  *
@@ -17,11 +17,14 @@ export interface Messages {
17
17
  * Get attachment
18
18
  *
19
19
  * @param request
20
+ * @param options Optional. `options.timeout` (ms) overrides the default
21
+ * download timeout for this single call; omit to use the connector default.
22
+ * See the implementation note in OwneraAPI/finp2p-node-api/messages.ts (#4645).
20
23
  *
21
24
  * @returns
22
25
  *
23
26
  */
24
- getAttachment(request: GetAttachmentRequest): Promise<NodeJS.ReadableStream>;
27
+ getAttachment(request: GetAttachmentRequest, options?: RequestOptions): Promise<NodeJS.ReadableStream>;
25
28
  }
26
29
  export interface Attachment {
27
30
  id: string;
@@ -1,6 +1,7 @@
1
1
  import { Asset } from '../Profiles';
2
2
  import { GetAssetsFilter, GetAssetsWithSpecificIntentTypeFilter, GetUsersFilter, MappedUser, SubscribeRequestOss, ProfileType, IncomingMessage, OutgoingMessage, MappedUserHoldings, MappedLoanIntent, GetIssuerAssetsFilter, GetAllHoldingsFilter, GetExecutionPlansFilter } from './utils';
3
3
  import { Certificate } from '../Certificates';
4
+ import { ApproverConfig } from '../ApprovalsConfig';
4
5
  import { ReceiptSchemaOss, MinimizedAssetSchemaOss, LedgerSchemaOss, CustodyProviderSchemaOss } from './OssSchemas';
5
6
  import { UserAccount } from './OssResponses';
6
7
  import { ExecutionPlanLimitedData, ExecutionPlanStatus, GetExecutionPlanResponse, IntentData } from './ExecutionPlan';
@@ -328,6 +329,19 @@ export interface OSS {
328
329
  * @returns Array of {@link CustodyProviderSchemaOss}
329
330
  */
330
331
  getCustodyProviders: () => Promise<CustodyProviderSchemaOss[]>;
332
+ /**
333
+ * Get all approver configurations for the organization.
334
+ *
335
+ * Each OSS row carries a JSON-encoded `config` string whose decoded value
336
+ * is an array of approver entries. This method parses, coerces primitive
337
+ * string values inside each entry to their real types (booleans, numbers,
338
+ * arrays, objects — `timeout` is preserved as a string), validates the
339
+ * result, and flattens to one item per approver entry with the source
340
+ * row `id` attached.
341
+ *
342
+ * @returns Array of {@link ApproverConfig}
343
+ */
344
+ getApproversConfig: () => Promise<ApproverConfig[]>;
331
345
  /**
332
346
  * Execute a dynamic GraphQL query based on a query configuration
333
347
  *
@@ -1,6 +1,6 @@
1
1
  import { LedgerAssetInfo } from '../Profiles/Profile';
2
2
  import { assetFinP2PType } from '../utils';
3
- import { AssetsSchemaOss, CertificatesSchemaOss, UsersSchemaOss, TokensBalance, AccountIdentifierSchemaOss, ReceiptSchemaOss, MessageSchemaOss, Recipients, IntentsSchemaOss, MinimizedAssetsSchemaOss, FiatAssetSchemaOss, CryptocurrencySchemaOss, FinancialIdentifierOss, FinP2PAssetSchemaOss, LedgersSchemaOss, CustodyProvidersSchemaOss } from './OssSchemas';
3
+ import { AssetsSchemaOss, CertificatesSchemaOss, UsersSchemaOss, TokensBalance, AccountIdentifierSchemaOss, ReceiptSchemaOss, MessageSchemaOss, Recipients, IntentsSchemaOss, MinimizedAssetsSchemaOss, FiatAssetSchemaOss, CryptocurrencySchemaOss, FinancialIdentifierOss, FinP2PAssetSchemaOss, LedgersSchemaOss, CustodyProvidersSchemaOss, ApproverConfigsSchemaOss } from './OssSchemas';
4
4
  import { OrganizationData, ProfileType } from './utils';
5
5
  import { PageInfo } from './Pagination';
6
6
  export type CapTableIssuedTokenNode = Pick<TokensBalance, 'quantity' | 'userId'>;
@@ -173,6 +173,9 @@ export interface GetLedgersResponseOss {
173
173
  export interface GetCustodyProvidersResponseOss {
174
174
  custodyProviders: CustodyProvidersSchemaOss;
175
175
  }
176
+ export interface GetApproverConfigsResponseOss {
177
+ approvalConfigs: ApproverConfigsSchemaOss;
178
+ }
176
179
  export interface GetPinningConfigResponseOss {
177
180
  pinningConfig: {
178
181
  nodes: {
@@ -430,3 +430,10 @@ export interface CustodyProviderSchemaOss {
430
430
  export interface CustodyProvidersSchemaOss {
431
431
  nodes: CustodyProviderSchemaOss[];
432
432
  }
433
+ export interface ApproverConfigSchemaOss {
434
+ id: string;
435
+ config: string;
436
+ }
437
+ export interface ApproverConfigsSchemaOss {
438
+ nodes: ApproverConfigSchemaOss[];
439
+ }
@@ -1,3 +1,4 @@
1
+ export * from './ApprovalsConfig';
1
2
  export * from './Auth';
2
3
  export * from './Certificates';
3
4
  export * from './Commons';
@@ -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("./ApprovalsConfig"), exports);
17
18
  __exportStar(require("./Auth"), exports);
18
19
  __exportStar(require("./Certificates"), exports);
19
20
  __exportStar(require("./Commons"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB;AACvB,iDAA+B;AAC/B,4CAA0B;AAC1B,yCAAuB;AACvB,8CAA4B;AAC5B,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,oDAAkC;AAClC,yCAAuB;AACvB,iDAA+B;AAC/B,4CAA0B;AAC1B,yCAAuB;AACvB,8CAA4B;AAC5B,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/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.28.11",
5
+ "version": "0.28.13",
6
6
  "homepage": "https://ownera.io/",
7
7
  "scripts": {
8
8
  "build": "yarn clean && tsc",