@51eat/sdk 0.0.23 → 0.0.25

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 (152) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/business/client/Client.d.ts +2 -2
  3. package/dist/cjs/api/resources/business/client/Client.js +4 -4
  4. package/dist/cjs/api/resources/business/resources/businesses/client/Client.d.ts +49 -8
  5. package/dist/cjs/api/resources/business/resources/businesses/client/Client.js +164 -41
  6. package/dist/cjs/api/resources/business/resources/businesses/client/requests/DeleteBusinessesRequest.d.ts +1 -0
  7. package/dist/cjs/api/resources/business/resources/businesses/client/requests/GetBusinessesRequest.d.ts +1 -0
  8. package/dist/cjs/api/resources/business/resources/businesses/client/requests/ListBusinessesRequest.d.ts +10 -0
  9. package/dist/cjs/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.d.ts +59 -0
  10. package/dist/cjs/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.js +24 -0
  11. package/dist/cjs/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.ts +71 -0
  12. package/dist/cjs/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.js +24 -0
  13. package/dist/cjs/api/resources/business/resources/businesses/client/requests/index.d.ts +3 -1
  14. package/dist/cjs/api/resources/business/resources/businesses/client/requests/index.js +5 -0
  15. package/dist/cjs/api/resources/business/resources/businesses/index.d.ts +1 -0
  16. package/dist/cjs/api/resources/business/resources/businesses/index.js +1 -0
  17. package/dist/cjs/api/resources/business/resources/businesses/types/GetBusinessesResponse.d.ts +4 -0
  18. package/dist/cjs/api/resources/business/resources/businesses/types/GetBusinessesResponse.js +3 -0
  19. package/dist/cjs/api/resources/business/resources/businesses/types/ListBusinessesResponse.d.ts +4 -0
  20. package/dist/cjs/api/resources/business/resources/businesses/types/ListBusinessesResponse.js +3 -0
  21. package/dist/cjs/api/resources/business/resources/businesses/types/UpdateBusinessesResponse.d.ts +4 -0
  22. package/dist/cjs/api/resources/business/resources/businesses/types/UpdateBusinessesResponse.js +3 -0
  23. package/dist/cjs/api/resources/business/resources/businesses/types/index.d.ts +3 -0
  24. package/dist/cjs/api/resources/business/resources/businesses/types/index.js +19 -0
  25. package/dist/cjs/api/resources/business/resources/categories/client/Client.d.ts +7 -1
  26. package/dist/cjs/api/resources/business/resources/categories/client/Client.js +20 -6
  27. package/dist/cjs/api/resources/business/resources/categories/index.d.ts +1 -0
  28. package/dist/cjs/api/resources/business/resources/categories/index.js +1 -0
  29. package/dist/cjs/api/resources/business/resources/categories/types/ListCategoriesResponse.d.ts +4 -0
  30. package/dist/cjs/api/resources/business/resources/categories/types/ListCategoriesResponse.js +3 -0
  31. package/dist/cjs/api/resources/business/resources/categories/types/index.d.ts +1 -0
  32. package/dist/cjs/api/resources/business/resources/categories/types/index.js +17 -0
  33. package/dist/cjs/api/resources/business/resources/certifications/client/Client.d.ts +7 -1
  34. package/dist/cjs/api/resources/business/resources/certifications/client/Client.js +20 -6
  35. package/dist/cjs/api/resources/business/resources/certifications/index.d.ts +1 -0
  36. package/dist/cjs/api/resources/business/resources/certifications/index.js +1 -0
  37. package/dist/cjs/api/resources/business/resources/certifications/types/ListCertificationsResponse.d.ts +4 -0
  38. package/dist/cjs/api/resources/business/resources/certifications/types/ListCertificationsResponse.js +3 -0
  39. package/dist/cjs/api/resources/business/resources/certifications/types/index.d.ts +1 -0
  40. package/dist/cjs/api/resources/business/resources/certifications/types/index.js +17 -0
  41. package/dist/cjs/api/resources/business/resources/cuisines/client/Client.d.ts +7 -1
  42. package/dist/cjs/api/resources/business/resources/cuisines/client/Client.js +20 -6
  43. package/dist/cjs/api/resources/business/resources/cuisines/index.d.ts +1 -0
  44. package/dist/cjs/api/resources/business/resources/cuisines/index.js +1 -0
  45. package/dist/cjs/api/resources/business/resources/cuisines/types/ListCuisinesResponse.d.ts +4 -0
  46. package/dist/cjs/api/resources/business/resources/cuisines/types/ListCuisinesResponse.js +3 -0
  47. package/dist/cjs/api/resources/business/resources/cuisines/types/index.d.ts +1 -0
  48. package/dist/cjs/api/resources/business/resources/cuisines/types/index.js +17 -0
  49. package/dist/cjs/api/resources/business/resources/index.d.ts +4 -0
  50. package/dist/cjs/api/resources/business/resources/index.js +4 -0
  51. package/dist/cjs/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.ts +1 -1
  52. package/dist/cjs/api/resources/customer/client/Client.d.ts +1 -1
  53. package/dist/cjs/api/resources/customer/client/Client.js +3 -3
  54. package/dist/cjs/api/resources/customer/client/requests/SearchCustomerRequest.d.ts +3 -3
  55. package/dist/cjs/api/resources/customer/resources/discovery/client/Client.d.ts +1 -1
  56. package/dist/cjs/api/resources/customer/resources/discovery/client/Client.js +1 -1
  57. package/dist/cjs/api/types/BusinessCategory.d.ts +9 -0
  58. package/dist/cjs/api/types/BusinessCategory.js +3 -0
  59. package/dist/cjs/api/types/BusinessCertification.d.ts +7 -0
  60. package/dist/cjs/api/types/BusinessCertification.js +3 -0
  61. package/dist/cjs/api/types/BusinessCuisine.d.ts +6 -0
  62. package/dist/cjs/api/types/BusinessCuisine.js +3 -0
  63. package/dist/cjs/api/types/BusinessProfile.d.ts +1 -1
  64. package/dist/cjs/api/types/BusinessSearchResult.d.ts +2 -1
  65. package/dist/cjs/api/types/BusinessSummary.d.ts +2 -1
  66. package/dist/cjs/api/types/CustomerBusinessProfile.d.ts +1 -1
  67. package/dist/cjs/api/types/DiscoveryBusiness.d.ts +2 -1
  68. package/dist/cjs/api/types/DiscoveryCategory.d.ts +6 -2
  69. package/dist/cjs/api/types/ExploreBusiness.d.ts +2 -1
  70. package/dist/cjs/api/types/index.d.ts +3 -0
  71. package/dist/cjs/api/types/index.js +3 -0
  72. package/dist/cjs/version.d.ts +1 -1
  73. package/dist/cjs/version.js +1 -1
  74. package/dist/esm/BaseClient.mjs +2 -2
  75. package/dist/esm/api/resources/business/client/Client.d.mts +2 -2
  76. package/dist/esm/api/resources/business/client/Client.mjs +4 -4
  77. package/dist/esm/api/resources/business/resources/businesses/client/Client.d.mts +49 -8
  78. package/dist/esm/api/resources/business/resources/businesses/client/Client.mjs +164 -41
  79. package/dist/esm/api/resources/business/resources/businesses/client/requests/DeleteBusinessesRequest.d.mts +1 -0
  80. package/dist/esm/api/resources/business/resources/businesses/client/requests/GetBusinessesRequest.d.mts +1 -0
  81. package/dist/esm/api/resources/business/resources/businesses/client/requests/ListBusinessesRequest.d.mts +10 -0
  82. package/dist/esm/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.d.mts +59 -0
  83. package/dist/esm/api/resources/business/resources/businesses/client/requests/StoreBusinessRequest.mjs +21 -0
  84. package/dist/esm/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.d.mts +71 -0
  85. package/dist/esm/api/resources/business/resources/businesses/client/requests/UpdateBusinessRequest.mjs +21 -0
  86. package/dist/esm/api/resources/business/resources/businesses/client/requests/index.d.mts +3 -1
  87. package/dist/esm/api/resources/business/resources/businesses/client/requests/index.mjs +2 -1
  88. package/dist/esm/api/resources/business/resources/businesses/index.d.mts +1 -0
  89. package/dist/esm/api/resources/business/resources/businesses/index.mjs +1 -0
  90. package/dist/esm/api/resources/business/resources/businesses/types/GetBusinessesResponse.d.mts +4 -0
  91. package/dist/esm/api/resources/business/resources/businesses/types/GetBusinessesResponse.mjs +2 -0
  92. package/dist/esm/api/resources/business/resources/businesses/types/ListBusinessesResponse.d.mts +4 -0
  93. package/dist/esm/api/resources/business/resources/businesses/types/ListBusinessesResponse.mjs +2 -0
  94. package/dist/esm/api/resources/business/resources/businesses/types/UpdateBusinessesResponse.d.mts +4 -0
  95. package/dist/esm/api/resources/business/resources/businesses/types/UpdateBusinessesResponse.mjs +2 -0
  96. package/dist/esm/api/resources/business/resources/businesses/types/index.d.mts +3 -0
  97. package/dist/esm/api/resources/business/resources/businesses/types/index.mjs +3 -0
  98. package/dist/esm/api/resources/business/resources/categories/client/Client.d.mts +7 -1
  99. package/dist/esm/api/resources/business/resources/categories/client/Client.mjs +20 -6
  100. package/dist/esm/api/resources/business/resources/categories/index.d.mts +1 -0
  101. package/dist/esm/api/resources/business/resources/categories/index.mjs +1 -0
  102. package/dist/esm/api/resources/business/resources/categories/types/ListCategoriesResponse.d.mts +4 -0
  103. package/dist/esm/api/resources/business/resources/categories/types/ListCategoriesResponse.mjs +2 -0
  104. package/dist/esm/api/resources/business/resources/categories/types/index.d.mts +1 -0
  105. package/dist/esm/api/resources/business/resources/categories/types/index.mjs +1 -0
  106. package/dist/esm/api/resources/business/resources/certifications/client/Client.d.mts +7 -1
  107. package/dist/esm/api/resources/business/resources/certifications/client/Client.mjs +20 -6
  108. package/dist/esm/api/resources/business/resources/certifications/index.d.mts +1 -0
  109. package/dist/esm/api/resources/business/resources/certifications/index.mjs +1 -0
  110. package/dist/esm/api/resources/business/resources/certifications/types/ListCertificationsResponse.d.mts +4 -0
  111. package/dist/esm/api/resources/business/resources/certifications/types/ListCertificationsResponse.mjs +2 -0
  112. package/dist/esm/api/resources/business/resources/certifications/types/index.d.mts +1 -0
  113. package/dist/esm/api/resources/business/resources/certifications/types/index.mjs +1 -0
  114. package/dist/esm/api/resources/business/resources/cuisines/client/Client.d.mts +7 -1
  115. package/dist/esm/api/resources/business/resources/cuisines/client/Client.mjs +20 -6
  116. package/dist/esm/api/resources/business/resources/cuisines/index.d.mts +1 -0
  117. package/dist/esm/api/resources/business/resources/cuisines/index.mjs +1 -0
  118. package/dist/esm/api/resources/business/resources/cuisines/types/ListCuisinesResponse.d.mts +4 -0
  119. package/dist/esm/api/resources/business/resources/cuisines/types/ListCuisinesResponse.mjs +2 -0
  120. package/dist/esm/api/resources/business/resources/cuisines/types/index.d.mts +1 -0
  121. package/dist/esm/api/resources/business/resources/cuisines/types/index.mjs +1 -0
  122. package/dist/esm/api/resources/business/resources/index.d.mts +4 -0
  123. package/dist/esm/api/resources/business/resources/index.mjs +4 -0
  124. package/dist/esm/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.mts +1 -1
  125. package/dist/esm/api/resources/customer/client/Client.d.mts +1 -1
  126. package/dist/esm/api/resources/customer/client/Client.mjs +3 -3
  127. package/dist/esm/api/resources/customer/client/requests/SearchCustomerRequest.d.mts +3 -3
  128. package/dist/esm/api/resources/customer/resources/discovery/client/Client.d.mts +1 -1
  129. package/dist/esm/api/resources/customer/resources/discovery/client/Client.mjs +1 -1
  130. package/dist/esm/api/types/BusinessCategory.d.mts +9 -0
  131. package/dist/esm/api/types/BusinessCategory.mjs +2 -0
  132. package/dist/esm/api/types/BusinessCertification.d.mts +7 -0
  133. package/dist/esm/api/types/BusinessCertification.mjs +2 -0
  134. package/dist/esm/api/types/BusinessCuisine.d.mts +6 -0
  135. package/dist/esm/api/types/BusinessCuisine.mjs +2 -0
  136. package/dist/esm/api/types/BusinessProfile.d.mts +1 -1
  137. package/dist/esm/api/types/BusinessSearchResult.d.mts +2 -1
  138. package/dist/esm/api/types/BusinessSummary.d.mts +2 -1
  139. package/dist/esm/api/types/CustomerBusinessProfile.d.mts +1 -1
  140. package/dist/esm/api/types/DiscoveryBusiness.d.mts +2 -1
  141. package/dist/esm/api/types/DiscoveryCategory.d.mts +6 -2
  142. package/dist/esm/api/types/ExploreBusiness.d.mts +2 -1
  143. package/dist/esm/api/types/index.d.mts +3 -0
  144. package/dist/esm/api/types/index.mjs +3 -0
  145. package/dist/esm/version.d.mts +1 -1
  146. package/dist/esm/version.mjs +1 -1
  147. package/package.json +12 -12
  148. package/reference.md +354 -214
  149. package/dist/cjs/api/resources/business/resources/businesses/client/requests/UpdateBusinessesRequest.d.ts +0 -9
  150. package/dist/esm/api/resources/business/resources/businesses/client/requests/UpdateBusinessesRequest.d.mts +0 -9
  151. /package/dist/cjs/api/resources/business/resources/businesses/client/requests/{UpdateBusinessesRequest.js → ListBusinessesRequest.js} +0 -0
  152. /package/dist/esm/api/resources/business/resources/businesses/client/requests/{UpdateBusinessesRequest.mjs → ListBusinessesRequest.mjs} +0 -0
