@51eat/sdk 0.0.28 → 0.0.30

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 (148) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/business/client/Client.d.ts +3 -0
  3. package/dist/cjs/api/resources/business/client/Client.js +31 -26
  4. package/dist/cjs/api/resources/business/resources/allergens/client/Client.d.ts +26 -0
  5. package/dist/cjs/api/resources/business/resources/allergens/client/Client.js +110 -0
  6. package/dist/cjs/api/resources/business/resources/allergens/client/index.d.ts +1 -0
  7. package/dist/cjs/api/resources/business/resources/allergens/client/index.js +2 -0
  8. package/dist/cjs/api/resources/business/resources/allergens/exports.d.ts +2 -0
  9. package/dist/cjs/api/resources/business/resources/allergens/exports.js +21 -0
  10. package/dist/cjs/api/resources/business/resources/allergens/index.d.ts +2 -0
  11. package/dist/cjs/api/resources/business/resources/allergens/index.js +18 -0
  12. package/dist/cjs/api/resources/business/resources/allergens/types/ListAllergensResponse.d.ts +4 -0
  13. package/dist/cjs/api/resources/business/resources/allergens/types/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/business/resources/allergens/types/index.js +17 -0
  15. package/dist/cjs/api/resources/business/resources/bulletins/client/Client.d.ts +3 -0
  16. package/dist/cjs/api/resources/business/resources/bulletins/client/Client.js +5 -0
  17. package/dist/cjs/api/resources/business/resources/bulletins/exports.d.ts +1 -0
  18. package/dist/cjs/api/resources/business/resources/bulletins/exports.js +1 -0
  19. package/dist/cjs/api/resources/business/resources/bulletins/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/business/resources/bulletins/index.js +1 -0
  21. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/Client.d.ts +49 -0
  22. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/Client.js +208 -0
  23. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/index.d.ts +1 -0
  24. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/index.js +17 -0
  25. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.ts +12 -0
  26. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.js +3 -0
  27. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.d.ts +13 -0
  28. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.js +3 -0
  29. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/requests/index.d.ts +2 -0
  30. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/client/requests/index.js +2 -0
  31. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/exports.d.ts +2 -0
  32. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/exports.js +21 -0
  33. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/index.d.ts +2 -0
  34. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/index.js +18 -0
  35. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/CreateCommentsResponse.d.ts +4 -0
  36. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/CreateCommentsResponse.js +3 -0
  37. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/ListCommentsResponse.d.ts +4 -0
  38. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/ListCommentsResponse.js +3 -0
  39. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/index.d.ts +2 -0
  40. package/dist/cjs/api/resources/business/resources/bulletins/resources/comments/types/index.js +18 -0
  41. package/dist/cjs/api/resources/business/resources/bulletins/resources/index.d.ts +3 -0
  42. package/dist/cjs/api/resources/business/resources/bulletins/resources/index.js +42 -0
  43. package/dist/cjs/api/resources/business/resources/index.d.ts +2 -0
  44. package/dist/cjs/api/resources/business/resources/index.js +6 -4
  45. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.ts +2 -2
  46. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.js +1 -1
  47. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/{StoreBulletinCommentRequest.d.ts → AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.ts} +2 -1
  48. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.js +3 -0
  49. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.ts +1 -1
  50. package/dist/cjs/api/resources/customer/resources/discovery/client/Client.d.ts +13 -0
  51. package/dist/cjs/api/resources/customer/resources/discovery/client/Client.js +51 -0
  52. package/dist/cjs/api/resources/customer/resources/discovery/types/AllergensDiscoveryResponse.d.ts +4 -0
  53. package/dist/cjs/api/resources/customer/resources/discovery/types/AllergensDiscoveryResponse.js +3 -0
  54. package/dist/cjs/api/resources/customer/resources/discovery/types/index.d.ts +1 -0
  55. package/dist/cjs/api/resources/customer/resources/discovery/types/index.js +1 -0
  56. package/dist/cjs/api/types/BusinessAllergen.d.ts +8 -0
  57. package/dist/cjs/api/types/BusinessAllergen.js +3 -0
  58. package/dist/cjs/api/types/BusinessBulletinComment.d.ts +15 -0
  59. package/dist/cjs/api/types/BusinessBulletinComment.js +3 -0
  60. package/dist/cjs/api/types/BusinessBulletinCommentReply.d.ts +13 -0
  61. package/dist/cjs/api/types/BusinessBulletinCommentReply.js +3 -0
  62. package/dist/cjs/api/types/BusinessBulletinCommentResponse.d.ts +5 -0
  63. package/dist/cjs/api/types/BusinessBulletinCommentResponse.js +3 -0
  64. package/dist/cjs/api/types/CustomerBulletinCommentReply.d.ts +13 -0
  65. package/dist/cjs/api/types/CustomerBulletinCommentReply.js +3 -0
  66. package/dist/cjs/api/types/CustomerComment.d.ts +3 -0
  67. package/dist/cjs/api/types/CustomerDiscoveryAllergen.d.ts +8 -0
  68. package/dist/cjs/api/types/CustomerDiscoveryAllergen.js +3 -0
  69. package/dist/cjs/api/types/index.d.ts +6 -0
  70. package/dist/cjs/api/types/index.js +6 -0
  71. package/dist/cjs/version.d.ts +1 -1
  72. package/dist/cjs/version.js +1 -1
  73. package/dist/esm/BaseClient.mjs +2 -2
  74. package/dist/esm/api/resources/business/client/Client.d.mts +3 -0
  75. package/dist/esm/api/resources/business/client/Client.mjs +5 -0
  76. package/dist/esm/api/resources/business/resources/allergens/client/Client.d.mts +26 -0
  77. package/dist/esm/api/resources/business/resources/allergens/client/Client.mjs +73 -0
  78. package/dist/esm/api/resources/business/resources/allergens/client/index.d.mts +1 -0
  79. package/dist/esm/api/resources/business/resources/allergens/client/index.mjs +1 -0
  80. package/dist/esm/api/resources/business/resources/allergens/exports.d.mts +2 -0
  81. package/dist/esm/api/resources/business/resources/allergens/exports.mjs +3 -0
  82. package/dist/esm/api/resources/business/resources/allergens/index.d.mts +2 -0
  83. package/dist/esm/api/resources/business/resources/allergens/index.mjs +2 -0
  84. package/dist/esm/api/resources/business/resources/allergens/types/ListAllergensResponse.d.mts +4 -0
  85. package/dist/esm/api/resources/business/resources/allergens/types/index.d.mts +1 -0
  86. package/dist/esm/api/resources/business/resources/allergens/types/index.mjs +1 -0
  87. package/dist/esm/api/resources/business/resources/bulletins/client/Client.d.mts +3 -0
  88. package/dist/esm/api/resources/business/resources/bulletins/client/Client.mjs +5 -0
  89. package/dist/esm/api/resources/business/resources/bulletins/exports.d.mts +1 -0
  90. package/dist/esm/api/resources/business/resources/bulletins/exports.mjs +1 -0
  91. package/dist/esm/api/resources/business/resources/bulletins/index.d.mts +1 -0
  92. package/dist/esm/api/resources/business/resources/bulletins/index.mjs +1 -0
  93. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/Client.d.mts +49 -0
  94. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/Client.mjs +171 -0
  95. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/index.d.mts +1 -0
  96. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/index.mjs +1 -0
  97. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.d.mts +12 -0
  98. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/requests/ListCommentsRequest.mjs +2 -0
  99. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.d.mts +13 -0
  100. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.mjs +2 -0
  101. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/requests/index.d.mts +2 -0
  102. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/client/requests/index.mjs +1 -0
  103. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/exports.d.mts +2 -0
  104. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/exports.mjs +3 -0
  105. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/index.d.mts +2 -0
  106. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/index.mjs +2 -0
  107. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/CreateCommentsResponse.d.mts +4 -0
  108. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/CreateCommentsResponse.mjs +2 -0
  109. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/ListCommentsResponse.d.mts +4 -0
  110. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/ListCommentsResponse.mjs +2 -0
  111. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/index.d.mts +2 -0
  112. package/dist/esm/api/resources/business/resources/bulletins/resources/comments/types/index.mjs +2 -0
  113. package/dist/esm/api/resources/business/resources/bulletins/resources/index.d.mts +3 -0
  114. package/dist/esm/api/resources/business/resources/bulletins/resources/index.mjs +3 -0
  115. package/dist/esm/api/resources/business/resources/index.d.mts +2 -0
  116. package/dist/esm/api/resources/business/resources/index.mjs +2 -0
  117. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +2 -2
  118. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +1 -1
  119. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/{StoreBulletinCommentRequest.d.mts → AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.d.mts} +2 -1
  120. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.mjs +2 -0
  121. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.mts +1 -1
  122. package/dist/esm/api/resources/customer/resources/discovery/client/Client.d.mts +13 -0
  123. package/dist/esm/api/resources/customer/resources/discovery/client/Client.mjs +51 -0
  124. package/dist/esm/api/resources/customer/resources/discovery/types/AllergensDiscoveryResponse.d.mts +4 -0
  125. package/dist/esm/api/resources/customer/resources/discovery/types/AllergensDiscoveryResponse.mjs +2 -0
  126. package/dist/esm/api/resources/customer/resources/discovery/types/index.d.mts +1 -0
  127. package/dist/esm/api/resources/customer/resources/discovery/types/index.mjs +1 -0
  128. package/dist/esm/api/types/BusinessAllergen.d.mts +8 -0
  129. package/dist/esm/api/types/BusinessAllergen.mjs +2 -0
  130. package/dist/esm/api/types/BusinessBulletinComment.d.mts +15 -0
  131. package/dist/esm/api/types/BusinessBulletinComment.mjs +2 -0
  132. package/dist/esm/api/types/BusinessBulletinCommentReply.d.mts +13 -0
  133. package/dist/esm/api/types/BusinessBulletinCommentReply.mjs +2 -0
  134. package/dist/esm/api/types/BusinessBulletinCommentResponse.d.mts +5 -0
  135. package/dist/esm/api/types/BusinessBulletinCommentResponse.mjs +2 -0
  136. package/dist/esm/api/types/CustomerBulletinCommentReply.d.mts +13 -0
  137. package/dist/esm/api/types/CustomerBulletinCommentReply.mjs +2 -0
  138. package/dist/esm/api/types/CustomerComment.d.mts +3 -0
  139. package/dist/esm/api/types/CustomerDiscoveryAllergen.d.mts +8 -0
  140. package/dist/esm/api/types/CustomerDiscoveryAllergen.mjs +2 -0
  141. package/dist/esm/api/types/index.d.mts +6 -0
  142. package/dist/esm/api/types/index.mjs +6 -0
  143. package/dist/esm/version.d.mts +1 -1
  144. package/dist/esm/version.mjs +1 -1
  145. package/package.json +23 -1
  146. package/reference.md +233 -1
  147. /package/dist/cjs/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.js → business/resources/allergens/types/ListAllergensResponse.js} +0 -0
  148. /package/dist/esm/api/resources/{customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentRequest.mjs → business/resources/allergens/types/ListAllergensResponse.mjs} +0 -0
