@blindpay/node 1.2.0 → 2.0.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 (39) hide show
  1. package/dist/{chunk-BONN6PYB.mjs → chunk-MPJKYFDD.mjs} +9 -4
  2. package/dist/{chunk-E4S6NTNE.mjs → chunk-URXUVGMC.mjs} +6 -6
  3. package/dist/index.d.mts +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +10 -5
  6. package/dist/index.mjs +6 -6
  7. package/dist/resources/api-keys/api-keys.test.js +10 -5
  8. package/dist/resources/api-keys/api-keys.test.mjs +3 -3
  9. package/dist/resources/available/available.test.js +10 -5
  10. package/dist/resources/available/available.test.mjs +3 -3
  11. package/dist/resources/bank-accounts/bank-accounts.test.js +10 -5
  12. package/dist/resources/bank-accounts/bank-accounts.test.mjs +3 -3
  13. package/dist/resources/instances/instances.test.js +10 -5
  14. package/dist/resources/instances/instances.test.mjs +3 -3
  15. package/dist/resources/partner-fees/partner-fees.test.js +10 -5
  16. package/dist/resources/partner-fees/partner-fees.test.mjs +3 -3
  17. package/dist/resources/payins/payins-quotes.test.js +10 -5
  18. package/dist/resources/payins/payins-quotes.test.mjs +3 -3
  19. package/dist/resources/payins/payins.test.js +10 -5
  20. package/dist/resources/payins/payins.test.mjs +3 -3
  21. package/dist/resources/payouts/payouts.test.js +10 -5
  22. package/dist/resources/payouts/payouts.test.mjs +3 -3
  23. package/dist/resources/quotes/quotes.test.js +10 -5
  24. package/dist/resources/quotes/quotes.test.mjs +3 -3
  25. package/dist/resources/receivers/index.d.mts +169 -53
  26. package/dist/resources/receivers/index.d.ts +169 -53
  27. package/dist/resources/receivers/index.js +9 -4
  28. package/dist/resources/receivers/index.mjs +1 -1
  29. package/dist/resources/receivers/receivers.test.js +278 -171
  30. package/dist/resources/receivers/receivers.test.mjs +271 -169
  31. package/dist/resources/virtual-accounts/virtual-accounts.test.js +10 -5
  32. package/dist/resources/virtual-accounts/virtual-accounts.test.mjs +3 -3
  33. package/dist/resources/wallets/blockchain.test.js +10 -5
  34. package/dist/resources/wallets/blockchain.test.mjs +3 -3
  35. package/dist/resources/wallets/offramp.test.js +10 -5
  36. package/dist/resources/wallets/offramp.test.mjs +3 -3
  37. package/dist/resources/webhooks/webhooks.test.js +10 -5
  38. package/dist/resources/webhooks/webhooks.test.mjs +3 -3
  39. package/package.json +1 -1
@@ -18714,7 +18714,7 @@ var import_expect_type = __toESM(require_dist(), 1);
18714
18714
  var import_node_crypto = require("crypto");
18715
18715
 
18716
18716
  // package.json
18717
- var version = "1.2.0";
18717
+ var version = "2.0.0";
18718
18718
 
18719
18719
  // src/internal/blindpay-error.ts
