@51eat/sdk 0.0.52 → 0.0.54

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 (112) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +17 -12
  4. package/dist/cjs/api/resources/businessShipping/client/Client.d.ts +138 -0
  5. package/dist/cjs/api/resources/businessShipping/client/Client.js +566 -0
  6. package/dist/cjs/api/resources/businessShipping/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/businessShipping/client/index.js +17 -0
  8. package/dist/cjs/api/resources/businessShipping/client/requests/DeleteBusinessShippingRateRequest.d.ts +10 -0
  9. package/dist/cjs/api/resources/businessShipping/client/requests/DeleteBusinessShippingRateRequest.js +3 -0
  10. package/dist/cjs/api/resources/businessShipping/client/requests/SetupShippingAccountRequest.d.ts +12 -0
  11. package/dist/cjs/api/resources/businessShipping/client/requests/SetupShippingAccountRequest.js +3 -0
  12. package/dist/cjs/api/resources/businessShipping/client/requests/StoreShippingRateRequest.d.ts +23 -0
  13. package/dist/cjs/api/resources/businessShipping/client/requests/StoreShippingRateRequest.js +11 -0
  14. package/dist/cjs/api/resources/businessShipping/client/requests/UpdateShippingAccountRequest.d.ts +9 -0
  15. package/dist/cjs/api/resources/businessShipping/client/requests/UpdateShippingAccountRequest.js +3 -0
  16. package/dist/cjs/api/resources/businessShipping/client/requests/UpdateShippingRateRequest.d.ts +26 -0
  17. package/dist/cjs/api/resources/businessShipping/client/requests/UpdateShippingRateRequest.js +11 -0
  18. package/dist/cjs/api/resources/businessShipping/client/requests/index.d.ts +5 -0
  19. package/dist/cjs/api/resources/businessShipping/client/requests/index.js +7 -0
  20. package/dist/cjs/api/resources/businessShipping/exports.d.ts +2 -0
  21. package/dist/cjs/api/resources/businessShipping/exports.js +21 -0
  22. package/dist/cjs/api/resources/businessShipping/index.d.ts +2 -0
  23. package/dist/cjs/api/resources/businessShipping/index.js +18 -0
  24. package/dist/cjs/api/resources/businessShipping/types/CreateBusinessShippingRateResponse.d.ts +4 -0
  25. package/dist/cjs/api/resources/businessShipping/types/CreateBusinessShippingRateResponse.js +3 -0
  26. package/dist/cjs/api/resources/businessShipping/types/GetBusinessShippingAccountResponse.d.ts +6 -0
  27. package/dist/cjs/api/resources/businessShipping/types/GetBusinessShippingAccountResponse.js +3 -0
  28. package/dist/cjs/api/resources/businessShipping/types/GetBusinessShippingSetupIntentResponse.d.ts +3 -0
  29. package/dist/cjs/api/resources/businessShipping/types/GetBusinessShippingSetupIntentResponse.js +3 -0
  30. package/dist/cjs/api/resources/businessShipping/types/ListBusinessShippingRatesResponse.d.ts +4 -0
  31. package/dist/cjs/api/resources/businessShipping/types/ListBusinessShippingRatesResponse.js +3 -0
  32. package/dist/cjs/api/resources/businessShipping/types/UpdateBusinessShippingAccountResponse.d.ts +4 -0
  33. package/dist/cjs/api/resources/businessShipping/types/UpdateBusinessShippingAccountResponse.js +3 -0
  34. package/dist/cjs/api/resources/businessShipping/types/UpdateBusinessShippingRateResponse.d.ts +4 -0
  35. package/dist/cjs/api/resources/businessShipping/types/UpdateBusinessShippingRateResponse.js +3 -0
  36. package/dist/cjs/api/resources/businessShipping/types/index.d.ts +6 -0
  37. package/dist/cjs/api/resources/businessShipping/types/index.js +22 -0
  38. package/dist/cjs/api/resources/customer/resources/cart/client/Client.d.ts +8 -8
  39. package/dist/cjs/api/resources/customer/resources/cart/client/Client.js +8 -8
  40. package/dist/cjs/api/resources/customer/resources/cart/client/requests/CheckoutRequest.d.ts +1 -6
  41. package/dist/cjs/api/resources/customer/resources/cart/client/requests/CheckoutRequest.js +0 -4
  42. package/dist/cjs/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.d.ts +1 -6
  43. package/dist/cjs/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.js +0 -4
  44. package/dist/cjs/api/resources/customer/resources/cart/client/requests/SelectShippingOptionRequest.d.ts +2 -3
  45. package/dist/cjs/api/resources/customer/resources/cart/types/SelectShippingOptionCartResponse.d.ts +7 -2
  46. package/dist/cjs/api/resources/index.d.ts +3 -0
  47. package/dist/cjs/api/resources/index.js +4 -1
  48. package/dist/cjs/api/types/ShippingAccountResource.d.ts +10 -0
  49. package/dist/cjs/api/types/ShippingAccountResource.js +3 -0
  50. package/dist/cjs/api/types/ShippingRateResource.d.ts +12 -0
  51. package/dist/cjs/api/types/ShippingRateResource.js +3 -0
  52. package/dist/cjs/api/types/index.d.ts +2 -0
  53. package/dist/cjs/api/types/index.js +2 -0
  54. package/dist/cjs/version.d.ts +1 -1
  55. package/dist/cjs/version.js +1 -1
  56. package/dist/esm/BaseClient.mjs +2 -2
  57. package/dist/esm/Client.d.mts +3 -0
  58. package/dist/esm/Client.mjs +5 -0
  59. package/dist/esm/api/resources/businessShipping/client/Client.d.mts +138 -0
  60. package/dist/esm/api/resources/businessShipping/client/Client.mjs +529 -0
  61. package/dist/esm/api/resources/businessShipping/client/index.d.mts +1 -0
  62. package/dist/esm/api/resources/businessShipping/client/index.mjs +1 -0
  63. package/dist/esm/api/resources/businessShipping/client/requests/DeleteBusinessShippingRateRequest.d.mts +10 -0
  64. package/dist/esm/api/resources/businessShipping/client/requests/DeleteBusinessShippingRateRequest.mjs +2 -0
  65. package/dist/esm/api/resources/businessShipping/client/requests/SetupShippingAccountRequest.d.mts +12 -0
  66. package/dist/esm/api/resources/businessShipping/client/requests/SetupShippingAccountRequest.mjs +2 -0
  67. package/dist/esm/api/resources/businessShipping/client/requests/StoreShippingRateRequest.d.mts +23 -0
  68. package/dist/esm/api/resources/businessShipping/client/requests/StoreShippingRateRequest.mjs +8 -0
  69. package/dist/esm/api/resources/businessShipping/client/requests/UpdateShippingAccountRequest.d.mts +9 -0
  70. package/dist/esm/api/resources/businessShipping/client/requests/UpdateShippingAccountRequest.mjs +2 -0
  71. package/dist/esm/api/resources/businessShipping/client/requests/UpdateShippingRateRequest.d.mts +26 -0
  72. package/dist/esm/api/resources/businessShipping/client/requests/UpdateShippingRateRequest.mjs +8 -0
  73. package/dist/esm/api/resources/businessShipping/client/requests/index.d.mts +5 -0
  74. package/dist/esm/api/resources/businessShipping/client/requests/index.mjs +2 -0
  75. package/dist/esm/api/resources/businessShipping/exports.d.mts +2 -0
  76. package/dist/esm/api/resources/businessShipping/exports.mjs +3 -0
  77. package/dist/esm/api/resources/businessShipping/index.d.mts +2 -0
  78. package/dist/esm/api/resources/businessShipping/index.mjs +2 -0
  79. package/dist/esm/api/resources/businessShipping/types/CreateBusinessShippingRateResponse.d.mts +4 -0
  80. package/dist/esm/api/resources/businessShipping/types/CreateBusinessShippingRateResponse.mjs +2 -0
  81. package/dist/esm/api/resources/businessShipping/types/GetBusinessShippingAccountResponse.d.mts +6 -0
  82. package/dist/esm/api/resources/businessShipping/types/GetBusinessShippingAccountResponse.mjs +2 -0
  83. package/dist/esm/api/resources/businessShipping/types/GetBusinessShippingSetupIntentResponse.d.mts +3 -0
  84. package/dist/esm/api/resources/businessShipping/types/GetBusinessShippingSetupIntentResponse.mjs +2 -0
  85. package/dist/esm/api/resources/businessShipping/types/ListBusinessShippingRatesResponse.d.mts +4 -0
  86. package/dist/esm/api/resources/businessShipping/types/ListBusinessShippingRatesResponse.mjs +2 -0
  87. package/dist/esm/api/resources/businessShipping/types/UpdateBusinessShippingAccountResponse.d.mts +4 -0
  88. package/dist/esm/api/resources/businessShipping/types/UpdateBusinessShippingAccountResponse.mjs +2 -0
  89. package/dist/esm/api/resources/businessShipping/types/UpdateBusinessShippingRateResponse.d.mts +4 -0
  90. package/dist/esm/api/resources/businessShipping/types/UpdateBusinessShippingRateResponse.mjs +2 -0
  91. package/dist/esm/api/resources/businessShipping/types/index.d.mts +6 -0
  92. package/dist/esm/api/resources/businessShipping/types/index.mjs +6 -0
  93. package/dist/esm/api/resources/customer/resources/cart/client/Client.d.mts +8 -8
  94. package/dist/esm/api/resources/customer/resources/cart/client/Client.mjs +8 -8
  95. package/dist/esm/api/resources/customer/resources/cart/client/requests/CheckoutRequest.d.mts +1 -6
  96. package/dist/esm/api/resources/customer/resources/cart/client/requests/CheckoutRequest.mjs +0 -4
  97. package/dist/esm/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.d.mts +1 -6
  98. package/dist/esm/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentRequest.mjs +0 -4
  99. package/dist/esm/api/resources/customer/resources/cart/client/requests/SelectShippingOptionRequest.d.mts +2 -3
  100. package/dist/esm/api/resources/customer/resources/cart/types/SelectShippingOptionCartResponse.d.mts +7 -2
  101. package/dist/esm/api/resources/index.d.mts +3 -0
  102. package/dist/esm/api/resources/index.mjs +3 -0
  103. package/dist/esm/api/types/ShippingAccountResource.d.mts +10 -0
  104. package/dist/esm/api/types/ShippingAccountResource.mjs +2 -0
  105. package/dist/esm/api/types/ShippingRateResource.d.mts +12 -0
  106. package/dist/esm/api/types/ShippingRateResource.mjs +2 -0
  107. package/dist/esm/api/types/index.d.mts +2 -0
  108. package/dist/esm/api/types/index.mjs +2 -0
  109. package/dist/esm/version.d.mts +1 -1
  110. package/dist/esm/version.mjs +1 -1
  111. package/package.json +12 -1
  112. package/reference.md +460 -8
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.StoreShippingRateRequest = void 0;
5
+ var StoreShippingRateRequest;
6
+ (function (StoreShippingRateRequest) {
7
+ StoreShippingRateRequest.RateType = {
8
+ Flat: "flat",
9
+ Free: "free",
10
+ };
11
+ })(StoreShippingRateRequest || (exports.StoreShippingRateRequest = StoreShippingRateRequest = {}));
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface UpdateShippingAccountRequest {
6
+ ship_from_name?: string | null;
7
+ ship_from_phone?: string | null;
8
+ live_rates_enabled?: boolean;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * shippingRate: "shippingRate",
5
+ * name: "name",
6
+ * rate_type: "flat"
7
+ * }
8
+ */
9
+ export interface UpdateShippingRateRequest {
10
+ /** The shipping rate ID */
11
+ shippingRate: string;
12
+ name: string;
13
+ rate_type: UpdateShippingRateRequest.RateType;
14
+ flat_rate?: number | null;
15
+ free_shipping_threshold?: number | null;
16
+ estimated_days_min?: number | null;
17
+ estimated_days_max?: number | null;
18
+ is_active?: boolean;
19
+ }
20
+ export declare namespace UpdateShippingRateRequest {
21
+ const RateType: {
22
+ readonly Flat: "flat";
23
+ readonly Free: "free";
24
+ };
25
+ type RateType = (typeof RateType)[keyof typeof RateType];
26
+ }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.UpdateShippingRateRequest = void 0;
5
+ var UpdateShippingRateRequest;
6
+ (function (UpdateShippingRateRequest) {
7
+ UpdateShippingRateRequest.RateType = {
8
+ Flat: "flat",
9
+ Free: "free",
10
+ };
11
+ })(UpdateShippingRateRequest || (exports.UpdateShippingRateRequest = UpdateShippingRateRequest = {}));
@@ -0,0 +1,5 @@
1
+ export type { DeleteBusinessShippingRateRequest } from "./DeleteBusinessShippingRateRequest.js";
2
+ export type { SetupShippingAccountRequest } from "./SetupShippingAccountRequest.js";
3
+ export { StoreShippingRateRequest } from "./StoreShippingRateRequest.js";
4
+ export type { UpdateShippingAccountRequest } from "./UpdateShippingAccountRequest.js";
5
+ export { UpdateShippingRateRequest } from "./UpdateShippingRateRequest.js";
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateShippingRateRequest = exports.StoreShippingRateRequest = void 0;
4
+ var StoreShippingRateRequest_js_1 = require("./StoreShippingRateRequest.js");
5
+ Object.defineProperty(exports, "StoreShippingRateRequest", { enumerable: true, get: function () { return StoreShippingRateRequest_js_1.StoreShippingRateRequest; } });
6
+ var UpdateShippingRateRequest_js_1 = require("./UpdateShippingRateRequest.js");
7
+ Object.defineProperty(exports, "UpdateShippingRateRequest", { enumerable: true, get: function () { return UpdateShippingRateRequest_js_1.UpdateShippingRateRequest; } });
@@ -0,0 +1,2 @@
1
+ export { BusinessShippingClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.BusinessShippingClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "BusinessShippingClient", { enumerable: true, get: function () { return Client_js_1.BusinessShippingClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../index.js";
2
+ export interface CreateBusinessShippingRateResponse {
3
+ data: FiveOneEat.ShippingRateResource;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import type * as FiveOneEat from "../../../index.js";
2
+ export type GetBusinessShippingAccountResponse = {
3
+ data: FiveOneEat.ShippingAccountResource;
4
+ } | {
5
+ data: unknown | null;
6
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ export interface GetBusinessShippingSetupIntentResponse {
2
+ client_secret: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../index.js";
2
+ export interface ListBusinessShippingRatesResponse {
3
+ data: FiveOneEat.ShippingRateResource[];
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../index.js";
2
+ export interface UpdateBusinessShippingAccountResponse {
3
+ data: FiveOneEat.ShippingAccountResource;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../index.js";
2
+ export interface UpdateBusinessShippingRateResponse {
3
+ data: FiveOneEat.ShippingRateResource;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export * from "./CreateBusinessShippingRateResponse.js";
2
+ export * from "./GetBusinessShippingAccountResponse.js";
3
+ export * from "./GetBusinessShippingSetupIntentResponse.js";
4
+ export * from "./ListBusinessShippingRatesResponse.js";
5
+ export * from "./UpdateBusinessShippingAccountResponse.js";
6
+ export * from "./UpdateBusinessShippingRateResponse.js";
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./CreateBusinessShippingRateResponse.js"), exports);
18
+ __exportStar(require("./GetBusinessShippingAccountResponse.js"), exports);
19
+ __exportStar(require("./GetBusinessShippingSetupIntentResponse.js"), exports);
20
+ __exportStar(require("./ListBusinessShippingRatesResponse.js"), exports);
21
+ __exportStar(require("./UpdateBusinessShippingAccountResponse.js"), exports);
22
+ __exportStar(require("./UpdateBusinessShippingRateResponse.js"), exports);
@@ -133,9 +133,10 @@ export declare class CartClient {
133
133
  removeItem(request: FiveOneEat.customer.RemoveItemCartRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.RemoveItemCartResponse>;
134
134
  private __removeItem;
135
135
  /**
136
- * Returns available shipping rates for the given address. For calculated rates,
137
- * fetches live rates from the shipping provider and caches for 10 minutes.
138
- * Pass the returned `provider_rate_id` to the select shipping option endpoint.
136
+ * Returns flat/free rates and live carrier rates (if enabled) for the given address.
137
+ * Free-shipping thresholds are applied automatically — qualifying rates show as $0.
138
+ * Cache live rates for 10 minutes per address/cart combination.
139
+ * Pass `shipping_rate_id` for flat/free options, or `provider_rate_id` for live rates.
139
140
  *
140
141
  * @param {FiveOneEat.customer.GetShippingOptionsRequest} request
141
142
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -157,9 +158,9 @@ export declare class CartClient {
157
158
  getShippingOptions(request: FiveOneEat.customer.GetShippingOptionsRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<unknown[]>;
158
159
  private __getShippingOptions;
159
160
  /**
160
- * Saves the shipping amount and method to the cart server-side.
161
- * For calculated rates, resolves the amount from cache using the provider_rate_id
162
- * returned by the shipping options endpoint. The client never submits an amount.
161
+ * Pass either `shipping_rate_id` (for flat/free rates) or `provider_rate_id`
162
+ * (for live carrier rates). Never both. Amounts are resolved server-side —
163
+ * the client never submits a price.
163
164
  *
164
165
  * @param {FiveOneEat.customer.SelectShippingOptionRequest} request
165
166
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -170,8 +171,7 @@ export declare class CartClient {
170
171
  *
171
172
  * @example
172
173
  * await client.customer.cart.selectShippingOption({
173
- * business: "katzs-deli",
174
- * shipping_rate_id: "shipping_rate_id"
174
+ * business: "katzs-deli"
175
175
  * })
176
176
  */
177
177
  selectShippingOption(request: FiveOneEat.customer.SelectShippingOptionRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.SelectShippingOptionCartResponse>;
@@ -487,9 +487,10 @@ class CartClient {
487
487
  });
488
488
  }
489
489
  /**
490
- * Returns available shipping rates for the given address. For calculated rates,
491
- * fetches live rates from the shipping provider and caches for 10 minutes.
492
- * Pass the returned `provider_rate_id` to the select shipping option endpoint.
490
+ * Returns flat/free rates and live carrier rates (if enabled) for the given address.
491
+ * Free-shipping thresholds are applied automatically — qualifying rates show as $0.
492
+ * Cache live rates for 10 minutes per address/cart combination.
493
+ * Pass `shipping_rate_id` for flat/free options, or `provider_rate_id` for live rates.
493
494
  *
494
495
  * @param {FiveOneEat.customer.GetShippingOptionsRequest} request
495
496
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -552,9 +553,9 @@ class CartClient {
552
553
  });
553
554
  }
554
555
  /**
555
- * Saves the shipping amount and method to the cart server-side.
556
- * For calculated rates, resolves the amount from cache using the provider_rate_id
557
- * returned by the shipping options endpoint. The client never submits an amount.
556
+ * Pass either `shipping_rate_id` (for flat/free rates) or `provider_rate_id`
557
+ * (for live carrier rates). Never both. Amounts are resolved server-side —
558
+ * the client never submits a price.
558
559
  *
559
560
  * @param {FiveOneEat.customer.SelectShippingOptionRequest} request
560
561
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -565,8 +566,7 @@ class CartClient {
565
566
  *
566
567
  * @example
567
568
  * await client.customer.cart.selectShippingOption({
568
- * business: "katzs-deli",
569
- * shipping_rate_id: "shipping_rate_id"
569
+ * business: "katzs-deli"
570
570
  * })
571
571
  */
572
572
  selectShippingOption(request, requestOptions) {
@@ -17,7 +17,7 @@ export interface CheckoutRequest {
17
17
  business: string;
18
18
  payment_intent_id: string;
19
19
  fulfillment_method?: CheckoutRequest.FulfillmentMethod | null;
20
- pickup_date?: CheckoutRequest.PickupDate | null;
20
+ pickup_date?: string | null;
21
21
  pickup_time?: string | null;
22
22
  billing_address: CheckoutRequest.BillingAddress;
23
23
  shipping_address?: CheckoutRequest.ShippingAddress;
@@ -28,11 +28,6 @@ export declare namespace CheckoutRequest {
28
28
  readonly Pickup: "pickup";
29
29
  };
30
30
  type FulfillmentMethod = (typeof FulfillmentMethod)[keyof typeof FulfillmentMethod];
31
- const PickupDate: {
32
- readonly Today: "today";
33
- readonly Tomorrow: "tomorrow";
34
- };
35
- type PickupDate = (typeof PickupDate)[keyof typeof PickupDate];
36
31
  interface BillingAddress {
37
32
  line1: string;
38
33
  city: string;
@@ -8,8 +8,4 @@ var CheckoutRequest;
8
8
  Shipping: "shipping",
9
9
  Pickup: "pickup",
10
10
  };
11
- CheckoutRequest.PickupDate = {
12
- Today: "today",
13
- Tomorrow: "tomorrow",
14
- };
15
11
  })(CheckoutRequest || (exports.CheckoutRequest = CheckoutRequest = {}));
@@ -15,7 +15,7 @@ export interface CreatePaymentIntentRequest {
15
15
  /** The business handle */
16
16
  business: string;
17
17
  fulfillment_method?: CreatePaymentIntentRequest.FulfillmentMethod | null;
18
- pickup_date?: CreatePaymentIntentRequest.PickupDate | null;
18
+ pickup_date?: string | null;
19
19
  pickup_time?: string | null;
20
20
  payment_method_id?: string | null;
21
21
  billing_address: CreatePaymentIntentRequest.BillingAddress;
@@ -27,11 +27,6 @@ export declare namespace CreatePaymentIntentRequest {
27
27
  readonly Pickup: "pickup";
28
28
  };
29
29
  type FulfillmentMethod = (typeof FulfillmentMethod)[keyof typeof FulfillmentMethod];
30
- const PickupDate: {
31
- readonly Today: "today";
32
- readonly Tomorrow: "tomorrow";
33
- };
34
- type PickupDate = (typeof PickupDate)[keyof typeof PickupDate];
35
30
  interface BillingAddress {
36
31
  line1: string;
37
32
  city: string;
@@ -8,8 +8,4 @@ var CreatePaymentIntentRequest;
8
8
  Shipping: "shipping",
9
9
  Pickup: "pickup",
10
10
  };
11
- CreatePaymentIntentRequest.PickupDate = {
12
- Today: "today",
13
- Tomorrow: "tomorrow",
14
- };
15
11
  })(CreatePaymentIntentRequest || (exports.CreatePaymentIntentRequest = CreatePaymentIntentRequest = {}));
@@ -1,13 +1,12 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * business: "katzs-deli",
5
- * shipping_rate_id: "shipping_rate_id"
4
+ * business: "katzs-deli"
6
5
  * }
7
6
  */
8
7
  export interface SelectShippingOptionRequest {
9
8
  /** The business handle */
10
9
  business: string;
11
- shipping_rate_id: string;
10
+ shipping_rate_id?: string | null;
12
11
  provider_rate_id?: string | null;
13
12
  }
@@ -1,6 +1,11 @@
1
- export interface SelectShippingOptionCartResponse {
1
+ export type SelectShippingOptionCartResponse = {
2
2
  shipping_amount: string;
3
3
  shipping_amount_cents: number;
4
4
  shipping_method: string;
5
5
  total_amount: string;
6
- }
6
+ } | {
7
+ shipping_amount: string;
8
+ shipping_amount_cents: number;
9
+ shipping_method: string;
10
+ total_amount: string;
11
+ };
@@ -5,6 +5,9 @@ export * from "./businessMessaging/types/index.js";
5
5
  export * from "./businessProducts/client/requests/index.js";
6
6
  export * as businessProducts from "./businessProducts/index.js";
7
7
  export * from "./businessProducts/types/index.js";
8
+ export * from "./businessShipping/client/requests/index.js";
9
+ export * as businessShipping from "./businessShipping/index.js";
10
+ export * from "./businessShipping/types/index.js";
8
11
  export * from "./customer/client/requests/index.js";
9
12
  export * as customer from "./customer/index.js";
10
13
  export * from "./customer/types/index.js";
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.serveAd = exports.recordClick = exports.customerMyAccount = exports.customerMessaging = exports.customerEvents = exports.customer = exports.businessProducts = exports.businessMessaging = exports.business = void 0;
39
+ exports.serveAd = exports.recordClick = exports.customerMyAccount = exports.customerMessaging = exports.customerEvents = exports.customer = exports.businessShipping = exports.businessProducts = exports.businessMessaging = exports.business = void 0;
40
40
  exports.business = __importStar(require("./business/index.js"));
41
41
  __exportStar(require("./businessMessaging/client/requests/index.js"), exports);
42
42
  exports.businessMessaging = __importStar(require("./businessMessaging/index.js"));
@@ -44,6 +44,9 @@ __exportStar(require("./businessMessaging/types/index.js"), exports);
44
44
  __exportStar(require("./businessProducts/client/requests/index.js"), exports);
45
45
  exports.businessProducts = __importStar(require("./businessProducts/index.js"));
46
46
  __exportStar(require("./businessProducts/types/index.js"), exports);
47
+ __exportStar(require("./businessShipping/client/requests/index.js"), exports);
48
+ exports.businessShipping = __importStar(require("./businessShipping/index.js"));
49
+ __exportStar(require("./businessShipping/types/index.js"), exports);
47
50
  __exportStar(require("./customer/client/requests/index.js"), exports);
48
51
  exports.customer = __importStar(require("./customer/index.js"));
49
52
  __exportStar(require("./customer/types/index.js"), exports);
@@ -0,0 +1,10 @@
1
+ export interface ShippingAccountResource {
2
+ id: string;
3
+ ship_from_name: string;
4
+ ship_from_phone: string | null;
5
+ is_active: boolean;
6
+ live_rates_enabled: boolean;
7
+ card?: string | undefined;
8
+ created_at: string | null;
9
+ updated_at: string | null;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ export interface ShippingRateResource {
2
+ id: string;
3
+ name: string;
4
+ rate_type: string;
5
+ flat_rate: number | null;
6
+ free_shipping_threshold: number | null;
7
+ estimated_days_min: string;
8
+ estimated_days_max: string;
9
+ is_active: string;
10
+ created_at: string;
11
+ updated_at: string;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -132,6 +132,8 @@ export * from "./RsvpItem.js";
132
132
  export * from "./RsvpResponse.js";
133
133
  export * from "./SearchResults.js";
134
134
  export * from "./ServiceUnavailableErrorBody.js";
135
+ export * from "./ShippingAccountResource.js";
136
+ export * from "./ShippingRateResource.js";
135
137
  export * from "./StoreAddressRequest.js";
136
138
  export * from "./StoreProductImageRequest.js";
137
139
  export * from "./Ticket.js";
@@ -148,6 +148,8 @@ __exportStar(require("./RsvpItem.js"), exports);
148
148
  __exportStar(require("./RsvpResponse.js"), exports);
149
149
  __exportStar(require("./SearchResults.js"), exports);
150
150
  __exportStar(require("./ServiceUnavailableErrorBody.js"), exports);
151
+ __exportStar(require("./ShippingAccountResource.js"), exports);
152
+ __exportStar(require("./ShippingRateResource.js"), exports);
151
153
  __exportStar(require("./StoreAddressRequest.js"), exports);
152
154
  __exportStar(require("./StoreProductImageRequest.js"), exports);
153
155
  __exportStar(require("./Ticket.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.52";
1
+ export declare const SDK_VERSION = "0.0.54";
@@ -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.52";
4
+ exports.SDK_VERSION = "0.0.54";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@51eat/sdk",
9
- "X-Fern-SDK-Version": "0.0.52",
10
- "User-Agent": "@51eat/sdk/0.0.52",
9
+ "X-Fern-SDK-Version": "0.0.54",
10
+ "User-Agent": "@51eat/sdk/0.0.54",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -1,6 +1,7 @@
1
1
  import { BusinessClient } from "./api/resources/business/client/Client.mjs";
2
2
  import { BusinessMessagingClient } from "./api/resources/businessMessaging/client/Client.mjs";
3
3
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.mjs";
4
+ import { BusinessShippingClient } from "./api/resources/businessShipping/client/Client.mjs";
4
5
  import { CustomerClient } from "./api/resources/customer/client/Client.mjs";
5
6
  import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.mjs";
6
7
  import { CustomerMessagingClient } from "./api/resources/customerMessaging/client/Client.mjs";
@@ -19,6 +20,7 @@ export declare class FiveOneEatClient {
19
20
  protected readonly _options: NormalizedClientOptionsWithAuth<FiveOneEatClient.Options>;
20
21
  protected _businessMessaging: BusinessMessagingClient | undefined;
21
22
  protected _businessProducts: BusinessProductsClient | undefined;
23
+ protected _businessShipping: BusinessShippingClient | undefined;
22
24
  protected _customerEvents: CustomerEventsClient | undefined;
23
25
  protected _customerMessaging: CustomerMessagingClient | undefined;
24
26
  protected _customerMyAccount: CustomerMyAccountClient | undefined;
@@ -29,6 +31,7 @@ export declare class FiveOneEatClient {
29
31
  constructor(options?: FiveOneEatClient.Options);
30
32
  get businessMessaging(): BusinessMessagingClient;
31
33
  get businessProducts(): BusinessProductsClient;
34
+ get businessShipping(): BusinessShippingClient;
32
35
  get customerEvents(): CustomerEventsClient;
33
36
  get customerMessaging(): CustomerMessagingClient;
34
37
  get customerMyAccount(): CustomerMyAccountClient;
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  import { BusinessClient } from "./api/resources/business/client/Client.mjs";
12
12
  import { BusinessMessagingClient } from "./api/resources/businessMessaging/client/Client.mjs";
13
13
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.mjs";
14
+ import { BusinessShippingClient } from "./api/resources/businessShipping/client/Client.mjs";
14
15
  import { CustomerClient } from "./api/resources/customer/client/Client.mjs";
15
16
  import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.mjs";
16
17
  import { CustomerMessagingClient } from "./api/resources/customerMessaging/client/Client.mjs";
@@ -31,6 +32,10 @@ export class FiveOneEatClient {
31
32
  var _a;
32
33
  return ((_a = this._businessProducts) !== null && _a !== void 0 ? _a : (this._businessProducts = new BusinessProductsClient(this._options)));
33
34
  }
35
+ get businessShipping() {
36
+ var _a;
37
+ return ((_a = this._businessShipping) !== null && _a !== void 0 ? _a : (this._businessShipping = new BusinessShippingClient(this._options)));
38
+ }
34
39
  get customerEvents() {
35
40
  var _a;
36
41
  return ((_a = this._customerEvents) !== null && _a !== void 0 ? _a : (this._customerEvents = new CustomerEventsClient(this._options)));