@naturalpay/sdk 1.5.0 → 1.6.1
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/ach/client/Client.js +11 -3
- package/dist/cjs/api/resources/ach/client/requests/CancelAchParams.d.ts +2 -0
- package/dist/cjs/api/resources/ach/client/requests/GetAchRequest.d.ts +1 -0
- package/dist/cjs/api/resources/ach/client/requests/ListAchRequest.d.ts +1 -0
- package/dist/cjs/api/resources/ach/client/requests/NewAchParams.d.ts +2 -0
- package/dist/cjs/api/resources/customers/client/Client.d.ts +1 -50
- package/dist/cjs/api/resources/customers/client/Client.js +1 -50
- package/dist/cjs/api/resources/customers/client/requests/CreateInvitationsCustomersRequest.d.ts +2 -51
- package/dist/cjs/api/resources/externalAccounts/client/Client.d.ts +5 -3
- package/dist/cjs/api/resources/externalAccounts/client/Client.js +5 -3
- package/dist/cjs/api/resources/externalAccounts/client/requests/CreateFromProcessorTokenExternalAccountsRequest.d.ts +3 -3
- package/dist/cjs/api/resources/externalParties/client/Client.js +11 -3
- package/dist/cjs/api/resources/externalParties/client/requests/GetExternalPartiesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/externalParties/client/requests/ListExternalPartiesRequest.d.ts +1 -0
- package/dist/cjs/api/resources/externalParties/client/requests/NewExtPartyParams.d.ts +2 -0
- package/dist/cjs/api/resources/externalPartyAccounts/client/Client.js +11 -3
- package/dist/cjs/api/resources/externalPartyAccounts/client/requests/GetExternalPartyAccountsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/externalPartyAccounts/client/requests/ListExternalPartyAccountsRequest.d.ts +1 -0
- package/dist/cjs/api/resources/externalPartyAccounts/client/requests/NewExtPartyAcctParams.d.ts +2 -0
- package/dist/cjs/api/resources/paymentRequests/client/requests/NewPayReqParams.d.ts +1 -1
- package/dist/cjs/api/resources/payments/client/requests/NewPaymentParams.d.ts +1 -1
- package/dist/cjs/serialization/resources/ach/client/requests/CancelAchParams.d.ts +1 -0
- package/dist/cjs/serialization/resources/ach/client/requests/CancelAchParams.js +1 -0
- package/dist/cjs/serialization/resources/ach/client/requests/NewAchParams.d.ts +1 -0
- package/dist/cjs/serialization/resources/ach/client/requests/NewAchParams.js +1 -0
- package/dist/cjs/serialization/resources/externalParties/client/requests/NewExtPartyParams.d.ts +1 -0
- package/dist/cjs/serialization/resources/externalParties/client/requests/NewExtPartyParams.js +1 -0
- package/dist/cjs/serialization/resources/externalPartyAccounts/client/requests/NewExtPartyAcctParams.d.ts +1 -0
- package/dist/cjs/serialization/resources/externalPartyAccounts/client/requests/NewExtPartyAcctParams.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/ach/client/Client.mjs +11 -3
- package/dist/esm/api/resources/ach/client/requests/CancelAchParams.d.mts +2 -0
- package/dist/esm/api/resources/ach/client/requests/GetAchRequest.d.mts +1 -0
- package/dist/esm/api/resources/ach/client/requests/ListAchRequest.d.mts +1 -0
- package/dist/esm/api/resources/ach/client/requests/NewAchParams.d.mts +2 -0
- package/dist/esm/api/resources/customers/client/Client.d.mts +1 -50
- package/dist/esm/api/resources/customers/client/Client.mjs +1 -50
- package/dist/esm/api/resources/customers/client/requests/CreateInvitationsCustomersRequest.d.mts +2 -51
- package/dist/esm/api/resources/externalAccounts/client/Client.d.mts +5 -3
- package/dist/esm/api/resources/externalAccounts/client/Client.mjs +5 -3
- package/dist/esm/api/resources/externalAccounts/client/requests/CreateFromProcessorTokenExternalAccountsRequest.d.mts +3 -3
- package/dist/esm/api/resources/externalParties/client/Client.mjs +11 -3
- package/dist/esm/api/resources/externalParties/client/requests/GetExternalPartiesRequest.d.mts +1 -0
- package/dist/esm/api/resources/externalParties/client/requests/ListExternalPartiesRequest.d.mts +1 -0
- package/dist/esm/api/resources/externalParties/client/requests/NewExtPartyParams.d.mts +2 -0
- package/dist/esm/api/resources/externalPartyAccounts/client/Client.mjs +11 -3
- package/dist/esm/api/resources/externalPartyAccounts/client/requests/GetExternalPartyAccountsRequest.d.mts +1 -0
- package/dist/esm/api/resources/externalPartyAccounts/client/requests/ListExternalPartyAccountsRequest.d.mts +1 -0
- package/dist/esm/api/resources/externalPartyAccounts/client/requests/NewExtPartyAcctParams.d.mts +2 -0
- package/dist/esm/api/resources/paymentRequests/client/requests/NewPayReqParams.d.mts +1 -1
- package/dist/esm/api/resources/payments/client/requests/NewPaymentParams.d.mts +1 -1
- package/dist/esm/serialization/resources/ach/client/requests/CancelAchParams.d.mts +1 -0
- package/dist/esm/serialization/resources/ach/client/requests/CancelAchParams.mjs +1 -0
- package/dist/esm/serialization/resources/ach/client/requests/NewAchParams.d.mts +1 -0
- package/dist/esm/serialization/resources/ach/client/requests/NewAchParams.mjs +1 -0
- package/dist/esm/serialization/resources/externalParties/client/requests/NewExtPartyParams.d.mts +1 -0
- package/dist/esm/serialization/resources/externalParties/client/requests/NewExtPartyParams.mjs +1 -0
- package/dist/esm/serialization/resources/externalPartyAccounts/client/requests/NewExtPartyAcctParams.d.mts +1 -0
- package/dist/esm/serialization/resources/externalPartyAccounts/client/requests/NewExtPartyAcctParams.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +4 -53
|
@@ -13,6 +13,8 @@ import type * as Natural from "../../../../index.mjs";
|
|
|
13
13
|
export interface NewAchParams {
|
|
14
14
|
/** Unique key for safely retrying a request without creating duplicates. */
|
|
15
15
|
idempotencyKey: string;
|
|
16
|
+
/** Customer party ID (pty_*). Omit to create for your own party; provide for delegated creation. */
|
|
17
|
+
customerPartyId?: string;
|
|
16
18
|
direction: Natural.NewAchParamsDirection;
|
|
17
19
|
/** Integer amount in the minor units of currency. */
|
|
18
20
|
amount: number;
|
|
@@ -117,56 +117,7 @@ export declare class CustomersClient {
|
|
|
117
117
|
* await client.customers.createInvitations({
|
|
118
118
|
* recipients: [{
|
|
119
119
|
* type: "email",
|
|
120
|
-
* value: "ops@acme.com"
|
|
121
|
-
* accountType: "business",
|
|
122
|
-
* firstName: "Morgan",
|
|
123
|
-
* lastName: "Lee",
|
|
124
|
-
* phone: "+14155550176",
|
|
125
|
-
* business: {
|
|
126
|
-
* legalName: "Acme Logistics LLC",
|
|
127
|
-
* displayName: "Acme Logistics",
|
|
128
|
-
* website: "https://acmelogistics.com",
|
|
129
|
-
* hasTradeName: true,
|
|
130
|
-
* tradeName: "Acme Freight",
|
|
131
|
-
* businessType: "llc",
|
|
132
|
-
* industry: "513210",
|
|
133
|
-
* stateOfIncorporation: "DE",
|
|
134
|
-
* incorporationDate: "2018-03-12",
|
|
135
|
-
* registeredAddress: {
|
|
136
|
-
* streetLine1: "251 Little Falls Dr",
|
|
137
|
-
* city: "Wilmington",
|
|
138
|
-
* subdivision: "DE",
|
|
139
|
-
* postalCode: "19808",
|
|
140
|
-
* country: "US"
|
|
141
|
-
* },
|
|
142
|
-
* physicalAddress: {
|
|
143
|
-
* streetLine1: "900 Harrison St",
|
|
144
|
-
* city: "San Francisco",
|
|
145
|
-
* subdivision: "CA",
|
|
146
|
-
* postalCode: "94107",
|
|
147
|
-
* country: "US"
|
|
148
|
-
* },
|
|
149
|
-
* sourceOfFunds: ["business_revenue"],
|
|
150
|
-
* countriesOfOperations: ["US", "CA"],
|
|
151
|
-
* beneficialOwners: [{
|
|
152
|
-
* firstName: "Morgan",
|
|
153
|
-
* lastName: "Lee",
|
|
154
|
-
* email: "morgan.lee@acme.com",
|
|
155
|
-
* phone: "+14155550176",
|
|
156
|
-
* dateOfBirth: "1985-09-02",
|
|
157
|
-
* address: {
|
|
158
|
-
* streetLine1: "128 Alamo Square",
|
|
159
|
-
* city: "San Francisco",
|
|
160
|
-
* subdivision: "CA",
|
|
161
|
-
* postalCode: "94117",
|
|
162
|
-
* country: "US"
|
|
163
|
-
* },
|
|
164
|
-
* ownershipPercentage: 60,
|
|
165
|
-
* title: "ceo",
|
|
166
|
-
* countryOfCitizenship: "US",
|
|
167
|
-
* employmentStatus: "employed"
|
|
168
|
-
* }]
|
|
169
|
-
* }
|
|
120
|
+
* value: "ops@acme.com"
|
|
170
121
|
* }],
|
|
171
122
|
* agents: [{
|
|
172
123
|
* agentId: "agt_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f",
|
|
@@ -372,56 +372,7 @@ export class CustomersClient {
|
|
|
372
372
|
* await client.customers.createInvitations({
|
|
373
373
|
* recipients: [{
|
|
374
374
|
* type: "email",
|
|
375
|
-
* value: "ops@acme.com"
|
|
376
|
-
* accountType: "business",
|
|
377
|
-
* firstName: "Morgan",
|
|
378
|
-
* lastName: "Lee",
|
|
379
|
-
* phone: "+14155550176",
|
|
380
|
-
* business: {
|
|
381
|
-
* legalName: "Acme Logistics LLC",
|
|
382
|
-
* displayName: "Acme Logistics",
|
|
383
|
-
* website: "https://acmelogistics.com",
|
|
384
|
-
* hasTradeName: true,
|
|
385
|
-
* tradeName: "Acme Freight",
|
|
386
|
-
* businessType: "llc",
|
|
387
|
-
* industry: "513210",
|
|
388
|
-
* stateOfIncorporation: "DE",
|
|
389
|
-
* incorporationDate: "2018-03-12",
|
|
390
|
-
* registeredAddress: {
|
|
391
|
-
* streetLine1: "251 Little Falls Dr",
|
|
392
|
-
* city: "Wilmington",
|
|
393
|
-
* subdivision: "DE",
|
|
394
|
-
* postalCode: "19808",
|
|
395
|
-
* country: "US"
|
|
396
|
-
* },
|
|
397
|
-
* physicalAddress: {
|
|
398
|
-
* streetLine1: "900 Harrison St",
|
|
399
|
-
* city: "San Francisco",
|
|
400
|
-
* subdivision: "CA",
|
|
401
|
-
* postalCode: "94107",
|
|
402
|
-
* country: "US"
|
|
403
|
-
* },
|
|
404
|
-
* sourceOfFunds: ["business_revenue"],
|
|
405
|
-
* countriesOfOperations: ["US", "CA"],
|
|
406
|
-
* beneficialOwners: [{
|
|
407
|
-
* firstName: "Morgan",
|
|
408
|
-
* lastName: "Lee",
|
|
409
|
-
* email: "morgan.lee@acme.com",
|
|
410
|
-
* phone: "+14155550176",
|
|
411
|
-
* dateOfBirth: "1985-09-02",
|
|
412
|
-
* address: {
|
|
413
|
-
* streetLine1: "128 Alamo Square",
|
|
414
|
-
* city: "San Francisco",
|
|
415
|
-
* subdivision: "CA",
|
|
416
|
-
* postalCode: "94117",
|
|
417
|
-
* country: "US"
|
|
418
|
-
* },
|
|
419
|
-
* ownershipPercentage: 60,
|
|
420
|
-
* title: "ceo",
|
|
421
|
-
* countryOfCitizenship: "US",
|
|
422
|
-
* employmentStatus: "employed"
|
|
423
|
-
* }]
|
|
424
|
-
* }
|
|
375
|
+
* value: "ops@acme.com"
|
|
425
376
|
* }],
|
|
426
377
|
* agents: [{
|
|
427
378
|
* agentId: "agt_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f",
|
package/dist/esm/api/resources/customers/client/requests/CreateInvitationsCustomersRequest.d.mts
CHANGED
|
@@ -4,56 +4,7 @@ import type * as Natural from "../../../../index.mjs";
|
|
|
4
4
|
* {
|
|
5
5
|
* recipients: [{
|
|
6
6
|
* type: "email",
|
|
7
|
-
* value: "ops@acme.com"
|
|
8
|
-
* accountType: "business",
|
|
9
|
-
* firstName: "Morgan",
|
|
10
|
-
* lastName: "Lee",
|
|
11
|
-
* phone: "+14155550176",
|
|
12
|
-
* business: {
|
|
13
|
-
* legalName: "Acme Logistics LLC",
|
|
14
|
-
* displayName: "Acme Logistics",
|
|
15
|
-
* website: "https://acmelogistics.com",
|
|
16
|
-
* hasTradeName: true,
|
|
17
|
-
* tradeName: "Acme Freight",
|
|
18
|
-
* businessType: "llc",
|
|
19
|
-
* industry: "513210",
|
|
20
|
-
* stateOfIncorporation: "DE",
|
|
21
|
-
* incorporationDate: "2018-03-12",
|
|
22
|
-
* registeredAddress: {
|
|
23
|
-
* streetLine1: "251 Little Falls Dr",
|
|
24
|
-
* city: "Wilmington",
|
|
25
|
-
* subdivision: "DE",
|
|
26
|
-
* postalCode: "19808",
|
|
27
|
-
* country: "US"
|
|
28
|
-
* },
|
|
29
|
-
* physicalAddress: {
|
|
30
|
-
* streetLine1: "900 Harrison St",
|
|
31
|
-
* city: "San Francisco",
|
|
32
|
-
* subdivision: "CA",
|
|
33
|
-
* postalCode: "94107",
|
|
34
|
-
* country: "US"
|
|
35
|
-
* },
|
|
36
|
-
* sourceOfFunds: ["business_revenue"],
|
|
37
|
-
* countriesOfOperations: ["US", "CA"],
|
|
38
|
-
* beneficialOwners: [{
|
|
39
|
-
* firstName: "Morgan",
|
|
40
|
-
* lastName: "Lee",
|
|
41
|
-
* email: "morgan.lee@acme.com",
|
|
42
|
-
* phone: "+14155550176",
|
|
43
|
-
* dateOfBirth: "1985-09-02",
|
|
44
|
-
* address: {
|
|
45
|
-
* streetLine1: "128 Alamo Square",
|
|
46
|
-
* city: "San Francisco",
|
|
47
|
-
* subdivision: "CA",
|
|
48
|
-
* postalCode: "94117",
|
|
49
|
-
* country: "US"
|
|
50
|
-
* },
|
|
51
|
-
* ownershipPercentage: 60,
|
|
52
|
-
* title: "ceo",
|
|
53
|
-
* countryOfCitizenship: "US",
|
|
54
|
-
* employmentStatus: "employed"
|
|
55
|
-
* }]
|
|
56
|
-
* }
|
|
7
|
+
* value: "ops@acme.com"
|
|
57
8
|
* }],
|
|
58
9
|
* agents: [{
|
|
59
10
|
* agentId: "agt_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f",
|
|
@@ -80,6 +31,6 @@ export interface CreateInvitationsCustomersRequest {
|
|
|
80
31
|
message?: string;
|
|
81
32
|
/** Tags applied to each invitation. */
|
|
82
33
|
tags?: Record<string, string>;
|
|
83
|
-
/**
|
|
34
|
+
/** Deprecated. Previously skipped our notification to the counterparty; Natural now always sends its own notifications and this field is accepted but ignored. The returned link is unaffected. */
|
|
84
35
|
disableNotifications?: Natural.CreateInvitationsCustomersRequestDisableNotificationsItem[];
|
|
85
36
|
}
|
|
@@ -14,6 +14,8 @@ export declare class ExternalAccountsClient {
|
|
|
14
14
|
protected readonly _options: NormalizedClientOptionsWithAuth<ExternalAccountsClient.Options>;
|
|
15
15
|
constructor(options?: ExternalAccountsClient.Options);
|
|
16
16
|
/**
|
|
17
|
+
* @deprecated
|
|
18
|
+
*
|
|
17
19
|
* Link or refresh a bank account using a Plaid processor token
|
|
18
20
|
*
|
|
19
21
|
* @param {Natural.CreateFromProcessorTokenExternalAccountsRequest} request
|
|
@@ -37,11 +39,11 @@ export declare class ExternalAccountsClient {
|
|
|
37
39
|
* @example
|
|
38
40
|
* await client.externalAccounts.createFromProcessorToken({
|
|
39
41
|
* idempotencyKey: "Idempotency-Key",
|
|
40
|
-
* partyId: "
|
|
42
|
+
* partyId: "pty_550e8400e29b41d4a716446655440000",
|
|
41
43
|
* processorToken: "processor-sandbox-abc123",
|
|
42
|
-
* institutionName: "
|
|
44
|
+
* institutionName: "Plaid Sandbox",
|
|
43
45
|
* tags: {
|
|
44
|
-
* "environment": "
|
|
46
|
+
* "environment": "sandbox"
|
|
45
47
|
* }
|
|
46
48
|
* })
|
|
47
49
|
*/
|
|
@@ -36,6 +36,8 @@ export class ExternalAccountsClient {
|
|
|
36
36
|
this._options = normalizeClientOptionsWithAuth(options);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
+
* @deprecated
|
|
40
|
+
*
|
|
39
41
|
* Link or refresh a bank account using a Plaid processor token
|
|
40
42
|
*
|
|
41
43
|
* @param {Natural.CreateFromProcessorTokenExternalAccountsRequest} request
|
|
@@ -59,11 +61,11 @@ export class ExternalAccountsClient {
|
|
|
59
61
|
* @example
|
|
60
62
|
* await client.externalAccounts.createFromProcessorToken({
|
|
61
63
|
* idempotencyKey: "Idempotency-Key",
|
|
62
|
-
* partyId: "
|
|
64
|
+
* partyId: "pty_550e8400e29b41d4a716446655440000",
|
|
63
65
|
* processorToken: "processor-sandbox-abc123",
|
|
64
|
-
* institutionName: "
|
|
66
|
+
* institutionName: "Plaid Sandbox",
|
|
65
67
|
* tags: {
|
|
66
|
-
* "environment": "
|
|
68
|
+
* "environment": "sandbox"
|
|
67
69
|
* }
|
|
68
70
|
* })
|
|
69
71
|
*/
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* @example
|
|
3
3
|
* {
|
|
4
4
|
* idempotencyKey: "Idempotency-Key",
|
|
5
|
-
* partyId: "
|
|
5
|
+
* partyId: "pty_550e8400e29b41d4a716446655440000",
|
|
6
6
|
* processorToken: "processor-sandbox-abc123",
|
|
7
|
-
* institutionName: "
|
|
7
|
+
* institutionName: "Plaid Sandbox",
|
|
8
8
|
* tags: {
|
|
9
|
-
* "environment": "
|
|
9
|
+
* "environment": "sandbox"
|
|
10
10
|
* }
|
|
11
11
|
* }
|
|
12
12
|
*/
|
|
@@ -63,8 +63,9 @@ export class ExternalPartiesClient {
|
|
|
63
63
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
64
64
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
65
65
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
66
|
-
const { limit, cursor } = request;
|
|
66
|
+
const { customerPartyId, limit, cursor } = request;
|
|
67
67
|
const _queryParams = {
|
|
68
|
+
customerPartyId,
|
|
68
69
|
limit,
|
|
69
70
|
cursor,
|
|
70
71
|
};
|
|
@@ -298,7 +299,10 @@ export class ExternalPartiesClient {
|
|
|
298
299
|
__get(request, requestOptions) {
|
|
299
300
|
return __awaiter(this, void 0, void 0, function* () {
|
|
300
301
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
301
|
-
const { externalPartyId } = request;
|
|
302
|
+
const { externalPartyId, customerPartyId } = request;
|
|
303
|
+
const _queryParams = {
|
|
304
|
+
customerPartyId,
|
|
305
|
+
};
|
|
302
306
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
303
307
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
304
308
|
"X-Agent-ID": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.agentId,
|
|
@@ -308,7 +312,11 @@ export class ExternalPartiesClient {
|
|
|
308
312
|
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.NaturalEnvironment.Production, `external-parties/${core.url.encodePathParam(externalPartyId)}`),
|
|
309
313
|
method: "GET",
|
|
310
314
|
headers: _headers,
|
|
311
|
-
queryString: core.url
|
|
315
|
+
queryString: core.url
|
|
316
|
+
.queryBuilder()
|
|
317
|
+
.addMany(_queryParams)
|
|
318
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
319
|
+
.build(),
|
|
312
320
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
313
321
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
314
322
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -19,6 +19,8 @@ import type * as Natural from "../../../../index.mjs";
|
|
|
19
19
|
export interface NewExtPartyParams {
|
|
20
20
|
/** Unique key for safely retrying a request without creating duplicates. */
|
|
21
21
|
idempotencyKey: string;
|
|
22
|
+
/** Customer party ID (pty_*). Omit to create for your own party; provide for delegated creation. */
|
|
23
|
+
customerPartyId?: string;
|
|
22
24
|
/** External party type. */
|
|
23
25
|
kind: Natural.NewExtPartyParamsKind;
|
|
24
26
|
/** External party name. */
|
|
@@ -65,9 +65,10 @@ export class ExternalPartyAccountsClient {
|
|
|
65
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
66
|
const list = core.HttpResponsePromise.interceptFunction((request) => __awaiter(this, void 0, void 0, function* () {
|
|
67
67
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
68
|
-
const { externalPartyId, limit, cursor } = request;
|
|
68
|
+
const { externalPartyId, customerPartyId, limit, cursor } = request;
|
|
69
69
|
const _queryParams = {
|
|
70
70
|
externalPartyId,
|
|
71
|
+
customerPartyId,
|
|
71
72
|
limit,
|
|
72
73
|
cursor,
|
|
73
74
|
};
|
|
@@ -298,7 +299,10 @@ export class ExternalPartyAccountsClient {
|
|
|
298
299
|
__get(request, requestOptions) {
|
|
299
300
|
return __awaiter(this, void 0, void 0, function* () {
|
|
300
301
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
301
|
-
const { externalPartyAccountId } = request;
|
|
302
|
+
const { externalPartyAccountId, customerPartyId } = request;
|
|
303
|
+
const _queryParams = {
|
|
304
|
+
customerPartyId,
|
|
305
|
+
};
|
|
302
306
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
303
307
|
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({
|
|
304
308
|
"X-Agent-ID": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.agentId) !== null && _b !== void 0 ? _b : (_c = this._options) === null || _c === void 0 ? void 0 : _c.agentId,
|
|
@@ -308,7 +312,11 @@ export class ExternalPartyAccountsClient {
|
|
|
308
312
|
url: core.url.join((_h = (_g = (yield core.Supplier.get(this._options.baseUrl))) !== null && _g !== void 0 ? _g : (yield core.Supplier.get(this._options.environment))) !== null && _h !== void 0 ? _h : environments.NaturalEnvironment.Production, `external-party-accounts/${core.url.encodePathParam(externalPartyAccountId)}`),
|
|
309
313
|
method: "GET",
|
|
310
314
|
headers: _headers,
|
|
311
|
-
queryString: core.url
|
|
315
|
+
queryString: core.url
|
|
316
|
+
.queryBuilder()
|
|
317
|
+
.addMany(_queryParams)
|
|
318
|
+
.mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
|
|
319
|
+
.build(),
|
|
312
320
|
timeoutMs: ((_l = (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.timeoutInSeconds) !== null && _l !== void 0 ? _l : 60) * 1000,
|
|
313
321
|
maxRetries: (_m = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _m !== void 0 ? _m : (_o = this._options) === null || _o === void 0 ? void 0 : _o.maxRetries,
|
|
314
322
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
package/dist/esm/api/resources/externalPartyAccounts/client/requests/NewExtPartyAcctParams.d.mts
CHANGED
|
@@ -16,6 +16,8 @@ import type * as Natural from "../../../../index.mjs";
|
|
|
16
16
|
export interface NewExtPartyAcctParams {
|
|
17
17
|
/** Unique key for safely retrying a request without creating duplicates. */
|
|
18
18
|
idempotencyKey: string;
|
|
19
|
+
/** Customer party ID (pty_*). Omit to create for your own party; provide for delegated creation. */
|
|
20
|
+
customerPartyId?: string;
|
|
19
21
|
/** External party ID (epty_*). */
|
|
20
22
|
externalPartyId: string;
|
|
21
23
|
accountDetails: Natural.NewUsBankAccountDetails;
|
|
@@ -34,6 +34,6 @@ export interface NewPayReqParams {
|
|
|
34
34
|
payerName?: string;
|
|
35
35
|
/** Who pays: exactly one typed email, phone, party ID, agent ID, or handle value. */
|
|
36
36
|
payer: Natural.CreatePaymentRequestsRequestPayer;
|
|
37
|
-
/**
|
|
37
|
+
/** Deprecated. Previously skipped our notification to the counterparty; Natural now always sends its own notifications and this field is accepted but ignored. The returned link is unaffected. */
|
|
38
38
|
disableNotifications?: Natural.CreatePaymentRequestsRequestDisableNotificationsItem[];
|
|
39
39
|
}
|
|
@@ -32,6 +32,6 @@ export interface NewPaymentParams {
|
|
|
32
32
|
tags?: Record<string, string>;
|
|
33
33
|
/** Source wallet ID (wal_*). Omit to pay from the sender party's default wallet. */
|
|
34
34
|
walletId?: string;
|
|
35
|
-
/**
|
|
35
|
+
/** Deprecated. Previously skipped our notification to the counterparty; Natural now always sends its own notifications and this field is accepted but ignored. The returned link is unaffected. */
|
|
36
36
|
disableNotifications?: Natural.CreatePaymentsRequestDisableNotificationsItem[];
|
|
37
37
|
}
|
|
@@ -4,6 +4,7 @@ import type * as serializers from "../../../../index.mjs";
|
|
|
4
4
|
export declare const CancelAchParams: core.serialization.Schema<serializers.CancelAchParams.Raw, Omit<Natural.CancelAchParams, "achId" | "idempotencyKey">>;
|
|
5
5
|
export declare namespace CancelAchParams {
|
|
6
6
|
interface Raw {
|
|
7
|
+
customerPartyId?: string | null;
|
|
7
8
|
reason: string;
|
|
8
9
|
}
|
|
9
10
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
import * as core from "../../../../../core/index.mjs";
|
|
3
3
|
export const CancelAchParams = core.serialization.object({
|
|
4
|
+
customerPartyId: core.serialization.string().optional(),
|
|
4
5
|
reason: core.serialization.string(),
|
|
5
6
|
});
|
|
@@ -6,6 +6,7 @@ import { NewAchParamsDirection } from "../../types/NewAchParamsDirection.mjs";
|
|
|
6
6
|
export declare const NewAchParams: core.serialization.Schema<serializers.NewAchParams.Raw, Omit<Natural.NewAchParams, "idempotencyKey">>;
|
|
7
7
|
export declare namespace NewAchParams {
|
|
8
8
|
interface Raw {
|
|
9
|
+
customerPartyId?: string | null;
|
|
9
10
|
direction: NewAchParamsDirection.Raw;
|
|
10
11
|
amount: number;
|
|
11
12
|
currency?: NewAchParamsCurrency.Raw | null;
|
|
@@ -3,6 +3,7 @@ import * as core from "../../../../../core/index.mjs";
|
|
|
3
3
|
import { NewAchParamsCurrency } from "../../types/NewAchParamsCurrency.mjs";
|
|
4
4
|
import { NewAchParamsDirection } from "../../types/NewAchParamsDirection.mjs";
|
|
5
5
|
export const NewAchParams = core.serialization.object({
|
|
6
|
+
customerPartyId: core.serialization.string().optional(),
|
|
6
7
|
direction: NewAchParamsDirection,
|
|
7
8
|
amount: core.serialization.number(),
|
|
8
9
|
currency: NewAchParamsCurrency.optional(),
|
package/dist/esm/serialization/resources/externalParties/client/requests/NewExtPartyParams.d.mts
CHANGED
|
@@ -6,6 +6,7 @@ import { NewExtPartyParamsKind } from "../../types/NewExtPartyParamsKind.mjs";
|
|
|
6
6
|
export declare const NewExtPartyParams: core.serialization.Schema<serializers.NewExtPartyParams.Raw, Omit<Natural.NewExtPartyParams, "idempotencyKey">>;
|
|
7
7
|
export declare namespace NewExtPartyParams {
|
|
8
8
|
interface Raw {
|
|
9
|
+
customerPartyId?: string | null;
|
|
9
10
|
kind: NewExtPartyParamsKind.Raw;
|
|
10
11
|
name: string;
|
|
11
12
|
email?: string | null;
|
package/dist/esm/serialization/resources/externalParties/client/requests/NewExtPartyParams.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import * as core from "../../../../../core/index.mjs";
|
|
|
3
3
|
import { NewExtPartyParamsAddress } from "../../types/NewExtPartyParamsAddress.mjs";
|
|
4
4
|
import { NewExtPartyParamsKind } from "../../types/NewExtPartyParamsKind.mjs";
|
|
5
5
|
export const NewExtPartyParams = core.serialization.object({
|
|
6
|
+
customerPartyId: core.serialization.string().optional(),
|
|
6
7
|
kind: NewExtPartyParamsKind,
|
|
7
8
|
name: core.serialization.string(),
|
|
8
9
|
email: core.serialization.string().optional(),
|
|
@@ -5,6 +5,7 @@ import { NewUsBankAccountDetails } from "../../types/NewUsBankAccountDetails.mjs
|
|
|
5
5
|
export declare const NewExtPartyAcctParams: core.serialization.Schema<serializers.NewExtPartyAcctParams.Raw, Omit<Natural.NewExtPartyAcctParams, "idempotencyKey">>;
|
|
6
6
|
export declare namespace NewExtPartyAcctParams {
|
|
7
7
|
interface Raw {
|
|
8
|
+
customerPartyId?: string | null;
|
|
8
9
|
externalPartyId: string;
|
|
9
10
|
accountDetails: NewUsBankAccountDetails.Raw;
|
|
10
11
|
institutionName?: (string | null | undefined) | null;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import * as core from "../../../../../core/index.mjs";
|
|
3
3
|
import { NewUsBankAccountDetails } from "../../types/NewUsBankAccountDetails.mjs";
|
|
4
4
|
export const NewExtPartyAcctParams = core.serialization.object({
|
|
5
|
+
customerPartyId: core.serialization.string().optional(),
|
|
5
6
|
externalPartyId: core.serialization.string(),
|
|
6
7
|
accountDetails: NewUsBankAccountDetails,
|
|
7
8
|
institutionName: core.serialization.string().optionalNullable(),
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.6.1";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.6.1";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -917,56 +917,7 @@ Invite specific customers by email or phone to approve a set of your agents, eac
|
|
|
917
917
|
await client.customers.createInvitations({
|
|
918
918
|
recipients: [{
|
|
919
919
|
type: "email",
|
|
920
|
-
value: "ops@acme.com"
|
|
921
|
-
accountType: "business",
|
|
922
|
-
firstName: "Morgan",
|
|
923
|
-
lastName: "Lee",
|
|
924
|
-
phone: "+14155550176",
|
|
925
|
-
business: {
|
|
926
|
-
legalName: "Acme Logistics LLC",
|
|
927
|
-
displayName: "Acme Logistics",
|
|
928
|
-
website: "https://acmelogistics.com",
|
|
929
|
-
hasTradeName: true,
|
|
930
|
-
tradeName: "Acme Freight",
|
|
931
|
-
businessType: "llc",
|
|
932
|
-
industry: "513210",
|
|
933
|
-
stateOfIncorporation: "DE",
|
|
934
|
-
incorporationDate: "2018-03-12",
|
|
935
|
-
registeredAddress: {
|
|
936
|
-
streetLine1: "251 Little Falls Dr",
|
|
937
|
-
city: "Wilmington",
|
|
938
|
-
subdivision: "DE",
|
|
939
|
-
postalCode: "19808",
|
|
940
|
-
country: "US"
|
|
941
|
-
},
|
|
942
|
-
physicalAddress: {
|
|
943
|
-
streetLine1: "900 Harrison St",
|
|
944
|
-
city: "San Francisco",
|
|
945
|
-
subdivision: "CA",
|
|
946
|
-
postalCode: "94107",
|
|
947
|
-
country: "US"
|
|
948
|
-
},
|
|
949
|
-
sourceOfFunds: ["business_revenue"],
|
|
950
|
-
countriesOfOperations: ["US", "CA"],
|
|
951
|
-
beneficialOwners: [{
|
|
952
|
-
firstName: "Morgan",
|
|
953
|
-
lastName: "Lee",
|
|
954
|
-
email: "morgan.lee@acme.com",
|
|
955
|
-
phone: "+14155550176",
|
|
956
|
-
dateOfBirth: "1985-09-02",
|
|
957
|
-
address: {
|
|
958
|
-
streetLine1: "128 Alamo Square",
|
|
959
|
-
city: "San Francisco",
|
|
960
|
-
subdivision: "CA",
|
|
961
|
-
postalCode: "94117",
|
|
962
|
-
country: "US"
|
|
963
|
-
},
|
|
964
|
-
ownershipPercentage: 60,
|
|
965
|
-
title: "ceo",
|
|
966
|
-
countryOfCitizenship: "US",
|
|
967
|
-
employmentStatus: "employed"
|
|
968
|
-
}]
|
|
969
|
-
}
|
|
920
|
+
value: "ops@acme.com"
|
|
970
921
|
}],
|
|
971
922
|
agents: [{
|
|
972
923
|
agentId: "agt_3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f",
|
|
@@ -4492,11 +4443,11 @@ Link or refresh a bank account using a Plaid processor token
|
|
|
4492
4443
|
```typescript
|
|
4493
4444
|
await client.externalAccounts.createFromProcessorToken({
|
|
4494
4445
|
idempotencyKey: "Idempotency-Key",
|
|
4495
|
-
partyId: "
|
|
4446
|
+
partyId: "pty_550e8400e29b41d4a716446655440000",
|
|
4496
4447
|
processorToken: "processor-sandbox-abc123",
|
|
4497
|
-
institutionName: "
|
|
4448
|
+
institutionName: "Plaid Sandbox",
|
|
4498
4449
|
tags: {
|
|
4499
|
-
"environment": "
|
|
4450
|
+
"environment": "sandbox"
|
|
4500
4451
|
}
|
|
4501
4452
|
});
|
|
4502
4453
|
|