@51eat/sdk 0.0.61 → 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 (111) 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/profile/client/requests/UpdateBusinessProfileRequest.d.ts +0 -11
  8. package/dist/cjs/api/resources/businessHours/client/Client.d.ts +91 -0
  9. package/dist/cjs/api/resources/businessHours/client/Client.js +361 -0
  10. package/dist/cjs/api/resources/businessHours/client/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/businessHours/client/index.js +17 -0
  12. package/dist/cjs/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.d.ts +10 -0
  13. package/dist/cjs/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.js +3 -0
  14. package/dist/cjs/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.d.ts +16 -0
  15. package/dist/cjs/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.js +3 -0
  16. package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.d.ts +19 -0
  17. package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.js +3 -0
  18. package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.d.ts +25 -0
  19. package/dist/cjs/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.js +3 -0
  20. package/dist/cjs/api/resources/businessHours/client/requests/index.d.ts +4 -0
  21. package/dist/cjs/api/resources/businessHours/client/requests/index.js +2 -0
  22. package/dist/cjs/api/resources/businessHours/exports.d.ts +2 -0
  23. package/dist/cjs/api/resources/businessHours/exports.js +21 -0
  24. package/dist/cjs/api/resources/businessHours/index.d.ts +2 -0
  25. package/dist/cjs/api/resources/businessHours/index.js +18 -0
  26. package/dist/cjs/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.d.ts +4 -0
  27. package/dist/cjs/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.js +3 -0
  28. package/dist/cjs/api/resources/businessHours/types/GetBusinessHoursResponse.d.ts +4 -0
  29. package/dist/cjs/api/resources/businessHours/types/GetBusinessHoursResponse.js +3 -0
  30. package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.d.ts +4 -0
  31. package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.js +3 -0
  32. package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHoursResponse.d.ts +4 -0
  33. package/dist/cjs/api/resources/businessHours/types/UpdateBusinessHoursResponse.js +3 -0
  34. package/dist/cjs/api/resources/businessHours/types/index.d.ts +4 -0
  35. package/dist/cjs/api/resources/businessHours/types/index.js +20 -0
  36. package/dist/cjs/api/resources/index.d.ts +3 -0
  37. package/dist/cjs/api/resources/index.js +4 -1
  38. package/dist/cjs/api/types/BusinessHourExceptionResource.d.ts +10 -0
  39. package/dist/cjs/api/types/BusinessHourExceptionResource.js +3 -0
  40. package/dist/cjs/api/types/BusinessHourSlotResource.d.ts +6 -0
  41. package/dist/cjs/api/types/BusinessHourSlotResource.js +3 -0
  42. package/dist/cjs/api/types/BusinessHoursResource.d.ts +7 -0
  43. package/dist/cjs/api/types/BusinessHoursResource.js +3 -0
  44. package/dist/cjs/api/types/BusinessInventoryLog.d.ts +2 -2
  45. package/dist/cjs/api/types/BusinessProfile.d.ts +6 -7
  46. package/dist/cjs/api/types/BusinessScheduleDayResource.d.ts +5 -0
  47. package/dist/cjs/api/types/BusinessScheduleDayResource.js +3 -0
  48. package/dist/cjs/api/types/CustomerBusinessProfile.d.ts +6 -7
  49. package/dist/cjs/api/types/CustomerCartItem.d.ts +1 -1
  50. package/dist/cjs/api/types/CustomerEventDetail.d.ts +1 -1
  51. package/dist/cjs/api/types/EventFeedItem.d.ts +1 -1
  52. package/dist/cjs/api/types/index.d.ts +4 -0
  53. package/dist/cjs/api/types/index.js +4 -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/business/resources/businesses/client/requests/StoreBusinessRequest.d.mts +0 -9
  60. package/dist/esm/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.mts +0 -9
  61. package/dist/esm/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.mts +0 -11
  62. package/dist/esm/api/resources/businessHours/client/Client.d.mts +91 -0
  63. package/dist/esm/api/resources/businessHours/client/Client.mjs +324 -0
  64. package/dist/esm/api/resources/businessHours/client/index.d.mts +1 -0
  65. package/dist/esm/api/resources/businessHours/client/index.mjs +1 -0
  66. package/dist/esm/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.d.mts +10 -0
  67. package/dist/esm/api/resources/businessHours/client/requests/DeleteBusinessHourExceptionRequest.mjs +2 -0
  68. package/dist/esm/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.d.mts +16 -0
  69. package/dist/esm/api/resources/businessHours/client/requests/StoreBusinessHourExceptionRequest.mjs +2 -0
  70. package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.d.mts +19 -0
  71. package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHourExceptionRequest.mjs +2 -0
  72. package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.d.mts +25 -0
  73. package/dist/esm/api/resources/businessHours/client/requests/UpdateBusinessHoursRequest.mjs +2 -0
  74. package/dist/esm/api/resources/businessHours/client/requests/index.d.mts +4 -0
  75. package/dist/esm/api/resources/businessHours/client/requests/index.mjs +1 -0
  76. package/dist/esm/api/resources/businessHours/exports.d.mts +2 -0
  77. package/dist/esm/api/resources/businessHours/exports.mjs +3 -0
  78. package/dist/esm/api/resources/businessHours/index.d.mts +2 -0
  79. package/dist/esm/api/resources/businessHours/index.mjs +2 -0
  80. package/dist/esm/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.d.mts +4 -0
  81. package/dist/esm/api/resources/businessHours/types/CreateBusinessHourExceptionResponse.mjs +2 -0
  82. package/dist/esm/api/resources/businessHours/types/GetBusinessHoursResponse.d.mts +4 -0
  83. package/dist/esm/api/resources/businessHours/types/GetBusinessHoursResponse.mjs +2 -0
  84. package/dist/esm/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.d.mts +4 -0
  85. package/dist/esm/api/resources/businessHours/types/UpdateBusinessHourExceptionResponse.mjs +2 -0
  86. package/dist/esm/api/resources/businessHours/types/UpdateBusinessHoursResponse.d.mts +4 -0
  87. package/dist/esm/api/resources/businessHours/types/UpdateBusinessHoursResponse.mjs +2 -0
  88. package/dist/esm/api/resources/businessHours/types/index.d.mts +4 -0
  89. package/dist/esm/api/resources/businessHours/types/index.mjs +4 -0
  90. package/dist/esm/api/resources/index.d.mts +3 -0
  91. package/dist/esm/api/resources/index.mjs +3 -0
  92. package/dist/esm/api/types/BusinessHourExceptionResource.d.mts +10 -0
  93. package/dist/esm/api/types/BusinessHourExceptionResource.mjs +2 -0
  94. package/dist/esm/api/types/BusinessHourSlotResource.d.mts +6 -0
  95. package/dist/esm/api/types/BusinessHourSlotResource.mjs +2 -0
  96. package/dist/esm/api/types/BusinessHoursResource.d.mts +7 -0
  97. package/dist/esm/api/types/BusinessHoursResource.mjs +2 -0
  98. package/dist/esm/api/types/BusinessInventoryLog.d.mts +2 -2
  99. package/dist/esm/api/types/BusinessProfile.d.mts +6 -7
  100. package/dist/esm/api/types/BusinessScheduleDayResource.d.mts +5 -0
  101. package/dist/esm/api/types/BusinessScheduleDayResource.mjs +2 -0
  102. package/dist/esm/api/types/CustomerBusinessProfile.d.mts +6 -7
  103. package/dist/esm/api/types/CustomerCartItem.d.mts +1 -1
  104. package/dist/esm/api/types/CustomerEventDetail.d.mts +1 -1
  105. package/dist/esm/api/types/EventFeedItem.d.mts +1 -1
  106. package/dist/esm/api/types/index.d.mts +4 -0
  107. package/dist/esm/api/types/index.mjs +4 -0
  108. package/dist/esm/version.d.mts +1 -1
  109. package/dist/esm/version.mjs +1 -1
  110. package/package.json +12 -1
  111. package/reference.md +253 -0
