@augustusbank/typescript-sdk 0.22.1 → 0.22.2
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/CHANGELOG.md +12 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/quotes/index.d.mts +1 -1
- package/resources/quotes/index.d.mts.map +1 -1
- package/resources/quotes/index.d.ts +1 -1
- package/resources/quotes/index.d.ts.map +1 -1
- package/resources/quotes/index.js.map +1 -1
- package/resources/quotes/index.mjs.map +1 -1
- package/resources/quotes/quotes.d.mts +0 -57
- package/resources/quotes/quotes.d.mts.map +1 -1
- package/resources/quotes/quotes.d.ts +0 -57
- package/resources/quotes/quotes.d.ts.map +1 -1
- package/resources/quotes/quotes.js +0 -7
- package/resources/quotes/quotes.js.map +1 -1
- package/resources/quotes/quotes.mjs +0 -7
- package/resources/quotes/quotes.mjs.map +1 -1
- package/resources/simulations/account-programs.d.mts +5 -0
- package/resources/simulations/account-programs.d.mts.map +1 -1
- package/resources/simulations/account-programs.d.ts +5 -0
- package/resources/simulations/account-programs.d.ts.map +1 -1
- package/resources/simulations/account-programs.js +1 -0
- package/resources/simulations/account-programs.js.map +1 -1
- package/resources/simulations/account-programs.mjs +1 -0
- package/resources/simulations/account-programs.mjs.map +1 -1
- package/resources/simulations/accounts.d.mts +7 -2
- package/resources/simulations/accounts.d.mts.map +1 -1
- package/resources/simulations/accounts.d.ts +7 -2
- package/resources/simulations/accounts.d.ts.map +1 -1
- package/resources/simulations/accounts.js +3 -2
- package/resources/simulations/accounts.js.map +1 -1
- package/resources/simulations/accounts.mjs +3 -2
- package/resources/simulations/accounts.mjs.map +1 -1
- package/resources/simulations/index.d.mts +2 -1
- package/resources/simulations/index.d.mts.map +1 -1
- package/resources/simulations/index.d.ts +2 -1
- package/resources/simulations/index.d.ts.map +1 -1
- package/resources/simulations/index.js +3 -1
- package/resources/simulations/index.js.map +1 -1
- package/resources/simulations/index.mjs +1 -0
- package/resources/simulations/index.mjs.map +1 -1
- package/resources/simulations/payouts.d.mts +31 -1
- package/resources/simulations/payouts.d.mts.map +1 -1
- package/resources/simulations/payouts.d.ts +31 -1
- package/resources/simulations/payouts.d.ts.map +1 -1
- package/resources/simulations/payouts.js +16 -0
- package/resources/simulations/payouts.js.map +1 -1
- package/resources/simulations/payouts.mjs +16 -0
- package/resources/simulations/payouts.mjs.map +1 -1
- package/resources/simulations/returns.d.mts +92 -0
- package/resources/simulations/returns.d.mts.map +1 -0
- package/resources/simulations/returns.d.ts +92 -0
- package/resources/simulations/returns.d.ts.map +1 -0
- package/resources/simulations/returns.js +55 -0
- package/resources/simulations/returns.js.map +1 -0
- package/resources/simulations/returns.mjs +51 -0
- package/resources/simulations/returns.mjs.map +1 -0
- package/resources/simulations/simulations.d.mts +6 -2
- package/resources/simulations/simulations.d.mts.map +1 -1
- package/resources/simulations/simulations.d.ts +6 -2
- package/resources/simulations/simulations.d.ts.map +1 -1
- package/resources/simulations/simulations.js +4 -0
- package/resources/simulations/simulations.js.map +1 -1
- package/resources/simulations/simulations.mjs +5 -1
- package/resources/simulations/simulations.mjs.map +1 -1
- package/src/client.ts +2 -2
- package/src/resources/index.ts +1 -1
- package/src/resources/quotes/index.ts +1 -1
- package/src/resources/quotes/quotes.ts +0 -84
- package/src/resources/simulations/account-programs.ts +6 -0
- package/src/resources/simulations/accounts.ts +8 -2
- package/src/resources/simulations/index.ts +10 -0
- package/src/resources/simulations/payouts.ts +43 -0
- package/src/resources/simulations/returns.ts +123 -0
- package/src/resources/simulations/simulations.ts +30 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -7,13 +7,14 @@ import { path } from '../../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class Accounts extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Creates a Mock-US USD
|
|
11
|
-
*
|
|
10
|
+
* Creates a Mock-US USD account owned by the caller merchant. This endpoint is
|
|
11
|
+
* unavailable in live production.
|
|
12
12
|
*
|
|
13
13
|
* @example
|
|
14
14
|
* ```ts
|
|
15
15
|
* const account = await client.simulations.accounts.create({
|
|
16
16
|
* label: 'x',
|
|
17
|
+
* type: 'operating',
|
|
17
18
|
* });
|
|
18
19
|
* ```
|
|
19
20
|
*/
|
|
@@ -163,6 +164,11 @@ export interface AccountCreateParams {
|
|
|
163
164
|
* Human-readable label for the operating account.
|
|
164
165
|
*/
|
|
165
166
|
label: string;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Account type.
|
|
170
|
+
*/
|
|
171
|
+
type: 'operating';
|
|
166
172
|
}
|
|
167
173
|
|
|
168
174
|
export interface AccountCloseParams {
|
|
@@ -27,7 +27,17 @@ export { Deposits, type DepositCreateResponse, type DepositCreateParams } from '
|
|
|
27
27
|
export {
|
|
28
28
|
Payouts,
|
|
29
29
|
type PayoutRejectResponse,
|
|
30
|
+
type PayoutReturnResponse,
|
|
30
31
|
type PayoutSendResponse,
|
|
31
32
|
type PayoutRejectParams,
|
|
33
|
+
type PayoutReturnParams,
|
|
32
34
|
} from './payouts';
|
|
35
|
+
export {
|
|
36
|
+
Returns,
|
|
37
|
+
type ReturnRejectResponse,
|
|
38
|
+
type ReturnReturnResponse,
|
|
39
|
+
type ReturnSendResponse,
|
|
40
|
+
type ReturnRejectParams,
|
|
41
|
+
type ReturnReturnParams,
|
|
42
|
+
} from './returns';
|
|
33
43
|
export { Simulations } from './simulations';
|
|
@@ -22,6 +22,23 @@ export class Payouts extends APIResource {
|
|
|
22
22
|
return this._client.post(path`/v1/simulations/payouts/${id}/reject`, { body, ...options });
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Submits an inbound return for a settled payout through the sandbox provider
|
|
27
|
+
* pipeline. The return is linked to the payout and the payout is exposed as
|
|
28
|
+
* returned. This endpoint is unavailable in live production.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const response = await client.simulations.payouts.return(
|
|
33
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
34
|
+
* { reason: 'account_closed' },
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
return(id: string, body: PayoutReturnParams, options?: RequestOptions): APIPromise<PayoutReturnResponse> {
|
|
39
|
+
return this._client.post(path`/v1/simulations/payouts/${id}/return`, { body, ...options });
|
|
40
|
+
}
|
|
41
|
+
|
|
25
42
|
/**
|
|
26
43
|
* Submits a successful send event for an existing payout through the sandbox
|
|
27
44
|
* provider pipeline. This endpoint is unavailable in live production.
|
|
@@ -50,6 +67,18 @@ export interface PayoutRejectResponse {
|
|
|
50
67
|
type: 'payout_simulation';
|
|
51
68
|
}
|
|
52
69
|
|
|
70
|
+
export interface PayoutReturnResponse {
|
|
71
|
+
/**
|
|
72
|
+
* Payout whose lifecycle is being simulated.
|
|
73
|
+
*/
|
|
74
|
+
payout_id: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Resource type discriminator.
|
|
78
|
+
*/
|
|
79
|
+
type: 'payout_simulation';
|
|
80
|
+
}
|
|
81
|
+
|
|
53
82
|
export interface PayoutSendResponse {
|
|
54
83
|
/**
|
|
55
84
|
* Payout whose lifecycle is being simulated.
|
|
@@ -71,10 +100,24 @@ export interface PayoutRejectParams {
|
|
|
71
100
|
reason: 'invalid_routing_number' | 'invalid_account_format';
|
|
72
101
|
}
|
|
73
102
|
|
|
103
|
+
export interface PayoutReturnParams {
|
|
104
|
+
/**
|
|
105
|
+
* Reason the receiving bank returns the settled payout.
|
|
106
|
+
*/
|
|
107
|
+
reason:
|
|
108
|
+
| 'account_closed'
|
|
109
|
+
| 'invalid_account_format'
|
|
110
|
+
| 'invalid_routing_number'
|
|
111
|
+
| 'account_blocked'
|
|
112
|
+
| 'unknown';
|
|
113
|
+
}
|
|
114
|
+
|
|
74
115
|
export declare namespace Payouts {
|
|
75
116
|
export {
|
|
76
117
|
type PayoutRejectResponse as PayoutRejectResponse,
|
|
118
|
+
type PayoutReturnResponse as PayoutReturnResponse,
|
|
77
119
|
type PayoutSendResponse as PayoutSendResponse,
|
|
78
120
|
type PayoutRejectParams as PayoutRejectParams,
|
|
121
|
+
type PayoutReturnParams as PayoutReturnParams,
|
|
79
122
|
};
|
|
80
123
|
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../internal/request-options';
|
|
6
|
+
import { path } from '../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Returns extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Submits a network rejection for an existing return through the sandbox provider
|
|
11
|
+
* pipeline. This endpoint is unavailable in live production.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const response = await client.simulations.returns.reject(
|
|
16
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
17
|
+
* { reason: 'invalid_routing_number' },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
reject(id: string, body: ReturnRejectParams, options?: RequestOptions): APIPromise<ReturnRejectResponse> {
|
|
22
|
+
return this._client.post(path`/v1/simulations/returns/${id}/reject`, { body, ...options });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Submits an inbound return for a sent return through the sandbox provider
|
|
27
|
+
* pipeline. The funds are credited back to the original deposit and the return
|
|
28
|
+
* moves to `returned`. This endpoint is unavailable in live production.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```ts
|
|
32
|
+
* const response = await client.simulations.returns.return(
|
|
33
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
34
|
+
* { reason: 'account_closed' },
|
|
35
|
+
* );
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
return(id: string, body: ReturnReturnParams, options?: RequestOptions): APIPromise<ReturnReturnResponse> {
|
|
39
|
+
return this._client.post(path`/v1/simulations/returns/${id}/return`, { body, ...options });
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Submits a successful send event for an existing return through the sandbox
|
|
44
|
+
* provider pipeline. This endpoint is unavailable in live production.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const response = await client.simulations.returns.send(
|
|
49
|
+
* '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
|
|
50
|
+
* );
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
send(id: string, options?: RequestOptions): APIPromise<ReturnSendResponse> {
|
|
54
|
+
return this._client.post(path`/v1/simulations/returns/${id}/send`, options);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ReturnRejectResponse {
|
|
59
|
+
/**
|
|
60
|
+
* Return whose lifecycle is being simulated.
|
|
61
|
+
*/
|
|
62
|
+
return_id: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Resource type discriminator.
|
|
66
|
+
*/
|
|
67
|
+
type: 'return_simulation';
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface ReturnReturnResponse {
|
|
71
|
+
/**
|
|
72
|
+
* Return whose lifecycle is being simulated.
|
|
73
|
+
*/
|
|
74
|
+
return_id: string;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Resource type discriminator.
|
|
78
|
+
*/
|
|
79
|
+
type: 'return_simulation';
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface ReturnSendResponse {
|
|
83
|
+
/**
|
|
84
|
+
* Return whose lifecycle is being simulated.
|
|
85
|
+
*/
|
|
86
|
+
return_id: string;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Resource type discriminator.
|
|
90
|
+
*/
|
|
91
|
+
type: 'return_simulation';
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface ReturnRejectParams {
|
|
95
|
+
/**
|
|
96
|
+
* Reason the sandbox provider rejects the return. Use `invalid_routing_number` for
|
|
97
|
+
* domestic rails and `invalid_account_format` for a SWIFT correspondent rejecting
|
|
98
|
+
* on the beneficiary details.
|
|
99
|
+
*/
|
|
100
|
+
reason: 'invalid_routing_number' | 'invalid_account_format';
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface ReturnReturnParams {
|
|
104
|
+
/**
|
|
105
|
+
* Reason the receiving bank returns the sent return.
|
|
106
|
+
*/
|
|
107
|
+
reason:
|
|
108
|
+
| 'account_closed'
|
|
109
|
+
| 'invalid_account_format'
|
|
110
|
+
| 'invalid_routing_number'
|
|
111
|
+
| 'account_blocked'
|
|
112
|
+
| 'unknown';
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export declare namespace Returns {
|
|
116
|
+
export {
|
|
117
|
+
type ReturnRejectResponse as ReturnRejectResponse,
|
|
118
|
+
type ReturnReturnResponse as ReturnReturnResponse,
|
|
119
|
+
type ReturnSendResponse as ReturnSendResponse,
|
|
120
|
+
type ReturnRejectParams as ReturnRejectParams,
|
|
121
|
+
type ReturnReturnParams as ReturnReturnParams,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
@@ -30,12 +30,29 @@ import { ConversionCompleteResponse, ConversionFailResponse, Conversions } from
|
|
|
30
30
|
import * as DepositsAPI from './deposits';
|
|
31
31
|
import { DepositCreateParams, DepositCreateResponse, Deposits } from './deposits';
|
|
32
32
|
import * as PayoutsAPI from './payouts';
|
|
33
|
-
import {
|
|
33
|
+
import {
|
|
34
|
+
PayoutRejectParams,
|
|
35
|
+
PayoutRejectResponse,
|
|
36
|
+
PayoutReturnParams,
|
|
37
|
+
PayoutReturnResponse,
|
|
38
|
+
PayoutSendResponse,
|
|
39
|
+
Payouts,
|
|
40
|
+
} from './payouts';
|
|
41
|
+
import * as ReturnsAPI from './returns';
|
|
42
|
+
import {
|
|
43
|
+
ReturnRejectParams,
|
|
44
|
+
ReturnRejectResponse,
|
|
45
|
+
ReturnReturnParams,
|
|
46
|
+
ReturnReturnResponse,
|
|
47
|
+
ReturnSendResponse,
|
|
48
|
+
Returns,
|
|
49
|
+
} from './returns';
|
|
34
50
|
|
|
35
51
|
export class Simulations extends APIResource {
|
|
36
52
|
deposits: DepositsAPI.Deposits = new DepositsAPI.Deposits(this._client);
|
|
37
53
|
conversions: ConversionsAPI.Conversions = new ConversionsAPI.Conversions(this._client);
|
|
38
54
|
payouts: PayoutsAPI.Payouts = new PayoutsAPI.Payouts(this._client);
|
|
55
|
+
returns: ReturnsAPI.Returns = new ReturnsAPI.Returns(this._client);
|
|
39
56
|
accountPrograms: AccountProgramsAPI.AccountPrograms = new AccountProgramsAPI.AccountPrograms(this._client);
|
|
40
57
|
accounts: AccountsAPI.Accounts = new AccountsAPI.Accounts(this._client);
|
|
41
58
|
}
|
|
@@ -43,6 +60,7 @@ export class Simulations extends APIResource {
|
|
|
43
60
|
Simulations.Deposits = Deposits;
|
|
44
61
|
Simulations.Conversions = Conversions;
|
|
45
62
|
Simulations.Payouts = Payouts;
|
|
63
|
+
Simulations.Returns = Returns;
|
|
46
64
|
Simulations.AccountPrograms = AccountPrograms;
|
|
47
65
|
Simulations.Accounts = Accounts;
|
|
48
66
|
|
|
@@ -62,8 +80,19 @@ export declare namespace Simulations {
|
|
|
62
80
|
export {
|
|
63
81
|
Payouts as Payouts,
|
|
64
82
|
type PayoutRejectResponse as PayoutRejectResponse,
|
|
83
|
+
type PayoutReturnResponse as PayoutReturnResponse,
|
|
65
84
|
type PayoutSendResponse as PayoutSendResponse,
|
|
66
85
|
type PayoutRejectParams as PayoutRejectParams,
|
|
86
|
+
type PayoutReturnParams as PayoutReturnParams,
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export {
|
|
90
|
+
Returns as Returns,
|
|
91
|
+
type ReturnRejectResponse as ReturnRejectResponse,
|
|
92
|
+
type ReturnReturnResponse as ReturnReturnResponse,
|
|
93
|
+
type ReturnSendResponse as ReturnSendResponse,
|
|
94
|
+
type ReturnRejectParams as ReturnRejectParams,
|
|
95
|
+
type ReturnReturnParams as ReturnReturnParams,
|
|
67
96
|
};
|
|
68
97
|
|
|
69
98
|
export {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.22.
|
|
1
|
+
export const VERSION = '0.22.2'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.22.
|
|
1
|
+
export declare const VERSION = "0.22.2";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.22.
|
|
1
|
+
export declare const VERSION = "0.22.2";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.22.
|
|
1
|
+
export const VERSION = '0.22.2'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|