@51eat/sdk 0.0.76 → 0.0.77

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 (190) 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/taxCodes/client/Client.d.ts +27 -0
  25. package/dist/cjs/api/resources/business/resources/taxCodes/client/Client.js +111 -0
  26. package/dist/cjs/api/resources/business/resources/taxCodes/client/index.d.ts +1 -0
  27. package/dist/cjs/api/resources/business/resources/taxCodes/client/index.js +2 -0
  28. package/dist/cjs/api/resources/business/resources/taxCodes/exports.d.ts +2 -0
  29. package/dist/cjs/api/resources/business/resources/taxCodes/exports.js +21 -0
  30. package/dist/cjs/api/resources/business/resources/taxCodes/index.d.ts +2 -0
  31. package/dist/cjs/api/resources/business/resources/taxCodes/index.js +18 -0
  32. package/dist/cjs/api/resources/business/resources/taxCodes/types/ListTaxCodesResponse.d.ts +4 -0
  33. package/dist/cjs/api/resources/business/resources/taxCodes/types/index.d.ts +1 -0
  34. package/dist/cjs/api/resources/business/resources/taxCodes/types/index.js +17 -0
  35. package/dist/cjs/api/resources/customer/resources/cart/client/Client.d.ts +98 -8
  36. package/dist/cjs/api/resources/customer/resources/cart/client/Client.js +242 -11
  37. package/dist/cjs/api/resources/customer/resources/cart/client/requests/AddItemCartRequest.d.ts +1 -1
  38. package/dist/cjs/api/resources/customer/resources/cart/client/requests/CheckoutCartRequest.d.ts +1 -1
  39. package/dist/cjs/api/resources/customer/resources/cart/client/requests/ChooseFulfillmentMethodRequest.d.ts +13 -0
  40. package/dist/cjs/api/resources/customer/resources/cart/client/requests/ClearCartRequest.d.ts +1 -1
  41. package/dist/cjs/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentCartRequest.d.ts +1 -1
  42. package/dist/cjs/api/resources/customer/resources/cart/client/requests/GetCartRequest.d.ts +1 -1
  43. package/dist/cjs/api/resources/customer/resources/cart/client/requests/ListShippingOptionsCartRequest.d.ts +10 -0
  44. package/dist/cjs/api/resources/customer/resources/cart/client/requests/RefreshCartPaymentRequest.d.ts +12 -0
  45. package/dist/cjs/api/resources/customer/resources/cart/client/requests/RefreshCartPaymentRequest.js +3 -0
  46. package/dist/cjs/api/resources/customer/resources/cart/client/requests/SelectShippingRateRequest.d.ts +12 -0
  47. package/dist/cjs/api/resources/customer/resources/cart/client/requests/SelectShippingRateRequest.js +3 -0
  48. 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
  49. package/dist/cjs/api/resources/customer/resources/cart/client/requests/ShippingAddressRequest.js +3 -0
  50. package/dist/cjs/api/resources/customer/resources/cart/client/requests/index.d.ts +5 -2
  51. package/dist/cjs/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.ts +1 -0
  52. package/dist/cjs/api/resources/customer/resources/cart/types/ListShippingOptionsCartResponse.d.ts +18 -0
  53. package/dist/cjs/api/resources/customer/resources/cart/types/ListShippingOptionsCartResponse.js +3 -0
  54. package/dist/cjs/api/resources/customer/resources/cart/types/RefreshPaymentIntentCartResponse.d.ts +18 -0
  55. package/dist/cjs/api/resources/customer/resources/cart/types/RefreshPaymentIntentCartResponse.js +10 -0
  56. package/dist/cjs/api/resources/customer/resources/cart/types/SetFulfillmentCartResponse.d.ts +4 -0
  57. package/dist/cjs/api/resources/customer/resources/cart/types/SetFulfillmentCartResponse.js +3 -0
  58. package/dist/cjs/api/resources/customer/resources/cart/types/SetShippingAddressCartResponse.d.ts +4 -0
  59. package/dist/cjs/api/resources/customer/resources/cart/types/SetShippingAddressCartResponse.js +3 -0
  60. package/dist/cjs/api/resources/customer/resources/cart/types/index.d.ts +4 -1
  61. package/dist/cjs/api/resources/customer/resources/cart/types/index.js +4 -1
  62. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.d.ts +2 -0
  63. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/Client.js +6 -0
  64. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/client/requests/CreatePaymentIntentRequest.d.ts +1 -0
  65. package/dist/cjs/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.ts +7 -0
  66. package/dist/cjs/api/resources/customer/resources/productOrders/client/Client.d.ts +1 -0
  67. package/dist/cjs/api/resources/customer/resources/productOrders/client/Client.js +3 -0
  68. package/dist/cjs/api/resources/customer/resources/productOrders/client/requests/GetProductOrdersRequest.d.ts +1 -0
  69. package/dist/cjs/api/resources/customer/resources/stands/client/Client.d.ts +1 -0
  70. package/dist/cjs/api/resources/customer/resources/stands/client/Client.js +3 -0
  71. package/dist/cjs/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.ts +10 -0
  72. package/dist/cjs/api/types/BusinessEvent.d.ts +7 -0
  73. package/dist/cjs/api/types/BusinessEventTicketType.d.ts +2 -0
  74. package/dist/cjs/api/types/BusinessProfile.d.ts +1 -1
  75. package/dist/cjs/api/types/CartResource.d.ts +24 -0
  76. package/dist/cjs/api/types/ConflictErrorBody.d.ts +7 -1
  77. package/dist/cjs/api/types/ConflictErrorBody.js +4 -1
  78. package/dist/cjs/api/types/CustomerBusinessProfile.d.ts +1 -1
  79. package/dist/cjs/api/types/FulfillmentType.d.ts +6 -0
  80. package/dist/cjs/api/types/FulfillmentType.js +9 -0
  81. package/dist/cjs/api/types/ProductResource.d.ts +5 -0
  82. package/dist/cjs/api/types/TaxCode.d.ts +21 -0
  83. package/dist/cjs/api/types/TaxCode.js +15 -0
  84. package/dist/cjs/api/types/index.d.ts +2 -0
  85. package/dist/cjs/api/types/index.js +2 -0
  86. package/dist/cjs/version.d.ts +1 -1
  87. package/dist/cjs/version.js +1 -1
  88. package/dist/esm/BaseClient.mjs +2 -2
  89. package/dist/esm/api/resources/business/client/Client.d.mts +3 -0
  90. package/dist/esm/api/resources/business/client/Client.mjs +5 -0
  91. package/dist/esm/api/resources/business/resources/events/client/requests/StoreEventRequest.d.mts +7 -0
  92. package/dist/esm/api/resources/business/resources/events/client/requests/UpdateEventRequest.d.mts +7 -0
  93. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/StoreTicketTypeRequest.d.mts +1 -0
  94. package/dist/esm/api/resources/business/resources/events/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.d.mts +7 -0
  95. package/dist/esm/api/resources/business/resources/index.d.mts +2 -0
  96. package/dist/esm/api/resources/business/resources/index.mjs +2 -0
  97. package/dist/esm/api/resources/business/resources/productOrders/client/Client.d.mts +26 -9
  98. package/dist/esm/api/resources/business/resources/productOrders/client/Client.mjs +62 -31
  99. package/dist/esm/api/resources/business/resources/productOrders/client/requests/AddTrackingProductOrdersRequest.d.mts +3 -2
  100. package/dist/esm/api/resources/business/resources/productOrders/client/requests/FulfillProductOrdersRequest.d.mts +3 -2
  101. package/dist/esm/api/resources/business/resources/productOrders/client/requests/GetLabelRatesProductOrdersRequest.d.mts +3 -2
  102. package/dist/esm/api/resources/business/resources/productOrders/client/requests/GetProductOrdersRequest.d.mts +3 -2
  103. package/dist/esm/api/resources/business/resources/productOrders/client/requests/MarkPickedUpProductOrdersRequest.d.mts +3 -2
  104. package/dist/esm/api/resources/business/resources/productOrders/client/requests/PurchaseLabelProductOrdersRequest.d.mts +3 -2
  105. package/dist/esm/api/resources/business/resources/productOrders/client/requests/RefundOrderRequest.d.mts +14 -0
  106. package/dist/esm/api/resources/business/resources/productOrders/client/requests/index.d.mts +1 -1
  107. package/dist/esm/api/resources/business/resources/products/client/Client.d.mts +4 -2
  108. package/dist/esm/api/resources/business/resources/products/client/Client.mjs +4 -2
  109. package/dist/esm/api/resources/business/resources/products/client/requests/StoreProductRequest.d.mts +3 -1
  110. package/dist/esm/api/resources/business/resources/products/client/requests/UpdateProductRequest.d.mts +3 -1
  111. package/dist/esm/api/resources/business/resources/taxCodes/client/Client.d.mts +27 -0
  112. package/dist/esm/api/resources/business/resources/taxCodes/client/Client.mjs +74 -0
  113. package/dist/esm/api/resources/business/resources/taxCodes/client/index.d.mts +1 -0
  114. package/dist/esm/api/resources/business/resources/taxCodes/client/index.mjs +1 -0
  115. package/dist/esm/api/resources/business/resources/taxCodes/exports.d.mts +2 -0
  116. package/dist/esm/api/resources/business/resources/taxCodes/exports.mjs +3 -0
  117. package/dist/esm/api/resources/business/resources/taxCodes/index.d.mts +2 -0
  118. package/dist/esm/api/resources/business/resources/taxCodes/index.mjs +2 -0
  119. package/dist/esm/api/resources/business/resources/taxCodes/types/ListTaxCodesResponse.d.mts +4 -0
  120. package/dist/esm/api/resources/business/resources/taxCodes/types/index.d.mts +1 -0
  121. package/dist/esm/api/resources/business/resources/taxCodes/types/index.mjs +1 -0
  122. package/dist/esm/api/resources/customer/resources/cart/client/Client.d.mts +98 -8
  123. package/dist/esm/api/resources/customer/resources/cart/client/Client.mjs +242 -11
  124. package/dist/esm/api/resources/customer/resources/cart/client/requests/AddItemCartRequest.d.mts +1 -1
  125. package/dist/esm/api/resources/customer/resources/cart/client/requests/CheckoutCartRequest.d.mts +1 -1
  126. package/dist/esm/api/resources/customer/resources/cart/client/requests/ChooseFulfillmentMethodRequest.d.mts +13 -0
  127. package/dist/esm/api/resources/customer/resources/cart/client/requests/ClearCartRequest.d.mts +1 -1
  128. package/dist/esm/api/resources/customer/resources/cart/client/requests/CreatePaymentIntentCartRequest.d.mts +1 -1
  129. package/dist/esm/api/resources/customer/resources/cart/client/requests/GetCartRequest.d.mts +1 -1
  130. package/dist/esm/api/resources/customer/resources/cart/client/requests/ListShippingOptionsCartRequest.d.mts +10 -0
  131. package/dist/esm/api/resources/customer/resources/cart/client/requests/RefreshCartPaymentRequest.d.mts +12 -0
  132. package/dist/esm/api/resources/customer/resources/cart/client/requests/RefreshCartPaymentRequest.mjs +2 -0
  133. package/dist/esm/api/resources/customer/resources/cart/client/requests/SelectShippingRateRequest.d.mts +12 -0
  134. package/dist/esm/api/resources/customer/resources/cart/client/requests/SelectShippingRateRequest.mjs +2 -0
  135. 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
  136. package/dist/esm/api/resources/customer/resources/cart/client/requests/ShippingAddressRequest.mjs +2 -0
  137. package/dist/esm/api/resources/customer/resources/cart/client/requests/index.d.mts +5 -2
  138. package/dist/esm/api/resources/customer/resources/cart/types/CreatePaymentIntentCartResponse.d.mts +1 -0
  139. package/dist/esm/api/resources/customer/resources/cart/types/ListShippingOptionsCartResponse.d.mts +18 -0
  140. package/dist/esm/api/resources/customer/resources/cart/types/ListShippingOptionsCartResponse.mjs +2 -0
  141. package/dist/esm/api/resources/customer/resources/cart/types/RefreshPaymentIntentCartResponse.d.mts +18 -0
  142. package/dist/esm/api/resources/customer/resources/cart/types/RefreshPaymentIntentCartResponse.mjs +7 -0
  143. package/dist/esm/api/resources/customer/resources/cart/types/SetFulfillmentCartResponse.d.mts +4 -0
  144. package/dist/esm/api/resources/customer/resources/cart/types/SetFulfillmentCartResponse.mjs +2 -0
  145. package/dist/esm/api/resources/customer/resources/cart/types/SetShippingAddressCartResponse.d.mts +4 -0
  146. package/dist/esm/api/resources/customer/resources/cart/types/SetShippingAddressCartResponse.mjs +2 -0
  147. package/dist/esm/api/resources/customer/resources/cart/types/index.d.mts +4 -1
  148. package/dist/esm/api/resources/customer/resources/cart/types/index.mjs +4 -1
  149. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.d.mts +2 -0
  150. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/Client.mjs +6 -0
  151. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/client/requests/CreatePaymentIntentRequest.d.mts +1 -0
  152. package/dist/esm/api/resources/customer/resources/events/resources/ticketing/types/CreatePaymentIntentTicketingResponse.d.mts +7 -0
  153. package/dist/esm/api/resources/customer/resources/productOrders/client/Client.d.mts +1 -0
  154. package/dist/esm/api/resources/customer/resources/productOrders/client/Client.mjs +3 -0
  155. package/dist/esm/api/resources/customer/resources/productOrders/client/requests/GetProductOrdersRequest.d.mts +1 -0
  156. package/dist/esm/api/resources/customer/resources/stands/client/Client.d.mts +1 -0
  157. package/dist/esm/api/resources/customer/resources/stands/client/Client.mjs +3 -0
  158. package/dist/esm/api/types/AppHttpResourcesApiV1BusinessCommerceProductResource.d.mts +10 -0
  159. package/dist/esm/api/types/BusinessEvent.d.mts +7 -0
  160. package/dist/esm/api/types/BusinessEventTicketType.d.mts +2 -0
  161. package/dist/esm/api/types/BusinessProfile.d.mts +1 -1
  162. package/dist/esm/api/types/CartResource.d.mts +24 -0
  163. package/dist/esm/api/types/ConflictErrorBody.d.mts +7 -1
  164. package/dist/esm/api/types/ConflictErrorBody.mjs +4 -1
  165. package/dist/esm/api/types/CustomerBusinessProfile.d.mts +1 -1
  166. package/dist/esm/api/types/FulfillmentType.d.mts +6 -0
  167. package/dist/esm/api/types/FulfillmentType.mjs +6 -0
  168. package/dist/esm/api/types/ProductResource.d.mts +5 -0
  169. package/dist/esm/api/types/TaxCode.d.mts +21 -0
  170. package/dist/esm/api/types/TaxCode.mjs +12 -0
  171. package/dist/esm/api/types/index.d.mts +2 -0
  172. package/dist/esm/api/types/index.mjs +2 -0
  173. package/dist/esm/version.d.mts +1 -1
  174. package/dist/esm/version.mjs +1 -1
  175. package/package.json +12 -1
  176. package/reference.md +377 -16
  177. package/dist/cjs/api/resources/business/resources/productOrders/client/requests/RefundProductOrdersRequest.d.ts +0 -11
  178. package/dist/cjs/api/resources/customer/resources/cart/client/requests/SelectShippingOptionCartRequest.d.ts +0 -14
  179. package/dist/cjs/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponse.d.ts +0 -14
  180. package/dist/esm/api/resources/business/resources/productOrders/client/requests/RefundProductOrdersRequest.d.mts +0 -11
  181. package/dist/esm/api/resources/customer/resources/cart/client/requests/SelectShippingOptionCartRequest.d.mts +0 -14
  182. package/dist/esm/api/resources/customer/resources/cart/types/GetShippingOptionsCartResponse.d.mts +0 -14
  183. /package/dist/cjs/api/resources/business/resources/productOrders/client/requests/{RefundProductOrdersRequest.js → RefundOrderRequest.js} +0 -0
  184. /package/dist/cjs/api/resources/{customer/resources/cart/client/requests/GetShippingOptionsCartRequest.js → business/resources/taxCodes/types/ListTaxCodesResponse.js} +0 -0
  185. /package/dist/cjs/api/resources/customer/resources/cart/client/requests/{SelectShippingOptionCartRequest.js → ChooseFulfillmentMethodRequest.js} +0 -0
  186. /package/dist/cjs/api/resources/customer/resources/cart/{types/GetShippingOptionsCartResponse.js → client/requests/ListShippingOptionsCartRequest.js} +0 -0
  187. /package/dist/esm/api/resources/business/resources/productOrders/client/requests/{RefundProductOrdersRequest.mjs → RefundOrderRequest.mjs} +0 -0
  188. /package/dist/esm/api/resources/{customer/resources/cart/client/requests/GetShippingOptionsCartRequest.mjs → business/resources/taxCodes/types/ListTaxCodesResponse.mjs} +0 -0
  189. /package/dist/esm/api/resources/customer/resources/cart/client/requests/{SelectShippingOptionCartRequest.mjs → ChooseFulfillmentMethodRequest.mjs} +0 -0
  190. /package/dist/esm/api/resources/customer/resources/cart/{types/GetShippingOptionsCartResponse.mjs → client/requests/ListShippingOptionsCartRequest.mjs} +0 -0
