@51eat/sdk 0.0.31 → 0.0.33

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 (126) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/business/resources/auth/client/Client.d.ts +35 -0
  3. package/dist/cjs/api/resources/business/resources/auth/client/Client.js +115 -0
  4. package/dist/cjs/api/resources/business/resources/auth/client/requests/ForgotPasswordRequest.d.ts +9 -0
  5. package/dist/cjs/api/resources/business/resources/auth/client/requests/ForgotPasswordRequest.js +3 -0
  6. package/dist/cjs/api/resources/business/resources/auth/client/requests/ResetPasswordRequest.d.ts +15 -0
  7. package/dist/cjs/api/resources/business/resources/auth/client/requests/ResetPasswordRequest.js +3 -0
  8. package/dist/cjs/api/resources/business/resources/auth/client/requests/index.d.ts +2 -0
  9. package/dist/cjs/api/resources/business/resources/auth/types/ForgotPasswordAuthResponse.d.ts +9 -0
  10. package/dist/cjs/api/resources/business/resources/auth/types/ForgotPasswordAuthResponse.js +10 -0
  11. package/dist/cjs/api/resources/business/resources/auth/types/ResetPasswordAuthResponse.d.ts +9 -0
  12. package/dist/cjs/api/resources/business/resources/auth/types/ResetPasswordAuthResponse.js +10 -0
  13. package/dist/cjs/api/resources/business/resources/auth/types/index.d.ts +2 -0
  14. package/dist/cjs/api/resources/business/resources/auth/types/index.js +2 -0
  15. package/dist/cjs/api/resources/customer/resources/auth/client/Client.d.ts +78 -0
  16. package/dist/cjs/api/resources/customer/resources/auth/client/Client.js +282 -0
  17. package/dist/cjs/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest.d.ts +9 -0
  18. package/dist/cjs/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest.js +3 -0
  19. package/dist/cjs/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthResetPasswordRequest.d.ts +15 -0
  20. package/dist/cjs/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthResetPasswordRequest.js +3 -0
  21. package/dist/cjs/api/resources/customer/resources/auth/client/requests/UpdateUserRequest.d.ts +11 -0
  22. package/dist/cjs/api/resources/customer/resources/auth/client/requests/UpdateUserRequest.js +3 -0
  23. package/dist/cjs/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.d.ts +9 -0
  24. package/dist/cjs/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.js +3 -0
  25. package/dist/cjs/api/resources/customer/resources/auth/client/requests/index.d.ts +4 -0
  26. package/dist/cjs/api/resources/customer/resources/auth/types/DeleteAvatarAuthResponse.d.ts +4 -0
  27. package/dist/cjs/api/resources/customer/resources/auth/types/DeleteAvatarAuthResponse.js +3 -0
  28. package/dist/cjs/api/resources/customer/resources/auth/types/ForgotPasswordAuthResponse.d.ts +9 -0
  29. package/dist/cjs/api/resources/customer/resources/auth/types/ForgotPasswordAuthResponse.js +10 -0
  30. package/dist/cjs/api/resources/customer/resources/auth/types/ResetPasswordAuthResponse.d.ts +9 -0
  31. package/dist/cjs/api/resources/customer/resources/auth/types/ResetPasswordAuthResponse.js +10 -0
  32. package/dist/cjs/api/resources/customer/resources/auth/types/UpdateProfileAuthResponse.d.ts +4 -0
  33. package/dist/cjs/api/resources/customer/resources/auth/types/UpdateProfileAuthResponse.js +3 -0
  34. package/dist/cjs/api/resources/customer/resources/auth/types/UploadAvatarAuthResponse.d.ts +4 -0
  35. package/dist/cjs/api/resources/customer/resources/auth/types/UploadAvatarAuthResponse.js +3 -0
  36. package/dist/cjs/api/resources/customer/resources/auth/types/index.d.ts +5 -0
  37. package/dist/cjs/api/resources/customer/resources/auth/types/index.js +5 -0
  38. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.ts +39 -0
  39. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.js +137 -0
  40. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.ts +20 -0
  41. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.js +3 -0
  42. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.d.ts +18 -0
  43. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.js +3 -0
  44. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.ts +2 -0
  45. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.d.ts +4 -0
  46. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.js +3 -0
  47. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.d.ts +4 -0
  48. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.js +3 -0
  49. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.d.ts +2 -0
  50. package/dist/cjs/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.js +2 -0
  51. package/dist/cjs/api/resources/customer/resources/discovery/client/Client.d.ts +2 -1
  52. package/dist/cjs/api/resources/customer/resources/discovery/client/Client.js +15 -5
  53. package/dist/cjs/api/resources/customer/resources/discovery/client/requests/CategoriesDiscoveryRequest.d.ts +8 -0
  54. package/dist/cjs/api/resources/customer/resources/discovery/client/requests/CategoriesDiscoveryRequest.js +3 -0
  55. package/dist/cjs/api/resources/customer/resources/discovery/client/requests/index.d.ts +1 -0
  56. package/dist/cjs/api/types/CustomerReplyResponse.d.ts +5 -0
  57. package/dist/cjs/api/types/CustomerReplyResponse.js +3 -0
  58. package/dist/cjs/api/types/CustomerUser.d.ts +1 -0
  59. package/dist/cjs/api/types/index.d.ts +1 -0
  60. package/dist/cjs/api/types/index.js +1 -0
  61. package/dist/cjs/version.d.ts +1 -1
  62. package/dist/cjs/version.js +1 -1
  63. package/dist/esm/BaseClient.mjs +2 -2
  64. package/dist/esm/api/resources/business/resources/auth/client/Client.d.mts +35 -0
  65. package/dist/esm/api/resources/business/resources/auth/client/Client.mjs +115 -0
  66. package/dist/esm/api/resources/business/resources/auth/client/requests/ForgotPasswordRequest.d.mts +9 -0
  67. package/dist/esm/api/resources/business/resources/auth/client/requests/ForgotPasswordRequest.mjs +2 -0
  68. package/dist/esm/api/resources/business/resources/auth/client/requests/ResetPasswordRequest.d.mts +15 -0
  69. package/dist/esm/api/resources/business/resources/auth/client/requests/ResetPasswordRequest.mjs +2 -0
  70. package/dist/esm/api/resources/business/resources/auth/client/requests/index.d.mts +2 -0
  71. package/dist/esm/api/resources/business/resources/auth/types/ForgotPasswordAuthResponse.d.mts +9 -0
  72. package/dist/esm/api/resources/business/resources/auth/types/ForgotPasswordAuthResponse.mjs +7 -0
  73. package/dist/esm/api/resources/business/resources/auth/types/ResetPasswordAuthResponse.d.mts +9 -0
  74. package/dist/esm/api/resources/business/resources/auth/types/ResetPasswordAuthResponse.mjs +7 -0
  75. package/dist/esm/api/resources/business/resources/auth/types/index.d.mts +2 -0
  76. package/dist/esm/api/resources/business/resources/auth/types/index.mjs +2 -0
  77. package/dist/esm/api/resources/customer/resources/auth/client/Client.d.mts +78 -0
  78. package/dist/esm/api/resources/customer/resources/auth/client/Client.mjs +282 -0
  79. package/dist/esm/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest.d.mts +9 -0
  80. package/dist/esm/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthForgotPasswordRequest.mjs +2 -0
  81. package/dist/esm/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthResetPasswordRequest.d.mts +15 -0
  82. package/dist/esm/api/resources/customer/resources/auth/client/requests/AppHttpRequestsApiV1CustomerAuthResetPasswordRequest.mjs +2 -0
  83. package/dist/esm/api/resources/customer/resources/auth/client/requests/UpdateUserRequest.d.mts +11 -0
  84. package/dist/esm/api/resources/customer/resources/auth/client/requests/UpdateUserRequest.mjs +2 -0
  85. package/dist/esm/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.d.mts +9 -0
  86. package/dist/esm/api/resources/customer/resources/auth/client/requests/UploadAvatarRequest.mjs +2 -0
  87. package/dist/esm/api/resources/customer/resources/auth/client/requests/index.d.mts +4 -0
  88. package/dist/esm/api/resources/customer/resources/auth/types/DeleteAvatarAuthResponse.d.mts +4 -0
  89. package/dist/esm/api/resources/customer/resources/auth/types/DeleteAvatarAuthResponse.mjs +2 -0
  90. package/dist/esm/api/resources/customer/resources/auth/types/ForgotPasswordAuthResponse.d.mts +9 -0
  91. package/dist/esm/api/resources/customer/resources/auth/types/ForgotPasswordAuthResponse.mjs +7 -0
  92. package/dist/esm/api/resources/customer/resources/auth/types/ResetPasswordAuthResponse.d.mts +9 -0
  93. package/dist/esm/api/resources/customer/resources/auth/types/ResetPasswordAuthResponse.mjs +7 -0
  94. package/dist/esm/api/resources/customer/resources/auth/types/UpdateProfileAuthResponse.d.mts +4 -0
  95. package/dist/esm/api/resources/customer/resources/auth/types/UpdateProfileAuthResponse.mjs +2 -0
  96. package/dist/esm/api/resources/customer/resources/auth/types/UploadAvatarAuthResponse.d.mts +4 -0
  97. package/dist/esm/api/resources/customer/resources/auth/types/UploadAvatarAuthResponse.mjs +2 -0
  98. package/dist/esm/api/resources/customer/resources/auth/types/index.d.mts +5 -0
  99. package/dist/esm/api/resources/customer/resources/auth/types/index.mjs +5 -0
  100. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.d.mts +39 -0
  101. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/Client.mjs +137 -0
  102. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.d.mts +20 -0
  103. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/ListRepliesCommentsRequest.mjs +2 -0
  104. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.d.mts +18 -0
  105. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/StoreBulletinCommentReplyRequest.mjs +2 -0
  106. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/client/requests/index.d.mts +2 -0
  107. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.d.mts +4 -0
  108. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ListRepliesCommentsResponse.mjs +2 -0
  109. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.d.mts +4 -0
  110. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/ReplyCommentsResponse.mjs +2 -0
  111. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.d.mts +2 -0
  112. package/dist/esm/api/resources/customer/resources/businesses/resources/bulletins/resources/comments/types/index.mjs +2 -0
  113. package/dist/esm/api/resources/customer/resources/discovery/client/Client.d.mts +2 -1
  114. package/dist/esm/api/resources/customer/resources/discovery/client/Client.mjs +15 -5
  115. package/dist/esm/api/resources/customer/resources/discovery/client/requests/CategoriesDiscoveryRequest.d.mts +8 -0
  116. package/dist/esm/api/resources/customer/resources/discovery/client/requests/CategoriesDiscoveryRequest.mjs +2 -0
  117. package/dist/esm/api/resources/customer/resources/discovery/client/requests/index.d.mts +1 -0
  118. package/dist/esm/api/types/CustomerReplyResponse.d.mts +5 -0
  119. package/dist/esm/api/types/CustomerReplyResponse.mjs +2 -0
  120. package/dist/esm/api/types/CustomerUser.d.mts +1 -0
  121. package/dist/esm/api/types/index.d.mts +1 -0
  122. package/dist/esm/api/types/index.mjs +1 -0
  123. package/dist/esm/version.d.mts +1 -1
  124. package/dist/esm/version.mjs +1 -1
  125. package/package.json +1 -1
  126. package/reference.md +683 -86
