@paxosglobal/sdk 0.0.0-stage → 0.1.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 (212) hide show
  1. package/AGENTS.md +268 -0
  2. package/CHANGELOG.md +35 -0
  3. package/LICENSE +191 -0
  4. package/README.md +445 -2
  5. package/dist/auth.d.ts +60 -0
  6. package/dist/auth.js +248 -0
  7. package/dist/auth.js.map +1 -0
  8. package/dist/client.d.ts +353 -0
  9. package/dist/client.js +967 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/constants.d.ts +16 -0
  12. package/dist/constants.js +17 -0
  13. package/dist/constants.js.map +1 -0
  14. package/dist/decimal-fields.d.ts +16 -0
  15. package/dist/decimal-fields.js +570 -0
  16. package/dist/decimal-fields.js.map +1 -0
  17. package/dist/decimal.d.ts +25 -0
  18. package/dist/decimal.js +93 -0
  19. package/dist/decimal.js.map +1 -0
  20. package/dist/decode.d.ts +34 -0
  21. package/dist/decode.js +118 -0
  22. package/dist/decode.js.map +1 -0
  23. package/dist/enums.d.ts +1080 -0
  24. package/dist/enums.js +1031 -0
  25. package/dist/enums.js.map +1 -0
  26. package/dist/errors.d.ts +142 -0
  27. package/dist/errors.js +261 -0
  28. package/dist/errors.js.map +1 -0
  29. package/dist/generated-types.d.ts +13629 -0
  30. package/dist/generated-types.js +3 -0
  31. package/dist/generated-types.js.map +1 -0
  32. package/dist/index.d.ts +32 -0
  33. package/dist/index.js +31 -0
  34. package/dist/index.js.map +1 -0
  35. package/dist/models.d.ts +299 -0
  36. package/dist/models.js +3 -0
  37. package/dist/models.js.map +1 -0
  38. package/dist/paxos-client.d.ts +107 -0
  39. package/dist/paxos-client.js +157 -0
  40. package/dist/paxos-client.js.map +1 -0
  41. package/dist/query-keys.d.ts +1 -0
  42. package/dist/query-keys.js +31 -0
  43. package/dist/query-keys.js.map +1 -0
  44. package/dist/response-defaults.d.ts +2 -0
  45. package/dist/response-defaults.js +109 -0
  46. package/dist/response-defaults.js.map +1 -0
  47. package/dist/services/account-members.d.ts +32 -0
  48. package/dist/services/account-members.js +46 -0
  49. package/dist/services/account-members.js.map +1 -0
  50. package/dist/services/accounts.d.ts +74 -0
  51. package/dist/services/accounts.js +71 -0
  52. package/dist/services/accounts.js.map +1 -0
  53. package/dist/services/address-verification.d.ts +72 -0
  54. package/dist/services/address-verification.js +64 -0
  55. package/dist/services/address-verification.js.map +1 -0
  56. package/dist/services/api-credentials.d.ts +44 -0
  57. package/dist/services/api-credentials.js +42 -0
  58. package/dist/services/api-credentials.js.map +1 -0
  59. package/dist/services/claims.d.ts +68 -0
  60. package/dist/services/claims.js +67 -0
  61. package/dist/services/claims.js.map +1 -0
  62. package/dist/services/cross-chain-transfer.d.ts +71 -0
  63. package/dist/services/cross-chain-transfer.js +68 -0
  64. package/dist/services/cross-chain-transfer.js.map +1 -0
  65. package/dist/services/crypto-deposits.d.ts +30 -0
  66. package/dist/services/crypto-deposits.js +39 -0
  67. package/dist/services/crypto-deposits.js.map +1 -0
  68. package/dist/services/crypto-withdrawals.d.ts +60 -0
  69. package/dist/services/crypto-withdrawals.js +42 -0
  70. package/dist/services/crypto-withdrawals.js.map +1 -0
  71. package/dist/services/deposit-addresses.d.ts +54 -0
  72. package/dist/services/deposit-addresses.js +36 -0
  73. package/dist/services/deposit-addresses.js.map +1 -0
  74. package/dist/services/events.d.ts +53 -0
  75. package/dist/services/events.js +39 -0
  76. package/dist/services/events.js.map +1 -0
  77. package/dist/services/exchange.d.ts +52 -0
  78. package/dist/services/exchange.js +30 -0
  79. package/dist/services/exchange.js.map +1 -0
  80. package/dist/services/fees.d.ts +15 -0
  81. package/dist/services/fees.js +24 -0
  82. package/dist/services/fees.js.map +1 -0
  83. package/dist/services/fiat-transfers.d.ts +133 -0
  84. package/dist/services/fiat-transfers.js +127 -0
  85. package/dist/services/fiat-transfers.js.map +1 -0
  86. package/dist/services/identity-controls.d.ts +43 -0
  87. package/dist/services/identity-controls.js +42 -0
  88. package/dist/services/identity-controls.js.map +1 -0
  89. package/dist/services/identity-documents.d.ts +45 -0
  90. package/dist/services/identity-documents.js +50 -0
  91. package/dist/services/identity-documents.js.map +1 -0
  92. package/dist/services/identity.d.ts +122 -0
  93. package/dist/services/identity.js +66 -0
  94. package/dist/services/identity.js.map +1 -0
  95. package/dist/services/index.d.ts +89 -0
  96. package/dist/services/index.js +55 -0
  97. package/dist/services/index.js.map +1 -0
  98. package/dist/services/institution-members.d.ts +30 -0
  99. package/dist/services/institution-members.js +44 -0
  100. package/dist/services/institution-members.js.map +1 -0
  101. package/dist/services/internal-transfers.d.ts +15 -0
  102. package/dist/services/internal-transfers.js +26 -0
  103. package/dist/services/internal-transfers.js.map +1 -0
  104. package/dist/services/issuer-quotes.d.ts +72 -0
  105. package/dist/services/issuer-quotes.js +66 -0
  106. package/dist/services/issuer-quotes.js.map +1 -0
  107. package/dist/services/limits.d.ts +20 -0
  108. package/dist/services/limits.js +23 -0
  109. package/dist/services/limits.js.map +1 -0
  110. package/dist/services/market-data.d.ts +15 -0
  111. package/dist/services/market-data.js +23 -0
  112. package/dist/services/market-data.js.map +1 -0
  113. package/dist/services/monitoring-addresses.d.ts +64 -0
  114. package/dist/services/monitoring-addresses.js +68 -0
  115. package/dist/services/monitoring-addresses.js.map +1 -0
  116. package/dist/services/orchestration-rules.d.ts +53 -0
  117. package/dist/services/orchestration-rules.js +47 -0
  118. package/dist/services/orchestration-rules.js.map +1 -0
  119. package/dist/services/orchestrations.d.ts +70 -0
  120. package/dist/services/orchestrations.js +45 -0
  121. package/dist/services/orchestrations.js.map +1 -0
  122. package/dist/services/orders.d.ts +86 -0
  123. package/dist/services/orders.js +67 -0
  124. package/dist/services/orders.js.map +1 -0
  125. package/dist/services/paxos-transfers.d.ts +24 -0
  126. package/dist/services/paxos-transfers.js +35 -0
  127. package/dist/services/paxos-transfers.js.map +1 -0
  128. package/dist/services/payments.d.ts +46 -0
  129. package/dist/services/payments.js +35 -0
  130. package/dist/services/payments.js.map +1 -0
  131. package/dist/services/payout-groups.d.ts +59 -0
  132. package/dist/services/payout-groups.js +59 -0
  133. package/dist/services/payout-groups.js.map +1 -0
  134. package/dist/services/pricing.d.ts +67 -0
  135. package/dist/services/pricing.js +42 -0
  136. package/dist/services/pricing.js.map +1 -0
  137. package/dist/services/profiles.d.ts +106 -0
  138. package/dist/services/profiles.js +84 -0
  139. package/dist/services/profiles.js.map +1 -0
  140. package/dist/services/quote-executions.d.ts +51 -0
  141. package/dist/services/quote-executions.js +41 -0
  142. package/dist/services/quote-executions.js.map +1 -0
  143. package/dist/services/quotes.d.ts +44 -0
  144. package/dist/services/quotes.js +48 -0
  145. package/dist/services/quotes.js.map +1 -0
  146. package/dist/services/reward-addresses.d.ts +80 -0
  147. package/dist/services/reward-addresses.js +79 -0
  148. package/dist/services/reward-addresses.js.map +1 -0
  149. package/dist/services/rewards-statements.d.ts +35 -0
  150. package/dist/services/rewards-statements.js +32 -0
  151. package/dist/services/rewards-statements.js.map +1 -0
  152. package/dist/services/rewards.d.ts +34 -0
  153. package/dist/services/rewards.js +37 -0
  154. package/dist/services/rewards.js.map +1 -0
  155. package/dist/services/sandbox-deposits.d.ts +15 -0
  156. package/dist/services/sandbox-deposits.js +22 -0
  157. package/dist/services/sandbox-deposits.js.map +1 -0
  158. package/dist/services/sandbox-fiat-transfers.d.ts +15 -0
  159. package/dist/services/sandbox-fiat-transfers.js +24 -0
  160. package/dist/services/sandbox-fiat-transfers.js.map +1 -0
  161. package/dist/services/sandbox-identity.d.ts +39 -0
  162. package/dist/services/sandbox-identity.js +60 -0
  163. package/dist/services/sandbox-identity.js.map +1 -0
  164. package/dist/services/settlement.d.ts +76 -0
  165. package/dist/services/settlement.js +79 -0
  166. package/dist/services/settlement.js.map +1 -0
  167. package/dist/services/stablecoin-conversion.d.ts +70 -0
  168. package/dist/services/stablecoin-conversion.js +65 -0
  169. package/dist/services/stablecoin-conversion.js.map +1 -0
  170. package/dist/services/statements.d.ts +44 -0
  171. package/dist/services/statements.js +35 -0
  172. package/dist/services/statements.js.map +1 -0
  173. package/dist/services/tax-documentation.d.ts +21 -0
  174. package/dist/services/tax-documentation.js +33 -0
  175. package/dist/services/tax-documentation.js.map +1 -0
  176. package/dist/services/tax-forms.d.ts +45 -0
  177. package/dist/services/tax-forms.js +38 -0
  178. package/dist/services/tax-forms.js.map +1 -0
  179. package/dist/services/transfers.d.ts +96 -0
  180. package/dist/services/transfers.js +37 -0
  181. package/dist/services/transfers.js.map +1 -0
  182. package/dist/services/travel-rule.d.ts +32 -0
  183. package/dist/services/travel-rule.js +30 -0
  184. package/dist/services/travel-rule.js.map +1 -0
  185. package/dist/services/user-audit-logs.d.ts +45 -0
  186. package/dist/services/user-audit-logs.js +27 -0
  187. package/dist/services/user-audit-logs.js.map +1 -0
  188. package/dist/services/webhooks.d.ts +58 -0
  189. package/dist/services/webhooks.js +42 -0
  190. package/dist/services/webhooks.js.map +1 -0
  191. package/dist/signing.d.ts +33 -0
  192. package/dist/signing.js +186 -0
  193. package/dist/signing.js.map +1 -0
  194. package/dist/testing/fixtures.d.ts +40 -0
  195. package/dist/testing/fixtures.js +131 -0
  196. package/dist/testing/fixtures.js.map +1 -0
  197. package/dist/testing/index.d.ts +28 -0
  198. package/dist/testing/index.js +28 -0
  199. package/dist/testing/index.js.map +1 -0
  200. package/dist/testing/mock-server.d.ts +121 -0
  201. package/dist/testing/mock-server.js +276 -0
  202. package/dist/testing/mock-server.js.map +1 -0
  203. package/dist/timeouts.d.ts +13 -0
  204. package/dist/timeouts.js +71 -0
  205. package/dist/timeouts.js.map +1 -0
  206. package/dist/types.d.ts +6 -0
  207. package/dist/types.js +7 -0
  208. package/dist/types.js.map +1 -0
  209. package/dist/version.d.ts +1 -0
  210. package/dist/version.js +2 -0
  211. package/dist/version.js.map +1 -0
  212. package/package.json +67 -4