@@ -357,11 +357,21 @@ class CartClient {
357
357
  });
358
358
  }
359
359
  /**
360
+ * Refused with a 422 and a message while the order can't be priced yet: no
361
+ * fulfillment method chosen (when the shop offers several), a shipped order
362
+ * with no shipping address, or calculated shipping with no option chosen.
363
+ * The message is also in the cart's `fulfillment.checkout_blocker`.
364
+ *
365
+ * A 409 `{status: "paid", message, payment_intent_id}` means the cart's
366
+ * payment already went through (never a second payment): finish checkout
367
+ * with that id. A 409 with only a message means it is still processing.
368
+ *
360
369
  * @param {FiveOneEat.customer.CreatePaymentIntentCartRequest} request
361
370
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
362
371
  *
363
372
  * @throws {@link FiveOneEat.UnauthorizedError}
364
373
  * @throws {@link FiveOneEat.NotFoundError}
374
+ * @throws {@link FiveOneEat.ConflictError}
365
375
  * @throws {@link FiveOneEat.UnprocessableEntityError}
366
376
  *
367
377
  * @example
@@ -401,6 +411,8 @@ class CartClient {
401
411
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
402
412
  case 404:
403
413
  throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
414
+ case 409:
415
+ throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
404
416
  case 422:
405
417
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
406
418
  default:
@@ -415,11 +427,99 @@ class CartClient {
415
427
  });
416
428
  }
417
429
  /**
430
+ * Call immediately before presenting or confirming the payment sheet. The
431
+ * cart may have changed since its payment intent was created (another
432
+ * device, a changed address or shipping option), so it is re-priced and
433
+ * the intent brought up to date. Send `amount`, the total in cents the
434
+ * buyer is looking at.
435
+ *
436
+ * - `total_changed: false` — pay with the returned `client_secret`.
437
+ * - `total_changed: true` — show "Your total changed to $X", re-initialise
438
+ * the payment sheet with the returned `client_secret` (it carries the new
439
+ * amount), and let the buyer confirm again.
440
+ * - 422 with a message — the order can't be priced yet (the same message
441
+ * as `fulfillment.checkout_blocker`); the old intent is cancelled.
442
+ * - 409 `status: paid` with `payment_intent_id` — the payment already went
443
+ * through; call checkout with that id instead.
444
+ * - 409 `status: processing` — the payment is still processing; don't pay
445
+ * again, check back later.
446
+ *
447
+ * @param {FiveOneEat.customer.RefreshCartPaymentRequest} request
448
+ * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
449
+ *
450
+ * @throws {@link FiveOneEat.UnauthorizedError}
451
+ * @throws {@link FiveOneEat.NotFoundError}
452
+ * @throws {@link FiveOneEat.ConflictError}
453
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
454
+ *
455
+ * @example
456
+ * await client.customer.cart.refreshPaymentIntent({
457
+ * business: "business",
458
+ * amount: 1
459
+ * })
460
+ */
461
+ refreshPaymentIntent(request, requestOptions) {
462
+ return core.HttpResponsePromise.fromPromise(this.__refreshPaymentIntent(request, requestOptions));
463
+ }
464
+ __refreshPaymentIntent(request, requestOptions) {
465
+ return __awaiter(this, void 0, void 0, function* () {
466
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
467
+ const { business } = request, _body = __rest(request, ["business"]);
468
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
469
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
470
+ const _response = yield core.fetcher({
471
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/cart/payment-intent/refresh`),
472
+ method: "POST",
473
+ headers: _headers,
474
+ contentType: "application/json",
475
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
476
+ requestType: "json",
477
+ body: _body,
478
+ 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,
479
+ 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,
480
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
481
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
482
+ logging: this._options.logging,
483
+ });
484
+ if (_response.ok) {
485
+ return {
486
+ data: _response.body,
487
+ rawResponse: _response.rawResponse,
488
+ };
489
+ }
490
+ if (_response.error.reason === "status-code") {
491
+ switch (_response.error.statusCode) {
492
+ case 401:
493
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
494
+ case 404:
495
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
496
+ case 409:
497
+ throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
498
+ case 422:
499
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
500
+ default:
501
+ throw new errors.FiveOneEatError({
502
+ statusCode: _response.error.statusCode,
503
+ body: _response.error.body,
504
+ rawResponse: _response.rawResponse,
505
+ });
506
+ }
507
+ }
508
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/businesses/{business}/cart/payment-intent/refresh");
509
+ });
510
+ }
511
+ /**
512
+ * Not gated on commerce readiness: the customer has already paid, so a
513
+ * lapsed readiness check must not stop the order from being recorded.
514
+ * A 409 means the cart changed after the payment was priced: the payment
515
+ * was refunded in full and no order was placed — re-check and pay again.
516
+ *
418
517
  * @param {FiveOneEat.customer.CheckoutCartRequest} request
419
518
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
420
519
  *
421
520
  * @throws {@link FiveOneEat.UnauthorizedError}
422
521
  * @throws {@link FiveOneEat.NotFoundError}
522
+ * @throws {@link FiveOneEat.ConflictError}
423
523
  * @throws {@link FiveOneEat.UnprocessableEntityError}
424
524
  *
425
525
  * @example
@@ -465,6 +565,8 @@ class CartClient {
465
565
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
466
566
  case 404:
467
567
  throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
568
+ case 409:
569
+ throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
468
570
  case 422:
469
571
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
470
572
  default:
@@ -479,7 +581,74 @@ class CartClient {
479
581
  });
480
582
  }
481
583
  /**
482
- * @param {FiveOneEat.customer.GetShippingOptionsCartRequest} request
584
+ * Switching away from shipping clears the saved shipping address and option.
585
+ *
586
+ * @param {FiveOneEat.customer.ChooseFulfillmentMethodRequest} request
587
+ * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
588
+ *
589
+ * @throws {@link FiveOneEat.UnauthorizedError}
590
+ * @throws {@link FiveOneEat.NotFoundError}
591
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
592
+ *
593
+ * @example
594
+ * await client.customer.cart.setFulfillment({
595
+ * business: "business",
596
+ * fulfillment_method: "ship"
597
+ * })
598
+ */
599
+ setFulfillment(request, requestOptions) {
600
+ return core.HttpResponsePromise.fromPromise(this.__setFulfillment(request, requestOptions));
601
+ }
602
+ __setFulfillment(request, requestOptions) {
603
+ return __awaiter(this, void 0, void 0, function* () {
604
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
605
+ const { business } = request, _body = __rest(request, ["business"]);
606
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
607
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
608
+ const _response = yield core.fetcher({
609
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/cart/fulfillment`),
610
+ method: "PUT",
611
+ headers: _headers,
612
+ contentType: "application/json",
613
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
614
+ requestType: "json",
615
+ body: _body,
616
+ 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,
617
+ 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,
618
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
619
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
620
+ logging: this._options.logging,
621
+ });
622
+ if (_response.ok) {
623
+ return {
624
+ data: _response.body,
625
+ rawResponse: _response.rawResponse,
626
+ };
627
+ }
628
+ if (_response.error.reason === "status-code") {
629
+ switch (_response.error.statusCode) {
630
+ case 401:
631
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
632
+ case 404:
633
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
634
+ case 422:
635
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
636
+ default:
637
+ throw new errors.FiveOneEatError({
638
+ statusCode: _response.error.statusCode,
639
+ body: _response.error.body,
640
+ rawResponse: _response.rawResponse,
641
+ });
642
+ }
643
+ }
644
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/customer/businesses/{business}/cart/fulfillment");
645
+ });
646
+ }
647
+ /**
648
+ * Sales tax on a shipped order is worked out from this address. Saving a
649
+ * different address clears the chosen shipping option.
650
+ *
651
+ * @param {FiveOneEat.customer.ShippingAddressRequest} request
483
652
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
484
653
  *
485
654
  * @throws {@link FiveOneEat.UnauthorizedError}
@@ -487,7 +656,7 @@ class CartClient {
487
656
  * @throws {@link FiveOneEat.UnprocessableEntityError}
488
657
  *
489
658
  * @example
490
- * await client.customer.cart.getShippingOptions({
659
+ * await client.customer.cart.setShippingAddress({
491
660
  * business: "business",
492
661
  * address: {
493
662
  * line1: "line1",
@@ -497,18 +666,18 @@ class CartClient {
497
666
  * }
498
667
  * })
499
668
  */
