@51eat/sdk 0.0.76 → 0.0.78

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 (200) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/business/client/Client.d.ts +3 -0
  3. package/dist/cjs/api/resources/business/client/Client.js +7 -2
  4. package/dist/cjs/api/resources/business/resources/events/client/requests/StoreEventRequest.d.ts +7 -0
  5. package/dist/cjs/api/resources/business/resources/events/client/requests/UpdateEventRequest.d.ts +7 -0
  6. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/StoreTicketTypeRequest.d.ts +1 -0
  7. package/dist/cjs/api/resources/business/resources/events/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.d.ts +7 -0
  8. package/dist/cjs/api/resources/business/resources/index.d.ts +2 -0
  9. package/dist/cjs/api/resources/business/resources/index.js +3 -1
  10. package/dist/cjs/api/resources/business/resources/productOrders/client/Client.d.ts +26 -9
  11. package/dist/cjs/api/resources/business/resources/productOrders/client/Client.js +61 -30
  12. package/dist/cjs/api/resources/business/resources/productOrders/client/requests/AddTrackingProductOrdersRequest.d.ts +3 -2
  13. package/dist/cjs/api/resources/business/resources/productOrders/client/requests/FulfillProductOrdersRequest.d.ts +3 -2
  14. package/dist/cjs/api/resources/business/resources/productOrders/client/requests/GetLabelRatesProductOrdersRequest.d.ts +3 -2
  15. package/dist/cjs/api/resources/business/resources/productOrders/client/requests/GetProductOrdersRequest.d.ts +3 -2
  16. package/dist/cjs/api/resources/business/resources/productOrders/client/requests/MarkPickedUpProductOrdersRequest.d.ts +3 -2
  17. package/dist/cjs/api/resources/business/resources/productOrders/client/requests/PurchaseLabelProductOrdersRequest.d.ts +3 -2
  18. package/dist/cjs/api/resources/business/resources/productOrders/client/requests/RefundOrderRequest.d.ts +14 -0
  19. package/dist/cjs/api/resources/business/resources/productOrders/client/requests/index.d.ts +1 -1
  20. package/dist/cjs/api/resources/business/resources/products/client/Client.d.ts +4 -2
  21. package/dist/cjs/api/resources/business/resources/products/client/Client.js +4 -2
  22. package/dist/cjs/api/resources/business/resources/products/client/requests/StoreProductRequest.d.ts +3 -1
  23. package/dist/cjs/api/resources/business/resources/products/client/requests/UpdateProductRequest.d.ts +3 -1
  24. package/dist/cjs/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.ts +9 -0
  25. package/dist/cjs/api/resources/business/resources/taxCodes/client/Client.d.ts +27 -0
  26. package/dist/cjs/api/resources/business/resources/taxCodes/client/Client.js +111 -0
  27. package/dist/cjs/api/resources/business/resources/taxCodes/client/index.d.ts +1 -0
  28. package/dist/cjs/api/resources/business/resources/taxCodes/client/index.js +2 -0
  29. package/dist/cjs/api/resources/business/resources/taxCodes/exports.d.ts +2 -0
  30. package/dist/cjs/api/resources/business/resources/taxCodes/exports.js +21 -0
  31. package/dist/cjs/api/resources/business/resources/taxCodes/index.d.ts +2 -0
  32. package/dist/cjs/api/resources/business/resources/taxCodes/index.js +18 -0
  33. package/dist/cjs/api/resources/business/resources/taxCodes/types/ListTaxCodesResponse.d.ts +4 -0
  34. package/dist/cjs/api/resources/business/resources/taxCodes/types/index.d.ts +1 -0
  35. package/dist/cjs/api/resources/business/resources/taxCodes/types/index.js +17 -0
  36. package/dist/cjs/api/resources/customer/resources/cart/client/Client.d.ts +99 -8
  37. package/dist/cjs/api/resources/customer/resources/cart/client/Client.js +243 -11
  38. package/dist/cjs/api/resources/customer/resources/cart/client/requests/AddItemCartRequest.d.ts +1 -1
  39. package/dist/cjs/api/resources/customer/resources/cart/client/requests/CheckoutCartRequest.d.ts +1 -1
  40. package/dist/cjs/api/resources/customer/resources/cart/client/requests/ChooseFulfillmentMethodRequest.d.ts +13 -0
  41. package/dist/cjs/api/resources/customer/resources/cart/client/requests/ClearCartRequest.d.ts +1 -1
  42. package/dist/cjs/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentCartRequest.d.ts +1 -1
  43. package/dist/cjs/api/resources/customer/resources/cart/client/requests/GetCartRequest.d.ts +1 -1
  44. package/dist/cjs/api/resources/customer/resources/cart/client/requests/ListShippingOptionsCartRequest.d.ts +10 -0
  45. package/dist/cjs/api/resources/customer/resources/cart/client/requests/RefreshCartPaymentRequest.d.ts +12 -0
  46. package/dist/cjs/api/resources/customer/resources/cart/client/requests/RefreshCartPaymentRequest.js +3 -0
  47. package/dist/cjs/api/resources/customer/resources/cart/client/requests/SelectShippingRateRequest.d.ts +12 -0
  48. package/dist/cjs/api/resources/customer/resources/cart/client/requests/SelectShippingRateRequest.js +3 -0
  49. package/dist/{esm/api/resources/customer/resources/cart/client/requests/GetShippingOptionsCartRequest.d.mts → cjs/api/resources/customer/resources/cart/client/requests/ShippingAddressRequest.d.ts} +6 -5
  50. package/dist/cjs/api/resources/customer/resources/cart/client/requests/ShippingAddressRequest.js +3 -0
  51. package/dist/cjs/api/resources/customer/resources/cart/client/requests/index.d.ts +5 -2
  52. package/dist/cjs/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.ts +1 -0
  53. package/dist/cjs/api/resources/customer/resources/cart/types/ListShippingOptionsCartResponse.d.ts +18 -0
  54. package/dist/cjs/api/resources/customer/resources/cart/types/ListShippingOptionsCartResponse.js +3 -0
  55. package/dist/cjs/api/resources/customer/resources/cart/types/RefreshPaymentIntentCartResponse.d.ts +18 -0
  56. package/dist/cjs/api/resources/customer/resources/cart/types/RefreshPaymentIntentCartResponse.js +10 -0
  57. package/dist/cjs/api/resources/customer/resources/cart/types/SetFulfillmentCartResponse.d.ts +4 -0
  58. package/dist/cjs/api/resources/customer/resources/cart/types/SetFulfillmentCartResponse.js +3 -0
  59. package/dist/cjs/api/resources/customer/resources/cart/types/SetShippingAddressCartResponse.d.ts +4 -0
  60. package/dist/cjs/api/resources/customer/resources/cart/types/SetShippingAddressCartResponse.js +3 -0
  61. package/dist/cjs/api/resources/customer/resources/cart/types/index.d.ts +4 -1
  62. package/dist/cjs/api/resources/customer/resources/cart/types/index.js +4 -1
  63. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.d.ts +6 -0
  64. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.js +10 -0
  65. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/CreatePaymentIntentRequest.d.ts +1 -0
  66. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.ts +12 -0
  67. package/dist/cjs/api/resources/customer/resources/productOrders/client/Client.d.ts +1 -0
  68. package/dist/cjs/api/resources/customer/resources/productOrders/client/Client.js +3 -0
  69. package/dist/cjs/api/resources/customer/resources/productOrders/client/requests/GetProductOrdersRequest.d.ts +1 -0
  70. package/dist/cjs/api/resources/customer/resources/stands/client/Client.d.ts +3 -0
  71. package/dist/cjs/api/resources/customer/resources/stands/client/Client.js +9 -0
  72. package/dist/cjs/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.ts +10 -0
  73. package/dist/cjs/api/types/BusinessEvent.d.ts +7 -0
  74. package/dist/cjs/api/types/BusinessEventTicketType.d.ts +2 -0
  75. package/dist/cjs/api/types/BusinessProfile.d.ts +6 -1
  76. package/dist/cjs/api/types/CartResource.d.ts +24 -0
  77. package/dist/cjs/api/types/ConflictErrorBody.d.ts +2 -7
  78. package/dist/cjs/api/types/ConflictErrorBody.js +0 -7
  79. package/dist/cjs/api/types/CustomerBusinessProfile.d.ts +1 -1
  80. package/dist/cjs/api/types/CustomerEvent.d.ts +6 -0
  81. package/dist/cjs/api/types/CustomerEventDetail.d.ts +6 -0
  82. package/dist/cjs/api/types/EventFeedItem.d.ts +6 -0
  83. package/dist/cjs/api/types/FulfillmentType.d.ts +6 -0
  84. package/dist/cjs/api/types/FulfillmentType.js +9 -0
  85. package/dist/cjs/api/types/ProductResource.d.ts +5 -0
  86. package/dist/cjs/api/types/TaxCode.d.ts +21 -0
  87. package/dist/cjs/api/types/TaxCode.js +15 -0
  88. package/dist/cjs/api/types/TicketOrder.d.ts +7 -1
  89. package/dist/cjs/api/types/index.d.ts +2 -0
  90. package/dist/cjs/api/types/index.js +2 -0
  91. package/dist/cjs/version.d.ts +1 -1
  92. package/dist/cjs/version.js +1 -1
  93. package/dist/esm/BaseClient.mjs +2 -2
  94. package/dist/esm/api/resources/business/client/Client.d.mts +3 -0
  95. package/dist/esm/api/resources/business/client/Client.mjs +5 -0
  96. package/dist/esm/api/resources/business/resources/events/client/requests/StoreEventRequest.d.mts +7 -0
  97. package/dist/esm/api/resources/business/resources/events/client/requests/UpdateEventRequest.d.mts +7 -0
  98. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/StoreTicketTypeRequest.d.mts +1 -0
  99. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.d.mts +7 -0
  100. package/dist/esm/api/resources/business/resources/index.d.mts +2 -0
  101. package/dist/esm/api/resources/business/resources/index.mjs +2 -0
  102. package/dist/esm/api/resources/business/resources/productOrders/client/Client.d.mts +26 -9
  103. package/dist/esm/api/resources/business/resources/productOrders/client/Client.mjs +62 -31
  104. package/dist/esm/api/resources/business/resources/productOrders/client/requests/AddTrackingProductOrdersRequest.d.mts +3 -2
  105. package/dist/esm/api/resources/business/resources/productOrders/client/requests/FulfillProductOrdersRequest.d.mts +3 -2
  106. package/dist/esm/api/resources/business/resources/productOrders/client/requests/GetLabelRatesProductOrdersRequest.d.mts +3 -2
  107. package/dist/esm/api/resources/business/resources/productOrders/client/requests/GetProductOrdersRequest.d.mts +3 -2
  108. package/dist/esm/api/resources/business/resources/productOrders/client/requests/MarkPickedUpProductOrdersRequest.d.mts +3 -2
  109. package/dist/esm/api/resources/business/resources/productOrders/client/requests/PurchaseLabelProductOrdersRequest.d.mts +3 -2
  110. package/dist/esm/api/resources/business/resources/productOrders/client/requests/RefundOrderRequest.d.mts +14 -0
  111. package/dist/esm/api/resources/business/resources/productOrders/client/requests/index.d.mts +1 -1
  112. package/dist/esm/api/resources/business/resources/products/client/Client.d.mts +4 -2
  113. package/dist/esm/api/resources/business/resources/products/client/Client.mjs +4 -2
  114. package/dist/esm/api/resources/business/resources/products/client/requests/StoreProductRequest.d.mts +3 -1
  115. package/dist/esm/api/resources/business/resources/products/client/requests/UpdateProductRequest.d.mts +3 -1
  116. package/dist/esm/api/resources/business/resources/profile/client/requests/UpdateBusinessProfileRequest.d.mts +9 -0
  117. package/dist/esm/api/resources/business/resources/taxCodes/client/Client.d.mts +27 -0
  118. package/dist/esm/api/resources/business/resources/taxCodes/client/Client.mjs +74 -0
  119. package/dist/esm/api/resources/business/resources/taxCodes/client/index.d.mts +1 -0
  120. package/dist/esm/api/resources/business/resources/taxCodes/client/index.mjs +1 -0
  121. package/dist/esm/api/resources/business/resources/taxCodes/exports.d.mts +2 -0
  122. package/dist/esm/api/resources/business/resources/taxCodes/exports.mjs +3 -0
  123. package/dist/esm/api/resources/business/resources/taxCodes/index.d.mts +2 -0
  124. package/dist/esm/api/resources/business/resources/taxCodes/index.mjs +2 -0
  125. package/dist/esm/api/resources/business/resources/taxCodes/types/ListTaxCodesResponse.d.mts +4 -0
  126. package/dist/esm/api/resources/business/resources/taxCodes/types/index.d.mts +1 -0
  127. package/dist/esm/api/resources/business/resources/taxCodes/types/index.mjs +1 -0
  128. package/dist/esm/api/resources/customer/resources/cart/client/Client.d.mts +99 -8
  129. package/dist/esm/api/resources/customer/resources/cart/client/Client.mjs +243 -11
  130. package/dist/esm/api/resources/customer/resources/cart/client/requests/AddItemCartRequest.d.mts +1 -1
  131. package/dist/esm/api/resources/customer/resources/cart/client/requests/CheckoutCartRequest.d.mts +1 -1
  132. package/dist/esm/api/resources/customer/resources/cart/client/requests/ChooseFulfillmentMethodRequest.d.mts +13 -0
  133. package/dist/esm/api/resources/customer/resources/cart/client/requests/ClearCartRequest.d.mts +1 -1
  134. package/dist/esm/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentCartRequest.d.mts +1 -1
  135. package/dist/esm/api/resources/customer/resources/cart/client/requests/GetCartRequest.d.mts +1 -1
  136. package/dist/esm/api/resources/customer/resources/cart/client/requests/ListShippingOptionsCartRequest.d.mts +10 -0
  137. package/dist/esm/api/resources/customer/resources/cart/client/requests/RefreshCartPaymentRequest.d.mts +12 -0
  138. package/dist/esm/api/resources/customer/resources/cart/client/requests/RefreshCartPaymentRequest.mjs +2 -0
  139. package/dist/esm/api/resources/customer/resources/cart/client/requests/SelectShippingRateRequest.d.mts +12 -0
  140. package/dist/esm/api/resources/customer/resources/cart/client/requests/SelectShippingRateRequest.mjs +2 -0
  141. package/dist/{cjs/api/resources/customer/resources/cart/client/requests/GetShippingOptionsCartRequest.d.ts → esm/api/resources/customer/resources/cart/client/requests/ShippingAddressRequest.d.mts} +6 -5
  142. package/dist/esm/api/resources/customer/resources/cart/client/requests/ShippingAddressRequest.mjs +2 -0
  143. package/dist/esm/api/resources/customer/resources/cart/client/requests/index.d.mts +5 -2
  144. package/dist/esm/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.mts +1 -0
  145. package/dist/esm/api/resources/customer/resources/cart/types/ListShippingOptionsCartResponse.d.mts +18 -0
  146. package/dist/esm/api/resources/customer/resources/cart/types/ListShippingOptionsCartResponse.mjs +2 -0
  147. package/dist/esm/api/resources/customer/resources/cart/types/RefreshPaymentIntentCartResponse.d.mts +18 -0
  148. package/dist/esm/api/resources/customer/resources/cart/types/RefreshPaymentIntentCartResponse.mjs +7 -0
  149. package/dist/esm/api/resources/customer/resources/cart/types/SetFulfillmentCartResponse.d.mts +4 -0
  150. package/dist/esm/api/resources/customer/resources/cart/types/SetFulfillmentCartResponse.mjs +2 -0
  151. package/dist/esm/api/resources/customer/resources/cart/types/SetShippingAddressCartResponse.d.mts +4 -0
  152. package/dist/esm/api/resources/customer/resources/cart/types/SetShippingAddressCartResponse.mjs +2 -0
  153. package/dist/esm/api/resources/customer/resources/cart/types/index.d.mts +4 -1
  154. package/dist/esm/api/resources/customer/resources/cart/types/index.mjs +4 -1
  155. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.d.mts +6 -0
  156. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.mjs +10 -0
  157. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/CreatePaymentIntentRequest.d.mts +1 -0
  158. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.mts +12 -0
  159. package/dist/esm/api/resources/customer/resources/productOrders/client/Client.d.mts +1 -0
  160. package/dist/esm/api/resources/customer/resources/productOrders/client/Client.mjs +3 -0
  161. package/dist/esm/api/resources/customer/resources/productOrders/client/requests/GetProductOrdersRequest.d.mts +1 -0
  162. package/dist/esm/api/resources/customer/resources/stands/client/Client.d.mts +3 -0
  163. package/dist/esm/api/resources/customer/resources/stands/client/Client.mjs +9 -0
  164. package/dist/esm/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.mts +10 -0
  165. package/dist/esm/api/types/BusinessEvent.d.mts +7 -0
  166. package/dist/esm/api/types/BusinessEventTicketType.d.mts +2 -0
  167. package/dist/esm/api/types/BusinessProfile.d.mts +6 -1
  168. package/dist/esm/api/types/CartResource.d.mts +24 -0
  169. package/dist/esm/api/types/ConflictErrorBody.d.mts +2 -7
  170. package/dist/esm/api/types/ConflictErrorBody.mjs +1 -6
  171. package/dist/esm/api/types/CustomerBusinessProfile.d.mts +1 -1
  172. package/dist/esm/api/types/CustomerEvent.d.mts +6 -0
  173. package/dist/esm/api/types/CustomerEventDetail.d.mts +6 -0
  174. package/dist/esm/api/types/EventFeedItem.d.mts +6 -0
  175. package/dist/esm/api/types/FulfillmentType.d.mts +6 -0
  176. package/dist/esm/api/types/FulfillmentType.mjs +6 -0
  177. package/dist/esm/api/types/ProductResource.d.mts +5 -0
  178. package/dist/esm/api/types/TaxCode.d.mts +21 -0
  179. package/dist/esm/api/types/TaxCode.mjs +12 -0
  180. package/dist/esm/api/types/TicketOrder.d.mts +7 -1
  181. package/dist/esm/api/types/index.d.mts +2 -0
  182. package/dist/esm/api/types/index.mjs +2 -0
  183. package/dist/esm/version.d.mts +1 -1
  184. package/dist/esm/version.mjs +1 -1
  185. package/package.json +12 -1
  186. package/reference.md +382 -16
  187. package/dist/cjs/api/resources/business/resources/productOrders/client/requests/RefundProductOrdersRequest.d.ts +0 -11
  188. package/dist/cjs/api/resources/customer/resources/cart/client/requests/SelectShippingOptionCartRequest.d.ts +0 -14
  189. package/dist/cjs/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponse.d.ts +0 -14
  190. package/dist/esm/api/resources/business/resources/productOrders/client/requests/RefundProductOrdersRequest.d.mts +0 -11
  191. package/dist/esm/api/resources/customer/resources/cart/client/requests/SelectShippingOptionCartRequest.d.mts +0 -14
  192. package/dist/esm/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponse.d.mts +0 -14
  193. /package/dist/cjs/api/resources/business/resources/productOrders/client/requests/{RefundProductOrdersRequest.js → RefundOrderRequest.js} +0 -0
  194. /package/dist/cjs/api/resources/{customer/resources/cart/client/requests/GetShippingOptionsCartRequest.js → business/resources/taxCodes/types/ListTaxCodesResponse.js} +0 -0
  195. /package/dist/cjs/api/resources/customer/resources/cart/client/requests/{SelectShippingOptionCartRequest.js → ChooseFulfillmentMethodRequest.js} +0 -0
  196. /package/dist/cjs/api/resources/customer/resources/cart/{types/GetShippingOptionsCartResponse.js → client/requests/ListShippingOptionsCartRequest.js} +0 -0
  197. /package/dist/esm/api/resources/business/resources/productOrders/client/requests/{RefundProductOrdersRequest.mjs → RefundOrderRequest.mjs} +0 -0
  198. /package/dist/esm/api/resources/{customer/resources/cart/client/requests/GetShippingOptionsCartRequest.mjs → business/resources/taxCodes/types/ListTaxCodesResponse.mjs} +0 -0
  199. /package/dist/esm/api/resources/customer/resources/cart/client/requests/{SelectShippingOptionCartRequest.mjs → ChooseFulfillmentMethodRequest.mjs} +0 -0
  200. /package/dist/esm/api/resources/customer/resources/cart/{types/GetShippingOptionsCartResponse.mjs → client/requests/ListShippingOptionsCartRequest.mjs} +0 -0
