@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.
- package/AGENTS.md +268 -0
- package/CHANGELOG.md +35 -0
- package/LICENSE +191 -0
- package/README.md +445 -2
- package/dist/auth.d.ts +60 -0
- package/dist/auth.js +248 -0
- package/dist/auth.js.map +1 -0
- package/dist/client.d.ts +353 -0
- package/dist/client.js +967 -0
- package/dist/client.js.map +1 -0
- package/dist/constants.d.ts +16 -0
- package/dist/constants.js +17 -0
- package/dist/constants.js.map +1 -0
- package/dist/decimal-fields.d.ts +16 -0
- package/dist/decimal-fields.js +570 -0
- package/dist/decimal-fields.js.map +1 -0
- package/dist/decimal.d.ts +25 -0
- package/dist/decimal.js +93 -0
- package/dist/decimal.js.map +1 -0
- package/dist/decode.d.ts +34 -0
- package/dist/decode.js +118 -0
- package/dist/decode.js.map +1 -0
- package/dist/enums.d.ts +1080 -0
- package/dist/enums.js +1031 -0
- package/dist/enums.js.map +1 -0
- package/dist/errors.d.ts +142 -0
- package/dist/errors.js +261 -0
- package/dist/errors.js.map +1 -0
- package/dist/generated-types.d.ts +13629 -0
- package/dist/generated-types.js +3 -0
- package/dist/generated-types.js.map +1 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/models.d.ts +299 -0
- package/dist/models.js +3 -0
- package/dist/models.js.map +1 -0
- package/dist/paxos-client.d.ts +107 -0
- package/dist/paxos-client.js +157 -0
- package/dist/paxos-client.js.map +1 -0
- package/dist/query-keys.d.ts +1 -0
- package/dist/query-keys.js +31 -0
- package/dist/query-keys.js.map +1 -0
- package/dist/response-defaults.d.ts +2 -0
- package/dist/response-defaults.js +109 -0
- package/dist/response-defaults.js.map +1 -0
- package/dist/services/account-members.d.ts +32 -0
- package/dist/services/account-members.js +46 -0
- package/dist/services/account-members.js.map +1 -0
- package/dist/services/accounts.d.ts +74 -0
- package/dist/services/accounts.js +71 -0
- package/dist/services/accounts.js.map +1 -0
- package/dist/services/address-verification.d.ts +72 -0
- package/dist/services/address-verification.js +64 -0
- package/dist/services/address-verification.js.map +1 -0
- package/dist/services/api-credentials.d.ts +44 -0
- package/dist/services/api-credentials.js +42 -0
- package/dist/services/api-credentials.js.map +1 -0
- package/dist/services/claims.d.ts +68 -0
- package/dist/services/claims.js +67 -0
- package/dist/services/claims.js.map +1 -0
- package/dist/services/cross-chain-transfer.d.ts +71 -0
- package/dist/services/cross-chain-transfer.js +68 -0
- package/dist/services/cross-chain-transfer.js.map +1 -0
- package/dist/services/crypto-deposits.d.ts +30 -0
- package/dist/services/crypto-deposits.js +39 -0
- package/dist/services/crypto-deposits.js.map +1 -0
- package/dist/services/crypto-withdrawals.d.ts +60 -0
- package/dist/services/crypto-withdrawals.js +42 -0
- package/dist/services/crypto-withdrawals.js.map +1 -0
- package/dist/services/deposit-addresses.d.ts +54 -0
- package/dist/services/deposit-addresses.js +36 -0
- package/dist/services/deposit-addresses.js.map +1 -0
- package/dist/services/events.d.ts +53 -0
- package/dist/services/events.js +39 -0
- package/dist/services/events.js.map +1 -0
- package/dist/services/exchange.d.ts +52 -0
- package/dist/services/exchange.js +30 -0
- package/dist/services/exchange.js.map +1 -0
- package/dist/services/fees.d.ts +15 -0
- package/dist/services/fees.js +24 -0
- package/dist/services/fees.js.map +1 -0
- package/dist/services/fiat-transfers.d.ts +133 -0
- package/dist/services/fiat-transfers.js +127 -0
- package/dist/services/fiat-transfers.js.map +1 -0
- package/dist/services/identity-controls.d.ts +43 -0
- package/dist/services/identity-controls.js +42 -0
- package/dist/services/identity-controls.js.map +1 -0
- package/dist/services/identity-documents.d.ts +45 -0
- package/dist/services/identity-documents.js +50 -0
- package/dist/services/identity-documents.js.map +1 -0
- package/dist/services/identity.d.ts +122 -0
- package/dist/services/identity.js +66 -0
- package/dist/services/identity.js.map +1 -0
- package/dist/services/index.d.ts +89 -0
- package/dist/services/index.js +55 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/institution-members.d.ts +30 -0
- package/dist/services/institution-members.js +44 -0
- package/dist/services/institution-members.js.map +1 -0
- package/dist/services/internal-transfers.d.ts +15 -0
- package/dist/services/internal-transfers.js +26 -0
- package/dist/services/internal-transfers.js.map +1 -0
- package/dist/services/issuer-quotes.d.ts +72 -0
- package/dist/services/issuer-quotes.js +66 -0
- package/dist/services/issuer-quotes.js.map +1 -0
- package/dist/services/limits.d.ts +20 -0
- package/dist/services/limits.js +23 -0
- package/dist/services/limits.js.map +1 -0
- package/dist/services/market-data.d.ts +15 -0
- package/dist/services/market-data.js +23 -0
- package/dist/services/market-data.js.map +1 -0
- package/dist/services/monitoring-addresses.d.ts +64 -0
- package/dist/services/monitoring-addresses.js +68 -0
- package/dist/services/monitoring-addresses.js.map +1 -0
- package/dist/services/orchestration-rules.d.ts +53 -0
- package/dist/services/orchestration-rules.js +47 -0
- package/dist/services/orchestration-rules.js.map +1 -0
- package/dist/services/orchestrations.d.ts +70 -0
- package/dist/services/orchestrations.js +45 -0
- package/dist/services/orchestrations.js.map +1 -0
- package/dist/services/orders.d.ts +86 -0
- package/dist/services/orders.js +67 -0
- package/dist/services/orders.js.map +1 -0
- package/dist/services/paxos-transfers.d.ts +24 -0
- package/dist/services/paxos-transfers.js +35 -0
- package/dist/services/paxos-transfers.js.map +1 -0
- package/dist/services/payments.d.ts +46 -0
- package/dist/services/payments.js +35 -0
- package/dist/services/payments.js.map +1 -0
- package/dist/services/payout-groups.d.ts +59 -0
- package/dist/services/payout-groups.js +59 -0
- package/dist/services/payout-groups.js.map +1 -0
- package/dist/services/pricing.d.ts +67 -0
- package/dist/services/pricing.js +42 -0
- package/dist/services/pricing.js.map +1 -0
- package/dist/services/profiles.d.ts +106 -0
- package/dist/services/profiles.js +84 -0
- package/dist/services/profiles.js.map +1 -0
- package/dist/services/quote-executions.d.ts +51 -0
- package/dist/services/quote-executions.js +41 -0
- package/dist/services/quote-executions.js.map +1 -0
- package/dist/services/quotes.d.ts +44 -0
- package/dist/services/quotes.js +48 -0
- package/dist/services/quotes.js.map +1 -0
- package/dist/services/reward-addresses.d.ts +80 -0
- package/dist/services/reward-addresses.js +79 -0
- package/dist/services/reward-addresses.js.map +1 -0
- package/dist/services/rewards-statements.d.ts +35 -0
- package/dist/services/rewards-statements.js +32 -0
- package/dist/services/rewards-statements.js.map +1 -0
- package/dist/services/rewards.d.ts +34 -0
- package/dist/services/rewards.js +37 -0
- package/dist/services/rewards.js.map +1 -0
- package/dist/services/sandbox-deposits.d.ts +15 -0
- package/dist/services/sandbox-deposits.js +22 -0
- package/dist/services/sandbox-deposits.js.map +1 -0
- package/dist/services/sandbox-fiat-transfers.d.ts +15 -0
- package/dist/services/sandbox-fiat-transfers.js +24 -0
- package/dist/services/sandbox-fiat-transfers.js.map +1 -0
- package/dist/services/sandbox-identity.d.ts +39 -0
- package/dist/services/sandbox-identity.js +60 -0
- package/dist/services/sandbox-identity.js.map +1 -0
- package/dist/services/settlement.d.ts +76 -0
- package/dist/services/settlement.js +79 -0
- package/dist/services/settlement.js.map +1 -0
- package/dist/services/stablecoin-conversion.d.ts +70 -0
- package/dist/services/stablecoin-conversion.js +65 -0
- package/dist/services/stablecoin-conversion.js.map +1 -0
- package/dist/services/statements.d.ts +44 -0
- package/dist/services/statements.js +35 -0
- package/dist/services/statements.js.map +1 -0
- package/dist/services/tax-documentation.d.ts +21 -0
- package/dist/services/tax-documentation.js +33 -0
- package/dist/services/tax-documentation.js.map +1 -0
- package/dist/services/tax-forms.d.ts +45 -0
- package/dist/services/tax-forms.js +38 -0
- package/dist/services/tax-forms.js.map +1 -0
- package/dist/services/transfers.d.ts +96 -0
- package/dist/services/transfers.js +37 -0
- package/dist/services/transfers.js.map +1 -0
- package/dist/services/travel-rule.d.ts +32 -0
- package/dist/services/travel-rule.js +30 -0
- package/dist/services/travel-rule.js.map +1 -0
- package/dist/services/user-audit-logs.d.ts +45 -0
- package/dist/services/user-audit-logs.js +27 -0
- package/dist/services/user-audit-logs.js.map +1 -0
- package/dist/services/webhooks.d.ts +58 -0
- package/dist/services/webhooks.js +42 -0
- package/dist/services/webhooks.js.map +1 -0
- package/dist/signing.d.ts +33 -0
- package/dist/signing.js +186 -0
- package/dist/signing.js.map +1 -0
- package/dist/testing/fixtures.d.ts +40 -0
- package/dist/testing/fixtures.js +131 -0
- package/dist/testing/fixtures.js.map +1 -0
- package/dist/testing/index.d.ts +28 -0
- package/dist/testing/index.js +28 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/testing/mock-server.d.ts +121 -0
- package/dist/testing/mock-server.js +276 -0
- package/dist/testing/mock-server.js.map +1 -0
- package/dist/timeouts.d.ts +13 -0
- package/dist/timeouts.js +71 -0
- package/dist/timeouts.js.map +1 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +2 -0
- package/dist/version.js.map +1 -0
- package/package.json +67 -4
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
|
|
2
|
+
import { buildPath } from "../client.js";
|
|
3
|
+
/**
|
|
4
|
+
* FiatTransfersService — The Fiat Transfers API allows clients to deposit and
|
|
5
|
+
* withdraw fiat via the following Fiat Networks: Wire (Fedwire and SWIFT) and
|
|
6
|
+
* CUBIX. The supported asset is USD.
|
|
7
|
+
*
|
|
8
|
+
* The full set of Fiat Transfers API endpoints is:
|
|
9
|
+
*
|
|
10
|
+
* - For Deposits:
|
|
11
|
+
* - {@link FiatTransfersService.createFiatDepositInstructions | Create Fiat Deposit Instructions}
|
|
12
|
+
* - {@link FiatTransfersService.listFiatDepositInstructions | List Fiat Deposit Instructions}
|
|
13
|
+
* - {@link FiatTransfersService.getFiatDepositInstructions | Get Fiat Deposit Instructions}
|
|
14
|
+
* - For Withdrawals:
|
|
15
|
+
* - {@link FiatTransfersService.createFiatAccount | Create Fiat Account}
|
|
16
|
+
* - {@link FiatTransfersService.listFiatAccounts | List Fiat Accounts}
|
|
17
|
+
* - {@link FiatTransfersService.getFiatAccount | Get Fiat Account}
|
|
18
|
+
* - {@link FiatTransfersService.deleteFiatAccount | Delete Fiat Account}
|
|
19
|
+
* - {@link FiatTransfersService.updateFiatAccount | Update Fiat Account}
|
|
20
|
+
* - {@link FiatTransfersService.createFiatWithdrawal | Create Fiat Withdrawal}
|
|
21
|
+
*
|
|
22
|
+
* Access via `client.fiatTransfers`.
|
|
23
|
+
*/
|
|
24
|
+
export class FiatTransfersService {
|
|
25
|
+
client;
|
|
26
|
+
/** @internal */
|
|
27
|
+
constructor(client) {
|
|
28
|
+
this.client = client;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* List Fiat Accounts
|
|
32
|
+
*
|
|
33
|
+
* Requires scope: transfer:read_fiat_account
|
|
34
|
+
*/
|
|
35
|
+
listFiatAccounts(params, opts) {
|
|
36
|
+
return this.client.paginate("/transfer/fiat-accounts", "items", params, opts, {
|
|
37
|
+
responseSchema: "ListFiatAccountsResponse",
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Create Fiat Account
|
|
42
|
+
*
|
|
43
|
+
* Requires scope: transfer:write_fiat_account
|
|
44
|
+
*/
|
|
45
|
+
async createFiatAccount(request, opts) {
|
|
46
|
+
const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };
|
|
47
|
+
return this.client.post("/transfer/fiat-accounts", body, opts, {
|
|
48
|
+
responseSchema: "FiatAccount",
|
|
49
|
+
requestSchema: "CreateFiatAccountRequest",
|
|
50
|
+
replayProtected: true,
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get Fiat Account
|
|
55
|
+
*
|
|
56
|
+
* Requires scope: transfer:read_fiat_account
|
|
57
|
+
*/
|
|
58
|
+
async getFiatAccount(id, params, opts) {
|
|
59
|
+
return this.client.get(buildPath("/transfer/fiat-accounts/{id}", { id: id }), params, opts, {
|
|
60
|
+
responseSchema: "FiatAccount",
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Delete Fiat Account
|
|
65
|
+
*
|
|
66
|
+
* Requires scope: transfer:write_fiat_account
|
|
67
|
+
*/
|
|
68
|
+
async deleteFiatAccount(id, opts) {
|
|
69
|
+
return this.client.delete(buildPath("/transfer/fiat-accounts/{id}", { id: id }), undefined, opts, {
|
|
70
|
+
responseSchema: "DeleteFiatAccountResponse",
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Update Fiat Account
|
|
75
|
+
*
|
|
76
|
+
* Requires scope: transfer:write_fiat_account
|
|
77
|
+
*/
|
|
78
|
+
async updateFiatAccount(id, request, opts) {
|
|
79
|
+
return this.client.put(buildPath("/transfer/fiat-accounts/{id}", { id: id }), request, opts, {
|
|
80
|
+
responseSchema: "FiatAccount",
|
|
81
|
+
requestSchema: "UpdateFiatAccountRequest",
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* List Fiat Deposit Instructions
|
|
86
|
+
*
|
|
87
|
+
* Requires scope: transfer:read_fiat_deposit_instructions
|
|
88
|
+
*/
|
|
89
|
+
listFiatDepositInstructions(params, opts) {
|
|
90
|
+
return this.client.paginate("/transfer/fiat-deposit-instructions", "items", params, opts, { responseSchema: "ListFiatDepositInstructionsResponse" });
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Create Fiat Deposit Instructions
|
|
94
|
+
*
|
|
95
|
+
* Requires scope: transfer:write_fiat_deposit_instructions
|
|
96
|
+
*/
|
|
97
|
+
async createFiatDepositInstructions(request, opts) {
|
|
98
|
+
const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };
|
|
99
|
+
return this.client.post("/transfer/fiat-deposit-instructions", body, opts, {
|
|
100
|
+
responseSchema: "FiatDepositInstructions",
|
|
101
|
+
requestSchema: "CreateFiatDepositInstructionsRequest",
|
|
102
|
+
replayProtected: true,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Get Fiat Deposit Instructions
|
|
107
|
+
*
|
|
108
|
+
* Requires scope: transfer:read_fiat_deposit_instructions
|
|
109
|
+
*/
|
|
110
|
+
async getFiatDepositInstructions(id, opts) {
|
|
111
|
+
return this.client.get(buildPath("/transfer/fiat-deposit-instructions/{id}", { id: id }), undefined, opts, { responseSchema: "FiatDepositInstructions" });
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Create Fiat Withdrawal
|
|
115
|
+
*
|
|
116
|
+
* Requires scope: transfer:write_fiat_withdrawal
|
|
117
|
+
*/
|
|
118
|
+
async createFiatWithdrawal(request, opts) {
|
|
119
|
+
const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };
|
|
120
|
+
return this.client.post("/transfer/fiat-withdrawals", body, opts, {
|
|
121
|
+
responseSchema: "Transfer",
|
|
122
|
+
requestSchema: "CreateFiatWithdrawalRequest",
|
|
123
|
+
replayProtected: true,
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
//# sourceMappingURL=fiat-transfers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiat-transfers.js","sourceRoot":"","sources":["../../src/services/fiat-transfers.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAqEzC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,OAAO,oBAAoB;IAEF;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,yBAAyB,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;YAClG,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,yBAAyB,EAAE,IAAI,EAAE,IAAI,EAAE;YACnF,cAAc,EAAE,aAAa;YAC7B,aAAa,EAAE,0BAA0B;YACzC,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,cAAc,CAClB,EAAU,EACV,MAA6B,EAC7B,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAuB,SAAS,CAAC,8BAA8B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;YAChH,cAAc,EAAE,aAAa;SAC9B,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CAAC,EAAU,EAAE,IAAqB;QACvD,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,2BAA2B;SAC5C,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,iBAAiB,CACrB,EAAU,EACV,OAAiC,EACjC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAuB,SAAS,CAAC,8BAA8B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE;YACjH,cAAc,EAAE,aAAa;YAC7B,aAAa,EAAE,0BAA0B;SAC1C,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,2BAA2B,CACzB,MAA0C,EAC1C,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CACzB,qCAAqC,EACrC,OAAO,EACP,MAAM,EACN,IAAI,EACJ,EAAE,cAAc,EAAE,qCAAqC,EAAE,CAC1D,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,6BAA6B,CACjC,OAA6C,EAC7C,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,CAAmC,qCAAqC,EAAE,IAAI,EAAE,IAAI,EAAE;YAC3G,cAAc,EAAE,yBAAyB;YACzC,aAAa,EAAE,sCAAsC;YACrD,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,0BAA0B,CAAC,EAAU,EAAE,IAAqB;QAChE,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,0CAA0C,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EACjE,SAAS,EACT,IAAI,EACJ,EAAE,cAAc,EAAE,yBAAyB,EAAE,CAC9C,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,oBAAoB,CAAC,OAAoC,EAAE,IAAqB;QACpF,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,CAAoB,4BAA4B,EAAE,IAAI,EAAE,IAAI,EAAE;YACnF,cAAc,EAAE,UAAU;YAC1B,aAAa,EAAE,6BAA6B;YAC5C,eAAe,EAAE,IAAI;SACtB,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 { KnownOrderBy, KnownSortOrder } from \"../enums.js\";\nimport type {\n CreateFiatAccountRequest,\n CreateFiatDepositInstructionsRequest,\n CreateFiatWithdrawalRequest,\n DeleteFiatAccountResponse,\n FiatAccount,\n FiatDepositInstructions,\n Transfer,\n UpdateFiatAccountRequest,\n} from \"../models.js\";\n\nexport interface ListFiatAccountsParams {\n /** Optionally filter by the UUIDs of the accounts. Limit 100. */\n ids?: string[];\n /** Optionally filter by the client-specified IDs provided during account creation. Limit 100. */\n ref_ids?: string[];\n /** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lt?: string;\n /** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lte?: string;\n /** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_eq?: string;\n /** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gte?: string;\n /** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gt?: string;\n /** Number of results to return. Defaults to 100 if no limit is provided. Maximum 1000. */\n limit?: number;\n /** Return items in ascending (ASC) or descending (DESC) order. Defaults to DESC. */\n order?: KnownSortOrder | (string & {});\n /** The specific method by which the returned results will be ordered. Defaults to CREATED_AT. */\n order_by?: KnownOrderBy | (string & {});\n /** Used to include deleted accounts in the response. */\n include_deleted?: boolean;\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\nexport interface GetFiatAccountParams {\n /** Used to include deleted accounts in the response. */\n include_deleted?: boolean;\n}\n\nexport interface ListFiatDepositInstructionsParams {\n /** Optionally filter by the UUIDs of the instructions. Limit 100. */\n ids?: string[];\n /** Optionally filter by the client-specified IDs provided during instructions creation. Limit 100. */\n ref_ids?: string[];\n /** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lt?: string;\n /** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lte?: string;\n /** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_eq?: string;\n /** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gte?: string;\n /** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gt?: string;\n /** Number of results to return. Defaults to 100 if no limit is provided. Maximum 1000. */\n limit?: number;\n /** Return items in ascending (ASC) or descending (DESC) order. Defaults to DESC. */\n order?: KnownSortOrder | (string & {});\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\n/**\n * FiatTransfersService — The Fiat Transfers API allows clients to deposit and\n * withdraw fiat via the following Fiat Networks: Wire (Fedwire and SWIFT) and\n * CUBIX. The supported asset is USD.\n *\n * The full set of Fiat Transfers API endpoints is:\n *\n * - For Deposits:\n * - {@link FiatTransfersService.createFiatDepositInstructions | Create Fiat Deposit Instructions}\n * - {@link FiatTransfersService.listFiatDepositInstructions | List Fiat Deposit Instructions}\n * - {@link FiatTransfersService.getFiatDepositInstructions | Get Fiat Deposit Instructions}\n * - For Withdrawals:\n * - {@link FiatTransfersService.createFiatAccount | Create Fiat Account}\n * - {@link FiatTransfersService.listFiatAccounts | List Fiat Accounts}\n * - {@link FiatTransfersService.getFiatAccount | Get Fiat Account}\n * - {@link FiatTransfersService.deleteFiatAccount | Delete Fiat Account}\n * - {@link FiatTransfersService.updateFiatAccount | Update Fiat Account}\n * - {@link FiatTransfersService.createFiatWithdrawal | Create Fiat Withdrawal}\n *\n * Access via `client.fiatTransfers`.\n */\nexport class FiatTransfersService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Fiat Accounts\n *\n * Requires scope: transfer:read_fiat_account\n */\n listFiatAccounts(params?: ListFiatAccountsParams, opts?: RequestOptions): PageIterator<WithRaw<FiatAccount>> {\n return this.client.paginate<WithRaw<FiatAccount>>(\"/transfer/fiat-accounts\", \"items\", params, opts, {\n responseSchema: \"ListFiatAccountsResponse\",\n });\n }\n\n /**\n * Create Fiat Account\n *\n * Requires scope: transfer:write_fiat_account\n */\n async createFiatAccount(request: CreateFiatAccountRequest, opts?: RequestOptions): Promise<WithRaw<FiatAccount>> {\n const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };\n return this.client.post<WithRaw<FiatAccount>>(\"/transfer/fiat-accounts\", body, opts, {\n responseSchema: \"FiatAccount\",\n requestSchema: \"CreateFiatAccountRequest\",\n replayProtected: true,\n });\n }\n\n /**\n * Get Fiat Account\n *\n * Requires scope: transfer:read_fiat_account\n */\n async getFiatAccount(\n id: string,\n params?: GetFiatAccountParams,\n opts?: RequestOptions,\n ): Promise<WithRaw<FiatAccount>> {\n return this.client.get<WithRaw<FiatAccount>>(buildPath(\"/transfer/fiat-accounts/{id}\", { id: id }), params, opts, {\n responseSchema: \"FiatAccount\",\n });\n }\n\n /**\n * Delete Fiat Account\n *\n * Requires scope: transfer:write_fiat_account\n */\n async deleteFiatAccount(id: string, opts?: RequestOptions): Promise<WithRaw<DeleteFiatAccountResponse>> {\n return this.client.delete(buildPath(\"/transfer/fiat-accounts/{id}\", { id: id }), undefined, opts, {\n responseSchema: \"DeleteFiatAccountResponse\",\n });\n }\n\n /**\n * Update Fiat Account\n *\n * Requires scope: transfer:write_fiat_account\n */\n async updateFiatAccount(\n id: string,\n request: UpdateFiatAccountRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<FiatAccount>> {\n return this.client.put<WithRaw<FiatAccount>>(buildPath(\"/transfer/fiat-accounts/{id}\", { id: id }), request, opts, {\n responseSchema: \"FiatAccount\",\n requestSchema: \"UpdateFiatAccountRequest\",\n });\n }\n\n /**\n * List Fiat Deposit Instructions\n *\n * Requires scope: transfer:read_fiat_deposit_instructions\n */\n listFiatDepositInstructions(\n params?: ListFiatDepositInstructionsParams,\n opts?: RequestOptions,\n ): PageIterator<WithRaw<FiatDepositInstructions>> {\n return this.client.paginate<WithRaw<FiatDepositInstructions>>(\n \"/transfer/fiat-deposit-instructions\",\n \"items\",\n params,\n opts,\n { responseSchema: \"ListFiatDepositInstructionsResponse\" },\n );\n }\n\n /**\n * Create Fiat Deposit Instructions\n *\n * Requires scope: transfer:write_fiat_deposit_instructions\n */\n async createFiatDepositInstructions(\n request: CreateFiatDepositInstructionsRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<FiatDepositInstructions>> {\n const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };\n return this.client.post<WithRaw<FiatDepositInstructions>>(\"/transfer/fiat-deposit-instructions\", body, opts, {\n responseSchema: \"FiatDepositInstructions\",\n requestSchema: \"CreateFiatDepositInstructionsRequest\",\n replayProtected: true,\n });\n }\n\n /**\n * Get Fiat Deposit Instructions\n *\n * Requires scope: transfer:read_fiat_deposit_instructions\n */\n async getFiatDepositInstructions(id: string, opts?: RequestOptions): Promise<WithRaw<FiatDepositInstructions>> {\n return this.client.get<WithRaw<FiatDepositInstructions>>(\n buildPath(\"/transfer/fiat-deposit-instructions/{id}\", { id: id }),\n undefined,\n opts,\n { responseSchema: \"FiatDepositInstructions\" },\n );\n }\n\n /**\n * Create Fiat Withdrawal\n *\n * Requires scope: transfer:write_fiat_withdrawal\n */\n async createFiatWithdrawal(request: CreateFiatWithdrawalRequest, opts?: RequestOptions): Promise<WithRaw<Transfer>> {\n const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };\n return this.client.post<WithRaw<Transfer>>(\"/transfer/fiat-withdrawals\", body, opts, {\n responseSchema: \"Transfer\",\n requestSchema: \"CreateFiatWithdrawalRequest\",\n replayProtected: true,\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
|
|
2
|
+
import type { CreateIdentityControlRequest, DeleteIdentityControlResponse, IdentityControl } from "../models.js";
|
|
3
|
+
export interface ListIdentityControlsParams {
|
|
4
|
+
/** The Identity ID whose controls to retrieve. */
|
|
5
|
+
identity_id: string;
|
|
6
|
+
/** Include deleted controls in the response. */
|
|
7
|
+
include_deleted?: boolean;
|
|
8
|
+
/** Number of results to return. Defaults to 100 if no limit is provided. Maximum 1000. */
|
|
9
|
+
limit?: number;
|
|
10
|
+
/** Resume from a cursor previously returned as a page's `nextCursor`. */
|
|
11
|
+
page_cursor?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DeleteIdentityControlParams {
|
|
14
|
+
/** The control ID to be deleted. */
|
|
15
|
+
control_id: string;
|
|
16
|
+
/** Reason for deleting the identity control. */
|
|
17
|
+
reason?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* IdentityControlsService provides access to IdentityControls API operations.
|
|
21
|
+
* Access via `client.identityControls`.
|
|
22
|
+
*/
|
|
23
|
+
export declare class IdentityControlsService {
|
|
24
|
+
private readonly client;
|
|
25
|
+
/**
|
|
26
|
+
* List Identity Controls
|
|
27
|
+
*
|
|
28
|
+
* Requires scope: identity:read_identity_control
|
|
29
|
+
*/
|
|
30
|
+
listIdentityControls(params?: ListIdentityControlsParams, opts?: RequestOptions): PageIterator<WithRaw<IdentityControl>>;
|
|
31
|
+
/**
|
|
32
|
+
* Delete Identity Control
|
|
33
|
+
*
|
|
34
|
+
* Requires scope: identity:write_identity_control
|
|
35
|
+
*/
|
|
36
|
+
deleteIdentityControl(params?: DeleteIdentityControlParams, opts?: RequestOptions): Promise<WithRaw<DeleteIdentityControlResponse>>;
|
|
37
|
+
/**
|
|
38
|
+
* Create Identity Control
|
|
39
|
+
*
|
|
40
|
+
* Requires scope: identity:write_identity_control
|
|
41
|
+
*/
|
|
42
|
+
createIdentityControl(request: CreateIdentityControlRequest, opts?: RequestOptions): Promise<WithRaw<IdentityControl>>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
|
|
2
|
+
/**
|
|
3
|
+
* IdentityControlsService provides access to IdentityControls API operations.
|
|
4
|
+
* Access via `client.identityControls`.
|
|
5
|
+
*/
|
|
6
|
+
export class IdentityControlsService {
|
|
7
|
+
client;
|
|
8
|
+
/** @internal */
|
|
9
|
+
constructor(client) {
|
|
10
|
+
this.client = client;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* List Identity Controls
|
|
14
|
+
*
|
|
15
|
+
* Requires scope: identity:read_identity_control
|
|
16
|
+
*/
|
|
17
|
+
listIdentityControls(params, opts) {
|
|
18
|
+
return this.client.paginate("/identity/controls", "items", params, opts, {
|
|
19
|
+
responseSchema: "ListIdentityControlsResponse",
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Delete Identity Control
|
|
24
|
+
*
|
|
25
|
+
* Requires scope: identity:write_identity_control
|
|
26
|
+
*/
|
|
27
|
+
async deleteIdentityControl(params, opts) {
|
|
28
|
+
return this.client.delete("/identity/controls", params, opts, { responseSchema: "DeleteIdentityControlResponse" });
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Create Identity Control
|
|
32
|
+
*
|
|
33
|
+
* Requires scope: identity:write_identity_control
|
|
34
|
+
*/
|
|
35
|
+
async createIdentityControl(request, opts) {
|
|
36
|
+
return this.client.post("/identity/controls", request, opts, {
|
|
37
|
+
responseSchema: "IdentityControl",
|
|
38
|
+
requestSchema: "CreateIdentityControlRequest",
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=identity-controls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-controls.js","sourceRoot":"","sources":["../../src/services/identity-controls.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAuBpE;;;GAGG;AACH,MAAM,OAAO,uBAAuB;IAEL;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,oBAAoB,CAClB,MAAmC,EACnC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAA2B,oBAAoB,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;YACjG,cAAc,EAAE,8BAA8B;SAC/C,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,qBAAqB,CACzB,MAAoC,EACpC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,cAAc,EAAE,+BAA+B,EAAE,CAAC,CAAC;IACrH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,qBAAqB,CACzB,OAAqC,EACrC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAA2B,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAE;YACrF,cAAc,EAAE,iBAAiB;YACjC,aAAa,EAAE,8BAA8B;SAC9C,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 { CreateIdentityControlRequest, DeleteIdentityControlResponse, IdentityControl } from \"../models.js\";\n\nexport interface ListIdentityControlsParams {\n /** The Identity ID whose controls to retrieve. */\n identity_id: string;\n /** Include deleted controls in the response. */\n include_deleted?: boolean;\n /** Number of results to return. Defaults to 100 if no limit is provided. Maximum 1000. */\n limit?: number;\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\nexport interface DeleteIdentityControlParams {\n /** The control ID to be deleted. */\n control_id: string;\n /** Reason for deleting the identity control. */\n reason?: string;\n}\n\n/**\n * IdentityControlsService provides access to IdentityControls API operations.\n * Access via `client.identityControls`.\n */\nexport class IdentityControlsService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Identity Controls\n *\n * Requires scope: identity:read_identity_control\n */\n listIdentityControls(\n params?: ListIdentityControlsParams,\n opts?: RequestOptions,\n ): PageIterator<WithRaw<IdentityControl>> {\n return this.client.paginate<WithRaw<IdentityControl>>(\"/identity/controls\", \"items\", params, opts, {\n responseSchema: \"ListIdentityControlsResponse\",\n });\n }\n\n /**\n * Delete Identity Control\n *\n * Requires scope: identity:write_identity_control\n */\n async deleteIdentityControl(\n params?: DeleteIdentityControlParams,\n opts?: RequestOptions,\n ): Promise<WithRaw<DeleteIdentityControlResponse>> {\n return this.client.delete(\"/identity/controls\", params, opts, { responseSchema: \"DeleteIdentityControlResponse\" });\n }\n\n /**\n * Create Identity Control\n *\n * Requires scope: identity:write_identity_control\n */\n async createIdentityControl(\n request: CreateIdentityControlRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<IdentityControl>> {\n return this.client.post<WithRaw<IdentityControl>>(\"/identity/controls\", request, opts, {\n responseSchema: \"IdentityControl\",\n requestSchema: \"CreateIdentityControlRequest\",\n });\n }\n}\n"]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { RequestOptions, WithRaw } from "../client.js";
|
|
2
|
+
import type { DocumentUploadRequest, DocumentUploadResponse, ListIdentityDocumentsResponse } from "../models.js";
|
|
3
|
+
export interface ListIdentityDocumentsParams {
|
|
4
|
+
/** Add a list of pending document types for the identity */
|
|
5
|
+
include_pending_docs?: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* IdentityDocumentsService — The Identity Documents API allows clients to send
|
|
9
|
+
* documents to Paxos to validate identities during the KYC process. Files can
|
|
10
|
+
* be updated multiple times by re-sending the document type for processing.
|
|
11
|
+
*
|
|
12
|
+
* We currently accept the following file formats:
|
|
13
|
+
*
|
|
14
|
+
* - `pdf`
|
|
15
|
+
* - `jpg`
|
|
16
|
+
* - `png`
|
|
17
|
+
*
|
|
18
|
+
* Steps to upload a document are as follows:
|
|
19
|
+
*
|
|
20
|
+
* 1. Send a `PUT` request to `/identity/identities/{id}/documents` to get the
|
|
21
|
+
* upload URL.
|
|
22
|
+
* 2. Send your document to the provided URL via a PUT request. Take the
|
|
23
|
+
* following example using curl: `$ curl --upload-file
|
|
24
|
+
* Proof_of_residence.jpg $URI `
|
|
25
|
+
*
|
|
26
|
+
* Uploaded document metadata will be available via `GET` request to
|
|
27
|
+
* `/identity/identities/{id}/documents`
|
|
28
|
+
*
|
|
29
|
+
* Access via `client.identityDocuments`.
|
|
30
|
+
*/
|
|
31
|
+
export declare class IdentityDocumentsService {
|
|
32
|
+
private readonly client;
|
|
33
|
+
/**
|
|
34
|
+
* List Identity Documents
|
|
35
|
+
*
|
|
36
|
+
* Requires scope: identity:read_identity
|
|
37
|
+
*/
|
|
38
|
+
listIdentityDocuments(identityId: string, params?: ListIdentityDocumentsParams, opts?: RequestOptions): Promise<WithRaw<ListIdentityDocumentsResponse>>;
|
|
39
|
+
/**
|
|
40
|
+
* Document Upload
|
|
41
|
+
*
|
|
42
|
+
* Requires scope: identity:write_identity
|
|
43
|
+
*/
|
|
44
|
+
documentUpload(identityId: string, request: DocumentUploadRequest, opts?: RequestOptions): Promise<WithRaw<DocumentUploadResponse>>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
|
|
2
|
+
import { buildPath } from "../client.js";
|
|
3
|
+
/**
|
|
4
|
+
* IdentityDocumentsService — The Identity Documents API allows clients to send
|
|
5
|
+
* documents to Paxos to validate identities during the KYC process. Files can
|
|
6
|
+
* be updated multiple times by re-sending the document type for processing.
|
|
7
|
+
*
|
|
8
|
+
* We currently accept the following file formats:
|
|
9
|
+
*
|
|
10
|
+
* - `pdf`
|
|
11
|
+
* - `jpg`
|
|
12
|
+
* - `png`
|
|
13
|
+
*
|
|
14
|
+
* Steps to upload a document are as follows:
|
|
15
|
+
*
|
|
16
|
+
* 1. Send a `PUT` request to `/identity/identities/{id}/documents` to get the
|
|
17
|
+
* upload URL.
|
|
18
|
+
* 2. Send your document to the provided URL via a PUT request. Take the
|
|
19
|
+
* following example using curl: `$ curl --upload-file
|
|
20
|
+
* Proof_of_residence.jpg $URI `
|
|
21
|
+
*
|
|
22
|
+
* Uploaded document metadata will be available via `GET` request to
|
|
23
|
+
* `/identity/identities/{id}/documents`
|
|
24
|
+
*
|
|
25
|
+
* Access via `client.identityDocuments`.
|
|
26
|
+
*/
|
|
27
|
+
export class IdentityDocumentsService {
|
|
28
|
+
client;
|
|
29
|
+
/** @internal */
|
|
30
|
+
constructor(client) {
|
|
31
|
+
this.client = client;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* List Identity Documents
|
|
35
|
+
*
|
|
36
|
+
* Requires scope: identity:read_identity
|
|
37
|
+
*/
|
|
38
|
+
async listIdentityDocuments(identityId, params, opts) {
|
|
39
|
+
return this.client.get(buildPath("/identity/identities/{identity_id}/documents", { identity_id: identityId }), params, opts, { responseSchema: "ListIdentityDocumentsResponse" });
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Document Upload
|
|
43
|
+
*
|
|
44
|
+
* Requires scope: identity:write_identity
|
|
45
|
+
*/
|
|
46
|
+
async documentUpload(identityId, request, opts) {
|
|
47
|
+
return this.client.put(buildPath("/identity/identities/{identity_id}/documents", { identity_id: identityId }), request, opts, { responseSchema: "DocumentUploadResponse", requestSchema: "DocumentUploadRequest" });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=identity-documents.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity-documents.js","sourceRoot":"","sources":["../../src/services/identity-documents.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzC;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,OAAO,wBAAwB;IAEN;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,KAAK,CAAC,qBAAqB,CACzB,UAAkB,EAClB,MAAoC,EACpC,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,8CAA8C,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EACtF,MAAM,EACN,IAAI,EACJ,EAAE,cAAc,EAAE,+BAA+B,EAAE,CACpD,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,cAAc,CAClB,UAAkB,EAClB,OAA8B,EAC9B,IAAqB;QAErB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CACpB,SAAS,CAAC,8CAA8C,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,EACtF,OAAO,EACP,IAAI,EACJ,EAAE,cAAc,EAAE,wBAAwB,EAAE,aAAa,EAAE,uBAAuB,EAAE,CACrF,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 { DocumentUploadRequest, DocumentUploadResponse, ListIdentityDocumentsResponse } from \"../models.js\";\n\nexport interface ListIdentityDocumentsParams {\n /** Add a list of pending document types for the identity */\n include_pending_docs?: boolean;\n}\n\n/**\n * IdentityDocumentsService — The Identity Documents API allows clients to send\n * documents to Paxos to validate identities during the KYC process. Files can\n * be updated multiple times by re-sending the document type for processing.\n *\n * We currently accept the following file formats:\n *\n * - `pdf`\n * - `jpg`\n * - `png`\n *\n * Steps to upload a document are as follows:\n *\n * 1. Send a `PUT` request to `/identity/identities/{id}/documents` to get the\n * upload URL.\n * 2. Send your document to the provided URL via a PUT request. Take the\n * following example using curl: `$ curl --upload-file\n * Proof_of_residence.jpg $URI `\n *\n * Uploaded document metadata will be available via `GET` request to\n * `/identity/identities/{id}/documents`\n *\n * Access via `client.identityDocuments`.\n */\nexport class IdentityDocumentsService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Identity Documents\n *\n * Requires scope: identity:read_identity\n */\n async listIdentityDocuments(\n identityId: string,\n params?: ListIdentityDocumentsParams,\n opts?: RequestOptions,\n ): Promise<WithRaw<ListIdentityDocumentsResponse>> {\n return this.client.get<WithRaw<ListIdentityDocumentsResponse>>(\n buildPath(\"/identity/identities/{identity_id}/documents\", { identity_id: identityId }),\n params,\n opts,\n { responseSchema: \"ListIdentityDocumentsResponse\" },\n );\n }\n\n /**\n * Document Upload\n *\n * Requires scope: identity:write_identity\n */\n async documentUpload(\n identityId: string,\n request: DocumentUploadRequest,\n opts?: RequestOptions,\n ): Promise<WithRaw<DocumentUploadResponse>> {\n return this.client.put<WithRaw<DocumentUploadResponse>>(\n buildPath(\"/identity/identities/{identity_id}/documents\", { identity_id: identityId }),\n request,\n opts,\n { responseSchema: \"DocumentUploadResponse\", requestSchema: \"DocumentUploadRequest\" },\n );\n }\n}\n"]}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { RequestOptions, PageIterator, WithRaw } from "../client.js";
|
|
2
|
+
import type { KnownIdentityControlReasonCode, KnownIdentityControlType, KnownIdentityRequirementAwaitingActionFrom, KnownIdentityRequirementRequirementStatus, KnownIdentityRequirementRequirementType, KnownIdentityStatus, KnownIdentityType, KnownOrderBy, KnownSortOrder } from "../enums.js";
|
|
3
|
+
import type { CreateIdentityRequest, Identity, UpdateIdentityRequest } from "../models.js";
|
|
4
|
+
export interface ListIdentitiesParams {
|
|
5
|
+
/** Summary Status of the Identity. */
|
|
6
|
+
summary_status?: KnownIdentityStatus | (string & {});
|
|
7
|
+
/** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
8
|
+
created_at_lt?: string;
|
|
9
|
+
/** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
10
|
+
created_at_lte?: string;
|
|
11
|
+
/** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
12
|
+
created_at_eq?: string;
|
|
13
|
+
/** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
14
|
+
created_at_gte?: string;
|
|
15
|
+
/** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
16
|
+
created_at_gt?: string;
|
|
17
|
+
/** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
18
|
+
updated_at_lt?: string;
|
|
19
|
+
/** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
20
|
+
updated_at_lte?: string;
|
|
21
|
+
/** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
22
|
+
updated_at_eq?: string;
|
|
23
|
+
/** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
24
|
+
updated_at_gte?: string;
|
|
25
|
+
/** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */
|
|
26
|
+
updated_at_gt?: string;
|
|
27
|
+
/** Number of results to return. */
|
|
28
|
+
limit?: number;
|
|
29
|
+
/** Return items in ascending (ASC) or descending (DESC) order. Defaults to DESC. */
|
|
30
|
+
order?: KnownSortOrder | (string & {});
|
|
31
|
+
/** The specific method by which the returned results will be ordered. */
|
|
32
|
+
order_by?: KnownOrderBy | (string & {});
|
|
33
|
+
/** Optionally filter by Identity type */
|
|
34
|
+
identity_type?: KnownIdentityType | (string & {});
|
|
35
|
+
/** Optionally filter by active identity control types. Only returns identities with active controls matching any of these types. */
|
|
36
|
+
control_types?: (KnownIdentityControlType | (string & {}))[];
|
|
37
|
+
/** Optionally filter by active identity control reason codes. Only returns identities with active controls matching any of these reason codes.
|
|
38
|
+
|
|
39
|
+
- OTHER: Miscellaneous reason not captured by existing categories.
|
|
40
|
+
- END_USER_REQUEST: Control applied at the end user's request.
|
|
41
|
+
- INACTIVITY: Control applied due to prolonged inactivity in accordance with dormancy or lifecycle management policies.
|
|
42
|
+
- COMPLIANCE_KYC: Control applied due to unmet KYC requirements, including missing, expired, failed, or unresponsiveness to refresh obligations.
|
|
43
|
+
- COMPLIANCE_EDD: Control applied due to Enhanced Due Diligence (EDD) requirements, including failure to complete EDD reviews, provide requested information, or satisfy heightened risk assessment criteria.
|
|
44
|
+
- COMPLIANCE_SCREENING: Control applied as a result of sanctions, politically exposed person (PEP), or adverse media screening hits.
|
|
45
|
+
- COMPLIANCE_INVESTIGATION: Control applied while an identity is under active compliance, risk, or regulatory investigation, including reviews triggered by monitoring alerts or external inquiries.
|
|
46
|
+
- COMPLIANCE_INCOMPLETE: Control applied because the onboarding process was not successfully completed, including failure to respond to requests for information or provide required documentation.
|
|
47
|
+
- RISK_FRAUD: Control applied due to suspected or confirmed fraud, abuse, or security risk, including account compromise, transaction fraud, or policy violations.
|
|
48
|
+
- LEGAL_ORDER: Control applied to comply with a legal, regulatory, or law-enforcement directive, including court orders, asset preservation requests, or regulatory instructions.
|
|
49
|
+
- ADMINISTRATIVE: Control applied for operational or platform-initiated reasons not attributable to the end user or compliance failure, such as system remediation or account restructuring.
|
|
50
|
+
- TAX_DOCUMENTATION: Control applied because required tax documentation (e.g. W-8 or W-9) is missing, expired, or invalid. */
|
|
51
|
+
control_reason_codes?: (KnownIdentityControlReasonCode | (string & {}))[];
|
|
52
|
+
/** Optionally filter by identity requirement type. Only returns identities with at least one
|
|
53
|
+
active requirement matching all requirement_* filters that are set.
|
|
54
|
+
|
|
55
|
+
- ID_VERIFICATION: Identity verification via a passthrough provider is pending or failed.
|
|
56
|
+
- DOCUMENT_VERIFICATION: Document review for an institution is pending or failed.
|
|
57
|
+
- SCREENING_CHECK: Identity screening check is pending or failed.
|
|
58
|
+
- COMPLIANCE_CHECK: A compliance check is pending or failed.
|
|
59
|
+
- ENHANCED_DUE_DILIGENCE: Enhanced due diligence review is pending or failed.
|
|
60
|
+
- MEMBERS: One or more institution members have a non-approved status.
|
|
61
|
+
- KYC_REFRESH: KYC refresh is overdue or in progress.
|
|
62
|
+
- TAX_DETAILS_VERIFICATION: Tax details verification is pending or failed.
|
|
63
|
+
- TAX_DOCUMENTATION: Tax documentation validation or remediation is pending or failed.
|
|
64
|
+
This requirement may be present while Identity.status is APPROVED. */
|
|
65
|
+
requirement_types?: (KnownIdentityRequirementRequirementType | (string & {}))[];
|
|
66
|
+
/** Optionally filter by identity requirement status. Only returns identities with an active
|
|
67
|
+
requirement whose status is any of these values. */
|
|
68
|
+
requirement_statuses?: (KnownIdentityRequirementRequirementStatus | (string & {}))[];
|
|
69
|
+
/** Optionally filter by which party must act to resolve a requirement. Only returns identities
|
|
70
|
+
with an active requirement awaiting action from any of these parties. MEMBERS requirements
|
|
71
|
+
have no awaiting_action_from and never match this filter.
|
|
72
|
+
|
|
73
|
+
- CLIENT: The client (the integrating partner) must take action to resolve this requirement.
|
|
74
|
+
- PAXOS: Paxos is handling this; no action needed from the client. */
|
|
75
|
+
requirement_awaiting_action_from?: (KnownIdentityRequirementAwaitingActionFrom | (string & {}))[];
|
|
76
|
+
/** Resume from a cursor previously returned as a page's `nextCursor`. */
|
|
77
|
+
page_cursor?: string;
|
|
78
|
+
}
|
|
79
|
+
export interface GetIdentityParams {
|
|
80
|
+
/** query param; details are encrypted, so we do not want to include them by default */
|
|
81
|
+
include_details?: boolean;
|
|
82
|
+
/** query param; to include institution members for institution identity */
|
|
83
|
+
include_institution_members?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* IdentityService — An Identity represents a person or institution who is able
|
|
87
|
+
* to take actions on the Paxos Platform. Depending on your integration type
|
|
88
|
+
* you might not need to create Identities for your end users.
|
|
89
|
+
*
|
|
90
|
+
* Identities must pass a set of verifications and checks before they're able
|
|
91
|
+
* to transact on the Platform. Learn more about getting started with Identity
|
|
92
|
+
* and managing their onboarding lifecycle in the Identity Developer Guide.
|
|
93
|
+
*
|
|
94
|
+
* Access via `client.identity`.
|
|
95
|
+
*/
|
|
96
|
+
export declare class IdentityService {
|
|
97
|
+
private readonly client;
|
|
98
|
+
/**
|
|
99
|
+
* List Identities
|
|
100
|
+
*
|
|
101
|
+
* Requires scope: identity:read_identity
|
|
102
|
+
*/
|
|
103
|
+
listIdentities(params?: ListIdentitiesParams, opts?: RequestOptions): PageIterator<WithRaw<Identity>>;
|
|
104
|
+
/**
|
|
105
|
+
* Create Identity
|
|
106
|
+
*
|
|
107
|
+
* Requires scope: identity:write_identity
|
|
108
|
+
*/
|
|
109
|
+
createIdentity(request: CreateIdentityRequest, opts?: RequestOptions): Promise<WithRaw<Identity>>;
|
|
110
|
+
/**
|
|
111
|
+
* Get Identity
|
|
112
|
+
*
|
|
113
|
+
* Requires scope: identity:read_identity
|
|
114
|
+
*/
|
|
115
|
+
getIdentity(id: string, params?: GetIdentityParams, opts?: RequestOptions): Promise<WithRaw<Identity>>;
|
|
116
|
+
/**
|
|
117
|
+
* Update Identity
|
|
118
|
+
*
|
|
119
|
+
* Requires scope: identity:write_identity
|
|
120
|
+
*/
|
|
121
|
+
updateIdentity(id: string, request: UpdateIdentityRequest, opts?: RequestOptions): Promise<WithRaw<Identity>>;
|
|
122
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Code generated from the Paxos OpenAPI specification. DO NOT EDIT.
|
|
2
|
+
import { buildPath } from "../client.js";
|
|
3
|
+
/**
|
|
4
|
+
* IdentityService — An Identity represents a person or institution who is able
|
|
5
|
+
* to take actions on the Paxos Platform. Depending on your integration type
|
|
6
|
+
* you might not need to create Identities for your end users.
|
|
7
|
+
*
|
|
8
|
+
* Identities must pass a set of verifications and checks before they're able
|
|
9
|
+
* to transact on the Platform. Learn more about getting started with Identity
|
|
10
|
+
* and managing their onboarding lifecycle in the Identity Developer Guide.
|
|
11
|
+
*
|
|
12
|
+
* Access via `client.identity`.
|
|
13
|
+
*/
|
|
14
|
+
export class IdentityService {
|
|
15
|
+
client;
|
|
16
|
+
/** @internal */
|
|
17
|
+
constructor(client) {
|
|
18
|
+
this.client = client;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* List Identities
|
|
22
|
+
*
|
|
23
|
+
* Requires scope: identity:read_identity
|
|
24
|
+
*/
|
|
25
|
+
listIdentities(params, opts) {
|
|
26
|
+
return this.client.paginate("/identity/identities", "items", params, opts, {
|
|
27
|
+
responseSchema: "ListIdentitiesResponse",
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Create Identity
|
|
32
|
+
*
|
|
33
|
+
* Requires scope: identity:write_identity
|
|
34
|
+
*/
|
|
35
|
+
async createIdentity(request, opts) {
|
|
36
|
+
const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };
|
|
37
|
+
return this.client.post("/identity/identities", body, opts, {
|
|
38
|
+
responseSchema: "Identity",
|
|
39
|
+
requestSchema: "CreateIdentityRequest",
|
|
40
|
+
replayProtected: true,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get Identity
|
|
45
|
+
*
|
|
46
|
+
* Requires scope: identity:read_identity
|
|
47
|
+
*/
|
|
48
|
+
async getIdentity(id, params, opts) {
|
|
49
|
+
return this.client.get(buildPath("/identity/identities/{id}", { id: id }), params, opts, {
|
|
50
|
+
responseSchema: "Identity",
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Update Identity
|
|
55
|
+
*
|
|
56
|
+
* Requires scope: identity:write_identity
|
|
57
|
+
*/
|
|
58
|
+
async updateIdentity(id, request, opts) {
|
|
59
|
+
const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };
|
|
60
|
+
return this.client.put(buildPath("/identity/identities/{id}", { id: id }), body, opts, {
|
|
61
|
+
responseSchema: "Identity",
|
|
62
|
+
requestSchema: "UpdateIdentityRequest",
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"identity.js","sourceRoot":"","sources":["../../src/services/identity.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAkGzC;;;;;;;;;;GAUG;AACH,MAAM,OAAO,eAAe;IAEG;IAD7B,gBAAgB;IAChB,YAA6B,MAAkB;QAAlB,WAAM,GAAN,MAAM,CAAY;IAAG,CAAC;IAEnD;;;;OAIG;IACH,cAAc,CAAC,MAA6B,EAAE,IAAqB;QACjE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAoB,sBAAsB,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE;YAC5F,cAAc,EAAE,wBAAwB;SACzC,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,cAAc,CAAC,OAA8B,EAAE,IAAqB;QACxE,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,CAAoB,sBAAsB,EAAE,IAAI,EAAE,IAAI,EAAE;YAC7E,cAAc,EAAE,UAAU;YAC1B,aAAa,EAAE,uBAAuB;YACtC,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,WAAW,CAAC,EAAU,EAAE,MAA0B,EAAE,IAAqB;QAC7E,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAoB,SAAS,CAAC,2BAA2B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE;YAC1G,cAAc,EAAE,UAAU;SAC3B,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,cAAc,CAAC,EAAU,EAAE,OAA8B,EAAE,IAAqB;QACpF,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,GAAG,CAAoB,SAAS,CAAC,2BAA2B,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE;YACxG,cAAc,EAAE,UAAU;YAC1B,aAAa,EAAE,uBAAuB;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 {\n KnownIdentityControlReasonCode,\n KnownIdentityControlType,\n KnownIdentityRequirementAwaitingActionFrom,\n KnownIdentityRequirementRequirementStatus,\n KnownIdentityRequirementRequirementType,\n KnownIdentityStatus,\n KnownIdentityType,\n KnownOrderBy,\n KnownSortOrder,\n} from \"../enums.js\";\nimport type { CreateIdentityRequest, Identity, UpdateIdentityRequest } from \"../models.js\";\n\nexport interface ListIdentitiesParams {\n /** Summary Status of the Identity. */\n summary_status?: KnownIdentityStatus | (string & {});\n /** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lt?: string;\n /** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_lte?: string;\n /** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_eq?: string;\n /** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gte?: string;\n /** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n created_at_gt?: string;\n /** Include timestamps strictly less than lt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n updated_at_lt?: string;\n /** Include timestamps less than or equal to lte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n updated_at_lte?: string;\n /** Include timestamps exactly equal to eq. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n updated_at_eq?: string;\n /** Include timestamps greater than or equal to gte. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n updated_at_gte?: string;\n /** Include timestamps strictly greater than gt. RFC3339 format, like `2006-01-02T15:04:05Z`. */\n updated_at_gt?: string;\n /** Number of results to return. */\n limit?: number;\n /** Return items in ascending (ASC) or descending (DESC) order. Defaults to DESC. */\n order?: KnownSortOrder | (string & {});\n /** The specific method by which the returned results will be ordered. */\n order_by?: KnownOrderBy | (string & {});\n /** Optionally filter by Identity type */\n identity_type?: KnownIdentityType | (string & {});\n /** Optionally filter by active identity control types. Only returns identities with active controls matching any of these types. */\n control_types?: (KnownIdentityControlType | (string & {}))[];\n /** Optionally filter by active identity control reason codes. Only returns identities with active controls matching any of these reason codes.\n\n - OTHER: Miscellaneous reason not captured by existing categories.\n - END_USER_REQUEST: Control applied at the end user's request.\n - INACTIVITY: Control applied due to prolonged inactivity in accordance with dormancy or lifecycle management policies.\n - COMPLIANCE_KYC: Control applied due to unmet KYC requirements, including missing, expired, failed, or unresponsiveness to refresh obligations.\n - COMPLIANCE_EDD: Control applied due to Enhanced Due Diligence (EDD) requirements, including failure to complete EDD reviews, provide requested information, or satisfy heightened risk assessment criteria.\n - COMPLIANCE_SCREENING: Control applied as a result of sanctions, politically exposed person (PEP), or adverse media screening hits.\n - COMPLIANCE_INVESTIGATION: Control applied while an identity is under active compliance, risk, or regulatory investigation, including reviews triggered by monitoring alerts or external inquiries.\n - COMPLIANCE_INCOMPLETE: Control applied because the onboarding process was not successfully completed, including failure to respond to requests for information or provide required documentation.\n - RISK_FRAUD: Control applied due to suspected or confirmed fraud, abuse, or security risk, including account compromise, transaction fraud, or policy violations.\n - LEGAL_ORDER: Control applied to comply with a legal, regulatory, or law-enforcement directive, including court orders, asset preservation requests, or regulatory instructions.\n - ADMINISTRATIVE: Control applied for operational or platform-initiated reasons not attributable to the end user or compliance failure, such as system remediation or account restructuring.\n - TAX_DOCUMENTATION: Control applied because required tax documentation (e.g. W-8 or W-9) is missing, expired, or invalid. */\n control_reason_codes?: (KnownIdentityControlReasonCode | (string & {}))[];\n /** Optionally filter by identity requirement type. Only returns identities with at least one\nactive requirement matching all requirement_* filters that are set.\n\n - ID_VERIFICATION: Identity verification via a passthrough provider is pending or failed.\n - DOCUMENT_VERIFICATION: Document review for an institution is pending or failed.\n - SCREENING_CHECK: Identity screening check is pending or failed.\n - COMPLIANCE_CHECK: A compliance check is pending or failed.\n - ENHANCED_DUE_DILIGENCE: Enhanced due diligence review is pending or failed.\n - MEMBERS: One or more institution members have a non-approved status.\n - KYC_REFRESH: KYC refresh is overdue or in progress.\n - TAX_DETAILS_VERIFICATION: Tax details verification is pending or failed.\n - TAX_DOCUMENTATION: Tax documentation validation or remediation is pending or failed.\nThis requirement may be present while Identity.status is APPROVED. */\n requirement_types?: (KnownIdentityRequirementRequirementType | (string & {}))[];\n /** Optionally filter by identity requirement status. Only returns identities with an active\nrequirement whose status is any of these values. */\n requirement_statuses?: (KnownIdentityRequirementRequirementStatus | (string & {}))[];\n /** Optionally filter by which party must act to resolve a requirement. Only returns identities\nwith an active requirement awaiting action from any of these parties. MEMBERS requirements\nhave no awaiting_action_from and never match this filter.\n\n - CLIENT: The client (the integrating partner) must take action to resolve this requirement.\n - PAXOS: Paxos is handling this; no action needed from the client. */\n requirement_awaiting_action_from?: (KnownIdentityRequirementAwaitingActionFrom | (string & {}))[];\n /** Resume from a cursor previously returned as a page's `nextCursor`. */\n page_cursor?: string;\n}\n\nexport interface GetIdentityParams {\n /** query param; details are encrypted, so we do not want to include them by default */\n include_details?: boolean;\n /** query param; to include institution members for institution identity */\n include_institution_members?: boolean;\n}\n\n/**\n * IdentityService — An Identity represents a person or institution who is able\n * to take actions on the Paxos Platform. Depending on your integration type\n * you might not need to create Identities for your end users.\n *\n * Identities must pass a set of verifications and checks before they're able\n * to transact on the Platform. Learn more about getting started with Identity\n * and managing their onboarding lifecycle in the Identity Developer Guide.\n *\n * Access via `client.identity`.\n */\nexport class IdentityService {\n /** @internal */\n constructor(private readonly client: HttpClient) {}\n\n /**\n * List Identities\n *\n * Requires scope: identity:read_identity\n */\n listIdentities(params?: ListIdentitiesParams, opts?: RequestOptions): PageIterator<WithRaw<Identity>> {\n return this.client.paginate<WithRaw<Identity>>(\"/identity/identities\", \"items\", params, opts, {\n responseSchema: \"ListIdentitiesResponse\",\n });\n }\n\n /**\n * Create Identity\n *\n * Requires scope: identity:write_identity\n */\n async createIdentity(request: CreateIdentityRequest, opts?: RequestOptions): Promise<WithRaw<Identity>> {\n const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };\n return this.client.post<WithRaw<Identity>>(\"/identity/identities\", body, opts, {\n responseSchema: \"Identity\",\n requestSchema: \"CreateIdentityRequest\",\n replayProtected: true,\n });\n }\n\n /**\n * Get Identity\n *\n * Requires scope: identity:read_identity\n */\n async getIdentity(id: string, params?: GetIdentityParams, opts?: RequestOptions): Promise<WithRaw<Identity>> {\n return this.client.get<WithRaw<Identity>>(buildPath(\"/identity/identities/{id}\", { id: id }), params, opts, {\n responseSchema: \"Identity\",\n });\n }\n\n /**\n * Update Identity\n *\n * Requires scope: identity:write_identity\n */\n async updateIdentity(id: string, request: UpdateIdentityRequest, opts?: RequestOptions): Promise<WithRaw<Identity>> {\n const body = { ...request, ref_id: request.ref_id || globalThis.crypto.randomUUID() };\n return this.client.put<WithRaw<Identity>>(buildPath(\"/identity/identities/{id}\", { id: id }), body, opts, {\n responseSchema: \"Identity\",\n requestSchema: \"UpdateIdentityRequest\",\n });\n }\n}\n"]}
|