@owneraio/finp2p-sdk-js 0.28.26 → 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.
Files changed (246) hide show
  1. package/README.md +93 -2
  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/__tests__/utils.test.d.ts +1 -0
  6. package/lib/OwneraAPI/__tests__/utils.test.js +82 -0
  7. package/lib/OwneraAPI/__tests__/utils.test.js.map +1 -0
  8. package/lib/OwneraAPI/finp2p-node-api/__tests__/agreements.test.d.ts +1 -0
  9. package/lib/OwneraAPI/finp2p-node-api/__tests__/agreements.test.js +149 -0
  10. package/lib/OwneraAPI/finp2p-node-api/__tests__/agreements.test.js.map +1 -0
  11. package/lib/OwneraAPI/finp2p-node-api/__tests__/approvalsConfig.test.js +5 -12
  12. package/lib/OwneraAPI/finp2p-node-api/__tests__/approvalsConfig.test.js.map +1 -1
  13. package/lib/OwneraAPI/finp2p-node-api/__tests__/collateral.test.d.ts +1 -0
  14. package/lib/OwneraAPI/finp2p-node-api/__tests__/collateral.test.js +502 -0
  15. package/lib/OwneraAPI/finp2p-node-api/__tests__/collateral.test.js.map +1 -0
  16. package/lib/OwneraAPI/finp2p-node-api/__tests__/createIntentMetadata.test.d.ts +1 -0
  17. package/lib/OwneraAPI/finp2p-node-api/__tests__/createIntentMetadata.test.js +56 -0
  18. package/lib/OwneraAPI/finp2p-node-api/__tests__/createIntentMetadata.test.js.map +1 -0
  19. package/lib/OwneraAPI/finp2p-node-api/__tests__/dryRunExecute.test.d.ts +1 -0
  20. package/lib/OwneraAPI/finp2p-node-api/__tests__/dryRunExecute.test.js +75 -0
  21. package/lib/OwneraAPI/finp2p-node-api/__tests__/dryRunExecute.test.js.map +1 -0
  22. package/lib/OwneraAPI/finp2p-node-api/__tests__/pathEncoding.test.d.ts +1 -0
  23. package/lib/OwneraAPI/finp2p-node-api/__tests__/pathEncoding.test.js +348 -0
  24. package/lib/OwneraAPI/finp2p-node-api/__tests__/pathEncoding.test.js.map +1 -0
  25. package/lib/OwneraAPI/finp2p-node-api/__tests__/rejectIntent.test.d.ts +1 -0
  26. package/lib/OwneraAPI/finp2p-node-api/__tests__/rejectIntent.test.js +97 -0
  27. package/lib/OwneraAPI/finp2p-node-api/__tests__/rejectIntent.test.js.map +1 -0
  28. package/lib/OwneraAPI/finp2p-node-api/agreements.d.ts +8 -0
  29. package/lib/OwneraAPI/finp2p-node-api/agreements.js +31 -0
  30. package/lib/OwneraAPI/finp2p-node-api/agreements.js.map +1 -0
  31. package/lib/OwneraAPI/finp2p-node-api/certificates.js +15 -6
  32. package/lib/OwneraAPI/finp2p-node-api/certificates.js.map +1 -1
  33. package/lib/OwneraAPI/finp2p-node-api/collateral.d.ts +16 -0
  34. package/lib/OwneraAPI/finp2p-node-api/collateral.js +131 -0
  35. package/lib/OwneraAPI/finp2p-node-api/collateral.js.map +1 -0
  36. package/lib/OwneraAPI/finp2p-node-api/custodies.js +13 -2
  37. package/lib/OwneraAPI/finp2p-node-api/custodies.js.map +1 -1
  38. package/lib/OwneraAPI/finp2p-node-api/documents.js +22 -9
  39. package/lib/OwneraAPI/finp2p-node-api/documents.js.map +1 -1
  40. package/lib/OwneraAPI/finp2p-node-api/investorAccounts.d.ts +13 -0
  41. package/lib/OwneraAPI/finp2p-node-api/investorAccounts.js +71 -0
  42. package/lib/OwneraAPI/finp2p-node-api/investorAccounts.js.map +1 -0
  43. package/lib/OwneraAPI/finp2p-node-api/ledgers.js +13 -2
  44. package/lib/OwneraAPI/finp2p-node-api/ledgers.js.map +1 -1
  45. package/lib/OwneraAPI/finp2p-node-api/messages.js +12 -3
  46. package/lib/OwneraAPI/finp2p-node-api/messages.js.map +1 -1
  47. package/lib/OwneraAPI/finp2p-node-api/operations.js +37 -15
  48. package/lib/OwneraAPI/finp2p-node-api/operations.js.map +1 -1
  49. package/lib/OwneraAPI/finp2p-node-api/policies.js +14 -5
  50. package/lib/OwneraAPI/finp2p-node-api/policies.js.map +1 -1
  51. package/lib/OwneraAPI/finp2p-node-api/profiles.js +82 -45
  52. package/lib/OwneraAPI/finp2p-node-api/profiles.js.map +1 -1
  53. package/lib/OwneraAPI/finp2p-node-api/tokens.js +20 -0
  54. package/lib/OwneraAPI/finp2p-node-api/tokens.js.map +1 -1
  55. package/lib/OwneraAPI/index.js +6 -0
  56. package/lib/OwneraAPI/index.js.map +1 -1
  57. package/lib/OwneraAPI/oss-api/__tests__/buildGraphQLQuery.test.d.ts +1 -0
  58. package/lib/OwneraAPI/oss-api/__tests__/buildGraphQLQuery.test.js +253 -0
  59. package/lib/OwneraAPI/oss-api/__tests__/buildGraphQLQuery.test.js.map +1 -0
  60. package/lib/OwneraAPI/oss-api/__tests__/filterUtils.test.d.ts +1 -0
  61. package/lib/OwneraAPI/oss-api/__tests__/filterUtils.test.js +15 -0
  62. package/lib/OwneraAPI/oss-api/__tests__/filterUtils.test.js.map +1 -0
  63. package/lib/OwneraAPI/oss-api/__tests__/getAgreements.test.d.ts +1 -0
  64. package/lib/OwneraAPI/oss-api/__tests__/getAgreements.test.js +175 -0
  65. package/lib/OwneraAPI/oss-api/__tests__/getAgreements.test.js.map +1 -0
  66. package/lib/OwneraAPI/oss-api/__tests__/getAllExecutionPlans.test.js +52 -0
  67. package/lib/OwneraAPI/oss-api/__tests__/getAllExecutionPlans.test.js.map +1 -1
  68. package/lib/OwneraAPI/oss-api/__tests__/getCollateralAgreements.test.d.ts +1 -0
  69. package/lib/OwneraAPI/oss-api/__tests__/getCollateralAgreements.test.js +321 -0
  70. package/lib/OwneraAPI/oss-api/__tests__/getCollateralAgreements.test.js.map +1 -0
  71. package/lib/OwneraAPI/oss-api/__tests__/getCollateralReports.test.d.ts +1 -0
  72. package/lib/OwneraAPI/oss-api/__tests__/getCollateralReports.test.js +152 -0
  73. package/lib/OwneraAPI/oss-api/__tests__/getCollateralReports.test.js.map +1 -0
  74. package/lib/OwneraAPI/oss-api/__tests__/ossQueryEscaping.test.d.ts +1 -0
  75. package/lib/OwneraAPI/oss-api/__tests__/ossQueryEscaping.test.js +347 -0
  76. package/lib/OwneraAPI/oss-api/__tests__/ossQueryEscaping.test.js.map +1 -0
  77. package/lib/OwneraAPI/oss-api/filterUtils.d.ts +20 -0
  78. package/lib/OwneraAPI/oss-api/filterUtils.js +57 -5
  79. package/lib/OwneraAPI/oss-api/filterUtils.js.map +1 -1
  80. package/lib/OwneraAPI/oss-api/oss.js +730 -74
  81. package/lib/OwneraAPI/oss-api/oss.js.map +1 -1
  82. package/lib/OwneraAPI/oss-api/queryUtils.d.ts +1 -0
  83. package/lib/OwneraAPI/oss-api/queryUtils.js +6 -5
  84. package/lib/OwneraAPI/oss-api/queryUtils.js.map +1 -1
  85. package/lib/OwneraAPI/oss-api/queryValidation.d.ts +3 -1
  86. package/lib/OwneraAPI/oss-api/queryValidation.js +21 -2
  87. package/lib/OwneraAPI/oss-api/queryValidation.js.map +1 -1
  88. package/lib/OwneraAPI/payment-adapter-api/__tests__/updateBalance.test.d.ts +1 -0
  89. package/lib/OwneraAPI/payment-adapter-api/__tests__/updateBalance.test.js +42 -0
  90. package/lib/OwneraAPI/payment-adapter-api/__tests__/updateBalance.test.js.map +1 -0
  91. package/lib/OwneraAPI/payment-adapter-api/vanilla/__tests__/payouts.test.d.ts +1 -0
  92. package/lib/OwneraAPI/payment-adapter-api/vanilla/__tests__/payouts.test.js +73 -0
  93. package/lib/OwneraAPI/payment-adapter-api/vanilla/__tests__/payouts.test.js.map +1 -0
  94. package/lib/OwneraAPI/payment-adapter-api/vanilla/payouts.js +23 -11
  95. package/lib/OwneraAPI/payment-adapter-api/vanilla/payouts.js.map +1 -1
  96. package/lib/OwneraAPI/payment-adapter-api/vanilla/update-balance.d.ts +1 -1
  97. package/lib/OwneraAPI/payment-adapter-api/vanilla/update-balance.js +3 -1
  98. package/lib/OwneraAPI/payment-adapter-api/vanilla/update-balance.js.map +1 -1
  99. package/lib/OwneraAPI/utils.d.ts +39 -0
  100. package/lib/OwneraAPI/utils.js +176 -82
  101. package/lib/OwneraAPI/utils.js.map +1 -1
  102. package/lib/core/__tests__/consoleLogger.test.d.ts +1 -0
  103. package/lib/core/__tests__/consoleLogger.test.js +269 -0
  104. package/lib/core/__tests__/consoleLogger.test.js.map +1 -0
  105. package/lib/core/__tests__/createAssetNameUniqueness.test.d.ts +1 -0
  106. package/lib/core/__tests__/createAssetNameUniqueness.test.js +95 -0
  107. package/lib/core/__tests__/createAssetNameUniqueness.test.js.map +1 -0
  108. package/lib/core/__tests__/custodianPrecedence.test.d.ts +1 -0
  109. package/lib/core/__tests__/custodianPrecedence.test.js +683 -0
  110. package/lib/core/__tests__/custodianPrecedence.test.js.map +1 -0
  111. package/lib/core/__tests__/executeIntentSettlementAssets.test.d.ts +1 -0
  112. package/lib/core/__tests__/executeIntentSettlementAssets.test.js +128 -0
  113. package/lib/core/__tests__/executeIntentSettlementAssets.test.js.map +1 -0
  114. package/lib/core/__tests__/logException.test.d.ts +1 -0
  115. package/lib/core/__tests__/logException.test.js +49 -0
  116. package/lib/core/__tests__/logException.test.js.map +1 -0
  117. package/lib/core/__tests__/multiplyDecimalStrings.test.d.ts +1 -0
  118. package/lib/core/__tests__/multiplyDecimalStrings.test.js +37 -0
  119. package/lib/core/__tests__/multiplyDecimalStrings.test.js.map +1 -0
  120. package/lib/core/__tests__/settlementExecutionAmount.test.d.ts +1 -0
  121. package/lib/core/__tests__/settlementExecutionAmount.test.js +300 -0
  122. package/lib/core/__tests__/settlementExecutionAmount.test.js.map +1 -0
  123. package/lib/core/asset.js +21 -27
  124. package/lib/core/asset.js.map +1 -1
  125. package/lib/core/custodian.d.ts +30 -0
  126. package/lib/core/custodian.js +49 -0
  127. package/lib/core/custodian.js.map +1 -0
  128. package/lib/core/index.d.ts +1 -0
  129. package/lib/core/index.js +3 -1
  130. package/lib/core/index.js.map +1 -1
  131. package/lib/core/intents/__tests__/intentErrorCode.test.d.ts +1 -0
  132. package/lib/core/intents/__tests__/intentErrorCode.test.js +111 -0
  133. package/lib/core/intents/__tests__/intentErrorCode.test.js.map +1 -0
  134. package/lib/core/intents/__tests__/intentHandleReject.test.d.ts +1 -0
  135. package/lib/core/intents/__tests__/intentHandleReject.test.js +50 -0
  136. package/lib/core/intents/__tests__/intentHandleReject.test.js.map +1 -0
  137. package/lib/core/intents/__tests__/loanIntentAdditionalAccounts.test.d.ts +1 -0
  138. package/lib/core/intents/__tests__/loanIntentAdditionalAccounts.test.js +185 -0
  139. package/lib/core/intents/__tests__/loanIntentAdditionalAccounts.test.js.map +1 -0
  140. package/lib/core/intents/__tests__/loanIntentCustodianPrecedence.test.d.ts +1 -0
  141. package/lib/core/intents/__tests__/loanIntentCustodianPrecedence.test.js +85 -0
  142. package/lib/core/intents/__tests__/loanIntentCustodianPrecedence.test.js.map +1 -0
  143. package/lib/core/intents/__tests__/loanIntentMetadata.test.d.ts +1 -0
  144. package/lib/core/intents/__tests__/loanIntentMetadata.test.js +81 -0
  145. package/lib/core/intents/__tests__/loanIntentMetadata.test.js.map +1 -0
  146. package/lib/core/intents/__tests__/moveIntentSegregatedAccounts.test.d.ts +1 -0
  147. package/lib/core/intents/__tests__/moveIntentSegregatedAccounts.test.js +203 -0
  148. package/lib/core/intents/__tests__/moveIntentSegregatedAccounts.test.js.map +1 -0
  149. package/lib/core/intents/createIntent/createIntent.js +4 -3
  150. package/lib/core/intents/createIntent/createIntent.js.map +1 -1
  151. package/lib/core/intents/createIntent/createMoveIntentReq.d.ts +0 -1
  152. package/lib/core/intents/createIntent/createMoveIntentReq.js +15 -8
  153. package/lib/core/intents/createIntent/createMoveIntentReq.js.map +1 -1
  154. package/lib/core/intents/createIntent/helpers.d.ts +6 -2
  155. package/lib/core/intents/createIntent/helpers.js +27 -17
  156. package/lib/core/intents/createIntent/helpers.js.map +1 -1
  157. package/lib/core/intents/createLoanIntent.js +64 -19
  158. package/lib/core/intents/createLoanIntent.js.map +1 -1
  159. package/lib/core/intents/executeIntent.js +102 -41
  160. package/lib/core/intents/executeIntent.js.map +1 -1
  161. package/lib/core/intents/executeLoanIntent.js +48 -23
  162. package/lib/core/intents/executeLoanIntent.js.map +1 -1
  163. package/lib/core/intents/executeMoveIntent.js.map +1 -1
  164. package/lib/core/intents/executePrivateIntent.js +46 -13
  165. package/lib/core/intents/executePrivateIntent.js.map +1 -1
  166. package/lib/core/intents/executeRedemptionIntent.d.ts +1 -0
  167. package/lib/core/intents/executeRedemptionIntent.js +23 -9
  168. package/lib/core/intents/executeRedemptionIntent.js.map +1 -1
  169. package/lib/core/intents/executeTransferRequest.d.ts +5 -0
  170. package/lib/core/intents/executeTransferRequest.js +14 -3
  171. package/lib/core/intents/executeTransferRequest.js.map +1 -1
  172. package/lib/core/intents/getIntent.js +9 -0
  173. package/lib/core/intents/getIntent.js.map +1 -1
  174. package/lib/core/intents/transfer.js +7 -2
  175. package/lib/core/intents/transfer.js.map +1 -1
  176. package/lib/core/intents/updateMoveIntentReq.d.ts +4 -3
  177. package/lib/core/intents/updateMoveIntentReq.js +14 -12
  178. package/lib/core/intents/updateMoveIntentReq.js.map +1 -1
  179. package/lib/core/intents/utils.d.ts +15 -7
  180. package/lib/core/intents/utils.js +35 -26
  181. package/lib/core/intents/utils.js.map +1 -1
  182. package/lib/core/logger.js +128 -22
  183. package/lib/core/logger.js.map +1 -1
  184. package/lib/core/normalizers/__tests__/normalizeOperationResponse.test.d.ts +1 -0
  185. package/lib/core/normalizers/__tests__/normalizeOperationResponse.test.js +60 -0
  186. package/lib/core/normalizers/__tests__/normalizeOperationResponse.test.js.map +1 -0
  187. package/lib/core/normalizers/normalizeOperationResponse.d.ts +6 -0
  188. package/lib/core/normalizers/normalizeOperationResponse.js +4 -5
  189. package/lib/core/normalizers/normalizeOperationResponse.js.map +1 -1
  190. package/lib/core/sdk.d.ts +4 -0
  191. package/lib/core/sdk.js +2 -2
  192. package/lib/core/sdk.js.map +1 -1
  193. package/lib/core/user.d.ts +2 -2
  194. package/lib/core/user.js +6 -3
  195. package/lib/core/user.js.map +1 -1
  196. package/lib/core/utils.d.ts +17 -1
  197. package/lib/core/utils.js +75 -16
  198. package/lib/core/utils.js.map +1 -1
  199. package/lib/index.d.ts +1 -0
  200. package/lib/index.js +3 -1
  201. package/lib/index.js.map +1 -1
  202. package/lib/types/Agreements/Agreements.d.ts +355 -0
  203. package/lib/types/Agreements/Agreements.js +3 -0
  204. package/lib/types/Agreements/Agreements.js.map +1 -0
  205. package/lib/types/Agreements/index.d.ts +1 -0
  206. package/lib/types/Agreements/index.js +18 -0
  207. package/lib/types/Agreements/index.js.map +1 -0
  208. package/lib/types/Collateral/Collateral.d.ts +564 -0
  209. package/lib/types/Collateral/Collateral.js +3 -0
  210. package/lib/types/Collateral/Collateral.js.map +1 -0
  211. package/lib/types/Collateral/index.d.ts +1 -0
  212. package/lib/types/Collateral/index.js +18 -0
  213. package/lib/types/Collateral/index.js.map +1 -0
  214. package/lib/types/Core/Intents.d.ts +115 -3
  215. package/lib/types/Core/Intents.js +9 -0
  216. package/lib/types/Core/Intents.js.map +1 -1
  217. package/lib/types/Core/OwneraAPI.d.ts +25 -1
  218. package/lib/types/Core/User.d.ts +28 -3
  219. package/lib/types/InvestorAccounts/InvestorAccounts.d.ts +171 -0
  220. package/lib/types/InvestorAccounts/InvestorAccounts.js +35 -0
  221. package/lib/types/InvestorAccounts/InvestorAccounts.js.map +1 -0
  222. package/lib/types/InvestorAccounts/index.d.ts +1 -0
  223. package/lib/types/InvestorAccounts/index.js +18 -0
  224. package/lib/types/InvestorAccounts/index.js.map +1 -0
  225. package/lib/types/Operations/Operations.d.ts +11 -0
  226. package/lib/types/Oss/Agreements.d.ts +671 -0
  227. package/lib/types/Oss/Agreements.js +3 -0
  228. package/lib/types/Oss/Agreements.js.map +1 -0
  229. package/lib/types/Oss/Oss.d.ts +81 -1
  230. package/lib/types/Oss/OssSchemas.d.ts +50 -0
  231. package/lib/types/Oss/OssSchemas.js.map +1 -1
  232. package/lib/types/Oss/index.d.ts +1 -0
  233. package/lib/types/Oss/index.js +1 -0
  234. package/lib/types/Oss/index.js.map +1 -1
  235. package/lib/types/Oss/utils.d.ts +39 -0
  236. package/lib/types/PaymentAdapter/PaymentAdapter.d.ts +7 -0
  237. package/lib/types/PaymentAdapter/index.d.ts +33 -1
  238. package/lib/types/Profiles/Intents.d.ts +24 -12
  239. package/lib/types/Profiles/Profiles.d.ts +46 -1
  240. package/lib/types/Tokens/Tokens.d.ts +109 -1
  241. package/lib/types/index.d.ts +3 -0
  242. package/lib/types/index.js +3 -0
  243. package/lib/types/index.js.map +1 -1
  244. package/lib/types/utils.d.ts +5 -0
  245. package/lib/types/utils.js.map +1 -1
  246. package/package.json +1 -1