@@ -0,0 +1,71 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * business: "business",
5
+ * name: "name",
6
+ * handle: "handle",
7
+ * category_ids: [1]
8
+ * }
9
+ */
10
+ export interface UpdateBusinessRequest {
11
+ /** The business ID */
12
+ business: string;
13
+ name: string;
14
+ handle: string;
15
+ email?: string | null;
16
+ phone?: string | null;
17
+ website?: string | null;
18
+ description?: string | null;
19
+ bio?: string | null;
20
+ facebook_url?: string | null;
21
+ instagram_url?: string | null;
22
+ twitter_url?: string | null;
23
+ tiktok_url?: string | null;
24
+ youtube_url?: string | null;
25
+ linkedin_url?: string | null;
26
+ address?: string | null;
27
+ city?: string | null;
28
+ state?: string | null;
29
+ zipcode?: string | null;
30
+ country?: string | null;
31
+ latitude?: number | null;
32
+ longitude?: number | null;
33
+ has_location?: boolean;
34
+ metadata?: string[] | null;
35
+ badges?: string[] | null;
36
+ seasonal?: boolean;
37
+ ownership?: string[] | null;
38
+ category_ids: number[];
39
+ hours?: UpdateBusinessRequest.Hours.Item[] | null;
40
+ operating_months?: UpdateBusinessRequest.OperatingMonths.Item[] | null;
41
+ certification_ids?: number[] | null;
42
+ cuisine_ids?: number[] | null;
43
+ }
44
+ 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
+ type OperatingMonths = OperatingMonths.Item[];
54
+ namespace OperatingMonths {
55
+ const Item: {
56
+ readonly January: "january";
57
+ readonly February: "february";
58
+ readonly March: "march";
59
+ readonly April: "april";
60
+ readonly May: "may";
61
+ readonly June: "june";
62
+ readonly July: "july";
63
+ readonly August: "august";
64
+ readonly September: "september";
65
+ readonly October: "october";
66
+ readonly November: "november";
67
+ readonly December: "december";
68
+ };
69
+ type Item = (typeof Item)[keyof typeof Item];
70
+ }
71
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.UpdateBusinessRequest = void 0;
5
+ var UpdateBusinessRequest;
6
+ (function (UpdateBusinessRequest) {
7
+ let OperatingMonths;
8
+ (function (OperatingMonths) {
9
+ OperatingMonths.Item = {
10
+ January: "january",
11
+ February: "february",
12
+ March: "march",
13
+ April: "april",
14
+ May: "may",
15
+ June: "june",
16
+ July: "july",
17
+ August: "august",
18
+ September: "september",
19
+ October: "october",
20
+ November: "november",
21
+ December: "december",
22
+ };
23
+ })(OperatingMonths = UpdateBusinessRequest.OperatingMonths || (UpdateBusinessRequest.OperatingMonths = {}));
24
+ })(UpdateBusinessRequest || (exports.UpdateBusinessRequest = UpdateBusinessRequest = {}));
@@ -1,3 +1,5 @@
1
1
  export type { DeleteBusinessesRequest } from "./DeleteBusinessesRequest.js";
