@51eat/sdk 0.0.54 → 0.0.56

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 (156) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/Client.d.ts +3 -0
  3. package/dist/cjs/Client.js +15 -10
  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 +13 -1
  20. package/dist/cjs/api/resources/customer/resources/businesses/client/Client.js +46 -1
  21. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/GetPickupTimeslotsBusinessesRequest.d.ts +9 -0
  22. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/GetPickupTimeslotsBusinessesRequest.js +3 -0
  23. package/dist/cjs/api/resources/customer/resources/businesses/client/requests/index.d.ts +1 -0
  24. package/dist/cjs/api/resources/customer/resources/cart/client/Client.d.ts +2 -2
  25. package/dist/cjs/api/resources/customer/resources/cart/client/Client.js +5 -2
  26. package/dist/cjs/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.ts +3 -3
  27. package/dist/cjs/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponseItem.d.ts +19 -0
  28. package/dist/cjs/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponseItem.js +3 -0
  29. package/dist/cjs/api/resources/customer/resources/cart/types/SelectShippingOptionCartResponse.d.ts +2 -7
  30. package/dist/cjs/api/resources/customer/resources/cart/types/index.d.ts +1 -0
  31. package/dist/cjs/api/resources/customer/resources/cart/types/index.js +1 -0
  32. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CalculatePriceTicketingResponse.d.ts +13 -1
  33. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.ts +3 -3
  34. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.ts +13 -2
  35. package/dist/cjs/api/resources/customer/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.ts +3 -3
  36. package/dist/cjs/api/resources/customerBusinesses/client/Client.d.ts +30 -0
  37. package/dist/cjs/api/resources/customerBusinesses/client/Client.js +125 -0
  38. package/dist/cjs/api/resources/customerBusinesses/client/index.d.ts +1 -0
  39. package/dist/cjs/api/resources/customerBusinesses/client/index.js +17 -0
  40. package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.d.ts +12 -0
  41. package/dist/cjs/api/resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.js +3 -0
  42. package/dist/cjs/api/resources/customerBusinesses/client/requests/index.d.ts +1 -0
  43. package/dist/cjs/api/resources/customerBusinesses/client/requests/index.js +2 -0
  44. package/dist/cjs/api/resources/customerBusinesses/exports.d.ts +2 -0
  45. package/dist/cjs/api/resources/customerBusinesses/exports.js +21 -0
  46. package/dist/cjs/api/resources/customerBusinesses/index.d.ts +2 -0
  47. package/dist/cjs/api/resources/customerBusinesses/index.js +18 -0
  48. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.d.ts +7 -0
  49. package/dist/cjs/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.js +3 -0
  50. package/dist/cjs/api/resources/customerBusinesses/types/index.d.ts +1 -0
  51. package/dist/cjs/api/resources/customerBusinesses/types/index.js +17 -0
  52. package/dist/cjs/api/resources/customerMyAccount/client/Client.d.ts +16 -0
  53. package/dist/cjs/api/resources/customerMyAccount/client/Client.js +54 -0
  54. package/dist/cjs/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.d.ts +9 -0
  55. package/dist/cjs/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.js +3 -0
  56. package/dist/cjs/api/resources/customerMyAccount/client/requests/index.d.ts +1 -0
  57. package/dist/cjs/api/resources/index.d.ts +3 -0
  58. package/dist/cjs/api/resources/index.js +4 -1
  59. package/dist/cjs/api/resources/serveAd/client/Client.d.ts +1 -1
  60. package/dist/cjs/api/resources/serveAd/client/Client.js +4 -1
  61. package/dist/cjs/api/resources/serveAd/types/AdsServeAdResponse.d.ts +2 -2
  62. package/dist/cjs/api/types/Ad.d.ts +1 -4
  63. package/dist/cjs/api/types/BusinessConversation.d.ts +1 -1
  64. package/dist/cjs/api/types/BusinessEventCheckInStats.d.ts +1 -1
  65. package/dist/cjs/api/types/BusinessEventSalesSummary.d.ts +1 -1
  66. package/dist/cjs/api/types/BusinessMenuItem.d.ts +22 -2
  67. package/dist/cjs/api/types/Conversation.d.ts +1 -1
  68. package/dist/cjs/api/types/CustomerProductOrderItem.d.ts +10 -1
  69. package/dist/cjs/api/types/InventoryChangeType.d.ts +9 -0
  70. package/dist/cjs/api/types/InventoryChangeType.js +12 -0
  71. package/dist/cjs/api/types/Ticket.d.ts +1 -0
  72. package/dist/cjs/api/types/index.d.ts +1 -1
  73. package/dist/cjs/api/types/index.js +1 -1
  74. package/dist/cjs/version.d.ts +1 -1
  75. package/dist/cjs/version.js +1 -1
  76. package/dist/esm/BaseClient.mjs +2 -2
  77. package/dist/esm/Client.d.mts +3 -0
  78. package/dist/esm/Client.mjs +5 -0
  79. package/dist/esm/api/resources/business/resources/discounts/client/requests/StoreDiscountRequest.d.mts +2 -2
  80. package/dist/esm/api/resources/business/resources/discounts/client/requests/UpdateDiscountRequest.d.mts +2 -2
  81. package/dist/esm/api/resources/business/resources/productCategories/client/requests/StoreProductCategoryRequest.d.mts +1 -1
  82. package/dist/esm/api/resources/business/resources/productCategories/client/requests/UpdateProductCategoryRequest.d.mts +1 -1
  83. package/dist/esm/api/resources/business/resources/productOrders/client/Client.d.mts +1 -1
  84. package/dist/esm/api/resources/business/resources/productOrders/client/Client.mjs +4 -1
  85. package/dist/esm/api/resources/business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.d.mts +10 -0
  86. package/dist/esm/api/resources/business/resources/productOrders/types/index.d.mts +1 -0
  87. package/dist/esm/api/resources/business/resources/productOrders/types/index.mjs +1 -0
  88. package/dist/esm/api/resources/business/resources/products/client/requests/StoreProductRequest.d.mts +1 -1
  89. package/dist/esm/api/resources/business/resources/products/client/requests/UpdateProductRequest.d.mts +1 -1
  90. package/dist/esm/api/resources/business/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.mts +3 -3
  91. package/dist/esm/api/resources/business/resources/stripeConnect/types/CreateAccountSessionStripeConnectResponse.d.mts +1 -1
  92. package/dist/esm/api/resources/businessProducts/client/requests/AdjustInventoryRequest.d.mts +2 -10
  93. package/dist/esm/api/resources/businessProducts/client/requests/AdjustInventoryRequest.mjs +0 -8
  94. package/dist/esm/api/resources/customer/resources/businesses/client/Client.d.mts +13 -1
  95. package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +46 -1
  96. package/dist/esm/api/resources/customer/resources/businesses/client/requests/GetPickupTimeslotsBusinessesRequest.d.mts +9 -0
  97. package/dist/esm/api/resources/customer/resources/businesses/client/requests/GetPickupTimeslotsBusinessesRequest.mjs +2 -0
  98. package/dist/esm/api/resources/customer/resources/businesses/client/requests/index.d.mts +1 -0
  99. package/dist/esm/api/resources/customer/resources/cart/client/Client.d.mts +2 -2
  100. package/dist/esm/api/resources/customer/resources/cart/client/Client.mjs +5 -2
  101. package/dist/esm/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.mts +3 -3
  102. package/dist/esm/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponseItem.d.mts +19 -0
  103. package/dist/esm/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponseItem.mjs +2 -0
  104. package/dist/esm/api/resources/customer/resources/cart/types/SelectShippingOptionCartResponse.d.mts +2 -7
  105. package/dist/esm/api/resources/customer/resources/cart/types/index.d.mts +1 -0
  106. package/dist/esm/api/resources/customer/resources/cart/types/index.mjs +1 -0
  107. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CalculatePriceTicketingResponse.d.mts +13 -1
  108. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.mts +3 -3
  109. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.mts +13 -2
  110. package/dist/esm/api/resources/customer/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.mts +3 -3
  111. package/dist/esm/api/resources/customerBusinesses/client/Client.d.mts +30 -0
  112. package/dist/esm/api/resources/customerBusinesses/client/Client.mjs +88 -0
  113. package/dist/esm/api/resources/customerBusinesses/client/index.d.mts +1 -0
  114. package/dist/esm/api/resources/customerBusinesses/client/index.mjs +1 -0
  115. package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.d.mts +12 -0
  116. package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.mjs +2 -0
  117. package/dist/esm/api/resources/customerBusinesses/client/requests/index.d.mts +1 -0
  118. package/dist/esm/api/resources/customerBusinesses/client/requests/index.mjs +1 -0
  119. package/dist/esm/api/resources/customerBusinesses/exports.d.mts +2 -0
  120. package/dist/esm/api/resources/customerBusinesses/exports.mjs +3 -0
  121. package/dist/esm/api/resources/customerBusinesses/index.d.mts +2 -0
  122. package/dist/esm/api/resources/customerBusinesses/index.mjs +2 -0
  123. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.d.mts +7 -0
  124. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.mjs +2 -0
  125. package/dist/esm/api/resources/customerBusinesses/types/index.d.mts +1 -0
  126. package/dist/esm/api/resources/customerBusinesses/types/index.mjs +1 -0
  127. package/dist/esm/api/resources/customerMyAccount/client/Client.d.mts +16 -0
  128. package/dist/esm/api/resources/customerMyAccount/client/Client.mjs +54 -0
  129. package/dist/esm/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.d.mts +9 -0
  130. package/dist/esm/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.mjs +2 -0
  131. package/dist/esm/api/resources/customerMyAccount/client/requests/index.d.mts +1 -0
  132. package/dist/esm/api/resources/index.d.mts +3 -0
  133. package/dist/esm/api/resources/index.mjs +3 -0
  134. package/dist/esm/api/resources/serveAd/client/Client.d.mts +1 -1
  135. package/dist/esm/api/resources/serveAd/client/Client.mjs +4 -1
  136. package/dist/esm/api/resources/serveAd/types/AdsServeAdResponse.d.mts +2 -2
  137. package/dist/esm/api/types/Ad.d.mts +1 -4
  138. package/dist/esm/api/types/BusinessConversation.d.mts +1 -1
  139. package/dist/esm/api/types/BusinessEventCheckInStats.d.mts +1 -1
  140. package/dist/esm/api/types/BusinessEventSalesSummary.d.mts +1 -1
  141. package/dist/esm/api/types/BusinessMenuItem.d.mts +22 -2
  142. package/dist/esm/api/types/Conversation.d.mts +1 -1
  143. package/dist/esm/api/types/CustomerProductOrderItem.d.mts +10 -1
  144. package/dist/esm/api/types/InventoryChangeType.d.mts +9 -0
  145. package/dist/esm/api/types/InventoryChangeType.mjs +9 -0
  146. package/dist/esm/api/types/Ticket.d.mts +1 -0
  147. package/dist/esm/api/types/index.d.mts +1 -1
  148. package/dist/esm/api/types/index.mjs +1 -1
  149. package/dist/esm/version.d.mts +1 -1
  150. package/dist/esm/version.mjs +1 -1
  151. package/package.json +12 -1
  152. package/reference.md +188 -5
  153. package/dist/cjs/api/types/JsonResource.d.ts +0 -1
  154. package/dist/esm/api/types/JsonResource.d.mts +0 -1
  155. /package/dist/cjs/api/{types/JsonResource.js → resources/business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.js} +0 -0
  156. /package/dist/esm/api/{types/JsonResource.mjs → resources/business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.mjs} +0 -0
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * handle: "katzs-deli",
5
+ * date: "2023-01-15"
6
+ * }
7
+ */
8
+ export interface GetBusinessPickupTimeslotsRequest {
9
+ /** The business handle */
10
+ handle: string;
11
+ date: string;
12
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1 @@
1
+ export type { GetBusinessPickupTimeslotsRequest } from "./GetBusinessPickupTimeslotsRequest.mjs";
@@ -0,0 +1,2 @@
1
+ export { CustomerBusinessesClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -0,0 +1,3 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export { CustomerBusinessesClient } from "./client/Client.mjs";
3
+ export * from "./client/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.mjs";
2
+ export * from "./types/index.mjs";
@@ -0,0 +1,7 @@
1
+ export type GetBusinessPickupTimeslotsResponse = {
2
+ date?: unknown | undefined;
3
+ timeslots: string[];
4
+ } | {
5
+ date?: unknown | undefined;
6
+ timeslots: string[];
7
+ };
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -0,0 +1 @@
1
+ export * from "./GetBusinessPickupTimeslotsResponse.mjs";
@@ -0,0 +1 @@
1
+ export * from "./GetBusinessPickupTimeslotsResponse.mjs";
@@ -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
  *
@@ -70,6 +70,60 @@ export class CustomerMyAccountClient {
70
70
  return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/tickets/{ticketId}");
71
71
  });
72
72
  }