@@ -3,14 +3,17 @@ 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';
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
@@ -156,6 +159,23 @@ export interface OSS {
156
159
  filter?: GetUsersFilter;
157
160
  retry?: boolean;
158
161
  }) => Promise<Paginated<MappedUser[]>>;
162
+ /**
163
+ * Get a user's whitelisted investor network accounts ({@link UserNetworkAccountSchemaOss})
164
+ * from the OSS read model (`User.networkAccounts`), optionally narrowed to an
165
+ * organization and/or asset. Deliberately a separate query — the shared user
166
+ * fragment must not be widened (strict OSS validation hard-fails routers that
167
+ * predate the field).
168
+ *
169
+ * @param r Receives an object with userId, optional organizationId / assetId narrowing, and optionally retry flag
170
+ * @returns
171
+ *
172
+ */
173
+ getUserNetworkAccounts: (r: {
174
+ userId: string;
175
+ organizationId?: string;
176
+ assetId?: string;
177
+ retry?: boolean;
178
+ }) => Promise<UserNetworkAccountSchemaOss[]>;
159
179
  /**
160
180
  * Get user id
161
181
  *
@@ -309,6 +329,34 @@ export interface OSS {
309
329
  getWorkflowById: (r: {
310
330
  id: string;
311
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[]>;
312
360
  /**
313
361
  * Subscribe to receipt
314
362
  *
@@ -333,6 +381,38 @@ export interface OSS {
333
381
  *
334
382
  */