@@ -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.28",
47
- "User-Agent": "@51eat/sdk/0.0.28",
46
+ "X-Fern-SDK-Version": "0.0.30",
47
+ "User-Agent": "@51eat/sdk/0.0.30",
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,5 +1,6 @@
1
1
  import type { BaseClientOptions } from "../../../../BaseClient.js";
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
3
+ import { AllergensClient } from "../resources/allergens/client/Client.js";
3
4
  import { AuthClient } from "../resources/auth/client/Client.js";
4
5
  import { BulletinsClient } from "../resources/bulletins/client/Client.js";
5
6
  import { BusinessesClient } from "../resources/businesses/client/Client.js";
@@ -31,6 +32,7 @@ export declare class BusinessClient {
31
32
  protected _cuisines: CuisinesClient | undefined;
32
33
  protected _certifications: CertificationsClient | undefined;
33
34
  protected _categories: CategoriesClient | undefined;
35
+ protected _allergens: AllergensClient | undefined;
34
36
  constructor(options?: BusinessClient.Options);
35
37
  get auth(): AuthClient;
36
38
  get bulletins(): BulletinsClient;
@@ -45,4 +47,5 @@ export declare class BusinessClient {
45
47
  get cuisines(): CuisinesClient;
46
48
  get certifications(): CertificationsClient;
47
49
  get categories(): CategoriesClient;
50
+ get allergens(): AllergensClient;
48
51
  }
@@ -3,74 +3,79 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.BusinessClient = void 0;
5
5
  const BaseClient_js_1 = require("../../../../BaseClient.js");
6
- const Client_js_1 = require("../resources/auth/client/Client.js");
7
- const Client_js_2 = require("../resources/bulletins/client/Client.js");
8
- const Client_js_3 = require("../resources/businesses/client/Client.js");
9
- const Client_js_4 = require("../resources/categories/client/Client.js");
10
- const Client_js_5 = require("../resources/certifications/client/Client.js");
11
- const Client_js_6 = require("../resources/cuisines/client/Client.js");
12
- const Client_js_7 = require("../resources/events/client/Client.js");
13
- const Client_js_8 = require("../resources/gallery/client/Client.js");
14
- const Client_js_9 = require("../resources/menus/client/Client.js");
15
- const Client_js_10 = require("../resources/messaging/client/Client.js");
16
- const Client_js_11 = require("../resources/profile/client/Client.js");
17
- const Client_js_12 = require("../resources/pushNotifications/client/Client.js");
18
- const Client_js_13 = require("../resources/stripeConnect/client/Client.js");
6
+ const Client_js_1 = require("../resources/allergens/client/Client.js");
7
+ const Client_js_2 = require("../resources/auth/client/Client.js");
8
+ const Client_js_3 = require("../resources/bulletins/client/Client.js");
9
+ const Client_js_4 = require("../resources/businesses/client/Client.js");
10
+ const Client_js_5 = require("../resources/categories/client/Client.js");
11
+ const Client_js_6 = require("../resources/certifications/client/Client.js");
12
+ const Client_js_7 = require("../resources/cuisines/client/Client.js");
13
+ const Client_js_8 = require("../resources/events/client/Client.js");
14
+ const Client_js_9 = require("../resources/gallery/client/Client.js");
15
+ const Client_js_10 = require("../resources/menus/client/Client.js");
16
+ const Client_js_11 = require("../resources/messaging/client/Client.js");
17
+ const Client_js_12 = require("../resources/profile/client/Client.js");
18
+ const Client_js_13 = require("../resources/pushNotifications/client/Client.js");
19
+ const Client_js_14 = require("../resources/stripeConnect/client/Client.js");
19
20
  class BusinessClient {
20
21
  constructor(options = {}) {
21
22
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
22
23
  }
23
24
  get auth() {
24
25
  var _a;
25
- return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_1.AuthClient(this._options)));
26
+ return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_2.AuthClient(this._options)));
26
27
  }
