@51eat/sdk 0.0.55 → 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 (163) 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/index.d.ts +1 -1
  63. package/dist/cjs/api/types/index.js +1 -1
  64. package/dist/cjs/version.d.ts +1 -1
  65. package/dist/cjs/version.js +1 -1
  66. package/dist/esm/BaseClient.mjs +2 -2
  67. package/dist/esm/Client.d.mts +3 -3
  68. package/dist/esm/Client.mjs +5 -5
  69. package/dist/esm/api/resources/business/resources/discounts/client/requests/StoreDiscountRequest.d.mts +2 -2
  70. package/dist/esm/api/resources/business/resources/discounts/client/requests/UpdateDiscountRequest.d.mts +2 -2
  71. package/dist/esm/api/resources/business/resources/productCategories/client/requests/StoreProductCategoryRequest.d.mts +1 -1
  72. package/dist/esm/api/resources/business/resources/productCategories/client/requests/UpdateProductCategoryRequest.d.mts +1 -1
  73. package/dist/esm/api/resources/business/resources/productOrders/client/Client.d.mts +1 -1
  74. package/dist/esm/api/resources/business/resources/productOrders/client/Client.mjs +4 -1
  75. package/dist/esm/api/resources/business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.d.mts +10 -0
  76. package/dist/esm/api/resources/business/resources/productOrders/types/index.d.mts +1 -0
  77. package/dist/esm/api/resources/business/resources/productOrders/types/index.mjs +1 -0
  78. package/dist/esm/api/resources/business/resources/products/client/requests/StoreProductRequest.d.mts +1 -1
  79. package/dist/esm/api/resources/business/resources/products/client/requests/UpdateProductRequest.d.mts +1 -1
  80. package/dist/esm/api/resources/business/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.mts +3 -3
  81. package/dist/esm/api/resources/business/resources/stripeConnect/types/CreateAccountSessionStripeConnectResponse.d.mts +1 -1
  82. package/dist/esm/api/resources/businessProducts/client/requests/AdjustInventoryRequest.d.mts +2 -10
  83. package/dist/esm/api/resources/businessProducts/client/requests/AdjustInventoryRequest.mjs +0 -8
  84. package/dist/esm/api/resources/customer/resources/businesses/client/Client.d.mts +2 -1
  85. package/dist/esm/api/resources/customer/resources/businesses/client/Client.mjs +4 -1
  86. package/dist/esm/api/resources/customer/resources/cart/client/Client.d.mts +2 -2
  87. package/dist/esm/api/resources/customer/resources/cart/client/Client.mjs +5 -2
  88. package/dist/esm/api/resources/customer/resources/cart/client/requests/AddToCartRequest.d.mts +3 -3
  89. package/dist/esm/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponseItem.d.mts +19 -0
  90. package/dist/esm/api/resources/customer/resources/cart/types/SelectShippingOptionCartResponse.d.mts +2 -7
  91. package/dist/esm/api/resources/customer/resources/cart/types/index.d.mts +1 -0
  92. package/dist/esm/api/resources/customer/resources/cart/types/index.mjs +1 -0
  93. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CalculatePriceTicketingResponse.d.mts +13 -1
  94. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/ConfirmOrderTicketingResponse.d.mts +3 -3
  95. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/HoldTicketsTicketingResponse.d.mts +13 -2
  96. package/dist/esm/api/resources/customer/resources/pushNotifications/types/RegisterPushNotificationsResponse.d.mts +3 -3
  97. package/dist/esm/api/resources/customerBusinesses/client/Client.d.mts +30 -0
  98. package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/Client.mjs +10 -8
  99. package/dist/esm/api/resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.d.mts +12 -0
  100. package/dist/esm/api/resources/customerBusinesses/client/requests/index.d.mts +1 -0
  101. package/dist/esm/api/resources/customerBusinesses/exports.d.mts +2 -0
  102. package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/exports.mjs +1 -1
  103. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.d.mts +7 -0
  104. package/dist/esm/api/resources/customerBusinesses/types/GetBusinessPickupTimeslotsResponse.mjs +2 -0
  105. package/dist/esm/api/resources/customerBusinesses/types/index.d.mts +1 -0
  106. package/dist/esm/api/resources/customerBusinesses/types/index.mjs +1 -0
  107. package/dist/esm/api/resources/customerMyAccount/client/Client.d.mts +16 -0
  108. package/dist/esm/api/resources/customerMyAccount/client/Client.mjs +54 -0
  109. package/dist/esm/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.d.mts +9 -0
  110. package/dist/esm/api/resources/customerMyAccount/client/requests/DownloadAppleWalletPassRequest.mjs +2 -0
  111. package/dist/esm/api/resources/customerMyAccount/client/requests/index.d.mts +1 -0
  112. package/dist/esm/api/resources/index.d.mts +3 -3
  113. package/dist/esm/api/resources/index.mjs +3 -3
  114. package/dist/esm/api/resources/serveAd/client/Client.d.mts +1 -1
  115. package/dist/esm/api/resources/serveAd/client/Client.mjs +4 -1
  116. package/dist/esm/api/resources/serveAd/types/AdsServeAdResponse.d.mts +2 -2
  117. package/dist/esm/api/types/Ad.d.mts +1 -4
  118. package/dist/esm/api/types/BusinessConversation.d.mts +1 -1
  119. package/dist/esm/api/types/BusinessEventCheckInStats.d.mts +1 -1
  120. package/dist/esm/api/types/BusinessEventSalesSummary.d.mts +1 -1
  121. package/dist/esm/api/types/BusinessMenuItem.d.mts +22 -2
  122. package/dist/esm/api/types/Conversation.d.mts +1 -1
  123. package/dist/esm/api/types/CustomerProductOrderItem.d.mts +10 -1
  124. package/dist/esm/api/types/InventoryChangeType.d.mts +9 -0
  125. package/dist/esm/api/types/InventoryChangeType.mjs +9 -0
  126. package/dist/esm/api/types/Ticket.d.mts +1 -0
  127. package/dist/esm/api/types/index.d.mts +1 -1
  128. package/dist/esm/api/types/index.mjs +1 -1
  129. package/dist/esm/version.d.mts +1 -1
  130. package/dist/esm/version.mjs +1 -1
  131. package/package.json +12 -12
  132. package/reference.md +108 -29
  133. package/dist/cjs/api/resources/getPickupTimeslots/client/Client.d.ts +0 -28
  134. package/dist/cjs/api/resources/getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.d.ts +0 -11
  135. package/dist/cjs/api/resources/getPickupTimeslots/client/requests/index.d.ts +0 -1
  136. package/dist/cjs/api/resources/getPickupTimeslots/exports.d.ts +0 -2
  137. package/dist/cjs/api/resources/getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.d.ts +0 -7
  138. package/dist/cjs/api/resources/getPickupTimeslots/types/index.d.ts +0 -1
  139. package/dist/cjs/api/types/JsonResource.d.ts +0 -1
  140. package/dist/esm/api/resources/getPickupTimeslots/client/Client.d.mts +0 -28
  141. package/dist/esm/api/resources/getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.d.mts +0 -11
  142. package/dist/esm/api/resources/getPickupTimeslots/client/requests/index.d.mts +0 -1
  143. package/dist/esm/api/resources/getPickupTimeslots/exports.d.mts +0 -2
  144. package/dist/esm/api/resources/getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.d.mts +0 -7
  145. package/dist/esm/api/resources/getPickupTimeslots/types/index.d.mts +0 -1
  146. package/dist/esm/api/resources/getPickupTimeslots/types/index.mjs +0 -1
  147. package/dist/esm/api/types/JsonResource.d.mts +0 -1
  148. /package/dist/cjs/api/resources/{getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.js → business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.js} +0 -0
  149. /package/dist/cjs/api/resources/{getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.js → customer/resources/cart/types/GetShippingOptionsCartResponseItem.js} +0 -0
  150. /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.d.ts +0 -0
  151. /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.js +0 -0
  152. /package/dist/cjs/api/{types/JsonResource.js → resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.js} +0 -0
  153. /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/client/requests/index.js +0 -0
  154. /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/index.d.ts +0 -0
  155. /package/dist/cjs/api/resources/{getPickupTimeslots → customerBusinesses}/index.js +0 -0
  156. /package/dist/esm/api/resources/{getPickupTimeslots/client/requests/BusinessesGetPickupTimeslotsRequest.mjs → business/resources/productOrders/types/GetLabelRatesProductOrdersResponseItem.mjs} +0 -0
  157. /package/dist/esm/api/resources/{getPickupTimeslots/types/BusinessesGetPickupTimeslotsResponse.mjs → customer/resources/cart/types/GetShippingOptionsCartResponseItem.mjs} +0 -0
  158. /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.d.mts +0 -0
  159. /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/index.mjs +0 -0
  160. /package/dist/esm/api/{types/JsonResource.mjs → resources/customerBusinesses/client/requests/GetBusinessPickupTimeslotsRequest.mjs} +0 -0
  161. /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/client/requests/index.mjs +0 -0
  162. /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/index.d.mts +0 -0
  163. /package/dist/esm/api/resources/{getPickupTimeslots → customerBusinesses}/index.mjs +0 -0
