@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
@@ -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 GetProductOrdersRequest {
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 MarkPickedUpProductOrdersRequest {
8
- productOrder: string;
8
+ /** The order ID */
9
+ order: string;
9
10
  }
@@ -1,11 +1,12 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * productOrder: "productOrder",
4
+ * order: "order",
5
5
  * provider_rate_id: "provider_rate_id"
6
6
  * }
7
7
  */
8
8
  export interface PurchaseLabelProductOrdersRequest {
9
- productOrder: string;
9
+ /** The order ID */
10
+ order: string;
10
11
  provider_rate_id: string;
11
12
  }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * order: "order"
5
+ * }
6
+ */
7
+ export interface RefundOrderRequest {
8
+ /** The order ID */
9
+ order: string;
10
+ /** Optional, 1–255 characters. A retry with the same key returns the refund already made instead of refunding again. */
11
+ "Idempotency-Key"?: string;
12
+ amount?: number | null;
13
+ reason?: string | null;
14
+ }
@@ -5,4 +5,4 @@ export type { GetProductOrdersRequest } from "./GetProductOrdersRequest.js";
5
5
  export type { ListProductOrdersRequest } from "./ListProductOrdersRequest.js";
6
6
  export type { MarkPickedUpProductOrdersRequest } from "./MarkPickedUpProductOrdersRequest.js";
7
7
  export type { PurchaseLabelProductOrdersRequest } from "./PurchaseLabelProductOrdersRequest.js";