27
28
  get bulletins() {
28
29
  var _a;
29
- return ((_a = this._bulletins) !== null && _a !== void 0 ? _a : (this._bulletins = new Client_js_2.BulletinsClient(this._options)));
30
+ return ((_a = this._bulletins) !== null && _a !== void 0 ? _a : (this._bulletins = new Client_js_3.BulletinsClient(this._options)));
30
31
  }
31
32
  get businesses() {
32
33
  var _a;
33
- return ((_a = this._businesses) !== null && _a !== void 0 ? _a : (this._businesses = new Client_js_3.BusinessesClient(this._options)));
34
+ return ((_a = this._businesses) !== null && _a !== void 0 ? _a : (this._businesses = new Client_js_4.BusinessesClient(this._options)));
34
35
  }
35
36
  get events() {
36
37
  var _a;
37
- return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_js_7.EventsClient(this._options)));
38
+ return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_js_8.EventsClient(this._options)));
38
39
  }
39
40
  get gallery() {
40
41
  var _a;
41
- return ((_a = this._gallery) !== null && _a !== void 0 ? _a : (this._gallery = new Client_js_8.GalleryClient(this._options)));
42
+ return ((_a = this._gallery) !== null && _a !== void 0 ? _a : (this._gallery = new Client_js_9.GalleryClient(this._options)));
42
43
  }