@@ -87,13 +87,14 @@ export declare class BusinessesClient {
87
87
  * @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
88
88
  *
89
89
  * @throws {@link FiveOneEat.UnauthorizedError}
90
+ * @throws {@link FiveOneEat.NotFoundError}
90
91
  *
91
92
  * @example
92
93
  * await client.customer.businesses.unfavorite({
93
94
  * business: "katzs-deli"
94
95
  * })
95
96
  */
96
- unfavorite(request: FiveOneEat.customer.UnfavoriteBusinessesRequest, requestOptions?: BusinessesClient.RequestOptions): core.HttpResponsePromise<Record<string, unknown>>;
97
+ unfavorite(request: FiveOneEat.customer.UnfavoriteBusinessesRequest, requestOptions?: BusinessesClient.RequestOptions): core.HttpResponsePromise<void>;
97
98
  private __unfavorite;
98
99
  /**
99
100
  * Retrieve active and upcoming temporary locations for a business.
@@ -282,6 +282,7 @@ export class BusinessesClient {
282
282
  * @param {BusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
283
283
  *
284
284
  * @throws {@link FiveOneEat.UnauthorizedError}
285
+ * @throws {@link FiveOneEat.NotFoundError}
285
286
  *
286
287
  * @example
287
288
  * await client.customer.businesses.unfavorite({
@@ -309,12 +310,14 @@ export class BusinessesClient {
309
310
  logging: this._options.logging,
310
311
  });
311
312
  if (_response.ok) {
312
- return { data: _response.body, rawResponse: _response.rawResponse };
313
+ return { data: undefined, rawResponse: _response.rawResponse };
313
314
  }
314
315
  if (_response.error.reason === "status-code") {
315
316
  switch (_response.error.statusCode) {
316
317
  case 401:
317
318
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
319
+ case 404:
320
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
318
321
  default:
319
322
  throw new errors.FiveOneEatError({
320
323
  statusCode: _response.error.statusCode,
@@ -33,7 +33,7 @@ export declare class CartClient {
33
33
  * @example
34
34
  * await client.customer.cart.addItem({
35
35
  * business: "katzs-deli",
36
- * product_id: 1,
36
+ * product_id: "product_id",
37
37
  * quantity: 1
38
38
  * })
39
39
  */
@@ -155,7 +155,7 @@ export declare class CartClient {
155
155
  * }
156
156
  * })