8
- export type { RefundProductOrdersRequest } from "./RefundProductOrdersRequest.js";
8
+ export type { RefundOrderRequest } from "./RefundOrderRequest.js";
@@ -39,7 +39,8 @@ export declare class ProductsClient {
39
39
  *
40
40
  * @example
41
41
  * await client.business.products.create({
42
- * name: "name"
42
+ * name: "name",
43
+ * tax_code: "tax_code"
43
44
  * })
44
45
  */
45
46
  create(request: FiveOneEat.business.StoreProductRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.CreateProductsResponse>;
@@ -71,7 +72,8 @@ export declare class ProductsClient {
71
72
  * @example
72
73
  * await client.business.products.update({
73
74
  * product: "product",
74
- * name: "name"
75
+ * name: "name",
76
+ * tax_code: "tax_code"
75
77
  * })
76
78
  */
77
79
  update(request: FiveOneEat.business.UpdateProductRequest, requestOptions?: ProductsClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.UpdateProductsResponse>;
@@ -139,7 +139,8 @@ class ProductsClient {
139
139
  *
140
140
  * @example
141
141
  * await client.business.products.create({
142
- * name: "name"
142
+ * name: "name",
143
+ * tax_code: "tax_code"
143
144
  * })
144
145
  */
145
146
  create(request, requestOptions) {
@@ -259,7 +260,8 @@ class ProductsClient {
259
260
  * @example
260
261
  * await client.business.products.update({
261
262
  * product: "product",
262
- * name: "name"
263
+ * name: "name",
264
+ * tax_code: "tax_code"
263
265
  * })
264
266
  */
265
267
  update(request, requestOptions) {
@@ -1,13 +1,15 @@
1
1
  /**
2
2
  * @example
3
3
  * {
4
- * name: "name"
4
+ * name: "name",
5
+ * tax_code: "tax_code"
5
6
  * }
6
7
  */
7
8
  export interface StoreProductRequest {
8
9
  name: string;
9
10
  description?: string | null;
10
11
  is_active?: boolean;
12
+ tax_code: string;
11
13
  product_category_id?: string | null;
12
14
  metadata?: string[] | null;
13
15
  channel_ids?: string[] | null;
@@ -2,7 +2,8 @@
2
2
  * @example
3
3
  * {
4
4
  * product: "product",
5
- * name: "name"
5
+ * name: "name",
6
+ * tax_code: "tax_code"
6
7
  * }
7
8
  */
8
9
  export interface UpdateProductRequest {
@@ -11,6 +12,7 @@ export interface UpdateProductRequest {
11
12
  name: string;
12
13
  description?: string | null;
13
14
  is_active?: boolean;
15
+ tax_code: string;
14
16
  product_category_id?: string | null;
15
17
  metadata?: string[] | null;
16
18
  channel_ids?: string[] | null;
@@ -0,0 +1,27 @@
1
+ import type { BaseClientOptions, BaseRequestOptions } from "../../../../../../BaseClient.js";
2
+ import { type NormalizedClientOptionsWithAuth } from "../../../../../../BaseClient.js";
3
+ import * as core from "../../../../../../core/index.js";
4
+ import * as FiveOneEat from "../../../../../index.js";
5
+ export declare namespace TaxCodesClient {
6
+ type Options = BaseClientOptions;
7
+ interface RequestOptions extends BaseRequestOptions {
8
+ }
9
+ }
10
+ export declare class TaxCodesClient {
11
+ protected readonly _options: NormalizedClientOptionsWithAuth<TaxCodesClient.Options>;
12
+ constructor(options?: TaxCodesClient.Options);
13
+ /**
14
+ * Stripe's full product tax code catalog. A product's `tax_code` must be
15
+ * one where `allowed_on_products` is true; a paid ticket type's must be
16
+ * one where `allowed_on_ticket_types` is true.
17
+ *
18
+ * @param {TaxCodesClient.RequestOptions} requestOptions - Request-specific configuration.
19
+ *
20
+ * @throws {@link FiveOneEat.UnauthorizedError}
21
+ *
22
+ * @example
23
+ * await client.business.taxCodes.list()
24
+ */
25
+ list(requestOptions?: TaxCodesClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.business.ListTaxCodesResponse>;
26
+ private __list;
27
+ }
@@ -0,0 +1,111 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ Object.defineProperty(exports, "__esModule", { value: true });
46
+ exports.TaxCodesClient = void 0;
47
+ const BaseClient_js_1 = require("../../../../../../BaseClient.js");
48
+ const headers_js_1 = require("../../../../../../core/headers.js");
49
+ const core = __importStar(require("../../../../../../core/index.js"));
50
+ const environments = __importStar(require("../../../../../../environments.js"));
51
+ const handleNonStatusCodeError_js_1 = require("../../../../../../errors/handleNonStatusCodeError.js");
52
+ const errors = __importStar(require("../../../../../../errors/index.js"));
53
+ const FiveOneEat = __importStar(require("../../../../../index.js"));
54
+ class TaxCodesClient {
55
+ constructor(options = {}) {
56
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
57
+ }
58
+ /**
59
+ * Stripe's full product tax code catalog. A product's `tax_code` must be
60
+ * one where `allowed_on_products` is true; a paid ticket type's must be
61
+ * one where `allowed_on_ticket_types` is true.
62
+ *
63
+ * @param {TaxCodesClient.RequestOptions} requestOptions - Request-specific configuration.
64
+ *
65
+ * @throws {@link FiveOneEat.UnauthorizedError}
66
+ *
67
+ * @example
68
+ * await client.business.taxCodes.list()
69
+ */
70
+ list(requestOptions) {
71
+ return core.HttpResponsePromise.fromPromise(this.__list(requestOptions));
72
+ }
73
+ __list(requestOptions) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
76
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
77
+ 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);
78
+ const _response = yield core.fetcher({
79
+ 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/tax-codes"),
80
+ method: "GET",
81
+ headers: _headers,
82
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
83
+ 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,
84
+ 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,
85
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
86
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
87
+ logging: this._options.logging,
88
+ });
89
+ if (_response.ok) {
90
+ return {
91
+ data: _response.body,
92
+ rawResponse: _response.rawResponse,
93
+ };
94
+ }
95
+ if (_response.error.reason === "status-code") {
96
+ switch (_response.error.statusCode) {
97
+ case 401:
98
+ throw new FiveOneEat.UnauthorizedError(_response.error.body, _response.rawResponse);
99
+ default:
100
+ throw new errors.FiveOneEatError({
101
+ statusCode: _response.error.statusCode,
102
+ body: _response.error.body,
103
+ rawResponse: _response.rawResponse,
104
+ });
105
+ }
106
+ }
107
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/business/tax-codes");
108
+ });
109
+ }
110
+ }
111
+ exports.TaxCodesClient = TaxCodesClient;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { TaxCodesClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.TaxCodesClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "TaxCodesClient", { enumerable: true, get: function () { return Client_js_1.TaxCodesClient; } });
21
+ __exportStar(require("./client/index.js"), exports);
@@ -0,0 +1,2 @@
1
+ export * from "./client/index.js";
2
+ export * from "./types/index.js";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./client/index.js"), exports);
18
+ __exportStar(require("./types/index.js"), exports);
@@ -0,0 +1,4 @@
1
+ import type * as FiveOneEat from "../../../../../index.js";
2
+ export interface ListTaxCodesResponse {
3
+ data: FiveOneEat.TaxCode[];
4
+ }
@@ -0,0 +1 @@
1
+ export * from "./ListTaxCodesResponse.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ListTaxCodesResponse.js"), exports);
@@ -88,11 +88,21 @@ export declare class CartClient {
88
88
  removeItem(request: FiveOneEat.customer.RemoveItemCartRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.RemoveItemCartResponse>;
89
89
  private __removeItem;
90
90
  /**
91
+ * Refused with a 422 and a message while the order can't be priced yet: no
92
+ * fulfillment method chosen (when the shop offers several), a shipped order
93
+ * with no shipping address, or calculated shipping with no option chosen.
94
+ * The message is also in the cart's `fulfillment.checkout_blocker`.
95
+ *
96
+ * A 409 `{status: "paid", message, payment_intent_id}` means the cart's
97
+ * payment already went through (never a second payment): finish checkout
98
+ * with that id. A 409 with only a message means it is still processing.
99
+ *
91
100
  * @param {FiveOneEat.customer.CreatePaymentIntentCartRequest} request
92
101
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
93
102
  *
94
103
  * @throws {@link FiveOneEat.UnauthorizedError}
95
104
  * @throws {@link FiveOneEat.NotFoundError}
105
+ * @throws {@link FiveOneEat.ConflictError}
96
106
  * @throws {@link FiveOneEat.UnprocessableEntityError}
97
107
  *
98
108
  * @example
@@ -103,11 +113,51 @@ export declare class CartClient {
103
113
  createPaymentIntent(request: FiveOneEat.customer.CreatePaymentIntentCartRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.CreatePaymentIntentCartResponse>;
104
114
  private __createPaymentIntent;
105
115
  /**
116
+ * Call immediately before presenting or confirming the payment sheet. The
117
+ * cart may have changed since its payment intent was created (another
118
+ * device, a changed address or shipping option), so it is re-priced and
119
+ * the intent brought up to date. Send `amount`, the total in cents the
120
+ * buyer is looking at.
121
+ *
122
+ * - `total_changed: false` — pay with the returned `client_secret`.
123
+ * - `total_changed: true` — show "Your total changed to $X", re-initialise
124
+ * the payment sheet with the returned `client_secret` (it carries the new
125
+ * amount), and let the buyer confirm again.
126
+ * - 422 with a message — the order can't be priced yet (the same message
127
+ * as `fulfillment.checkout_blocker`); the old intent is cancelled.
128
+ * - 409 `status: paid` with `payment_intent_id` — the payment already went
129
+ * through; call checkout with that id instead.
130
+ * - 409 `status: processing` — the payment is still processing; don't pay
131
+ * again, check back later.
132
+ *
133
+ * @param {FiveOneEat.customer.RefreshCartPaymentRequest} request
134
+ * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
135
+ *
136
+ * @throws {@link FiveOneEat.UnauthorizedError}
137
+ * @throws {@link FiveOneEat.NotFoundError}
138
+ * @throws {@link FiveOneEat.ConflictError}
139
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
140
+ *
141
+ * @example
142
+ * await client.customer.cart.refreshPaymentIntent({
143
+ * business: "business",
144
+ * amount: 1
145
+ * })
146
+ */
147
+ refreshPaymentIntent(request: FiveOneEat.customer.RefreshCartPaymentRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.RefreshPaymentIntentCartResponse>;
148
+ private __refreshPaymentIntent;
149
+ /**
150
+ * Not gated on commerce readiness: the customer has already paid, so a
151
+ * lapsed readiness check must not stop the order from being recorded.
152
+ * A 409 means the cart changed after the payment was priced: the payment
153
+ * was refunded in full and no order was placed — re-check and pay again.
154
+ *
106
155
  * @param {FiveOneEat.customer.CheckoutCartRequest} request
107
156
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
108
157
  *
109
158
  * @throws {@link FiveOneEat.UnauthorizedError}
110
159
  * @throws {@link FiveOneEat.NotFoundError}
160
+ * @throws {@link FiveOneEat.ConflictError}
111
161
  * @throws {@link FiveOneEat.UnprocessableEntityError}
112
162
  *
113
163
  * @example
@@ -121,7 +171,28 @@ export declare class CartClient {
121
171
  checkout(request: FiveOneEat.customer.CheckoutCartRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.CheckoutCartResponse>;
122
172
  private __checkout;
123
173
  /**
124
- * @param {FiveOneEat.customer.GetShippingOptionsCartRequest} request
174
+ * Switching away from shipping clears the saved shipping address and option.
175
+ *
176
+ * @param {FiveOneEat.customer.ChooseFulfillmentMethodRequest} request
177
+ * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
178
+ *
179
+ * @throws {@link FiveOneEat.UnauthorizedError}
180
+ * @throws {@link FiveOneEat.NotFoundError}
181
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
182
+ *
183
+ * @example
184
+ * await client.customer.cart.setFulfillment({
185
+ * business: "business",
186
+ * fulfillment_method: "ship"
187
+ * })
188
+ */
189
+ setFulfillment(request: FiveOneEat.customer.ChooseFulfillmentMethodRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.SetFulfillmentCartResponse>;
190
+ private __setFulfillment;
191
+ /**
192
+ * Sales tax on a shipped order is worked out from this address. Saving a
193
+ * different address clears the chosen shipping option.
194
+ *
195
+ * @param {FiveOneEat.customer.ShippingAddressRequest} request
125
196
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
126
197
  *
127
198
  * @throws {@link FiveOneEat.UnauthorizedError}
@@ -129,7 +200,7 @@ export declare class CartClient {
129
200
  * @throws {@link FiveOneEat.UnprocessableEntityError}
130
201
  *
131
202
  * @example
132
- * await client.customer.cart.getShippingOptions({
203
+ * await client.customer.cart.setShippingAddress({
133
204
  * business: "business",
134
205
  * address: {
135
206
  * line1: "line1",
@@ -139,10 +210,30 @@ export declare class CartClient {
139
210
  * }
140
211
  * })
141
212
  */
142
- getShippingOptions(request: FiveOneEat.customer.GetShippingOptionsCartRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.GetShippingOptionsCartResponse>;
143
- private __getShippingOptions;
213
+ setShippingAddress(request: FiveOneEat.customer.ShippingAddressRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.SetShippingAddressCartResponse>;
214
+ private __setShippingAddress;
215
+ /**
216
+ * Options are held for 30 minutes; choose one by its `provider_rate_id`.
217
+ *
218
+ * @param {FiveOneEat.customer.ListShippingOptionsCartRequest} request
219
+ * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
220
+ *
221
+ * @throws {@link FiveOneEat.UnauthorizedError}
222
+ * @throws {@link FiveOneEat.NotFoundError}
223
+ * @throws {@link FiveOneEat.UnprocessableEntityError}
224
+ *
225
+ * @example
226
+ * await client.customer.cart.listShippingOptions({
227
+ * business: "business"
228
+ * })
229
+ */
230
+ listShippingOptions(request: FiveOneEat.customer.ListShippingOptionsCartRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.ListShippingOptionsCartResponse>;
231
+ private __listShippingOptions;
144
232
  /**
145
- * @param {FiveOneEat.customer.SelectShippingOptionCartRequest} request
233
+ * Send only the `provider_rate_id` from the shipping options. The price is
234
+ * the one quoted; an option older than 30 minutes is refused with a 422.
235
+ *
236
+ * @param {FiveOneEat.customer.SelectShippingRateRequest} request
146
237
  * @param {CartClient.RequestOptions} requestOptions - Request-specific configuration.
147
238
  *
148
239
  * @throws {@link FiveOneEat.UnauthorizedError}
@@ -152,10 +243,9 @@ export declare class CartClient {
152
243
  * @example
153
244
  * await client.customer.cart.selectShippingOption({
154
245
  * business: "business",
155
- * provider_rate_id: "provider_rate_id",
156
- * amount_cents: 1
246
+ * provider_rate_id: "provider_rate_id"
157
247
  * })
158
248
  */
159
- selectShippingOption(request: FiveOneEat.customer.SelectShippingOptionCartRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.SelectShippingOptionCartResponse>;
249
+ selectShippingOption(request: FiveOneEat.customer.SelectShippingRateRequest, requestOptions?: CartClient.RequestOptions): core.HttpResponsePromise<FiveOneEat.customer.SelectShippingOptionCartResponse>;
160
250
  private __selectShippingOption;
161
251
  }