500
- getShippingOptions(request, requestOptions) {
501
- return core.HttpResponsePromise.fromPromise(this.__getShippingOptions(request, requestOptions));
669
+ setShippingAddress(request, requestOptions) {
670
+ return core.HttpResponsePromise.fromPromise(this.__setShippingAddress(request, requestOptions));
502
671
  }
503
- __getShippingOptions(request, requestOptions) {
672
+ __setShippingAddress(request, requestOptions) {
504
673
  return __awaiter(this, void 0, void 0, function* () {
505
674
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
506
675
  const { business } = request, _body = __rest(request, ["business"]);
507
676
  const _authRequest = yield this._options.authProvider.getAuthRequest();
508
677
  const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
509
678
  const _response = yield core.fetcher({
510
- url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/cart/shipping-options`),
511
- method: "POST",
679
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/cart/shipping-address`),
680
+ method: "PUT",
512
681
  headers: _headers,
513
682
  contentType: "application/json",
514
683
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -542,11 +711,74 @@ class CartClient {
542
711
  });
543
712
  }
544
713
  }
545
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/customer/businesses/{business}/cart/shipping-options");
714
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/customer/businesses/{business}/cart/shipping-address");
715
+ });
716
+ }
717
+ /**
718
+ * Options are held for 30 minutes; choose one by its `provider_rate_id`.
719
+ *
720
+ * @param {FiveOneEat.customer.ListShippingOptionsCartRequest} request
721
+ * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
722
+ *
723
+ * @throws {@link FiveOneEat.UnauthorizedError}
724
+ * @throws {@link FiveOneEat.NotFoundError}
725
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
726
+ *
727
+ * @example
728
+ * await client.customer.cart.listShippingOptions({
729
+ * business: "business"
730
+ * })
731
+ */
732
+ listShippingOptions(request, requestOptions) {
733
+ return core.HttpResponsePromise.fromPromise(this.__listShippingOptions(request, requestOptions));
734
+ }
735
+ __listShippingOptions(request, requestOptions) {
736
+ return __awaiter(this, void 0, void 0, function* () {
737
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
738
+ const { business } = request;
739
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
740
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
741
+ const _response = yield core.fetcher({
742
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FiveOneEatEnvironment.Production, `customer/businesses/${core.url.encodePathParam(business)}/cart/shipping-options`),
743
+ method: "GET",
744
+ headers: _headers,
745
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
746
+ 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,
747
+ 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,
748
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
749
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
750
+ logging: this._options.logging,
751
+ });
752
+ if (_response.ok) {
753
+ return {
754
+ data: _response.body,
755
+ rawResponse: _response.rawResponse,
756
+ };
757
+ }
758
+ if (_response.error.reason === "status-code") {
759
+ switch (_response.error.statusCode) {
760
+ case 401:
761
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
762
+ case 404:
763
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
764
+ case 422:
765
+ throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
766
+ default:
767
+ throw new errors.FiveOneEatError({
768
+ statusCode: _response.error.statusCode,
769
+ body: _response.error.body,
770
+ rawResponse: _response.rawResponse,
771
+ });
772
+ }
773
+ }
774
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/customer/businesses/{business}/cart/shipping-options");
546
775
  });