@@ -165,4 +165,141 @@ export class CommentsClient {
165
165
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{handle}/bulletins/{bulletin}/comments");
166
166
  });
167
167
  }
168
+ /**
169
+ * Retrieve paginated replies for a top-level comment on a published bulletin.
170
+ *
171
+ * @param {FiveOneEat.customer.businesses.bulletins.ListRepliesCommentsRequest} request
172
+ * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
173
+ *
174
+ * @throws {@link FiveOneEat.UnauthorizedError}
175
+ * @throws {@link FiveOneEat.NotFoundError}
176
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
177
+ *
178
+ * @example
179
+ * await client.customer.businesses.bulletins.comments.listReplies({
180
+ * handle: "katzs-deli",
181
+ * bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
182
+ * comment: "01950e7d-5678-7000-abcd-ef0123456789"
183
+ * })
184
+ */
185
+ listReplies(request, requestOptions) {
186
+ return core.HttpResponsePromise.fromPromise(this.__listReplies(request, requestOptions));
187
+ }
188
+ __listReplies(request, requestOptions) {
189
+ return __awaiter(this, void 0, void 0, function* () {
190
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
191
+ const { handle, bulletin, comment, page, per_page: perPage } = request;
192
+ const _queryParams = {
193
+ page,
194
+ per_page: perPage,
195
+ };
196
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
197
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
198
+ const _response = yield core.fetcher({
199
+ 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, `customer/businesses/${core.url.encodePathParam(handle)}/bulletins/${core.url.encodePathParam(bulletin)}/comments/${core.url.encodePathParam(comment)}/replies`),
200
+ method: "GET",
201
+ headers: _headers,
202
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
203
+ queryString: core.url
204
+ .queryBuilder()
205
+ .addMany(_queryParams)
206
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
207
+ .build(),
208
+ 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,
209
+ 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,
210
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
211
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
212
+ logging: this._options.logging,
213
+ });
214
+ if (_response.ok) {
215
+ return {
216
+ data: _response.body,
217
+ rawResponse: _response.rawResponse,
218
+ };
219
+ }
220
+ if (_response.error.reason === "status-code") {
221
+ switch (_response.error.statusCode) {
222
+ case 401:
223
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
224
+ case 404:
225
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
226
+ case 422:
227
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
228
+ default:
229
+ throw new errors.FiveOneEatError({
230
+ statusCode: _response.error.statusCode,
231
+ body: _response.error.body,
232
+ rawResponse: _response.rawResponse,
233
+ });
234
+ }
235
+ }
236
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/businesses/{handle}/bulletins/{bulletin}/comments/{comment}/replies");
237
+ });
238
+ }
239
+ /**
240
+ * Post a reply to a top-level comment on a published bulletin. Requires authentication.
241
+ *
242
+ * @param {FiveOneEat.customer.businesses.bulletins.StoreBulletinCommentReplyRequest} request
243
+ * @param {CommentsClient.RequestOptions} requestOptions - Request-specific configuration.
244
+ *
245
+ * @throws {@link FiveOneEat.UnauthorizedError}
246
+ * @throws {@link FiveOneEat.NotFoundError}
247
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
248
+ *
249
+ * @example
250
+ * await client.customer.businesses.bulletins.comments.reply({
251
+ * handle: "katzs-deli",
252
+ * bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
253
+ * comment: "01950e7d-5678-7000-abcd-ef0123456789",
254
+ * body: "body"
255
+ * })
256
+ */
257
+ reply(request, requestOptions) {
258
+ return core.HttpResponsePromise.fromPromise(this.__reply(request, requestOptions));
259
+ }
260
+ __reply(request, requestOptions) {
261
+ return __awaiter(this, void 0, void 0, function* () {
262
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
263
+ const { handle, bulletin, comment } = request, _body = __rest(request, ["handle", "bulletin", "comment"]);
264
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
265
+ const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
266
+ const _response = yield core.fetcher({
267
+ 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, `customer/businesses/${core.url.encodePathParam(handle)}/bulletins/${core.url.encodePathParam(bulletin)}/comments/${core.url.encodePathParam(comment)}/replies`),
268
+ method: "POST",
269
+ headers: _headers,
270
+ contentType: "application/json",
271
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
272
+ requestType: "json",
273
+ body: _body,
274
+ 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,
275
+ 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,
276
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
277
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
278
+ logging: this._options.logging,
279
+ });
280
+ if (_response.ok) {
281
+ return {
282
+ data: _response.body,
283
+ rawResponse: _response.rawResponse,
284
+ };
285
+ }
286
+ if (_response.error.reason === "status-code") {
287
+ switch (_response.error.statusCode) {
288
+ case 401:
289
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
290
+ case 404:
291
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
292
+ case 422:
293
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
294
+ default:
295
+ throw new errors.FiveOneEatError({
296
+ statusCode: _response.error.statusCode,
297
+ body: _response.error.body,
298
+ rawResponse: _response.rawResponse,
299
+ });
300
+ }
301
+ }
302
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/customer/businesses/{handle}/bulletins/{bulletin}/comments/{comment}/replies");
303
+ });
304
+ }
168
305
  }
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * handle: "katzs-deli",
5
+ * bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
6
+ * comment: "01950e7d-5678-7000-abcd-ef0123456789"
7
+ * }
8
+ */
9
+ export interface ListRepliesCommentsRequest {
10
+ /** The business handle */
11
+ handle: string;
12
+ /** The bulletin ID */
13
+ bulletin: string;
14
+ /** The comment ID */
15
+ comment: string;
16
+ /** Page number for pagination */
17
+ page?: number;
18
+ /** Number of replies per page */
19
+ per_page?: number;
20
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * handle: "katzs-deli",
5
+ * bulletin: "01950e7d-1234-7000-abcd-ef0123456789",
6
+ * comment: "01950e7d-5678-7000-abcd-ef0123456789",
7
+ * body: "body"
8
+ * }
9
+ */
10
+ export interface StoreBulletinCommentReplyRequest {
11
+ /** The business handle */
12
+ handle: string;
13
+ /** The bulletin ID */
14
+ bulletin: string;
15
+ /** The comment ID */
16
+ comment: string;
17
+ body: string;
18
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,2 +1,4 @@
1
1
  export type { AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest } from "./AppHttpRequestsApiV1CustomerBusinessesStoreBulletinCommentRequest.mjs";
2
2
  export type { ListCommentsRequest } from "./ListCommentsRequest.mjs";
3
+ export type { ListRepliesCommentsRequest } from "./ListRepliesCommentsRequest.mjs";
4
+ export type { StoreBulletinCommentReplyRequest } from "./StoreBulletinCommentReplyRequest.mjs";
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../../../../../../../index.mjs";
2
+ export interface ListRepliesCommentsResponse {
3
+ data: FiveOneEat.CustomerReplyResponse;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../../../../../../../index.mjs";
2
+ export interface ReplyCommentsResponse {
3
+ data: FiveOneEat.CustomerBulletinCommentReply;
4
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,2 +1,4 @@
1
1
  export * from "./CreateCommentsResponse.mjs";
2
2
  export * from "./ListCommentsResponse.mjs";
3
+ export * from "./ListRepliesCommentsResponse.mjs";
4
+ export * from "./ReplyCommentsResponse.mjs";
@@ -1,2 +1,4 @@
1
1
  export * from "./CreateCommentsResponse.mjs";
2
2
  export * from "./ListCommentsResponse.mjs";
3
+ export * from "./ListRepliesCommentsResponse.mjs";
4
+ export * from "./ReplyCommentsResponse.mjs";
@@ -46,6 +46,7 @@ export declare class DiscoveryClient {
46
46
  * Retrieve a list of all business categories with their business counts.
47
47
  * This endpoint is used to populate category filters and navigation.
48
48
  *
49
+ * @param {FiveOneEat.customer.CategoriesDiscoveryRequest} request
49
50
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
50
51
  *
51
52
  * @throws {@link FiveOneEat.UnauthorizedError}
@@ -53,7 +54,7 @@ export declare class DiscoveryClient {
53
54
  * @example
54
55
  * await client.customer.discovery.categories()
55
56
  */
56
- categories(requestOptions?: DiscoveryClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.CategoriesDiscoveryResponse>;
57
+ categories(request?: FiveOneEat.customer.CategoriesDiscoveryRequest, requestOptions?: DiscoveryClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.CategoriesDiscoveryResponse>;
57
58
  private __categories;
58
59
  /**
59
60
  * Retrieve a list of all cuisines, ordered alphabetically.
@@ -140,6 +140,7 @@ export class DiscoveryClient {
140
140
  * Retrieve a list of all business categories with their business counts.
141
141
  * This endpoint is used to populate category filters and navigation.
142
142
  *
143
+ * @param {FiveOneEat.customer.CategoriesDiscoveryRequest} request
143
144
  * @param {DiscoveryClient.RequestOptions} requestOptions - Request-specific configuration.
144
145
  *
145
146
  * @throws {@link FiveOneEat.UnauthorizedError}
@@ -147,19 +148,28 @@ export class DiscoveryClient {
147
148
  * @example
148
149
  * await client.customer.discovery.categories()
149
150
  */
150
- categories(requestOptions) {
151
- return core.HttpResponsePromise.fromPromise(this.__categories(requestOptions));
151
+ categories(request = {}, requestOptions) {
152
+ return core.HttpResponsePromise.fromPromise(this.__categories(request, requestOptions));
152
153
  }
153
- __categories(requestOptions) {
154
- return __awaiter(this, void 0, void 0, function* () {
154
+ __categories() {
155
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
155
156
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
157
+ const { with_businesses: withBusinesses } = request;
158
+ const _queryParams = {
159
+ with_businesses: withBusinesses,
160
+ };
156
161
  const _authRequest = yield this._options.authProvider.getAuthRequest();
157
162
  const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
158
163
  const _response = yield core.fetcher({
159
164
  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, "customer/discovery/categories"),
160
165
  method: "GET",
161
166
  headers: _headers,
162
- queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
167
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
168
+ queryString: core.url
169
+ .queryBuilder()
170
+ .addMany(_queryParams)
171
+ .mergeAdditional(requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams)
172
+ .build(),
163
173
  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,
164
174
  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,
165
175
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @example
3
+ * {}
4
+ */
5
+ export interface CategoriesDiscoveryRequest {
6
+ /** Only return categories that have at least one business */
7
+ with_businesses?: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -1,2 +1,3 @@
1
+ export type { CategoriesDiscoveryRequest } from "./CategoriesDiscoveryRequest.mjs";
1
2
  export type { CategoryBusinessesDiscoveryRequest } from "./CategoryBusinessesDiscoveryRequest.mjs";
2
3
  export type { FeedDiscoveryRequest } from "./FeedDiscoveryRequest.mjs";
@@ -0,0 +1,5 @@
1
+ import type * as FiveOneEat from "../index.mjs";
2
+ export interface CustomerReplyResponse {
3
+ replies: FiveOneEat.CustomerBulletinCommentReply[];
4
+ pagination: FiveOneEat.PaginationResource;
5
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -3,4 +3,5 @@ export interface CustomerUser {
3
3
  name: string;
4
4
  email: string;
5
5
  role: string;
6
+ avatar_url: string | null;
6
7
  }
@@ -72,6 +72,7 @@ export * from "./CustomerMenuItem.mjs";
72
72
  export * from "./CustomerMenuResponse.mjs";
73
73
  export * from "./CustomerPhoto.mjs";
74
74
  export * from "./CustomerPhotoResponse.mjs";
75
+ export * from "./CustomerReplyResponse.mjs";
75
76
  export * from "./CustomerTemporaryLocation.mjs";
76
77
  export * from "./CustomerToken.mjs";
77
78
  export * from "./CustomerUser.mjs";
@@ -72,6 +72,7 @@ export * from "./CustomerMenuItem.mjs";
72
72
  export * from "./CustomerMenuResponse.mjs";
73
73
  export * from "./CustomerPhoto.mjs";
74
74
  export * from "./CustomerPhotoResponse.mjs";
75
+ export * from "./CustomerReplyResponse.mjs";
75
76
  export * from "./CustomerTemporaryLocation.mjs";
76
77
  export * from "./CustomerToken.mjs";
77
78
  export * from "./CustomerUser.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.31";
1
+ export declare const SDK_VERSION = "0.0.33";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.0.31";
1
+ export const SDK_VERSION = "0.0.33";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@51eat/sdk",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",