@owneraio/finp2p-sdk-js 0.28.25 → 0.28.41

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 (205) hide show
  1. package/README.md +71 -1
  2. package/lib/OwneraAPI/__tests__/apiErrorShape.test.d.ts +1 -0
  3. package/lib/OwneraAPI/__tests__/apiErrorShape.test.js +264 -0
  4. package/lib/OwneraAPI/__tests__/apiErrorShape.test.js.map +1 -0
  5. package/lib/OwneraAPI/finp2p-node-api/__tests__/approvalsConfig.test.js +5 -12
  6. package/lib/OwneraAPI/finp2p-node-api/__tests__/approvalsConfig.test.js.map +1 -1
  7. package/lib/OwneraAPI/finp2p-node-api/__tests__/createIntentMetadata.test.d.ts +1 -0
  8. package/lib/OwneraAPI/finp2p-node-api/__tests__/createIntentMetadata.test.js +56 -0
  9. package/lib/OwneraAPI/finp2p-node-api/__tests__/createIntentMetadata.test.js.map +1 -0
  10. package/lib/OwneraAPI/finp2p-node-api/__tests__/dryRunExecute.test.d.ts +1 -0
  11. package/lib/OwneraAPI/finp2p-node-api/__tests__/dryRunExecute.test.js +75 -0
  12. package/lib/OwneraAPI/finp2p-node-api/__tests__/dryRunExecute.test.js.map +1 -0
  13. package/lib/OwneraAPI/finp2p-node-api/__tests__/pathEncoding.test.d.ts +1 -0
  14. package/lib/OwneraAPI/finp2p-node-api/__tests__/pathEncoding.test.js +348 -0
  15. package/lib/OwneraAPI/finp2p-node-api/__tests__/pathEncoding.test.js.map +1 -0
  16. package/lib/OwneraAPI/finp2p-node-api/__tests__/rejectIntent.test.d.ts +1 -0
  17. package/lib/OwneraAPI/finp2p-node-api/__tests__/rejectIntent.test.js +97 -0
  18. package/lib/OwneraAPI/finp2p-node-api/__tests__/rejectIntent.test.js.map +1 -0
  19. package/lib/OwneraAPI/finp2p-node-api/certificates.js +15 -6
  20. package/lib/OwneraAPI/finp2p-node-api/certificates.js.map +1 -1
  21. package/lib/OwneraAPI/finp2p-node-api/custodies.js +13 -2
  22. package/lib/OwneraAPI/finp2p-node-api/custodies.js.map +1 -1
  23. package/lib/OwneraAPI/finp2p-node-api/documents.js +22 -9
  24. package/lib/OwneraAPI/finp2p-node-api/documents.js.map +1 -1
  25. package/lib/OwneraAPI/finp2p-node-api/investorAccounts.d.ts +13 -0
  26. package/lib/OwneraAPI/finp2p-node-api/investorAccounts.js +71 -0
  27. package/lib/OwneraAPI/finp2p-node-api/investorAccounts.js.map +1 -0
  28. package/lib/OwneraAPI/finp2p-node-api/ledgers.js +13 -2
  29. package/lib/OwneraAPI/finp2p-node-api/ledgers.js.map +1 -1
  30. package/lib/OwneraAPI/finp2p-node-api/messages.js +12 -3
  31. package/lib/OwneraAPI/finp2p-node-api/messages.js.map +1 -1
  32. package/lib/OwneraAPI/finp2p-node-api/operations.js +37 -15
  33. package/lib/OwneraAPI/finp2p-node-api/operations.js.map +1 -1
  34. package/lib/OwneraAPI/finp2p-node-api/policies.js +14 -5
  35. package/lib/OwneraAPI/finp2p-node-api/policies.js.map +1 -1
  36. package/lib/OwneraAPI/finp2p-node-api/profiles.js +95 -49
  37. package/lib/OwneraAPI/finp2p-node-api/profiles.js.map +1 -1
  38. package/lib/OwneraAPI/finp2p-node-api/tokens.js +20 -0
  39. package/lib/OwneraAPI/finp2p-node-api/tokens.js.map +1 -1
  40. package/lib/OwneraAPI/index.js +2 -0
  41. package/lib/OwneraAPI/index.js.map +1 -1
  42. package/lib/OwneraAPI/oss-api/__tests__/buildGraphQLQuery.test.d.ts +1 -0
  43. package/lib/OwneraAPI/oss-api/__tests__/buildGraphQLQuery.test.js +253 -0
  44. package/lib/OwneraAPI/oss-api/__tests__/buildGraphQLQuery.test.js.map +1 -0
  45. package/lib/OwneraAPI/oss-api/__tests__/getAllExecutionPlans.test.js +52 -0
  46. package/lib/OwneraAPI/oss-api/__tests__/getAllExecutionPlans.test.js.map +1 -1
  47. package/lib/OwneraAPI/oss-api/__tests__/ossQueryEscaping.test.d.ts +1 -0
  48. package/lib/OwneraAPI/oss-api/__tests__/ossQueryEscaping.test.js +347 -0
  49. package/lib/OwneraAPI/oss-api/__tests__/ossQueryEscaping.test.js.map +1 -0
  50. package/lib/OwneraAPI/oss-api/filterUtils.d.ts +20 -0
  51. package/lib/OwneraAPI/oss-api/filterUtils.js +57 -5
  52. package/lib/OwneraAPI/oss-api/filterUtils.js.map +1 -1
  53. package/lib/OwneraAPI/oss-api/oss.js +188 -75
  54. package/lib/OwneraAPI/oss-api/oss.js.map +1 -1
  55. package/lib/OwneraAPI/oss-api/queryUtils.d.ts +1 -0
  56. package/lib/OwneraAPI/oss-api/queryUtils.js +6 -5
  57. package/lib/OwneraAPI/oss-api/queryUtils.js.map +1 -1
  58. package/lib/OwneraAPI/oss-api/queryValidation.d.ts +3 -1
  59. package/lib/OwneraAPI/oss-api/queryValidation.js +21 -2
  60. package/lib/OwneraAPI/oss-api/queryValidation.js.map +1 -1
  61. package/lib/OwneraAPI/payment-adapter-api/__tests__/updateBalance.test.d.ts +1 -0
  62. package/lib/OwneraAPI/payment-adapter-api/__tests__/updateBalance.test.js +42 -0
  63. package/lib/OwneraAPI/payment-adapter-api/__tests__/updateBalance.test.js.map +1 -0
  64. package/lib/OwneraAPI/payment-adapter-api/vanilla/__tests__/payouts.test.d.ts +1 -0
  65. package/lib/OwneraAPI/payment-adapter-api/vanilla/__tests__/payouts.test.js +73 -0
  66. package/lib/OwneraAPI/payment-adapter-api/vanilla/__tests__/payouts.test.js.map +1 -0
  67. package/lib/OwneraAPI/payment-adapter-api/vanilla/payouts.js +23 -11
  68. package/lib/OwneraAPI/payment-adapter-api/vanilla/payouts.js.map +1 -1
  69. package/lib/OwneraAPI/payment-adapter-api/vanilla/update-balance.d.ts +1 -1
  70. package/lib/OwneraAPI/payment-adapter-api/vanilla/update-balance.js +3 -1
  71. package/lib/OwneraAPI/payment-adapter-api/vanilla/update-balance.js.map +1 -1
  72. package/lib/OwneraAPI/utils.d.ts +39 -0
  73. package/lib/OwneraAPI/utils.js +125 -73
  74. package/lib/OwneraAPI/utils.js.map +1 -1
  75. package/lib/core/__tests__/consoleLogger.test.d.ts +1 -0
  76. package/lib/core/__tests__/consoleLogger.test.js +269 -0
  77. package/lib/core/__tests__/consoleLogger.test.js.map +1 -0
  78. package/lib/core/__tests__/createAssetNameUniqueness.test.d.ts +1 -0
  79. package/lib/core/__tests__/createAssetNameUniqueness.test.js +95 -0
  80. package/lib/core/__tests__/createAssetNameUniqueness.test.js.map +1 -0
  81. package/lib/core/__tests__/custodianPrecedence.test.d.ts +1 -0
  82. package/lib/core/__tests__/custodianPrecedence.test.js +683 -0
  83. package/lib/core/__tests__/custodianPrecedence.test.js.map +1 -0
  84. package/lib/core/__tests__/executeIntentSettlementAssets.test.d.ts +1 -0
  85. package/lib/core/__tests__/executeIntentSettlementAssets.test.js +128 -0
  86. package/lib/core/__tests__/executeIntentSettlementAssets.test.js.map +1 -0
  87. package/lib/core/__tests__/logException.test.d.ts +1 -0
  88. package/lib/core/__tests__/logException.test.js +49 -0
  89. package/lib/core/__tests__/logException.test.js.map +1 -0
  90. package/lib/core/__tests__/multiplyDecimalStrings.test.d.ts +1 -0
  91. package/lib/core/__tests__/multiplyDecimalStrings.test.js +37 -0
  92. package/lib/core/__tests__/multiplyDecimalStrings.test.js.map +1 -0
  93. package/lib/core/__tests__/settlementExecutionAmount.test.d.ts +1 -0
  94. package/lib/core/__tests__/settlementExecutionAmount.test.js +300 -0
  95. package/lib/core/__tests__/settlementExecutionAmount.test.js.map +1 -0
  96. package/lib/core/asset.js +21 -27
  97. package/lib/core/asset.js.map +1 -1
  98. package/lib/core/custodian.d.ts +30 -0
  99. package/lib/core/custodian.js +49 -0
  100. package/lib/core/custodian.js.map +1 -0
  101. package/lib/core/index.d.ts +1 -0
  102. package/lib/core/index.js +3 -1
  103. package/lib/core/index.js.map +1 -1
  104. package/lib/core/intents/__tests__/intentErrorCode.test.d.ts +1 -0
  105. package/lib/core/intents/__tests__/intentErrorCode.test.js +111 -0
  106. package/lib/core/intents/__tests__/intentErrorCode.test.js.map +1 -0
  107. package/lib/core/intents/__tests__/intentHandleReject.test.d.ts +1 -0
  108. package/lib/core/intents/__tests__/intentHandleReject.test.js +50 -0
  109. package/lib/core/intents/__tests__/intentHandleReject.test.js.map +1 -0
  110. package/lib/core/intents/__tests__/loanIntentAdditionalAccounts.test.d.ts +1 -0
  111. package/lib/core/intents/__tests__/loanIntentAdditionalAccounts.test.js +185 -0
  112. package/lib/core/intents/__tests__/loanIntentAdditionalAccounts.test.js.map +1 -0
  113. package/lib/core/intents/__tests__/loanIntentCustodianPrecedence.test.d.ts +1 -0
  114. package/lib/core/intents/__tests__/loanIntentCustodianPrecedence.test.js +85 -0
  115. package/lib/core/intents/__tests__/loanIntentCustodianPrecedence.test.js.map +1 -0
  116. package/lib/core/intents/__tests__/loanIntentMetadata.test.d.ts +1 -0
  117. package/lib/core/intents/__tests__/loanIntentMetadata.test.js +81 -0
  118. package/lib/core/intents/__tests__/loanIntentMetadata.test.js.map +1 -0
  119. package/lib/core/intents/__tests__/moveIntentSegregatedAccounts.test.d.ts +1 -0
  120. package/lib/core/intents/__tests__/moveIntentSegregatedAccounts.test.js +203 -0
  121. package/lib/core/intents/__tests__/moveIntentSegregatedAccounts.test.js.map +1 -0
  122. package/lib/core/intents/createIntent/createIntent.js +4 -3
  123. package/lib/core/intents/createIntent/createIntent.js.map +1 -1
  124. package/lib/core/intents/createIntent/createMoveIntentReq.d.ts +27 -0
  125. package/lib/core/intents/createIntent/createMoveIntentReq.js +91 -0
  126. package/lib/core/intents/createIntent/createMoveIntentReq.js.map +1 -0
  127. package/lib/core/intents/createIntent/helpers.d.ts +32 -2
  128. package/lib/core/intents/createIntent/helpers.js +78 -1
  129. package/lib/core/intents/createIntent/helpers.js.map +1 -1
  130. package/lib/core/intents/createLoanIntent.js +64 -19
  131. package/lib/core/intents/createLoanIntent.js.map +1 -1
  132. package/lib/core/intents/executeIntent.js +102 -41
  133. package/lib/core/intents/executeIntent.js.map +1 -1
  134. package/lib/core/intents/executeLoanIntent.js +48 -23
  135. package/lib/core/intents/executeLoanIntent.js.map +1 -1
  136. package/lib/core/intents/executeMoveIntent.d.ts +19 -0
  137. package/lib/core/intents/executeMoveIntent.js +134 -0
  138. package/lib/core/intents/executeMoveIntent.js.map +1 -0
  139. package/lib/core/intents/executePrivateIntent.js +46 -13
  140. package/lib/core/intents/executePrivateIntent.js.map +1 -1
  141. package/lib/core/intents/executeRedemptionIntent.d.ts +1 -0
  142. package/lib/core/intents/executeRedemptionIntent.js +23 -9
  143. package/lib/core/intents/executeRedemptionIntent.js.map +1 -1
  144. package/lib/core/intents/executeTransferRequest.d.ts +5 -0
  145. package/lib/core/intents/executeTransferRequest.js +14 -3
  146. package/lib/core/intents/executeTransferRequest.js.map +1 -1
  147. package/lib/core/intents/getIntent.js +18 -0
  148. package/lib/core/intents/getIntent.js.map +1 -1
  149. package/lib/core/intents/index.d.ts +3 -0
  150. package/lib/core/intents/index.js +7 -1
  151. package/lib/core/intents/index.js.map +1 -1
  152. package/lib/core/intents/transfer.js +7 -2
  153. package/lib/core/intents/transfer.js.map +1 -1
  154. package/lib/core/intents/updateMoveIntentReq.d.ts +28 -0
  155. package/lib/core/intents/updateMoveIntentReq.js +94 -0
  156. package/lib/core/intents/updateMoveIntentReq.js.map +1 -0
  157. package/lib/core/intents/utils.d.ts +15 -7
  158. package/lib/core/intents/utils.js +36 -26
  159. package/lib/core/intents/utils.js.map +1 -1
  160. package/lib/core/logger.js +128 -22
  161. package/lib/core/logger.js.map +1 -1
  162. package/lib/core/normalizers/__tests__/normalizeOperationResponse.test.d.ts +1 -0
  163. package/lib/core/normalizers/__tests__/normalizeOperationResponse.test.js +60 -0
  164. package/lib/core/normalizers/__tests__/normalizeOperationResponse.test.js.map +1 -0
  165. package/lib/core/normalizers/normalizeOperationResponse.d.ts +6 -0
  166. package/lib/core/normalizers/normalizeOperationResponse.js +4 -5
  167. package/lib/core/normalizers/normalizeOperationResponse.js.map +1 -1
  168. package/lib/core/sdk.d.ts +4 -0
  169. package/lib/core/sdk.js +2 -2
  170. package/lib/core/sdk.js.map +1 -1
  171. package/lib/core/user.d.ts +2 -2
  172. package/lib/core/user.js +60 -2
  173. package/lib/core/user.js.map +1 -1
  174. package/lib/core/utils.d.ts +17 -1
  175. package/lib/core/utils.js +75 -16
  176. package/lib/core/utils.js.map +1 -1
  177. package/lib/index.d.ts +1 -0
  178. package/lib/index.js +3 -1
  179. package/lib/index.js.map +1 -1
  180. package/lib/types/Core/Intents.d.ts +243 -2
  181. package/lib/types/Core/Intents.js +9 -0
  182. package/lib/types/Core/Intents.js.map +1 -1
  183. package/lib/types/Core/OwneraAPI.d.ts +21 -1
  184. package/lib/types/Core/User.d.ts +62 -4
  185. package/lib/types/InvestorAccounts/InvestorAccounts.d.ts +171 -0
  186. package/lib/types/InvestorAccounts/InvestorAccounts.js +35 -0
  187. package/lib/types/InvestorAccounts/InvestorAccounts.js.map +1 -0
  188. package/lib/types/InvestorAccounts/index.d.ts +1 -0
  189. package/lib/types/InvestorAccounts/index.js +18 -0
  190. package/lib/types/InvestorAccounts/index.js.map +1 -0
  191. package/lib/types/Operations/Operations.d.ts +11 -0
  192. package/lib/types/Oss/Oss.d.ts +18 -1
  193. package/lib/types/Oss/OssSchemas.d.ts +89 -2
  194. package/lib/types/Oss/OssSchemas.js.map +1 -1
  195. package/lib/types/Oss/utils.d.ts +32 -0
  196. package/lib/types/PaymentAdapter/PaymentAdapter.d.ts +7 -0
  197. package/lib/types/PaymentAdapter/index.d.ts +33 -1
  198. package/lib/types/Profiles/Accounts.d.ts +32 -0
  199. package/lib/types/Profiles/Intents.d.ts +58 -3
  200. package/lib/types/Profiles/Profiles.d.ts +71 -2
  201. package/lib/types/Tokens/Tokens.d.ts +111 -1
  202. package/lib/types/index.d.ts +1 -0
  203. package/lib/types/index.js +1 -0
  204. package/lib/types/index.js.map +1 -1
  205. package/package.json +1 -1