43
44
  get menus() {
44
45
  var _a;
45
- return ((_a = this._menus) !== null && _a !== void 0 ? _a : (this._menus = new Client_js_9.MenusClient(this._options)));
46
+ return ((_a = this._menus) !== null && _a !== void 0 ? _a : (this._menus = new Client_js_10.MenusClient(this._options)));
46
47
  }
47
48
  get messaging() {
48
49
  var _a;
49
- return ((_a = this._messaging) !== null && _a !== void 0 ? _a : (this._messaging = new Client_js_10.MessagingClient(this._options)));
50
+ return ((_a = this._messaging) !== null && _a !== void 0 ? _a : (this._messaging = new Client_js_11.MessagingClient(this._options)));
50
51
  }
51
52
  get profile() {
52
53
  var _a;
53
- return ((_a = this._profile) !== null && _a !== void 0 ? _a : (this._profile = new Client_js_11.ProfileClient(this._options)));
54
+ return ((_a = this._profile) !== null && _a !== void 0 ? _a : (this._profile = new Client_js_12.ProfileClient(this._options)));
54
55
  }
55
56
  get pushNotifications() {
56
57
  var _a;
57
- return ((_a = this._pushNotifications) !== null && _a !== void 0 ? _a : (this._pushNotifications = new Client_js_12.PushNotificationsClient(this._options)));
58
+ return ((_a = this._pushNotifications) !== null && _a !== void 0 ? _a : (this._pushNotifications = new Client_js_13.PushNotificationsClient(this._options)));
58
59
  }
