@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
@@ -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.mjs";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import type * as BeachApi from "../../../index.mjs";
@@ -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
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  return t;
21
21
  };
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../core/headers.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
24
24
  import * as core from "../../../../core/index.mjs";
25
25
  import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.mjs";
26
26
  import * as environments from "../../../../environments.mjs";
@@ -93,7 +93,7 @@ export class FboAccountsClient {
93
93
  }
94
94
  /**
95
95
  * @param {BeachApi.CreateFboAccountsRequest} request
96
- * @param {FboAccountsClient.RequestOptions} requestOptions - Request-specific configuration.
96
+ * @param {FboAccountsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
97
97
  *
98
98
  * @throws {@link errors.BeachApiError}
99
99
  * @throws {@link errors.BeachApiTimeoutError}
@@ -113,7 +113,7 @@ export class FboAccountsClient {
113
113
  return __awaiter(this, void 0, void 0, function* () {
114
114
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
115
115
  const _authRequest = yield this._options.authProvider.getAuthRequest();
116
- 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);
116
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
117
117
  const _response = yield core.fetcher({
118
118
  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"),
119
119
  method: "POST",
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../../../core/index.mjs";
4
4
  import type * as BeachApi from "../../../../../index.mjs";
@@ -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
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  return t;
21
21
  };
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../../../core/headers.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
24
24
  import * as core from "../../../../../../core/index.mjs";
25
25
  import { mergeAdditionalBodyParameters } from "../../../../../../core/requestBody.mjs";
26
26
  import * as environments from "../../../../../../environments.mjs";
@@ -80,7 +80,7 @@ export class AddressesClient {
80
80
  }
81
81
  /**
82
82
  * @param {BeachApi.fboAccounts.CreateAddressesRequest} request
83
- * @param {AddressesClient.RequestOptions} requestOptions - Request-specific configuration.
83
+ * @param {AddressesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
84
84
  *
85
85
  * @throws {@link errors.BeachApiError}
86
86
  * @throws {@link errors.BeachApiTimeoutError}
@@ -104,7 +104,7 @@ export class AddressesClient {
104
104
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
105
105
  const { id } = request, _body = __rest(request, ["id"]);
106
106
  const _authRequest = yield this._options.authProvider.getAuthRequest();
107
- 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);
107
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
108
108
  const _response = yield core.fetcher({
109
109
  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`),
110
110
  method: "POST",
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../../../BaseClient.mjs";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../../../core/index.mjs";
4
4
  import type * as BeachApi from "../../../../../index.mjs";
@@ -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
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  return t;
21
21
  };
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../../../core/headers.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../../../core/headers.mjs";
24
24
  import * as core from "../../../../../../core/index.mjs";
25
25
  import { mergeAdditionalBodyParameters } from "../../../../../../core/requestBody.mjs";
26
26
  import * as environments from "../../../../../../environments.mjs";
@@ -80,7 +80,7 @@ export class AliasesClient {
80
80
  }
81
81
  /**
82
82
  * @param {BeachApi.fboAccounts.CreateAliasesRequest} request
83
- * @param {AliasesClient.RequestOptions} requestOptions - Request-specific configuration.
83
+ * @param {AliasesClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
84
84
  *
85
85
  * @throws {@link errors.BeachApiError}
86
86
  * @throws {@link errors.BeachApiTimeoutError}
@@ -99,7 +99,7 @@ export class AliasesClient {
99
99
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
100
100
  const { id } = request, _body = __rest(request, ["id"]);
101
101
  const _authRequest = yield this._options.authProvider.getAuthRequest();
102
- 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);
102
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
103
103
  const _response = yield core.fetcher({
104
104
  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`),
105
105
  method: "POST",
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import type * as BeachApi from "../../../index.mjs";
@@ -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
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  return t;
21
21
  };
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../core/headers.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
24
24
  import * as core from "../../../../core/index.mjs";
25
25
  import { toJson } from "../../../../core/json.mjs";
26
26
  import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.mjs";
@@ -96,7 +96,7 @@ export class InboundShipmentsClient {
96
96
  }
97
97
  /**
98
98
  * @param {BeachApi.CreateInboundShipmentsRequest} request
99
- * @param {InboundShipmentsClient.RequestOptions} requestOptions - Request-specific configuration.
99
+ * @param {InboundShipmentsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
100
100
  *
101
101
  * @throws {@link errors.BeachApiError}
102
102
  * @throws {@link errors.BeachApiTimeoutError}
@@ -117,7 +117,7 @@ export class InboundShipmentsClient {
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 = 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 = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, 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/inbound-shipments"),
123
123
  method: "POST",
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import type * as BeachApi from "../../../index.mjs";
@@ -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
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  return t;
21
21
  };
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../core/headers.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
24
24
  import * as core from "../../../../core/index.mjs";
25
25
  import { toJson } from "../../../../core/json.mjs";
26
26
  import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.mjs";
@@ -96,7 +96,7 @@ export class OutboundRequestsClient {
96
96
  }
97
97
  /**
98
98
  * @param {BeachApi.CreateOutboundRequestsRequest} request
99
- * @param {OutboundRequestsClient.RequestOptions} requestOptions - Request-specific configuration.
99
+ * @param {OutboundRequestsClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
100
100
  *
101
101
  * @throws {@link errors.BeachApiError}
102
102
  * @throws {@link errors.BeachApiTimeoutError}
@@ -116,7 +116,7 @@ export class OutboundRequestsClient {
116
116
  return __awaiter(this, void 0, void 0, function* () {
117
117
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
118
118
  const _authRequest = yield this._options.authProvider.getAuthRequest();
119
- 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);
119
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
120
120
  const _response = yield core.fetcher({
121
121
  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"),
122
122
  method: "POST",
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import type * as BeachApi from "../../../index.mjs";
@@ -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
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
20
20
  return t;
21
21
  };
22
22
  import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
23
- import { mergeHeaders } from "../../../../core/headers.mjs";
23
+ import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
24
24
  import * as core from "../../../../core/index.mjs";
25
25
  import { mergeAdditionalBodyParameters } from "../../../../core/requestBody.mjs";
26
26
  import * as environments from "../../../../environments.mjs";
@@ -84,7 +84,7 @@ export class TransfersClient {
84
84
  }
85
85
  /**
86
86
  * @param {BeachApi.CreateTransfersRequest} request
87
- * @param {TransfersClient.RequestOptions} requestOptions - Request-specific configuration.
87
+ * @param {TransfersClient.IdempotentRequestOptions} requestOptions - Request-specific configuration.
88
88
  *
89
89
  * @throws {@link errors.BeachApiError}
90
90
  * @throws {@link errors.BeachApiTimeoutError}
@@ -106,7 +106,7 @@ export class TransfersClient {
106
106
  return __awaiter(this, void 0, void 0, function* () {
107
107
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
108
108
  const _authRequest = yield this._options.authProvider.getAuthRequest();
109
- 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);
109
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "Idempotency-Key": requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
110
110
  const _response = yield core.fetcher({
111
111
  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"),
112
112
  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
  }
@@ -4,11 +4,15 @@ export var CancelTransfersResponse;
4
4
  let Data;
5
5
  (function (Data) {
6
6
  Data.Status = {
7
- PendingReview: "pending_review",
8
- Approved: "approved",
7
+ PendingApproval: "pending_approval",
8
+ Processing: "processing",
9
9
  Completed: "completed",
10
10
  Rejected: "rejected",
11
11
  Cancelled: "cancelled",
12
12
  };
13
+ Data.InitiatedBy = {
14
+ Customer: "customer",
15
+ Vault: "vault",
16
+ };
13
17
  })(Data = CancelTransfersResponse.Data || (CancelTransfersResponse.Data = {}));
14
18
  })(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
  }
@@ -4,11 +4,15 @@ export var CreateTransfersResponse;
4
4
  let Data;
5
5
  (function (Data) {
6
6
  Data.Status = {
7
- PendingReview: "pending_review",
8
- Approved: "approved",
7
+ PendingApproval: "pending_approval",
8
+ Processing: "processing",
9
9
  Completed: "completed",
10
10
  Rejected: "rejected",
11
11
  Cancelled: "cancelled",
12
12
  };
13
+ Data.InitiatedBy = {
14
+ Customer: "customer",
15
+ Vault: "vault",
16
+ };
13
17
  })(Data = CreateTransfersResponse.Data || (CreateTransfersResponse.Data = {}));
14
18
  })(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
  }
@@ -4,11 +4,15 @@ export var GetTransfersResponse;
4
4
  let Data;
5
5
  (function (Data) {
6
6
  Data.Status = {
7
- PendingReview: "pending_review",
8
- Approved: "approved",
7
+ PendingApproval: "pending_approval",
8
+ Processing: "processing",
9
9
  Completed: "completed",
10
10
  Rejected: "rejected",
11
11
  Cancelled: "cancelled",
12
12
  };
13
+ Data.InitiatedBy = {
14
+ Customer: "customer",
15
+ Vault: "vault",
16
+ };
13
17
  })(Data = GetTransfersResponse.Data || (GetTransfersResponse.Data = {}));
14
18
  })(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";
@@ -1,7 +1,7 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  export const ListTransfersRequestStatus = {
3
- PendingReview: "pending_review",
4
- Approved: "approved",
3
+ PendingApproval: "pending_approval",
4
+ Processing: "processing",
5
5
  Completed: "completed",
6
6
  Rejected: "rejected",
7
7
  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 {
@@ -6,12 +6,16 @@ export var ListTransfersResponse;
6
6
  let Item;
7
7
  (function (Item) {
8
8
  Item.Status = {
9
- PendingReview: "pending_review",
10
- Approved: "approved",
9
+ PendingApproval: "pending_approval",
10
+ Processing: "processing",
11
11
  Completed: "completed",
12
12
  Rejected: "rejected",
13
13
  Cancelled: "cancelled",
14
14
  };
15
+ Item.InitiatedBy = {
16
+ Customer: "customer",
17
+ Vault: "vault",
18
+ };
15
19
  })(Item = Data.Item || (Data.Item = {}));
16
20
  })(Data = ListTransfersResponse.Data || (ListTransfersResponse.Data = {}));
17
21
  })(ListTransfersResponse || (ListTransfersResponse = {}));
@@ -1,4 +1,4 @@
1
- import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
1
+ import type { BaseClientOptions, BaseIdempotentRequestOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
3
  import * as core from "../../../../core/index.mjs";
4
4
  import type * as BeachApi from "../../../index.mjs";
@@ -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