@beach-depository/sdk 0.0.1 → 0.0.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.
Files changed (58) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/BaseClient.d.ts +3 -0
  3. package/dist/cjs/api/resources/fboAccounts/client/Client.d.ts +5 -3
  4. package/dist/cjs/api/resources/fboAccounts/client/Client.js +2 -2
  5. package/dist/cjs/api/resources/fboAccounts/resources/addresses/client/Client.d.ts +5 -3
  6. package/dist/cjs/api/resources/fboAccounts/resources/addresses/client/Client.js +2 -2
  7. package/dist/cjs/api/resources/fboAccounts/resources/aliases/client/Client.d.ts +5 -3
  8. package/dist/cjs/api/resources/fboAccounts/resources/aliases/client/Client.js +2 -2
  9. package/dist/cjs/api/resources/inboundShipments/client/Client.d.ts +5 -3
  10. package/dist/cjs/api/resources/inboundShipments/client/Client.js +2 -2
  11. package/dist/cjs/api/resources/outboundRequests/client/Client.d.ts +5 -3
  12. package/dist/cjs/api/resources/outboundRequests/client/Client.js +2 -2
  13. package/dist/cjs/api/resources/transfers/client/Client.d.ts +5 -3
  14. package/dist/cjs/api/resources/transfers/client/Client.js +2 -2
  15. package/dist/cjs/api/resources/transfers/types/CancelTransfersResponse.d.ts +8 -2
  16. package/dist/cjs/api/resources/transfers/types/CancelTransfersResponse.js +6 -2
  17. package/dist/cjs/api/resources/transfers/types/CreateTransfersResponse.d.ts +8 -2
  18. package/dist/cjs/api/resources/transfers/types/CreateTransfersResponse.js +6 -2
  19. package/dist/cjs/api/resources/transfers/types/GetTransfersResponse.d.ts +8 -2
  20. package/dist/cjs/api/resources/transfers/types/GetTransfersResponse.js +6 -2
  21. package/dist/cjs/api/resources/transfers/types/ListTransfersRequestStatus.d.ts +2 -2
  22. package/dist/cjs/api/resources/transfers/types/ListTransfersRequestStatus.js +2 -2
  23. package/dist/cjs/api/resources/transfers/types/ListTransfersResponse.d.ts +8 -2
  24. package/dist/cjs/api/resources/transfers/types/ListTransfersResponse.js +6 -2
  25. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +5 -3
  26. package/dist/cjs/api/resources/webhooks/client/Client.js +2 -2
  27. package/dist/cjs/index.d.ts +1 -1
  28. package/dist/cjs/version.d.ts +1 -1
  29. package/dist/cjs/version.js +1 -1
  30. package/dist/esm/BaseClient.d.mts +3 -0
  31. package/dist/esm/api/resources/fboAccounts/client/Client.d.mts +5 -3
  32. package/dist/esm/api/resources/fboAccounts/client/Client.mjs +3 -3
  33. package/dist/esm/api/resources/fboAccounts/resources/addresses/client/Client.d.mts +5 -3
  34. package/dist/esm/api/resources/fboAccounts/resources/addresses/client/Client.mjs +3 -3
  35. package/dist/esm/api/resources/fboAccounts/resources/aliases/client/Client.d.mts +5 -3
  36. package/dist/esm/api/resources/fboAccounts/resources/aliases/client/Client.mjs +3 -3
  37. package/dist/esm/api/resources/inboundShipments/client/Client.d.mts +5 -3
  38. package/dist/esm/api/resources/inboundShipments/client/Client.mjs +3 -3
  39. package/dist/esm/api/resources/outboundRequests/client/Client.d.mts +5 -3
  40. package/dist/esm/api/resources/outboundRequests/client/Client.mjs +3 -3
  41. package/dist/esm/api/resources/transfers/client/Client.d.mts +5 -3
  42. package/dist/esm/api/resources/transfers/client/Client.mjs +3 -3
  43. package/dist/esm/api/resources/transfers/types/CancelTransfersResponse.d.mts +8 -2
  44. package/dist/esm/api/resources/transfers/types/CancelTransfersResponse.mjs +6 -2
  45. package/dist/esm/api/resources/transfers/types/CreateTransfersResponse.d.mts +8 -2
  46. package/dist/esm/api/resources/transfers/types/CreateTransfersResponse.mjs +6 -2
  47. package/dist/esm/api/resources/transfers/types/GetTransfersResponse.d.mts +8 -2
  48. package/dist/esm/api/resources/transfers/types/GetTransfersResponse.mjs +6 -2
  49. package/dist/esm/api/resources/transfers/types/ListTransfersRequestStatus.d.mts +2 -2
  50. package/dist/esm/api/resources/transfers/types/ListTransfersRequestStatus.mjs +2 -2
  51. package/dist/esm/api/resources/transfers/types/ListTransfersResponse.d.mts +8 -2
  52. package/dist/esm/api/resources/transfers/types/ListTransfersResponse.mjs +6 -2
  53. package/dist/esm/api/resources/webhooks/client/Client.d.mts +5 -3
  54. package/dist/esm/api/resources/webhooks/client/Client.mjs +3 -3
  55. package/dist/esm/index.d.mts +1 -1
  56. package/dist/esm/version.d.mts +1 -1
  57. package/dist/esm/version.mjs +1 -1
  58. package/package.json +1 -5
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
- # Collectpure TypeScript Library
1
+ # Beach Depository TypeScript Library
2
2
 
