@51eat/sdk 0.0.60 → 0.0.62

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 (115) hide show
  1. package/README.md +13 -15
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +3 -0
  4. package/dist/cjs/Client.js +25 -20
  5. package/dist/cjs/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.d.ts +0 -9
  6. package/dist/cjs/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.ts +0 -9
  7. package/dist/cjs/api/resources/business/resources/products/client/requests/StoreProductRequest.d.ts +1 -0
  8. package/dist/cjs/api/resources/business/resources/products/client/requests/UpdateProductRequest.d.ts +1 -0
  9. package/dist/cjs/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.ts +0 -11
  10. package/dist/cjs/api/resources/businessHours/client/Client.d.ts +91 -0
  11. package/dist/cjs/api/resources/businessHours/client/Client.js +361 -0
  12. package/dist/cjs/api/resources/businessHours/client/index.d.ts +1 -0
  13. package/dist/cjs/api/resources/businessHours/client/index.js +17 -0
  14. package/dist/cjs/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.d.ts +10 -0
  15. package/dist/cjs/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.js +3 -0
  16. package/dist/cjs/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.d.ts +16 -0
  17. package/dist/cjs/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.js +3 -0
  18. package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.d.ts +19 -0
  19. package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.js +3 -0
  20. package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.d.ts +25 -0
  21. package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.js +3 -0
  22. package/dist/cjs/api/resources/businessHours/client/requests/index.d.ts +4 -0
  23. package/dist/cjs/api/resources/businessHours/client/requests/index.js +2 -0
  24. package/dist/cjs/api/resources/businessHours/exports.d.ts +2 -0
  25. package/dist/cjs/api/resources/businessHours/exports.js +21 -0
  26. package/dist/cjs/api/resources/businessHours/index.d.ts +2 -0
  27. package/dist/cjs/api/resources/businessHours/index.js +18 -0
  28. package/dist/cjs/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.d.ts +4 -0
  29. package/dist/cjs/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.js +3 -0
  30. package/dist/cjs/api/resources/businessHours/types/GetBusinessHoursResponse.d.ts +4 -0
  31. package/dist/cjs/api/resources/businessHours/types/GetBusinessHoursResponse.js +3 -0
  32. package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.d.ts +4 -0
  33. package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.js +3 -0
  34. package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHoursResponse.d.ts +4 -0
  35. package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHoursResponse.js +3 -0
  36. package/dist/cjs/api/resources/businessHours/types/index.d.ts +4 -0
  37. package/dist/cjs/api/resources/businessHours/types/index.js +20 -0
  38. package/dist/cjs/api/resources/index.d.ts +3 -0
  39. package/dist/cjs/api/resources/index.js +4 -1
  40. package/dist/cjs/api/types/BusinessHourExceptionResource.d.ts +10 -0
  41. package/dist/cjs/api/types/BusinessHourExceptionResource.js +3 -0
  42. package/dist/cjs/api/types/BusinessHourSlotResource.d.ts +6 -0
  43. package/dist/cjs/api/types/BusinessHourSlotResource.js +3 -0
  44. package/dist/cjs/api/types/BusinessHoursResource.d.ts +7 -0
  45. package/dist/cjs/api/types/BusinessHoursResource.js +3 -0
  46. package/dist/cjs/api/types/BusinessInventoryLog.d.ts +2 -2
  47. package/dist/cjs/api/types/BusinessProfile.d.ts +6 -7
  48. package/dist/cjs/api/types/BusinessScheduleDayResource.d.ts +5 -0
  49. package/dist/cjs/api/types/BusinessScheduleDayResource.js +3 -0
  50. package/dist/cjs/api/types/CustomerBusinessProfile.d.ts +6 -7
  51. package/dist/cjs/api/types/CustomerCartItem.d.ts +1 -1
  52. package/dist/cjs/api/types/CustomerEventDetail.d.ts +1 -1
  53. package/dist/cjs/api/types/EventFeedItem.d.ts +1 -1
  54. package/dist/cjs/api/types/index.d.ts +4 -0
  55. package/dist/cjs/api/types/index.js +4 -0
  56. package/dist/cjs/version.d.ts +1 -1
  57. package/dist/cjs/version.js +1 -1
  58. package/dist/esm/BaseClient.mjs +2 -2
  59. package/dist/esm/Client.d.mts +3 -0
  60. package/dist/esm/Client.mjs +5 -0
  61. package/dist/esm/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.d.mts +0 -9
  62. package/dist/esm/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.mts +0 -9
  63. package/dist/esm/api/resources/business/resources/products/client/requests/StoreProductRequest.d.mts +1 -0
  64. package/dist/esm/api/resources/business/resources/products/client/requests/UpdateProductRequest.d.mts +1 -0
  65. package/dist/esm/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.mts +0 -11
  66. package/dist/esm/api/resources/businessHours/client/Client.d.mts +91 -0
  67. package/dist/esm/api/resources/businessHours/client/Client.mjs +324 -0
  68. package/dist/esm/api/resources/businessHours/client/index.d.mts +1 -0
  69. package/dist/esm/api/resources/businessHours/client/index.mjs +1 -0
  70. package/dist/esm/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.d.mts +10 -0
  71. package/dist/esm/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.mjs +2 -0
  72. package/dist/esm/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.d.mts +16 -0
  73. package/dist/esm/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.mjs +2 -0
  74. package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.d.mts +19 -0
  75. package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.mjs +2 -0
  76. package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.d.mts +25 -0
  77. package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.mjs +2 -0
  78. package/dist/esm/api/resources/businessHours/client/requests/index.d.mts +4 -0
  79. package/dist/esm/api/resources/businessHours/client/requests/index.mjs +1 -0
  80. package/dist/esm/api/resources/businessHours/exports.d.mts +2 -0
  81. package/dist/esm/api/resources/businessHours/exports.mjs +3 -0
  82. package/dist/esm/api/resources/businessHours/index.d.mts +2 -0
  83. package/dist/esm/api/resources/businessHours/index.mjs +2 -0
  84. package/dist/esm/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.d.mts +4 -0
  85. package/dist/esm/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.mjs +2 -0
  86. package/dist/esm/api/resources/businessHours/types/GetBusinessHoursResponse.d.mts +4 -0
  87. package/dist/esm/api/resources/businessHours/types/GetBusinessHoursResponse.mjs +2 -0
  88. package/dist/esm/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.d.mts +4 -0
  89. package/dist/esm/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.mjs +2 -0
  90. package/dist/esm/api/resources/businessHours/types/UpdateBusinessHoursResponse.d.mts +4 -0
  91. package/dist/esm/api/resources/businessHours/types/UpdateBusinessHoursResponse.mjs +2 -0
  92. package/dist/esm/api/resources/businessHours/types/index.d.mts +4 -0
  93. package/dist/esm/api/resources/businessHours/types/index.mjs +4 -0
  94. package/dist/esm/api/resources/index.d.mts +3 -0
  95. package/dist/esm/api/resources/index.mjs +3 -0
  96. package/dist/esm/api/types/BusinessHourExceptionResource.d.mts +10 -0
  97. package/dist/esm/api/types/BusinessHourExceptionResource.mjs +2 -0
  98. package/dist/esm/api/types/BusinessHourSlotResource.d.mts +6 -0
  99. package/dist/esm/api/types/BusinessHourSlotResource.mjs +2 -0
  100. package/dist/esm/api/types/BusinessHoursResource.d.mts +7 -0
  101. package/dist/esm/api/types/BusinessHoursResource.mjs +2 -0
  102. package/dist/esm/api/types/BusinessInventoryLog.d.mts +2 -2
  103. package/dist/esm/api/types/BusinessProfile.d.mts +6 -7
  104. package/dist/esm/api/types/BusinessScheduleDayResource.d.mts +5 -0
  105. package/dist/esm/api/types/BusinessScheduleDayResource.mjs +2 -0
  106. package/dist/esm/api/types/CustomerBusinessProfile.d.mts +6 -7
  107. package/dist/esm/api/types/CustomerCartItem.d.mts +1 -1
  108. package/dist/esm/api/types/CustomerEventDetail.d.mts +1 -1
  109. package/dist/esm/api/types/EventFeedItem.d.mts +1 -1
  110. package/dist/esm/api/types/index.d.mts +4 -0
  111. package/dist/esm/api/types/index.mjs +4 -0
  112. package/dist/esm/version.d.mts +1 -1
  113. package/dist/esm/version.mjs +1 -1
  114. package/package.json +12 -1
  115. package/reference.md +253 -0