73
+ /**
74
+ * Returns a signed .pkpass file for import into Apple Wallet.
75
+ *
76
+ * @param {FiveOneEat.DownloadAppleWalletPassRequest} request
77
+ * @param {CustomerMyAccountClient.RequestOptions} requestOptions - Request-specific configuration.
78
+ *
79
+ * @throws {@link FiveOneEat.UnauthorizedError}
80
+ * @throws {@link FiveOneEat.NotFoundError}
81
+ *
82
+ * @example
83
+ * await client.customerMyAccount.downloadAppleWalletPass({
84
+ * ticketId: "ticketId"
85
+ * })
86
+ */
87
+ downloadAppleWalletPass(request, requestOptions) {
88
+ return core.HttpResponsePromise.fromPromise(this.__downloadAppleWalletPass(request, requestOptions));
89
+ }
90
+ __downloadAppleWalletPass(request, requestOptions) {
91
+ return __awaiter(this, void 0, void 0, function* () {
92
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
93
+ const { ticketId } = request;
94
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
95
+ 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);
96
+ const _response = yield core.fetcher({
97
+ 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`),
98
+ method: "GET",
99
+ headers: _headers,
100
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
101
+ 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,
102
+ 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,
103
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
104
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
105
+ logging: this._options.logging,
106
+ });
107
+ if (_response.ok) {
108
+ return { data: _response.body, rawResponse: _response.rawResponse };
109
+ }
110
+ if (_response.error.reason === "status-code") {
111
+ switch (_response.error.statusCode) {
112
+ case 401:
113
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
114
+ case 404:
115
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
116
+ default:
117
+ throw new errors.FiveOneEatError({
118
+ statusCode: _response.error.statusCode,
119
+ body: _response.error.body,
120
+ rawResponse: _response.rawResponse,
121
+ });
122
+ }
123
+ }
124
+ return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/customer/tickets/{ticketId}/wallet/apple");
125
+ });
126
+ }
73
127
  /**
74
128
  * Retrieve a single ticket order belonging to the authenticated user.
75
129
  *
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * ticketId: "ticketId"
5
+ * }
6
+ */
7
+ export interface DownloadAppleWalletPassRequest {
8
+ ticketId: string;
9
+ }
@@ -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 { DownloadAppleWalletPassRequest } from "./DownloadAppleWalletPassRequest.mjs";
1
2
  export type { GetMyTicketOrderRequest } from "./GetMyTicketOrderRequest.mjs";
2
3
  export type { GetMyTicketRequest } from "./GetMyTicketRequest.mjs";
@@ -11,6 +11,9 @@ export * from "./businessShipping/types/index.mjs";
11
11
  export * from "./customer/client/requests/index.mjs";
12
12
  export * as customer from "./customer/index.mjs";
13
13
  export * from "./customer/types/index.mjs";
14
+ export * from "./customerBusinesses/client/requests/index.mjs";
15
+ export * as customerBusinesses from "./customerBusinesses/index.mjs";
16
+ export * from "./customerBusinesses/types/index.mjs";
14
17
  export * from "./customerEvents/client/requests/index.mjs";
15
18
  export * as customerEvents from "./customerEvents/index.mjs";
16
19
  export * from "./customerMessaging/client/requests/index.mjs";
@@ -11,6 +11,9 @@ export * from "./businessShipping/types/index.mjs";
11
11
  export * from "./customer/client/requests/index.mjs";
12
12
  export * as customer from "./customer/index.mjs";
13
13
  export * from "./customer/types/index.mjs";
14
+ export * from "./customerBusinesses/client/requests/index.mjs";
15
+ export * as customerBusinesses from "./customerBusinesses/index.mjs";
16
+ export * from "./customerBusinesses/types/index.mjs";
14
17
  export * from "./customerEvents/client/requests/index.mjs";
15
18
  export * as customerEvents from "./customerEvents/index.mjs";
16
19
  export * from "./customerMessaging/client/requests/index.mjs";
@@ -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
  }
@@ -52,7 +52,10 @@ export class ServeAdClient {
52
52
  logging: this._options.logging,
53
53
  });
54
54
  if (_response.ok) {
55
- return { data: _response.body, rawResponse: _response.rawResponse };
55
+ return {
56
+ data: _response.body,
57
+ rawResponse: _response.rawResponse,
58
+ };
56
59
  }
57
60
  if (_response.error.reason === "status-code") {
58
61
  switch (_response.error.statusCode) {
@@ -1,4 +1,4 @@
1
1
  import type * as FiveOneEat from "../../../index.mjs";
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,9 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export const InventoryChangeType = {
3
+ Restock: "restock",
4
+ Damaged: "damaged",
5
+ Shrinkage: "shrinkage",
6
+ Returned: "returned",
7
+ Correction: "correction",
8
+ Other: "other",
9
+ };
@@ -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 {
@@ -119,7 +119,7 @@ export * from "./FavoriteResponse.mjs";
119
119
  export * from "./ForbiddenErrorBody.mjs";
120
120
  export * from "./Image.mjs";
121
121
  export * from "./InternalServerErrorBody.mjs";
122
- export * from "./JsonResource.mjs";
122
+ export * from "./InventoryChangeType.mjs";
123
123
  export * from "./MenuItemSearchResult.mjs";
124
124
  export * from "./Message.mjs";
125
125
  export * from "./NotFoundErrorBody.mjs";
@@ -119,7 +119,7 @@ export * from "./FavoriteResponse.mjs";
119
119
  export * from "./ForbiddenErrorBody.mjs";
120
120
  export * from "./Image.mjs";
121
121
  export * from "./InternalServerErrorBody.mjs";
122
- export * from "./JsonResource.mjs";
122
+ export * from "./InventoryChangeType.mjs";
123
123
  export * from "./MenuItemSearchResult.mjs";
124
124
  export * from "./Message.mjs";
125
125
  export * from "./NotFoundErrorBody.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.54";
1
+ export declare const SDK_VERSION = "0.0.56";
@@ -1 +1 @@
1
- export const SDK_VERSION = "0.0.54";
1
+ export const SDK_VERSION = "0.0.56";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@51eat/sdk",
3
- "version": "0.0.54",
3
+ "version": "0.0.56",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -55,6 +55,17 @@
55
55
  },
56
56
  "default": "./dist/cjs/api/resources/businessShipping/exports.js"
57
57
  },
58
+ "./customerBusinesses": {
59
+ "import": {
60
+ "types": "./dist/esm/api/resources/customerBusinesses/exports.d.mts",
61
+ "default": "./dist/esm/api/resources/customerBusinesses/exports.mjs"
62
+ },
63
+ "require": {
64
+ "types": "./dist/cjs/api/resources/customerBusinesses/exports.d.ts",
65
+ "default": "./dist/cjs/api/resources/customerBusinesses/exports.js"
66
+ },
67
+ "default": "./dist/cjs/api/resources/customerBusinesses/exports.js"
68
+ },
58
69
  "./customerEvents": {
59
70
  "import": {
60
71
  "types": "./dist/esm/api/resources/customerEvents/exports.d.mts",
package/reference.md CHANGED
@@ -656,6 +656,73 @@ await client.businessShipping.deleteBusinessShippingRate({
656
656
  </dl>
657
657
 
658
658
 
659
+ </dd>
660
+ </dl>
661
+ </details>
662
+
663
+ ## Customer: Businesses
664
+ <details><summary><code>client.customerBusinesses.<a href="/src/api/resources/customerBusinesses/client/Client.ts">getBusinessPickupTimeslots</a>({ ...params }) -> FiveOneEat.GetBusinessPickupTimeslotsResponse</code></summary>
665
+ <dl>
666
+ <dd>
667
+
668
+ #### 📝 Description
669
+
670
+ <dl>
671
+ <dd>
672
+
673
+ <dl>
674
+ <dd>
675
+
676
+ Returns available pickup timeslots for a business on a given date.
677
+ </dd>
678
+ </dl>
679
+ </dd>
680
+ </dl>
681
+
682
+ #### 🔌 Usage
683
+
684
+ <dl>
685
+ <dd>
686
+
687
+ <dl>
688
+ <dd>
689
+
690
+ ```typescript
691
+ await client.customerBusinesses.getBusinessPickupTimeslots({
692
+ handle: "katzs-deli",
693
+ date: "2023-01-15"
694
+ });
695
+
696
+ ```
697
+ </dd>
698
+ </dl>
699
+ </dd>
700
+ </dl>
701
+
702
+ #### ⚙️ Parameters
703
+
704
+ <dl>
705
+ <dd>
706
+
707
+ <dl>
708
+ <dd>
709
+
710
+ **request:** `FiveOneEat.GetBusinessPickupTimeslotsRequest`
711
+
712
+ </dd>
713
+ </dl>
714
+
715
+ <dl>
716
+ <dd>
717
+
718
+ **requestOptions:** `CustomerBusinessesClient.RequestOptions`
719
+
720
+ </dd>
721
+ </dl>
722
+ </dd>
723
+ </dl>
724
+
725
+
659
726
  </dd>
660
727
  </dl>
661
728
  </details>
@@ -841,6 +908,71 @@ await client.customerMyAccount.getMyTicket({
841
908
  </dl>
842
909
 
843
910
 
911
+ </dd>
912
+ </dl>
913
+ </details>
914
+
915
+ <details><summary><code>client.customerMyAccount.<a href="/src/api/resources/customerMyAccount/client/Client.ts">downloadAppleWalletPass</a>({ ...params }) -> Record&lt;string, unknown&gt;</code></summary>
916
+ <dl>
917
+ <dd>
918
+
919
+ #### 📝 Description
920
+
921
+ <dl>
922
+ <dd>
923
+
924
+ <dl>
925
+ <dd>
926
+
927
+ Returns a signed .pkpass file for import into Apple Wallet.
928
+ </dd>
929
+ </dl>
930
+ </dd>
931
+ </dl>
932
+
933
+ #### 🔌 Usage
934
+
935
+ <dl>
936
+ <dd>
937
+
938
+ <dl>
939
+ <dd>
940
+
941
+ ```typescript
942
+ await client.customerMyAccount.downloadAppleWalletPass({
943
+ ticketId: "ticketId"
944
+ });
945
+
946
+ ```
947
+ </dd>
948
+ </dl>
949
+ </dd>
950
+ </dl>
951
+
952
+ #### ⚙️ Parameters
953
+
954
+ <dl>
955
+ <dd>
956
+
957
+ <dl>
958
+ <dd>
959
+
960
+ **request:** `FiveOneEat.DownloadAppleWalletPassRequest`
961
+
962
+ </dd>
963
+ </dl>
964
+
965
+ <dl>
966
+ <dd>
967
+
968
+ **requestOptions:** `CustomerMyAccountClient.RequestOptions`
969
+
970
+ </dd>
971
+ </dl>
972
+ </dd>
973
+ </dl>
974
+
975
+
844
976
  </dd>
845
977
  </dl>
846
978
  </details>
@@ -1034,7 +1166,7 @@ await client.recordClick.adsRecordClick({
1034
1166
  </details>
1035
1167
 
1036
1168
  ## ServeAd
1037
- <details><summary><code>client.serveAd.<a href="/src/api/resources/serveAd/client/Client.ts">adsServeAd</a>({ ...params }) -> FiveOneEat.AdsServeAdResponse</code></summary>
1169
+ <details><summary><code>client.serveAd.<a href="/src/api/resources/serveAd/client/Client.ts">adsServeAd</a>({ ...params }) -> FiveOneEat.AdsServeAdResponse | undefined</code></summary>
1038
1170
  <dl>
1039
1171
  <dd>
1040
1172
 
@@ -4076,7 +4208,7 @@ await client.business.productOrders.refund({
4076
4208
  </dl>
4077
4209
  </details>
4078
4210
 
4079
- <details><summary><code>client.business.productOrders.<a href="/src/api/resources/business/resources/productOrders/client/Client.ts">getLabelRates</a>({ ...params }) -> string</code></summary>
4211
+ <details><summary><code>client.business.productOrders.<a href="/src/api/resources/business/resources/productOrders/client/Client.ts">getLabelRates</a>({ ...params }) -> FiveOneEat.GetLabelRatesProductOrdersResponseItem[]</code></summary>
4080
4212
  <dl>
4081
4213
  <dd>
4082
4214
 
@@ -9621,7 +9753,7 @@ await client.customer.businesses.favorite({
9621
9753
  </dl>
9622
9754
  </details>
9623
9755
 
9624
- <details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">unfavorite</a>({ ...params }) -> Record&lt;string, unknown&gt;</code></summary>
9756
+ <details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">unfavorite</a>({ ...params }) -> void</code></summary>
9625
9757
  <dl>
9626
9758
  <dd>
9627
9759
 
@@ -9747,6 +9879,57 @@ await client.customer.businesses.listTemporaryLocations({
9747
9879
  </dl>
9748
9880
 
9749
9881
 
9882
+ </dd>
9883
+ </dl>
9884
+ </details>
9885
+
9886
+ <details><summary><code>client.customer.businesses.<a href="/src/api/resources/customer/resources/businesses/client/Client.ts">getPickupTimeslots</a>({ ...params }) -> void</code></summary>
9887
+ <dl>
9888
+ <dd>
9889
+
9890
+ #### 🔌 Usage
9891
+
9892
+ <dl>
9893
+ <dd>
9894
+
9895
+ <dl>
9896
+ <dd>
9897
+
9898
+ ```typescript
9899
+ await client.customer.businesses.getPickupTimeslots({
9900
+ business: "business"
9901
+ });
9902
+
9903
+ ```
9904
+ </dd>
9905
+ </dl>
9906
+ </dd>
9907
+ </dl>
9908
+
9909
+ #### ⚙️ Parameters
9910
+
9911
+ <dl>
9912
+ <dd>
9913
+
9914
+ <dl>
9915
+ <dd>
9916
+
9917
+ **request:** `FiveOneEat.customer.GetPickupTimeslotsBusinessesRequest`
9918
+
9919
+ </dd>
9920
+ </dl>
9921
+
9922
+ <dl>
9923
+ <dd>
9924
+
9925
+ **requestOptions:** `BusinessesClient.RequestOptions`
9926
+
9927
+ </dd>
9928
+ </dl>
9929
+ </dd>
9930
+ </dl>
9931
+
9932
+
9750
9933
  </dd>
9751
9934
  </dl>
9752
9935
  </details>
@@ -9818,7 +10001,7 @@ await client.customer.cart.get({
9818
10001
  ```typescript
9819
10002
  await client.customer.cart.addItem({
9820
10003
  business: "katzs-deli",
9821
- product_id: 1,
10004
+ product_id: "product_id",
9822
10005
  quantity: 1
9823
10006
  });
9824
10007
 
@@ -10156,7 +10339,7 @@ await client.customer.cart.removeItem({
10156
10339
  </dl>
10157
10340
  </details>
10158
10341
 
10159
- <details><summary><code>client.customer.cart.<a href="/src/api/resources/customer/resources/cart/client/Client.ts">getShippingOptions</a>({ ...params }) -> unknown[]</code></summary>
10342
+ <details><summary><code>client.customer.cart.<a href="/src/api/resources/customer/resources/cart/client/Client.ts">getShippingOptions</a>({ ...params }) -> FiveOneEat.GetShippingOptionsCartResponseItem[]</code></summary>
10160
10343
  <dl>
10161
10344
  <dd>
10162
10345
 
@@ -1 +0,0 @@
1
- export type JsonResource = string;
@@ -1 +0,0 @@
1
- export type JsonResource = string;