@@ -13,6 +13,7 @@ import { Operations } from '../Operations';
13
13
  import { Logger, LogLevel } from './Logger';
14
14
  import { Messages } from '../Messages';
15
15
  import { Ledgers, Custodies } from '../Ledgers';
16
+ import { InvestorAccounts } from '../InvestorAccounts';
16
17
  import { Policies } from '../Policies';
17
18
  import { PinningConfigData, CreatePinningConfigRequest, UpdatePinningConfigRequest, DeletePinningConfigRequest } from '../PinningConfig';
18
19
  import { RequestOptions } from '../Commons';
@@ -29,6 +30,7 @@ export interface OwneraAPIInterface {
29
30
  messages: Messages;
30
31
  ledgers: Ledgers;
31
32
  custodies: Custodies;
33
+ investorAccounts: InvestorAccounts;
32
34
  policies: Policies;
33
35
  approvalsConfig: ApprovalsConfig;
34
36
  data: DataApi;
@@ -39,7 +41,25 @@ export interface OwneraAPIInterface {
39
41
  }
40
42
  export interface OwneraAPICommonOptions {
41
43
  orgId: string;
42
- custodianOrgId: string;
44
+ /**
45
+ * Default custodian for this client — used whenever a call does not determine a custodian of
46
+ * its own.
47
+ *
48
+ * A custodian is decided per investor account. Each stamping site resolves it from two
49
+ * preferred inputs — the custodian already on the account (from the intent, or the account
50
+ * passed with the call) and a custodian passed with the call — with this default always the
51
+ * terminal step. Which preferred input wins depends on whose account is being stamped: when it
52
+ * is the executor's own account the per-call value wins, and when it is the counterparty's the
53
+ * intent's value is authoritative (see the README "Custodian org id" section for the per-flow
54
+ * order). Per-call fields: `user.addAccount({ custodianOrgId })`,
55
+ * `Transfer.source/destinationFallbackCustodianOrgId`, `IntentExecution.source/destinationCustodianOrgId`,
56
+ * `CreatePrimarySale.custodianOrgId`, `LoanIntent*.source/destinationCustodianOrgId`.
57
+ *
58
+ * Optional: omit it if every call supplies its own custodian. If a call falls through to this
59
+ * default and none is configured, it fails with a `CustodianOrgIdError` naming the flow — a
60
+ * custodian is required, and an empty value is rejected by the Router.
61
+ */
62
+ custodianOrgId?: string;
43
63
  owneraAPIAddress: string;
44
64
  owneraOssURL?: string;
45
65
  owneraFinp2pURL?: string;
@@ -1,6 +1,6 @@
1
1
  import { IdResponse } from '../Commons';
2
2
  import { CertificateInterface } from './Certificates';
3
- import { CreateIntent, CreateLoanIntent, CreateTransferRequest, IntentExecution, IntentInterface, LoanIntentExecutionData, Transfer } from './Intents';
3
+ import { CreateIntent, CreateLoanIntent, CreateMoveIntent, CreateTransferRequest, IntentExecution, IntentInterface, LoanIntentExecutionData, MoveIntentExecutionData, Transfer, UpdateMoveIntent } from './Intents';
4
4
  import { MappedUser, ReceiptSchemaOss } from '../Oss';
5
5
  import { PaymentAccountResponse } from '../PaymentAdapter';
6
6
  import { ExecuteResponse } from '../Tokens';
@@ -11,16 +11,36 @@ import { MessageOperation } from '../Messages';
11
11
  import { IncomingMessage, OutgoingMessage } from '../Oss/utils';
12
12
  import { CoreRequestOptions } from './Options';
13
13
  import { AddAccountOperation, DataAccessPermission, FinP2PAsset, UpdateTransferRequestIntentRequest } from '../Profiles';
14
+ /**
15
+ * Options for {@link UserInterface.addAccount}.
16
+ */
17
+ export interface AddAccountOptions extends CoreRequestOptions {
18
+ /**
19
+ * Organization that custodies the new account. Defaults to the Sdk's
20
+ * {@link SdkOptions.custodianOrgId}.
21
+ *
22
+ * One of the two must be set: with neither, the call fails with a `CustodianOrgIdError`.
23
+ */
24
+ custodianOrgId?: string;
25
+ }
14
26
  /**
15
27
  * User Interface allow to interact with system user data, create certificates, intents, share the user, etc.
16
28
  */
17
29
  export interface UserInterface extends IdResponse {
18
30
  /**
19
- * Get user data
20
- * @param options Options. See {@link CoreRequestOptions}
31
+ * Create a finId account for this user, custodied at a given organization.
32
+ *
33
+ * The custodian is fixed at creation and cannot be changed afterwards, so prefer passing
34
+ * `custodianOrgId` explicitly. When omitted, the Sdk's default
35
+ * {@link SdkOptions.custodianOrgId} is used.
36
+ *
37
+ * The resolved custodian is echoed back as `response.custodyOrgId` — verify it matches
38
+ * what was requested.
39
+ *
40
+ * @param options Options. See {@link AddAccountOptions}
21
41
  * @returns Promise with object. See {@link AddAccountOperation}
22
42
  */
23
- addAccount: (options?: CoreRequestOptions) => Promise<AddAccountOperation>;
43
+ addAccount: (options?: AddAccountOptions) => Promise<AddAccountOperation>;
24
44
  /**
25
45
  * Get user data
26
46
  * @returns Promise with object. See {@link MappedUser}
@@ -175,8 +195,13 @@ export interface UserInterface extends IdResponse {
175
195
  executeTransferRequest: (data: {
176
196
  intentId: string;
177
197
  assetId: string;
198
+ destinationAssetId?: string;
178
199
  executionId?: string;
179
200
  observers?: string[];
201
+ /** Custodian of the SENDER's account — sender and receiver are two different owners. */
202
+ sourceCustodianOrgId?: string;
203
+ /** Custodian of the RECEIVER's account. */
204
+ destinationCustodianOrgId?: string;
180
205
  }, options?: CoreRequestOptions) => Promise<any>;
181
206
  /**
182
207
  * Update transfer request
@@ -188,6 +213,39 @@ export interface UserInterface extends IdResponse {
188
213
  *
189
214
  */
190
215
  updateTransferRequest: (data: UpdateTransferRequestIntentRequest, options?: CoreRequestOptions) => Promise<any>;
216
+ /**
217
+ * Create move intent
218
+ *
219
+ * The issuer declares a migration path from a source asset to a destination
220
+ * asset. Executed later by any holder via {@link executeMoveIntent}.
221
+ *
222
+ * @param createMoveIntent Request. See {@link CreateMoveIntent}
223
+ * @param options Options. See {@link CoreRequestOptions}
224
+ * @returns Promise with object. See {@link IdResponse}
225
+ */
226
+ createMoveIntent: (createMoveIntent: CreateMoveIntent, options?: CoreRequestOptions) => Promise<IdResponse>;
227
+ /**
228
+ * Update move intent
229
+ *
230
+ * Replaces a move intent's allowed destination assets (the source asset is
231
+ * immutable). Resolves each destination's CAIP-19 identifier, mirroring
232
+ * {@link createMoveIntent}, so callers pass SDK-facing `FinP2PAsset`s.
233
+ *
234
+ * @param updateMoveIntent Request. See {@link UpdateMoveIntent}
235
+ * @param options Options. See {@link CoreRequestOptions}
236
+ * @returns Promise that resolves when the intent is updated
237
+ */
238
+ updateMoveIntent: (updateMoveIntent: UpdateMoveIntent, options?: CoreRequestOptions) => Promise<void>;
239
+ /**
240
+ * Execute move intent
241
+ *
242
+ * The holder migrates their holding to the chosen destination asset.
243
+ *
244
+ * @param data Request. See {@link MoveIntentExecutionData}
245
+ * @param options Options. See {@link CoreRequestOptions}
246
+ * @returns Promise with object. See {@link ExecuteResponse}
247
+ */
248
+ executeMoveIntent: (data: MoveIntentExecutionData, options?: CoreRequestOptions) => Promise<ExecuteResponse>;
191
249
  }