@@ -256,10 +256,16 @@ class TicketingClient {
256
256
  * Create a Stripe payment intent for the tickets held in the cart for the given event.
257
257
  * Returns a client_secret for the mobile app to confirm payment with Stripe.
258
258
  *
259
+ * A 409 `{status: "paid", message, payment_intent_id}` means these tickets
260
+ * are already paid for (the webhook issues them; never pay twice). A 409
261
+ * `{status: "processing", message}` means the payment is still in flight.
262
+ *
259
263
  * @param {FiveOneEat.customer.events.CreatePaymentIntentRequest} request
260
264
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
261
265
  *
262
266
  * @throws {@link FiveOneEat.UnauthorizedError}
267
+ * @throws {@link FiveOneEat.ForbiddenError}
268
+ * @throws {@link FiveOneEat.ConflictError}
263
269
  * @throws {@link FiveOneEat.UnprocessableEntityError}
264
270
  *
265
271
  * @example
@@ -307,6 +313,10 @@ class TicketingClient {
307
313
  switch (_response.error.statusCode) {
308
314
  case 401:
309
315
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
316
+ case 403:
317
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
318
+ case 409:
319
+ throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
310
320
  case 422:
311
321
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
312
322
  default:
@@ -18,6 +18,7 @@ export interface CreatePaymentIntentRequest {
18
18
  export declare namespace CreatePaymentIntentRequest {
19
19
  interface BillingAddress {
20
20
  line1: string;
21
+ line2?: (string | null) | undefined;
21
22
  city: string;
22
23
  state: string;
23
24
  postal_code: string;
@@ -9,6 +9,18 @@ export interface CreatePaymentIntentTicketingResponse {
9
9
  shipping_method: unknown | null;
10
10
  platform_fee: number;
11
11
  total_amount: number;
12
+ total_cents: number;
13
+ /**
14
+ * The stored intent as it stood before this call, so a caller can
15
+ * tell whether the price the buyer is about to pay just moved.
16
+ */
17
+ previous_payment_intent_id: string | null;
18
+ previous_amount_cents: number | null;
19
+ /**
20
+ * Whether the stored intent was pinned to another method or tax
21
+ * address, even at the same price (e.g. a flat-rate address change).
22
+ */
23
+ previous_destination_changed: boolean;
12
24
  }
13
25
  export declare namespace CreatePaymentIntentTicketingResponse {
14
26
  interface TaxCalculation {
@@ -26,6 +26,7 @@ export declare class ProductOrdersClient {
26
26
  *
27
27
  * @throws {@link FiveOneEat.UnauthorizedError}
28
28
  * @throws {@link FiveOneEat.ForbiddenError}
29
+ * @throws {@link FiveOneEat.NotFoundError}
29
30
  *
30
31
  * @example
31
32
  * await client.customer.productOrders.get({
@@ -109,6 +109,7 @@ class ProductOrdersClient {
109
109
  *
110
110
  * @throws {@link FiveOneEat.UnauthorizedError}
111
111
  * @throws {@link FiveOneEat.ForbiddenError}
112
+ * @throws {@link FiveOneEat.NotFoundError}
112
113
  *
113
114
  * @example
114
115
  * await client.customer.productOrders.get({
@@ -147,6 +148,8 @@ class ProductOrdersClient {
147
148
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
148
149
  case 403:
149
150
  throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
151
+ case 404:
152
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
150
153
  default:
151
154
  throw new errors.FiveOneEatError({
152
155
  statusCode: _response.error.statusCode,
@@ -5,5 +5,6 @@
5
5
  * }
6
6
  */
7
7
  export interface GetProductOrdersRequest {
8
+ /** The product order ID */
8
9
  productOrder: string;
9
10
  }
@@ -32,6 +32,8 @@ export declare class StandsClient {
32
32
  *
33
33
  * @throws {@link FiveOneEat.UnauthorizedError}
34
34
  * @throws {@link FiveOneEat.NotFoundError}
35
+ * @throws {@link FiveOneEat.ConflictError}
36
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
35
37
  *
36
38
  * @example
37
39
  * await client.customer.stands.createPaymentIntent({
@@ -46,6 +48,7 @@ export declare class StandsClient {
46
48
  *
47
49
  * @throws {@link FiveOneEat.UnauthorizedError}
48
50
  * @throws {@link FiveOneEat.NotFoundError}
51
+ * @throws {@link FiveOneEat.ConflictError}
49
52
  * @throws {@link FiveOneEat.UnprocessableEntityError}
50
53
  *
51
54
  * @example
@@ -115,6 +115,8 @@ class StandsClient {
115
115
  *
116
116
  * @throws {@link FiveOneEat.UnauthorizedError}
117
117
  * @throws {@link FiveOneEat.NotFoundError}
118
+ * @throws {@link FiveOneEat.ConflictError}
119
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
118
120
  *
119
121
  * @example
120
122
  * await client.customer.stands.createPaymentIntent({
@@ -153,6 +155,10 @@ class StandsClient {
153
155
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
154
156
  case 404:
155
157
  throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
158
+ case 409:
159
+ throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
160
+ case 422:
161
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
156
162
  default:
157
163
  throw new errors.FiveOneEatError({
158
164
  statusCode: _response.error.statusCode,
@@ -170,6 +176,7 @@ class StandsClient {
170
176
  *
171
177
  * @throws {@link FiveOneEat.UnauthorizedError}
172
178
  * @throws {@link FiveOneEat.NotFoundError}
179
+ * @throws {@link FiveOneEat.ConflictError}
173
180
  * @throws {@link FiveOneEat.UnprocessableEntityError}
174
181
  *
175
182
  * @example
@@ -215,6 +222,8 @@ class StandsClient {
215
222
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
216
223
  case 404:
217
224
  throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
225
+ case 409:
226
+ throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
218
227
  case 422:
219
228
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
220
229
  default:
@@ -6,6 +6,16 @@ export interface AppHttpResourcesApiV1BusinessCommerceProductResource {
6
6
  description: string;
7
7
  is_active: boolean;
8
8
  published_at: string;
9
+ /**
10
+ * Owner-only: never eager-loaded by the guest-facing
11
+ * `Api\V1\Customer\Shop\ShopController`, which shares this
12
+ * resource. Mirrors how `variants`/`default_variant` are already
13
+ * scoped to whichever relations the calling controller loaded. Gated on `relationLoaded()` rather than `whenLoaded()`'s value
14
+ * form: the latter also hides the field when the loaded relation
15
+ * itself resolves to null (e.g. a tax code no longer in the
16
+ * catalog), which would hide a real, owner-visible column value.
17
+ */
18
+ tax_code?: string | undefined;
9
19
  variants?: FiveOneEat.VariantResource[] | undefined;
10
20
  default_variant?: FiveOneEat.VariantResource | undefined;
11
21
  created_at: string;
@@ -7,6 +7,13 @@ export interface BusinessEvent {
7
7
  starts_at: string;
8
8
  ends_at: string;
9
9
  location: string;
10
+ venue_address: string;
11
+ venue_city: string;
12
+ venue_state: string;
13
+ venue_zipcode: string;
14
+ venue_country: string;
15
+ latitude: number | null;
16
+ longitude: number | null;
10
17
  is_all_day: string;
11
18
  is_featured: string;
12
19
  ticket_sales_enabled: string;
@@ -4,6 +4,8 @@ export interface BusinessEventTicketType {
4
4
  name: string;
5
5
  description: string;
6
6
  price: string;
7
+ /** Stripe tax code (txcd_…); one of EventTaxCodes::ALLOWED. Null for free tiers. */
8
+ tax_code: string | null;
7
9
  quantity_available: string;
8
10
  quantity_sold: string;
9
11
  remaining_quantity: string;
@@ -22,6 +22,11 @@ export interface BusinessProfile {
22
22
  latitude: number | null;
23
23
  longitude: number | null;
24
24
  has_location: boolean;
25
+ billing_address: string | null;
26
+ billing_city: string | null;
27
+ billing_state: string | null;
28
+ billing_zipcode: string | null;
29
+ billing_country: string | null;
25
30
  logo: string | null;
26
31
  logo_url: string | null;
27
32
  hours: BusinessProfile.Hours;
@@ -41,7 +46,7 @@ export interface BusinessProfile {
41
46
  }
42
47
  export declare namespace BusinessProfile {
43
48
  interface Hours {
44
- is_open_now: string;
49
+ is_open_now: boolean;
45
50
  next_open_at: string | null;
46
51
  schedule: FiveOneEat.BusinessScheduleDayResource[];
47
52
  exceptions: FiveOneEat.BusinessHourExceptionResource[];
@@ -4,6 +4,8 @@ export interface CartResource {
4
4
  subtotal_cents: number;
5
5
  subtotal: number;
6
6
  item_count: number;
7
+ /** How the order will be fulfilled and what checkout still needs. */
8
+ fulfillment: CartResource.Fulfillment;
7
9
  }
8
10
  export declare namespace CartResource {
9
11
  type Items = Items.Item[];
@@ -18,4 +20,26 @@ export declare namespace CartResource {
18
20
  total_cents: number;
19
21
  }
20
22
  }
23
+ /**
24
+ * How the order will be fulfilled and what checkout still needs.
25
+ */
26
+ interface Fulfillment {
27
+ offered_methods: string[];
28
+ method: string | null;
29
+ shipping_address: Fulfillment.ShippingAddress | null;
30
+ requires_rate_selection: boolean;
31
+ selected_shipping_rate_id: string | null;
32
+ selected_shipping_amount_cents: number | null;
33
+ checkout_blocker: string | null;
34
+ }
35
+ namespace Fulfillment {
36
+ interface ShippingAddress {
37
+ line1: string;
38
+ line2: string | null;
39
+ city: string;
40
+ state: string;
41
+ postal_code: string;
42
+ country: string;
43
+ }
44
+ }
21
45
  }
@@ -1,9 +1,4 @@
1
1
  export interface ConflictErrorBody {
2
- message: ConflictErrorBody.Message;
3
- }
4
- export declare namespace ConflictErrorBody {
5
- const Message: {
6
- readonly BusinessIsAlreadyFavorited: "Business is already favorited.";
7
- };
8
- type Message = (typeof Message)[keyof typeof Message];
2
+ /** Error overview. */
3
+ message: string;
9
4
  }
@@ -1,10 +1,3 @@
1
1
  "use strict";
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ConflictErrorBody = void 0;
5
- var ConflictErrorBody;
6
- (function (ConflictErrorBody) {
7
- ConflictErrorBody.Message = {
8
- BusinessIsAlreadyFavorited: "Business is already favorited.",
9
- };
10
- })(ConflictErrorBody || (exports.ConflictErrorBody = ConflictErrorBody = {}));
@@ -38,7 +38,7 @@ export interface CustomerBusinessProfile {
38
38
  }
39
39
  export declare namespace CustomerBusinessProfile {
40
40
  interface Hours {
41
- is_open_now: string;
41
+ is_open_now: boolean;
42
42
  next_open_at: string | null;
43
43
  schedule: FiveOneEat.BusinessScheduleDayResource[];
44
44
  exceptions: FiveOneEat.BusinessHourExceptionResource[];
@@ -5,6 +5,12 @@ export interface CustomerEvent {
5
5
  starts_at: string;
6
6
  ends_at: string;
7
7
  location: string | null;
8
+ address: string | null;
9
+ city: string | null;
10
+ state: string | null;
11
+ zipcode: string | null;
12
+ latitude: number | null;
13
+ longitude: number | null;
8
14
  is_featured: boolean;
9
15
  ticket_sales_enabled: boolean;
10
16
  image: string | null;
@@ -6,6 +6,12 @@ export interface CustomerEventDetail {
6
6
  starts_at: string;
7
7
  ends_at: string;
8
8
  location: string | null;
9
+ address: string | null;
10
+ city: string | null;
11
+ state: string | null;
12
+ zipcode: string | null;
13
+ latitude: number | null;
14
+ longitude: number | null;
9
15
  is_featured: boolean;
10
16
  ticket_sales_enabled: boolean;
11
17
  image: string | null;
@@ -5,6 +5,12 @@ export interface EventFeedItem {
5
5
  starts_at: string;
6
6
  ends_at: string;
7
7
  location: string | null;
8
+ address: string | null;
9
+ city: string | null;
10
+ state: string | null;
11
+ zipcode: string | null;
12
+ latitude: number | null;
13
+ longitude: number | null;
8
14
  is_featured: boolean;
9
15
  ticket_sales_enabled: boolean;
10
16
  image: string | null;
@@ -0,0 +1,6 @@
1
+ export declare const FulfillmentType: {
2
+ readonly Ship: "ship";
3
+ readonly Pickup: "pickup";
4
+ readonly InPerson: "in_person";
5
+ };
6
+ export type FulfillmentType = (typeof FulfillmentType)[keyof typeof FulfillmentType];
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.FulfillmentType = void 0;
5
+ exports.FulfillmentType = {
6
+ Ship: "ship",
7
+ Pickup: "pickup",
8
+ InPerson: "in_person",
9
+ };
@@ -7,6 +7,11 @@ export interface ProductResource {
7
7
  published_at: string | null;
8
8
  metadata: Record<string, unknown> | null;
9
9
  product_category_id: string | null;
10
+ /**
11
+ * Owner-only: shared with the customer stand shop, so it appears only
12
+ * when the business controller loaded the `taxCode` relation.
13
+ */
14
+ tax_code?: (string | null) | undefined;
10
15
  category?: unknown[] | undefined;
11
16
  images?: unknown[] | undefined;
12
17
  variants?: unknown[] | undefined;
@@ -0,0 +1,21 @@
1
+ export interface TaxCode {
2
+ id: string;
3
+ name: string;
4
+ description: string | null;
5
+ category: TaxCode.Category;
6
+ /** Whether a product may use this code. */
7
+ allowed_on_products: boolean;
8
+ /** Whether an event ticket type may use this code. */
9
+ allowed_on_ticket_types: boolean;
10
+ }
11
+ export declare namespace TaxCode {
12
+ const Category: {
13
+ readonly Food: "food";
14
+ readonly Goods: "goods";
15
+ readonly Services: "services";
16
+ readonly Digital: "digital";
17
+ readonly Admissions: "admissions";
18
+ readonly Other: "other";
19
+ };
20
+ type Category = (typeof Category)[keyof typeof Category];
21
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.TaxCode = void 0;
5
+ var TaxCode;
6
+ (function (TaxCode) {
7
+ TaxCode.Category = {
8
+ Food: "food",
9
+ Goods: "goods",
10
+ Services: "services",
11
+ Digital: "digital",
12
+ Admissions: "admissions",
13
+ Other: "other",
14
+ };
15
+ })(TaxCode || (exports.TaxCode = TaxCode = {}));
@@ -12,7 +12,13 @@ export declare namespace TicketOrder {
12
12
  title: string;
13
13
  starts_at: string;
14
14
  ends_at: string;
15
- location: string;
15
+ location: string | null;
16
+ address: string | null;
17
+ city: string | null;
18
+ state: string | null;
19
+ zipcode: string | null;
20
+ latitude: number | null;
21
+ longitude: number | null;
16
22
  business: Event.Business | null;
17
23
  }
18
24
  namespace Event {
@@ -122,6 +122,7 @@ export * from "./ExploreTemporaryLocation.js";
122
122
  export * from "./FavoriteFacets.js";
123
123
  export * from "./FavoriteResponse.js";
124
124
  export * from "./ForbiddenErrorBody.js";
125
+ export * from "./FulfillmentType.js";
125
126
  export * from "./InternalServerErrorBody.js";
126
127
  export * from "./InventoryLevelResource.js";
127
128
  export * from "./MenuItemSearchResult.js";
@@ -143,6 +144,7 @@ export * from "./SearchResults.js";
143
144
  export * from "./ShippingAccountResource.js";
144
145
  export * from "./StandShop.js";
145
146
  export * from "./StoreAddressRequest.js";
147
+ export * from "./TaxCode.js";
146
148
  export * from "./Ticket.js";
147
149
  export * from "./TicketOrder.js";
148
150
  export * from "./TicketOrderResponse.js";
@@ -138,6 +138,7 @@ __exportStar(require("./ExploreTemporaryLocation.js"), exports);
138
138
  __exportStar(require("./FavoriteFacets.js"), exports);
139
139
  __exportStar(require("./FavoriteResponse.js"), exports);
140
140
  __exportStar(require("./ForbiddenErrorBody.js"), exports);
141
+ __exportStar(require("./FulfillmentType.js"), exports);
141
142
  __exportStar(require("./InternalServerErrorBody.js"), exports);
142
143
  __exportStar(require("./InventoryLevelResource.js"), exports);
143
144
  __exportStar(require("./MenuItemSearchResult.js"), exports);
@@ -159,6 +160,7 @@ __exportStar(require("./SearchResults.js"), exports);
159
160
  __exportStar(require("./ShippingAccountResource.js"), exports);
160
161
  __exportStar(require("./StandShop.js"), exports);
161
162
  __exportStar(require("./StoreAddressRequest.js"), exports);
163
+ __exportStar(require("./TaxCode.js"), exports);
162
164
  __exportStar(require("./Ticket.js"), exports);
163
165
  __exportStar(require("./TicketOrder.js"), exports);
164
166
  __exportStar(require("./TicketOrderResponse.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.76";
1
+ export declare const SDK_VERSION = "0.0.78";
@@ -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.76";
4
+ exports.SDK_VERSION = "0.0.78";
@@ -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.76",
10
- "User-Agent": "@51eat/sdk/0.0.76",
9
+ "X-Fern-SDK-Version": "0.0.78",
10
+ "User-Agent": "@51eat/sdk/0.0.78",
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);
@@ -22,6 +22,7 @@ import { PushNotificationsClient } from "../resources/pushNotifications/client/C
22
22
  import { ShippingClient } from "../resources/shipping/client/Client.mjs";
23
23
  import { StandsClient } from "../resources/stands/client/Client.mjs";
24
24
  import { StripeConnectClient } from "../resources/stripeConnect/client/Client.mjs";
25
+ import { TaxCodesClient } from "../resources/taxCodes/client/Client.mjs";
25
26
  import { TemporaryLocationsClient } from "../resources/temporaryLocations/client/Client.mjs";
26
27
  export declare namespace BusinessClient {
27
28
  type Options = BaseClientOptions;
@@ -35,6 +36,7 @@ export declare class BusinessClient {
35
36
  protected _productOrders: ProductOrdersClient | undefined;
36
37
  protected _priceLists: PriceListsClient | undefined;
37
38
  protected _products: ProductsClient | undefined;
39
+ protected _taxCodes: TaxCodesClient | undefined;
38
40
  protected _events: EventsClient | undefined;
39
41
  protected _gallery: GalleryClient | undefined;
40
42
  protected _hours: HoursClient | undefined;
@@ -59,6 +61,7 @@ export declare class BusinessClient {
59
61
  get productOrders(): ProductOrdersClient;
60
62
  get priceLists(): PriceListsClient;
61
63
  get products(): ProductsClient;
64
+ get taxCodes(): TaxCodesClient;
62
65
  get events(): EventsClient;
63
66
  get gallery(): GalleryClient;
64
67
  get hours(): HoursClient;
@@ -22,6 +22,7 @@ import { PushNotificationsClient } from "../resources/pushNotifications/client/C
22
22
  import { ShippingClient } from "../resources/shipping/client/Client.mjs";
23
23
  import { StandsClient } from "../resources/stands/client/Client.mjs";
24
24
  import { StripeConnectClient } from "../resources/stripeConnect/client/Client.mjs";
25
+ import { TaxCodesClient } from "../resources/taxCodes/client/Client.mjs";
25
26
  import { TemporaryLocationsClient } from "../resources/temporaryLocations/client/Client.mjs";
26
27
  export class BusinessClient {
27
28
  constructor(options = {}) {
@@ -55,6 +56,10 @@ export class BusinessClient {
55
56
  var _a;
56
57
  return ((_a = this._products) !== null && _a !== void 0 ? _a : (this._products = new ProductsClient(this._options)));
57
58
  }
59
+ get taxCodes() {
60
+ var _a;
61
+ return ((_a = this._taxCodes) !== null && _a !== void 0 ? _a : (this._taxCodes = new TaxCodesClient(this._options)));
62
+ }
58
63
  get events() {
59
64
  var _a;
60
65
  return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new EventsClient(this._options)));
@@ -10,6 +10,13 @@ export interface StoreEventRequest {
10
10
  title: string;
11
11
  description?: string | null;
12
12
  location?: string | null;
13
+ venue_address?: string | null;
14
+ venue_city?: string | null;
15
+ venue_state?: string | null;
16
+ venue_zipcode?: string | null;
17
+ venue_country?: string | null;
18
+ latitude?: number | null;
19
+ longitude?: number | null;
13
20
  starts_at: string;
14
21
  ends_at: string;
15
22
  is_all_day?: boolean;
@@ -10,6 +10,13 @@ export interface UpdateEventRequest {
10
10
  title?: string;
11
11
  description?: string | null;
12
12
  location?: string | null;
13
+ venue_address?: string | null;
14
+ venue_city?: string | null;
15
+ venue_state?: string | null;
16
+ venue_zipcode?: string | null;
17
+ venue_country?: string | null;
18
+ latitude?: number | null;
19
+ longitude?: number | null;
13
20
  starts_at?: string;
14
21
  ends_at?: string;
15
22
  is_all_day?: boolean;
@@ -13,6 +13,7 @@ export interface StoreTicketTypeRequest {
13
13
  name: string;
14
14
  description?: string | null;
15
15
  price: number;
16
+ tax_code?: string | null;
16
17
  quantity_available: number;
17
18
  sales_start_at?: string | null;
18
19
  sales_end_at?: string | null;
@@ -10,6 +10,13 @@ export interface UpdateTicketTypeRequest {
10
10
  name?: string;
11
11
  description?: string | null;
12
12
  price?: number;
13
+ /**
14
+ * Whether tax_code is required depends on the price this save
15
+ * will actually leave in place (stored price when price isn't
16
+ * sent) — checked in after(), not here, since "required" can't
17
+ * tell "omitted" from "already valid in storage" apart.
18
+ */
19
+ tax_code?: string | null;
13
20
  quantity_available?: number;
14
21
  sales_start_at?: string | null;
15
22
  sales_end_at?: string | null;
@@ -56,6 +56,8 @@ export * from "./stands/types/index.mjs";
56
56
  export * from "./stripeConnect/client/requests/index.mjs";
57
57
  export * as stripeConnect from "./stripeConnect/index.mjs";
58
58
  export * from "./stripeConnect/types/index.mjs";
59
+ export * as taxCodes from "./taxCodes/index.mjs";
60
+ export * from "./taxCodes/types/index.mjs";
59
61
  export * from "./temporaryLocations/client/requests/index.mjs";
60
62
  export * as temporaryLocations from "./temporaryLocations/index.mjs";
61
63
  export * from "./temporaryLocations/types/index.mjs";
@@ -56,6 +56,8 @@ export * from "./stands/types/index.mjs";
56
56
  export * from "./stripeConnect/client/requests/index.mjs";
57
57
  export * as stripeConnect from "./stripeConnect/index.mjs";
58
58
  export * from "./stripeConnect/types/index.mjs";
59
+ export * as taxCodes from "./taxCodes/index.mjs";
60
+ export * from "./taxCodes/types/index.mjs";
59
61
  export * from "./temporaryLocations/client/requests/index.mjs";
60
62
  export * as temporaryLocations from "./temporaryLocations/index.mjs";
61
63
  export * from "./temporaryLocations/types/index.mjs";