18720
18720
  var BlindPayError = class extends Error {
@@ -18993,15 +18993,20 @@ function createReceiversResource(instanceId, client) {
18993
18993
  list() {
18994
18994
  return client.get(`/instances/${instanceId}/receivers`);
18995
18995
  },
18996
- create(_a3) {
18997
- var data = __objRest(_a3, []);
18996
+ createIndividualWithStandardKYC(data) {
18997
+ return client.post(`/instances/${instanceId}/receivers`, data);
18998
+ },
18999
+ createIndividualWithEnhancedKYC(data) {
19000
+ return client.post(`/instances/${instanceId}/receivers`, data);
19001
+ },
19002
+ createBusinessWithStandardKYB(data) {
18998
19003
  return client.post(`/instances/${instanceId}/receivers`, data);
18999
19004
  },
19000
19005
  get(receiver_id) {
19001
19006
  return client.get(`/instances/${instanceId}/receivers/${receiver_id}`);
19002
19007
  },
19003
- update(_b) {
19004
- var _c = _b, { receiver_id } = _c, data = __objRest(_c, ["receiver_id"]);
19008
+ update(_a3) {
19009
+ var _b = _a3, { receiver_id } = _b, data = __objRest(_b, ["receiver_id"]);
19005
19010
  return client.patch(`/instances/${instanceId}/receivers/${receiver_id}`, data);
19006
19011
  },
19007
19012
  delete(receiver_id) {
@@ -8,20 +8,20 @@ import {
8
8
  import {
9
9
  BlindPay,
10
10
  init_client
11
- } from "../../chunk-E4S6NTNE.mjs";
11
+ } from "../../chunk-URXUVGMC.mjs";
12
12
  import "../../chunk-IZYPRCCV.mjs";
13
13
  import "../../chunk-QGNLMN6Z.mjs";
14
14
  import "../../chunk-UC57SCKQ.mjs";
15
15
  import "../../chunk-TBTA7A2P.mjs";
16
- import "../../chunk-BONN6PYB.mjs";
16
+ import "../../chunk-MPJKYFDD.mjs";
17
17
  import "../../chunk-5XJJKYXE.mjs";
18
+ import "../../chunk-CPOSU35L.mjs";
18
19
  import "../../chunk-RC5NN5UF.mjs";
19
20
  import "../../chunk-W7NJUABI.mjs";
20
21
  import "../../chunk-E7M4CJKR.mjs";
21
22
  import "../../chunk-3QQCDR3E.mjs";
22
23
  import "../../chunk-LRHWT4JU.mjs";
23
24
  import "../../chunk-QHMIK7U3.mjs";
24
- import "../../chunk-CPOSU35L.mjs";
25
25
  import "../../chunk-B5T7AQLH.mjs";
26
26
  import {
27
27
  __async,
@@ -7,45 +7,48 @@ type IdentificationDocument = "PASSPORT" | "ID_CARD" | "DRIVERS";
7
7
  type KycType = "light" | "standard" | "enhanced";
8
8
  type OwnerRole = "beneficial_controlling" | "beneficial_owner" | "controlling_person";
9
9
  type Owner = {
10
+ id: string;
11
+ instance_id: string;
12
+ receiver_id: string;
13
+ role: OwnerRole;
14
+ first_name: string;
15
+ last_name: string;
16
+ date_of_birth: string;
17
+ tax_id: string;
10
18
  address_line_1: string;
11
- address_line_2: string;
19
+ address_line_2: string | null;
12
20
  city: string;
21
+ state_province_region: string;
13
22
  country: Country;
14
- date_of_birth: string;
15
- first_name: string;
23
+ postal_code: string;
16
24
  id_doc_country: Country;
17
- id_doc_front_file: string;
18
25
  id_doc_type: IdentificationDocument;
19
- last_name: string;
20
- postal_code: string;
21
- role: OwnerRole;
22
- state_province_region: string;
23
- tax_id: string;
26
+ id_doc_front_file: string;
24
27
  id_doc_back_file: string;
25
- proof_of_address_doc_file: string;
26
28
  proof_of_address_doc_type: ProofOfAddressDocType;
29
+ proof_of_address_doc_file: string;
27
30
  };
28
- type Receiver = {
31
+ type IndividualWithStandardKYC = {
29
32
  id: string;
30
- type: AccountClass;
31
- kyc_type: KycType;
33
+ type: Extract<AccountClass, "individual">;
34
+ kyc_type: Extract<KycType, "standard">;
32
35
  kyc_status: string;
33
36
  kyc_warnings: Array<{
34
37
  code: string | null;
35
38
  message: string | null;
36
39
  resolution_status: string | null;
37
40
  warning_id: string | null;
38
- }>;
41
+ }> | null;
39
42
  email: string;
40
43
  tax_id: string;
41
44
  address_line_1: string;
42
- address_line_2?: string;
45
+ address_line_2?: string | null;
43
46
  city: string;
44
47
  state_province_region: string;
45
48
  country: Country;
46
49
  postal_code: string;
47
- ip_address: string;
48
- image_url: string;
50
+ ip_address: string | null;
51
+ image_url: string | null;
49
52
  phone_number: string;
50
53
  proof_of_address_doc_type: ProofOfAddressDocType;
51
54
  proof_of_address_doc_file: string;
@@ -56,23 +59,98 @@ type Receiver = {
56
59
  id_doc_type: IdentificationDocument;
57
60
  id_doc_front_file: string;
58
61
  id_doc_back_file: string;
62
+ aiprise_validation_key: string;
63
+ instance_id: string;
64
+ tos_id: string | null;
65
+ created_at: string;
66
+ updated_at: string;
67
+ limit: {
68
+ per_transaction: number;
69
+ daily: number;
70
+ monthly: number;
71
+ };
72
+ };
73
+ type IndividualWithEnhancedKYC = {
74
+ id: string;
75
+ type: Extract<AccountClass, "individual">;
76
+ kyc_type: Extract<KycType, "enhanced">;
77
+ kyc_status: string;
78
+ kyc_warnings: Array<{
79
+ code: string | null;
80
+ message: string | null;
81
+ resolution_status: string | null;
82
+ warning_id: string | null;
83
+ }> | null;
84
+ email: string;
85
+ tax_id: string;
86
+ address_line_1: string;
87
+ address_line_2?: string | null;
88
+ city: string;
89
+ state_province_region: string;
90
+ country: Country;
91
+ postal_code: string;
92
+ ip_address: string | null;
93
+ image_url: string | null;
94
+ phone_number: string | null;
95
+ proof_of_address_doc_type: ProofOfAddressDocType;
96
+ proof_of_address_doc_file: string;
97
+ first_name: string;
98
+ last_name: string;
99
+ date_of_birth: string;
100
+ id_doc_country: Country;
101
+ id_doc_type: IdentificationDocument;
102
+ id_doc_front_file: string;
103
+ id_doc_back_file: string | null;
104
+ aiprise_validation_key: string;
105
+ instance_id: string;
106
+ source_of_funds_doc_type: string;
107
+ source_of_funds_doc_file: string;
108
+ individual_holding_doc_front_file: string;
109
+ purpose_of_transactions: PurposeOfTransactions;
110
+ purpose_of_transactions_explanation: string | null;
111
+ tos_id: string | null;
112
+ created_at: string;
113
+ updated_at: string;
114
+ limit: {
115
+ per_transaction: number;
116
+ daily: number;
117
+ monthly: number;
118
+ };
119
+ };
120
+ type BusinessWithStandardKYB = {
121
+ id: string;
122
+ type: Extract<AccountClass, "business">;
123
+ kyc_type: Extract<KycType, "standard">;
124
+ kyc_status: string;
125
+ kyc_warnings: Array<{
126
+ code: string | null;
127
+ message: string | null;
128
+ resolution_status: string | null;
129
+ warning_id: string | null;
130
+ }> | null;
131
+ email: string;
132
+ tax_id: string;
133
+ address_line_1: string;
134
+ address_line_2?: string | null;
135
+ city: string;
136
+ state_province_region: string;
137
+ country: Country;
138
+ postal_code: string;
139
+ ip_address: string | null;
140
+ image_url: string | null;
141
+ phone_number: string;
142
+ proof_of_address_doc_type: ProofOfAddressDocType;
143
+ proof_of_address_doc_file: string;
59
144
  legal_name: string;
60
- alternate_name: string;
145
+ alternate_name: string | null;
61
146
  formation_date: string;
62
- website: string;
63
- owners: Array<{
64
- id: string;
65
- } & Pick<Owner, "first_name" | "last_name" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "id_doc_country" | "id_doc_type" | "id_doc_front_file" | "id_doc_back_file">>;
147
+ website: string | null;
148
+ owners: Owner[];
66
149
  incorporation_doc_file: string;
67
150
  proof_of_ownership_doc_file: string;
68
- source_of_funds_doc_type: SourceOfFundsDocType;
69
- source_of_funds_doc_file: string;
70
- individual_holding_doc_front_file: string;
71
- purpose_of_transactions: PurposeOfTransactions;
72
- purpose_of_transactions_explanation: string;
73
- external_id: string;
151
+ external_id: string | null;
74
152
  instance_id: string;
75
- tos_id: string;
153
+ tos_id: string | null;
76
154
  aiprise_validation_key: string;
77
155
  created_at: string;
78
156
  updated_at: string;
@@ -82,50 +160,86 @@ type Receiver = {
82
160
  monthly: number;
83
161
  };
84
162
  };
85
- type ListReceiversResponse = Receiver[];
86
- type CreateReceiverInput = {
87
- country: Country;
88
- kyc_type: KycType;
89
- type: AccountClass;
163
+ type ListReceiversResponse = Array<IndividualWithStandardKYC | IndividualWithEnhancedKYC | BusinessWithStandardKYB>;
164
+ type CreateIndividualWithStandardKYCInput = {
90
165
  address_line_1: string;
91
166
  address_line_2?: string;
92
167
  city: string;
93
- image_url: string;
94
- ip_address: string;
168
+ country: Country;
169
+ date_of_birth: string;
170
+ email: string;
171
+ first_name: string;
172
+ id_doc_country: Country;
173
+ id_doc_front_file: string;
174
+ id_doc_type: IdentificationDocument;
175
+ kyc_type: "standard";
176
+ last_name: string;
95
177
  postal_code: string;
178
+ proof_of_address_doc_file: string;
179
+ proof_of_address_doc_type: ProofOfAddressDocType;
96
180
  state_province_region: string;
97
181
  tax_id: string;
98
- alternate_name?: string;
182
+ tos_id: string;
183
+ type: "individual";
184
+ };
185
+ type CreateIndividualWithStandardKYCResponse = {
186
+ id: string;
187
+ };
188
+ type CreateIndividualWithEnhancedKYCInput = {
189
+ address_line_1: string;
190
+ address_line_2?: string;
191
+ city: string;
192
+ country: Country;
99
193
  date_of_birth: string;
100
- external_id: string;
194
+ email: string;
101
195
  first_name: string;
102
- formation_date: string;
103
- id_doc_back_file: string;
196
+ id_doc_country: Country;
104
197
  id_doc_front_file: string;
105
198
  id_doc_type: IdentificationDocument;
106
- id_doc_country: Country;
107
- email: string;
108
- incorporation_doc_file: string;
109
199
  individual_holding_doc_front_file: string;
200
+ kyc_type: "enhanced";
110
201
  last_name: string;
111
- legal_name: string;
112
- owners: Owner[];
113
- phone_number: string;
202
+ postal_code: string;
114
203
  proof_of_address_doc_file: string;
115
204
  proof_of_address_doc_type: ProofOfAddressDocType;
116
- proof_of_ownership_doc_file: string;
117
205
  purpose_of_transactions: PurposeOfTransactions;
118
- purpose_of_transactions_explanation: string;
119
206
  source_of_funds_doc_file: string;
120
207
  source_of_funds_doc_type: SourceOfFundsDocType;
208
+ state_province_region: string;
209
+ tax_id: string;
210
+ tos_id: string;
211
+ type: "individual";
212
+ };
213
+ type CreateIndividualWithEnhancedKYCResponse = {
214
+ id: string;
215
+ };
216
+ type CreateBusinessWithStandardKYBInput = {
217
+ address_line_1: string;
218
+ address_line_2?: string;
219
+ alternate_name: string;
220
+ city: string;
221
+ country: Country;
222
+ email: string;
223
+ formation_date: string;
224
+ incorporation_doc_file: string;
225
+ kyc_type: "standard";
226
+ legal_name: string;
227
+ owners: Owner[];
228
+ postal_code: string;
229
+ proof_of_address_doc_file: string;
230
+ proof_of_address_doc_type: ProofOfAddressDocType;
231
+ proof_of_ownership_doc_file: string;
232
+ state_province_region: string;
233
+ tax_id: string;
121
234
  tos_id: string;
122
- website: string;
235
+ type: "business";
236
+ website: string | null;
123
237
  };
124
- type CreateReceiverResponse = {
238
+ type CreateBusinessWithStandardKYBResponse = {
125
239
  id: string;
126
240
  };
127
241
  type GetReceiverInput = string;
128
- type GetReceiverResponse = Receiver;
242
+ type GetReceiverResponse = IndividualWithStandardKYC | IndividualWithEnhancedKYC | BusinessWithStandardKYB;
129
243
  type UpdateReceiverInput = {
130
244
  receiver_id: string;
131
245
  email?: string;
@@ -181,11 +295,13 @@ type GetReceiverLimitsResponse = {
181
295
  };
182
296
  declare function createReceiversResource(instanceId: string, client: InternalApiClient): {
183
297
  list(): Promise<BlindpayApiResponse<ListReceiversResponse>>;
184
- create({ ...data }: CreateReceiverInput): Promise<BlindpayApiResponse<CreateReceiverResponse>>;
298
+ createIndividualWithStandardKYC(data: CreateIndividualWithStandardKYCInput): Promise<BlindpayApiResponse<CreateIndividualWithStandardKYCResponse>>;
299
+ createIndividualWithEnhancedKYC(data: CreateIndividualWithEnhancedKYCInput): Promise<BlindpayApiResponse<CreateIndividualWithEnhancedKYCResponse>>;
300
+ createBusinessWithStandardKYB(data: CreateBusinessWithStandardKYBInput): Promise<BlindpayApiResponse<CreateBusinessWithStandardKYBResponse>>;
185
301
  get(receiver_id: GetReceiverInput): Promise<BlindpayApiResponse<GetReceiverResponse>>;
186
302
  update({ receiver_id, ...data }: UpdateReceiverInput): Promise<BlindpayApiResponse<void>>;
187
303
  delete(receiver_id: DeleteReceiverInput): Promise<BlindpayApiResponse<void>>;
188
304
  getLimits(receiver_id: GetReceiverLimitsInput): Promise<BlindpayApiResponse<GetReceiverLimitsResponse>>;
189
305
  };
190
306
 
191
- export { type CreateReceiverInput, type CreateReceiverResponse, type DeleteReceiverInput, type GetReceiverInput, type GetReceiverLimitsInput, type GetReceiverLimitsResponse, type GetReceiverResponse, type IdentificationDocument, type KycType, type ListReceiversResponse, type Owner, type OwnerRole, type ProofOfAddressDocType, type PurposeOfTransactions, type Receiver, type SourceOfFundsDocType, type UpdateReceiverInput, createReceiversResource };
307
+ export { type BusinessWithStandardKYB, type CreateBusinessWithStandardKYBInput, type CreateBusinessWithStandardKYBResponse, type CreateIndividualWithEnhancedKYCInput, type CreateIndividualWithEnhancedKYCResponse, type CreateIndividualWithStandardKYCInput, type CreateIndividualWithStandardKYCResponse, type DeleteReceiverInput, type GetReceiverInput, type GetReceiverLimitsInput, type GetReceiverLimitsResponse, type GetReceiverResponse, type IdentificationDocument, type IndividualWithEnhancedKYC, type IndividualWithStandardKYC, type KycType, type ListReceiversResponse, type Owner, type OwnerRole, type ProofOfAddressDocType, type PurposeOfTransactions, type SourceOfFundsDocType, type UpdateReceiverInput, createReceiversResource };
@@ -7,45 +7,48 @@ type IdentificationDocument = "PASSPORT" | "ID_CARD" | "DRIVERS";
7
7
  type KycType = "light" | "standard" | "enhanced";
8
8
  type OwnerRole = "beneficial_controlling" | "beneficial_owner" | "controlling_person";
9
9
  type Owner = {
10
+ id: string;
11
+ instance_id: string;
12
+ receiver_id: string;
13
+ role: OwnerRole;
14
+ first_name: string;
15
+ last_name: string;
16
+ date_of_birth: string;
17
+ tax_id: string;
10
18
  address_line_1: string;
11
- address_line_2: string;
19
+ address_line_2: string | null;
12
20
  city: string;
21
+ state_province_region: string;
13
22
  country: Country;
14
- date_of_birth: string;
15
- first_name: string;
23
+ postal_code: string;
16
24
  id_doc_country: Country;
17
- id_doc_front_file: string;
18
25
  id_doc_type: IdentificationDocument;
19
- last_name: string;
20
- postal_code: string;
21
- role: OwnerRole;
22
- state_province_region: string;
23
- tax_id: string;
26
+ id_doc_front_file: string;
24
27
  id_doc_back_file: string;
25
- proof_of_address_doc_file: string;
26
28
  proof_of_address_doc_type: ProofOfAddressDocType;
29
+ proof_of_address_doc_file: string;
27
30
  };
28
- type Receiver = {
31
+ type IndividualWithStandardKYC = {
29
32
  id: string;
30
- type: AccountClass;
31
- kyc_type: KycType;
33
+ type: Extract<AccountClass, "individual">;
34
+ kyc_type: Extract<KycType, "standard">;
32
35
  kyc_status: string;
33
36
  kyc_warnings: Array<{
34
37
  code: string | null;
35
38
  message: string | null;
36
39
  resolution_status: string | null;
37
40
  warning_id: string | null;
38
- }>;
41
+ }> | null;
39
42
  email: string;
40
43
  tax_id: string;
41
44
  address_line_1: string;
42
- address_line_2?: string;
45
+ address_line_2?: string | null;
43
46
  city: string;
44
47
  state_province_region: string;
45
48
  country: Country;
46
49
  postal_code: string;
47
- ip_address: string;
48
- image_url: string;
50
+ ip_address: string | null;
51
+ image_url: string | null;
49
52
  phone_number: string;
50
53
  proof_of_address_doc_type: ProofOfAddressDocType;
51
54
  proof_of_address_doc_file: string;
@@ -56,23 +59,98 @@ type Receiver = {
56
59
  id_doc_type: IdentificationDocument;
57
60
  id_doc_front_file: string;
58
61
  id_doc_back_file: string;
62
+ aiprise_validation_key: string;
63
+ instance_id: string;
64
+ tos_id: string | null;
65
+ created_at: string;
66
+ updated_at: string;
67
+ limit: {
68
+ per_transaction: number;
69
+ daily: number;
70
+ monthly: number;
71
+ };
72
+ };
73
+ type IndividualWithEnhancedKYC = {
74
+ id: string;
75
+ type: Extract<AccountClass, "individual">;
76
+ kyc_type: Extract<KycType, "enhanced">;
77
+ kyc_status: string;
78
+ kyc_warnings: Array<{
79
+ code: string | null;
80
+ message: string | null;
81
+ resolution_status: string | null;
82
+ warning_id: string | null;
83
+ }> | null;
84
+ email: string;
85
+ tax_id: string;
86
+ address_line_1: string;
87
+ address_line_2?: string | null;
88
+ city: string;
89
+ state_province_region: string;
90
+ country: Country;
91
+ postal_code: string;
92
+ ip_address: string | null;
93
+ image_url: string | null;
94
+ phone_number: string | null;
95
+ proof_of_address_doc_type: ProofOfAddressDocType;
96
+ proof_of_address_doc_file: string;
97
+ first_name: string;
98
+ last_name: string;
99
+ date_of_birth: string;
100
+ id_doc_country: Country;
101
+ id_doc_type: IdentificationDocument;
102
+ id_doc_front_file: string;
103
+ id_doc_back_file: string | null;
104
+ aiprise_validation_key: string;
105
+ instance_id: string;
106
+ source_of_funds_doc_type: string;
107
+ source_of_funds_doc_file: string;
108
+ individual_holding_doc_front_file: string;
109
+ purpose_of_transactions: PurposeOfTransactions;
110
+ purpose_of_transactions_explanation: string | null;
111
+ tos_id: string | null;
112
+ created_at: string;
113
+ updated_at: string;
114
+ limit: {
115
+ per_transaction: number;
116
+ daily: number;
117
+ monthly: number;
118
+ };
119
+ };
120
+ type BusinessWithStandardKYB = {
121
+ id: string;
122
+ type: Extract<AccountClass, "business">;
123
+ kyc_type: Extract<KycType, "standard">;
124
+ kyc_status: string;
125
+ kyc_warnings: Array<{
126
+ code: string | null;
127
+ message: string | null;
128
+ resolution_status: string | null;
129
+ warning_id: string | null;
130
+ }> | null;
131
+ email: string;
132
+ tax_id: string;
133
+ address_line_1: string;
134
+ address_line_2?: string | null;
135
+ city: string;
136
+ state_province_region: string;
137
+ country: Country;
138
+ postal_code: string;
139
+ ip_address: string | null;
140
+ image_url: string | null;
141
+ phone_number: string;
142
+ proof_of_address_doc_type: ProofOfAddressDocType;
143
+ proof_of_address_doc_file: string;
59
144
  legal_name: string;
60
- alternate_name: string;
145
+ alternate_name: string | null;
61
146
  formation_date: string;
62
- website: string;
63
- owners: Array<{
64
- id: string;
65
- } & Pick<Owner, "first_name" | "last_name" | "address_line_1" | "address_line_2" | "city" | "state_province_region" | "country" | "postal_code" | "id_doc_country" | "id_doc_type" | "id_doc_front_file" | "id_doc_back_file">>;
147
+ website: string | null;
148
+ owners: Owner[];
66
149
  incorporation_doc_file: string;
67
150
  proof_of_ownership_doc_file: string;
68
- source_of_funds_doc_type: SourceOfFundsDocType;
69
- source_of_funds_doc_file: string;
70
- individual_holding_doc_front_file: string;
71
- purpose_of_transactions: PurposeOfTransactions;
72
- purpose_of_transactions_explanation: string;
73
- external_id: string;
151
+ external_id: string | null;
74
152
  instance_id: string;
75
- tos_id: string;
153
+ tos_id: string | null;
76
154
  aiprise_validation_key: string;
77
155
  created_at: string;
78
156
  updated_at: string;
@@ -82,50 +160,86 @@ type Receiver = {
82
160
  monthly: number;
83
161
  };
84
162
  };
85
- type ListReceiversResponse = Receiver[];
86
- type CreateReceiverInput = {
87
- country: Country;
88
- kyc_type: KycType;
89
- type: AccountClass;
163
+ type ListReceiversResponse = Array<IndividualWithStandardKYC | IndividualWithEnhancedKYC | BusinessWithStandardKYB>;
164
+ type CreateIndividualWithStandardKYCInput = {
90
165
  address_line_1: string;
91
166
  address_line_2?: string;
92
167
  city: string;
93
- image_url: string;
94
- ip_address: string;
168
+ country: Country;
169
+ date_of_birth: string;
170
+ email: string;
171
+ first_name: string;
172
+ id_doc_country: Country;
173
+ id_doc_front_file: string;
174
+ id_doc_type: IdentificationDocument;
175
+ kyc_type: "standard";
176
+ last_name: string;
95
177
  postal_code: string;
178
+ proof_of_address_doc_file: string;
179
+ proof_of_address_doc_type: ProofOfAddressDocType;
96
180
  state_province_region: string;
97
181
  tax_id: string;
98
- alternate_name?: string;
182
+ tos_id: string;
183
+ type: "individual";
184
+ };
185
+ type CreateIndividualWithStandardKYCResponse = {
186
+ id: string;
187
+ };
188
+ type CreateIndividualWithEnhancedKYCInput = {
189
+ address_line_1: string;
190
+ address_line_2?: string;
191
+ city: string;
192
+ country: Country;
99
193
  date_of_birth: string;
100
- external_id: string;
194
+ email: string;
101
195
  first_name: string;
102
- formation_date: string;
103
- id_doc_back_file: string;
196
+ id_doc_country: Country;
104
197
  id_doc_front_file: string;
105
198
  id_doc_type: IdentificationDocument;
106
- id_doc_country: Country;
107
- email: string;
108
- incorporation_doc_file: string;
109
199
  individual_holding_doc_front_file: string;
200
+ kyc_type: "enhanced";
110
201
  last_name: string;
111
- legal_name: string;
112
- owners: Owner[];
113
- phone_number: string;
202
+ postal_code: string;
114
203
  proof_of_address_doc_file: string;
115
204
  proof_of_address_doc_type: ProofOfAddressDocType;
116
- proof_of_ownership_doc_file: string;
117
205
  purpose_of_transactions: PurposeOfTransactions;
118
- purpose_of_transactions_explanation: string;
119
206
  source_of_funds_doc_file: string;
120
207
  source_of_funds_doc_type: SourceOfFundsDocType;
208
+ state_province_region: string;
209
+ tax_id: string;
210
+ tos_id: string;
211
+ type: "individual";
212
+ };
213
+ type CreateIndividualWithEnhancedKYCResponse = {
214
+ id: string;
215
+ };
216
+ type CreateBusinessWithStandardKYBInput = {
217
+ address_line_1: string;
218
+ address_line_2?: string;
219
+ alternate_name: string;
220
+ city: string;
221
+ country: Country;
222
+ email: string;
223
+ formation_date: string;
224
+ incorporation_doc_file: string;
225
+ kyc_type: "standard";
226
+ legal_name: string;
227
+ owners: Owner[];
228
+ postal_code: string;
229
+ proof_of_address_doc_file: string;
230
+ proof_of_address_doc_type: ProofOfAddressDocType;
231
+ proof_of_ownership_doc_file: string;
232
+ state_province_region: string;
233
+ tax_id: string;
121
234
  tos_id: string;
122
- website: string;
235
+ type: "business";
236
+ website: string | null;
123
237
  };
124
- type CreateReceiverResponse = {
238
+ type CreateBusinessWithStandardKYBResponse = {
125
239
  id: string;
126
240
  };
127
241
  type GetReceiverInput = string;
128
- type GetReceiverResponse = Receiver;
242
+ type GetReceiverResponse = IndividualWithStandardKYC | IndividualWithEnhancedKYC | BusinessWithStandardKYB;
129
243
  type UpdateReceiverInput = {
130
244
  receiver_id: string;
131
245
  email?: string;
@@ -181,11 +295,13 @@ type GetReceiverLimitsResponse = {
181
295
  };
182
296
  declare function createReceiversResource(instanceId: string, client: InternalApiClient): {
183
297
  list(): Promise<BlindpayApiResponse<ListReceiversResponse>>;
184
- create({ ...data }: CreateReceiverInput): Promise<BlindpayApiResponse<CreateReceiverResponse>>;
298
+ createIndividualWithStandardKYC(data: CreateIndividualWithStandardKYCInput): Promise<BlindpayApiResponse<CreateIndividualWithStandardKYCResponse>>;
299
+ createIndividualWithEnhancedKYC(data: CreateIndividualWithEnhancedKYCInput): Promise<BlindpayApiResponse<CreateIndividualWithEnhancedKYCResponse>>;
300
+ createBusinessWithStandardKYB(data: CreateBusinessWithStandardKYBInput): Promise<BlindpayApiResponse<CreateBusinessWithStandardKYBResponse>>;
185
301
  get(receiver_id: GetReceiverInput): Promise<BlindpayApiResponse<GetReceiverResponse>>;
186
302
  update({ receiver_id, ...data }: UpdateReceiverInput): Promise<BlindpayApiResponse<void>>;
187
303
  delete(receiver_id: DeleteReceiverInput): Promise<BlindpayApiResponse<void>>;
188
304
  getLimits(receiver_id: GetReceiverLimitsInput): Promise<BlindpayApiResponse<GetReceiverLimitsResponse>>;
189
305
  };
190
306
 
191
- export { type CreateReceiverInput, type CreateReceiverResponse, type DeleteReceiverInput, type GetReceiverInput, type GetReceiverLimitsInput, type GetReceiverLimitsResponse, type GetReceiverResponse, type IdentificationDocument, type KycType, type ListReceiversResponse, type Owner, type OwnerRole, type ProofOfAddressDocType, type PurposeOfTransactions, type Receiver, type SourceOfFundsDocType, type UpdateReceiverInput, createReceiversResource };
307
+ export { type BusinessWithStandardKYB, type CreateBusinessWithStandardKYBInput, type CreateBusinessWithStandardKYBResponse, type CreateIndividualWithEnhancedKYCInput, type CreateIndividualWithEnhancedKYCResponse, type CreateIndividualWithStandardKYCInput, type CreateIndividualWithStandardKYCResponse, type DeleteReceiverInput, type GetReceiverInput, type GetReceiverLimitsInput, type GetReceiverLimitsResponse, type GetReceiverResponse, type IdentificationDocument, type IndividualWithEnhancedKYC, type IndividualWithStandardKYC, type KycType, type ListReceiversResponse, type Owner, type OwnerRole, type ProofOfAddressDocType, type PurposeOfTransactions, type SourceOfFundsDocType, type UpdateReceiverInput, createReceiversResource };
@@ -42,15 +42,20 @@ function createReceiversResource(instanceId, client) {
42
42
  list() {
43
43
  return client.get(`/instances/${instanceId}/receivers`);
44
44
  },
45
- create(_a) {
46
- var data = __objRest(_a, []);
45
+ createIndividualWithStandardKYC(data) {
46
+ return client.post(`/instances/${instanceId}/receivers`, data);
47
+ },
48
+ createIndividualWithEnhancedKYC(data) {
49
+ return client.post(`/instances/${instanceId}/receivers`, data);
50
+ },
51
+ createBusinessWithStandardKYB(data) {
47
52
  return client.post(`/instances/${instanceId}/receivers`, data);
48
53
  },
49
54
  get(receiver_id) {
50
55
  return client.get(`/instances/${instanceId}/receivers/${receiver_id}`);
51
56
  },
52
- update(_b) {
53
- var _c = _b, { receiver_id } = _c, data = __objRest(_c, ["receiver_id"]);
57
+ update(_a) {
58
+ var _b = _a, { receiver_id } = _b, data = __objRest(_b, ["receiver_id"]);
54
59
  return client.patch(`/instances/${instanceId}/receivers/${receiver_id}`, data);
55
60
  },
56
61
  delete(receiver_id) {