192
250
  export interface SendMessageRequestFromClient {
193
251
  assetId: string;
@@ -0,0 +1,171 @@
1
+ import { Operation, RequestOptions } from '../Commons';
2
+ /**
3
+ * REST wire shape of the network-account union
4
+ * (`common-external-components.yaml#/components/schemas/networkAccount`).
5
+ * Discriminated by the literal `type` field. Distinct from the OSS read-model
6
+ * union, which discriminates by `__typename` and whose WalletAccount `type`
7
+ * carries the ledger discriminator (e.g. "ethereum"), not a literal.
8
+ */
9
+ export interface WalletNetworkAccount {
10
+ type: 'walletAccount';
11
+ /** Address of the wallet. */
12
+ address: string;
13
+ }
14
+ export interface Caip10NetworkAccount {
15
+ type: 'caip10Account';
16
+ /** CAIP-2 chain id, e.g. "eip155:1" — the same token used by CAIP-19 asset identifiers. */
17
+ network: string;
18
+ /** CAIP-10 account address on that chain. */
19
+ address: string;
20
+ }
21
+ export interface CustodialNetworkAccount {
22
+ type: 'custodialAccount';
23
+ /** Custody provider discriminator, e.g. "fireblocks". */
24
+ provider: string;
25
+ /** Provider-internal vault/account id (spans chains; not an on-chain address). */
26
+ vaultAccountId: string;
27
+ /** Optional narrowing to a chain/asset within the provider. */
28
+ assetId?: string;
29
+ }
30
+ export type NetworkAccount = WalletNetworkAccount | Caip10NetworkAccount | CustodialNetworkAccount;
31
+ /**
32
+ * Ledger-adapter-issued challenge for an investor network-account operation,
33
+ * surfaced on `GET /operations/status/{cid}` while the workflow is parked
34
+ * (`isCompleted: false`). Discriminated by `type`
35
+ * (`application-api.base.yaml#/components/schemas/networkAccountChallenge`).
36
+ * New variants may be added by the platform without breaking existing clients —
37
+ * render unknown types as an opaque blob rather than failing.
38
+ */
39
+ export interface SignatureTemplateChallenge {
40
+ type: 'signatureTemplate';
41
+ /** Hex-encoded payload the wallet must sign; submit via submitProof. */
42
+ payload: string;
43
+ }
44
+ export interface WalletConnectChallenge {
45
+ type: 'walletConnect';
46
+ /** WalletConnect URI to approve (fulfilled out-of-band). */
47
+ uri: string;
48
+ }
49
+ export interface DepositChallenge {
50
+ type: 'deposit';
51
+ fromAddress: string;
52
+ toAddress: string;
53
+ amount: string;
54
+ }
55
+ export interface FireblocksApprovalChallenge {
56
+ type: 'fireblocksApproval';
57
+ /** Fireblocks request id awaiting approval in the Fireblocks app. */
58
+ requestId: string;
59
+ }
60
+ export type NetworkAccountChallenge = SignatureTemplateChallenge | WalletConnectChallenge | DepositChallenge | FireblocksApprovalChallenge;
61
+ /**
62
+ * `GET /operations/status/{cid}` shape for investor-account workflows — they
63
+ * ride the `workflow` operation variant. `challenge` is present only while the
64
+ * operation is parked on a ledger-adapter challenge. The success result carries
65
+ * no payload (the bound account is read back from the OSS read model —
66
+ * `getUserNetworkAccounts`).
67
+ */
68
+ export interface InvestorAccountOperation extends Operation {
69
+ type?: 'workflow';
70
+ metadata?: Record<string, unknown>;
71
+ challenge?: NetworkAccountChallenge;
72
+ response?: {
73
+ type: 'error';
74
+ errors: {
75
+ code: number;
76
+ message: string;
77
+ }[];
78
+ } | {
79
+ type: 'success';
80
+ };
81
+ }
82
+ /** Request for `POST /profiles/investor/{investorId}/account/create` — the LA generates a wallet on the asset's network. */
83
+ export interface CreateInvestorAccountRequest {
84
+ investorId: string;
85
+ organizationId: string;
86
+ assetId: string;
87
+ }
88
+ /** Request for `POST /profiles/investor/{investorId}/account/bind` — caller supplies an external account they own. */
89
+ export interface BindInvestorAccountRequest extends CreateInvestorAccountRequest {
90
+ networkAccount: NetworkAccount;
91
+ /**
92
+ * Optional hex-encoded proof-of-ownership signature over the network
93
+ * account. The canonical flow is challenge-first — the vanilla LA always
94
+ * answers a bind with a signatureTemplate challenge (regular and proxy
95
+ * adapter alike) and ownership is proven via `submitProof` — so callers
96
+ * normally omit this. Supply it only for adapters that accept an upfront
97
+ * hint; final verification is via the LA challenge either way.
98
+ */
99
+ ownershipSignature?: string;
100
+ }
101
+ /** Request for `POST /profiles/investor/{investorId}/account/proof` — signatureTemplate challenges only. */
102
+ export interface SubmitInvestorAccountProofRequest {
103
+ investorId: string;
104
+ /** Correlation id of the account workflow awaiting the proof. */
105
+ cid: string;
106
+ /** Hex-encoded signature over the LA-issued signatureTemplate payload. */
107
+ ownershipSignature: string;
108
+ }
109
+ /** Request for `DELETE /profiles/investor/{investorId}/account/{accountId}` — unbind. */
110
+ export interface RemoveInvestorAccountRequest {
111
+ investorId: string;
112
+ /** LA-assigned account identifier (from the OSS read model). */
113
+ accountId: string;
114
+ }
115
+ /**
116
+ * Platform error codes for investor-account operations
117
+ * (`owneraio/pkg/errorcodes`, Account*Err). Surfaced on the operation's error
118
+ * response and on synchronous rejections.
119
+ */
120
+ export declare const INVESTOR_ACCOUNT_ERROR_CODES: {
121
+ /** 404 — investor resource not found for an account operation. */
122
+ readonly INVESTOR_NOT_FOUND: 7340;
123
+ /** 404 — asset not found or not accessible to the calling organization. */
124
+ readonly ASSET_NOT_FOUND: 7341;
125
+ /** 400 — the supplied network account payload failed validation. */
126
+ readonly INVALID_SHAPE: 7342;
127
+ /** 502 — the ledger adapter failed the account create/bind operation. */
128
+ readonly LA_FAILED: 7343;
129
+ /** 409 — the network account is already bound for this investor/asset/org. */
130
+ readonly ALREADY_BOUND: 7344;
131
+ /** 401 — ownership signature verification failed. */
132
+ readonly BAD_SIGNATURE: 7345;
133
+ /** 408 — the challenge was not fulfilled within the ledger-supplied expiry. */
134
+ readonly CHALLENGE_TIMEOUT: 7346;
135
+ /** 502 — the ledger adapter failed the unbind operation. */
136
+ readonly UNBIND_LA_FAILED: 7347;
137
+ /** 404 — the referenced account id or operation cid was not found. */
138
+ readonly ACCOUNT_NOT_FOUND: 7348;
139
+ /** 409 — the operation is not valid for the current workflow state. */
140
+ readonly INVALID_STATE: 7349;
141
+ /** 502 — the LA issued a challenge type the router cannot represent. */
142
+ readonly UNSUPPORTED_CHALLENGE: 7350;
143
+ /** 400 — an explicitly supplied account is not whitelisted for the investor on this org/asset. */
144
+ readonly NOT_WHITELISTED: 7351;
145
+ };
146
+ /**
147
+ * Investor network-account onboarding API
148
+ * (`/profiles/investor/{investorId}/account/*`, platform release-v0.28+).
149
+ *
150
+ * All four calls are asynchronous: they return `202 { cid, isCompleted: false }`
151
+ * and the workflow is tracked via `operations.investorAccountOperationStatus`.
152
+ * There is no list endpoint and no cancel (removed platform-wide — an unwanted
153
+ * operation can only expire); bound accounts are read from the OSS read model
154
+ * via `query.getUserNetworkAccounts`.
155
+ *
156
+ * `options.idempotency` (the `Idempotency-Key` header) is REQUIRED by the
157
+ * platform on every call — hence the non-optional `options` parameter — and
158
+ * MUST be a hex-encoded nonce: the router hex-decodes it and rejects anything
159
+ * else with 422 ("invalid idempotency key format"). Use
160
+ * `sdk.utils.generateIdempotencyKey()`, which produces exactly that.
161
+ */
162
+ export interface InvestorAccounts {
163
+ /** Create a new LA-generated account for the investor on (organizationId, assetId). */
164
+ createAccount(request: CreateInvestorAccountRequest, options: RequestOptions): Promise<Operation>;
165
+ /** Bind an existing caller-supplied account (challenge-first: ownership is proven via submitProof). */
166
+ bindAccount(request: BindInvestorAccountRequest, options: RequestOptions): Promise<Operation>;
167
+ /** Submit the signature for a pending signatureTemplate challenge. */
168
+ submitProof(request: SubmitInvestorAccountProofRequest, options: RequestOptions): Promise<Operation>;
169
+ /** Unbind a previously bound account. */
170
+ removeAccount(request: RemoveInvestorAccountRequest, options: RequestOptions): Promise<Operation>;
171
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INVESTOR_ACCOUNT_ERROR_CODES = void 0;
4
+ /**
5
+ * Platform error codes for investor-account operations
6
+ * (`owneraio/pkg/errorcodes`, Account*Err). Surfaced on the operation's error
7
+ * response and on synchronous rejections.
8
+ */
9
+ exports.INVESTOR_ACCOUNT_ERROR_CODES = {
10
+ /** 404 — investor resource not found for an account operation. */
11
+ INVESTOR_NOT_FOUND: 7340,
12
+ /** 404 — asset not found or not accessible to the calling organization. */
13
+ ASSET_NOT_FOUND: 7341,
14
+ /** 400 — the supplied network account payload failed validation. */
15
+ INVALID_SHAPE: 7342,
16
+ /** 502 — the ledger adapter failed the account create/bind operation. */
17
+ LA_FAILED: 7343,
18
+ /** 409 — the network account is already bound for this investor/asset/org. */
19
+ ALREADY_BOUND: 7344,
20
+ /** 401 — ownership signature verification failed. */
21
+ BAD_SIGNATURE: 7345,
22
+ /** 408 — the challenge was not fulfilled within the ledger-supplied expiry. */
23
+ CHALLENGE_TIMEOUT: 7346,
24
+ /** 502 — the ledger adapter failed the unbind operation. */
25
+ UNBIND_LA_FAILED: 7347,
26
+ /** 404 — the referenced account id or operation cid was not found. */
27
+ ACCOUNT_NOT_FOUND: 7348,
28
+ /** 409 — the operation is not valid for the current workflow state. */
29
+ INVALID_STATE: 7349,
30
+ /** 502 — the LA issued a challenge type the router cannot represent. */
31
+ UNSUPPORTED_CHALLENGE: 7350,
32
+ /** 400 — an explicitly supplied account is not whitelisted for the investor on this org/asset. */
33
+ NOT_WHITELISTED: 7351,
34
+ };
35
+ //# sourceMappingURL=InvestorAccounts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InvestorAccounts.js","sourceRoot":"","sources":["../../../src/types/InvestorAccounts/InvestorAccounts.ts"],"names":[],"mappings":";;;AA6HA;;;;GAIG;AACU,QAAA,4BAA4B,GAAG;IAC1C,kEAAkE;IAClE,kBAAkB,EAAE,IAAI;IACxB,2EAA2E;IAC3E,eAAe,EAAE,IAAI;IACrB,oEAAoE;IACpE,aAAa,EAAE,IAAI;IACnB,yEAAyE;IACzE,SAAS,EAAE,IAAI;IACf,8EAA8E;IAC9E,aAAa,EAAE,IAAI;IACnB,qDAAqD;IACrD,aAAa,EAAE,IAAI;IACnB,+EAA+E;IAC/E,iBAAiB,EAAE,IAAI;IACvB,4DAA4D;IAC5D,gBAAgB,EAAE,IAAI;IACtB,sEAAsE;IACtE,iBAAiB,EAAE,IAAI;IACvB,uEAAuE;IACvE,aAAa,EAAE,IAAI;IACnB,wEAAwE;IACxE,qBAAqB,EAAE,IAAI;IAC3B,kGAAkG;IAClG,eAAe,EAAE,IAAI;CACb,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './InvestorAccounts';
@@ -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("./InvestorAccounts"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/InvestorAccounts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
@@ -2,6 +2,7 @@ import { ProfileOperation, AddAccountResponse } from '../Profiles';
2
2
  import { DepositResponse, WithdrawResponse } from '../Payments';
3
3
  import { Operation } from '../Commons';
4
4
  import { ExecuteResponse } from '../Tokens';
5
+ import { InvestorAccountOperation } from '../InvestorAccounts';
5
6
  /**
6
7
  * Operations Interface provides a bunch of methods to get the operation status for different instances
7
8
  */
@@ -51,6 +52,16 @@ export interface Operations {
51
52
  *
52
53
  */
53
54
  withdrawOperationStatus(r: GetOperationStatusRequest): Promise<WithdrawResponse>;
55
+ /**
56
+ * Get investor network-account operation status (single fetch — may carry a
57
+ * parked ledger-adapter challenge; do not blind-wait on isCompleted)
58
+ *
59
+ * @param r
60
+ *
61
+ * @returns
62
+ *
63
+ */
64
+ investorAccountOperationStatus(r: GetOperationStatusRequest): Promise<InvestorAccountOperation>;
54
65
  /**
55
66
  * Wait operation completion
56
67
  *
@@ -3,7 +3,7 @@ import { AssetDataItem, FinancialAsset, GetAssetDatasFilter, GetFinancialAssetsF
3
3
  import { GetAssetsFilter, GetAssetsWithSpecificIntentTypeFilter, GetUsersFilter, MappedUser, SubscribeRequestOss, ProfileType, IncomingMessage, OutgoingMessage, MappedUserHoldings, MappedLoanIntent, GetIssuerAssetsFilter, GetAllHoldingsFilter, GetExecutionPlansFilter } from './utils';
4
4
  import { Certificate } from '../Certificates';
5
5
  import { ApproverConfig } from '../ApprovalsConfig';
6
- import { ReceiptSchemaOss, MinimizedAssetSchemaOss, LedgerSchemaOss, CustodyProviderSchemaOss } from './OssSchemas';
6
+ import { ReceiptSchemaOss, MinimizedAssetSchemaOss, LedgerSchemaOss, CustodyProviderSchemaOss, UserNetworkAccountSchemaOss } from './OssSchemas';
7
7
  import { UserAccount } from './OssResponses';
8
8
  import { ExecutionPlanLimitedData, ExecutionPlanStatus, GetExecutionPlanResponse, IntentData } from './ExecutionPlan';
9
9
  import { GetRouterWorkflowsFilter, WorkflowSchemaOss } from './RouterWorkflows';
@@ -156,6 +156,23 @@ export interface OSS {
156
156
  filter?: GetUsersFilter;
157
157
  retry?: boolean;
158
158
  }) => Promise<Paginated<MappedUser[]>>;
159
+ /**
160
+ * Get a user's whitelisted investor network accounts ({@link UserNetworkAccountSchemaOss})
161
+ * from the OSS read model (`User.networkAccounts`), optionally narrowed to an
162
+ * organization and/or asset. Deliberately a separate query — the shared user
163
+ * fragment must not be widened (strict OSS validation hard-fails routers that
164
+ * predate the field).
165
+ *
166
+ * @param r Receives an object with userId, optional organizationId / assetId narrowing, and optionally retry flag
167
+ * @returns
168
+ *
169
+ */
170
+ getUserNetworkAccounts: (r: {
171
+ userId: string;
172
+ organizationId?: string;
173
+ assetId?: string;
174
+ retry?: boolean;
175
+ }) => Promise<UserNetworkAccountSchemaOss[]>;
159
176
  /**
160
177
  * Get user id
161
178
  *
@@ -98,6 +98,11 @@ export declare enum IntentStatus {
98
98
  EXPIRED = "EXPIRED",
99
99
  REJECTED = "REJECTED"
100
100
  }
101
+ /** One `metadata` entry as OSS returns it — the create API takes a map, OSS gives back pairs. */
102
+ export interface KeyValuePairOss {
103
+ key: string;
104
+ value: string;
105
+ }
101
106
  export interface IntentSchemaOss {
102
107
  id: string;
103
108
  start: number;
@@ -106,6 +111,25 @@ export interface IntentSchemaOss {
106
111
  remainingQuantity: string;
107
112
  type: IntentTypeSchemaOss;
108
113
  intent: IntentDetailsSchemaOss;
114
+ /**
115
+ * The `metadata` map supplied at creation, read back as pairs. Absent (undefined)
116
+ * on intents created without any.
117
+ *
118
+ * NOT merely absent on OSS builds predating the field: this is selected by the
119
+ * shared intent fragment, and GraphQL rejects unknown fields at validation — so an
120
+ * older OSS fails the WHOLE query (getAssets, receipts, execution plans, every
121
+ * intent read) with `data: null` rather than omitting the field. Minimum OSS:
122
+ * a release-v0.28 build that exposes `customMetadata` and `rejectReason` on
123
+ * Intent (oss:0.28.5 and release-v0.28 verified). Optional-chaining here guards
124
+ * the created-without-metadata case only.
125
+ */
126
+ customMetadata?: KeyValuePairOss[];
127
+ /**
128
+ * Why the node rejected the intent. Set by the node on its own auto-rejections
129
+ * (e.g. `investor_not_found`); the update API has no field for a caller to supply
130
+ * one, so a party rejecting an intent cannot write here.
131
+ */
132
+ rejectReason?: string;
109
133
  }
110
134
  export interface IntentsSchemaOss {
111
135
  nodes: IntentSchemaOss[];
@@ -188,7 +212,44 @@ export interface TransferRequestIntentSchemaOss {
188
212
  signaturePolicyType?: string;
189
213
  signaturePolicy?: Record<string, string>;
190
214
  }
191
- export type IntentDetailsSchemaOss = PrimarySaleSchemaOss | RedemptionIntentSchemaOss | BuyingIntentSchemaOss | SellingIntentSchemaOss | LoanIntentSchemaOss | PrivateIntentSchemaOss | TransferRequestIntentSchemaOss;
215
+ /**
216
+ * Move Intent Schema OSS (read model).
217
+ *
218
+ * `sourceAsset` / `destinationAssets` are top-level on the GraphQL `MoveIntent`
219
+ * type — not nested under an `asset` wrapper — matching the shared intent
220
+ * fragment (`...on MoveIntent { sourceAsset { resourceId } destinationAssets { resourceId } }`).
221
+ * This differs from the create request shape ({@link MoveIntentRequest}), where
222
+ * they sit under `asset`.
223
+ */
224
+ export interface MoveIntentSchemaOss {
225
+ sourceAsset: FinP2PAssetSchemaOss;
226
+ destinationAssets: MoveDestinationSchemaOss[];
227
+ /**
228
+ * Custody-offered Move: the segregated account held source tokens are
229
+ * Released to instead of being burned. Absent on issuer-offered intents.
230
+ */
231
+ sourceToSegregatedAccount?: FinP2PAccountSchemaOss;
232
+ signaturePolicyType?: string;
233
+ signaturePolicy?: Record<string, string>;
234
+ }
235
+ /**
236
+ * Move destination read model (GraphQL `MoveDestination`, which supersedes
237
+ * `FinP2PAsset` in `MoveIntent.destinationAssets`).
238
+ *
239
+ * `fromSegregatedAccount` is the pre-funded pool a custody-offered Move's
240
+ * Transfer drains into this destination. Its write-side companion
241
+ * `fromSegregatedAccountOwner` is deliberately absent — that field is write-only
242
+ * on create/update and has no OSS read counterpart.
243
+ *
244
+ * `ledgerIdentifier` exists on the GraphQL type but is not currently selected by
245
+ * the SDK's fragment, so it is not populated — see the fragment comment in
246
+ * `oss-api/oss.ts`.
247
+ */
248
+ export interface MoveDestinationSchemaOss {
249
+ resourceId: string;
250
+ fromSegregatedAccount?: FinP2PAccountSchemaOss;
251
+ }
252
+ export type IntentDetailsSchemaOss = PrimarySaleSchemaOss | RedemptionIntentSchemaOss | BuyingIntentSchemaOss | SellingIntentSchemaOss | LoanIntentSchemaOss | PrivateIntentSchemaOss | TransferRequestIntentSchemaOss | MoveIntentSchemaOss;
192
253
  export interface LoanAssetInstructionSchemaOss {
193
254
  borrowerAccount: FinP2PAssetAccountSchemaOss;
194
255
  lenderAccount: FinP2PAssetAccountSchemaOss;
@@ -204,7 +265,7 @@ export interface InterestRateTerm {
204
265
  export interface CloseAmountTerm {
205
266
  repaymentVolume: string;
206
267
  }
207
- export type IntentTypeSchemaOss = 'primarySale' | 'buyingIntent' | 'sellingIntent' | 'redemptionIntent' | 'loanIntent' | 'privateOfferIntent' | 'requestForTransferIntent';
268
+ export type IntentTypeSchemaOss = 'primarySale' | 'buyingIntent' | 'sellingIntent' | 'redemptionIntent' | 'loanIntent' | 'privateOfferIntent' | 'requestForTransferIntent' | 'moveIntent';
208
269
  export interface IssuerSchemaOss extends ProfileSchemaOss {
209
270
  name: string;
210
271
  assets: AssetsSchemaOss;
@@ -326,6 +387,8 @@ export interface Account {
326
387
  }
327
388
  export interface CustodianAccount {
328
389
  finId: string;
390
+ /** Organization the account belongs to — distinct from `custodian.orgId`, which holds it. */
391
+ orgId: string;
329
392
  custodian: Custodian;
330
393
  }
331
394
  export type PartialSettlementOss = {
@@ -431,3 +494,27 @@ export interface ApproverConfigSchemaOss {
431
494
  export interface ApproverConfigsSchemaOss {
432
495
  nodes: ApproverConfigSchemaOss[];
433
496
  }
497
+ export interface OssWalletAccount {
498
+ __typename: 'WalletAccount';
499
+ type: string;
500
+ address: string;
501
+ }
502
+ export interface OssCaip10Account {
503
+ __typename: 'Caip10Account';
504
+ /** CAIP-2 chain id — the same token used by CAIP-19 asset identifiers. */
505
+ network: string;
506
+ address: string;
507
+ }
508
+ export interface OssCustodialAccount {
509
+ __typename: 'CustodialAccount';
510
+ provider: string;
511
+ vaultAccountId: string;
512
+ assetId?: string;
513
+ }
514
+ export type OssNetworkAccount = OssWalletAccount | OssCaip10Account | OssCustodialAccount;
515
+ export interface UserNetworkAccountSchemaOss {
516
+ id: string;
517
+ organizationId: string;
518
+ assetId: string;
519
+ account: OssNetworkAccount | null;
520
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"OssSchemas.js","sourceRoot":"","sources":["../../../src/types/Oss/OssSchemas.ts"],"names":[],"mappings":";;;AAIA,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,sCAAe,CAAA;IACf,kCAAW,CAAA;IACX,kCAAW,CAAA;IACX,qCAAc,CAAA;IACd,wCAAiB,CAAA;AACnB,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B;AAED,IAAY,uBAKX;AALD,WAAY,uBAAuB;IACjC,sDAA2B,CAAA;IAC3B,wCAAa,CAAA;IACb,8CAAmB,CAAA;IACnB,4CAAiB,CAAA;AACnB,CAAC,EALW,uBAAuB,uCAAvB,uBAAuB,QAKlC;AAyFD,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,yCAAyB,CAAA;IACzB,uCAAuB,CAAA;IACvB,uCAAuB,CAAA;IACvB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;AACvB,CAAC,EAPW,YAAY,4BAAZ,YAAY,QAOvB;AAuWD,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,8BAAiB,CAAA;IACjB,0BAAa,CAAA;IACb,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,uCAA0B,CAAA;IAC1B,oCAAuB,CAAA;IACvB,0BAAa,CAAA;IACb,8CAAiC,CAAA;IACjC,+CAAkC,CAAA;IAClC,8BAAiB,CAAA;IACjB,4BAAe,CAAA;AACjB,CAAC,EAZW,SAAS,yBAAT,SAAS,QAYpB;AAOD,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,oCAAe,CAAA;IACf,wCAAmB,CAAA;AACrB,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B"}
1
+ {"version":3,"file":"OssSchemas.js","sourceRoot":"","sources":["../../../src/types/Oss/OssSchemas.ts"],"names":[],"mappings":";;;AAIA,IAAY,mBASX;AATD,WAAY,mBAAmB;IAC7B,oCAAa,CAAA;IACb,0CAAmB,CAAA;IACnB,sCAAe,CAAA;IACf,sCAAe,CAAA;IACf,kCAAW,CAAA;IACX,kCAAW,CAAA;IACX,qCAAc,CAAA;IACd,wCAAiB,CAAA;AACnB,CAAC,EATW,mBAAmB,mCAAnB,mBAAmB,QAS9B;AAED,IAAY,uBAKX;AALD,WAAY,uBAAuB;IACjC,sDAA2B,CAAA;IAC3B,wCAAa,CAAA;IACb,8CAAmB,CAAA;IACnB,4CAAiB,CAAA;AACnB,CAAC,EALW,uBAAuB,uCAAvB,uBAAuB,QAKlC;AAyFD,IAAY,YAOX;AAPD,WAAY,YAAY;IACtB,iCAAiB,CAAA;IACjB,yCAAyB,CAAA;IACzB,uCAAuB,CAAA;IACvB,uCAAuB,CAAA;IACvB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;AACvB,CAAC,EAPW,YAAY,4BAAZ,YAAY,QAOvB;AA2aD,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,8BAAiB,CAAA;IACjB,0BAAa,CAAA;IACb,4BAAe,CAAA;IACf,0BAAa,CAAA;IACb,uCAA0B,CAAA;IAC1B,oCAAuB,CAAA;IACvB,0BAAa,CAAA;IACb,8CAAiC,CAAA;IACjC,+CAAkC,CAAA;IAClC,8BAAiB,CAAA;IACjB,4BAAe,CAAA;AACjB,CAAC,EAZW,SAAS,yBAAT,SAAS,QAYpB;AAOD,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,oCAAe,CAAA;IACf,wCAAmB,CAAA;AACrB,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B"}
@@ -69,6 +69,38 @@ export interface GetExecutionPlansFilter extends PaginateInput {
69
69
  end: number;
70
70
  };
71
71
  lastModified?: number;
72
+ /**
73
+ * Resource id of ONE investor on the plan.
74
+ *
75
+ * `ExecutionPlan.investorIds` is an array of every investor id on the plan, both the sending and
76
+ * the receiving side. The filter is emitted as a single CONTAINS predicate on that array, which
77
+ * OSS evaluates as exact, case-sensitive membership: the value must equal one element in full.
78
+ * Partial ids and different casing do not match. IN / EQ / NEQ are rejected on list fields, so
79
+ * this is deliberately a single string and not an array.
80
+ *
81
+ * An empty or whitespace-only value is treated as "no filter": nothing is sent to OSS. A blank
82
+ * CONTAINS predicate would match no plan at all, which is never the intent of an empty filter box.
83
+ *
84
+ * Requires OSS >= v0.28.6 (owneraio/oss#590). Against an older server the query fails GraphQL
85
+ * validation as a hard error.
86
+ */
87
+ investorId?: string;
88
+ /**
89
+ * Resource id of ONE asset on the plan's ASSET leg.
90
+ *
91
+ * `ExecutionPlan.assetIds` is an array of every asset id on the asset leg, both the sending and
92
+ * the receiving side. Same CONTAINS semantics as `investorId`: exact, case-sensitive membership of
93
+ * the full id. Empty or whitespace-only values emit no filter.
94
+ *
95
+ * This intentionally does NOT match the settlement leg (`ExecutionPlan.settlementAssetIds`).
96
+ * Either-leg matching needs the `where` argument of `plans()`:
97
+ * where: { or: [ { filter: { key: "assetIds", operator: CONTAINS, value: "<id>" } },
98
+ * { filter: { key: "settlementAssetIds", operator: CONTAINS, value: "<id>" } } ] }
99
+ * Add that behind a new opt-in field rather than changing what `assetId` means.
100
+ *
101
+ * Requires OSS >= v0.28.6 (owneraio/oss#590).
102
+ */
103
+ assetId?: string;
72
104
  sortField?: string;
73
105
  sortOrder?: string;
74
106
  }
@@ -16,6 +16,13 @@ export interface PaymentAdapterUpdatePayoutRequest {
16
16
  payoutId: string;
17
17
  status: PayoutStatus;
18
18
  operatorDescription: string;
19
+ /**
20
+ * External reference for the payment, entered by the operator who executed it -
21
+ * e.g. a Swift UETR. The adapter records it and promotes it to the receipt's
22
+ * `transactionDetails.transactionId`, which is how a plan's other participants
23
+ * learn which payment settled the cash leg.
24
+ */
25
+ externalId?: string;
19
26
  }
20
27
  /**
21
28
  * Payment Adapter Interface allow to update account balance, manage payouts and get the exchange rates