157
157
  */
158
- getShippingOptions(request: FiveOneEat.customer.GetShippingOptionsRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<unknown[]>;
158
+ getShippingOptions(request: FiveOneEat.customer.GetShippingOptionsRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.GetShippingOptionsCartResponseItem[]>;
159
159
  private __getShippingOptions;
160
160
  /**
161
161
  * Pass either `shipping_rate_id` (for flat/free rates) or `provider_rate_id`
@@ -89,7 +89,7 @@ export class CartClient {
89
89
  * @example
90
90
  * await client.customer.cart.addItem({
91
91
  * business: "katzs-deli",
92
- * product_id: 1,
92
+ * product_id: "product_id",
93
93
  * quantity: 1
94
94
  * })
95
95
  */
@@ -497,7 +497,10 @@ export class CartClient {
497
497
  logging: this._options.logging,
498
498
  });
499
499
  if (_response.ok) {
500
- return { data: _response.body, rawResponse: _response.rawResponse };
500
+ return {
501
+ data: _response.body,
502
+ rawResponse: _response.rawResponse,
503
+ };
501
504
  }
502
505
  if (_response.error.reason === "status-code") {
503
506
  switch (_response.error.statusCode) {
@@ -2,14 +2,14 @@
2
2
  * @example
3
3
  * {
4
4
  * business: "katzs-deli",
5
- * product_id: 1,
5
+ * product_id: "product_id",
6
6
  * quantity: 1
7
7
  * }
8
8
  */
9
9
  export interface AddToCartRequest {
10
10
  /** The business handle */
11
11
  business: string;
12
- product_id: number;
13
- variant_id?: number | null;
12
+ product_id: string;
13
+ variant_id?: string | null;
14
14
  quantity: number;
15
15
  }
@@ -0,0 +1,19 @@
1
+ export type GetShippingOptionsCartResponseItem = {
2
+ shipping_rate_id: string;
3
+ provider_rate_id: unknown | null;
4
+ name: string;
5
+ amount_cents: number;
6
+ amount: string;
7
+ carrier: unknown | null;
8
+ service: unknown | null;
9
+ estimated_days: unknown | null;
10
+ } | {
11
+ shipping_rate_id: unknown | null;
12
+ provider_rate_id: string;
13
+ name: string;
14
+ amount_cents: string;
15
+ amount: string;
16
+ carrier: string;
17
+ service: string;
18
+ estimated_days: string;
19
+ };
@@ -1,11 +1,6 @@
1
- export type SelectShippingOptionCartResponse = {
1
+ export interface SelectShippingOptionCartResponse {
2
2
  shipping_amount: string;
3
3
  shipping_amount_cents: number;
4
4
  shipping_method: string;
5
5
  total_amount: string;
6
- } | {
7
- shipping_amount: string;
8
- shipping_amount_cents: number;
9
- shipping_method: string;
10
- total_amount: string;
11
- };
6
+ }
@@ -3,6 +3,7 @@ export * from "./CheckoutCartResponse.mjs";
3
3
  export * from "./ClearCartResponse.mjs";
4
4
  export * from "./CreatePaymentIntentCartResponse.mjs";
5
5
  export * from "./GetCartResponse.mjs";
6
+ export * from "./GetShippingOptionsCartResponseItem.mjs";
6
7
  export * from "./RemoveItemCartResponse.mjs";
7
8
  export * from "./SelectShippingOptionCartResponse.mjs";
8
9
  export * from "./UpdateItemCartResponse.mjs";
@@ -3,6 +3,7 @@ export * from "./CheckoutCartResponse.mjs";
3
3
  export * from "./ClearCartResponse.mjs";
4
4
  export * from "./CreatePaymentIntentCartResponse.mjs";
5
5
  export * from "./GetCartResponse.mjs";
6
+ export * from "./GetShippingOptionsCartResponseItem.mjs";
6
7
  export * from "./RemoveItemCartResponse.mjs";
7
8
  export * from "./SelectShippingOptionCartResponse.mjs";
8
9
  export * from "./UpdateItemCartResponse.mjs";
@@ -6,6 +6,18 @@ export declare namespace CalculatePriceTicketingResponse {
6
6
  subtotal: string;
7
7
  platform_fee: string;
8
8
  total: string;
9
- line_items: string;
9
+ line_items: Data.LineItems.Item[];
10
+ }
11
+ namespace Data {
12
+ type LineItems = LineItems.Item[];
13
+ namespace LineItems {
14
+ interface Item {
15
+ ticket_type_id: string;
16
+ ticket_type_name: string;
17
+ unit_price: string;
18
+ quantity: string;
19
+ line_total: string;
20
+ }
21
+ }
10
22
  }
11
23
  }
@@ -1,4 +1,4 @@
1
1
  import type * as FiveOneEat from "../../../../../../../index.mjs";
2
- export type ConfirmOrderTicketingResponse = {
3
- data: FiveOneEat.JsonResource;
4
- } | Record<string, unknown>;
2
+ export interface ConfirmOrderTicketingResponse {
3
+ data: FiveOneEat.TicketOrder;
4
+ }
@@ -5,7 +5,18 @@ export declare namespace HoldTicketsTicketingResponse {
5
5
  interface Data {
6
6
  ticket_cart_id: string;
7
7
  expires_at: string;
8
- time_remaining_seconds: string;
9
- holds: string;
8
+ time_remaining_seconds: number;
9
+ holds: Data.Holds.Item[];
10
+ }
11
+ namespace Data {
12
+ type Holds = Holds.Item[];
13
+ namespace Holds {
14
+ interface Item {
15
+ id: number;
16
+ ticket_type_id: string;
17
+ quantity: number;
18
+ expires_at: string;
19
+ }
20
+ }
10
21
  }
11
22
  }
@@ -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
  }
@@ -0,0 +1,30 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.mjs";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.mjs";
3
+ import * as core from "../../../../core/index.mjs";
4
+ import * as FiveOneEat from "../../../index.mjs";
5
+ export declare namespace CustomerBusinessesClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class CustomerBusinessesClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<CustomerBusinessesClient.Options>;
12
+ constructor(options?: CustomerBusinessesClient.Options);
13
+ /**
14
+ * Returns available pickup timeslots for a business on a given date.
15
+ *
16
+ * @param {FiveOneEat.GetBusinessPickupTimeslotsRequest} request
17
+ * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
18
+ *
19
+ * @throws {@link FiveOneEat.UnauthorizedError}
20
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
21
+ *
22
+ * @example
23
+ * await client.customerBusinesses.getBusinessPickupTimeslots({
24
+ * handle: "katzs-deli",
25
+ * date: "2023-01-15"
26
+ * })
27
+ */
28
+ getBusinessPickupTimeslots(request: FiveOneEat.GetBusinessPickupTimeslotsRequest, requestOptions?: CustomerBusinessesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.GetBusinessPickupTimeslotsResponse>;
29
+ private __getBusinessPickupTimeslots;
30
+ }
@@ -15,27 +15,29 @@ import * as environments from "../../../../environments.mjs";
15
15
  import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
16
16
  import * as errors from "../../../../errors/index.mjs";
17
17
  import * as FiveOneEat from "../../../index.mjs";
18
- export class GetPickupTimeslotsClient {
18
+ export class CustomerBusinessesClient {
19
19
  constructor(options = {}) {
20
20
  this._options = normalizeClientOptionsWithAuth(options);
21
21
  }
22
22
  /**
23
- * @param {FiveOneEat.BusinessesGetPickupTimeslotsRequest} request
24
- * @param {GetPickupTimeslotsClient.RequestOptions} requestOptions - Request-specific configuration.
23
+ * Returns available pickup timeslots for a business on a given date.
24
+ *
25
+ * @param {FiveOneEat.GetBusinessPickupTimeslotsRequest} request
26
+ * @param {CustomerBusinessesClient.RequestOptions} requestOptions - Request-specific configuration.
25
27
  *
26
28
  * @throws {@link FiveOneEat.UnauthorizedError}
27
29
  * @throws {@link FiveOneEat.UnprocessableEntityError}
28
30
  *
29
31
  * @example
30
- * await client.getPickupTimeslots.businessesGetPickupTimeslots({
31
- * handle: "handle",
32
+ * await client.customerBusinesses.getBusinessPickupTimeslots({
33
+ * handle: "katzs-deli",
32
34
  * date: "2023-01-15"
33
35
  * })
34
36
  */
35
- businessesGetPickupTimeslots(request, requestOptions) {
36
- return core.HttpResponsePromise.fromPromise(this.__businessesGetPickupTimeslots(request, requestOptions));
37
+ getBusinessPickupTimeslots(request, requestOptions) {
38
+ return core.HttpResponsePromise.fromPromise(this.__getBusinessPickupTimeslots(request, requestOptions));
37
39
  }
38
- __businessesGetPickupTimeslots(request, requestOptions) {
40
+ __getBusinessPickupTimeslots(request, requestOptions) {
39
41
  return __awaiter(this, void 0, void 0, function* () {
40
42
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41
43
  const { handle, date } = request;
@@ -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 @@
1
+ export type { GetBusinessPickupTimeslotsRequest } from "./GetBusinessPickupTimeslotsRequest.mjs";
@@ -0,0 +1,2 @@
1
+ export { CustomerBusinessesClient } from "./client/Client.mjs";
2
+ export * from "./client/index.mjs";
@@ -1,3 +1,3 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- export { GetPickupTimeslotsClient } from "./client/Client.mjs";
2
+ export { CustomerBusinessesClient } from "./client/Client.mjs";
3
3
  export * from "./client/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";
@@ -19,9 +22,6 @@ export * from "./customerMessaging/types/index.mjs";
19
22
  export * from "./customerMyAccount/client/requests/index.mjs";
20
23
  export * as customerMyAccount from "./customerMyAccount/index.mjs";
21
24
  export * from "./customerMyAccount/types/index.mjs";
22
- export * from "./getPickupTimeslots/client/requests/index.mjs";
23
- export * as getPickupTimeslots from "./getPickupTimeslots/index.mjs";
24
- export * from "./getPickupTimeslots/types/index.mjs";
25
25
  export * from "./recordClick/client/requests/index.mjs";
26
26
  export * as recordClick from "./recordClick/index.mjs";
27
27
  export * from "./serveAd/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";
@@ -19,9 +22,6 @@ export * from "./customerMessaging/types/index.mjs";
19
22
  export * from "./customerMyAccount/client/requests/index.mjs";
20
23
  export * as customerMyAccount from "./customerMyAccount/index.mjs";
21
24
  export * from "./customerMyAccount/types/index.mjs";
22
- export * from "./getPickupTimeslots/client/requests/index.mjs";
23
- export * as getPickupTimeslots from "./getPickupTimeslots/index.mjs";
24
- export * from "./getPickupTimeslots/types/index.mjs";
25
25
  export * from "./recordClick/client/requests/index.mjs";
26
26
  export * as recordClick from "./recordClick/index.mjs";
27
27
  export * from "./serveAd/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
+ };