@beach-depository/sdk 0.0.2 → 0.0.3
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/api/resources/transfers/client/Client.d.ts +14 -0
- package/dist/cjs/api/resources/transfers/client/Client.js +45 -0
- package/dist/cjs/api/resources/transfers/client/requests/ConfirmTransfersRequest.d.ts +9 -0
- package/dist/cjs/api/resources/transfers/client/requests/ConfirmTransfersRequest.js +3 -0
- package/dist/cjs/api/resources/transfers/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/transfers/types/ConfirmTransfersResponse.d.ts +34 -0
- package/dist/cjs/api/resources/transfers/types/ConfirmTransfersResponse.js +21 -0
- package/dist/cjs/api/resources/transfers/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/transfers/types/index.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/api/resources/transfers/client/Client.d.mts +14 -0
- package/dist/esm/api/resources/transfers/client/Client.mjs +45 -0
- package/dist/esm/api/resources/transfers/client/requests/ConfirmTransfersRequest.d.mts +9 -0
- package/dist/esm/api/resources/transfers/client/requests/ConfirmTransfersRequest.mjs +2 -0
- package/dist/esm/api/resources/transfers/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/transfers/types/ConfirmTransfersResponse.d.mts +34 -0
- package/dist/esm/api/resources/transfers/types/ConfirmTransfersResponse.mjs +18 -0
- package/dist/esm/api/resources/transfers/types/index.d.mts +1 -0
- package/dist/esm/api/resources/transfers/types/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -57,6 +57,20 @@ export declare class TransfersClient {
|
|
|
57
57
|
*/
|
|
58
58
|
get(request: BeachApi.GetTransfersRequest, requestOptions?: TransfersClient.RequestOptions): core.HttpResponsePromise<BeachApi.GetTransfersResponse>;
|
|
59
59
|
private __get;
|
|
60
|
+
/**
|
|
61
|
+
* @param {BeachApi.ConfirmTransfersRequest} request
|
|
62
|
+
* @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link errors.BeachApiError}
|
|
65
|
+
* @throws {@link errors.BeachApiTimeoutError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.transfers.confirm({
|
|
69
|
+
* id: "id"
|
|
70
|
+
* })
|
|
71
|
+
*/
|
|
72
|
+
confirm(request: BeachApi.ConfirmTransfersRequest, requestOptions?: TransfersClient.RequestOptions): core.HttpResponsePromise<BeachApi.ConfirmTransfersResponse>;
|
|
73
|
+
private __confirm;
|
|
60
74
|
/**
|
|
61
75
|
* @param {BeachApi.CancelTransfersRequest} request
|
|
62
76
|
* @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -215,6 +215,51 @@ class TransfersClient {
|
|
|
215
215
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/transfers/{id}");
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
|
+
/**
|
|
219
|
+
* @param {BeachApi.ConfirmTransfersRequest} request
|
|
220
|
+
* @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
221
|
+
*
|
|
222
|
+
* @throws {@link errors.BeachApiError}
|
|
223
|
+
* @throws {@link errors.BeachApiTimeoutError}
|
|
224
|
+
*
|
|
225
|
+
* @example
|
|
226
|
+
* await client.transfers.confirm({
|
|
227
|
+
* id: "id"
|
|
228
|
+
* })
|
|
229
|
+
*/
|
|
230
|
+
confirm(request, requestOptions) {
|
|
231
|
+
return core.HttpResponsePromise.fromPromise(this.__confirm(request, requestOptions));
|
|
232
|
+
}
|
|
233
|
+
__confirm(request, requestOptions) {
|
|
234
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
235
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
236
|
+
const { id } = request;
|
|
237
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
238
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
239
|
+
const _response = yield core.fetcher({
|
|
240
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BeachApiEnvironment.Sandbox, `v1/transfers/${core.url.encodePathParam(id)}/confirm`),
|
|
241
|
+
method: "POST",
|
|
242
|
+
headers: _headers,
|
|
243
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
244
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
245
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
246
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
247
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
248
|
+
logging: this._options.logging,
|
|
249
|
+
});
|
|
250
|
+
if (_response.ok) {
|
|
251
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
252
|
+
}
|
|
253
|
+
if (_response.error.reason === "status-code") {
|
|
254
|
+
throw new errors.BeachApiError({
|
|
255
|
+
statusCode: _response.error.statusCode,
|
|
256
|
+
body: _response.error.body,
|
|
257
|
+
rawResponse: _response.rawResponse,
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/transfers/{id}/confirm");
|
|
261
|
+
});
|
|
262
|
+
}
|
|
218
263
|
/**
|
|
219
264
|
* @param {BeachApi.CancelTransfersRequest} request
|
|
220
265
|
* @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { CancelTransfersRequest } from "./CancelTransfersRequest.js";
|
|
2
|
+
export type { ConfirmTransfersRequest } from "./ConfirmTransfersRequest.js";
|
|
2
3
|
export { CreateTransfersRequest } from "./CreateTransfersRequest.js";
|
|
3
4
|
export type { GetTransfersRequest } from "./GetTransfersRequest.js";
|
|
4
5
|
export type { ListTransfersRequest } from "./ListTransfersRequest.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface ConfirmTransfersResponse {
|
|
2
|
+
data: ConfirmTransfersResponse.Data;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace ConfirmTransfersResponse {
|
|
5
|
+
interface Data {
|
|
6
|
+
id: string;
|
|
7
|
+
fromFboAccountId: string;
|
|
8
|
+
toFboAccountId: string;
|
|
9
|
+
organizationId: string;
|
|
10
|
+
status: Data.Status;
|
|
11
|
+
initiatedBy: Data.InitiatedBy;
|
|
12
|
+
totalItems: number;
|
|
13
|
+
approvedBySystem?: boolean | undefined;
|
|
14
|
+
notes?: string | undefined;
|
|
15
|
+
approvedAt?: string | undefined;
|
|
16
|
+
completedAt?: string | undefined;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
}
|
|
19
|
+
namespace Data {
|
|
20
|
+
const Status: {
|
|
21
|
+
readonly PendingApproval: "pending_approval";
|
|
22
|
+
readonly Processing: "processing";
|
|
23
|
+
readonly Completed: "completed";
|
|
24
|
+
readonly Rejected: "rejected";
|
|
25
|
+
readonly Cancelled: "cancelled";
|
|
26
|
+
};
|
|
27
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
28
|
+
const InitiatedBy: {
|
|
29
|
+
readonly Customer: "customer";
|
|
30
|
+
readonly Vault: "vault";
|
|
31
|
+
};
|
|
32
|
+
type InitiatedBy = (typeof InitiatedBy)[keyof typeof InitiatedBy];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ConfirmTransfersResponse = void 0;
|
|
5
|
+
var ConfirmTransfersResponse;
|
|
6
|
+
(function (ConfirmTransfersResponse) {
|
|
7
|
+
let Data;
|
|
8
|
+
(function (Data) {
|
|
9
|
+
Data.Status = {
|
|
10
|
+
PendingApproval: "pending_approval",
|
|
11
|
+
Processing: "processing",
|
|
12
|
+
Completed: "completed",
|
|
13
|
+
Rejected: "rejected",
|
|
14
|
+
Cancelled: "cancelled",
|
|
15
|
+
};
|
|
16
|
+
Data.InitiatedBy = {
|
|
17
|
+
Customer: "customer",
|
|
18
|
+
Vault: "vault",
|
|
19
|
+
};
|
|
20
|
+
})(Data = ConfirmTransfersResponse.Data || (ConfirmTransfersResponse.Data = {}));
|
|
21
|
+
})(ConfirmTransfersResponse || (exports.ConfirmTransfersResponse = ConfirmTransfersResponse = {}));
|
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./CancelTransfersResponse.js"), exports);
|
|
18
|
+
__exportStar(require("./ConfirmTransfersResponse.js"), exports);
|
|
18
19
|
__exportStar(require("./CreateTransfersResponse.js"), exports);
|
|
19
20
|
__exportStar(require("./GetTransfersResponse.js"), exports);
|
|
20
21
|
__exportStar(require("./ListTransfersRequestStatus.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.3";
|
package/dist/cjs/version.js
CHANGED
|
@@ -57,6 +57,20 @@ export declare class TransfersClient {
|
|
|
57
57
|
*/
|
|
58
58
|
get(request: BeachApi.GetTransfersRequest, requestOptions?: TransfersClient.RequestOptions): core.HttpResponsePromise<BeachApi.GetTransfersResponse>;
|
|
59
59
|
private __get;
|
|
60
|
+
/**
|
|
61
|
+
* @param {BeachApi.ConfirmTransfersRequest} request
|
|
62
|
+
* @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
63
|
+
*
|
|
64
|
+
* @throws {@link errors.BeachApiError}
|
|
65
|
+
* @throws {@link errors.BeachApiTimeoutError}
|
|
66
|
+
*
|
|
67
|
+
* @example
|
|
68
|
+
* await client.transfers.confirm({
|
|
69
|
+
* id: "id"
|
|
70
|
+
* })
|
|
71
|
+
*/
|
|
72
|
+
confirm(request: BeachApi.ConfirmTransfersRequest, requestOptions?: TransfersClient.RequestOptions): core.HttpResponsePromise<BeachApi.ConfirmTransfersResponse>;
|
|
73
|
+
private __confirm;
|
|
60
74
|
/**
|
|
61
75
|
* @param {BeachApi.CancelTransfersRequest} request
|
|
62
76
|
* @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -179,6 +179,51 @@ export class TransfersClient {
|
|
|
179
179
|
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v1/transfers/{id}");
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* @param {BeachApi.ConfirmTransfersRequest} request
|
|
184
|
+
* @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
185
|
+
*
|
|
186
|
+
* @throws {@link errors.BeachApiError}
|
|
187
|
+
* @throws {@link errors.BeachApiTimeoutError}
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* await client.transfers.confirm({
|
|
191
|
+
* id: "id"
|
|
192
|
+
* })
|
|
193
|
+
*/
|
|
194
|
+
confirm(request, requestOptions) {
|
|
195
|
+
return core.HttpResponsePromise.fromPromise(this.__confirm(request, requestOptions));
|
|
196
|
+
}
|
|
197
|
+
__confirm(request, requestOptions) {
|
|
198
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
200
|
+
const { id } = request;
|
|
201
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
202
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
203
|
+
const _response = yield core.fetcher({
|
|
204
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.BeachApiEnvironment.Sandbox, `v1/transfers/${core.url.encodePathParam(id)}/confirm`),
|
|
205
|
+
method: "POST",
|
|
206
|
+
headers: _headers,
|
|
207
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams).build(),
|
|
208
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
209
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
210
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
211
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
212
|
+
logging: this._options.logging,
|
|
213
|
+
});
|
|
214
|
+
if (_response.ok) {
|
|
215
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
216
|
+
}
|
|
217
|
+
if (_response.error.reason === "status-code") {
|
|
218
|
+
throw new errors.BeachApiError({
|
|
219
|
+
statusCode: _response.error.statusCode,
|
|
220
|
+
body: _response.error.body,
|
|
221
|
+
rawResponse: _response.rawResponse,
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v1/transfers/{id}/confirm");
|
|
225
|
+
});
|
|
226
|
+
}
|
|
182
227
|
/**
|
|
183
228
|
* @param {BeachApi.CancelTransfersRequest} request
|
|
184
229
|
* @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { CancelTransfersRequest } from "./CancelTransfersRequest.mjs";
|
|
2
|
+
export type { ConfirmTransfersRequest } from "./ConfirmTransfersRequest.mjs";
|
|
2
3
|
export { CreateTransfersRequest } from "./CreateTransfersRequest.mjs";
|
|
3
4
|
export type { GetTransfersRequest } from "./GetTransfersRequest.mjs";
|
|
4
5
|
export type { ListTransfersRequest } from "./ListTransfersRequest.mjs";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface ConfirmTransfersResponse {
|
|
2
|
+
data: ConfirmTransfersResponse.Data;
|
|
3
|
+
}
|
|
4
|
+
export declare namespace ConfirmTransfersResponse {
|
|
5
|
+
interface Data {
|
|
6
|
+
id: string;
|
|
7
|
+
fromFboAccountId: string;
|
|
8
|
+
toFboAccountId: string;
|
|
9
|
+
organizationId: string;
|
|
10
|
+
status: Data.Status;
|
|
11
|
+
initiatedBy: Data.InitiatedBy;
|
|
12
|
+
totalItems: number;
|
|
13
|
+
approvedBySystem?: boolean | undefined;
|
|
14
|
+
notes?: string | undefined;
|
|
15
|
+
approvedAt?: string | undefined;
|
|
16
|
+
completedAt?: string | undefined;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
}
|
|
19
|
+
namespace Data {
|
|
20
|
+
const Status: {
|
|
21
|
+
readonly PendingApproval: "pending_approval";
|
|
22
|
+
readonly Processing: "processing";
|
|
23
|
+
readonly Completed: "completed";
|
|
24
|
+
readonly Rejected: "rejected";
|
|
25
|
+
readonly Cancelled: "cancelled";
|
|
26
|
+
};
|
|
27
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
28
|
+
const InitiatedBy: {
|
|
29
|
+
readonly Customer: "customer";
|
|
30
|
+
readonly Vault: "vault";
|
|
31
|
+
};
|
|
32
|
+
type InitiatedBy = (typeof InitiatedBy)[keyof typeof InitiatedBy];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
export var ConfirmTransfersResponse;
|
|
3
|
+
(function (ConfirmTransfersResponse) {
|
|
4
|
+
let Data;
|
|
5
|
+
(function (Data) {
|
|
6
|
+
Data.Status = {
|
|
7
|
+
PendingApproval: "pending_approval",
|
|
8
|
+
Processing: "processing",
|
|
9
|
+
Completed: "completed",
|
|
10
|
+
Rejected: "rejected",
|
|
11
|
+
Cancelled: "cancelled",
|
|
12
|
+
};
|
|
13
|
+
Data.InitiatedBy = {
|
|
14
|
+
Customer: "customer",
|
|
15
|
+
Vault: "vault",
|
|
16
|
+
};
|
|
17
|
+
})(Data = ConfirmTransfersResponse.Data || (ConfirmTransfersResponse.Data = {}));
|
|
18
|
+
})(ConfirmTransfersResponse || (ConfirmTransfersResponse = {}));
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.0.
|
|
1
|
+
export declare const SDK_VERSION = "0.0.3";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.0.
|
|
1
|
+
export const SDK_VERSION = "0.0.3";
|