@@ -0,0 +1,10 @@
1
+ export interface BusinessHourExceptionResource {
2
+ id: string;
3
+ starts_on: string;
4
+ ends_on: string | null;
5
+ is_closed: boolean;
6
+ opens_at: string | null;
7
+ closes_at: string | null;
8
+ label: string | null;
9
+ message: 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,6 @@
1
+ export interface BusinessHourSlotResource {
2
+ opens_at: string;
3
+ closes_at: string;
4
+ label: string | null;
5
+ sort_order: number;
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,7 @@
1
+ import type * as FiveOneEat from "../index.js";
2
+ export interface BusinessHoursResource {
3
+ is_open_now: boolean;
4
+ next_open_at: string | null;
5
+ schedule: FiveOneEat.BusinessScheduleDayResource[];
6
+ exceptions: FiveOneEat.BusinessHourExceptionResource[];
7
+ }
@@ -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 });
@@ -9,7 +9,7 @@ export interface BusinessInventoryLog {
9
9
  }
10
10
  export declare namespace BusinessInventoryLog {
11
11
  interface CreatedBy {
12
- id: string;
13
- name: string;
12
+ id: string | null;
13
+ name: string | null;
14
14
  }
15
15
  }
@@ -24,7 +24,7 @@ export interface BusinessProfile {
24
24
  has_location: boolean;
25
25
  logo: string | null;
26
26
  logo_url: string | null;
27
- hours: Record<string, BusinessProfile.Hours.Value>;
27
+ hours: BusinessProfile.Hours;
28
28
  seasonal: boolean;
29
29
  operating_months: number[];
30
30
  pickup_enabled: boolean;
@@ -42,12 +42,11 @@ export interface BusinessProfile {
42
42
  active_temporary_locations?: FiveOneEat.CustomerTemporaryLocation[] | undefined;
43
43
  }
44
44
  export declare namespace BusinessProfile {
45
- namespace Hours {
46
- interface Value {
47
- isOpen: boolean;
48
- openTime: string;
49
- closeTime: string;
50
- }
45
+ interface Hours {
46
+ is_open_now: string;
47
+ next_open_at: string | null;
48
+ schedule: FiveOneEat.BusinessScheduleDayResource[];
49
+ exceptions: FiveOneEat.BusinessHourExceptionResource[];
51
50
  }
52
51
  type Cuisines = Cuisines.Item[];
53
52
  namespace Cuisines {
@@ -0,0 +1,5 @@
1
+ import type * as FiveOneEat from "../index.js";
2
+ export interface BusinessScheduleDayResource {
3
+ day: string;
4
+ slots: FiveOneEat.BusinessHourSlotResource[];
5
+ }
@@ -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 });
@@ -24,7 +24,7 @@ export interface CustomerBusinessProfile {
24
24
  linkedin_url: string | null;
25
25
  logo: string | null;
26
26
  cover_photo?: (string | null) | undefined;
27
- hours: Record<string, CustomerBusinessProfile.Hours.Value>;
27
+ hours: CustomerBusinessProfile.Hours;
28
28
  seasonal: boolean;
29
29
  operating_months: string[];
30
30
  ownership: string[];
@@ -40,12 +40,11 @@ export interface CustomerBusinessProfile {
40
40
  temporary_locations?: FiveOneEat.CustomerTemporaryLocation[] | undefined;
41
41
  }
42
42
  export declare namespace CustomerBusinessProfile {
43
- namespace Hours {
44
- interface Value {
45
- isOpen: boolean;
46
- openTime: string;
47
- closeTime: string;
48
- }
43
+ interface Hours {
44
+ is_open_now: string;
45
+ next_open_at: string | null;
46
+ schedule: FiveOneEat.BusinessScheduleDayResource[];
47
+ exceptions: FiveOneEat.BusinessHourExceptionResource[];
49
48
  }
50
49
  type Cuisines = Cuisines.Item[];
51
50
  namespace Cuisines {
@@ -14,7 +14,7 @@ export declare namespace CustomerCartItem {
14
14
  name: string;
15
15
  slug: string;
16
16
  product_type: string;
17
- image: string;
17
+ image: string | null;
18
18
  }
19
19
  interface Variant {
20
20
  id: string;
@@ -10,7 +10,7 @@ export interface CustomerEventDetail {
10
10
  ticket_sales_enabled: boolean;
11
11
  image: string | null;
12
12
  rsvp_count: number;
13
- user_rsvp_status?: string | undefined;
13
+ user_rsvp_status?: (string | null) | undefined;
14
14
  user_has_tickets?: boolean | undefined;
15
15
  ticket_price_from?: string | undefined;
16
16
  ticket_types?: FiveOneEat.CustomerEventTicketType[] | undefined;
@@ -9,7 +9,7 @@ export interface EventFeedItem {
9
9
  ticket_sales_enabled: boolean;
10
10
  image: string | null;
11
11
  rsvp_count: number;
12
- user_rsvp_status?: string | undefined;
12
+ user_rsvp_status?: (string | null) | undefined;
13
13
  user_has_tickets?: boolean | undefined;
14
14
  ticket_price_from?: string | undefined;
15
15
  business: EventFeedItem.Business;
@@ -47,6 +47,9 @@ export * from "./BusinessEventOrderDetail.js";
47
47
  export * from "./BusinessEventRsvp.js";
48
48
  export * from "./BusinessEventSalesSummary.js";
49
49
  export * from "./BusinessEventTicketType.js";
50
+ export * from "./BusinessHourExceptionResource.js";
51
+ export * from "./BusinessHourSlotResource.js";
52
+ export * from "./BusinessHoursResource.js";
50
53
  export * from "./BusinessInventoryLog.js";
51
54
  export * from "./BusinessLoginResponse.js";
52
55
  export * from "./BusinessMe.js";
@@ -64,6 +67,7 @@ export * from "./BusinessProductOrder.js";
64
67
  export * from "./BusinessProductOrderItem.js";
65
68
  export * from "./BusinessProductVariant.js";
66
69
  export * from "./BusinessProfile.js";
70
+ export * from "./BusinessScheduleDayResource.js";
67
71
  export * from "./BusinessSearchResult.js";
68
72
  export * from "./BusinessStripeConnection.js";
69
73
  export * from "./BusinessSummary.js";
@@ -63,6 +63,9 @@ __exportStar(require("./BusinessEventOrderDetail.js"), exports);
63
63
  __exportStar(require("./BusinessEventRsvp.js"), exports);
64
64
  __exportStar(require("./BusinessEventSalesSummary.js"), exports);
65
65
  __exportStar(require("./BusinessEventTicketType.js"), exports);
66
+ __exportStar(require("./BusinessHourExceptionResource.js"), exports);
67
+ __exportStar(require("./BusinessHourSlotResource.js"), exports);
68
+ __exportStar(require("./BusinessHoursResource.js"), exports);
66
69
  __exportStar(require("./BusinessInventoryLog.js"), exports);
67
70
  __exportStar(require("./BusinessLoginResponse.js"), exports);
68
71
  __exportStar(require("./BusinessMe.js"), exports);
@@ -80,6 +83,7 @@ __exportStar(require("./BusinessProductOrder.js"), exports);
80
83
  __exportStar(require("./BusinessProductOrderItem.js"), exports);
81
84
  __exportStar(require("./BusinessProductVariant.js"), exports);
82
85
  __exportStar(require("./BusinessProfile.js"), exports);
86
+ __exportStar(require("./BusinessScheduleDayResource.js"), exports);
83
87
  __exportStar(require("./BusinessSearchResult.js"), exports);
84
88
  __exportStar(require("./BusinessStripeConnection.js"), exports);
85
89
  __exportStar(require("./BusinessSummary.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.61";
1
+ export declare const SDK_VERSION = "0.0.62";
@@ -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.61";
4
+ exports.SDK_VERSION = "0.0.62";
@@ -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.61",
10
- "User-Agent": "@51eat/sdk/0.0.61",
9
+ "X-Fern-SDK-Version": "0.0.62",
10
+ "User-Agent": "@51eat/sdk/0.0.62",
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,4 +1,5 @@
1
1
  import { BusinessClient } from "./api/resources/business/client/Client.mjs";
2
+ import { BusinessHoursClient } from "./api/resources/businessHours/client/Client.mjs";
2
3
  import { BusinessMessagingClient } from "./api/resources/businessMessaging/client/Client.mjs";
3
4
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.mjs";
4
5
  import { BusinessShippingClient } from "./api/resources/businessShipping/client/Client.mjs";
@@ -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;
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  import { BusinessClient } from "./api/resources/business/client/Client.mjs";
12
+ import { BusinessHoursClient } from "./api/resources/businessHours/client/Client.mjs";
12
13
  import { BusinessMessagingClient } from "./api/resources/businessMessaging/client/Client.mjs";
13
14
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.mjs";
14
15
  import { BusinessShippingClient } from "./api/resources/businessShipping/client/Client.mjs";
@@ -25,6 +26,10 @@ export class FiveOneEatClient {
25
26
  constructor(options = {}) {
26
27
  this._options = normalizeClientOptionsWithAuth(options);
27
28
  }
29
+ get businessHours() {
30
+ var _a;
31
+ return ((_a = this._businessHours) !== null && _a !== void 0 ? _a : (this._businessHours = new BusinessHoursClient(this._options)));
32
+ }
28
33
  get businessMessaging() {
29
34
  var _a;
30
35
  return ((_a = this._businessMessaging) !== null && _a !== void 0 ? _a : (this._businessMessaging = new BusinessMessagingClient(this._options)));
@@ -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: {
@@ -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.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
+ import * as core from "../../../../core/index.mjs";
4
+ import * as FiveOneEat from "../../../index.mjs";
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
+ }