547
776
  }
548
777
  /**
549
- * @param {FiveOneEat.customer.SelectShippingOptionCartRequest} request
778
+ * Send only the `provider_rate_id` from the shipping options. The price is
779
+ * the one quoted; an option older than 30 minutes is refused with a 422.
780
+ *
781
+ * @param {FiveOneEat.customer.SelectShippingRateRequest} request
550
782
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
551
783
  *
552
784
  * @throws {@link FiveOneEat.UnauthorizedError}
@@ -556,8 +788,7 @@ class CartClient {
556
788
  * @example
557
789
  * await client.customer.cart.selectShippingOption({
558
790
  * business: "business",
559
- * provider_rate_id: "provider_rate_id",
560
- * amount_cents: 1
791
+ * provider_rate_id: "provider_rate_id"
561
792
  * })
562
793
  */
563
794
  selectShippingOption(request, requestOptions) {
@@ -7,7 +7,7 @@
7
7
  * }
8
8
  */
9
9
  export interface AddItemCartRequest {
10
- /** The business ID */
10
+ /** The business handle */
11
11
  business: string;
12
12
  variant_id: string;
13
13
  quantity: number;
@@ -9,7 +9,7 @@ import type * as FiveOneEat from "../../../../../../index.js";
9
9
  * }
10
10
  */