59
60
  get stripeConnect() {
60
61
  var _a;
61
- return ((_a = this._stripeConnect) !== null && _a !== void 0 ? _a : (this._stripeConnect = new Client_js_13.StripeConnectClient(this._options)));
62
+ return ((_a = this._stripeConnect) !== null && _a !== void 0 ? _a : (this._stripeConnect = new Client_js_14.StripeConnectClient(this._options)));
62
63
  }
63
64
  get cuisines() {
64
65
  var _a;
65
- return ((_a = this._cuisines) !== null && _a !== void 0 ? _a : (this._cuisines = new Client_js_6.CuisinesClient(this._options)));
66
+ return ((_a = this._cuisines) !== null && _a !== void 0 ? _a : (this._cuisines = new Client_js_7.CuisinesClient(this._options)));
66
67
  }
67
68
  get certifications() {
68
69
  var _a;
69
- return ((_a = this._certifications) !== null && _a !== void 0 ? _a : (this._certifications = new Client_js_5.CertificationsClient(this._options)));
70
+ return ((_a = this._certifications) !== null && _a !== void 0 ? _a : (this._certifications = new Client_js_6.CertificationsClient(this._options)));
70
71
  }
71
72
  get categories() {
72
73
  var _a;
73
- return ((_a = this._categories) !== null && _a !== void 0 ? _a : (this._categories = new Client_js_4.CategoriesClient(this._options)));
74
+ return ((_a = this._categories) !== null && _a !== void 0 ? _a : (this._categories = new Client_js_5.CategoriesClient(this._options)));
75
+ }
76
+ get allergens() {
77
+ var _a;
78
+ return ((_a = this._allergens) !== null && _a !== void 0 ? _a : (this._allergens = new Client_js_1.AllergensClient(this._options)));
74
79
  }
75
80
  }
76
81
  exports.BusinessClient = BusinessClient;