2
2
  export type { GetBusinessesRequest } from "./GetBusinessesRequest.js";
3
- export type { UpdateBusinessesRequest } from "./UpdateBusinessesRequest.js";
3
+ export type { ListBusinessesRequest } from "./ListBusinessesRequest.js";
4
+ export { StoreBusinessRequest } from "./StoreBusinessRequest.js";
5
+ export { UpdateBusinessRequest } from "./UpdateBusinessRequest.js";
@@ -1,2 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UpdateBusinessRequest = exports.StoreBusinessRequest = void 0;
4
+ var StoreBusinessRequest_js_1 = require("./StoreBusinessRequest.js");
5
+ Object.defineProperty(exports, "StoreBusinessRequest", { enumerable: true, get: function () { return StoreBusinessRequest_js_1.StoreBusinessRequest; } });
6
+ var UpdateBusinessRequest_js_1 = require("./UpdateBusinessRequest.js");
7
+ Object.defineProperty(exports, "UpdateBusinessRequest", { enumerable: true, get: function () { return UpdateBusinessRequest_js_1.UpdateBusinessRequest; } });
@@ -1 +1,2 @@
1
1
  export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
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 GetBusinessesResponse {
3
+ data: FiveOneEat.BusinessProfile;
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 ListBusinessesResponse {
3
+ data: FiveOneEat.BusinessProfile[];
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 UpdateBusinessesResponse {
3
+ data: FiveOneEat.BusinessProfile;
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,3 @@
1
+ export * from "./GetBusinessesResponse.js";
2
+ export * from "./ListBusinessesResponse.js";
3
+ export * from "./UpdateBusinessesResponse.js";
@@ -0,0 +1,19 @@
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("./GetBusinessesResponse.js"), exports);
18
+ __exportStar(require("./ListBusinessesResponse.js"), exports);
19
+ __exportStar(require("./UpdateBusinessesResponse.js"), exports);
@@ -1,6 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
3
  import * as core from "../../../../../../core/index.js";
4
+ import * as FiveOneEat from "../../../../../index.js";
4
5
  export declare namespace CategoriesClient {
5
6
  type Options = BaseClientOptions;
6
7
  interface RequestOptions extends BaseRequestOptions {
@@ -10,11 +11,16 @@ export declare class CategoriesClient {
10
11
  protected readonly _options: NormalizedClientOptionsWithAuth<CategoriesClient.Options>;
11
12
  constructor(options?: CategoriesClient.Options);
12
13
  /**
14
+ * Retrieve a list of all business categories, ordered by sort order and name.
15
+ * Use these IDs to populate the `category_ids` field when creating or updating a business.
16
+ *
13
17
  * @param {CategoriesClient.RequestOptions} requestOptions - Request-specific configuration.
14
18
  *
19
+ * @throws {@link FiveOneEat.UnauthorizedError}
20
+ *
15
21
  * @example
16
22
  * await client.business.categories.list()
17
23
  */
18
- list(requestOptions?: CategoriesClient.RequestOptions): core.HttpResponsePromise<void>;
24
+ list(requestOptions?: CategoriesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListCategoriesResponse>;
19
25
  private __list;
20
26
  }
@@ -50,13 +50,19 @@ const core = __importStar(require("../../../../../../core/index.js"));
50
50
  const environments = __importStar(require("../../../../../../environments.js"));
51
51
  const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
52
52
  const errors = __importStar(require("../../../../../../errors/index.js"));
53
+ const FiveOneEat = __importStar(require("../../../../../index.js"));
53
54
  class CategoriesClient {
54
55
  constructor(options = {}) {
55
56
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
56
57
  }
57
58
  /**
59
+ * Retrieve a list of all business categories, ordered by sort order and name.
60
+ * Use these IDs to populate the `category_ids` field when creating or updating a business.
61
+ *
58
62
  * @param {CategoriesClient.RequestOptions} requestOptions - Request-specific configuration.
59
63
  *
64
+ * @throws {@link FiveOneEat.UnauthorizedError}
65
+ *
60
66
  * @example
61
67
  * await client.business.categories.list()
62
68
  */
@@ -80,14 +86,22 @@ class CategoriesClient {
80
86
  logging: this._options.logging,
81
87
  });
82
88
  if (_response.ok) {
83
- return { data: undefined, rawResponse: _response.rawResponse };
89
+ return {
90
+ data: _response.body,
91
+ rawResponse: _response.rawResponse,
92
+ };
84
93
  }
85
94
  if (_response.error.reason === "status-code") {
86
- throw new errors.FiveOneEatError({
87
- statusCode: _response.error.statusCode,
88
- body: _response.error.body,
89
- rawResponse: _response.rawResponse,
90
- });
95
+ switch (_response.error.statusCode) {
96
+ case 401:
97
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
98
+ default:
99
+ throw new errors.FiveOneEatError({
100
+ statusCode: _response.error.statusCode,
101
+ body: _response.error.body,
102
+ rawResponse: _response.rawResponse,
103
+ });
104
+ }
91
105
  }
92
106
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/categories");
93
107
  });
@@ -1 +1,2 @@
1
1
  export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
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 ListCategoriesResponse {
3
+ data: FiveOneEat.BusinessCategory[];
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 @@
1
+ export * from "./ListCategoriesResponse.js";
@@ -0,0 +1,17 @@
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("./ListCategoriesResponse.js"), exports);
@@ -1,6 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
3
  import * as core from "../../../../../../core/index.js";
4
+ import * as FiveOneEat from "../../../../../index.js";
4
5
  export declare namespace CertificationsClient {
5
6
  type Options = BaseClientOptions;
6
7
  interface RequestOptions extends BaseRequestOptions {
@@ -10,11 +11,16 @@ export declare class CertificationsClient {
10
11
  protected readonly _options: NormalizedClientOptionsWithAuth<CertificationsClient.Options>;
11
12
  constructor(options?: CertificationsClient.Options);
12
13
  /**
14
+ * Retrieve a list of all certifications, ordered alphabetically. Use these IDs
15
+ * to populate the `certification_ids` field when updating a business profile.
16
+ *
13
17
  * @param {CertificationsClient.RequestOptions} requestOptions - Request-specific configuration.
14
18
  *
19
+ * @throws {@link FiveOneEat.UnauthorizedError}
20
+ *
15
21
  * @example
16
22
  * await client.business.certifications.list()
17
23
  */
18
- list(requestOptions?: CertificationsClient.RequestOptions): core.HttpResponsePromise<void>;
24
+ list(requestOptions?: CertificationsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListCertificationsResponse>;
19
25
  private __list;
20
26
  }
@@ -50,13 +50,19 @@ const core = __importStar(require("../../../../../../core/index.js"));
50
50
  const environments = __importStar(require("../../../../../../environments.js"));
51
51
  const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
52
52
  const errors = __importStar(require("../../../../../../errors/index.js"));
53
+ const FiveOneEat = __importStar(require("../../../../../index.js"));
53
54
  class CertificationsClient {
54
55
  constructor(options = {}) {
55
56
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
56
57
  }
57
58
  /**
59
+ * Retrieve a list of all certifications, ordered alphabetically. Use these IDs
60
+ * to populate the `certification_ids` field when updating a business profile.
61
+ *
58
62
  * @param {CertificationsClient.RequestOptions} requestOptions - Request-specific configuration.
59
63
  *
64
+ * @throws {@link FiveOneEat.UnauthorizedError}
65
+ *
60
66
  * @example
61
67
  * await client.business.certifications.list()
62
68
  */
@@ -80,14 +86,22 @@ class CertificationsClient {
80
86
  logging: this._options.logging,
81
87
  });
82
88
  if (_response.ok) {
83
- return { data: undefined, rawResponse: _response.rawResponse };
89
+ return {
90
+ data: _response.body,
91
+ rawResponse: _response.rawResponse,
92
+ };
84
93
  }
85
94
  if (_response.error.reason === "status-code") {
86
- throw new errors.FiveOneEatError({
87
- statusCode: _response.error.statusCode,
88
- body: _response.error.body,
89
- rawResponse: _response.rawResponse,
90
- });
95
+ switch (_response.error.statusCode) {
96
+ case 401:
97
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
98
+ default:
99
+ throw new errors.FiveOneEatError({
100
+ statusCode: _response.error.statusCode,
101
+ body: _response.error.body,
102
+ rawResponse: _response.rawResponse,
103
+ });
104
+ }
91
105
  }
92
106
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/certifications");
93
107
  });
@@ -1 +1,2 @@
1
1
  export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
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 ListCertificationsResponse {
3
+ data: FiveOneEat.BusinessCertification[];
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 @@
1
+ export * from "./ListCertificationsResponse.js";
@@ -0,0 +1,17 @@
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("./ListCertificationsResponse.js"), exports);
@@ -1,6 +1,7 @@
1
1
  import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
3
  import * as core from "../../../../../../core/index.js";
4
+ import * as FiveOneEat from "../../../../../index.js";
4
5
  export declare namespace CuisinesClient {
5
6
  type Options = BaseClientOptions;
6
7
  interface RequestOptions extends BaseRequestOptions {
@@ -10,11 +11,16 @@ export declare class CuisinesClient {
10
11
  protected readonly _options: NormalizedClientOptionsWithAuth<CuisinesClient.Options>;
11
12
  constructor(options?: CuisinesClient.Options);
12
13
  /**
14
+ * Retrieve a list of all cuisines, ordered alphabetically. Use these IDs to
15
+ * populate the `cuisine_ids` field when updating a business profile.
16
+ *
13
17
  * @param {CuisinesClient.RequestOptions} requestOptions - Request-specific configuration.
14
18
  *
19
+ * @throws {@link FiveOneEat.UnauthorizedError}
20
+ *
15
21
  * @example
16
22
  * await client.business.cuisines.list()
17
23
  */
18
- list(requestOptions?: CuisinesClient.RequestOptions): core.HttpResponsePromise<void>;
24
+ list(requestOptions?: CuisinesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListCuisinesResponse>;
19
25
  private __list;
20
26
  }
@@ -50,13 +50,19 @@ const core = __importStar(require("../../../../../../core/index.js"));
50
50
  const environments = __importStar(require("../../../../../../environments.js"));
51
51
  const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
52
52
  const errors = __importStar(require("../../../../../../errors/index.js"));
53
+ const FiveOneEat = __importStar(require("../../../../../index.js"));
53
54
  class CuisinesClient {
54
55
  constructor(options = {}) {
55
56
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
56
57
  }
57
58
  /**
59
+ * Retrieve a list of all cuisines, ordered alphabetically. Use these IDs to
60
+ * populate the `cuisine_ids` field when updating a business profile.
61
+ *
58
62
  * @param {CuisinesClient.RequestOptions} requestOptions - Request-specific configuration.
59
63
  *
64
+ * @throws {@link FiveOneEat.UnauthorizedError}
65
+ *
60
66
  * @example
61
67
  * await client.business.cuisines.list()
62
68
  */
@@ -80,14 +86,22 @@ class CuisinesClient {
80
86
  logging: this._options.logging,
81
87
  });
82
88
  if (_response.ok) {
83
- return { data: undefined, rawResponse: _response.rawResponse };
89
+ return {
90
+ data: _response.body,
91
+ rawResponse: _response.rawResponse,
92
+ };
84
93
  }
85
94
  if (_response.error.reason === "status-code") {
86
- throw new errors.FiveOneEatError({
87
- statusCode: _response.error.statusCode,
88
- body: _response.error.body,
89
- rawResponse: _response.rawResponse,
90
- });
95
+ switch (_response.error.statusCode) {
96
+ case 401:
97
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
98
+ default:
99
+ throw new errors.FiveOneEatError({
100
+ statusCode: _response.error.statusCode,
101
+ body: _response.error.body,
102
+ rawResponse: _response.rawResponse,
103
+ });
104
+ }
91
105
  }
92
106
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/cuisines");
93
107
  });
@@ -1 +1,2 @@
1
1
  export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
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 ListCuisinesResponse {
3
+ data: FiveOneEat.BusinessCuisine[];
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 @@
1
+ export * from "./ListCuisinesResponse.js";
@@ -0,0 +1,17 @@
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("./ListCuisinesResponse.js"), exports);
@@ -6,9 +6,13 @@ export * as bulletins from "./bulletins/index.js";
6
6
  export * from "./bulletins/types/index.js";
7
7
  export * from "./businesses/client/requests/index.js";
8
8
  export * as businesses from "./businesses/index.js";
9
+ export * from "./businesses/types/index.js";
9
10
  export * as categories from "./categories/index.js";
11
+ export * from "./categories/types/index.js";
10
12
  export * as certifications from "./certifications/index.js";
13
+ export * from "./certifications/types/index.js";
11
14
  export * as cuisines from "./cuisines/index.js";
15
+ export * from "./cuisines/types/index.js";
12
16
  export * from "./gallery/client/requests/index.js";
13
17
  export * as gallery from "./gallery/index.js";
14
18
  export * from "./gallery/types/index.js";
@@ -45,9 +45,13 @@ exports.bulletins = __importStar(require("./bulletins/index.js"));
45
45
  __exportStar(require("./bulletins/types/index.js"), exports);
46
46
  __exportStar(require("./businesses/client/requests/index.js"), exports);
47
47
  exports.businesses = __importStar(require("./businesses/index.js"));
48
+ __exportStar(require("./businesses/types/index.js"), exports);
48
49
  exports.categories = __importStar(require("./categories/index.js"));
50
+ __exportStar(require("./categories/types/index.js"), exports);
49
51
  exports.certifications = __importStar(require("./certifications/index.js"));
52
+ __exportStar(require("./certifications/types/index.js"), exports);
50
53
  exports.cuisines = __importStar(require("./cuisines/index.js"));
54
+ __exportStar(require("./cuisines/types/index.js"), exports);
51
55
  __exportStar(require("./gallery/client/requests/index.js"), exports);
52
56
  exports.gallery = __importStar(require("./gallery/index.js"));
53
57
  __exportStar(require("./gallery/types/index.js"), exports);
@@ -5,7 +5,6 @@
5
5
  export interface UpdateBusinessProfileRequest {
6
6
  name?: string;
7
7
  handle?: string;
8
- category?: string | null;
9
8
  phone?: string | null;
10
9
  email?: string | null;
11
10
  website?: string | null;
@@ -32,6 +31,7 @@ export interface UpdateBusinessProfileRequest {
32
31
  pickup_instructions?: string | null;
33
32
  ownership?: string[] | null;
34
33
  badges?: string[] | null;
34
+ category_ids?: number[];
35
35
  hours?: UpdateBusinessProfileRequest.Hours.Item[] | null;
36
36
  operating_months?: number[] | null;
37
37
  }
@@ -50,7 +50,7 @@ export declare class CustomerClient {
50
50
  * @example
51
51
  * await client.customer.search({
52
52
  * q: "wings",
53
- * category: "restaurant",
53
+ * categories: "restaurant,bakery",
54
54
  * city: "Buffalo",
55
55
  * cuisines: "italian,mexican",
56
56
  * certifications: "kosher,halal"
@@ -114,7 +114,7 @@ class CustomerClient {
114
114
  * @example
115
115
  * await client.customer.search({
116
116
  * q: "wings",
117
- * category: "restaurant",
117
+ * categories: "restaurant,bakery",
118
118
  * city: "Buffalo",
119
119
  * cuisines: "italian,mexican",
120
120
  * certifications: "kosher,halal"
@@ -126,10 +126,10 @@ class CustomerClient {
126
126
  __search(request, requestOptions) {
127
127
  return __awaiter(this, void 0, void 0, function* () {
128
128
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
129
- const { q, category, city, cuisines, certifications, radius_km: radiusKm, per_type: perType, lat, lng, } = request;
129
+ const { q, categories, city, cuisines, certifications, radius_km: radiusKm, per_type: perType, lat, lng, } = request;
130
130
  const _queryParams = {
131
131
  q,
132
- category,
132
+ categories,
133
133
  city,
134
134
  cuisines,
135
135
  certifications,