@51eat/sdk 0.0.55 → 0.0.57

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 (165) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -3
  3. package/dist/cjs/Client.js +11 -11
  4. package/dist/cjs/api/resources/business/resources/discounts/client/requests/StoreDiscountRequest.d.ts +2 -2
  5. package/dist/cjs/api/resources/business/resources/discounts/client/requests/UpdateDiscountRequest.d.ts +2 -2
  6. package/dist/cjs/api/resources/business/resources/productCategories/client/requests/StoreProductCategoryRequest.d.ts +1 -1
  7. package/dist/cjs/api/resources/business/resources/productCategories/client/requests/UpdateProductCategoryRequest.d.ts +1 -1
  8. package/dist/cjs/api/resources/business/resources/productOrders/client/Client.d.ts +1 -1
  9. package/dist/cjs/api/resources/business/resources/productOrders/client/Client.js +4 -1
  10. package/dist/cjs/api/resources/business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.d.ts +10 -0
  11. package/dist/cjs/api/resources/business/resources/productOrders/types/index.d.ts +1 -0
  12. package/dist/cjs/api/resources/business/resources/productOrders/types/index.js +1 -0
  13. package/dist/cjs/api/resources/business/resources/products/client/requests/StoreProductRequest.d.ts +1 -1
  14. package/dist/cjs/api/resources/business/resources/products/client/requests/UpdateProductRequest.d.ts +1 -1
  15. package/dist/cjs/api/resources/business/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.ts +3 -3
  16. package/dist/cjs/api/resources/business/resources/stripeConnect/types/CreateAccountSessionStripeConnectResponse.d.ts +1 -1
  17. package/dist/cjs/api/resources/businessProducts/client/requests/AdjustInventoryRequest.d.ts +2 -10
  18. package/dist/cjs/api/resources/businessProducts/client/requests/AdjustInventoryRequest.js +0 -8
  19. package/dist/cjs/api/resources/customer/resources/businesses/client/Client.d.ts +2 -1
  20. package/dist/cjs/api/resources/customer/resources/businesses/client/Client.js +4 -1
  21. package/dist/cjs/api/resources/customer/resources/cart/client/Client.d.ts +2 -2
  22. package/dist/cjs/api/resources/customer/resources/cart/client/Client.js +5 -2
  23. package/dist/cjs/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.ts +3 -3
  24. package/dist/cjs/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponseItem.d.ts +19 -0
  25. package/dist/cjs/api/resources/customer/resources/cart/types/SelectShippingOptionCartResponse.d.ts +2 -7
  26. package/dist/cjs/api/resources/customer/resources/cart/types/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/customer/resources/cart/types/index.js +1 -0
  28. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CalculatePriceTicketingResponse.d.ts +13 -1
  29. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.ts +3 -3
  30. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.ts +13 -2
  31. package/dist/cjs/api/resources/customer/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.ts +3 -3
  32. package/dist/cjs/api/resources/customerBusinesses/client/Client.d.ts +30 -0
  33. package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/client/Client.js +12 -10
  34. package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.d.ts +12 -0
  35. package/dist/cjs/api/resources/customerBusinesses/client/requests/index.d.ts +1 -0
  36. package/dist/cjs/api/resources/customerBusinesses/exports.d.ts +2 -0
  37. package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/exports.js +2 -2
  38. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.d.ts +7 -0
  39. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.js +3 -0
  40. package/dist/cjs/api/resources/customerBusinesses/types/index.d.ts +1 -0
  41. package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/types/index.js +1 -1
  42. package/dist/cjs/api/resources/customerMyAccount/client/Client.d.ts +16 -0
  43. package/dist/cjs/api/resources/customerMyAccount/client/Client.js +54 -0
  44. package/dist/cjs/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.d.ts +9 -0
  45. package/dist/cjs/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.js +3 -0
  46. package/dist/cjs/api/resources/customerMyAccount/client/requests/index.d.ts +1 -0
  47. package/dist/cjs/api/resources/index.d.ts +3 -3
  48. package/dist/cjs/api/resources/index.js +4 -4
  49. package/dist/cjs/api/resources/serveAd/client/Client.d.ts +1 -1
  50. package/dist/cjs/api/resources/serveAd/client/Client.js +4 -1
  51. package/dist/cjs/api/resources/serveAd/types/AdsServeAdResponse.d.ts +2 -2
  52. package/dist/cjs/api/types/Ad.d.ts +1 -4
  53. package/dist/cjs/api/types/BusinessConversation.d.ts +1 -1
  54. package/dist/cjs/api/types/BusinessEventCheckInStats.d.ts +1 -1
  55. package/dist/cjs/api/types/BusinessEventSalesSummary.d.ts +1 -1
  56. package/dist/cjs/api/types/BusinessMenuItem.d.ts +22 -2
  57. package/dist/cjs/api/types/Conversation.d.ts +1 -1
  58. package/dist/cjs/api/types/CustomerProductOrderItem.d.ts +10 -1
  59. package/dist/cjs/api/types/InventoryChangeType.d.ts +9 -0
  60. package/dist/cjs/api/types/InventoryChangeType.js +12 -0
  61. package/dist/cjs/api/types/Ticket.d.ts +1 -0
  62. package/dist/cjs/api/types/TicketOrder.d.ts +1 -1
  63. package/dist/cjs/api/types/index.d.ts +1 -1
  64. package/dist/cjs/api/types/index.js +1 -1
  65. package/dist/cjs/version.d.ts +1 -1
  66. package/dist/cjs/version.js +1 -1
  67. package/dist/esm/BaseClient.mjs +2 -2
  68. package/dist/esm/Client.d.mts +3 -3
  69. package/dist/esm/Client.mjs +5 -5
  70. package/dist/esm/api/resources/business/resources/discounts/client/requests/StoreDiscountRequest.d.mts +2 -2
  71. package/dist/esm/api/resources/business/resources/discounts/client/requests/UpdateDiscountRequest.d.mts +2 -2
  72. package/dist/esm/api/resources/business/resources/productCategories/client/requests/StoreProductCategoryRequest.d.mts +1 -1
  73. package/dist/esm/api/resources/business/resources/productCategories/client/requests/UpdateProductCategoryRequest.d.mts +1 -1
  74. package/dist/esm/api/resources/business/resources/productOrders/client/Client.d.mts +1 -1
  75. package/dist/esm/api/resources/business/resources/productOrders/client/Client.mjs +4 -1
  76. package/dist/esm/api/resources/business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.d.mts +10 -0
  77. package/dist/esm/api/resources/business/resources/productOrders/types/index.d.mts +1 -0
  78. package/dist/esm/api/resources/business/resources/productOrders/types/index.mjs +1 -0
  79. package/dist/esm/api/resources/business/resources/products/client/requests/StoreProductRequest.d.mts +1 -1
  80. package/dist/esm/api/resources/business/resources/products/client/requests/UpdateProductRequest.d.mts +1 -1
  81. package/dist/esm/api/resources/business/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.mts +3 -3
  82. package/dist/esm/api/resources/business/resources/stripeConnect/types/CreateAccountSessionStripeConnectResponse.d.mts +1 -1
  83. package/dist/esm/api/resources/businessProducts/client/requests/AdjustInventoryRequest.d.mts +2 -10
  84. package/dist/esm/api/resources/businessProducts/client/requests/AdjustInventoryRequest.mjs +0 -8
  85. package/dist/esm/api/resources/customer/resources/businesses/client/Client.d.mts +2 -1
  86. package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +4 -1
  87. package/dist/esm/api/resources/customer/resources/cart/client/Client.d.mts +2 -2
  88. package/dist/esm/api/resources/customer/resources/cart/client/Client.mjs +5 -2
  89. package/dist/esm/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.mts +3 -3
  90. package/dist/esm/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponseItem.d.mts +19 -0
  91. package/dist/esm/api/resources/customer/resources/cart/types/SelectShippingOptionCartResponse.d.mts +2 -7
  92. package/dist/esm/api/resources/customer/resources/cart/types/index.d.mts +1 -0
  93. package/dist/esm/api/resources/customer/resources/cart/types/index.mjs +1 -0
  94. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CalculatePriceTicketingResponse.d.mts +13 -1
  95. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.mts +3 -3
  96. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.mts +13 -2
  97. package/dist/esm/api/resources/customer/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.mts +3 -3
  98. package/dist/esm/api/resources/customerBusinesses/client/Client.d.mts +30 -0
  99. package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/Client.mjs +10 -8
  100. package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.d.mts +12 -0
  101. package/dist/esm/api/resources/customerBusinesses/client/requests/index.d.mts +1 -0
  102. package/dist/esm/api/resources/customerBusinesses/exports.d.mts +2 -0
  103. package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/exports.mjs +1 -1
  104. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.d.mts +7 -0
  105. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.mjs +2 -0
  106. package/dist/esm/api/resources/customerBusinesses/types/index.d.mts +1 -0
  107. package/dist/esm/api/resources/customerBusinesses/types/index.mjs +1 -0
  108. package/dist/esm/api/resources/customerMyAccount/client/Client.d.mts +16 -0
  109. package/dist/esm/api/resources/customerMyAccount/client/Client.mjs +54 -0
  110. package/dist/esm/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.d.mts +9 -0
  111. package/dist/esm/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.mjs +2 -0
  112. package/dist/esm/api/resources/customerMyAccount/client/requests/index.d.mts +1 -0
  113. package/dist/esm/api/resources/index.d.mts +3 -3
  114. package/dist/esm/api/resources/index.mjs +3 -3
  115. package/dist/esm/api/resources/serveAd/client/Client.d.mts +1 -1
  116. package/dist/esm/api/resources/serveAd/client/Client.mjs +4 -1
  117. package/dist/esm/api/resources/serveAd/types/AdsServeAdResponse.d.mts +2 -2
  118. package/dist/esm/api/types/Ad.d.mts +1 -4
  119. package/dist/esm/api/types/BusinessConversation.d.mts +1 -1
  120. package/dist/esm/api/types/BusinessEventCheckInStats.d.mts +1 -1
  121. package/dist/esm/api/types/BusinessEventSalesSummary.d.mts +1 -1
  122. package/dist/esm/api/types/BusinessMenuItem.d.mts +22 -2
  123. package/dist/esm/api/types/Conversation.d.mts +1 -1
  124. package/dist/esm/api/types/CustomerProductOrderItem.d.mts +10 -1
  125. package/dist/esm/api/types/InventoryChangeType.d.mts +9 -0
  126. package/dist/esm/api/types/InventoryChangeType.mjs +9 -0
  127. package/dist/esm/api/types/Ticket.d.mts +1 -0
  128. package/dist/esm/api/types/TicketOrder.d.mts +1 -1
  129. package/dist/esm/api/types/index.d.mts +1 -1
  130. package/dist/esm/api/types/index.mjs +1 -1
  131. package/dist/esm/version.d.mts +1 -1
  132. package/dist/esm/version.mjs +1 -1
  133. package/package.json +12 -12
  134. package/reference.md +108 -29
  135. package/dist/cjs/api/resources/getPickupTimeslots/client/Client.d.ts +0 -28
  136. package/dist/cjs/api/resources/getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.d.ts +0 -11
  137. package/dist/cjs/api/resources/getPickupTimeslots/client/requests/index.d.ts +0 -1
  138. package/dist/cjs/api/resources/getPickupTimeslots/exports.d.ts +0 -2
  139. package/dist/cjs/api/resources/getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.d.ts +0 -7
  140. package/dist/cjs/api/resources/getPickupTimeslots/types/index.d.ts +0 -1
  141. package/dist/cjs/api/types/JsonResource.d.ts +0 -1
  142. package/dist/esm/api/resources/getPickupTimeslots/client/Client.d.mts +0 -28
  143. package/dist/esm/api/resources/getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.d.mts +0 -11
  144. package/dist/esm/api/resources/getPickupTimeslots/client/requests/index.d.mts +0 -1
  145. package/dist/esm/api/resources/getPickupTimeslots/exports.d.mts +0 -2
  146. package/dist/esm/api/resources/getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.d.mts +0 -7
  147. package/dist/esm/api/resources/getPickupTimeslots/types/index.d.mts +0 -1
  148. package/dist/esm/api/resources/getPickupTimeslots/types/index.mjs +0 -1
  149. package/dist/esm/api/types/JsonResource.d.mts +0 -1
  150. /package/dist/cjs/api/resources/{getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.js → business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.js} +0 -0
  151. /package/dist/cjs/api/resources/{getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.js → customer/resources/cart/types/GetShippingOptionsCartResponseItem.js} +0 -0
  152. /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.d.ts +0 -0
  153. /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.js +0 -0
  154. /package/dist/cjs/api/{types/JsonResource.js → resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.js} +0 -0
  155. /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/client/requests/index.js +0 -0
  156. /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/index.d.ts +0 -0
  157. /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/index.js +0 -0
  158. /package/dist/esm/api/resources/{getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.mjs → business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.mjs} +0 -0
  159. /package/dist/esm/api/resources/{getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.mjs → customer/resources/cart/types/GetShippingOptionsCartResponseItem.mjs} +0 -0
  160. /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.d.mts +0 -0
  161. /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.mjs +0 -0
  162. /package/dist/esm/api/{types/JsonResource.mjs → resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.mjs} +0 -0
  163. /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/requests/index.mjs +0 -0
  164. /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/index.d.mts +0 -0
  165. /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/index.mjs +0 -0
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./BusinessesGetPickupTimeslotsResponse.js"), exports);
17
+ __exportStar(require("./GetBusinessPickupTimeslotsResponse.js"), exports);
@@ -25,6 +25,22 @@ export declare class CustomerMyAccountClient {
25
25
  */
26
26
  getMyTicket(request: FiveOneEat.GetMyTicketRequest, requestOptions?: CustomerMyAccountClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.GetMyTicketResponse>;
27
27
  private __getMyTicket;
28
+ /**
29
+ * Returns a signed .pkpass file for import into Apple Wallet.
30
+ *
31
+ * @param {FiveOneEat.DownloadAppleWalletPassRequest} request
32
+ * @param {CustomerMyAccountClient.RequestOptions} requestOptions - Request-specific configuration.
33
+ *
34
+ * @throws {@link FiveOneEat.UnauthorizedError}
35
+ * @throws {@link FiveOneEat.NotFoundError}
36
+ *
37
+ * @example
38
+ * await client.customerMyAccount.downloadAppleWalletPass({
39
+ * ticketId: "ticketId"
40
+ * })
41
+ */
42
+ downloadAppleWalletPass(request: FiveOneEat.DownloadAppleWalletPassRequest, requestOptions?: CustomerMyAccountClient.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
43
+ private __downloadAppleWalletPass;
28
44
  /**
29
45
  * Retrieve a single ticket order belonging to the authenticated user.
30
46
  *
@@ -106,6 +106,60 @@ class CustomerMyAccountClient {
106
106
  return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/tickets/{ticketId}");
107
107
  });
108
108
  }
109
+ /**
110
+ * Returns a signed .pkpass file for import into Apple Wallet.
111
+ *
112
+ * @param {FiveOneEat.DownloadAppleWalletPassRequest} request
113
+ * @param {CustomerMyAccountClient.RequestOptions} requestOptions - Request-specific configuration.
114
+ *
115
+ * @throws {@link FiveOneEat.UnauthorizedError}
116
+ * @throws {@link FiveOneEat.NotFoundError}
117
+ *
118
+ * @example
119
+ * await client.customerMyAccount.downloadAppleWalletPass({
120
+ * ticketId: "ticketId"
121
+ * })
122
+ */
123
+ downloadAppleWalletPass(request, requestOptions) {
124
+ return core.HttpResponsePromise.fromPromise(this.__downloadAppleWalletPass(request, requestOptions));
125
+ }
126
+ __downloadAppleWalletPass(request, requestOptions) {
127
+ return __awaiter(this, void 0, void 0, function* () {
128
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
129
+ const { ticketId } = request;
130
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
131
+ 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);
132
+ const _response = yield core.fetcher({
133
+ 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/tickets/${core.url.encodePathParam(ticketId)}/wallet/apple`),
134
+ method: "GET",
135
+ headers: _headers,
136
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
137
+ 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,
138
+ 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,
139
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
140
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
141
+ logging: this._options.logging,
142
+ });
143
+ if (_response.ok) {
144
+ return { data: _response.body, rawResponse: _response.rawResponse };
145
+ }
146
+ if (_response.error.reason === "status-code") {
147
+ switch (_response.error.statusCode) {
148
+ case 401:
149
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
150
+ case 404:
151
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
152
+ default:
153
+ throw new errors.FiveOneEatError({
154
+ statusCode: _response.error.statusCode,
155
+ body: _response.error.body,
156
+ rawResponse: _response.rawResponse,
157
+ });
158
+ }
159
+ }
160
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/tickets/{ticketId}/wallet/apple");
161
+ });
162
+ }
109
163
  /**
110
164
  * Retrieve a single ticket order belonging to the authenticated user.
111
165
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * ticketId: "ticketId"
5
+ * }
6
+ */
7
+ export interface DownloadAppleWalletPassRequest {
8
+ ticketId: string;
9
+ }
@@ -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 });
@@ -1,2 +1,3 @@
1
+ export type { DownloadAppleWalletPassRequest } from "./DownloadAppleWalletPassRequest.js";
1
2
  export type { GetMyTicketOrderRequest } from "./GetMyTicketOrderRequest.js";
2
3
  export type { GetMyTicketRequest } from "./GetMyTicketRequest.js";
@@ -11,6 +11,9 @@ export * from "./businessShipping/types/index.js";
11
11
  export * from "./customer/client/requests/index.js";
12
12
  export * as customer from "./customer/index.js";
13
13
  export * from "./customer/types/index.js";
14
+ export * from "./customerBusinesses/client/requests/index.js";
15
+ export * as customerBusinesses from "./customerBusinesses/index.js";
16
+ export * from "./customerBusinesses/types/index.js";
14
17
  export * from "./customerEvents/client/requests/index.js";
15
18
  export * as customerEvents from "./customerEvents/index.js";
16
19
  export * from "./customerMessaging/client/requests/index.js";
@@ -19,9 +22,6 @@ export * from "./customerMessaging/types/index.js";
19
22
  export * from "./customerMyAccount/client/requests/index.js";
20
23
  export * as customerMyAccount from "./customerMyAccount/index.js";
21
24
  export * from "./customerMyAccount/types/index.js";
22
- export * from "./getPickupTimeslots/client/requests/index.js";
23
- export * as getPickupTimeslots from "./getPickupTimeslots/index.js";
24
- export * from "./getPickupTimeslots/types/index.js";
25
25
  export * from "./recordClick/client/requests/index.js";
26
26
  export * as recordClick from "./recordClick/index.js";
27
27
  export * from "./serveAd/client/requests/index.js";
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.serveAd = exports.recordClick = exports.getPickupTimeslots = exports.customerMyAccount = exports.customerMessaging = exports.customerEvents = exports.customer = exports.businessShipping = exports.businessProducts = exports.businessMessaging = exports.business = void 0;
39
+ exports.serveAd = exports.recordClick = exports.customerMyAccount = exports.customerMessaging = exports.customerEvents = exports.customerBusinesses = exports.customer = exports.businessShipping = exports.businessProducts = exports.businessMessaging = exports.business = void 0;
40
40
  exports.business = __importStar(require("./business/index.js"));
41
41
  __exportStar(require("./businessMessaging/client/requests/index.js"), exports);
42
42
  exports.businessMessaging = __importStar(require("./businessMessaging/index.js"));
@@ -50,6 +50,9 @@ __exportStar(require("./businessShipping/types/index.js"), exports);
50
50
  __exportStar(require("./customer/client/requests/index.js"), exports);
51
51
  exports.customer = __importStar(require("./customer/index.js"));
52
52
  __exportStar(require("./customer/types/index.js"), exports);
53
+ __exportStar(require("./customerBusinesses/client/requests/index.js"), exports);
54
+ exports.customerBusinesses = __importStar(require("./customerBusinesses/index.js"));
55
+ __exportStar(require("./customerBusinesses/types/index.js"), exports);
53
56
  __exportStar(require("./customerEvents/client/requests/index.js"), exports);
54
57
  exports.customerEvents = __importStar(require("./customerEvents/index.js"));
55
58
  __exportStar(require("./customerMessaging/client/requests/index.js"), exports);
@@ -58,9 +61,6 @@ __exportStar(require("./customerMessaging/types/index.js"), exports);
58
61
  __exportStar(require("./customerMyAccount/client/requests/index.js"), exports);
59
62
  exports.customerMyAccount = __importStar(require("./customerMyAccount/index.js"));
60
63
  __exportStar(require("./customerMyAccount/types/index.js"), exports);
61
- __exportStar(require("./getPickupTimeslots/client/requests/index.js"), exports);
62
- exports.getPickupTimeslots = __importStar(require("./getPickupTimeslots/index.js"));
63
- __exportStar(require("./getPickupTimeslots/types/index.js"), exports);
64
64
  __exportStar(require("./recordClick/client/requests/index.js"), exports);
65
65
  exports.recordClick = __importStar(require("./recordClick/index.js"));
66
66
  __exportStar(require("./serveAd/client/requests/index.js"), exports);
@@ -22,6 +22,6 @@ export declare class ServeAdClient {
22
22
  * placement: "placement"
23
23
  * })
24
24
  */
25
- adsServeAd(request: FiveOneEat.AdsServeAdRequest, requestOptions?: ServeAdClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.AdsServeAdResponse>;
25
+ adsServeAd(request: FiveOneEat.AdsServeAdRequest, requestOptions?: ServeAdClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.AdsServeAdResponse | undefined>;
26
26
  private __adsServeAd;
27
27
  }
@@ -88,7 +88,10 @@ class ServeAdClient {
88
88
  logging: this._options.logging,
89
89
  });
90
90
  if (_response.ok) {
91
- return { data: _response.body, rawResponse: _response.rawResponse };
91
+ return {
92
+ data: _response.body,
93
+ rawResponse: _response.rawResponse,
94
+ };
92
95
  }
93
96
  if (_response.error.reason === "status-code") {
94
97
  switch (_response.error.statusCode) {
@@ -1,4 +1,4 @@
1
1
  import type * as FiveOneEat from "../../../index.js";
2
- export type AdsServeAdResponse = {
2
+ export interface AdsServeAdResponse {
3
3
  data: FiveOneEat.Ad;
4
- } | Record<string, unknown>;
4
+ }
@@ -1,11 +1,8 @@
1
1
  export interface Ad {
2
2
  id: string;
3
- image_url: Ad.ImageUrl;
3
+ image_url: string;
4
4
  alt_text: string;
5
5
  link_url: string;
6
6
  width: string;
7
7
  height: string;
8
8
  }
9
- export declare namespace Ad {
10
- type ImageUrl = string | "";
11
- }
@@ -15,6 +15,6 @@ export declare namespace BusinessConversation {
15
15
  interface LastMessage {
16
16
  id: string;
17
17
  content: string;
18
- created_at: string;
18
+ created_at: string | null;
19
19
  }
20
20
  }
@@ -1 +1 @@
1
- export type BusinessEventCheckInStats = unknown[];
1
+ export type BusinessEventCheckInStats = Record<string, unknown>;
@@ -1 +1 @@
1
- export type BusinessEventSalesSummary = unknown[];
1
+ export type BusinessEventSalesSummary = Record<string, unknown>;
@@ -8,8 +8,28 @@ export interface BusinessMenuItem {
8
8
  is_available: boolean;
9
9
  sort_order: number;
10
10
  image?: string | undefined;
11
- tags?: string | undefined;
12
- allergens?: string | undefined;
11
+ tags?: BusinessMenuItem.Tags.Item[] | undefined;
12
+ allergens?: BusinessMenuItem.Allergens.Item[] | undefined;
13
13
  variations?: FiveOneEat.BusinessMenuItemVariation[] | undefined;
14
14
  modifiers?: FiveOneEat.BusinessMenuItemModifier[] | undefined;
15
15
  }
16
+ export declare namespace BusinessMenuItem {
17
+ type Tags = Tags.Item[];
18
+ namespace Tags {
19
+ interface Item {
20
+ id: string;
21
+ name: string;
22
+ slug: string;
23
+ color: string;
24
+ }
25
+ }
26
+ type Allergens = Allergens.Item[];
27
+ namespace Allergens {
28
+ interface Item {
29
+ id: string;
30
+ name: string;
31
+ slug: string;
32
+ icon: string | null;
33
+ }
34
+ }
35
+ }
@@ -16,6 +16,6 @@ export declare namespace Conversation {
16
16
  interface LastMessage {
17
17
  id: string;
18
18
  content: string;
19
- created_at: string;
19
+ created_at: string | null;
20
20
  }
21
21
  }
@@ -8,7 +8,7 @@ export interface CustomerProductOrderItem {
8
8
  product_snapshot: unknown[] | null;
9
9
  product?: CustomerProductOrderItem.Product | undefined;
10
10
  variant?: (CustomerProductOrderItem.Variant | null) | undefined;
11
- downloads?: string | undefined;
11
+ downloads?: CustomerProductOrderItem.Downloads.Item[] | undefined;
12
12
  }
13
13
  export declare namespace CustomerProductOrderItem {
14
14
  interface Product {
@@ -20,4 +20,13 @@ export declare namespace CustomerProductOrderItem {
20
20
  id: string;
21
21
  name: string;
22
22
  }
23
+ type Downloads = Downloads.Item[];
24
+ namespace Downloads {
25
+ interface Item {
26
+ id: string;
27
+ download_token: string;
28
+ download_count: number;
29
+ expires_at: string | null;
30
+ }
31
+ }
23
32
  }
@@ -0,0 +1,9 @@
1
+ export declare const InventoryChangeType: {
2
+ readonly Restock: "restock";
3
+ readonly Damaged: "damaged";
4
+ readonly Shrinkage: "shrinkage";
5
+ readonly Returned: "returned";
6
+ readonly Correction: "correction";
7
+ readonly Other: "other";
8
+ };
9
+ export type InventoryChangeType = (typeof InventoryChangeType)[keyof typeof InventoryChangeType];
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.InventoryChangeType = void 0;
5
+ exports.InventoryChangeType = {
6
+ Restock: "restock",
7
+ Damaged: "damaged",
8
+ Shrinkage: "shrinkage",
9
+ Returned: "returned",
10
+ Correction: "correction",
11
+ Other: "other",
12
+ };
@@ -5,6 +5,7 @@ export interface Ticket {
5
5
  qr_code: string | null;
6
6
  ticket_type?: Ticket.TicketType | undefined;
7
7
  used_at: string;
8
+ wallet_url: Record<string, string>;
8
9
  }
9
10
  export declare namespace Ticket {
10
11
  interface TicketType {
@@ -9,7 +9,7 @@ export interface TicketOrder {
9
9
  export declare namespace TicketOrder {
10
10
  interface Event {
11
11
  id: string;
12
- name: string;
12
+ title: string;
13
13
  starts_at: string;
14
14
  ends_at: string;
15
15
  location: string;
@@ -119,7 +119,7 @@ export * from "./FavoriteResponse.js";
119
119
  export * from "./ForbiddenErrorBody.js";
120
120
  export * from "./Image.js";
121
121
  export * from "./InternalServerErrorBody.js";
122
- export * from "./JsonResource.js";
122
+ export * from "./InventoryChangeType.js";
123
123
  export * from "./MenuItemSearchResult.js";
124
124
  export * from "./Message.js";
125
125
  export * from "./NotFoundErrorBody.js";
@@ -135,7 +135,7 @@ __exportStar(require("./FavoriteResponse.js"), exports);
135
135
  __exportStar(require("./ForbiddenErrorBody.js"), exports);
136
136
  __exportStar(require("./Image.js"), exports);
137
137
  __exportStar(require("./InternalServerErrorBody.js"), exports);
138
- __exportStar(require("./JsonResource.js"), exports);
138
+ __exportStar(require("./InventoryChangeType.js"), exports);
139
139
  __exportStar(require("./MenuItemSearchResult.js"), exports);
140
140
  __exportStar(require("./Message.js"), exports);
141
141
  __exportStar(require("./NotFoundErrorBody.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.55";
1
+ export declare const SDK_VERSION = "0.0.57";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.55";
4
+ exports.SDK_VERSION = "0.0.57";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@51eat/sdk",
9
- "X-Fern-SDK-Version": "0.0.55",
10
- "User-Agent": "@51eat/sdk/0.0.55",
9
+ "X-Fern-SDK-Version": "0.0.57",
10
+ "User-Agent": "@51eat/sdk/0.0.57",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  }, options === null || options === void 0 ? void 0 : options.headers);
@@ -3,10 +3,10 @@ import { BusinessMessagingClient } from "./api/resources/businessMessaging/clien
3
3
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.mjs";
4
4
  import { BusinessShippingClient } from "./api/resources/businessShipping/client/Client.mjs";
5
5
  import { CustomerClient } from "./api/resources/customer/client/Client.mjs";
6
+ import { CustomerBusinessesClient } from "./api/resources/customerBusinesses/client/Client.mjs";
6
7
  import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.mjs";
7
8
  import { CustomerMessagingClient } from "./api/resources/customerMessaging/client/Client.mjs";
8
9
  import { CustomerMyAccountClient } from "./api/resources/customerMyAccount/client/Client.mjs";
9
- import { GetPickupTimeslotsClient } from "./api/resources/getPickupTimeslots/client/Client.mjs";
10
10
  import { RecordClickClient } from "./api/resources/recordClick/client/Client.mjs";
11
11
  import { ServeAdClient } from "./api/resources/serveAd/client/Client.mjs";
12
12
  import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.mjs";
@@ -22,11 +22,11 @@ export declare class FiveOneEatClient {
22
22
  protected _businessMessaging: BusinessMessagingClient | undefined;
23
23
  protected _businessProducts: BusinessProductsClient | undefined;
24
24
  protected _businessShipping: BusinessShippingClient | undefined;
25
+ protected _customerBusinesses: CustomerBusinessesClient | undefined;
25
26
  protected _customerEvents: CustomerEventsClient | undefined;
26
27
  protected _customerMessaging: CustomerMessagingClient | undefined;
27
28
  protected _customerMyAccount: CustomerMyAccountClient | undefined;
28
29
  protected _customer: CustomerClient | undefined;
29
- protected _getPickupTimeslots: GetPickupTimeslotsClient | undefined;
30
30
  protected _recordClick: RecordClickClient | undefined;
31
31
  protected _serveAd: ServeAdClient | undefined;
32
32
  protected _business: BusinessClient | undefined;
@@ -34,11 +34,11 @@ export declare class FiveOneEatClient {
34
34
  get businessMessaging(): BusinessMessagingClient;
35
35
  get businessProducts(): BusinessProductsClient;
36
36
  get businessShipping(): BusinessShippingClient;
37
+ get customerBusinesses(): CustomerBusinessesClient;
37
38
  get customerEvents(): CustomerEventsClient;
38
39
  get customerMessaging(): CustomerMessagingClient;
39
40
  get customerMyAccount(): CustomerMyAccountClient;
40
41
  get customer(): CustomerClient;
41
- get getPickupTimeslots(): GetPickupTimeslotsClient;
42
42
  get recordClick(): RecordClickClient;
43
43
  get serveAd(): ServeAdClient;
44
44
  get business(): BusinessClient;
@@ -13,10 +13,10 @@ import { BusinessMessagingClient } from "./api/resources/businessMessaging/clien
13
13
  import { BusinessProductsClient } from "./api/resources/businessProducts/client/Client.mjs";
14
14
  import { BusinessShippingClient } from "./api/resources/businessShipping/client/Client.mjs";
15
15
  import { CustomerClient } from "./api/resources/customer/client/Client.mjs";
16
+ import { CustomerBusinessesClient } from "./api/resources/customerBusinesses/client/Client.mjs";
16
17
  import { CustomerEventsClient } from "./api/resources/customerEvents/client/Client.mjs";
17
18
  import { CustomerMessagingClient } from "./api/resources/customerMessaging/client/Client.mjs";
18
19
  import { CustomerMyAccountClient } from "./api/resources/customerMyAccount/client/Client.mjs";
19
- import { GetPickupTimeslotsClient } from "./api/resources/getPickupTimeslots/client/Client.mjs";
20
20
  import { RecordClickClient } from "./api/resources/recordClick/client/Client.mjs";
21
21
  import { ServeAdClient } from "./api/resources/serveAd/client/Client.mjs";
22
22
  import { normalizeClientOptionsWithAuth } from "./BaseClient.mjs";
@@ -37,6 +37,10 @@ export class FiveOneEatClient {
37
37
  var _a;
38
38
  return ((_a = this._businessShipping) !== null && _a !== void 0 ? _a : (this._businessShipping = new BusinessShippingClient(this._options)));
39
39
  }
40
+ get customerBusinesses() {
41
+ var _a;
42
+ return ((_a = this._customerBusinesses) !== null && _a !== void 0 ? _a : (this._customerBusinesses = new CustomerBusinessesClient(this._options)));
43
+ }
40
44
  get customerEvents() {
41
45
  var _a;
42
46
  return ((_a = this._customerEvents) !== null && _a !== void 0 ? _a : (this._customerEvents = new CustomerEventsClient(this._options)));
@@ -53,10 +57,6 @@ export class FiveOneEatClient {
53
57
  var _a;
54
58
  return ((_a = this._customer) !== null && _a !== void 0 ? _a : (this._customer = new CustomerClient(this._options)));
55
59
  }
56
- get getPickupTimeslots() {
57
- var _a;
58
- return ((_a = this._getPickupTimeslots) !== null && _a !== void 0 ? _a : (this._getPickupTimeslots = new GetPickupTimeslotsClient(this._options)));
59
- }
60
60
  get recordClick() {
61
61
  var _a;
62
62
  return ((_a = this._recordClick) !== null && _a !== void 0 ? _a : (this._recordClick = new RecordClickClient(this._options)));
@@ -19,8 +19,8 @@ export interface StoreDiscountRequest {
19
19
  starts_at?: string | null;
20
20
  ends_at?: string | null;
21
21
  is_active?: boolean;
22
- product_ids?: number[] | null;
23
- category_ids?: number[] | null;
22
+ product_ids?: string[] | null;
23
+ category_ids?: string[] | null;
24
24
  }
25
25
  export declare namespace StoreDiscountRequest {
26
26
  const Type: {
@@ -18,8 +18,8 @@ export interface UpdateDiscountRequest {
18
18
  starts_at?: string | null;
19
19
  ends_at?: string | null;
20
20
  is_active?: boolean;
21
- product_ids?: number[] | null;
22
- category_ids?: number[] | null;
21
+ product_ids?: string[] | null;
22
+ category_ids?: string[] | null;
23
23
  }
24
24
  export declare namespace UpdateDiscountRequest {
25
25
  const Type: {
@@ -7,6 +7,6 @@
7
7
  export interface StoreProductCategoryRequest {
8
8
  name: string;
9
9
  description?: string | null;
10
- parent_id?: number | null;
10
+ parent_id?: string | null;
11
11
  sort_order?: number;
12
12
  }
@@ -9,6 +9,6 @@ export interface UpdateProductCategoryRequest {
9
9
  productCategory: string;
10
10
  name?: string;
11
11
  description?: string | null;
12
- parent_id?: number | null;
12
+ parent_id?: string | null;
13
13
  sort_order?: number;
14
14
  }
@@ -120,7 +120,7 @@ export declare class ProductOrdersClient {
120
120
  * productOrder: "productOrder"
121
121
  * })
122
122
  */
123
- getLabelRates(request: FiveOneEat.business.GetLabelRatesProductOrdersRequest, requestOptions?: ProductOrdersClient.RequestOptions): core.HttpResponsePromise<string>;
123
+ getLabelRates(request: FiveOneEat.business.GetLabelRatesProductOrdersRequest, requestOptions?: ProductOrdersClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.GetLabelRatesProductOrdersResponseItem[]>;
124
124
  private __getLabelRates;
125
125
  /**
126
126
  * @param {FiveOneEat.business.PurchaseLabelRequest} request
@@ -424,7 +424,10 @@ export class ProductOrdersClient {
424
424
  logging: this._options.logging,
425
425
  });
426
426
  if (_response.ok) {
427
- return { data: _response.body, rawResponse: _response.rawResponse };
427
+ return {
428
+ data: _response.body,
429
+ rawResponse: _response.rawResponse,
430
+ };
428
431
  }
429
432
  if (_response.error.reason === "status-code") {
430
433
  switch (_response.error.statusCode) {
@@ -0,0 +1,10 @@
1
+ export interface GetLabelRatesProductOrdersResponseItem {
2
+ provider_rate_id: string;
3
+ carrier: string;
4
+ service: string;
5
+ amount_cents: number;
6
+ amount: string;
7
+ currency: string;
8
+ carrier_delivery_days: number | null;
9
+ estimated_delivery_date: string | null;
10
+ }
@@ -1,5 +1,6 @@
1
1
  export * from "./AddTrackingProductOrdersResponse.mjs";
2
2
  export * from "./FulfillProductOrdersResponse.mjs";
3
+ export * from "./GetLabelRatesProductOrdersResponseItem.mjs";
3
4
  export * from "./GetProductOrdersResponse.mjs";
4
5
  export * from "./ListProductOrdersResponse.mjs";
5
6
  export * from "./MarkPickedUpProductOrdersResponse.mjs";
@@ -1,5 +1,6 @@
1
1
  export * from "./AddTrackingProductOrdersResponse.mjs";
2
2
  export * from "./FulfillProductOrdersResponse.mjs";
3
+ export * from "./GetLabelRatesProductOrdersResponseItem.mjs";
3
4
  export * from "./GetProductOrdersResponse.mjs";
4
5
  export * from "./ListProductOrdersResponse.mjs";
5
6
  export * from "./MarkPickedUpProductOrdersResponse.mjs";
@@ -31,7 +31,7 @@ export interface StoreProductRequest {
31
31
  tax_code?: string | null;
32
32
  is_active?: boolean;
33
33
  is_featured?: boolean;
34
- category_ids?: number[] | null;
34
+ category_ids?: string[] | null;
35
35
  }
36
36
  export declare namespace StoreProductRequest {
37
37
  const ProductType: {
@@ -32,7 +32,7 @@ export interface UpdateProductRequest {
32
32
  is_active?: boolean;
33
33
  published_at?: string | null;
34
34
  is_featured?: boolean;
35
- category_ids?: number[] | null;
35
+ category_ids?: string[] | null;
36
36
  }
37
37
  export declare namespace UpdateProductRequest {
38
38
  const ProductType: {
@@ -1,7 +1,7 @@
1
1
  export interface RegisterPushNotificationsResponse {
2
2
  id: string;
3
3
  token: string;
4
- device_id: string;
5
- device_name: string;
6
- platform: string;
4
+ device_id: string | null;
5
+ device_name: string | null;
6
+ platform: string | null;
7
7
  }
@@ -1,4 +1,4 @@
1
1
  export interface CreateAccountSessionStripeConnectResponse {
2
2
  client_secret: string;
3
- expires_at: string;
3
+ expires_at: string | null;
4
4
  }
@@ -1,3 +1,4 @@
1
+ import type * as FiveOneEat from "../../../../index.mjs";
1
2
  /**
2
3
  * @example
3
4
  * {
@@ -12,7 +13,7 @@ export interface AdjustInventoryRequest {
12
13
  variant: string;
13
14
  type: AdjustInventoryRequest.Type;
14
15
  quantity: number;
15
- reason: AdjustInventoryRequest.Reason;
16
+ reason: FiveOneEat.InventoryChangeType;
16
17
  notes?: string | null;
17
18
  }
18
19
  export declare namespace AdjustInventoryRequest {
@@ -22,13 +23,4 @@ export declare namespace AdjustInventoryRequest {
22
23
  readonly Set: "set";
23
24
  };
24
25
  type Type = (typeof Type)[keyof typeof Type];
25
- const Reason: {
26
- readonly Restock: "restock";
27
- readonly Damaged: "damaged";
28
- readonly Shrinkage: "shrinkage";
29
- readonly Returned: "returned";
30
- readonly Correction: "correction";
31
- readonly Other: "other";
32
- };
33
- type Reason = (typeof Reason)[keyof typeof Reason];
34
26
  }
@@ -6,12 +6,4 @@ export var AdjustInventoryRequest;
6
6
  Subtract: "subtract",
7
7
  Set: "set",
8
8
  };
9
- AdjustInventoryRequest.Reason = {
10
- Restock: "restock",
11
- Damaged: "damaged",
12
- Shrinkage: "shrinkage",
13
- Returned: "returned",
14
- Correction: "correction",
15
- Other: "other",
16
- };
17
9
  })(AdjustInventoryRequest || (AdjustInventoryRequest = {}));