@@ -0,0 +1,26 @@
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 AllergensClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class AllergensClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<AllergensClient.Options>;
12
+ constructor(options?: AllergensClient.Options);
13
+ /**
14
+ * Retrieve a list of all allergens, ordered alphabetically. Use these UUIDs
15
+ * in the `allergens` array when creating or updating a menu item.
16
+ *
17
+ * @param {AllergensClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link FiveOneEat.UnauthorizedError}
20
+ *
21
+ * @example
22
+ * await client.business.allergens.list()
23
+ */
24
+ list(requestOptions?: AllergensClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListAllergensResponse>;
25
+ private __list;
26
+ }
@@ -0,0 +1,110 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.AllergensClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../../../errors/index.js"));
53
+ const FiveOneEat = __importStar(require("../../../../../index.js"));
54
+ class AllergensClient {
55
+ constructor(options = {}) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * Retrieve a list of all allergens, ordered alphabetically. Use these UUIDs
60
+ * in the `allergens` array when creating or updating a menu item.
61
+ *
62
+ * @param {AllergensClient.RequestOptions} requestOptions - Request-specific configuration.
63
+ *
64
+ * @throws {@link FiveOneEat.UnauthorizedError}
65
+ *
66
+ * @example
67
+ * await client.business.allergens.list()
68
+ */
69
+ list(requestOptions) {
70
+ return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
71
+ }
72
+ __list(requestOptions) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
75
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
76
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
77
+ const _response = yield core.fetcher({
78
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, "business/allergens"),
79
+ method: "GET",
80
+ headers: _headers,
81
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
82
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
83
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
84
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
85
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
86
+ logging: this._options.logging,
87
+ });
88
+ if (_response.ok) {
89
+ return {
90
+ data: _response.body,
91
+ rawResponse: _response.rawResponse,
92
+ };
93
+ }
94
+ if (_response.error.reason === "status-code") {
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
+ }
105
+ }
106
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/allergens");
107
+ });
108
+ }
109
+ }
110
+ exports.AllergensClient = AllergensClient;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { AllergensClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.AllergensClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "AllergensClient", { enumerable: true, get: function () { return Client_js_1.AllergensClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../../../index.js";
2
+ export interface ListAllergensResponse {
3
+ data: FiveOneEat.BusinessAllergen[];
4
+ }
@@ -0,0 +1 @@
1
+ export * from "./ListAllergensResponse.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("./ListAllergensResponse.js"), exports);
@@ -2,6 +2,7 @@ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../Ba
2
2
  import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
3
  import * as core from "../../../../../../core/index.js";
4
4
  import * as FiveOneEat from "../../../../../index.js";
5
+ import { CommentsClient } from "../resources/comments/client/Client.js";
5
6
  export declare namespace BulletinsClient {
6
7
  type Options = BaseClientOptions;
7
8
  interface RequestOptions extends BaseRequestOptions {
@@ -9,7 +10,9 @@ export declare namespace BulletinsClient {
9
10
  }
10
11
  export declare class BulletinsClient {
11
12
  protected readonly _options: NormalizedClientOptionsWithAuth<BulletinsClient.Options>;
13
+ protected _comments: CommentsClient | undefined;
12
14
  constructor(options?: BulletinsClient.Options);
15
+ get comments(): CommentsClient;
13
16
  /**
14
17
  * @param {BulletinsClient.RequestOptions} requestOptions - Request-specific configuration.
15
18
  *
@@ -62,10 +62,15 @@ const environments = __importStar(require("../../../../../../environments.js"));
62
62
  const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
63
63
  const errors = __importStar(require("../../../../../../errors/index.js"));
64
64
  const FiveOneEat = __importStar(require("../../../../../index.js"));
65
+ const Client_js_1 = require("../resources/comments/client/Client.js");
65
66
  class BulletinsClient {
66
67
  constructor(options = {}) {
67
68
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
68
69
  }
70
+ get comments() {
71
+ var _a;
72
+ return ((_a = this._comments) !== null && _a !== void 0 ? _a : (this._comments = new Client_js_1.CommentsClient(this._options)));
73
+ }
69
74
  /**
70
75
  * @param {BulletinsClient.RequestOptions} requestOptions - Request-specific configuration.
71
76
  *
@@ -1,2 +1,3 @@
1
1
  export { BulletinsClient } from "./client/Client.js";
2
2
  export * from "./client/index.js";
3
+ export * from "./resources/index.js";
@@ -19,3 +19,4 @@ exports.BulletinsClient = void 0;
19
19
  var Client_js_1 = require("./client/Client.js");
20
20
  Object.defineProperty(exports, "BulletinsClient", { enumerable: true, get: function () { return Client_js_1.BulletinsClient; } });
21
21
  __exportStar(require("./client/index.js"), exports);
22
+ __exportStar(require("./resources/index.js"), exports);
@@ -1,2 +1,3 @@
1
1
  export * from "./client/index.js";
2
+ export * from "./resources/index.js";
2
3
  export * from "./types/index.js";
@@ -15,4 +15,5 @@ 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("./resources/index.js"), exports);
18
19
  __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,49 @@
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 CommentsClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class CommentsClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<CommentsClient.Options>;
12
+ constructor(options?: CommentsClient.Options);
13
+ /**
14
+ * @param {FiveOneEat.business.bulletins.ListCommentsRequest} request
15
+ * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
16
+ *
17
+ * @throws {@link FiveOneEat.UnauthorizedError}
18
+ * @throws {@link FiveOneEat.ForbiddenError}
19
+ * @throws {@link FiveOneEat.NotFoundError}
20
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
21
+ *
22
+ * @example
23
+ * await client.business.bulletins.comments.list({
24
+ * bulletin: "bulletin"
25
+ * })
26
+ */
27
+ list(request: FiveOneEat.business.bulletins.ListCommentsRequest, requestOptions?: CommentsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.bulletins.ListCommentsResponse>;
28
+ private __list;
29
+ /**
30
+ * Omit `parent_id` for a top-level comment. Set `parent_id` to a top-level
31
+ * comment's id to post a one-level reply (replies to replies are not allowed).
32
+ *
33
+ * @param {FiveOneEat.business.bulletins.StoreBulletinCommentRequest} request
34
+ * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
35
+ *
36
+ * @throws {@link FiveOneEat.UnauthorizedError}
37
+ * @throws {@link FiveOneEat.ForbiddenError}
38
+ * @throws {@link FiveOneEat.NotFoundError}
39
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
40
+ *
41
+ * @example
42
+ * await client.business.bulletins.comments.create({
43
+ * bulletin: "bulletin",
44
+ * body: "body"
45
+ * })
46
+ */
47
+ create(request: FiveOneEat.business.bulletins.StoreBulletinCommentRequest, requestOptions?: CommentsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.bulletins.CreateCommentsResponse>;
48
+ private __create;
49
+ }