@@ -0,0 +1,76 @@
1
+ import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
2
+ import type { KnownTransactionStatus } from "../enums.js";
3
+ import type { CreateTransactionRequest, Transaction } from "../models.js";
4
+ export interface ListTransactionsParams {
5
+ /** Transaction statuses to filter on
6
+
7
+ - PENDING: Initial state of a settlement transaction upon creation.
8
+ - SETTLED: Indicates all obligations belong to the settlement transaction have been enacted.
9
+ - EXPIRED: Indicates the settlement transaction is no longer eligible for settlement.
10
+ - CANCELLED: Indicates the settlement transaction was cancelled by the source profile.
11
+ - AFFIRMED: Indicates the settlement transaction will be eligible for settlement once within the window. */
12
+ statuses?: (KnownTransactionStatus | (string & {}))[];
13
+ /** The `profile_id` of the entity on the submitting side of the transaction. */
14
+ source_profile_id?: string;
15
+ /** The `profile_id` of the entity on the receiving side of the transaction. */
16
+ target_profile_id?: string;
17
+ /** Number of results to return. Defaults to 100 if no limit is provided. */
18
+ limit?: number;
19
+ /** Resume from a cursor previously returned as a page's `nextCursor`. */
20
+ page_cursor?: string;
21
+ }
22
+ /**
23
+ * SettlementService — Use the Settlements API to facilitate simultaneous
24
+ * exchange of pre-funded assets. Automate a variety of use cases that require
25
+ * two-party approval, including net settlement of over-the-counter trades,
26
+ * withdrawal requests for tri-party collateral, payment requests, and
27
+ * bilateral settlement for marketplace end users.
28
+ *
29
+ * The simple request-and-approval workflow supports both one-directional and
30
+ * bidirectional transactions to allow a user to receive an asset (for example,
31
+ * send USDP) or simultaneously send and receive assets (for example, send USD
32
+ * and receive BTC and ETH). Only when all parties are in agreement and assets
33
+ * are fully funded does the Settlements API allow for change of custody. Upon
34
+ * completion, all settled assets are immediately available for trading,
35
+ * transferring, withdrawal or other supported activities.
36
+ *
37
+ * The Source Profile initiates the transaction for the Target Profile to
38
+ * approve. The `DIRECTION` of each asset is always relative to the Source
39
+ * Profile and only the owner of the Source Profile can cancel a transaction if
40
+ * it hasn't been approved by the Target Profile.
41
+ *
42
+ * Access via `client.settlement`.
43
+ */
44
+ export declare class SettlementService {
45
+ private readonly client;
46
+ /**
47
+ * List Transactions
48
+ *
49
+ * Requires scope: settlement:read_transaction
50
+ */
51
+ listTransactions(params?: ListTransactionsParams, opts?: RequestOptions): PageIterator<WithRaw<Transaction>>;
52
+ /**
53
+ * Create Transaction
54
+ *
55
+ * Requires scope: settlement:write_transaction
56
+ */
57
+ createTransaction(request: CreateTransactionRequest, opts?: RequestOptions): Promise<WithRaw<Transaction>>;
58
+ /**
59
+ * Get Transaction
60
+ *
61
+ * Requires scope: settlement:read_transaction
62
+ */
63
+ getTransaction(transactionId: string, opts?: RequestOptions): Promise<WithRaw<Transaction>>;
64
+ /**
65
+ * Cancel Transaction
66
+ *
67
+ * Requires scope: settlement:write_transaction
68
+ */
69
+ cancelTransaction(transactionId: string, opts?: RequestOptions): Promise<WithRaw<Transaction>>;
70
+ /**
71
+ * Affirm Transaction
72
+ *
73
+ * Requires scope: settlement:write_transaction
74
+ */
75
+ affirmTransaction(transactionId: string, opts?: RequestOptions): Promise<WithRaw<Transaction>>;
76
+ }
@@ -0,0 +1,79 @@
1
+ // Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
2
+ import { buildPath } from "../client.js";
3
+ /**
4
+ * SettlementService — Use the Settlements API to facilitate simultaneous
5
+ * exchange of pre-funded assets. Automate a variety of use cases that require
6
+ * two-party approval, including net settlement of over-the-counter trades,
7
+ * withdrawal requests for tri-party collateral, payment requests, and
8
+ * bilateral settlement for marketplace end users.
9
+ *
10
+ * The simple request-and-approval workflow supports both one-directional and
11
+ * bidirectional transactions to allow a user to receive an asset (for example,
12
+ * send USDP) or simultaneously send and receive assets (for example, send USD
13
+ * and receive BTC and ETH). Only when all parties are in agreement and assets
14
+ * are fully funded does the Settlements API allow for change of custody. Upon
15
+ * completion, all settled assets are immediately available for trading,
16
+ * transferring, withdrawal or other supported activities.
17
+ *
18
+ * The Source Profile initiates the transaction for the Target Profile to
19
+ * approve. The `DIRECTION` of each asset is always relative to the Source
20
+ * Profile and only the owner of the Source Profile can cancel a transaction if
21
+ * it hasn't been approved by the Target Profile.
22
+ *
23
+ * Access via `client.settlement`.
24
+ */
25
+ export class SettlementService {
26
+ client;
27
+ /** @internal */
28
+ constructor(client) {
29
+ this.client = client;
30
+ }
31
+ /**
32
+ * List Transactions
33
+ *
34
+ * Requires scope: settlement:read_transaction
35
+ */
36
+ listTransactions(params, opts) {
37
+ return this.client.paginate("/settlement/transactions", "items", params, opts, {
38
+ responseSchema: "ListTransactionsResponse",
39
+ });
40
+ }
41
+ /**
42
+ * Create Transaction
43
+ *
44
+ * Requires scope: settlement:write_transaction
45
+ */
46
+ async createTransaction(request, opts) {
47
+ const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };
48
+ return this.client.post("/settlement/transactions", body, opts, {
49
+ responseSchema: "Transaction",
50
+ requestSchema: "CreateTransactionRequest",
51
+ replayProtected: true,
52
+ });
53
+ }
54
+ /**
55
+ * Get Transaction
56
+ *
57
+ * Requires scope: settlement:read_transaction
58
+ */
59
+ async getTransaction(transactionId, opts) {
60
+ return this.client.get(buildPath("/settlement/transactions/{transaction_id}", { transaction_id: transactionId }), undefined, opts, { responseSchema: "Transaction" });
61
+ }
62
+ /**
63
+ * Cancel Transaction
64
+ *
65
+ * Requires scope: settlement:write_transaction
66
+ */
67
+ async cancelTransaction(transactionId, opts) {
68
+ return this.client.delete(buildPath("/settlement/transactions/{transaction_id}", { transaction_id: transactionId }), undefined, opts, { responseSchema: "Transaction" });
69
+ }
70
+ /**
71
+ * Affirm Transaction
72
+ *
73
+ * Requires scope: settlement:write_transaction
74
+ */
75
+ async affirmTransaction(transactionId, opts) {
76
+ return this.client.put(buildPath("/settlement/transactions/{transaction_id}/affirm", { transaction_id: transactionId }), undefined, opts, { responseSchema: "Transaction" });
77
+ }
78
+ }
79
+ //# sourceMappingURL=settlement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settlement.js","sourceRoot":"","sources":["../../src/services/settlement.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAwBzC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,iBAAiB;IAEC;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,gBAAgB,CAAC,MAA+B,EAAE,IAAqB;QACrE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAuB,0BAA0B,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;YACnG,cAAc,EAAE,0BAA0B;SAC3C,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CAAC,OAAiC,EAAE,IAAqB;QAC9E,MAAM,IAAI,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;QACtF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAuB,0BAA0B,EAAE,IAAI,EAAE,IAAI,EAAE;YACpF,cAAc,EAAE,aAAa;YAC7B,aAAa,EAAE,0BAA0B;YACzC,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,cAAc,CAAC,aAAqB,EAAE,IAAqB;QAC/D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,2CAA2C,EAAE,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC,EACzF,SAAS,EACT,IAAI,EACJ,EAAE,cAAc,EAAE,aAAa,EAAE,CAClC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CAAC,aAAqB,EAAE,IAAqB;QAClE,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CACvB,SAAS,CAAC,2CAA2C,EAAE,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC,EACzF,SAAS,EACT,IAAI,EACJ,EAAE,cAAc,EAAE,aAAa,EAAE,CAClC,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CAAC,aAAqB,EAAE,IAAqB;QAClE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,kDAAkD,EAAE,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC,EAChG,SAAS,EACT,IAAI,EACJ,EAAE,cAAc,EAAE,aAAa,EAAE,CAClC,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport { buildPath } from \"../client.js\";\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownTransactionStatus } from \"../enums.js\";\nimport type { CreateTransactionRequest, Transaction } from \"../models.js\";\n\nexport interface ListTransactionsParams {\n /** Transaction statuses to filter on\n\n - PENDING: Initial state of a settlement transaction upon creation.\n - SETTLED: Indicates all obligations belong to the settlement transaction have been enacted.\n - EXPIRED: Indicates the settlement transaction is no longer eligible for settlement.\n - CANCELLED: Indicates the settlement transaction was cancelled by the source profile.\n - AFFIRMED: Indicates the settlement transaction will be eligible for settlement once within the window. */\n statuses?: (KnownTransactionStatus | (string & {}))[];\n /** The `profile_id` of the entity on the submitting side of the transaction. */\n source_profile_id?: string;\n /** The `profile_id` of the entity on the receiving side of the transaction. */\n target_profile_id?: string;\n /** Number of results to return. Defaults to 100 if no limit is provided. */\n limit?: number;\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\n/**\n * SettlementService — Use the Settlements API to facilitate simultaneous\n * exchange of pre-funded assets. Automate a variety of use cases that require\n * two-party approval, including net settlement of over-the-counter trades,\n * withdrawal requests for tri-party collateral, payment requests, and\n * bilateral settlement for marketplace end users.\n *\n * The simple request-and-approval workflow supports both one-directional and\n * bidirectional transactions to allow a user to receive an asset (for example,\n * send USDP) or simultaneously send and receive assets (for example, send USD\n * and receive BTC and ETH). Only when all parties are in agreement and assets\n * are fully funded does the Settlements API allow for change of custody. Upon\n * completion, all settled assets are immediately available for trading,\n * transferring, withdrawal or other supported activities.\n *\n * The Source Profile initiates the transaction for the Target Profile to\n * approve. The `DIRECTION` of each asset is always relative to the Source\n * Profile and only the owner of the Source Profile can cancel a transaction if\n * it hasn't been approved by the Target Profile.\n *\n * Access via `client.settlement`.\n */\nexport class SettlementService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Transactions\n *\n * Requires scope: settlement:read_transaction\n */\n listTransactions(params?: ListTransactionsParams, opts?: RequestOptions): PageIterator<WithRaw<Transaction>> {\n return this.client.paginate<WithRaw<Transaction>>(\"/settlement/transactions\", \"items\", params, opts, {\n responseSchema: \"ListTransactionsResponse\",\n });\n }\n\n /**\n * Create Transaction\n *\n * Requires scope: settlement:write_transaction\n */\n async createTransaction(request: CreateTransactionRequest, opts?: RequestOptions): Promise<WithRaw<Transaction>> {\n const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };\n return this.client.post<WithRaw<Transaction>>(\"/settlement/transactions\", body, opts, {\n responseSchema: \"Transaction\",\n requestSchema: \"CreateTransactionRequest\",\n replayProtected: true,\n });\n }\n\n /**\n * Get Transaction\n *\n * Requires scope: settlement:read_transaction\n */\n async getTransaction(transactionId: string, opts?: RequestOptions): Promise<WithRaw<Transaction>> {\n return this.client.get<WithRaw<Transaction>>(\n buildPath(\"/settlement/transactions/{transaction_id}\", { transaction_id: transactionId }),\n undefined,\n opts,\n { responseSchema: \"Transaction\" },\n );\n }\n\n /**\n * Cancel Transaction\n *\n * Requires scope: settlement:write_transaction\n */\n async cancelTransaction(transactionId: string, opts?: RequestOptions): Promise<WithRaw<Transaction>> {\n return this.client.delete(\n buildPath(\"/settlement/transactions/{transaction_id}\", { transaction_id: transactionId }),\n undefined,\n opts,\n { responseSchema: \"Transaction\" },\n );\n }\n\n /**\n * Affirm Transaction\n *\n * Requires scope: settlement:write_transaction\n */\n async affirmTransaction(transactionId: string, opts?: RequestOptions): Promise<WithRaw<Transaction>> {\n return this.client.put<WithRaw<Transaction>>(\n buildPath(\"/settlement/transactions/{transaction_id}/affirm\", { transaction_id: transactionId }),\n undefined,\n opts,\n { responseSchema: \"Transaction\" },\n );\n }\n}\n"]}
@@ -0,0 +1,70 @@
1
+ import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
2
+ import type { KnownSortOrder } from "../enums.js";
3
+ import type { CreateStablecoinConversionRequest, StablecoinConversion } from "../models.js";
4
+ export interface ListStablecoinConversionsParams {
5
+ /** The [Profile](#tag/Profiles) associated with a conversion. Required in the
6
+ [Create Stablecoin Conversion](#operation/CreateStablecoinConversion) request. */
7
+ profile_id?: string;
8
+ /** Client provided, unique Reference ID included the
9
+ [Create Stablecoin Conversion](#operation/CreateStablecoinConversion) request. */
10
+ ref_id?: string;
11
+ /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
12
+ created_at_begin?: string;
13
+ /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
14
+ created_at_end?: string;
15
+ /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
16
+ updated_at_begin?: string;
17
+ /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */
18
+ updated_at_end?: string;
19
+ /** Return items in ascending (ASC) or descending (DESC) order by `created_at` timestamp.
20
+
21
+ Default order is descending (DESC). */
22
+ order?: KnownSortOrder | (string & {});
23
+ /** Number of results to return.
24
+
25
+ Default is 100 items. Maximum is 1000 items. */
26
+ limit?: number;
27
+ /** Resume from a cursor previously returned as a page's `nextCursor`. */
28
+ page_cursor?: string;
29
+ }
30
+ /**
31
+ * StablecoinConversionService — Convert between fiat and stablecoin using
32
+ * {@link StablecoinConversionService.createStablecoinConversion | Create Stablecoin Conversion}
33
+ * and check the status of a
34
+ * {@link StablecoinConversionService.getStablecoinConversion | single conversion}
35
+ * or retrieve a
36
+ * {@link StablecoinConversionService.listStablecoinConversions | list of conversions}.
37
+ *
38
+ * Access via `client.stablecoinConversion`.
39
+ */
40
+ export declare class StablecoinConversionService {
41
+ private readonly client;
42
+ /**
43
+ * List Stablecoin Conversions
44
+ *
45
+ * Requires scope: conversion:read_conversion_stablecoin
46
+ * @deprecated This API operation is deprecated.
47
+ */
48
+ listStablecoinConversions(params?: ListStablecoinConversionsParams, opts?: RequestOptions): PageIterator<WithRaw<StablecoinConversion>>;
49
+ /**
50
+ * Create Stablecoin Conversion
51
+ *
52
+ * Requires scope: conversion:write_conversion_stablecoin
53
+ * @deprecated This API operation is deprecated.
54
+ */
55
+ createStablecoinConversion(request: CreateStablecoinConversionRequest, opts?: RequestOptions): Promise<WithRaw<StablecoinConversion>>;
56
+ /**
57
+ * Get Stablecoin Conversion
58
+ *
59
+ * Requires scope: conversion:read_conversion_stablecoin
60
+ * @deprecated This API operation is deprecated.
61
+ */
62
+ getStablecoinConversion(id: string, opts?: RequestOptions): Promise<WithRaw<StablecoinConversion>>;
63
+ /**
64
+ * Cancel Stablecoin Conversion
65
+ *
66
+ * Requires scope: conversion:write_conversion_stablecoin
67
+ * @deprecated This API operation is deprecated.
68
+ */
69
+ cancelStablecoinConversion(id: string, opts?: RequestOptions): Promise<WithRaw<StablecoinConversion>>;
70
+ }
@@ -0,0 +1,65 @@
1
+ // Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
2
+ import { buildPath } from "../client.js";
3
+ /**
4
+ * StablecoinConversionService — Convert between fiat and stablecoin using
5
+ * {@link StablecoinConversionService.createStablecoinConversion | Create Stablecoin Conversion}
6
+ * and check the status of a
7
+ * {@link StablecoinConversionService.getStablecoinConversion | single conversion}
8
+ * or retrieve a
9
+ * {@link StablecoinConversionService.listStablecoinConversions | list of conversions}.
10
+ *
11
+ * Access via `client.stablecoinConversion`.
12
+ */
13
+ export class StablecoinConversionService {
14
+ client;
15
+ /** @internal */
16
+ constructor(client) {
17
+ this.client = client;
18
+ }
19
+ /**
20
+ * List Stablecoin Conversions
21
+ *
22
+ * Requires scope: conversion:read_conversion_stablecoin
23
+ * @deprecated This API operation is deprecated.
24
+ */
25
+ listStablecoinConversions(params, opts) {
26
+ return this.client.paginate("/conversion/stablecoins", "items", params, opts, {
27
+ responseSchema: "ListStablecoinConversionsResponse",
28
+ });
29
+ }
30
+ /**
31
+ * Create Stablecoin Conversion
32
+ *
33
+ * Requires scope: conversion:write_conversion_stablecoin
34
+ * @deprecated This API operation is deprecated.
35
+ */
36
+ async createStablecoinConversion(request, opts) {
37
+ const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };
38
+ return this.client.post("/conversion/stablecoins", body, opts, {
39
+ responseSchema: "StablecoinConversion",
40
+ requestSchema: "CreateStablecoinConversionRequest",
41
+ replayProtected: true,
42
+ });
43
+ }
44
+ /**
45
+ * Get Stablecoin Conversion
46
+ *
47
+ * Requires scope: conversion:read_conversion_stablecoin
48
+ * @deprecated This API operation is deprecated.
49
+ */
50
+ async getStablecoinConversion(id, opts) {
51
+ return this.client.get(buildPath("/conversion/stablecoins/{id}", { id: id }), undefined, opts, { responseSchema: "StablecoinConversion" });
52
+ }
53
+ /**
54
+ * Cancel Stablecoin Conversion
55
+ *
56
+ * Requires scope: conversion:write_conversion_stablecoin
57
+ * @deprecated This API operation is deprecated.
58
+ */
59
+ async cancelStablecoinConversion(id, opts) {
60
+ return this.client.delete(buildPath("/conversion/stablecoins/{id}", { id: id }), undefined, opts, {
61
+ responseSchema: "StablecoinConversion",
62
+ });
63
+ }
64
+ }
65
+ //# sourceMappingURL=stablecoin-conversion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stablecoin-conversion.js","sourceRoot":"","sources":["../../src/services/stablecoin-conversion.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAgCzC;;;;;;;;;GASG;AACH,MAAM,OAAO,2BAA2B;IAET;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;;OAKG;IACH,yBAAyB,CACvB,MAAwC,EACxC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAgC,yBAAyB,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;YAC3G,cAAc,EAAE,mCAAmC;SACpD,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,0BAA0B,CAC9B,OAA0C,EAC1C,IAAqB;QAErB,MAAM,IAAI,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,CAAC;QACtF,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAgC,yBAAyB,EAAE,IAAI,EAAE,IAAI,EAAE;YAC5F,cAAc,EAAE,sBAAsB;YACtC,aAAa,EAAE,mCAAmC;YAClD,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,uBAAuB,CAAC,EAAU,EAAE,IAAqB;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,8BAA8B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACrD,SAAS,EACT,IAAI,EACJ,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAC3C,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,0BAA0B,CAAC,EAAU,EAAE,IAAqB;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,8BAA8B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE;YAChG,cAAc,EAAE,sBAAsB;SACvC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport { buildPath } from \"../client.js\";\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownSortOrder } from \"../enums.js\";\nimport type { CreateStablecoinConversionRequest, StablecoinConversion } from \"../models.js\";\n\nexport interface ListStablecoinConversionsParams {\n /** The [Profile](#tag/Profiles) associated with a conversion. Required in the\n[Create Stablecoin Conversion](#operation/CreateStablecoinConversion) request. */\n profile_id?: string;\n /** Client provided, unique Reference ID included the\n[Create Stablecoin Conversion](#operation/CreateStablecoinConversion) request. */\n ref_id?: string;\n /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_begin?: string;\n /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_end?: string;\n /** Only return records after this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n updated_at_begin?: string;\n /** Only return records before this timestamp, inclusive. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n updated_at_end?: string;\n /** Return items in ascending (ASC) or descending (DESC) order by `created_at` timestamp.\n\nDefault order is descending (DESC). */\n order?: KnownSortOrder | (string & {});\n /** Number of results to return.\n\nDefault is 100 items. Maximum is 1000 items. */\n limit?: number;\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\n/**\n * StablecoinConversionService — Convert between fiat and stablecoin using\n * {@link StablecoinConversionService.createStablecoinConversion | Create Stablecoin Conversion}\n * and check the status of a\n * {@link StablecoinConversionService.getStablecoinConversion | single conversion}\n * or retrieve a\n * {@link StablecoinConversionService.listStablecoinConversions | list of conversions}.\n *\n * Access via `client.stablecoinConversion`.\n */\nexport class StablecoinConversionService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Stablecoin Conversions\n *\n * Requires scope: conversion:read_conversion_stablecoin\n * @deprecated This API operation is deprecated.\n */\n listStablecoinConversions(\n params?: ListStablecoinConversionsParams,\n opts?: RequestOptions,\n ): PageIterator<WithRaw<StablecoinConversion>> {\n return this.client.paginate<WithRaw<StablecoinConversion>>(\"/conversion/stablecoins\", \"items\", params, opts, {\n responseSchema: \"ListStablecoinConversionsResponse\",\n });\n }\n\n /**\n * Create Stablecoin Conversion\n *\n * Requires scope: conversion:write_conversion_stablecoin\n * @deprecated This API operation is deprecated.\n */\n async createStablecoinConversion(\n request: CreateStablecoinConversionRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<StablecoinConversion>> {\n const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };\n return this.client.post<WithRaw<StablecoinConversion>>(\"/conversion/stablecoins\", body, opts, {\n responseSchema: \"StablecoinConversion\",\n requestSchema: \"CreateStablecoinConversionRequest\",\n replayProtected: true,\n });\n }\n\n /**\n * Get Stablecoin Conversion\n *\n * Requires scope: conversion:read_conversion_stablecoin\n * @deprecated This API operation is deprecated.\n */\n async getStablecoinConversion(id: string, opts?: RequestOptions): Promise<WithRaw<StablecoinConversion>> {\n return this.client.get<WithRaw<StablecoinConversion>>(\n buildPath(\"/conversion/stablecoins/{id}\", { id: id }),\n undefined,\n opts,\n { responseSchema: \"StablecoinConversion\" },\n );\n }\n\n /**\n * Cancel Stablecoin Conversion\n *\n * Requires scope: conversion:write_conversion_stablecoin\n * @deprecated This API operation is deprecated.\n */\n async cancelStablecoinConversion(id: string, opts?: RequestOptions): Promise<WithRaw<StablecoinConversion>> {\n return this.client.delete(buildPath(\"/conversion/stablecoins/{id}\", { id: id }), undefined, opts, {\n responseSchema: \"StablecoinConversion\",\n });\n }\n}\n"]}
@@ -0,0 +1,44 @@
1
+ import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
2
+ import type { KnownSortOrder, KnownStatementStatus } from "../enums.js";
3
+ import type { Statement } from "../models.js";
4
+ export interface ListStatementsParams {
5
+ /** customer_id is a required field. */
6
+ customer_id?: string;
7
+ /** Optionally filter by the ref_ids of the statements. */
8
+ ref_ids?: string[];
9
+ /** Optionally filter by the ids of the statements. */
10
+ statement_ids?: string[];
11
+ /** Optionally filter by the statuses of the statements to be returned. Defaults to all statuses. */
12
+ statuses?: (KnownStatementStatus | (string & {}))[];
13
+ /** Number of results to return. Defaults to 100. */
14
+ limit?: number;
15
+ /** Sort order for the results by period start, defaults to DESC if not provided. */
16
+ order?: KnownSortOrder | (string & {});
17
+ /** Resume from a cursor previously returned as a page's `nextCursor`. */
18
+ page_cursor?: string;
19
+ }
20
+ /**
21
+ * StatementsService — A Statement summarizes all eligible stablecoin rewards
22
+ * for a given organization over a fixed time period. It aggregates earned
23
+ * reward types (e.g., custody, mint, acceptance) and records whether the
24
+ * statement was paid.
25
+ *
26
+ * Statements are generated monthly and are immutable. Revised statements will
27
+ * be issued as a new statement with a unique ID. Statements can be used to
28
+ * reconcile balances or for accounting and accounts receivable purposes.
29
+ *
30
+ * *These endpoints are only relevant for Global Dollar Network (GDN)
31
+ * partners.*
32
+ *
33
+ * Access via `client.statements`.
34
+ */
35
+ export declare class StatementsService {
36
+ private readonly client;
37
+ /**
38
+ * List Statements
39
+ *
40
+ * Requires scope: statements:read_statement
41
+ * @deprecated This API operation is deprecated.
42
+ */
43
+ listStatements(params?: ListStatementsParams, opts?: RequestOptions): PageIterator<WithRaw<Statement>>;
44
+ }
@@ -0,0 +1,35 @@
1
+ // Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
2
+ /**
3
+ * StatementsService — A Statement summarizes all eligible stablecoin rewards
4
+ * for a given organization over a fixed time period. It aggregates earned
5
+ * reward types (e.g., custody, mint, acceptance) and records whether the
6
+ * statement was paid.
7
+ *
8
+ * Statements are generated monthly and are immutable. Revised statements will
9
+ * be issued as a new statement with a unique ID. Statements can be used to
10
+ * reconcile balances or for accounting and accounts receivable purposes.
11
+ *
12
+ * *These endpoints are only relevant for Global Dollar Network (GDN)
13
+ * partners.*
14
+ *
15
+ * Access via `client.statements`.
16
+ */
17
+ export class StatementsService {
18
+ client;
19
+ /** @internal */
20
+ constructor(client) {
21
+ this.client = client;
22
+ }
23
+ /**
24
+ * List Statements
25
+ *
26
+ * Requires scope: statements:read_statement
27
+ * @deprecated This API operation is deprecated.
28
+ */
29
+ listStatements(params, opts) {
30
+ return this.client.paginate("/statements", "statements", params, opts, {
31
+ responseSchema: "ListStatementsResponse",
32
+ });
33
+ }
34
+ }
35
+ //# sourceMappingURL=statements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statements.js","sourceRoot":"","sources":["../../src/services/statements.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAuBpE;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,iBAAiB;IAEC;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;;OAKG;IACH,cAAc,CAAC,MAA6B,EAAE,IAAqB;QACjE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAqB,aAAa,EAAE,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE;YACzF,cAAc,EAAE,wBAAwB;SACzC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport type { HttpClient, RequestOptions, PageIterator, WithRaw } from \"../client.js\";\nimport type { KnownSortOrder, KnownStatementStatus } from \"../enums.js\";\nimport type { Statement } from \"../models.js\";\n\nexport interface ListStatementsParams {\n /** customer_id is a required field. */\n customer_id?: string;\n /** Optionally filter by the ref_ids of the statements. */\n ref_ids?: string[];\n /** Optionally filter by the ids of the statements. */\n statement_ids?: string[];\n /** Optionally filter by the statuses of the statements to be returned. Defaults to all statuses. */\n statuses?: (KnownStatementStatus | (string & {}))[];\n /** Number of results to return. Defaults to 100. */\n limit?: number;\n /** Sort order for the results by period start, defaults to DESC if not provided. */\n order?: KnownSortOrder | (string & {});\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\n/**\n * StatementsService — A Statement summarizes all eligible stablecoin rewards\n * for a given organization over a fixed time period. It aggregates earned\n * reward types (e.g., custody, mint, acceptance) and records whether the\n * statement was paid.\n *\n * Statements are generated monthly and are immutable. Revised statements will\n * be issued as a new statement with a unique ID. Statements can be used to\n * reconcile balances or for accounting and accounts receivable purposes.\n *\n * *These endpoints are only relevant for Global Dollar Network (GDN)\n * partners.*\n *\n * Access via `client.statements`.\n */\nexport class StatementsService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Statements\n *\n * Requires scope: statements:read_statement\n * @deprecated This API operation is deprecated.\n */\n listStatements(params?: ListStatementsParams, opts?: RequestOptions): PageIterator<WithRaw<Statement>> {\n return this.client.paginate<WithRaw<Statement>>(\"/statements\", \"statements\", params, opts, {\n responseSchema: \"ListStatementsResponse\",\n });\n }\n}\n"]}
@@ -0,0 +1,21 @@
1
+ import type { RequestOptions, WithRaw } from "../client.js";
2
+ import type { CreateTaxDocumentationRequest, TaxDocumentation } from "../models.js";
3
+ /**
4
+ * TaxDocumentationService provides access to TaxDocumentation API operations.
5
+ * Access via `client.taxDocumentation`.
6
+ */
7
+ export declare class TaxDocumentationService {
8
+ private readonly client;
9
+ /**
10
+ * CreateTaxDocumentation stores a partner-collected tax form for an Identity.
11
+ *
12
+ * Requires scope: identity:write_identity
13
+ */
14
+ createTaxDocumentation(request: CreateTaxDocumentationRequest, opts?: RequestOptions): Promise<WithRaw<TaxDocumentation>>;
15
+ /**
16
+ * GetTaxDocumentation returns the current accepted tax form for an Identity.
17
+ *
18
+ * Requires scope: identity:read_identity
19
+ */
20
+ getTaxDocumentation(identityId: string, opts?: RequestOptions): Promise<WithRaw<TaxDocumentation>>;
21
+ }
@@ -0,0 +1,33 @@
1
+ // Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
2
+ import { buildPath } from "../client.js";
3
+ /**
4
+ * TaxDocumentationService provides access to TaxDocumentation API operations.
5
+ * Access via `client.taxDocumentation`.
6
+ */
7
+ export class TaxDocumentationService {
8
+ client;
9
+ /** @internal */
10
+ constructor(client) {
11
+ this.client = client;
12
+ }
13
+ /**
14
+ * CreateTaxDocumentation stores a partner-collected tax form for an Identity.
15
+ *
16
+ * Requires scope: identity:write_identity
17
+ */
18
+ async createTaxDocumentation(request, opts) {
19
+ return this.client.post("/identity/tax-documentation", request, opts, {
20
+ responseSchema: "TaxDocumentation",
21
+ requestSchema: "CreateTaxDocumentationRequest",
22
+ });
23
+ }
24
+ /**
25
+ * GetTaxDocumentation returns the current accepted tax form for an Identity.
26
+ *
27
+ * Requires scope: identity:read_identity
28
+ */
29
+ async getTaxDocumentation(identityId, opts) {
30
+ return this.client.get(buildPath("/identity/tax-documentation/{identity_id}", { identity_id: identityId }), undefined, opts, { responseSchema: "TaxDocumentation" });
31
+ }
32
+ }
33
+ //# sourceMappingURL=tax-documentation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tax-documentation.js","sourceRoot":"","sources":["../../src/services/tax-documentation.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAEL;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,KAAK,CAAC,sBAAsB,CAC1B,OAAsC,EACtC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAA4B,6BAA6B,EAAE,OAAO,EAAE,IAAI,EAAE;YAC/F,cAAc,EAAE,kBAAkB;YAClC,aAAa,EAAE,+BAA+B;SAC/C,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,mBAAmB,CAAC,UAAkB,EAAE,IAAqB;QACjE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,2CAA2C,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EACnF,SAAS,EACT,IAAI,EACJ,EAAE,cAAc,EAAE,kBAAkB,EAAE,CACvC,CAAC;IACJ,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport { buildPath } from \"../client.js\";\nimport type { HttpClient, RequestOptions, WithRaw } from \"../client.js\";\nimport type { CreateTaxDocumentationRequest, TaxDocumentation } from \"../models.js\";\n\n/**\n * TaxDocumentationService provides access to TaxDocumentation API operations.\n * Access via `client.taxDocumentation`.\n */\nexport class TaxDocumentationService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * CreateTaxDocumentation stores a partner-collected tax form for an Identity.\n *\n * Requires scope: identity:write_identity\n */\n async createTaxDocumentation(\n request: CreateTaxDocumentationRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<TaxDocumentation>> {\n return this.client.post<WithRaw<TaxDocumentation>>(\"/identity/tax-documentation\", request, opts, {\n responseSchema: \"TaxDocumentation\",\n requestSchema: \"CreateTaxDocumentationRequest\",\n });\n }\n\n /**\n * GetTaxDocumentation returns the current accepted tax form for an Identity.\n *\n * Requires scope: identity:read_identity\n */\n async getTaxDocumentation(identityId: string, opts?: RequestOptions): Promise<WithRaw<TaxDocumentation>> {\n return this.client.get<WithRaw<TaxDocumentation>>(\n buildPath(\"/identity/tax-documentation/{identity_id}\", { identity_id: identityId }),\n undefined,\n opts,\n { responseSchema: \"TaxDocumentation\" },\n );\n }\n}\n"]}
@@ -0,0 +1,45 @@
1
+ import type { RequestOptions, WithRaw } from "../client.js";
2
+ import type { KnownTaxFormType } from "../enums.js";
3
+ import type { ListTaxFormRevisionsResponse, ListTaxFormsResponse } from "../models.js";
4
+ export interface ListTaxFormRevisionsParams {
5
+ /** Required. Account ID */
6
+ account_id: string;
7
+ /** Required. Tax Year */
8
+ tax_year: string;
9
+ /** Optional. Tax form types (1099-B, 1099-MISC, 1099-DA). If not provided, defaults to 1099-B for tax years prior to 2025, and 1099-DA from 2025 onwards. */
10
+ form_types?: (KnownTaxFormType | (string & {}))[];
11
+ /** Revision */
12
+ revision?: string;
13
+ }
14
+ export interface ListTaxFormsParams {
15
+ /** Required. A list of Account IDs. Maximum 50. */
16
+ account_ids: string[];
17
+ /** Required. Tax year */
18
+ tax_year: string;
19
+ /** Optional. Tax form types (1099-B, 1099-MISC, 1099-DA). If not provided, defaults to 1099-B for tax years prior to 2025, and 1099-DA from 2025 onwards. */
20
+ form_types?: (KnownTaxFormType | (string & {}))[];
21
+ }
22
+ /**
23
+ * TaxFormsService — All tax forms are associated to a single account_id. An
24
+ * account_id can have multiple tax forms associated with it. US 1099-B and
25
+ * 1099-Misc tax forms for the previous fiscal year will be available in
26
+ * February of the current calendar year. Previous years tax forms are also
27
+ * available by request.
28
+ *
29
+ * Access via `client.taxForms`.
30
+ */
31
+ export declare class TaxFormsService {
32
+ private readonly client;
33
+ /**
34
+ * List Tax Form Revisions
35
+ *
36
+ * Requires scope: tax:read_tax_form
37
+ */
38
+ listTaxFormRevisions(params?: ListTaxFormRevisionsParams, opts?: RequestOptions): Promise<WithRaw<ListTaxFormRevisionsResponse>>;
39
+ /**
40
+ * List Tax Forms
41
+ *
42
+ * Requires scope: tax:read_tax_form
43
+ */
44
+ listTaxForms(params?: ListTaxFormsParams, opts?: RequestOptions): Promise<WithRaw<ListTaxFormsResponse>>;
45
+ }
@@ -0,0 +1,38 @@
1
+ // Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
2
+ /**
3
+ * TaxFormsService — All tax forms are associated to a single account_id. An
4
+ * account_id can have multiple tax forms associated with it. US 1099-B and
5
+ * 1099-Misc tax forms for the previous fiscal year will be available in
6
+ * February of the current calendar year. Previous years tax forms are also
7
+ * available by request.
8
+ *
9
+ * Access via `client.taxForms`.
10
+ */
11
+ export class TaxFormsService {
12
+ client;
13
+ /** @internal */
14
+ constructor(client) {
15
+ this.client = client;
16
+ }
17
+ /**
18
+ * List Tax Form Revisions
19
+ *
20
+ * Requires scope: tax:read_tax_form
21
+ */
22
+ async listTaxFormRevisions(params, opts) {
23
+ return this.client.get("/tax/tax-form-revisions", params, opts, {
24
+ responseSchema: "ListTaxFormRevisionsResponse",
25
+ });
26
+ }
27
+ /**
28
+ * List Tax Forms
29
+ *
30
+ * Requires scope: tax:read_tax_form
31
+ */
32
+ async listTaxForms(params, opts) {
33
+ return this.client.get("/tax/tax-forms", params, opts, {
34
+ responseSchema: "ListTaxFormsResponse",
35
+ });
36
+ }
37
+ }
38
+ //# sourceMappingURL=tax-forms.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tax-forms.js","sourceRoot":"","sources":["../../src/services/tax-forms.ts"],"names":[],"mappings":"AAAA,oEAAoE;AA0BpE;;;;;;;;GAQG;AACH,MAAM,OAAO,eAAe;IAEG;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,KAAK,CAAC,oBAAoB,CACxB,MAAmC,EACnC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAwC,yBAAyB,EAAE,MAAM,EAAE,IAAI,EAAE;YACrG,cAAc,EAAE,8BAA8B;SAC/C,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,YAAY,CAAC,MAA2B,EAAE,IAAqB;QACnE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAgC,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE;YACpF,cAAc,EAAE,sBAAsB;SACvC,CAAC,CAAC;IACL,CAAC;CACF","sourcesContent":["// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.\n\nimport type { HttpClient, RequestOptions, WithRaw } from \"../client.js\";\nimport type { KnownTaxFormType } from \"../enums.js\";\nimport type { ListTaxFormRevisionsResponse, ListTaxFormsResponse } from \"../models.js\";\n\nexport interface ListTaxFormRevisionsParams {\n /** Required. Account ID */\n account_id: string;\n /** Required. Tax Year */\n tax_year: string;\n /** Optional. Tax form types (1099-B, 1099-MISC, 1099-DA). If not provided, defaults to 1099-B for tax years prior to 2025, and 1099-DA from 2025 onwards. */\n form_types?: (KnownTaxFormType | (string & {}))[];\n /** Revision */\n revision?: string;\n}\n\nexport interface ListTaxFormsParams {\n /** Required. A list of Account IDs. Maximum 50. */\n account_ids: string[];\n /** Required. Tax year */\n tax_year: string;\n /** Optional. Tax form types (1099-B, 1099-MISC, 1099-DA). If not provided, defaults to 1099-B for tax years prior to 2025, and 1099-DA from 2025 onwards. */\n form_types?: (KnownTaxFormType | (string & {}))[];\n}\n\n/**\n * TaxFormsService — All tax forms are associated to a single account_id. An\n * account_id can have multiple tax forms associated with it. US 1099-B and\n * 1099-Misc tax forms for the previous fiscal year will be available in\n * February of the current calendar year. Previous years tax forms are also\n * available by request.\n *\n * Access via `client.taxForms`.\n */\nexport class TaxFormsService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Tax Form Revisions\n *\n * Requires scope: tax:read_tax_form\n */\n async listTaxFormRevisions(\n params?: ListTaxFormRevisionsParams,\n opts?: RequestOptions,\n ): Promise<WithRaw<ListTaxFormRevisionsResponse>> {\n return this.client.get<WithRaw<ListTaxFormRevisionsResponse>>(\"/tax/tax-form-revisions\", params, opts, {\n responseSchema: \"ListTaxFormRevisionsResponse\",\n });\n }\n\n /**\n * List Tax Forms\n *\n * Requires scope: tax:read_tax_form\n */\n async listTaxForms(params?: ListTaxFormsParams, opts?: RequestOptions): Promise<WithRaw<ListTaxFormsResponse>> {\n return this.client.get<WithRaw<ListTaxFormsResponse>>(\"/tax/tax-forms\", params, opts, {\n responseSchema: \"ListTaxFormsResponse\",\n });\n }\n}\n"]}