package/README.md CHANGED
@@ -45,11 +45,9 @@ Instantiate and use the client with the following:
45
45
  import { FiveOneEatClient } from "@51eat/sdk";
46
46
 
47
47
  const client = new FiveOneEatClient({ token: "YOUR_TOKEN" });
48
- await client.businessProducts.adjustVariantInventory({
49
- variant: "variant",
50
- type: "add",
51
- quantity: 1,
52
- reason: "restock"
48
+ await client.businessHours.createBusinessHourException({
49
+ starts_on: "2024-01-15T09:30:00Z",
50
+ is_closed: true
53
51
  });
54
52
  ```
55
53
 
@@ -73,7 +71,7 @@ following namespace:
73
71
  ```typescript
74
72
  import { FiveOneEat } from "@51eat/sdk";
75
73
 
76
- const request: FiveOneEat.SearchBusinessConversationsRequest = {
74
+ const request: FiveOneEat.UpdateBusinessHoursRequest = {
77
75
  ...
78
76
  };
79
77
  ```
@@ -87,7 +85,7 @@ will be thrown.
87
85
  import { FiveOneEatError } from "@51eat/sdk";
88
86
 
89
87
  try {
90
- await client.businessProducts.adjustVariantInventory(...);
88
+ await client.businessHours.createBusinessHourException(...);
91
89
  } catch (err) {
92
90
  if (err instanceof FiveOneEatError) {
93
91
  console.log(err.statusCode);
@@ -150,9 +148,9 @@ For example, `fs.ReadStream` has a `path` property which the SDK uses to retriev
150
148
  This SDK supports direct imports of subpackage clients, which allows JavaScript bundlers to tree-shake and include only the imported subpackage code. This results in much smaller bundle sizes.
151
149
 
152
150
  ```typescript
153
- import { BusinessMessagingClient } from '@51eat/sdk/businessMessaging';
151
+ import { BusinessHoursClient } from '@51eat/sdk/businessHours';
154
152
 
155
- const client = new BusinessMessagingClient({...});
153
+ const client = new BusinessHoursClient({...});
156
154
  ```
157
155
 
158
156
  ### Additional Headers
@@ -169,7 +167,7 @@ const client = new FiveOneEatClient({
169
167
  }
170
168
  });
171
169
 
172
- const response = await client.businessProducts.adjustVariantInventory(..., {
170
+ const response = await client.businessHours.createBusinessHourException(..., {
173
171
  headers: {
174
172
  'X-Custom-Header': 'custom value'
175
173
  }
@@ -181,7 +179,7 @@ const response = await client.businessProducts.adjustVariantInventory(..., {
181
179
  If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
182
180
 
183
181
  ```typescript
184
- const response = await client.businessProducts.adjustVariantInventory(..., {
182
+ const response = await client.businessHours.createBusinessHourException(..., {
185
183
  queryParams: {
186
184
  'customQueryParamKey': 'custom query param value'
187
185
  }
@@ -203,7 +201,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
203
201
  Use the `maxRetries` request option to configure this behavior.
204
202
 
205
203
  ```typescript
206
- const response = await client.businessProducts.adjustVariantInventory(..., {
204
+ const response = await client.businessHours.createBusinessHourException(..., {
207
205
  maxRetries: 0 // override maxRetries at the request level
208
206
  });
209
207
  ```
@@ -213,7 +211,7 @@ const response = await client.businessProducts.adjustVariantInventory(..., {
213
211
  The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
214
212
 
215
213
  ```typescript
216
- const response = await client.businessProducts.adjustVariantInventory(..., {
214
+ const response = await client.businessHours.createBusinessHourException(..., {
217
215
  timeoutInSeconds: 30 // override timeout to 30s
218
216
  });
219
217
  ```
@@ -224,7 +222,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
224
222
 
225
223
  ```typescript
226
224
  const controller = new AbortController();
227
- const response = await client.businessProducts.adjustVariantInventory(..., {
225
+ const response = await client.businessHours.createBusinessHourException(..., {
228
226
  abortSignal: controller.signal
229
227
  });
230
228
  controller.abort(); // aborts the request
@@ -236,7 +234,7 @@ The SDK provides access to raw response data, including headers, through the `.w
236
234
  The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
237
235
 
238
236
  ```typescript
239
- const { data, rawResponse } = await client.businessProducts.adjustVariantInventory(...).withRawResponse();
237
+ const { data, rawResponse } = await client.businessHours.createBusinessHourException(...).withRawResponse();
240
238
 
241
239
  console.log(data);
242
240
  console.log(rawResponse.headers['X-My-Header']);
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@51eat/sdk",
46
- "X-Fern-SDK-Version": "0.0.60",
47
- "User-Agent": "@51eat/sdk/0.0.60",
46
+ "X-Fern-SDK-Version": "0.0.62",
47
+ "User-Agent": "@51eat/sdk/0.0.62",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -1,4 +1,5 @@
1
1
  import { BusinessClient } from "./api/resources/business/client/Client.js";
2
+ import { BusinessHoursClient } from "./api/resources/businessHours/client/Client.js";
2
3
  import { BusinessMessagingClient } from "./api/resources/businessMessaging/client/Client.js";
3
4
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.js";
4
5
  import { BusinessShippingClient } from "./api/resources/businessShipping/client/Client.js";
@@ -19,6 +20,7 @@ export declare namespace FiveOneEatClient {
19
20
  }
20
21
  export declare class FiveOneEatClient {
21
22
  protected readonly _options: NormalizedClientOptionsWithAuth<FiveOneEatClient.Options>;
23
+ protected _businessHours: BusinessHoursClient | undefined;
22
24
  protected _businessMessaging: BusinessMessagingClient | undefined;
23
25
  protected _businessProducts: BusinessProductsClient | undefined;
24
26
  protected _businessShipping: BusinessShippingClient | undefined;
@@ -31,6 +33,7 @@ export declare class FiveOneEatClient {
31
33
  protected _serveAd: ServeAdClient | undefined;
32
34
  protected _business: BusinessClient | undefined;
33
35
  constructor(options?: FiveOneEatClient.Options);
36
+ get businessHours(): BusinessHoursClient;
34
37
  get businessMessaging(): BusinessMessagingClient;
35
38
  get businessProducts(): BusinessProductsClient;
36
39
  get businessShipping(): BusinessShippingClient;
@@ -45,61 +45,66 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
45
45
  Object.defineProperty(exports, "__esModule", { value: true });
46
46
  exports.FiveOneEatClient = void 0;
47
47
  const Client_js_1 = require("./api/resources/business/client/Client.js");
48
- const Client_js_2 = require("./api/resources/businessMessaging/client/Client.js");
49
- const Client_js_3 = require("./api/resources/businessProducts/client/Client.js");
50
- const Client_js_4 = require("./api/resources/businessShipping/client/Client.js");
51
- const Client_js_5 = require("./api/resources/customer/client/Client.js");
52
- const Client_js_6 = require("./api/resources/customerBusinesses/client/Client.js");
53
- const Client_js_7 = require("./api/resources/customerEvents/client/Client.js");
54
- const Client_js_8 = require("./api/resources/customerMessaging/client/Client.js");
55
- const Client_js_9 = require("./api/resources/customerMyAccount/client/Client.js");
56
- const Client_js_10 = require("./api/resources/recordClick/client/Client.js");
57
- const Client_js_11 = require("./api/resources/serveAd/client/Client.js");
48
+ const Client_js_2 = require("./api/resources/businessHours/client/Client.js");
49
+ const Client_js_3 = require("./api/resources/businessMessaging/client/Client.js");
50
+ const Client_js_4 = require("./api/resources/businessProducts/client/Client.js");
51
+ const Client_js_5 = require("./api/resources/businessShipping/client/Client.js");
52
+ const Client_js_6 = require("./api/resources/customer/client/Client.js");
53
+ const Client_js_7 = require("./api/resources/customerBusinesses/client/Client.js");
54
+ const Client_js_8 = require("./api/resources/customerEvents/client/Client.js");
55
+ const Client_js_9 = require("./api/resources/customerMessaging/client/Client.js");
56
+ const Client_js_10 = require("./api/resources/customerMyAccount/client/Client.js");
57
+ const Client_js_11 = require("./api/resources/recordClick/client/Client.js");
58
+ const Client_js_12 = require("./api/resources/serveAd/client/Client.js");
58
59
  const BaseClient_js_1 = require("./BaseClient.js");
59
60
  const core = __importStar(require("./core/index.js"));
60
61
  class FiveOneEatClient {
61
62
  constructor(options = {}) {
62
63
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
63
64
  }
65
+ get businessHours() {
66
+ var _a;
67
+ return ((_a = this._businessHours) !== null && _a !== void 0 ? _a : (this._businessHours = new Client_js_2.BusinessHoursClient(this._options)));
68
+ }
64
69
  get businessMessaging() {
65
70
  var _a;
66
- return ((_a = this._businessMessaging) !== null && _a !== void 0 ? _a : (this._businessMessaging = new Client_js_2.BusinessMessagingClient(this._options)));
71
+ return ((_a = this._businessMessaging) !== null && _a !== void 0 ? _a : (this._businessMessaging = new Client_js_3.BusinessMessagingClient(this._options)));
67
72
  }
68
73
  get businessProducts() {
69
74
  var _a;
70
- return ((_a = this._businessProducts) !== null && _a !== void 0 ? _a : (this._businessProducts = new Client_js_3.BusinessProductsClient(this._options)));
75
+ return ((_a = this._businessProducts) !== null && _a !== void 0 ? _a : (this._businessProducts = new Client_js_4.BusinessProductsClient(this._options)));
71
76
  }
72
77
  get businessShipping() {
73
78
  var _a;
74
- return ((_a = this._businessShipping) !== null && _a !== void 0 ? _a : (this._businessShipping = new Client_js_4.BusinessShippingClient(this._options)));
79
+ return ((_a = this._businessShipping) !== null && _a !== void 0 ? _a : (this._businessShipping = new Client_js_5.BusinessShippingClient(this._options)));
75
80
  }
76
81
  get customerBusinesses() {
77
82
  var _a;
78
- return ((_a = this._customerBusinesses) !== null && _a !== void 0 ? _a : (this._customerBusinesses = new Client_js_6.CustomerBusinessesClient(this._options)));
83
+ return ((_a = this._customerBusinesses) !== null && _a !== void 0 ? _a : (this._customerBusinesses = new Client_js_7.CustomerBusinessesClient(this._options)));
79
84
  }
80
85
  get customerEvents() {
81
86
  var _a;
82
- return ((_a = this._customerEvents) !== null && _a !== void 0 ? _a : (this._customerEvents = new Client_js_7.CustomerEventsClient(this._options)));
87
+ return ((_a = this._customerEvents) !== null && _a !== void 0 ? _a : (this._customerEvents = new Client_js_8.CustomerEventsClient(this._options)));
83
88
  }
84
89
  get customerMessaging() {
85
90
  var _a;
86
- return ((_a = this._customerMessaging) !== null && _a !== void 0 ? _a : (this._customerMessaging = new Client_js_8.CustomerMessagingClient(this._options)));
91
+ return ((_a = this._customerMessaging) !== null && _a !== void 0 ? _a : (this._customerMessaging = new Client_js_9.CustomerMessagingClient(this._options)));
87
92
  }
88
93
  get customerMyAccount() {
89
94
  var _a;
90
- return ((_a = this._customerMyAccount) !== null && _a !== void 0 ? _a : (this._customerMyAccount = new Client_js_9.CustomerMyAccountClient(this._options)));
95
+ return ((_a = this._customerMyAccount) !== null && _a !== void 0 ? _a : (this._customerMyAccount = new Client_js_10.CustomerMyAccountClient(this._options)));
91
96
  }
92
97
  get customer() {
93
98
  var _a;
94
- return ((_a = this._customer) !== null && _a !== void 0 ? _a : (this._customer = new Client_js_5.CustomerClient(this._options)));
99
+ return ((_a = this._customer) !== null && _a !== void 0 ? _a : (this._customer = new Client_js_6.CustomerClient(this._options)));
95
100
  }
96
101
  get recordClick() {
97
102
  var _a;
98
- return ((_a = this._recordClick) !== null && _a !== void 0 ? _a : (this._recordClick = new Client_js_10.RecordClickClient(this._options)));
103
+ return ((_a = this._recordClick) !== null && _a !== void 0 ? _a : (this._recordClick = new Client_js_11.RecordClickClient(this._options)));
99
104
  }
100
105
  get serveAd() {
101
106
  var _a;
102
- return ((_a = this._serveAd) !== null && _a !== void 0 ? _a : (this._serveAd = new Client_js_11.ServeAdClient(this._options)));
107
+ return ((_a = this._serveAd) !== null && _a !== void 0 ? _a : (this._serveAd = new Client_js_12.ServeAdClient(this._options)));
103
108
  }
104
109
  get business() {
105
110
  var _a;
@@ -26,18 +26,9 @@ export interface StoreBusinessRequest {
26
26
  seasonal?: boolean;
27
27
  ownership?: string[] | null;
28
28
  category_ids: number[];
29
- hours?: StoreBusinessRequest.Hours.Item[] | null;
30
29
  operating_months?: StoreBusinessRequest.OperatingMonths.Item[] | null;
31
30
  }
32
31
  export declare namespace StoreBusinessRequest {
33
- type Hours = Hours.Item[];
34
- namespace Hours {
35
- interface Item {
36
- isOpen?: boolean | undefined;
37
- openTime?: (string | null) | undefined;
38
- closeTime?: (string | null) | undefined;
39
- }
40
- }
41
32
  type OperatingMonths = OperatingMonths.Item[];
42
33
  namespace OperatingMonths {
43
34
  const Item: {
@@ -36,20 +36,11 @@ export interface UpdateBusinessRequest {
36
36
  seasonal?: boolean;
37
37
  ownership?: string[] | null;
38
38
  category_ids: number[];
39
- hours?: UpdateBusinessRequest.Hours.Item[] | null;
40
39
  operating_months?: UpdateBusinessRequest.OperatingMonths.Item[] | null;
41
40
  certification_ids?: number[] | null;
42
41
  cuisine_ids?: number[] | null;
43
42
  }
44
43
  export declare namespace UpdateBusinessRequest {
45
- type Hours = Hours.Item[];
46
- namespace Hours {
47
- interface Item {
48
- isOpen?: boolean | undefined;
49
- openTime?: (string | null) | undefined;
50
- closeTime?: (string | null) | undefined;
51
- }
52
- }
53
44
  type OperatingMonths = OperatingMonths.Item[];
54
45
  namespace OperatingMonths {
55
46
  const Item: {
@@ -31,6 +31,7 @@ export interface StoreProductRequest {
31
31
  tax_code?: string | null;
32
32
  is_active?: boolean;
33
33
  is_featured?: boolean;
34
+ sort_order?: number | null;
34
35
  category_ids?: string[] | null;
35
36
  }
36
37
  export declare namespace StoreProductRequest {
@@ -32,6 +32,7 @@ export interface UpdateProductRequest {
32
32
  is_active?: boolean;
33
33
  published_at?: string | null;
34
34
  is_featured?: boolean;
35
+ sort_order?: number | null;
35
36
  category_ids?: string[] | null;
36
37
  }
37
38
  export declare namespace UpdateProductRequest {
@@ -32,16 +32,5 @@ export interface UpdateBusinessProfileRequest {
32
32
  ownership?: string[] | null;
33
33
  badges?: string[] | null;
34
34
  category_ids?: number[];
35
- hours?: UpdateBusinessProfileRequest.Hours.Item[] | null;
36
35
  operating_months?: number[] | null;
37
36
  }
38
- export declare namespace UpdateBusinessProfileRequest {
39
- type Hours = Hours.Item[];
40
- namespace Hours {
41
- interface Item {
42
- isOpen?: boolean | undefined;
43
- openTime?: (string | null) | undefined;
44
- closeTime?: (string | null) | undefined;
45
- }
46
- }
47
- }
@@ -0,0 +1,91 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import * as core from "../../../../core/index.js";
4
+ import * as FiveOneEat from "../../../index.js";
5
+ export declare namespace BusinessHoursClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class BusinessHoursClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<BusinessHoursClient.Options>;
12
+ constructor(options?: BusinessHoursClient.Options);
13
+ /**
14
+ * @param {BusinessHoursClient.RequestOptions} requestOptions - Request-specific configuration.
15
+ *
16
+ * @throws {@link FiveOneEat.UnauthorizedError}
17
+ *
18
+ * @example
19
+ * await client.businessHours.getBusinessHours()
20
+ */
21
+ getBusinessHours(requestOptions?: BusinessHoursClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.GetBusinessHoursResponse>;
22
+ private __getBusinessHours;
23
+ /**
24
+ * @param {FiveOneEat.UpdateBusinessHoursRequest} request
25
+ * @param {BusinessHoursClient.RequestOptions} requestOptions - Request-specific configuration.
26
+ *
27
+ * @throws {@link FiveOneEat.UnauthorizedError}
28
+ * @throws {@link FiveOneEat.ForbiddenError}
29
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
30
+ *
31
+ * @example
32
+ * await client.businessHours.updateBusinessHours({
33
+ * slots: [{
34
+ * day_of_week: 1,
35
+ * opens_at: "opens_at",
36
+ * closes_at: "closes_at"
37
+ * }]
38
+ * })
39
+ */
40
+ updateBusinessHours(request: FiveOneEat.UpdateBusinessHoursRequest, requestOptions?: BusinessHoursClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.UpdateBusinessHoursResponse>;
41
+ private __updateBusinessHours;
42
+ /**
43
+ * @param {FiveOneEat.StoreBusinessHourExceptionRequest} request
44
+ * @param {BusinessHoursClient.RequestOptions} requestOptions - Request-specific configuration.
45
+ *
46
+ * @throws {@link FiveOneEat.UnauthorizedError}
47
+ * @throws {@link FiveOneEat.ForbiddenError}
48
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
49
+ *
50
+ * @example
51
+ * await client.businessHours.createBusinessHourException({
52
+ * starts_on: "2024-01-15T09:30:00Z",
53
+ * is_closed: true
54
+ * })
55
+ */
56
+ createBusinessHourException(request: FiveOneEat.StoreBusinessHourExceptionRequest, requestOptions?: BusinessHoursClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.CreateBusinessHourExceptionResponse>;
57
+ private __createBusinessHourException;
58
+ /**
59
+ * @param {FiveOneEat.DeleteBusinessHourExceptionRequest} request
60
+ * @param {BusinessHoursClient.RequestOptions} requestOptions - Request-specific configuration.
61
+ *
62
+ * @throws {@link FiveOneEat.UnauthorizedError}
63
+ * @throws {@link FiveOneEat.ForbiddenError}
64
+ * @throws {@link FiveOneEat.NotFoundError}
65
+ *
66
+ * @example
67
+ * await client.businessHours.deleteBusinessHourException({
68
+ * exception: "exception"
69
+ * })
70
+ */
71
+ deleteBusinessHourException(request: FiveOneEat.DeleteBusinessHourExceptionRequest, requestOptions?: BusinessHoursClient.RequestOptions): core.HttpResponsePromise<void>;
72
+ private __deleteBusinessHourException;
73
+ /**
74
+ * @param {FiveOneEat.UpdateBusinessHourExceptionRequest} request
75
+ * @param {BusinessHoursClient.RequestOptions} requestOptions - Request-specific configuration.
76
+ *
77
+ * @throws {@link FiveOneEat.UnauthorizedError}
78
+ * @throws {@link FiveOneEat.ForbiddenError}
79
+ * @throws {@link FiveOneEat.NotFoundError}
80
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
81
+ *
82
+ * @example
83
+ * await client.businessHours.updateBusinessHourException({
84
+ * exception: "exception",
85
+ * starts_on: "2024-01-15T09:30:00Z",
86
+ * is_closed: true
87
+ * })
88
+ */
89
+ updateBusinessHourException(request: FiveOneEat.UpdateBusinessHourExceptionRequest, requestOptions?: BusinessHoursClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.UpdateBusinessHourExceptionResponse>;
90
+ private __updateBusinessHourException;
91
+ }