335
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;
336
416
  /**
337
417
  * Subscribe to a user holding changing
338
418
  *
@@ -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[];
@@ -363,6 +387,8 @@ export interface Account {
363
387
  }
364
388
  export interface CustodianAccount {
365
389
  finId: string;
390
+ /** Organization the account belongs to — distinct from `custodian.orgId`, which holds it. */
391
+ orgId: string;
366
392
  custodian: Custodian;
367
393
  }
368
394
  export type PartialSettlementOss = {
@@ -468,3 +494,27 @@ export interface ApproverConfigSchemaOss {
468
494
  export interface ApproverConfigsSchemaOss {
469
495
  nodes: ApproverConfigSchemaOss[];
470
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;AAgZD,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"}
@@ -1,3 +1,4 @@
1
+ export * from './Agreements';
1
2
  export * from './ExecutionPlan';
2
3
  export * from './Pagination';
3
4
  export * from './Oss';
@@ -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"}
@@ -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;
@@ -69,6 +76,38 @@ export interface GetExecutionPlansFilter extends PaginateInput {
69
76
  end: number;
70
77
  };
71
78
  lastModified?: number;
79
+ /**
80
+ * Resource id of ONE investor on the plan.
81
+ *
82
+ * `ExecutionPlan.investorIds` is an array of every investor id on the plan, both the sending and
83
+ * the receiving side. The filter is emitted as a single CONTAINS predicate on that array, which
84
+ * OSS evaluates as exact, case-sensitive membership: the value must equal one element in full.
85
+ * Partial ids and different casing do not match. IN / EQ / NEQ are rejected on list fields, so
86
+ * this is deliberately a single string and not an array.
87
+ *
88
+ * An empty or whitespace-only value is treated as "no filter": nothing is sent to OSS. A blank
89
+ * CONTAINS predicate would match no plan at all, which is never the intent of an empty filter box.
90
+ *
91
+ * Requires OSS >= v0.28.6 (owneraio/oss#590). Against an older server the query fails GraphQL
92
+ * validation as a hard error.
93
+ */
94
+ investorId?: string;
95
+ /**
96
+ * Resource id of ONE asset on the plan's ASSET leg.
97
+ *
98
+ * `ExecutionPlan.assetIds` is an array of every asset id on the asset leg, both the sending and
99
+ * the receiving side. Same CONTAINS semantics as `investorId`: exact, case-sensitive membership of
100
+ * the full id. Empty or whitespace-only values emit no filter.
101
+ *
102
+ * This intentionally does NOT match the settlement leg (`ExecutionPlan.settlementAssetIds`).
103
+ * Either-leg matching needs the `where` argument of `plans()`:
104
+ * where: { or: [ { filter: { key: "assetIds", operator: CONTAINS, value: "<id>" } },
105
+ * { filter: { key: "settlementAssetIds", operator: CONTAINS, value: "<id>" } } ] }
106
+ * Add that behind a new opt-in field rather than changing what `assetId` means.
107
+ *
108
+ * Requires OSS >= v0.28.6 (owneraio/oss#590).
109
+ */
110
+ assetId?: string;
72
111
  sortField?: string;
73
112
  sortOrder?: string;
74
113
  }
@@ -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
@@ -45,6 +45,15 @@ export interface FiatAccount {
45
45
  code: string;
46
46
  }
47
47
  export type PayoutStatus = 'pending' | 'completed' | 'failed';
48
+ /**
49
+ * The execution plan instruction a payout settles. Present only when the payout was
50
+ * raised for a plan's cash leg rather than for a withdrawal, and the handle used to
51
+ * scope a pending payment to a trade and a leg.
52
+ */
53
+ export interface PayoutExecutionContext {
54
+ planId: string;
55
+ instructionSequence: number;
56
+ }
48
57
  export interface Payout {
49
58
  id: string;
50
59
  status: PayoutStatus;
@@ -53,8 +62,31 @@ export interface Payout {
53
62
  asset: FinP2PAccountAssetSchemaOss;
54
63
  quantity: string;
55
64
  timestamp: number;
65
+ /**
66
+ * Operator-supplied external reference for the payment, recorded when the payout was
67
+ * confirmed - e.g. a Swift UETR for a wire the bank executed in its own systems.
68
+ * Becomes the receipt's `transactionDetails.transactionId`.
69
+ */
70
+ externalId?: string;
71
+ /** Set when this payout settles a plan cash leg rather than a withdrawal. */
72
+ executionContext?: PayoutExecutionContext;
56
73
  }
74
+ /**
75
+ * Body of `POST /operator/payouts/{payoutId}`.
76
+ *
77
+ * Field names here are the wire contract, which is not the same as the SDK's
78
+ * caller-facing {@link PaymentAdapterUpdatePayoutRequest}: the adapter reads
79
+ * `description`, not `operatorDescription`.
80
+ */
57
81
  export interface UpdatePayoutRequest {
58
82
  status: PayoutStatus;
59
- operatorDescription: string;
83
+ description?: string;
84
+ /**
85
+ * @deprecated The adapter has never read this field — its operator API reads
86
+ * `description` — so anything sent here was silently discarded. Retained, and still
87
+ * sent alongside `description`, only so this stays a purely additive change for any
88
+ * caller that constructs the body itself. Remove in the next major.
89
+ */
90
+ operatorDescription?: string;
91
+ externalId?: string;
60
92
  }
@@ -1,4 +1,5 @@
1
- import { AssetInstruction, AssetTerm, FinIdAccount, FinP2PAsset, IntentCreationSettlementTerm, SettlementAssetTerm, SettlementInstructionDestinationAccount, SettlementInstructionSourceAccount } from './Accounts';
1
+ import { AssetInstruction, AssetTerm, Caip19FinP2PAsset, Caip19MoveDestination, FinIdAccount, FinP2PAsset, IntentCreationSettlementTerm, SettlementAssetTerm, SettlementInstructionDestinationAccount, SettlementInstructionSourceAccount } from './Accounts';
2
+ import { NetworkAccount } from '../InvestorAccounts';
2
3
  export interface SettlementConditionsRequest {
3
4
  assetId: string;
4
5
  quantity: string;
@@ -169,21 +170,16 @@ export type PrivateOfferIntentRequest = PrivateOfferTradeIntentRequest | Private
169
170
  * `sourceToSegregatedAccount` is the custody-offered addition: held source
170
171
  * tokens are Released to it instead of being burned. Omitted for the
171
172
  * issuer-offered path.
173
+ *
174
+ * Both assets are node-shaped ({@link Caip19FinP2PAsset} /
175
+ * {@link Caip19MoveDestination}) — this is the wire payload the create path
176
+ * builds, not the SDK-facing `FinP2PAsset` input.
172
177
  */
173
178
  export interface MoveIntentAsset {
174
- sourceAsset: FinP2PAsset;
175
- destinationAssets: MoveDestination[];
179
+ sourceAsset: Caip19FinP2PAsset;
180
+ destinationAssets: Caip19MoveDestination[];
176
181
  sourceToSegregatedAccount?: FinIdAccount;
177
182
  }
178
- /**
179
- * Node-shaped `moveDestination`: a destination asset plus its optional
180
- * pre-funded pool. Superset of {@link FinP2PAsset}.
181
- */
182
- export interface MoveDestination extends FinP2PAsset {
183
- fromSegregatedAccount?: FinIdAccount;
184
- /** Write-only; required by the node when `fromSegregatedAccount` is set. */
185
- fromSegregatedAccountOwner?: string;
186
- }
187
183
  export interface MoveIntentRequest extends IntentRequestWithType {
188
184
  type: 'moveIntent';
189
185
  asset: MoveIntentAsset;
@@ -221,8 +217,24 @@ export interface LoanIntent {
221
217
  };
222
218
  settlement: LoanIntentSettlement[];
223
219
  loanInstruction: LoanInstruction;
220
+ additionalAccounts?: Record<string, LoanAdditionalAccount>;
224
221
  signaturePolicy: PresignedIntentSignaturePolicy;
225
222
  }
223
+ /**
224
+ * Node-shaped loan additional account (`additionalAccount` schema), keyed on
225
+ * the intent by the alias a loan policy references. `networkAccount` is the
226
+ * wallet an on-chain leg needs, declared here because the execute payload never
227
+ * names these accounts.
228
+ */
229
+ export interface LoanAdditionalAccount {
230
+ account: {
231
+ asset: Caip19FinP2PAsset;
232
+ account: FinIdAccount;
233
+ networkAccount?: NetworkAccount;
234
+ };
235
+ /** Profile id of the account owner. */
236
+ owner: string;
237
+ }
226
238
  export type IntentRequest = PrimarySaleIntentRequest | RedemptionIntentRequest | BuyingIntentRequest | SellingIntentRequest | LoanIntent | PrivateOfferIntentRequest | MoveIntentRequest;
227
239
  export interface IntentCoreRequest {
228
240
  start: number;
@@ -108,6 +108,40 @@ export interface Profiles {
108
108
  *
109
109
  */
110
110
  cancelIntent(r: IntentQuery, options?: RequestOptions): Promise<void>;
111
+ /**
112
+ * Reject Intent
113
+ *
114
+ * `POST /profiles/asset/{assetId}/intent/{intentId}/reject` — the router's explicit
115
+ * reject endpoint (finp2p-core#2649). Terminal, and distinct from cancel: cancel is the
116
+ * CREATOR withdrawing an intent, reject is the RECEIVER refusing one. Both end the
117
+ * intent, and neither can be undone.
118
+ *
119
+ * Who may reject is decided by the router: only the intent's receiver (private offer:
120
+ * the buyer; transfer request: the creditor/debitor of the action; loan: the side that
121
+ * did NOT create it, resolved from `creatorType`), and only while the intent is
122
+ * ACTIVE. Anyone else gets `403 Insufficient permissions`; a non-active intent gets
123
+ * `400 Invalid operation ... intent can only be rejected while active`.
124
+ *
125
+ * `rejectReason` is optional and, when given, must not be blank — the router refuses a
126
+ * whitespace-only reason, so the SDK sends the body only when a non-blank reason is
127
+ * supplied. It is persisted on the intent and readable by the counterparty as
128
+ * `rejectReason` on the OSS intent.
129
+ *
130
+ * Router support: the endpoint exists on finp2p-node master after #2649 and is not in
131
+ * any 0.28.x tag at the time of writing. An older router answers `404` (code 1100,
132
+ * "no matching operation was found"). There is deliberately NO fallback to the legacy
133
+ * `PATCH { status: 'Rejected' }` here: on those routers the PATCH cannot reject a
134
+ * loan intent at all and drops the reason for every other type, so a silent fallback
135
+ * would report success for a rejection the counterparty never learns the reason of.
136
+ * Callers should surface the 404 as "router does not support rejection yet".
137
+ *
138
+ * @param r
139
+ * @param options
140
+ *
141
+ * @returns
142
+ *
143
+ */
144
+ rejectIntent(r: RejectIntentRequest, options?: RequestOptions): Promise<void>;
111
145
  disableIntentTypes(r: IntentTypesRequest, options?: RequestOptions): Promise<void>;
112
146
  enableIntentTypes(r: IntentTypesRequest, options?: RequestOptions): Promise<void>;
113
147
  syncBalance(r: AccountBalanceSyncRequest, options?: RequestOptions): Promise<void>;
@@ -200,7 +234,7 @@ export interface LedgerAssetBinding {
200
234
  bind?: {
201
235
  assetIdentifierType: 'CAIP-19';
202
236
  network: string;
203
- tokenId: string;
237
+ tokenId?: string;
204
238
  standard: string;
205
239
  resourceId?: string;
206
240
  };
@@ -283,6 +317,17 @@ export interface IntentQuery {
283
317
  assetId: string;
284
318
  intentId: string;
285
319
  }
320
+ /**
321
+ * Reject an intent, optionally saying why. See {@link Profiles.rejectIntent}.
322
+ */
323
+ export interface RejectIntentRequest extends IntentQuery {
324
+ /**
325
+ * Human-readable reason, delivered to the counterparty via the intent's `rejectReason`.
326
+ * Optional; when provided it must not be blank (the router enforces `\S`). The SDK
327
+ * trims it and omits the body entirely when nothing is left.
328
+ */
329
+ rejectReason?: string;
330
+ }
286
331
  export type AssetDenomination = {
287
332
  type: 'fiat';
288
333
  code: Iso4217Code;
@@ -33,6 +33,19 @@ export interface Tokens {
33
33
  *
34
34
  */
35
35
  executeTokenIntent(r: ExecuteRequest, options?: RequestOptions): Promise<ExecuteResponse>;
36
+ /**
37
+ * Predict whether an intent execution would succeed, without executing it.
38
+ *
39
+ * Takes the same request as {@link executeTokenIntent}; the signature is not
40
+ * required. Nothing is persisted.
41
+ *
42
+ * @param r
43
+ * @param options
44
+ *
45
+ * @returns
46
+ *
47
+ */
48
+ dryRunExecuteTokenIntent(r: ExecuteRequest, options?: RequestOptions): Promise<DryRunExecutionPlanResult>;
36
49
  /**
37
50
  * Create transfer and execute it immediately without receiver confirmation/approval
38
51
  *
@@ -250,7 +263,47 @@ export interface TransferRequestIntentExecution {
250
263
  };
251
264
  };
252
265
  }
253
- export type IntentExecutionType = PrimarySaleExecution | BuyingIntentExecution | SellingIntentExecution | RedemptionIntentExecution | LoanIntentExecution | PrivateOfferIntentExecution | TransferRequestIntentExecution;
266
+ /**
267
+ * Node-shaped `moveIntentExecution`: the holder migrates a holding from the
268
+ * move intent's source asset to a chosen destination. `asset` is a
269
+ * `sourceDestinationIntentAsset` — `term` is omitted to move the executor's
270
+ * full holding. Both accounts belong to the executor; assets are node-shaped
271
+ * CAIP-19 identifiers.
272
+ */
273
+ export interface MoveIntentExecution {
274
+ type: 'moveIntentExecution';
275
+ nonce: string;
276
+ owner: string;
277
+ asset: {
278
+ term?: {
279
+ amount: string;
280
+ };
281
+ instruction: {
282
+ sourceAccount: MoveExecutionAssetAccount;
283
+ destinationAccount: MoveExecutionAssetAccount;
284
+ };
285
+ };
286
+ }
287
+ export interface MoveExecutionAssetAccount {
288
+ account: {
289
+ type: string;
290
+ finId: string;
291
+ orgId: string;
292
+ custodian: {
293
+ orgId: string;
294
+ };
295
+ };
296
+ asset: {
297
+ id: string;
298
+ ledgerIdentifier: {
299
+ assetIdentifierType: string;
300
+ network: string;
301
+ standard: string;
302
+ tokenId: string;
303
+ };
304
+ };
305
+ }
306
+ export type IntentExecutionType = PrimarySaleExecution | BuyingIntentExecution | SellingIntentExecution | RedemptionIntentExecution | LoanIntentExecution | PrivateOfferIntentExecution | TransferRequestIntentExecution | MoveIntentExecution;
254
307
  export interface ExecuteRequest {
255
308
  user: string;
256
309
  intentId: string;
@@ -292,3 +345,58 @@ export interface TransferRequest {
292
345
  };
293
346
  };
294
347
  }
348
+ /** Stage at which a dry run determined the intent would not execute. */
349
+ export type DryRunFailureStage = 'requestValidation' | 'policyMatch' | 'translation' | 'participants' | 'capabilities' | 'selfVerification';
350
+ /** Machine-readable outcome class of a dry-run failure. */
351
+ export type DryRunFailureClassification = 'noPolicyMatch' | 'unsupportedIntent' | 'technical' | 'wouldFail';
352
+ export interface DryRunExecutionPlanFailure {
353
+ stage: DryRunFailureStage;
354
+ classification: DryRunFailureClassification;
355
+ code?: number;
356
+ message?: string;
357
+ }
358
+ export interface DryRunCandidatePolicy {
359
+ policyId: string;
360
+ /** Whether this policy was the one selected for the variation. */
361
+ matched: boolean;
362
+ /** Why the policy was rejected; present when `matched` is false. */
363
+ reason?: string;
364
+ }
365
+ export interface DryRunCandidateAsset {
366
+ assetId: string;
367
+ organizationId?: string;
368
+ role: 'main' | 'settlement';
369
+ policies?: DryRunCandidatePolicy[];
370
+ }
371
+ /** One evaluated variation: a combination of assets matched as a unit. */
372
+ export interface DryRunCandidateResult {
373
+ matched: boolean;
374
+ /** Why the combination failed; present when `matched` is false. */
375
+ reason?: string;
376
+ assets?: DryRunCandidateAsset[];
377
+ }
378
+ /**
379
+ * Prediction of an intent execution. When `executable` is true the predicted plan is
380
+ * present and `failure` is absent; when false, `failure` explains why.
381
+ *
382
+ * Treat a negative as reliable and a positive as a prediction: the node's capability
383
+ * checks are deliberately permissive, so an unreachable contributor or an unadvertised
384
+ * capability passes rather than blocks. Good enough to disable an action, not a
385
+ * substitute for authorization.
386
+ */
387
+ export interface DryRunExecutionPlanResult {
388
+ executable: boolean;
389
+ /**
390
+ * The predicted plan, in the operational API's `executionPlan` shape (as returned by
391
+ * GET /execution/{planId}) — deliberately left opaque here rather than typed against
392
+ * the OSS plan shape, which is a different schema. Never persisted.
393
+ */
394
+ plan?: Record<string, unknown>;
395
+ /** Protocol version the predicted plan requires its contributors to support. */
396
+ requiredProtocolVersion?: number;
397
+ /** Non-fatal caveats, e.g. lagging observers or unverified counterparty capabilities. */
398
+ warnings?: string[];
399
+ /** Every evaluated variation; empty for a preview, which evaluates one real contract. */
400
+ candidates?: DryRunCandidateResult[];
401
+ failure?: DryRunExecutionPlanFailure;
402
+ }
@@ -1,10 +1,13 @@
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';
10
+ export * from './InvestorAccounts';
8
11
  export * from './Ledgers';
9
12
  export * from './Messages';
10
13
  export * from './Operations';
@@ -14,13 +14,16 @@ 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);
26
+ __exportStar(require("./InvestorAccounts"), exports);
24
27
  __exportStar(require("./Ledgers"), exports);
25
28
  __exportStar(require("./Messages"), exports);
26
29
  __exportStar(require("./Operations"), exports);
@@ -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,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"}
@@ -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";
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":";;;AAMa,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"}
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"}