3
3
  [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPure-Technologies%2Fbeach-sdk-typescript)
4
4
  [![npm shield](https://img.shields.io/npm/v/@beach-depository/sdk)](https://www.npmjs.com/package/@beach-depository/sdk)
5
5
 
6
- The Collectpure TypeScript library provides convenient access to the Collectpure APIs from TypeScript.
6
+ The Beach Depository TypeScript library provides convenient access to the Beach Depository API from TypeScript.
7
7
 
8
8
  ## Table of Contents
9
9
 
@@ -43,6 +43,9 @@ export interface BaseRequestOptions {
43
43
  maxReconnectionAttempts?: number;
44
44
  };
45
45
  }
46
+ export interface BaseIdempotentRequestOptions {
47
+ idempotencyKey?: string | undefined;
48
+ }
46
49
  export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
47
50
  logging: core.logging.Logger;
48
51
  authProvider?: core.AuthProvider;
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
4
  import type * as BeachApi from "../../../index.js";
@@ -8,6 +8,8 @@ export declare namespace FboAccountsClient {
8
8
  type Options = BaseClientOptions;
9
9
  interface RequestOptions extends BaseRequestOptions {
10
10
  }
11
+ interface IdempotentRequestOptions extends RequestOptions, BaseIdempotentRequestOptions {
12
+ }
11
13
  }
12
14
  export declare class FboAccountsClient {
13
15
  protected readonly _options: NormalizedClientOptionsWithAuth<FboAccountsClient.Options>;
@@ -30,7 +32,7 @@ export declare class FboAccountsClient {
30
32
  private __list;
31
33
  /**
32
34
  * @param {BeachApi.CreateFboAccountsRequest} request
33
- * @param {FboAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
35
+ * @param {FboAccountsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
34
36
  *
35
37
  * @throws {@link errors.BeachApiError}
36
38
  * @throws {@link errors.BeachApiTimeoutError}
@@ -43,7 +45,7 @@ export declare class FboAccountsClient {
43
45
  * phone: "phone"
44
46
  * })
45
47
  */
46
- create(request: BeachApi.CreateFboAccountsRequest, requestOptions?: FboAccountsClient.RequestOptions): core.HttpResponsePromise<BeachApi.CreateFboAccountsResponse>;
48
+ create(request: BeachApi.CreateFboAccountsRequest, requestOptions?: FboAccountsClient.IdempotentRequestOptions): core.HttpResponsePromise<BeachApi.CreateFboAccountsResponse>;
47
49
  private __create;
48
50
  /**
49
51
  * @param {BeachApi.GetFboAccountsRequest} request
@@ -129,7 +129,7 @@ class FboAccountsClient {
129
129
  }
130
130
  /**
131
131
  * @param {BeachApi.CreateFboAccountsRequest} request
132
- * @param {FboAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
132
+ * @param {FboAccountsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
133
133
  *
134
134
  * @throws {@link errors.BeachApiError}
135
135
  * @throws {@link errors.BeachApiTimeoutError}
@@ -149,7 +149,7 @@ class FboAccountsClient {
149
149
  return __awaiter(this, void 0, void 0, function* () {
150
150
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
151
151
  const _authRequest = yield this._options.authProvider.getAuthRequest();
152
- 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);
152
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
153
153
  const _response = yield core.fetcher({
154
154
  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/fbo-accounts"),
155
155
  method: "POST",
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
3
  import * as core from "../../../../../../core/index.js";
4
4
  import type * as BeachApi from "../../../../../index.js";
@@ -6,6 +6,8 @@ export declare namespace AddressesClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
+ interface IdempotentRequestOptions extends RequestOptions, BaseIdempotentRequestOptions {
10
+ }
9
11
  }
10
12
  export declare class AddressesClient {
11
13
  protected readonly _options: NormalizedClientOptionsWithAuth<AddressesClient.Options>;
@@ -26,7 +28,7 @@ export declare class AddressesClient {
26
28
  private __list;
27
29
  /**
28
30
  * @param {BeachApi.fboAccounts.CreateAddressesRequest} request
29
- * @param {AddressesClient.RequestOptions} requestOptions - Request-specific configuration.
31
+ * @param {AddressesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
30
32
  *
31
33
  * @throws {@link errors.BeachApiError}
32
34
  * @throws {@link errors.BeachApiTimeoutError}
@@ -42,7 +44,7 @@ export declare class AddressesClient {
42
44
  * country: "country"
43
45
  * })
44
46
  */
45
- create(request: BeachApi.fboAccounts.CreateAddressesRequest, requestOptions?: AddressesClient.RequestOptions): core.HttpResponsePromise<BeachApi.fboAccounts.CreateAddressesResponse>;
47
+ create(request: BeachApi.fboAccounts.CreateAddressesRequest, requestOptions?: AddressesClient.IdempotentRequestOptions): core.HttpResponsePromise<BeachApi.fboAccounts.CreateAddressesResponse>;
46
48
  private __create;
47
49
  /**
48
50
  * @param {BeachApi.fboAccounts.DeleteAddressesRequest} request
@@ -116,7 +116,7 @@ class AddressesClient {
116
116
  }
117
117
  /**
118
118
  * @param {BeachApi.fboAccounts.CreateAddressesRequest} request
119
- * @param {AddressesClient.RequestOptions} requestOptions - Request-specific configuration.
119
+ * @param {AddressesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
120
120
  *
121
121
  * @throws {@link errors.BeachApiError}
122
122
  * @throws {@link errors.BeachApiTimeoutError}
@@ -140,7 +140,7 @@ class AddressesClient {
140
140
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
141
141
  const { id } = request, _body = __rest(request, ["id"]);
142
142
  const _authRequest = yield this._options.authProvider.getAuthRequest();
143
- 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);
143
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
144
144
  const _response = yield core.fetcher({
145
145
  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/fbo-accounts/${core.url.encodePathParam(id)}/addresses`),
146
146
  method: "POST",
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
3
  import * as core from "../../../../../../core/index.js";
4
4
  import type * as BeachApi from "../../../../../index.js";
@@ -6,6 +6,8 @@ export declare namespace AliasesClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
+ interface IdempotentRequestOptions extends RequestOptions, BaseIdempotentRequestOptions {
10
+ }
9
11
  }
10
12
  export declare class AliasesClient {
11
13
  protected readonly _options: NormalizedClientOptionsWithAuth<AliasesClient.Options>;
@@ -26,7 +28,7 @@ export declare class AliasesClient {
26
28
  private __list;
27
29
  /**
28
30
  * @param {BeachApi.fboAccounts.CreateAliasesRequest} request
29
- * @param {AliasesClient.RequestOptions} requestOptions - Request-specific configuration.
31
+ * @param {AliasesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
30
32
  *
31
33
  * @throws {@link errors.BeachApiError}
32
34
  * @throws {@link errors.BeachApiTimeoutError}
@@ -37,7 +39,7 @@ export declare class AliasesClient {
37
39
  * aliasVaultId: "aliasVaultId"
38
40
  * })
39
41
  */
40
- create(request: BeachApi.fboAccounts.CreateAliasesRequest, requestOptions?: AliasesClient.RequestOptions): core.HttpResponsePromise<BeachApi.fboAccounts.CreateAliasesResponse>;
42
+ create(request: BeachApi.fboAccounts.CreateAliasesRequest, requestOptions?: AliasesClient.IdempotentRequestOptions): core.HttpResponsePromise<BeachApi.fboAccounts.CreateAliasesResponse>;
41
43
  private __create;
42
44
  /**
43
45
  * @param {BeachApi.fboAccounts.DeleteAliasesRequest} request
@@ -116,7 +116,7 @@ class AliasesClient {
116
116
  }
117
117
  /**
118
118
  * @param {BeachApi.fboAccounts.CreateAliasesRequest} request
119
- * @param {AliasesClient.RequestOptions} requestOptions - Request-specific configuration.
119
+ * @param {AliasesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
120
120
  *
121
121
  * @throws {@link errors.BeachApiError}
122
122
  * @throws {@link errors.BeachApiTimeoutError}
@@ -135,7 +135,7 @@ class AliasesClient {
135
135
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
136
136
  const { id } = request, _body = __rest(request, ["id"]);
137
137
  const _authRequest = yield this._options.authProvider.getAuthRequest();
138
- 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);
138
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
139
139
  const _response = yield core.fetcher({
140
140
  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/fbo-accounts/${core.url.encodePathParam(id)}/aliases`),
141
141
  method: "POST",
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
4
  import type * as BeachApi from "../../../index.js";
@@ -6,6 +6,8 @@ export declare namespace InboundShipmentsClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
+ interface IdempotentRequestOptions extends RequestOptions, BaseIdempotentRequestOptions {
10
+ }
9
11
  }
10
12
  export declare class InboundShipmentsClient {
11
13
  protected readonly _options: NormalizedClientOptionsWithAuth<InboundShipmentsClient.Options>;
@@ -24,7 +26,7 @@ export declare class InboundShipmentsClient {
24
26
  private __list;
25
27
  /**
26
28
  * @param {BeachApi.CreateInboundShipmentsRequest} request
27
- * @param {InboundShipmentsClient.RequestOptions} requestOptions - Request-specific configuration.
29
+ * @param {InboundShipmentsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
28
30
  *
29
31
  * @throws {@link errors.BeachApiError}
30
32
  * @throws {@link errors.BeachApiTimeoutError}
@@ -38,7 +40,7 @@ export declare class InboundShipmentsClient {
38
40
  * }]
39
41
  * })
40
42
  */
41
- create(request: BeachApi.CreateInboundShipmentsRequest, requestOptions?: InboundShipmentsClient.RequestOptions): core.HttpResponsePromise<BeachApi.CreateInboundShipmentsResponse>;
43
+ create(request: BeachApi.CreateInboundShipmentsRequest, requestOptions?: InboundShipmentsClient.IdempotentRequestOptions): core.HttpResponsePromise<BeachApi.CreateInboundShipmentsResponse>;
42
44
  private __create;
43
45
  /**
44
46
  * @param {BeachApi.GetInboundShipmentsRequest} request
@@ -132,7 +132,7 @@ class InboundShipmentsClient {
132
132
  }
133
133
  /**
134
134
  * @param {BeachApi.CreateInboundShipmentsRequest} request
135
- * @param {InboundShipmentsClient.RequestOptions} requestOptions - Request-specific configuration.
135
+ * @param {InboundShipmentsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
136
136
  *
137
137
  * @throws {@link errors.BeachApiError}
138
138
  * @throws {@link errors.BeachApiTimeoutError}
@@ -153,7 +153,7 @@ class InboundShipmentsClient {
153
153
  return __awaiter(this, void 0, void 0, function* () {
154
154
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
155
155
  const _authRequest = yield this._options.authProvider.getAuthRequest();
156
- 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);
156
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
157
157
  const _response = yield core.fetcher({
158
158
  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/inbound-shipments"),
159
159
  method: "POST",
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
4
  import type * as BeachApi from "../../../index.js";
@@ -6,6 +6,8 @@ export declare namespace OutboundRequestsClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
+ interface IdempotentRequestOptions extends RequestOptions, BaseIdempotentRequestOptions {
10
+ }
9
11
  }
10
12
  export declare class OutboundRequestsClient {
11
13
  protected readonly _options: NormalizedClientOptionsWithAuth<OutboundRequestsClient.Options>;
@@ -24,7 +26,7 @@ export declare class OutboundRequestsClient {
24
26
  private __list;
25
27
  /**
26
28
  * @param {BeachApi.CreateOutboundRequestsRequest} request
27
- * @param {OutboundRequestsClient.RequestOptions} requestOptions - Request-specific configuration.
29
+ * @param {OutboundRequestsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
28
30
  *
29
31
  * @throws {@link errors.BeachApiError}
30
32
  * @throws {@link errors.BeachApiTimeoutError}
@@ -37,7 +39,7 @@ export declare class OutboundRequestsClient {
37
39
  * }]
38
40
  * })
39
41
  */
40
- create(request: BeachApi.CreateOutboundRequestsRequest, requestOptions?: OutboundRequestsClient.RequestOptions): core.HttpResponsePromise<BeachApi.CreateOutboundRequestsResponse>;
42
+ create(request: BeachApi.CreateOutboundRequestsRequest, requestOptions?: OutboundRequestsClient.IdempotentRequestOptions): core.HttpResponsePromise<BeachApi.CreateOutboundRequestsResponse>;
41
43
  private __create;
42
44
  /**
43
45
  * @param {BeachApi.GetOutboundRequestsRequest} request
@@ -132,7 +132,7 @@ class OutboundRequestsClient {
132
132
  }
133
133
  /**
134
134
  * @param {BeachApi.CreateOutboundRequestsRequest} request
135
- * @param {OutboundRequestsClient.RequestOptions} requestOptions - Request-specific configuration.
135
+ * @param {OutboundRequestsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
136
136
  *
137
137
  * @throws {@link errors.BeachApiError}
138
138
  * @throws {@link errors.BeachApiTimeoutError}
@@ -152,7 +152,7 @@ class OutboundRequestsClient {
152
152
  return __awaiter(this, void 0, void 0, function* () {
153
153
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
154
154
  const _authRequest = yield this._options.authProvider.getAuthRequest();
155
- 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);
155
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
156
156
  const _response = yield core.fetcher({
157
157
  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/outbound-requests"),
158
158
  method: "POST",
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
4
  import type * as BeachApi from "../../../index.js";
@@ -6,6 +6,8 @@ export declare namespace TransfersClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
+ interface IdempotentRequestOptions extends RequestOptions, BaseIdempotentRequestOptions {
10
+ }
9
11
  }
10
12
  export declare class TransfersClient {
11
13
  protected readonly _options: NormalizedClientOptionsWithAuth<TransfersClient.Options>;
@@ -24,7 +26,7 @@ export declare class TransfersClient {
24
26
  private __list;
25
27
  /**
26
28
  * @param {BeachApi.CreateTransfersRequest} request
27
- * @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
29
+ * @param {TransfersClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
28
30
  *
29
31
  * @throws {@link errors.BeachApiError}
30
32
  * @throws {@link errors.BeachApiTimeoutError}
@@ -39,7 +41,7 @@ export declare class TransfersClient {
39
41
  * }]
40
42
  * })
41
43
  */
42
- create(request: BeachApi.CreateTransfersRequest, requestOptions?: TransfersClient.RequestOptions): core.HttpResponsePromise<BeachApi.CreateTransfersResponse>;
44
+ create(request: BeachApi.CreateTransfersRequest, requestOptions?: TransfersClient.IdempotentRequestOptions): core.HttpResponsePromise<BeachApi.CreateTransfersResponse>;
43
45
  private __create;
44
46
  /**
45
47
  * @param {BeachApi.GetTransfersRequest} request
@@ -120,7 +120,7 @@ class TransfersClient {
120
120
  }
121
121
  /**
122
122
  * @param {BeachApi.CreateTransfersRequest} request
123
- * @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
123
+ * @param {TransfersClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
124
124
  *
125
125
  * @throws {@link errors.BeachApiError}
126
126
  * @throws {@link errors.BeachApiTimeoutError}
@@ -142,7 +142,7 @@ class TransfersClient {
142
142
  return __awaiter(this, void 0, void 0, function* () {
143
143
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
144
144
  const _authRequest = yield this._options.authProvider.getAuthRequest();
145
- 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);
145
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
146
146
  const _response = yield core.fetcher({
147
147
  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"),
148
148
  method: "POST",
@@ -8,6 +8,7 @@ export declare namespace CancelTransfersResponse {
8
8
  toFboAccountId: string;
9
9
  organizationId: string;
10
10
  status: Data.Status;
11
+ initiatedBy: Data.InitiatedBy;
11
12
  totalItems: number;
12
13
  approvedBySystem?: boolean | undefined;
13
14
  notes?: string | undefined;
@@ -17,12 +18,17 @@ export declare namespace CancelTransfersResponse {
17
18
  }
18
19
  namespace Data {
19
20
  const Status: {
20
- readonly PendingReview: "pending_review";
21
- readonly Approved: "approved";
21
+ readonly PendingApproval: "pending_approval";
22
+ readonly Processing: "processing";
22
23
  readonly Completed: "completed";
23
24
  readonly Rejected: "rejected";
24
25
  readonly Cancelled: "cancelled";
25
26
  };
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];
27
33
  }
28
34
  }
@@ -7,11 +7,15 @@ var CancelTransfersResponse;
7
7
  let Data;
8
8
  (function (Data) {
9
9
  Data.Status = {
10
- PendingReview: "pending_review",
11
- Approved: "approved",
10
+ PendingApproval: "pending_approval",
11
+ Processing: "processing",
12
12
  Completed: "completed",
13
13
  Rejected: "rejected",
14
14
  Cancelled: "cancelled",
15
15
  };
16
+ Data.InitiatedBy = {
17
+ Customer: "customer",
18
+ Vault: "vault",
19
+ };
16
20
  })(Data = CancelTransfersResponse.Data || (CancelTransfersResponse.Data = {}));
17
21
  })(CancelTransfersResponse || (exports.CancelTransfersResponse = CancelTransfersResponse = {}));
@@ -8,6 +8,7 @@ export declare namespace CreateTransfersResponse {
8
8
  toFboAccountId: string;
9
9
  organizationId: string;
10
10
  status: Data.Status;
11
+ initiatedBy: Data.InitiatedBy;
11
12
  totalItems: number;
12
13
  approvedBySystem?: boolean | undefined;
13
14
  notes?: string | undefined;
@@ -17,12 +18,17 @@ export declare namespace CreateTransfersResponse {
17
18
  }
18
19
  namespace Data {
19
20
  const Status: {
20
- readonly PendingReview: "pending_review";
21
- readonly Approved: "approved";
21
+ readonly PendingApproval: "pending_approval";
22
+ readonly Processing: "processing";
22
23
  readonly Completed: "completed";
23
24
  readonly Rejected: "rejected";
24
25
  readonly Cancelled: "cancelled";
25
26
  };
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];
27
33
  }
28
34
  }
@@ -7,11 +7,15 @@ var CreateTransfersResponse;
7
7
  let Data;
8
8
  (function (Data) {
9
9
  Data.Status = {
10
- PendingReview: "pending_review",
11
- Approved: "approved",
10
+ PendingApproval: "pending_approval",
11
+ Processing: "processing",
12
12
  Completed: "completed",
13
13
  Rejected: "rejected",
14
14
  Cancelled: "cancelled",
15
15
  };
16
+ Data.InitiatedBy = {
17
+ Customer: "customer",
18
+ Vault: "vault",
19
+ };
16
20
  })(Data = CreateTransfersResponse.Data || (CreateTransfersResponse.Data = {}));
17
21
  })(CreateTransfersResponse || (exports.CreateTransfersResponse = CreateTransfersResponse = {}));
@@ -8,6 +8,7 @@ export declare namespace GetTransfersResponse {
8
8
  toFboAccountId: string;
9
9
  organizationId: string;
10
10
  status: Data.Status;
11
+ initiatedBy: Data.InitiatedBy;
11
12
  totalItems: number;
12
13
  approvedBySystem?: boolean | undefined;
13
14
  notes?: string | undefined;
@@ -17,12 +18,17 @@ export declare namespace GetTransfersResponse {
17
18
  }
18
19
  namespace Data {
19
20
  const Status: {
20
- readonly PendingReview: "pending_review";
21
- readonly Approved: "approved";
21
+ readonly PendingApproval: "pending_approval";
22
+ readonly Processing: "processing";
22
23
  readonly Completed: "completed";
23
24
  readonly Rejected: "rejected";
24
25
  readonly Cancelled: "cancelled";
25
26
  };
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];
27
33
  }
28
34
  }
@@ -7,11 +7,15 @@ var GetTransfersResponse;
7
7
  let Data;
8
8
  (function (Data) {
9
9
  Data.Status = {
10
- PendingReview: "pending_review",
11
- Approved: "approved",
10
+ PendingApproval: "pending_approval",
11
+ Processing: "processing",
12
12
  Completed: "completed",
13
13
  Rejected: "rejected",
14
14
  Cancelled: "cancelled",
15
15
  };
16
+ Data.InitiatedBy = {
17
+ Customer: "customer",
18
+ Vault: "vault",
19
+ };
16
20
  })(Data = GetTransfersResponse.Data || (GetTransfersResponse.Data = {}));
17
21
  })(GetTransfersResponse || (exports.GetTransfersResponse = GetTransfersResponse = {}));
@@ -1,6 +1,6 @@
1
1
  export declare const ListTransfersRequestStatus: {
2
- readonly PendingReview: "pending_review";
3
- readonly Approved: "approved";
2
+ readonly PendingApproval: "pending_approval";
3
+ readonly Processing: "processing";
4
4
  readonly Completed: "completed";
5
5
  readonly Rejected: "rejected";
6
6
  readonly Cancelled: "cancelled";
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.ListTransfersRequestStatus = void 0;
5
5
  exports.ListTransfersRequestStatus = {
6
- PendingReview: "pending_review",
7
- Approved: "approved",
6
+ PendingApproval: "pending_approval",
7
+ Processing: "processing",
8
8
  Completed: "completed",
9
9
  Rejected: "rejected",
10
10
  Cancelled: "cancelled",
@@ -11,6 +11,7 @@ export declare namespace ListTransfersResponse {
11
11
  toFboAccountId: string;
12
12
  organizationId: string;
13
13
  status: Item.Status;
14
+ initiatedBy: Item.InitiatedBy;
14
15
  totalItems: number;
15
16
  approvedBySystem?: boolean | undefined;
16
17
  notes?: string | undefined;
@@ -20,13 +21,18 @@ export declare namespace ListTransfersResponse {
20
21
  }
21
22
  namespace Item {
22
23
  const Status: {
23
- readonly PendingReview: "pending_review";
24
- readonly Approved: "approved";
24
+ readonly PendingApproval: "pending_approval";
25
+ readonly Processing: "processing";
25
26
  readonly Completed: "completed";
26
27
  readonly Rejected: "rejected";
27
28
  readonly Cancelled: "cancelled";
28
29
  };
29
30
  type Status = (typeof Status)[keyof typeof Status];
31
+ const InitiatedBy: {
32
+ readonly Customer: "customer";
33
+ readonly Vault: "vault";
34
+ };
35
+ type InitiatedBy = (typeof InitiatedBy)[keyof typeof InitiatedBy];
30
36
  }
31
37
  }
32
38
  interface Pagination {
@@ -9,12 +9,16 @@ var ListTransfersResponse;
9
9
  let Item;
10
10
  (function (Item) {
11
11
  Item.Status = {
12
- PendingReview: "pending_review",
13
- Approved: "approved",
12
+ PendingApproval: "pending_approval",
13
+ Processing: "processing",
14
14
  Completed: "completed",
15
15
  Rejected: "rejected",
16
16
  Cancelled: "cancelled",
17
17
  };
18
+ Item.InitiatedBy = {
19
+ Customer: "customer",
20
+ Vault: "vault",
21
+ };
18
22
  })(Item = Data.Item || (Data.Item = {}));
19
23
  })(Data = ListTransfersResponse.Data || (ListTransfersResponse.Data = {}));
20
24
  })(ListTransfersResponse || (exports.ListTransfersResponse = ListTransfersResponse = {}));
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
3
  import * as core from "../../../../core/index.js";
4
4
  import type * as BeachApi from "../../../index.js";
@@ -6,6 +6,8 @@ export declare namespace WebhooksClient {
6
6
  type Options = BaseClientOptions;
7
7
  interface RequestOptions extends BaseRequestOptions {
8
8
  }
9
+ interface IdempotentRequestOptions extends RequestOptions, BaseIdempotentRequestOptions {
10
+ }
9
11
  }
10
12
  export declare class WebhooksClient {
11
13
  protected readonly _options: NormalizedClientOptionsWithAuth<WebhooksClient.Options>;
@@ -23,7 +25,7 @@ export declare class WebhooksClient {
23
25
  private __list;
24
26
  /**
25
27
  * @param {BeachApi.CreateWebhooksRequest} request
26
- * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
28
+ * @param {WebhooksClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
27
29
  *
28
30
  * @throws {@link errors.BeachApiError}
29
31
  * @throws {@link errors.BeachApiTimeoutError}
@@ -35,7 +37,7 @@ export declare class WebhooksClient {
35
37
  * events: ["events"]
36
38
  * })
37
39
  */
38
- create(request: BeachApi.CreateWebhooksRequest, requestOptions?: WebhooksClient.RequestOptions): core.HttpResponsePromise<BeachApi.CreateWebhooksResponse>;
40
+ create(request: BeachApi.CreateWebhooksRequest, requestOptions?: WebhooksClient.IdempotentRequestOptions): core.HttpResponsePromise<BeachApi.CreateWebhooksResponse>;
39
41
  private __create;
40
42
  /**
41
43
  * @param {BeachApi.DeleteWebhooksRequest} request
@@ -98,7 +98,7 @@ class WebhooksClient {
98
98
  }
99
99
  /**
100
100
  * @param {BeachApi.CreateWebhooksRequest} request
101
- * @param {WebhooksClient.RequestOptions} requestOptions - Request-specific configuration.
101
+ * @param {WebhooksClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
102
102
  *
103
103
  * @throws {@link errors.BeachApiError}
104
104
  * @throws {@link errors.BeachApiTimeoutError}
@@ -117,7 +117,7 @@ class WebhooksClient {
117
117
  return __awaiter(this, void 0, void 0, function* () {
118
118
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
119
119
  const _authRequest = yield this._options.authProvider.getAuthRequest();
120
- 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);
120
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
121
121
  const _response = yield core.fetcher({
122
122
  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/webhooks"),
123
123
  method: "POST",
@@ -1,5 +1,5 @@
1
1
  export * as BeachApi from "./api/index.js";
2
- export type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
2
+ export type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "./BaseClient.js";
3
3
  export { BeachApiClient } from "./Client.js";
4
4
  export { BeachApiEnvironment } from "./environments.js";
5
5
  export { BeachApiError, BeachApiTimeoutError } from "./errors/index.js";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.1";
1
+ export declare const SDK_VERSION = "0.0.2";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.1";
4
+ exports.SDK_VERSION = "0.0.2";