11
11
  export interface CheckoutCartRequest {
12
- /** The business ID */
12
+ /** The business handle */
13
13
  business: string;
14
14
  body: FiveOneEat.CheckoutRequest;
15
15
  }
@@ -0,0 +1,13 @@
1
+ import type * as FiveOneEat from "../../../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * business: "business",
6
+ * fulfillment_method: "ship"
7
+ * }
8
+ */
9
+ export interface ChooseFulfillmentMethodRequest {
10
+ /** The business handle */
11
+ business: string;
12
+ fulfillment_method: FiveOneEat.FulfillmentType;
13
+ }
@@ -5,6 +5,6 @@
5
5
  * }
6
6
  */
7
7
  export interface ClearCartRequest {
8
- /** The business ID */
8
+ /** The business handle */
9
9
  business: string;
10
10
  }
@@ -5,6 +5,6 @@
5
5
  * }
6
6
  */
7
7
  export interface CreatePaymentIntentCartRequest {
8
- /** The business ID */
8
+ /** The business handle */
9
9
  business: string;
10
10
  }
@@ -5,6 +5,6 @@
5
5
  * }
6
6
  */
7
7
  export interface GetCartRequest {
8
- /** The business ID */
8
+ /** The business handle */
9
9
  business: string;
10
10
  }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * business: "business"
