@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
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@51eat/sdk",
46
- "X-Fern-SDK-Version": "0.0.76",
47
- "User-Agent": "@51eat/sdk/0.0.76",
46
+ "X-Fern-SDK-Version": "0.0.77",
47
+ "User-Agent": "@51eat/sdk/0.0.77",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, 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.js";
23
23
  import { StandsClient } from "../resources/stands/client/Client.js";
24
24
  import { StripeConnectClient } from "../resources/stripeConnect/client/Client.js";
25
+ import { TaxCodesClient } from "../resources/taxCodes/client/Client.js";
25
26
  import { TemporaryLocationsClient } from "../resources/temporaryLocations/client/Client.js";
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;
@@ -25,7 +25,8 @@ const Client_js_19 = require("../resources/pushNotifications/client/Client.js");
25
25
  const Client_js_20 = require("../resources/shipping/client/Client.js");
26
26
  const Client_js_21 = require("../resources/stands/client/Client.js");
27
27
  const Client_js_22 = require("../resources/stripeConnect/client/Client.js");
28
- const Client_js_23 = require("../resources/temporaryLocations/client/Client.js");
28
+ const Client_js_23 = require("../resources/taxCodes/client/Client.js");
29
+ const Client_js_24 = require("../resources/temporaryLocations/client/Client.js");
29
30
  class BusinessClient {
30
31
  constructor(options = {}) {
31
32
  this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
@@ -58,6 +59,10 @@ class BusinessClient {
58
59
  var _a;
59
60
  return ((_a = this._products) !== null && _a !== void 0 ? _a : (this._products = new Client_js_17.ProductsClient(this._options)));
60
61
  }
62
+ get taxCodes() {
63
+ var _a;
64
+ return ((_a = this._taxCodes) !== null && _a !== void 0 ? _a : (this._taxCodes = new Client_js_23.TaxCodesClient(this._options)));
65
+ }
61
66
  get events() {
62
67
  var _a;
63
68
  return ((_a = this._events) !== null && _a !== void 0 ? _a : (this._events = new Client_js_9.EventsClient(this._options)));
@@ -112,7 +117,7 @@ class BusinessClient {
112
117
  }
113
118
  get temporaryLocations() {
114
119
  var _a;
115
- return ((_a = this._temporaryLocations) !== null && _a !== void 0 ? _a : (this._temporaryLocations = new Client_js_23.TemporaryLocationsClient(this._options)));
120
+ return ((_a = this._temporaryLocations) !== null && _a !== void 0 ? _a : (this._temporaryLocations = new Client_js_24.TemporaryLocationsClient(this._options)));
116
121
  }
117
122
  get productCategories() {
118
123
  var _a;
@@ -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.js";
56
56
  export * from "./stripeConnect/client/requests/index.js";
57
57
  export * as stripeConnect from "./stripeConnect/index.js";
58
58
  export * from "./stripeConnect/types/index.js";
59
+ export * as taxCodes from "./taxCodes/index.js";
60
+ export * from "./taxCodes/types/index.js";
59
61
  export * from "./temporaryLocations/client/requests/index.js";
60
62
  export * as temporaryLocations from "./temporaryLocations/index.js";
61
63
  export * from "./temporaryLocations/types/index.js";
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.temporaryLocations = exports.stripeConnect = exports.stands = exports.shipping = exports.pushNotifications = exports.profile = exports.products = exports.productOrders = exports.productCategories = exports.priceLists = exports.messaging = exports.menus = exports.hours = exports.gallery = exports.events = exports.cuisines = exports.claims = exports.certifications = exports.categories = exports.businesses = exports.bulletins = exports.auth = exports.allergens = void 0;
39
+ exports.temporaryLocations = exports.taxCodes = exports.stripeConnect = exports.stands = exports.shipping = exports.pushNotifications = exports.profile = exports.products = exports.productOrders = exports.productCategories = exports.priceLists = exports.messaging = exports.menus = exports.hours = exports.gallery = exports.events = exports.cuisines = exports.claims = exports.certifications = exports.categories = exports.businesses = exports.bulletins = exports.auth = exports.allergens = void 0;
40
40
  exports.allergens = __importStar(require("./allergens/index.js"));
41
41
  __exportStar(require("./allergens/types/index.js"), exports);
42
42
  __exportStar(require("./auth/client/requests/index.js"), exports);
@@ -95,6 +95,8 @@ __exportStar(require("./stands/types/index.js"), exports);
95
95
  __exportStar(require("./stripeConnect/client/requests/index.js"), exports);
96
96
  exports.stripeConnect = __importStar(require("./stripeConnect/index.js"));
97
97
  __exportStar(require("./stripeConnect/types/index.js"), exports);
98
+ exports.taxCodes = __importStar(require("./taxCodes/index.js"));
99
+ __exportStar(require("./taxCodes/types/index.js"), exports);
98
100
  __exportStar(require("./temporaryLocations/client/requests/index.js"), exports);
99
101
  exports.temporaryLocations = __importStar(require("./temporaryLocations/index.js"));
100
102
  __exportStar(require("./temporaryLocations/types/index.js"), exports);
@@ -27,10 +27,11 @@ export declare class ProductOrdersClient {
27
27
  *
28
28
  * @throws {@link FiveOneEat.UnauthorizedError}
29
29
  * @throws {@link FiveOneEat.ForbiddenError}
30
+ * @throws {@link FiveOneEat.NotFoundError}
30
31
  *
31
32
  * @example
32
33
  * await client.business.productOrders.get({
33
- * productOrder: "productOrder"
34
+ * order: "order"
34
35
  * })
35
36
  */
36
37
  get(request: FiveOneEat.business.GetProductOrdersRequest, requestOptions?: ProductOrdersClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.GetProductOrdersResponse>;
@@ -41,10 +42,11 @@ export declare class ProductOrdersClient {
41
42
  *
42
43
  * @throws {@link FiveOneEat.UnauthorizedError}
43
44
  * @throws {@link FiveOneEat.ForbiddenError}
45
+ * @throws {@link FiveOneEat.NotFoundError}
44
46
  *
45
47
  * @example
46
48
  * await client.business.productOrders.fulfill({
47
- * productOrder: "productOrder"
49
+ * order: "order"
48
50
  * })
49
51
  */
50
52
  fulfill(request: FiveOneEat.business.FulfillProductOrdersRequest, requestOptions?: ProductOrdersClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.FulfillProductOrdersResponse>;
@@ -55,10 +57,11 @@ export declare class ProductOrdersClient {
55
57
  *
56
58
  * @throws {@link FiveOneEat.UnauthorizedError}
57
59
  * @throws {@link FiveOneEat.ForbiddenError}
60
+ * @throws {@link FiveOneEat.NotFoundError}
58
61
  *
59
62
  * @example
60
63
  * await client.business.productOrders.markPickedUp({
61
- * productOrder: "productOrder"
64
+ * order: "order"
62
65
  * })
63
66
  */
64
67
  markPickedUp(request: FiveOneEat.business.MarkPickedUpProductOrdersRequest, requestOptions?: ProductOrdersClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.MarkPickedUpProductOrdersResponse>;
@@ -69,11 +72,12 @@ export declare class ProductOrdersClient {
69
72
  *
70
73
  * @throws {@link FiveOneEat.UnauthorizedError}
71
74
  * @throws {@link FiveOneEat.ForbiddenError}
75
+ * @throws {@link FiveOneEat.NotFoundError}
72
76
  * @throws {@link FiveOneEat.UnprocessableEntityError}
73
77
  *
74
78
  * @example
75
79
  * await client.business.productOrders.addTracking({
76
- * productOrder: "productOrder",
80
+ * order: "order",
77
81
  * carrier: "carrier",
78
82
  * tracking_number: "tracking_number"
79
83
  * })
@@ -81,19 +85,30 @@ export declare class ProductOrdersClient {
81
85
  addTracking(request: FiveOneEat.business.AddTrackingProductOrdersRequest, requestOptions?: ProductOrdersClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.AddTrackingProductOrdersResponse>;
82
86
  private __addTracking;
83
87
  /**
84
- * @param {FiveOneEat.business.RefundProductOrdersRequest} request
88
+ * Refunds `amount` (dollars) of the order, or everything still refundable
89
+ * when `amount` is omitted, through Stripe. Sales tax on the refunded part
90
+ * is reversed automatically.
91
+ *
92
+ * Send an `Idempotency-Key` header (1–255 characters, unique per refund you
93
+ * mean to make) to make retries safe: a repeat with the same key returns
94
+ * the order with the refund already made, with 200, instead of refunding
95
+ * again — even when nothing is left to refund. Without it, a retry after a
96
+ * lost response may refund twice.
97
+ *
98
+ * @param {FiveOneEat.business.RefundOrderRequest} request
85
99
  * @param {ProductOrdersClient.RequestOptions} requestOptions - Request-specific configuration.
86
100
  *
87
101
  * @throws {@link FiveOneEat.UnauthorizedError}
88
102
  * @throws {@link FiveOneEat.ForbiddenError}
103
+ * @throws {@link FiveOneEat.NotFoundError}
89
104
  * @throws {@link FiveOneEat.UnprocessableEntityError}
90
105
  *
91
106
  * @example
92
107
  * await client.business.productOrders.refund({
93
- * productOrder: "productOrder"
108
+ * order: "order"
94
109
  * })
95
110
  */
96
- refund(request: FiveOneEat.business.RefundProductOrdersRequest, requestOptions?: ProductOrdersClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.RefundProductOrdersResponse>;
111
+ refund(request: FiveOneEat.business.RefundOrderRequest, requestOptions?: ProductOrdersClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.RefundProductOrdersResponse>;
97
112
  private __refund;
98
113
  /**
99
114
  * @param {FiveOneEat.business.GetLabelRatesProductOrdersRequest} request
@@ -101,11 +116,12 @@ export declare class ProductOrdersClient {
101
116
  *
102
117
  * @throws {@link FiveOneEat.UnauthorizedError}
103
118
  * @throws {@link FiveOneEat.ForbiddenError}
119
+ * @throws {@link FiveOneEat.NotFoundError}
104
120
  * @throws {@link FiveOneEat.UnprocessableEntityError}
105
121
  *
106
122
  * @example
107
123
  * await client.business.productOrders.getLabelRates({
108
- * productOrder: "productOrder"
124
+ * order: "order"
109
125
  * })
110
126
  */
111
127
  getLabelRates(request: FiveOneEat.business.GetLabelRatesProductOrdersRequest, requestOptions?: ProductOrdersClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.GetLabelRatesProductOrdersResponseItem[]>;
@@ -116,11 +132,12 @@ export declare class ProductOrdersClient {
116
132
  *
117
133
  * @throws {@link FiveOneEat.UnauthorizedError}
118
134
  * @throws {@link FiveOneEat.ForbiddenError}
135
+ * @throws {@link FiveOneEat.NotFoundError}
119
136
  * @throws {@link FiveOneEat.UnprocessableEntityError}
120
137
  *
121
138
  * @example
122
139
  * await client.business.productOrders.purchaseLabel({
123
- * productOrder: "productOrder",
140
+ * order: "order",
124
141
  * provider_rate_id: "provider_rate_id"
125
142
  * })
126
143
  */
@@ -131,10 +131,11 @@ class ProductOrdersClient {
131
131
  *
132
132
  * @throws {@link FiveOneEat.UnauthorizedError}
133
133
  * @throws {@link FiveOneEat.ForbiddenError}
134
+ * @throws {@link FiveOneEat.NotFoundError}
134
135
  *
135
136
  * @example
136
137
  * await client.business.productOrders.get({
137
- * productOrder: "productOrder"
138
+ * order: "order"
138
139
  * })
139
140
  */
140
141
  get(request, requestOptions) {
@@ -143,11 +144,11 @@ class ProductOrdersClient {
143
144
  __get(request, requestOptions) {
144
145
  return __awaiter(this, void 0, void 0, function* () {
145
146
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
146
- const { productOrder } = request;
147
+ const { order } = request;
147
148
  const _authRequest = yield this._options.authProvider.getAuthRequest();
148
149
  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);
149
150
  const _response = yield core.fetcher({
150
- 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, `business/product-orders/${core.url.encodePathParam(productOrder)}`),
151
+ 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, `business/product-orders/${core.url.encodePathParam(order)}`),
151
152
  method: "GET",
152
153
  headers: _headers,
153
154
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -169,6 +170,8 @@ class ProductOrdersClient {
169
170
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
170
171
  case 403:
171
172
  throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
173
+ case 404:
174
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
172
175
  default:
173
176
  throw new errors.FiveOneEatError({
174
177
  statusCode: _response.error.statusCode,
@@ -177,7 +180,7 @@ class ProductOrdersClient {
177
180
  });
178
181
  }
179
182
  }
180
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/product-orders/{productOrder}");
183
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/product-orders/{order}");
181
184
  });
182
185
  }
183
186
  /**
@@ -186,10 +189,11 @@ class ProductOrdersClient {
186
189
  *
187
190
  * @throws {@link FiveOneEat.UnauthorizedError}
188
191
  * @throws {@link FiveOneEat.ForbiddenError}
192
+ * @throws {@link FiveOneEat.NotFoundError}
189
193
  *
190
194
  * @example
191
195
  * await client.business.productOrders.fulfill({
192
- * productOrder: "productOrder"
196
+ * order: "order"
193
197
  * })
194
198
  */
195
199
  fulfill(request, requestOptions) {
@@ -198,11 +202,11 @@ class ProductOrdersClient {
198
202
  __fulfill(request, requestOptions) {
199
203
  return __awaiter(this, void 0, void 0, function* () {
200
204
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
201
- const { productOrder } = request;
205
+ const { order } = request;
202
206
  const _authRequest = yield this._options.authProvider.getAuthRequest();
203
207
  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);
204
208
  const _response = yield core.fetcher({
205
- 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, `business/product-orders/${core.url.encodePathParam(productOrder)}/fulfill`),
209
+ 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, `business/product-orders/${core.url.encodePathParam(order)}/fulfill`),
206
210
  method: "PUT",
207
211
  headers: _headers,
208
212
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -224,6 +228,8 @@ class ProductOrdersClient {
224
228
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
225
229
  case 403:
226
230
  throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
231
+ case 404:
232
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
227
233
  default:
228
234
  throw new errors.FiveOneEatError({
229
235
  statusCode: _response.error.statusCode,
@@ -232,7 +238,7 @@ class ProductOrdersClient {
232
238
  });
233
239
  }
234
240
  }
235
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/product-orders/{productOrder}/fulfill");
241
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/product-orders/{order}/fulfill");
236
242
  });
237
243
  }
238
244
  /**
@@ -241,10 +247,11 @@ class ProductOrdersClient {
241
247
  *
242
248
  * @throws {@link FiveOneEat.UnauthorizedError}
243
249
  * @throws {@link FiveOneEat.ForbiddenError}
250
+ * @throws {@link FiveOneEat.NotFoundError}
244
251
  *
245
252
  * @example
246
253
  * await client.business.productOrders.markPickedUp({
247
- * productOrder: "productOrder"
254
+ * order: "order"
248
255
  * })
249
256
  */
250
257
  markPickedUp(request, requestOptions) {
@@ -253,11 +260,11 @@ class ProductOrdersClient {
253
260
  __markPickedUp(request, requestOptions) {
254
261
  return __awaiter(this, void 0, void 0, function* () {
255
262
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
256
- const { productOrder } = request;
263
+ const { order } = request;
257
264
  const _authRequest = yield this._options.authProvider.getAuthRequest();
258
265
  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);
259
266
  const _response = yield core.fetcher({
260
- 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, `business/product-orders/${core.url.encodePathParam(productOrder)}/mark-picked-up`),
267
+ 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, `business/product-orders/${core.url.encodePathParam(order)}/mark-picked-up`),
261
268
  method: "PUT",
262
269
  headers: _headers,
263
270
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -279,6 +286,8 @@ class ProductOrdersClient {
279
286
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
280
287
  case 403:
281
288
  throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
289
+ case 404:
290
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
282
291
  default:
283
292
  throw new errors.FiveOneEatError({
284
293
  statusCode: _response.error.statusCode,
@@ -287,7 +296,7 @@ class ProductOrdersClient {
287
296
  });
288
297
  }
289
298
  }
290
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/product-orders/{productOrder}/mark-picked-up");
299
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PUT", "/business/product-orders/{order}/mark-picked-up");
291
300
  });
292
301
  }
293
302
  /**
@@ -296,11 +305,12 @@ class ProductOrdersClient {
296
305
  *
297
306
  * @throws {@link FiveOneEat.UnauthorizedError}
298
307
  * @throws {@link FiveOneEat.ForbiddenError}
308
+ * @throws {@link FiveOneEat.NotFoundError}
299
309
  * @throws {@link FiveOneEat.UnprocessableEntityError}
300
310
  *
301
311
  * @example
302
312
  * await client.business.productOrders.addTracking({
303
- * productOrder: "productOrder",
313
+ * order: "order",
304
314
  * carrier: "carrier",
305
315
  * tracking_number: "tracking_number"
306
316
  * })
@@ -311,11 +321,11 @@ class ProductOrdersClient {
311
321
  __addTracking(request, requestOptions) {
312
322
  return __awaiter(this, void 0, void 0, function* () {
313
323
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
314
- const { productOrder } = request, _body = __rest(request, ["productOrder"]);
324
+ const { order } = request, _body = __rest(request, ["order"]);
315
325
  const _authRequest = yield this._options.authProvider.getAuthRequest();
316
326
  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);
317
327
  const _response = yield core.fetcher({
318
- 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, `business/product-orders/${core.url.encodePathParam(productOrder)}/tracking`),
328
+ 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, `business/product-orders/${core.url.encodePathParam(order)}/tracking`),
319
329
  method: "POST",
320
330
  headers: _headers,
321
331
  contentType: "application/json",
@@ -340,6 +350,8 @@ class ProductOrdersClient {
340
350
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
341
351
  case 403:
342
352
  throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
353
+ case 404:
354
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
343
355
  case 422:
344
356
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
345
357
  default:
@@ -350,20 +362,31 @@ class ProductOrdersClient {
350
362
  });
351
363
  }
352
364
  }
353
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/product-orders/{productOrder}/tracking");
365
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/product-orders/{order}/tracking");
354
366
  });
355
367
  }
356
368
  /**
357
- * @param {FiveOneEat.business.RefundProductOrdersRequest} request
369
+ * Refunds `amount` (dollars) of the order, or everything still refundable
370
+ * when `amount` is omitted, through Stripe. Sales tax on the refunded part
371
+ * is reversed automatically.
372
+ *
373
+ * Send an `Idempotency-Key` header (1–255 characters, unique per refund you
374
+ * mean to make) to make retries safe: a repeat with the same key returns
375
+ * the order with the refund already made, with 200, instead of refunding
376
+ * again — even when nothing is left to refund. Without it, a retry after a
377
+ * lost response may refund twice.
378
+ *
379
+ * @param {FiveOneEat.business.RefundOrderRequest} request
358
380
  * @param {ProductOrdersClient.RequestOptions} requestOptions - Request-specific configuration.
359
381
  *
360
382
  * @throws {@link FiveOneEat.UnauthorizedError}
361
383
  * @throws {@link FiveOneEat.ForbiddenError}
384
+ * @throws {@link FiveOneEat.NotFoundError}
362
385
  * @throws {@link FiveOneEat.UnprocessableEntityError}
363
386
  *
364
387
  * @example
365
388
  * await client.business.productOrders.refund({
366
- * productOrder: "productOrder"
389
+ * order: "order"
367
390
  * })
368
391
  */
369
392
  refund(request, requestOptions) {
@@ -372,11 +395,11 @@ class ProductOrdersClient {
372
395
  __refund(request, requestOptions) {
373
396
  return __awaiter(this, void 0, void 0, function* () {
374
397
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
375
- const { productOrder } = request, _body = __rest(request, ["productOrder"]);
398
+ const { order, "Idempotency-Key": idempotencyKey } = request, _body = __rest(request, ["order", "Idempotency-Key"]);
376
399
  const _authRequest = yield this._options.authProvider.getAuthRequest();
377
- 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);
400
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ "Idempotency-Key": idempotencyKey }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
378
401
  const _response = yield core.fetcher({
379
- 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, `business/product-orders/${core.url.encodePathParam(productOrder)}/refund`),
402
+ 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, `business/product-orders/${core.url.encodePathParam(order)}/refund`),
380
403
  method: "POST",
381
404
  headers: _headers,
382
405
  contentType: "application/json",
@@ -401,6 +424,8 @@ class ProductOrdersClient {
401
424
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
402
425
  case 403:
403
426
  throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
427
+ case 404:
428
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
404
429
  case 422:
405
430
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
406
431
  default:
@@ -411,7 +436,7 @@ class ProductOrdersClient {
411
436
  });
412
437
  }
413
438
  }
414
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/product-orders/{productOrder}/refund");
439
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/product-orders/{order}/refund");
415
440
  });
416
441
  }
417
442
  /**
@@ -420,11 +445,12 @@ class ProductOrdersClient {
420
445
  *
421
446
  * @throws {@link FiveOneEat.UnauthorizedError}
422
447
  * @throws {@link FiveOneEat.ForbiddenError}
448
+ * @throws {@link FiveOneEat.NotFoundError}
423
449
  * @throws {@link FiveOneEat.UnprocessableEntityError}
424
450
  *
425
451
  * @example
426
452
  * await client.business.productOrders.getLabelRates({
427
- * productOrder: "productOrder"
453
+ * order: "order"
428
454
  * })
429
455
  */
430
456
  getLabelRates(request, requestOptions) {
@@ -433,11 +459,11 @@ class ProductOrdersClient {
433
459
  __getLabelRates(request, requestOptions) {
434
460
  return __awaiter(this, void 0, void 0, function* () {
435
461
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
436
- const { productOrder } = request;
462
+ const { order } = request;
437
463
  const _authRequest = yield this._options.authProvider.getAuthRequest();
438
464
  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);
439
465
  const _response = yield core.fetcher({
440
- 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, `business/product-orders/${core.url.encodePathParam(productOrder)}/label-rates`),
466
+ 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, `business/product-orders/${core.url.encodePathParam(order)}/label-rates`),
441
467
  method: "GET",
442
468
  headers: _headers,
443
469
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -459,6 +485,8 @@ class ProductOrdersClient {
459
485
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
460
486
  case 403:
461
487
  throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
488
+ case 404:
489
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
462
490
  case 422:
463
491
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
464
492
  default:
@@ -469,7 +497,7 @@ class ProductOrdersClient {
469
497
  });
470
498
  }
471
499
  }
472
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/product-orders/{productOrder}/label-rates");
500
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/product-orders/{order}/label-rates");
473
501
  });
474
502
  }
475
503
  /**
@@ -478,11 +506,12 @@ class ProductOrdersClient {
478
506
  *
479
507
  * @throws {@link FiveOneEat.UnauthorizedError}
480
508
  * @throws {@link FiveOneEat.ForbiddenError}
509
+ * @throws {@link FiveOneEat.NotFoundError}
481
510
  * @throws {@link FiveOneEat.UnprocessableEntityError}
482
511
  *
483
512
  * @example
484
513
  * await client.business.productOrders.purchaseLabel({
485
- * productOrder: "productOrder",
514
+ * order: "order",
486
515
  * provider_rate_id: "provider_rate_id"
487
516
  * })
488
517
  */
@@ -492,11 +521,11 @@ class ProductOrdersClient {
492
521
  __purchaseLabel(request, requestOptions) {
493
522
  return __awaiter(this, void 0, void 0, function* () {
494
523
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
495
- const { productOrder } = request, _body = __rest(request, ["productOrder"]);
524
+ const { order } = request, _body = __rest(request, ["order"]);
496
525
  const _authRequest = yield this._options.authProvider.getAuthRequest();
497
526
  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);
498
527
  const _response = yield core.fetcher({
499
- 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, `business/product-orders/${core.url.encodePathParam(productOrder)}/purchase-label`),
528
+ 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, `business/product-orders/${core.url.encodePathParam(order)}/purchase-label`),
500
529
  method: "POST",
501
530
  headers: _headers,
502
531
  contentType: "application/json",
@@ -521,6 +550,8 @@ class ProductOrdersClient {
521
550
  throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
522
551
  case 403:
523
552
  throw new FiveOneEat.ForbiddenError(_response.error.body, _response.rawResponse);
553
+ case 404:
554
+ throw new FiveOneEat.NotFoundError(_response.error.body, _response.rawResponse);
524
555
  case 422:
525
556
  throw new FiveOneEat.UnprocessableEntityError(_response.error.body, _response.rawResponse);
526
557
  default:
@@ -531,7 +562,7 @@ class ProductOrdersClient {
531
562
  });
532
563
  }
533
564
  }
534
- return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/product-orders/{productOrder}/purchase-label");
565
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/business/product-orders/{order}/purchase-label");
535
566
  });
536
567
  }
537
568
  }
@@ -1,13 +1,14 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * productOrder: "productOrder",
4
+ * order: "order",
5
5
  * carrier: "carrier",
6
6
  * tracking_number: "tracking_number"
7
7
  * }
8
8
  */
9
9
  export interface AddTrackingProductOrdersRequest {
10
- productOrder: string;
10
+ /** The order ID */
11
+ order: string;
11
12
  carrier: string;
12
13
  tracking_number: string;
13
14
  tracking_url?: string | null;
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * productOrder: "productOrder"
4
+ * order: "order"
5
5
  * }
6
6
  */
7
7
  export interface FulfillProductOrdersRequest {
8
- productOrder: string;
8
+ /** The order ID */
9
+ order: string;
9
10
  }
@@ -1,9 +1,10 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * productOrder: "productOrder"
4
+ * order: "order"
5
5
  * }
6
6
  */
7
7
  export interface GetLabelRatesProductOrdersRequest {
8
- productOrder: string;
8
+ /** The order ID */
9
+ order: string;
9
10
  }