5
+ * }
6
+ */
7
+ export interface ListShippingOptionsCartRequest {
8
+ /** The business handle */
9
+ business: string;
10
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * business: "business",
5
+ * amount: 1
6
+ * }
7
+ */
8
+ export interface RefreshCartPaymentRequest {
9
+ /** The business handle */
10
+ business: string;
11
+ amount: number;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * business: "business",
5
+ * provider_rate_id: "provider_rate_id"
6
+ * }
7
+ */
8
+ export interface SelectShippingRateRequest {
9
+ /** The business handle */
10
+ business: string;
11
+ provider_rate_id: string;
12
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -10,17 +10,18 @@
10
10
  * }
11
11
  * }
12
12
  */
13
- export interface GetShippingOptionsCartRequest {
14
- /** The business ID */
13
+ export interface ShippingAddressRequest {
14
+ /** The business handle */
15
15
  business: string;
16
- address: GetShippingOptionsCartRequest.Address;
16
+ address: ShippingAddressRequest.Address;
17
17
  }
18
- export declare namespace GetShippingOptionsCartRequest {
18
+ export declare namespace ShippingAddressRequest {
19
19
  interface Address {
20
20
  line1: string;
21
+ line2?: (string | null) | undefined;
21
22
  city: string;
22
23
  state: string;
23
24
  postal_code: string;
24
- country?: (string | null) | undefined;
25
+ country?: string | undefined;
25
26
  }
26
27
  }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,9 +1,12 @@
1
1
  export type { AddItemCartRequest } from "./AddItemCartRequest.js";
2
2
  export type { CheckoutCartRequest } from "./CheckoutCartRequest.js";
3
+ export type { ChooseFulfillmentMethodRequest } from "./ChooseFulfillmentMethodRequest.js";
3
4
  export type { ClearCartRequest } from "./ClearCartRequest.js";
4
5
  export type { CreatePaymentIntentCartRequest } from "./CreatePaymentIntentCartRequest.js";
5
6
  export type { GetCartRequest } from "./GetCartRequest.js";
6
- export type { GetShippingOptionsCartRequest } from "./GetShippingOptionsCartRequest.js";
7
+ export type { ListShippingOptionsCartRequest } from "./ListShippingOptionsCartRequest.js";
8
+ export type { RefreshCartPaymentRequest } from "./RefreshCartPaymentRequest.js";
7
9
  export type { RemoveItemCartRequest } from "./RemoveItemCartRequest.js";
8
- export type { SelectShippingOptionCartRequest } from "./SelectShippingOptionCartRequest.js";
10
+ export type { SelectShippingRateRequest } from "./SelectShippingRateRequest.js";
11
+ export type { ShippingAddressRequest } from "./ShippingAddressRequest.js";
9
12
  export type { UpdateItemCartRequest } from "./UpdateItemCartRequest.js";
@@ -3,6 +3,7 @@ export interface CreatePaymentIntentCartResponse {
3
3
  payment_intent_id: string;
4
4
  subtotal: number;
5
5
  tax_amount: number;
6
+ shipping_amount: number;
6
7
  platform_fee: number;
7
8
  total_amount: number;
8
9
  amount: number;
@@ -0,0 +1,18 @@
1
+ export interface ListShippingOptionsCartResponse {
2
+ options: ListShippingOptionsCartResponse.Options.Item[];
3
+ }
4
+ export declare namespace ListShippingOptionsCartResponse {
5
+ type Options = Options.Item[];
6
+ namespace Options {
7
+ interface Item {
8
+ provider_rate_id: string;
9
+ carrier: string;
10
+ service: string;
11
+ amount: number;
12
+ amount_cents: number;
13
+ currency: string;
14
+ carrier_delivery_days: number | null;
15
+ estimated_delivery_date: string | null;
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,18 @@
1
+ export interface RefreshPaymentIntentCartResponse {
2
+ total_changed: boolean;
3
+ client_secret: string;
4
+ payment_intent_id: string;
5
+ subtotal: number;
6
+ tax_amount: number;
7
+ shipping_amount: number;
8
+ platform_fee: number;
9
+ total_amount: number;
10
+ amount: number;
11
+ currency: RefreshPaymentIntentCartResponse.Currency;
12
+ }
13
+ export declare namespace RefreshPaymentIntentCartResponse {
14
+ const Currency: {
15
+ readonly Usd: "usd";
16
+ };
17
+ type Currency = (typeof Currency)[keyof typeof Currency];
18
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.RefreshPaymentIntentCartResponse = void 0;
5
+ var RefreshPaymentIntentCartResponse;
6
+ (function (RefreshPaymentIntentCartResponse) {
7
+ RefreshPaymentIntentCartResponse.Currency = {
8
+ Usd: "usd",
9
+ };
10
+ })(RefreshPaymentIntentCartResponse || (exports.RefreshPaymentIntentCartResponse = RefreshPaymentIntentCartResponse = {}));
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../../../index.js";
2
+ export interface SetFulfillmentCartResponse {
3
+ data: FiveOneEat.CartResource;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../../../index.js";
2
+ export interface SetShippingAddressCartResponse {
3
+ data: FiveOneEat.CartResource;
4
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,7 +2,10 @@ export * from "./AddItemCartResponse.js";
2
2
  export * from "./CheckoutCartResponse.js";
3
3
  export * from "./CreatePaymentIntentCartResponse.js";
4
4
  export * from "./GetCartResponse.js";
5
- export * from "./GetShippingOptionsCartResponse.js";
5
+ export * from "./ListShippingOptionsCartResponse.js";
6
+ export * from "./RefreshPaymentIntentCartResponse.js";
6
7
  export * from "./RemoveItemCartResponse.js";
7
8
  export * from "./SelectShippingOptionCartResponse.js";
9
+ export * from "./SetFulfillmentCartResponse.js";
10
+ export * from "./SetShippingAddressCartResponse.js";
8
11
  export * from "./UpdateItemCartResponse.js";
@@ -18,7 +18,10 @@ __exportStar(require("./AddItemCartResponse.js"), exports);
18
18
  __exportStar(require("./CheckoutCartResponse.js"), exports);
19
19
  __exportStar(require("./CreatePaymentIntentCartResponse.js"), exports);
20
20
  __exportStar(require("./GetCartResponse.js"), exports);
21
- __exportStar(require("./GetShippingOptionsCartResponse.js"), exports);
21
+ __exportStar(require("./ListShippingOptionsCartResponse.js"), exports);
22
+ __exportStar(require("./RefreshPaymentIntentCartResponse.js"), exports);
22
23
  __exportStar(require("./RemoveItemCartResponse.js"), exports);
23
24
  __exportStar(require("./SelectShippingOptionCartResponse.js"), exports);
25
+ __exportStar(require("./SetFulfillmentCartResponse.js"), exports);
26
+ __exportStar(require("./SetShippingAddressCartResponse.js"), exports);
24
27
  __exportStar(require("./UpdateItemCartResponse.js"), exports);
@@ -76,6 +76,8 @@ export declare class TicketingClient {
76
76
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
77
77
  *
78
78
  * @throws {@link FiveOneEat.UnauthorizedError}
79
+ * @throws {@link FiveOneEat.ForbiddenError}
80
+ * @throws {@link FiveOneEat.ConflictError}
79
81
  * @throws {@link FiveOneEat.UnprocessableEntityError}
80
82
  *
81
83
  * @example
@@ -260,6 +260,8 @@ class TicketingClient {
260
260
  * @param {TicketingClient.RequestOptions} requestOptions - Request-specific configuration.
261
261
  *
262
262
  * @throws {@link FiveOneEat.UnauthorizedError}
263
+ * @throws {@link FiveOneEat.ForbiddenError}
264
+ * @throws {@link FiveOneEat.ConflictError}
263
265
  * @throws {@link FiveOneEat.UnprocessableEntityError}
264
266
  *
265
267
  * @example
@@ -307,6 +309,10 @@ class TicketingClient {
307
309
  switch (_response.error.statusCode) {
308
310
  case 401:
309
311
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
312
+ case 403:
313
+ throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
314
+ case 409:
315
+ throw new FiveOneEat.ConflictError(_response.error.body, _response.rawResponse);
310
316
  case 422:
311
317
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
312
318
  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;