diff --git a/.changeset/mighty-birds-cough.md b/.changeset/mighty-birds-cough.md new file mode 100644 index 0000000..31d1577 --- /dev/null +++ b/.changeset/mighty-birds-cough.md @@ -0,0 +1,5 @@ +--- +'bigrequest': patch +--- + +bigcommerce/docs#717, bigcommerce/docs#720, bigcommerce/docs#719, bigcommerce/docs#718, bigcommerce/docs#613, bigcommerce/docs#711, bigcommerce/docs#681, bigcommerce/docs#642, bigcommerce/docs#709, bigcommerce/docs#707, bigcommerce/docs#708, bigcommerce/docs#706, bigcommerce/docs#622, bigcommerce/docs#704, bigcommerce/docs#701, bigcommerce/docs#630 diff --git a/src/generated/carts.sf.ts b/src/generated/carts.sf.ts index 4ab4be4..814a03e 100644 --- a/src/generated/carts.sf.ts +++ b/src/generated/carts.sf.ts @@ -671,7 +671,7 @@ export interface components { /** @description Quantity of this item. */ quantity: number; /** @description ID of the variant. */ - variantId: number; + variantId?: number; optionSelections?: ({ /** * @description Modifier option ID. diff --git a/src/generated/carts.v3.ts b/src/generated/carts.v3.ts index c0d10f7..1f49211 100644 --- a/src/generated/carts.v3.ts +++ b/src/generated/carts.v3.ts @@ -53,7 +53,7 @@ export interface paths { * * To add a custom item use `custom_items`. * - * Overriding a product’s `list_price` will make that item ineligible for V3 product level promotions. + * By default, overriding a product's list_price makes it ineligible for V3 product-level promotions. In **Store Settings** under **Promotions and Coupons** in the control panel, you can change this behavior to allow promotions on overridden prices. * * If a product has modifiers, omit the `variant_id` and instead use the `option_selections` array to describe both the **variant** and the **modifier** selections. * @@ -77,6 +77,7 @@ export interface paths { * * **Usage Notes** * + * * To use redirect URLs, first create the cart using the REST Management API or GraphQL Storefront API. * * Redirect URLs can also be created with **Create a Cart** requests by appending `include=redirect_urls`. * * A **Carts** redirect URL is valid for 30 days and may only be used once. * * Redirect URLs point to either a shared checkout domain or a channel-specific domain, depending on the storefront configuration. @@ -103,7 +104,7 @@ export interface paths { * * **Notes** * - * Currently, only updating `list_price` and `quantity` are supported. Updating a product’s `list_price` will make that item ineligible for V3 product-level promotions. + * Currently, only updating `list_price` and `quantity` are supported. By default, overriding a product's list_price makes it ineligible for V3 product-level promotions. In **Store Settings** under **Promotions and Coupons** in the control panel, you can change this behavior to allow promotions on overridden prices. * * If the product has modifiers, omit the `variant_id` and instead use the `option_selections` array to describe both the **variant** and the **modifier** selections. * @@ -1263,6 +1264,11 @@ export interface components { * @description The discounted amount applied within a given context. */ discounted_amount?: number; + /** + * @description Display name of the coupon. + * @example 20% Off + */ + display_name?: string; }; /** Applied Discount */ AppliedDiscount: { @@ -2141,7 +2147,7 @@ export interface operations { * * To add a custom item use `custom_items`. * - * Overriding a product’s `list_price` will make that item ineligible for V3 product level promotions. + * By default, overriding a product's list_price makes it ineligible for V3 product-level promotions. In **Store Settings** under **Promotions and Coupons** in the control panel, you can change this behavior to allow promotions on overridden prices. * * If a product has modifiers, omit the `variant_id` and instead use the `option_selections` array to describe both the **variant** and the **modifier** selections. * @@ -2181,6 +2187,7 @@ export interface operations { * * **Usage Notes** * + * * To use redirect URLs, first create the cart using the REST Management API or GraphQL Storefront API. * * Redirect URLs can also be created with **Create a Cart** requests by appending `include=redirect_urls`. * * A **Carts** redirect URL is valid for 30 days and may only be used once. * * Redirect URLs point to either a shared checkout domain or a channel-specific domain, depending on the storefront configuration. @@ -2222,7 +2229,7 @@ export interface operations { * * **Notes** * - * Currently, only updating `list_price` and `quantity` are supported. Updating a product’s `list_price` will make that item ineligible for V3 product-level promotions. + * Currently, only updating `list_price` and `quantity` are supported. By default, overriding a product's list_price makes it ineligible for V3 product-level promotions. In **Store Settings** under **Promotions and Coupons** in the control panel, you can change this behavior to allow promotions on overridden prices. * * If the product has modifiers, omit the `variant_id` and instead use the `option_selections` array to describe both the **variant** and the **modifier** selections. * diff --git a/src/generated/categories_catalog.v3.ts b/src/generated/categories_catalog.v3.ts index da30bb1..d64979d 100644 --- a/src/generated/categories_catalog.v3.ts +++ b/src/generated/categories_catalog.v3.ts @@ -222,6 +222,9 @@ export interface paths { * Get Product Sort Order * @description Returns a list of products and their sort order for a specific category. * + * **Limits** + * * page=2&limit=250 will return page 2 of the results with 250 items per page. + * * **Usage Notes** * * Data pairs are displayed in ascending order based on products' `sort_order` values. * * `null` values are allowed for products without specified `sort_order` values. @@ -238,6 +241,9 @@ export interface paths { */ put: operations["updateCategorySortOrders"]; parameters: { + query?: { + page?: components["parameters"]["PageParam"]; + }; header: { Accept: components["parameters"]["Accept"]; }; @@ -2094,6 +2100,9 @@ export interface operations { * Get Product Sort Order * @description Returns a list of products and their sort order for a specific category. * + * **Limits** + * * page=2&limit=250 will return page 2 of the results with 250 items per page. + * * **Usage Notes** * * Data pairs are displayed in ascending order based on products' `sort_order` values. * * `null` values are allowed for products without specified `sort_order` values. @@ -2105,6 +2114,9 @@ export interface operations { */ getCategorySortOrders: { parameters: { + query?: { + page?: components["parameters"]["PageParam"]; + }; header: { Accept: components["parameters"]["Accept"]; }; @@ -2115,7 +2127,10 @@ export interface operations { responses: { 200: { content: { - "application/json": components["schemas"]["productSortOrder"][]; + "application/json": { + data?: components["schemas"]["productSortOrder"][]; + meta?: components["schemas"]["metaCollection_Full"]; + }; }; }; 401: components["responses"]["UnauthorizedError"]; @@ -2134,6 +2149,9 @@ export interface operations { */ updateCategorySortOrders: { parameters: { + query?: { + page?: components["parameters"]["PageParam"]; + }; header: { Accept: components["parameters"]["Accept"]; "Content-Type": components["parameters"]["ContentType"]; diff --git a/src/generated/channels.v3.ts b/src/generated/channels.v3.ts index a8c7fe7..c697892 100644 --- a/src/generated/channels.v3.ts +++ b/src/generated/channels.v3.ts @@ -2244,6 +2244,12 @@ export interface operations { }; responses: { 200: components["responses"]["channel_menus_Resp"]; + /** @description Unprocessable entity (The following fields are invalid.) */ + 422: { + content: { + "application/json": components["schemas"]["ErrorResponse"]; + }; + }; }; }; /** diff --git a/src/generated/checkouts.sf.ts b/src/generated/checkouts.sf.ts index 800c986..e207580 100644 --- a/src/generated/checkouts.sf.ts +++ b/src/generated/checkouts.sf.ts @@ -132,8 +132,11 @@ export interface paths { * @description Adds a new *Consignment* to *Checkout*. * * Perform the following two steps to define the fulfillment of the items in the cart. - * ### For **shipping** consignments: + * + * ### For shipping consignments: + * * 1. Add a new Consignment to Checkout. + * * * Send a `POST` request to `/consignments` with each shipping address, line item IDs, and quantities. Each address can have its own line item IDs. * * Provide a full valid customer address before placing the order. If provided, the order placement will succeed. * * As part of the request URL make sure to add `include=consignments.availableShippingOptions` to return the available shipping options based on the items, the address, and the shipping location. This will return `availableShippingOptions` in the response. @@ -144,8 +147,10 @@ export interface paths { * * 2. Update the Consignment with Shipping Options using the [REST Storefront API](/docs/rest-storefront/checkouts/checkout-consignments#update-a-consignment), the [REST Management API](/docs/rest-management/checkouts/checkout-consignments#update-checkout-consignment) or the [GraphQL Storefront API](/docs/storefront/cart-checkout/guide/graphql-storefront). * - * ### For **pickup** consignments: - * 1. Create a new consignment object. + * ### For pickup consignments: + * + * Create a new consignment object. + * * - Send a `POST` request to `/consignments` with line item IDs and quantities. * - Provide a `pickupMethodId`. This is the `id` of the Pickup Method provided in the response body of the Storefront Pickup Options API. * - Required Fields: @@ -389,6 +394,8 @@ export interface components { consignments?: components["schemas"]["consignment_Full"][]; /** @description Coupons applied at the checkout level. */ coupons?: components["schemas"]["CheckoutCoupon"][]; + /** @description Fees applied at the checkout level. */ + fees?: components["schemas"]["CheckoutFee"][]; /** @description Time when the cart was created. */ createdTime?: string; customer?: components["schemas"]["Customer"]; @@ -464,7 +471,7 @@ export interface components { id?: number; /** @description the coupon code */ code: string; - /** @description The coupon title based on different types provided in control panel section. */ + /** @description The coupon name displayed on the storefront. */ displayName?: string; /** * @description Key name to identify the type of coupon. @@ -483,7 +490,7 @@ export interface components { id?: number; /** @description the coupon code */ code: string; - /** @description The coupon title based on different types provided in control panel section. */ + /** @description The coupon name displayed on the storefront. */ displayName?: string; /** * @description |Type `int`|Type Name| @@ -502,6 +509,45 @@ export interface components { */ discountedAmount?: number; }; + /** Checkout Fee */ + CheckoutFee: { + /** + * Format: uuid + * @description The fee ID. + * @example 497f6eca-6276-4993-bfeb-53cbbbba6f08 + */ + id?: string; + /** + * @description The type of the fee. + * @enum {string} + */ + type?: "custom_fee"; + /** + * @description Name of the fee. + * @example AAINS + */ + name?: string; + /** + * @description Display name of the fee targeting customers/shoppers. + * @example Package Protection Insurance + */ + displayName?: string; + /** + * @description Cost of the fee (include or exclude tax dependent on tax settings, same as shipping cost). + * @example 10 + */ + cost?: number; + /** + * @description The source of the request. + * @example AA + */ + source?: string; + /** + * @description The tax class ID. + * @example 1 + */ + taxClassId?: number; + }; /** @description Customer details. */ Customer: { addresses?: { @@ -910,7 +956,7 @@ export interface components { customItems?: { /** @description ID of the custom item. */ id?: string; - /** @description Price of the item. With or without tax depending on your store setup. */ + /** @description The net item price before discounts and coupons. BigCommerce derives an item's list price from the product default price or, if applicable, the sale price configured in the admin panel. */ listPrice?: string; /** @description Item name. */ name?: string; @@ -1015,7 +1061,7 @@ export interface components { isTaxable?: boolean; /** * Format: double - * @description The item’s list price, as quoted by the manufacturer or distributor. + * @description The net item price before discounts and coupons. BigCommerce derives an item's list price from the product default price or, if applicable, the sale price configured in the admin panel. */ listPrice?: number; /** @description The itemʼs product name. */ @@ -1408,8 +1454,11 @@ export interface operations { * @description Adds a new *Consignment* to *Checkout*. * * Perform the following two steps to define the fulfillment of the items in the cart. - * ### For **shipping** consignments: + * + * ### For shipping consignments: + * * 1. Add a new Consignment to Checkout. + * * * Send a `POST` request to `/consignments` with each shipping address, line item IDs, and quantities. Each address can have its own line item IDs. * * Provide a full valid customer address before placing the order. If provided, the order placement will succeed. * * As part of the request URL make sure to add `include=consignments.availableShippingOptions` to return the available shipping options based on the items, the address, and the shipping location. This will return `availableShippingOptions` in the response. @@ -1420,8 +1469,10 @@ export interface operations { * * 2. Update the Consignment with Shipping Options using the [REST Storefront API](/docs/rest-storefront/checkouts/checkout-consignments#update-a-consignment), the [REST Management API](/docs/rest-management/checkouts/checkout-consignments#update-checkout-consignment) or the [GraphQL Storefront API](/docs/storefront/cart-checkout/guide/graphql-storefront). * - * ### For **pickup** consignments: - * 1. Create a new consignment object. + * ### For pickup consignments: + * + * Create a new consignment object. + * * - Send a `POST` request to `/consignments` with line item IDs and quantities. * - Provide a `pickupMethodId`. This is the `id` of the Pickup Method provided in the response body of the Storefront Pickup Options API. * - Required Fields: diff --git a/src/generated/checkouts.v3.ts b/src/generated/checkouts.v3.ts index d259c16..567688b 100644 --- a/src/generated/checkouts.v3.ts +++ b/src/generated/checkouts.v3.ts @@ -164,6 +164,27 @@ export interface paths { */ delete: operations["deleteCheckoutCoupon"]; }; + "/checkouts/{checkoutId}/fees": { + /** + * Update order level fees in a checkout + * @description Updates order level fees in a checkout. + * > We do not support partial updates, so please send the total entity values for each fee to be updated. + */ + put: operations["CheckoutsFeesByCheckoutIdPut"]; + /** + * Add order level fees to a checkout + * @description Adds order level fees to a checkout. + * + * Limits: + * - Maximum of 5 fees per checkout. + */ + post: operations["CheckoutsFeesByCheckoutIdPost"]; + /** + * Delete order level fees from a checkout. + * @description Delete fees from a checkout. + */ + delete: operations["CheckoutsFeesByCheckoutIdDelete"]; + }; "/checkouts/{checkoutId}/orders": { /** * Create an Order @@ -298,6 +319,11 @@ export interface components { * @example 0.9 */ discounted_amount?: number; + /** + * @description The display name of the coupon. + * @example 20% Off + */ + display_name?: string; }[]; discounts?: { /** @@ -640,6 +666,8 @@ export interface components { }[]; /** @description Coupons applied at checkout level. */ coupons?: components["schemas"]["AppliedCoupon"][]; + /** @description Fees applied at the checkout level. */ + fees?: components["schemas"]["CheckoutFee"][]; order_id?: string | null; /** * Format: double @@ -729,6 +757,11 @@ export interface components { * @example percentage_discount */ coupon_type?: string; + /** + * @description The display name of the coupon. + * @example 20% Off + */ + display_name?: string; /** * Format: float * @description The discounted amount applied within a given context. @@ -736,6 +769,50 @@ export interface components { */ discounted_amount?: number; }; + /** Checkout Fee */ + CheckoutFee: { + /** + * Format: uuid + * @description The fee ID. + * @example 497f6eca-6276-4993-bfeb-53cbbbba6f08 + */ + id?: string; + /** + * @description The type of the fee. + * @enum {string} + */ + type?: "custom_fee"; + /** + * @description Name of the fee. + * @example AAINS + */ + name?: string; + /** + * @description Display name of the fee targeting customers/shoppers. + * @example Package Protection Insurance + */ + display_name?: string; + /** + * @description Cost of the fee including tax. + * @example 10 + */ + cost_inc_tax?: number; + /** + * @description Cost of the fee excluding tax. + * @example 9.9 + */ + cost_ex_tax?: number; + /** + * @description The source of the request. + * @example AA + */ + source?: string; + /** + * @description The tax class ID. + * @example 1 + */ + tax_class_id?: number | null; + }; /** Address Properties */ AddressProperties: { first_name?: string; @@ -872,6 +949,60 @@ export interface components { */ version?: number; }; + BaseFee: { + /** + * @description The type of the fee. + * @enum {string} + */ + type: "custom_fee"; + /** + * @description The name of the fee. + * @example AAINS + */ + name: string; + /** + * @description The display name of the fee targeting customers/shoppers. + * @example Package Protection Insurance + */ + display_name: string; + /** + * @description The cost of the fee. + * @example 7.12 + */ + cost: number; + /** + * @description The source of the request. + * @example AA + */ + source: string; + /** + * @description The tax class ID applied to this fee (you can retrieve the tax class ID from our management API - v2/tax_classes). If the tax class is not provided or is null, the tax class set in the control panel is applied. + * @example 1 + */ + tax_class_id?: number; + }; + FeeWithId: components["schemas"]["BaseFee"] & { + /** + * @description ID of the fee. + * @example 3c26f3e6-146d-4dce-8159-2a77c0bba409 + */ + id: string; + }; + /** Fees POST request */ + AddFeesRequest: { + /** @description The fees to be added to a checkout. */ + fees: components["schemas"]["BaseFee"][]; + }; + /** Fees PUT request */ + UpdateFeesRequest: { + /** @description The fees to be updated in a checkout. */ + fees: components["schemas"]["FeeWithId"][]; + }; + /** Fees DELETE request */ + DeleteFeesRequest: { + /** @description The IDs of the fees to be deleted from a checkout. */ + ids: string[]; + }; /** Delete Coupon Request */ DeleteCouponCodeRequest: { /** @@ -1488,6 +1619,98 @@ export interface operations { 409: components["responses"]["CartConflictErrorResponse"]; }; }; + /** + * Update order level fees in a checkout + * @description Updates order level fees in a checkout. + * > We do not support partial updates, so please send the total entity values for each fee to be updated. + */ + CheckoutsFeesByCheckoutIdPut: { + parameters: { + header: { + Accept: components["parameters"]["Accept"]; + }; + path: { + checkoutId: components["parameters"]["checkoutId"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["UpdateFeesRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": { + data?: components["schemas"]["Checkout"]; + meta?: components["schemas"]["MetaOpen"]; + }; + }; + }; + }; + }; + /** + * Add order level fees to a checkout + * @description Adds order level fees to a checkout. + * + * Limits: + * - Maximum of 5 fees per checkout. + */ + CheckoutsFeesByCheckoutIdPost: { + parameters: { + header: { + Accept: components["parameters"]["Accept"]; + "Content-Type": components["parameters"]["Content-Type"]; + }; + path: { + checkoutId: components["parameters"]["checkoutId"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["AddFeesRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": { + data?: components["schemas"]["Checkout"]; + meta?: components["schemas"]["MetaOpen"]; + }; + }; + }; + }; + }; + /** + * Delete order level fees from a checkout. + * @description Delete fees from a checkout. + */ + CheckoutsFeesByCheckoutIdDelete: { + parameters: { + header: { + Accept: components["parameters"]["Accept"]; + }; + path: { + checkoutId: components["parameters"]["checkoutId"]; + }; + }; + requestBody: { + content: { + "application/json": components["schemas"]["DeleteFeesRequest"]; + }; + }; + responses: { + 200: { + content: { + "application/json": { + data?: components["schemas"]["Checkout"]; + meta?: components["schemas"]["MetaOpen"]; + }; + }; + }; + }; + }; /** * Create an Order * @description Creates an order. diff --git a/src/generated/customers.sf.ts b/src/generated/customers.sf.ts index 2c42ed2..3e436d9 100644 --- a/src/generated/customers.sf.ts +++ b/src/generated/customers.sf.ts @@ -35,6 +35,8 @@ export interface components { password?: string; /** @description Indicates whether customer provided consent to receive marketing emails. */ acceptsMarketingEmails?: boolean; + /** @description A valid [reCAPTCHA](/docs/storefront/graphql/customers#recaptcha) token from a successful verification response. */ + token?: string; customFields?: components["schemas"]["CustomFields"][]; }; /** CustomFields */ diff --git a/src/generated/customers.v2.ts b/src/generated/customers.v2.ts index fb3fc77..fe5a25d 100644 --- a/src/generated/customers.v2.ts +++ b/src/generated/customers.v2.ts @@ -5,6 +5,11 @@ */ +/** OneOf type helpers */ +type Without = { [P in Exclude]?: never }; +type XOR = (T | U) extends object ? (Without & U) | (Without & T) : T | U; +type OneOf = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR, ...Rest]> : never; + export interface paths { "/customers": { /** @@ -492,8 +497,7 @@ export interface components { */ is_default?: boolean; category_access?: components["schemas"]["categoryAccessLevel_Full"]; - /** @description A collection of discount rules that are automatically applied to customers who are members of the group. */ - discount_rules?: ({ + discount_rules?: OneOf<[({ /** @enum {string} */ type?: "price_list" | "all" | "category" | "product"; /** @enum {string} */ @@ -508,7 +512,47 @@ export interface components { * @example 3 */ price_list_id?: number; - })[]; + })[], ({ + /** @enum {string} */ + type?: "price_list" | "all" | "category" | "product"; + /** @enum {string} */ + method?: "percent" | "fixed" | "price"; + /** + * @description A float that specifies the value applied to the price modified. (Float, Float as String, Integer) + * @example 5.0000 + */ + amount?: string; + /** + * @description If a customer group is assigned to a category, `method` and `amount` are not shown. `type` and `category_id` are returned. + * @example 30 + */ + category_id?: number; + })[], ({ + /** @enum {string} */ + type?: "price_list" | "all" | "category" | "product"; + /** @enum {string} */ + method?: "percent" | "fixed" | "price"; + /** + * @description A float that specifies the value applied to the price modified. (Float, Float as String, Integer) + * @example 5.0000 + */ + amount?: string; + /** + * @description If a customer group is assigned to a product,`method` and `amount` are not shown. `type` and `product` are returned. + * @example 3 + */ + product_id?: number; + })[], ({ + /** @enum {string} */ + type?: "price_list" | "all" | "category" | "product"; + /** @enum {string} */ + method?: "percent" | "fixed" | "price"; + /** + * @description A float that specifies the value applied to the price modified. (Float, Float as String, Integer) + * @example 5.0000 + */ + amount?: string; + })[]]>; /** * @description Date on which the customer group was created. * @example "2023-07-17T06:30:41.000Z" @@ -610,23 +654,55 @@ export interface components { */ is_default?: boolean; category_access?: components["schemas"]["categoryAccessLevel_Full"]; - /** @description A collection of discount rules that are automatically applied to customers who are members of the group. */ - discount_rules?: ({ + discount_rules?: OneOf<[{ /** @enum {string} */ - type?: "price_list" | "all" | "category" | "product"; + type: "price_list"; + /** + * @description If a customer group is assigned to a price list,`method` and `amount` are not shown. `type` and `price_list_id` are returned. + * @example 3 + */ + price_list_id?: number; + }[], (OneOf<[{ /** @enum {string} */ - method?: "percent" | "fixed" | "price"; + type: "category"; + /** @enum {string} */ + method: "percent" | "fixed" | "price"; /** * @description A float that specifies the value applied to the price modified. (Float, Float as String, Integer) * @example 5.0000 */ - amount?: string; + amount: string; /** - * @description If a customer group is assigned to a price list,`method` and `amount` are not shown. `type` and `price_list_id` are returned. + * @description The category the customer group discount is assigned to. * @example 3 */ - price_list_id?: number; - })[]; + category_id: number; + }, { + /** @enum {string} */ + type: "product"; + /** @enum {string} */ + method: "percent" | "fixed" | "price"; + /** + * @description A float that specifies the value applied to the price modified. (Float, Float as String, Integer) + * @example 5.0000 + */ + amount: string; + /** + * @description The `product_id` the customer group discount is assigned to. + * @example 3 + */ + product_id: number; + }, { + /** @enum {string} */ + type: "all"; + /** @enum {string} */ + method?: "percent" | "fixed" | "price"; + /** + * @description A float that specifies the value applied to the price modified. (Float, Float as String, Integer) + * @example 5.0000 + */ + amount?: string; + }]>)[]]>; /** @description Describes whether the group is for guests. There can only be one customer group for guests at a time. */ is_group_for_guests?: boolean; }; diff --git a/src/generated/customers.v3.ts b/src/generated/customers.v3.ts index f6beefe..4dc6fc3 100644 --- a/src/generated/customers.v3.ts +++ b/src/generated/customers.v3.ts @@ -36,7 +36,8 @@ export interface paths { * * origin_channel_id * * **Limits** - * Limit of 10 customers per call. + * * Limit of 10 customers per call. + * * Limit of 3 concurrent requests * * **Notes** * @@ -175,7 +176,7 @@ export interface paths { * @description Returns the global-level customer settings. * * **Notes:** - * * Global customer settings don't apply when the `default_customer_group_id` is present. + * * Global customer settings don't apply on a channel when there are channel specific settings configured through [Channel Settings](/docs/rest-management/customers/channel-settings). */ get: operations["getCustomersSettings"]; /** @@ -191,8 +192,7 @@ export interface paths { * * **Notes:** * - * * `null` indicates that there is no override per given channel and values are inherited from the global level. - * * Global customer settings don't apply when the `default_customer_group_id` is present. + * * `null` value configuration indicates that there is no override provided for a given channel; thus, values are inherited from [Global Settings](/docs/rest-management/customers/global-settings). */ get: operations["getCustomersSettingsChannel"]; /** @@ -275,7 +275,8 @@ export interface paths { * Upsert checks for an existing record. If there is none, it creates the record, if there is a matching record, it updates that record. * * **Limits** - * * 10 per call limit. + * * Limit of 10 customers per call. + * * Limit of 3 concurrent requests. */ put: operations["upsertCustomersAttributeValues"]; /** @@ -2318,15 +2319,15 @@ export interface operations { "customer_group_id:in"?: string[]; /** @description Filter items by date created, for example, `2024-05-14T09:34:00` or `2024-05-14`. */ date_created?: string; - /** @description Filter items by maximum date created, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields created before this date. */ + /** @description Filter items by maximum date created, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns customers created before this date. */ "date_created:max"?: string; - /** @description Filter items by date created for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields created after this date. */ + /** @description Filter items by date created for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns customers created after this date. */ "date_created:min"?: string; /** @description Filter items by date modified, for example, `2024-05-14T09:34:00` or `2024-05-14`. */ date_modified?: string; - /** @description Filter items by minimum date modified, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields modified after this date. */ + /** @description Filter items by minimum date modified, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns customers modified after this date. */ "date_modified:min"?: string; - /** @description Filter items by maximum date modified, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields modified before this date. */ + /** @description Filter items by maximum date modified, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns customers modified before this date. */ "date_modified:max"?: string; /** @description Filter items by email. `email:in=janedoe@example.com` */ "email:in"?: string[]; @@ -2338,6 +2339,8 @@ export interface operations { * Concatenates the first_name and last_name fields. */ "name:like"?: string[]; + /** @description Filter items by phone number. `phone:in=555-55-5555` */ + "phone:in"?: string; /** * @description Filter items by registration_ip_address. If the customer was created using the API, then registration address is blank. * `registration_ip_address:in=12.345.6.789` @@ -2384,7 +2387,8 @@ export interface operations { * * origin_channel_id * * **Limits** - * Limit of 10 customers per call. + * * Limit of 10 customers per call. + * * Limit of 3 concurrent requests * * **Notes** * @@ -2700,7 +2704,7 @@ export interface operations { * @description Returns the global-level customer settings. * * **Notes:** - * * Global customer settings don't apply when the `default_customer_group_id` is present. + * * Global customer settings don't apply on a channel when there are channel specific settings configured through [Channel Settings](/docs/rest-management/customers/channel-settings). */ getCustomersSettings: { responses: { @@ -2747,8 +2751,7 @@ export interface operations { * * **Notes:** * - * * `null` indicates that there is no override per given channel and values are inherited from the global level. - * * Global customer settings don't apply when the `default_customer_group_id` is present. + * * `null` value configuration indicates that there is no override provided for a given channel; thus, values are inherited from [Global Settings](/docs/rest-management/customers/global-settings). */ getCustomersSettingsChannel: { parameters: { @@ -2993,7 +2996,8 @@ export interface operations { * Upsert checks for an existing record. If there is none, it creates the record, if there is a matching record, it updates that record. * * **Limits** - * * 10 per call limit. + * * Limit of 10 customers per call. + * * Limit of 3 concurrent requests. */ upsertCustomersAttributeValues: { parameters: { diff --git a/src/generated/geography.v2.ts b/src/generated/geography.v2.ts index e1abb7c..27b5c18 100644 --- a/src/generated/geography.v2.ts +++ b/src/generated/geography.v2.ts @@ -47,7 +47,7 @@ export interface paths { get: operations["getCountryState"]; parameters: { path: { - country_id: string; + country_id: number; id: string; }; }; @@ -81,7 +81,7 @@ export interface paths { get: operations["getCountryStatesCount"]; parameters: { path: { - country_id: string; + country_id: number; }; }; }; @@ -353,7 +353,7 @@ export interface operations { getCountryStatesCount: { parameters: { path: { - country_id: string; + country_id: number; }; }; responses: { diff --git a/src/generated/marketing.v2.ts b/src/generated/marketing.v2.ts index 2f78c59..9c9fb28 100644 --- a/src/generated/marketing.v2.ts +++ b/src/generated/marketing.v2.ts @@ -502,13 +502,13 @@ export interface components { */ balance?: string; /** - * @description Date the gift certificate was purchased. If not assigned, this will be set to today’s date. Date displays in the [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-3.3) timestamp format. - * @example Tue, 20 Jan 1970 08:45:38 CST + * @description Date the gift certificate was purchased. If not assigned, this will be set to today’s date. Date displays in the Unix timestamp format. + * @example 1603306 */ purchase_date?: string; /** - * @description Date on which the gift certificate is set to expire. Date displays in the [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822#section-3.3) timestamp format. - * @example Mon, 2 Jan 2023 08:45:38 CST + * @description Date on which the gift certificate is set to expire. Date displays in the Unix timestamp format. + * @example 1694738 */ expiry_date?: string; /** diff --git a/src/generated/orders.sf.ts b/src/generated/orders.sf.ts index 1429bef..759fe8c 100644 --- a/src/generated/orders.sf.ts +++ b/src/generated/orders.sf.ts @@ -189,7 +189,7 @@ export interface components { couponAmount?: number; /** * Format: double - * @description The itemʼs list price, as quoted by the manufacturer/distributor. + * @description The net item price before discounts and coupons. BigCommerce derives an item's list price from the product default price or, if applicable, the sale price configured in the admin panel. */ listPrice?: number; /** @@ -271,7 +271,7 @@ export interface components { couponAmount?: number; /** * Format: double - * @description The itemʼs list price, as quoted by the manufacturer/distributor. + * @description The net item price before discounts and coupons. BigCommerce derives an item's list price from the product default price or, if applicable, the sale price configured in the admin panel. */ listPrice?: number; /** @@ -400,7 +400,7 @@ export interface components { couponAmount?: number; /** * Format: double - * @description The itemʼs list price, as quoted by the manufacturer/distributor. + * @description The net item price before discounts and coupons. BigCommerce derives an item's list price from the product default price or, if applicable, the sale price configured in the admin panel. */ listPrice?: number; /** diff --git a/src/generated/orders.v2.oas2.ts b/src/generated/orders.v2.oas2.ts index 0673366..e150231 100644 --- a/src/generated/orders.v2.oas2.ts +++ b/src/generated/orders.v2.oas2.ts @@ -24,6 +24,14 @@ export interface paths { * * After the update, the PUT request clears all discounts and promotions applied to the changed order line items. Since the order data syncs with other ERP systems, like Amazon or eBay, the updated order returns to the default setting, removing any applied discounts. * + * To update order fees, include the fee id in the request body along with all relevant fee fields. Fees not included will be deleted. Fees with an id will be updated, and fees without an id will be created as new. + * + * **Notes** + * + * * Sub-resources like products in the /v2/orders PUT request behave like PATCH, updating only the provided fields. Fees, however, follow standard PUT semantics and fees in the request body will fully replace existing ones. + * To retain an existing fee, include it in the body with its associated id. + * * The values for cost_ex_tax, cost_inc_tax and cost_tax in the fees payload should reflect the tax rate associated with the tax_class_id. For a 10% tax rate, the difference between cost_inc_tax and cost_ex_tax should be 10%. If no tax_class_id is provided, the store's default "tax class for fee" will apply. Incorrect data may lead to issues in downstream operations like refunds. + * * To learn more about creating or updating orders, see [Orders Overview](/docs/store-operations/orders). */ put: operations["updateOrder"]; @@ -48,6 +56,23 @@ export interface paths { */ get: operations["getOrdersCount"]; parameters: { + query?: { + min_id?: components["parameters"]["min_id"]; + max_id?: components["parameters"]["max_id"]; + min_total?: components["parameters"]["min_total"]; + max_total?: components["parameters"]["max_total"]; + customer_id?: components["parameters"]["customer_id"]; + email?: components["parameters"]["email"]; + status_id?: components["parameters"]["status_id"]; + cart_id?: components["parameters"]["cart_id"]; + payment_method?: components["parameters"]["payment_method"]; + min_date_created?: components["parameters"]["min_date_created"]; + max_date_created?: components["parameters"]["max_date_created"]; + min_date_modified?: components["parameters"]["min_date_modified"]; + max_date_modified?: components["parameters"]["max_date_modified"]; + channel_id?: components["parameters"]["channel_id"]; + external_order_id?: components["parameters"]["external_order_id"]; + }; header: { Accept: components["parameters"]["Accept"]; }; @@ -88,6 +113,14 @@ export interface paths { * This means that if the `consignments` array is present in the request, then _none_ of the following may be present and vice-versa: * - `shipping_addresses` * - `products` + * + * Include the `fees` object along with all its attributes in the request to create order-level fees for the newly created order. + * + * **Notes** + * + * * The values for cost_ex_tax, cost_inc_tax and cost_tax in the fees payload should reflect the tax rate associated with the tax_class_id. For a 10% tax rate, the difference between cost_inc_tax and cost_ex_tax should be 10%. If no tax_class_id is provided, the store's default "tax class for fee" will apply. Incorrect data may lead to issues in downstream operations like refunds. + * + * The V2 Orders API will not trigger the typical [Order Email](https://support.bigcommerce.com/s/article/Customizing-Emails?language=en_US) when creating orders. To create an order that does trigger this email, you can instead [create a cart](/docs/rest-management/carts/carts-single#create-a-cart) and [convert that cart into an order](/docs/rest-management/checkouts/checkout-orders#create-an-order). */ post: operations["createOrder"]; /** @@ -263,9 +296,9 @@ export interface paths { * * There are three methods for generating a tracking link for a shipment: * - * 1. Use `shipping_provider` and `tracking_number`: This generates an automatic tracking link that you can click from the BigCommerce control panel and customer-facing emails. The `generated_tracking_link` property in the API response represents this tracking link. The `tracking_link` property in the API response will remain empty. + * 1. Use `shipping_provider` and `tracking_number`: This generates a link to one of our integrated providers that you can click from the BigCommerce control panel and customer-facing emails. If a merchant still needs to set up a shipping provider or if the provider is not one of our natively integrated providers, you will click on an Aftership tracking link instead. The `generated_tracking_link` property in the API response represents one of these tracking links. The `tracking_link` property in the API response will remain empty. * - * 2. Use `tracking_carrier` and `tracking_number`: This also creates an automatic tracking link that you can click in both the BigCommerce control panel and customer-facing emails. Like the previous method, the `generated_tracking_link` property in the API response represents this tracking link. The `tracking_link` property in the API response will remain empty. + * 2. Use `tracking_carrier` and `tracking_number`: This also creates a link to one of our integrated providers or an Aftership tracking link that you can click in both the BigCommerce control panel and customer-facing emails. Like the previous method, the `generated_tracking_link` property in the API response represents this tracking link. The `tracking_link` property in the API response will remain empty. * * 3. Supply a custom `tracking_link`: By providing a value for the `tracking_link` property, you can use your own tracking link within the BigCommerce control panel and in customer-facing emails. The API response will return your supplied tracking link as part of the `tracking_link` property in the response. In situations when there isn't a `generated_tracking_link`, the property in the API response will remain empty. * @@ -282,7 +315,7 @@ export interface paths { * - `shipperhq` * - `carrier_{your_carrier_id}`, when the carrier is a [third-party Shipping Provider](/docs/integrations/shipping) * - * Acceptable values for `tracking_carrier` include an empty string (`""`) or one of the valid [tracking-carrier values](https://github.com/bigcommerce/dev-docs/blob/master/assets/csv/tracking_carrier_values.csv). + * Acceptable values for `tracking_carrier` include an empty string (`""`) or one of the valid [tracking-carrier values](https://www.aftership.com/docs/tracking/others/supported-couriers). */ post: operations["createOrderShipments"]; /** @@ -436,6 +469,13 @@ export interface paths { */ get: operations["getOrderConsignmentShippingQuotes"]; }; + "/orders/{order_id}/fees": { + /** + * Get Fees + * @description Get all fees for an order. + */ + get: operations["getOrderFees"]; + }; } export type webhooks = Record; @@ -557,7 +597,7 @@ export interface components { * @example physical * @enum {string} */ - type?: "physical" | "digital"; + type?: "physical" | "digital" | "giftcertificate"; /** * @description The product’s base price. (Float, Float-As-String, Integer) * @example 54.0000 @@ -914,10 +954,10 @@ export interface components { */ tax_rate_id?: number; /** - * @description The unique numeric identifier of the tax class object. NOTE: Will be 0 if automatic tax was enabled, or if the default tax class was used. + * @description A unique numeric identifier for the tax class. If not provided or null, the default fee tax class from the control panel is used. * @example 0 */ - tax_class_id?: number; + tax_class_id?: number | null; /** * @description The name of the tax class object. * @example State Tax @@ -948,6 +988,11 @@ export interface components { * @example 1.5200 */ line_amount?: string; + /** + * @description The ID of the order pickup method object (which contains pickup location details) associated with the order. + * @example 0 + */ + order_pickup_method_id?: number; /** @description If the `line_item_type` is `item` or `handling` then this field will be the order product id. Otherwise the field will return as null. */ order_product_id?: string; /** @@ -1000,11 +1045,11 @@ export interface components { /** * Tracking Carrier * @description Tracking carrier for the shipment. - * Acceptable values for `tracking_carrier` include an empty string (`""`) or one of the valid [tracking-carrier values](https://github.com/bigcommerce/dev-docs/blob/master/assets/csv/tracking_carrier_values.csv). + * Acceptable values for `tracking_carrier` include an empty string (`""`) or one of the valid [tracking-carrier values](https://www.aftership.com/docs/tracking/others/supported-couriers). * @example */ tracking_carrier?: string; - /** @description The custom tracking link supplied on POST or PUT shipments. For the auto-generated tracking link see the `generated_tracking_link` property. */ + /** @description The custom tracking link supplied on POST or PUT shipments. For the link to one of our integrated providers or Aftership tracking link, see the `generated_tracking_link` property. */ tracking_link?: string; /** @description Comments the shipper wishes to add. */ comments?: string; @@ -1021,7 +1066,7 @@ export interface components { }[]; /** @description The human-readable name for the `shipping_provider`. */ shipping_provider_display_name?: string; - /** @description The tracking link that is generated using the combination of either the `tracking_number` and `shipping_provider` or `tracking_number` and `tracking_carrier`. This will be empty if the custom `tracking_link` value is provided. */ + /** @description The link to one of our integrated providers or Aftership tracking link that is generated using the combination of either the `tracking_number` and `shipping_provider` or `tracking_number` and `tracking_carrier`. This will be empty if the custom `tracking_link` value is provided. */ generated_tracking_link?: string; }; /** orderConsignments_Resource */ @@ -1264,7 +1309,7 @@ export interface components { */ tracking_number?: string; /** - * @description The custom tracking link supplied on POST or PUT shipments. For the auto-generated tracking link see the `generated_tracking_link` property. + * @description The custom tracking link supplied on POST or PUT shipments. For the link to one of our integrated providers or Aftership tracking link see the `generated_tracking_link` property. * @example https://www.mycustomtrackinglink.com/tracking */ tracking_link?: string; @@ -1284,7 +1329,7 @@ export interface components { /** * Tracking Carrier * @description Tracking carrier for the shipment. - * Acceptable values for `tracking_carrier` include an empty string (`""`) or one of the valid [tracking-carrier values](https://github.com/bigcommerce/dev-docs/blob/master/assets/csv/tracking_carrier_values.csv). + * Acceptable values for `tracking_carrier` include an empty string (`""`) or one of the valid [tracking-carrier values](https://www.aftership.com/docs/tracking/others/supported-couriers). * @example */ tracking_carrier?: string; @@ -1326,12 +1371,12 @@ export interface components { /** * Tracking Carrier * @description Tracking carrier for the shipment. - * Acceptable values for `tracking_carrier` include an empty string (`""`) or one of the valid [tracking-carrier values](https://github.com/bigcommerce/dev-docs/blob/master/assets/csv/tracking_carrier_values.csv). + * Acceptable values for `tracking_carrier` include an empty string (`""`) or one of the valid [tracking-carrier values](https://www.aftership.com/docs/tracking/others/supported-couriers). * @example */ tracking_carrier?: string; /** - * @description The custom tracking link supplied on POST or PUT shipments. For the auto-generated tracking link see the `generated_tracking_link` property. + * @description The custom tracking link supplied on POST or PUT shipments. For the link to one of our integrated providers or Aftership tracking link see the `generated_tracking_link` property. * @example https://www.mycustomtrackinglink.com/tracking */ tracking_link?: string; @@ -1500,7 +1545,7 @@ export interface components { * @example false */ order_is_digital?: boolean; - /** @description The payment method for this order. Can be one of the following: `Manual`, `Credit Card`, `cash`, `Test Payment Gateway`, etc. */ + /** @description The payment method for this order. For example, `Manual`, `Credit Card`, `cash`, `Test Payment Gateway`, etc. */ payment_method?: string; /** * @description The external Transaction ID/Payment ID within this order’s payment provider (if a payment provider was used). @@ -1801,6 +1846,7 @@ export interface components { */ status_id?: number; billing_address?: components["schemas"]["billingAddress_Resp"]; + fees?: components["schemas"]["orderFees_Resp"][]; }; /** * Custom product @@ -2089,7 +2135,7 @@ export interface components { /** * @description This value identifies an external system that generated the order and submitted it to BigCommerce with the Orders API. * * When supplying the value, we recommend combining the type of system and vendor, e.g., ERP (Acumatica) or POS (Square). - * * If you are migrating historical orders processed on another eCommerce platform to BigCommerce, supply the following code as the value: M-MIG. This code will exclude historical orders from the store’s GMV/order count, which factors into pricing. + * * If you are migrating historical orders processed on another eCommerce platform to BigCommerce, supply the following code as the value: M-MIG. This code will exclude historical orders from the store’s GMV/order count, which factors into pricing. Also, this code will not affect the `total_sold` on products for imported orders. * * If you do not provide a value, then it will default to null. * @example null */ @@ -2143,7 +2189,7 @@ export interface components { * @example false */ order_is_digital?: boolean; - /** @description The payment method for this order. Can be one of the following: `Manual`, `Credit Card`, `Cash`,`Test Payment Gateway`, etc. */ + /** @description The payment method for this order. For example, `Manual`, `Credit Card`, `Cash`,`Test Payment Gateway`, etc. */ payment_method?: string; /** @description The external Transaction ID/Payment ID within this order’s payment provider (if a payment provider was used). */ payment_provider_id?: string | number; @@ -2222,6 +2268,7 @@ export interface components { * @example 0.0000 */ wrapping_cost_inc_tax?: string; + fees?: components["schemas"]["orderFees_Put"][]; }; /** * order_Post @@ -2240,6 +2287,7 @@ export interface components { shipping_method?: string; })[]; consignments?: components["schemas"]["orderConsignment_Post"]; + fees?: components["schemas"]["orderFees_Post"][]; }) & components["schemas"]["order_Shared"]; shippingAddress_Put: components["schemas"]["shippingAddress_Base"] & { /** @@ -2540,6 +2588,150 @@ export interface components { recipient_email?: string; line_items?: components["schemas"]["products_Resource"][]; }; + /** orderFees_Resp */ + orderFees_Resp: { + /** + * @description The unique numeric identifier of the fees object. + * @example 1 + */ + id?: number; + /** + * @description The type of the fee. + * @enum {string} + */ + type?: "custom_fee"; + /** + * @description The display name of the fee targeting customers. + * @example Package Protection Insurance + */ + display_name_customer?: string; + /** + * @description The display name of the fee targeting shoppers. + * @example Package Protection Fee + */ + display_name_merchant?: string; + /** + * @description The source of the request. + * @example v2 + */ + source?: string; + /** + * @description The base fee cost value. (Float, Float-As-String, Integer) + * @example 8.5 + */ + base_cost?: string | number; + /** + * @description The fee cost value excluding tax. (Float, Float-As-String, Integer) + * @example 8.5 + */ + cost_ex_tax?: string | number; + /** + * @description The fee cost value including tax. (Float, Float-As-String, Integer) + * @example 10 + */ + cost_inc_tax?: string | number; + /** + * @description The tax amount on the fee cost. (Float, Float-As-String, Integer) + * @example 1.5 + */ + cost_tax?: string | number; + /** + * @description A unique numeric identifier for the tax class. If not persisted or null, the default fee tax class from the control panel is used. + * @example 0 + */ + tax_class_id?: number | null; + }; + /** orderFees_Post */ + orderFees_Post: { + /** + * @description The type of the fee. + * @enum {string} + */ + type?: "custom_fee"; + /** + * @description The display name of the fee targeting customers. + * @example Package Protection Insurance + */ + display_name_customer?: string; + /** + * @description The display name of the fee targeting shoppers. NOTE - At least one of the following fields (display_name_customer, display_name_merchant) must be included in the request. + * @example Package Protection Fee + */ + display_name_merchant?: string; + /** + * @description The source of the request. + * @example v2 + */ + source?: string; + /** + * @description The fee cost value excluding tax. (Float, Float-As-String, Integer) + * @example 8.5 + */ + cost_ex_tax?: string | number; + /** + * @description The fee cost value including tax. (Float, Float-As-String, Integer) + * @example 10 + */ + cost_inc_tax?: string | number; + /** + * @description The tax amount on the fee cost. (Float, Float-As-String, Integer) NOTE - At least two of the following fields (cost_ex_tax, cost_inc_tax, and cost_tax) must be included in the request. + * @example 1.5 + */ + cost_tax?: string | number; + /** + * @description A unique numeric identifier for the tax class. If not provided or null, the default fee tax class from the control panel is used. + * @example 1 + */ + tax_class_id?: number | null; + }; + /** orderFees_Put */ + orderFees_Put: { + /** + * @description The unique numeric identifier of the fees object. + * @example 1 + */ + id?: number; + /** + * @description The type of the fee. + * @enum {string} + */ + type?: "custom_fee"; + /** + * @description The display name of the fee targeting customers. + * @example Package Protection Insurance + */ + display_name_customer?: string; + /** + * @description The display name of the fee targeting shoppers. NOTE - At least one of the following fields (display_name_customer, display_name_merchant) must be included in the request. + * @example Package Protection Fee + */ + display_name_merchant?: string; + /** + * @description The source of the request. + * @example v2 + */ + source?: string; + /** + * @description The fee cost value excluding tax. (Float, Float-As-String, Integer) + * @example 8.5 + */ + cost_ex_tax?: string | number; + /** + * @description The fee cost value including tax. (Float, Float-As-String, Integer) + * @example 10 + */ + cost_inc_tax?: string | number; + /** + * @description The tax amount on the fee cost. (Float, Float-As-String, Integer) NOTE - At least two of the following fields (cost_ex_tax, cost_inc_tax, and cost_tax) must be included in the request. + * @example 1.5 + */ + cost_tax?: string | number; + /** + * @description A unique numeric identifier for the tax class. If not provided or null, the default fee tax class from the control panel is used. + * @example 2 + */ + tax_class_id?: number | null; + }; }; responses: { /** @description Get All Order Status Collection Response. */ @@ -2663,8 +2855,8 @@ export interface components { status_id_path: number; /** @description The cart ID of the order. */ cart_id?: string; - /** @description The display name of the payment method used on the order. */ - payment_method?: "Manual" | "Cash on Delivery" | "Credit Card" | "Test Payment Gateway" | "Pay In Store"; + /** @description The display name of the payment method used on the order. For example, `Manual`, `Credit Card`, `cash`, `Test Payment Gateway`, etc.' */ + payment_method?: string; /** * @description Minimum date the order was created in RFC-2822 or ISO-8601. * @@ -2723,8 +2915,10 @@ export interface components { * @description * `consignments` - include the response returned from the request to the `/orders/{order_id}/consignments` endpoint. * * * `consignments.line_items` - include the response returned from the request to the `/orders/{order_id}/products` endpoint in consignments. This implies `include=consignments`. + * + * * `fees` - include the response returned from the request to the `/orders/{order_id}/fees` endpoint. */ - order_includes?: ("consignments" | "consignments.line_items")[]; + order_includes?: ("consignments" | "consignments.line_items" | "fees")[]; }; requestBodies: never; headers: never; @@ -2775,6 +2969,14 @@ export interface operations { * * After the update, the PUT request clears all discounts and promotions applied to the changed order line items. Since the order data syncs with other ERP systems, like Amazon or eBay, the updated order returns to the default setting, removing any applied discounts. * + * To update order fees, include the fee id in the request body along with all relevant fee fields. Fees not included will be deleted. Fees with an id will be updated, and fees without an id will be created as new. + * + * **Notes** + * + * * Sub-resources like products in the /v2/orders PUT request behave like PATCH, updating only the provided fields. Fees, however, follow standard PUT semantics and fees in the request body will fully replace existing ones. + * To retain an existing fee, include it in the body with its associated id. + * * The values for cost_ex_tax, cost_inc_tax and cost_tax in the fees payload should reflect the tax rate associated with the tax_class_id. For a 10% tax rate, the difference between cost_inc_tax and cost_ex_tax should be 10%. If no tax_class_id is provided, the store's default "tax class for fee" will apply. Incorrect data may lead to issues in downstream operations like refunds. + * * To learn more about creating or updating orders, see [Orders Overview](/docs/store-operations/orders). */ updateOrder: { @@ -2787,7 +2989,7 @@ export interface operations { order_id: components["parameters"]["order_id_path"]; }; }; - requestBody: { + requestBody?: { content: { "application/json": components["schemas"]["order_Put"]; }; @@ -2821,6 +3023,23 @@ export interface operations { */ getOrdersCount: { parameters: { + query?: { + min_id?: components["parameters"]["min_id"]; + max_id?: components["parameters"]["max_id"]; + min_total?: components["parameters"]["min_total"]; + max_total?: components["parameters"]["max_total"]; + customer_id?: components["parameters"]["customer_id"]; + email?: components["parameters"]["email"]; + status_id?: components["parameters"]["status_id"]; + cart_id?: components["parameters"]["cart_id"]; + payment_method?: components["parameters"]["payment_method"]; + min_date_created?: components["parameters"]["min_date_created"]; + max_date_created?: components["parameters"]["max_date_created"]; + min_date_modified?: components["parameters"]["min_date_modified"]; + max_date_modified?: components["parameters"]["max_date_modified"]; + channel_id?: components["parameters"]["channel_id"]; + external_order_id?: components["parameters"]["external_order_id"]; + }; header: { Accept: components["parameters"]["Accept"]; }; @@ -2893,6 +3112,14 @@ export interface operations { * This means that if the `consignments` array is present in the request, then _none_ of the following may be present and vice-versa: * - `shipping_addresses` * - `products` + * + * Include the `fees` object along with all its attributes in the request to create order-level fees for the newly created order. + * + * **Notes** + * + * * The values for cost_ex_tax, cost_inc_tax and cost_tax in the fees payload should reflect the tax rate associated with the tax_class_id. For a 10% tax rate, the difference between cost_inc_tax and cost_ex_tax should be 10%. If no tax_class_id is provided, the store's default "tax class for fee" will apply. Incorrect data may lead to issues in downstream operations like refunds. + * + * The V2 Orders API will not trigger the typical [Order Email](https://support.bigcommerce.com/s/article/Customizing-Emails?language=en_US) when creating orders. To create an order that does trigger this email, you can instead [create a cart](/docs/rest-management/carts/carts-single#create-a-cart) and [convert that cart into an order](/docs/rest-management/checkouts/checkout-orders#create-an-order). */ createOrder: { parameters: { @@ -3145,9 +3372,9 @@ export interface operations { * * There are three methods for generating a tracking link for a shipment: * - * 1. Use `shipping_provider` and `tracking_number`: This generates an automatic tracking link that you can click from the BigCommerce control panel and customer-facing emails. The `generated_tracking_link` property in the API response represents this tracking link. The `tracking_link` property in the API response will remain empty. + * 1. Use `shipping_provider` and `tracking_number`: This generates a link to one of our integrated providers that you can click from the BigCommerce control panel and customer-facing emails. If a merchant still needs to set up a shipping provider or if the provider is not one of our natively integrated providers, you will click on an Aftership tracking link instead. The `generated_tracking_link` property in the API response represents one of these tracking links. The `tracking_link` property in the API response will remain empty. * - * 2. Use `tracking_carrier` and `tracking_number`: This also creates an automatic tracking link that you can click in both the BigCommerce control panel and customer-facing emails. Like the previous method, the `generated_tracking_link` property in the API response represents this tracking link. The `tracking_link` property in the API response will remain empty. + * 2. Use `tracking_carrier` and `tracking_number`: This also creates a link to one of our integrated providers or an Aftership tracking link that you can click in both the BigCommerce control panel and customer-facing emails. Like the previous method, the `generated_tracking_link` property in the API response represents this tracking link. The `tracking_link` property in the API response will remain empty. * * 3. Supply a custom `tracking_link`: By providing a value for the `tracking_link` property, you can use your own tracking link within the BigCommerce control panel and in customer-facing emails. The API response will return your supplied tracking link as part of the `tracking_link` property in the response. In situations when there isn't a `generated_tracking_link`, the property in the API response will remain empty. * @@ -3164,7 +3391,7 @@ export interface operations { * - `shipperhq` * - `carrier_{your_carrier_id}`, when the carrier is a [third-party Shipping Provider](/docs/integrations/shipping) * - * Acceptable values for `tracking_carrier` include an empty string (`""`) or one of the valid [tracking-carrier values](https://github.com/bigcommerce/dev-docs/blob/master/assets/csv/tracking_carrier_values.csv). + * Acceptable values for `tracking_carrier` include an empty string (`""`) or one of the valid [tracking-carrier values](https://www.aftership.com/docs/tracking/others/supported-couriers). */ createOrderShipments: { parameters: { @@ -3466,4 +3693,24 @@ export interface operations { 404: components["responses"]["404_Resp"]; }; }; + /** + * Get Fees + * @description Get all fees for an order. + */ + getOrderFees: { + parameters: { + path: { + order_id: components["parameters"]["order_id_path"]; + }; + }; + responses: { + /** @description OK */ + 200: { + content: { + "application/json": components["schemas"]["orderFees_Resp"]; + }; + }; + 404: components["responses"]["404_Resp"]; + }; + }; } diff --git a/src/generated/orders.v3.ts b/src/generated/orders.v3.ts index 1497eef..688b826 100644 --- a/src/generated/orders.v3.ts +++ b/src/generated/orders.v3.ts @@ -1263,8 +1263,8 @@ export interface components { * * @enum {string} */ - item_type?: "PRODUCT" | "GIFT_WRAPPING" | "SHIPPING" | "HANDLING" | "ORDER"; - /** @description `order_product.id` corresponding to the item_types of PRODUCT, GIFT_WRAPPING. `order_address.id` corresponding to the item_types of SHIPPING, HANDLING. `order.id` corresponding to the item_type of ORDER. */ + item_type?: "PRODUCT" | "GIFT_WRAPPING" | "SHIPPING" | "HANDLING" | "ORDER" | "FEE"; + /** @description `order_product.id` corresponding to the item_types of PRODUCT, GIFT_WRAPPING. `order_address.id` corresponding to the item_types of SHIPPING, HANDLING. `order.id` corresponding to the item_type of ORDER, FEE. */ item_id?: number; /** @description Quantity of item refunded. Note: this will only be populated for item_type PRODUCT. */ quantity?: number; @@ -1300,7 +1300,7 @@ export interface components { error?: string; }; /** ItemsRefund */ - ItemsRefund: components["schemas"]["AmountBoundItem"] | components["schemas"]["QuantityBoundItem"] | components["schemas"]["TaxExemptItem"]; + ItemsRefund: components["schemas"]["AmountBoundItem"] | components["schemas"]["QuantityBoundItem"] | components["schemas"]["TaxExemptItem"] | components["schemas"]["FeeItem"]; /** Payment Request */ PaymentRequest: { /** @@ -1326,12 +1326,8 @@ export interface components { * @description Quantity Bound Item * * Type of refund item that capture refunding of items in the order that are of type quantity. - * * `ORDER` * * `PRODUCT` * * `GIFT_WRAPPING` - * * `SHIPPING` - * * `HANDLING` - * * `TAX` */ QuantityBoundItem: { /** @@ -1339,16 +1335,16 @@ export interface components { * @example PRODUCT * @enum {string} */ - item_type?: "ORDER" | "PRODUCT" | "GIFT_WRAPPING" | "SHIPPING" | "HANDLING" | "TAX"; + item_type: "PRODUCT" | "GIFT_WRAPPING"; /** * @description Order Product ID. * @example 1 */ - item_id?: number; + item_id: number; /** @description Array of product refund deductions */ adjustments?: components["schemas"]["RefundItemAdjustment"][]; /** @example 3 */ - quantity?: number; + quantity: number; /** * @description Reason for refund. * @example Wrong size. @@ -1373,6 +1369,29 @@ export interface components { */ description?: string; }; + /** + * Fee + * @description Use this field to refund a custom fee at the order level. + */ + FeeItem: { + /** + * @description The type of refund. + * @example FEE + * @enum {string} + */ + item_type?: "FEE"; + /** + * @description Numeric ID of the fee in the order. + * @example 1 + */ + item_id?: number; + amount?: components["schemas"]["Amount"]; + /** + * @description Reason for the refund. + * @example Customer requested refund + */ + reason?: string; + }; /** * Tax Exempt (Order Level) * @description Use this to refund a custom value at the order level. When `item_type` is set to `ORDER`, tax is not re-calculated. @@ -1398,12 +1417,11 @@ export interface components { * @description Amount Bound Item * * Type of refund item that capture refunding of items in the order that are of type amount. - * * `PRODUCT` * * `ORDER` - * * `GIFT_WRAPPING` * * `SHIPPING` * * `HANDLING` * * `TAX` + * * `FEE` */ AmountBoundItem: { /** @@ -1411,18 +1429,13 @@ export interface components { * @example SHIPPING * @enum {string} */ - item_type?: "PRODUCT" | "ORDER" | "GIFT_WRAPPING" | "SHIPPING" | "HANDLING" | "TAX"; + item_type: "ORDER" | "SHIPPING" | "HANDLING" | "TAX" | "FEE"; /** * @description Order address ID. * @example 1 */ - item_id?: number; - amount?: components["schemas"]["Amount"]; - /** - * @description Number of items in refund. - * @example 3 - */ - quantity?: number; + item_id: number; + amount: components["schemas"]["Amount"]; /** * @description Explanation of refund. * @example Customer requested refund @@ -1475,7 +1488,7 @@ export interface components { * @description Type of item that was refunded. * @enum {string} */ - item_type?: "PRODUCT" | "GIFT_WRAPPING" | "SHIPPING" | "HANDLING" | "ORDER"; + item_type?: "PRODUCT" | "GIFT_WRAPPING" | "SHIPPING" | "HANDLING" | "ORDER" | "FEE"; /** @description order_product.id corresponding to the item_types of PRODUCT, GIFT_WRAPPING. order_address.id corresponding to the item_types of SHIPPING, HANDLING. order.id corresponding to the item_type of ORDER. */ item_id?: number; /** @description Reason for refunding an item. */ @@ -1554,7 +1567,7 @@ export interface components { /** * Amount * Format: float - * @description A non-negative 2 decimal place rounded value that represents the amount that can be charged/refunded with payment providers. + * @description A non-negative 2 decimal place rounded value that represents the amount that can be charged/refunded with payment providers. When creating refunds and refund quotes, this field becomes irrelevant when you select PRODUCT or GIFT_WRAPPING for `item_type`. * @example 1.99 */ Amount: number; diff --git a/src/generated/pages.v3.ts b/src/generated/pages.v3.ts index 67b7935..936eb9a 100644 --- a/src/generated/pages.v3.ts +++ b/src/generated/pages.v3.ts @@ -28,10 +28,6 @@ export interface paths { /** * Delete Pages * @description Deletes one or more content pages. This endpoint supports bulk operations. - * - * > #### Warning - * > **Pay attention to query parameters** - * > If you attempt to delete multiple pages by passing more than one page ID to `id:in` and one or more of them does not exist, you will receive a 404 response. However, the pages corresponding to the page IDs that do exist will still be deleted. */ delete: operations["deletePages"]; parameters: { @@ -435,6 +431,13 @@ export interface components { idInQueryGet?: number[]; /** @description Request deletion of multiple pages by passing a comma-separated string of corresponding page IDs. Supports bulk operations. */ idInQueryDelete: number[]; + /** + * @description When you explicitly set this query parameter to `true`, deleting a parent page will recursively delete all its immediate children and their descendants. + * Otherwise, if you set this query parameter to `false` or not provided, deleting a parent page will update its immediate children by setting their `parent_id` to `0` and their `is_visible` status to `false`. + * + * @example true + */ + deleteChildrenQuery?: boolean; /** @description Name of the page. */ nameQuery?: string; /** @description Return only pages whose `name` or `body` contain the supplied string. */ @@ -571,15 +574,12 @@ export interface operations { /** * Delete Pages * @description Deletes one or more content pages. This endpoint supports bulk operations. - * - * > #### Warning - * > **Pay attention to query parameters** - * > If you attempt to delete multiple pages by passing more than one page ID to `id:in` and one or more of them does not exist, you will receive a 404 response. However, the pages corresponding to the page IDs that do exist will still be deleted. */ deletePages: { parameters: { query: { "id:in": components["parameters"]["idInQueryDelete"]; + delete_children?: components["parameters"]["deleteChildrenQuery"]; }; header: { Accept: components["parameters"]["Accept"]; diff --git a/src/generated/pricing.sf.ts b/src/generated/pricing.sf.ts index 1390ecf..f57d4c9 100644 --- a/src/generated/pricing.sf.ts +++ b/src/generated/pricing.sf.ts @@ -444,6 +444,11 @@ export interface operations { * @example USD */ currency_code: string; + /** + * @description An ISO 3166-1 alpha-2 shopper's country code representing a country or special geographic area. + * @example US + */ + country_code?: string; /** @description The customer group ID that's relevant for any customer group pricing, tax values, etc. */ customer_group_id: number; /** @description The items for which to fetch prices. */ diff --git a/src/generated/product-modifiers_catalog.v3.ts b/src/generated/product-modifiers_catalog.v3.ts index 6dabc72..874f501 100644 --- a/src/generated/product-modifiers_catalog.v3.ts +++ b/src/generated/product-modifiers_catalog.v3.ts @@ -190,6 +190,31 @@ export interface components { option_values?: { /** @description The unique numeric ID of the value; increments sequentially. */ id?: number; + /** + * @description The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. + * + * @example false + */ + is_default?: boolean; + /** @description Adjuster for Complex Rules. */ + adjusters?: { + price?: { + /** + * @description The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront. + * enum: + * - relative + * - percentage + * x-nullable: true + */ + adjuster?: string; + /** + * @description The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront. + * + * @example 5 + */ + adjuster_value?: number; + }; + }; }[]; /** @description The name of the option shown on the storefront. */ display_name: string; @@ -843,10 +868,34 @@ export interface operations { */ product_list_shipping_calc?: "none" | "weight" | "package"; }; - option_values?: { + /** @description Part of Modifier Value Response */ + option_values?: ({ /** @description The unique numeric ID of the value; increments sequentially. */ id?: number; - }[]; + /** + * @description The flag for preselecting a value as the default on the storefront. This field is not supported for swatch options/modifiers. + * + * @example false + */ + is_default?: boolean; + adjusters?: { + /** @description Adjuster for Complex Rules. */ + price?: { + /** + * @description The type of adjuster for either the price or the weight of the variant, when the modifier value is selected on the storefront. + * + * @enum {string} + */ + adjuster?: "relative" | "percentage"; + /** + * @description The numeric amount by which the adjuster will change either the price or the weight of the variant, when the modifier value is selected on the storefront. + * + * @example 5 + */ + adjuster_value?: number; + }; + }; + })[]; /** * @description The name of the option shown on the storefront. * diff --git a/src/generated/products_catalog.v3.ts b/src/generated/products_catalog.v3.ts index c2a0650..7d6bcfc 100644 --- a/src/generated/products_catalog.v3.ts +++ b/src/generated/products_catalog.v3.ts @@ -8,6 +8,11 @@ /** WithRequired type helpers */ type WithRequired = T & { [P in K]-?: T[P] }; +/** OneOf type helpers */ +type Without = { [P in Exclude]?: never }; +type XOR = (T | U) extends object ? (Without & U) | (Without & T) : T | U; +type OneOf = T extends [infer Only] ? Only : T extends [infer A, infer B, ...infer Rest] ? OneOf<[XOR, ...Rest]> : never; + export interface paths { "/catalog/products": { /** @@ -39,6 +44,7 @@ export interface paths { * - `type` * - `weight` * - `price` + * - `categories` (required when you enable the V2 product experience in the control panel) * * **Read-Only Fields** * - `id` @@ -308,9 +314,6 @@ export interface paths { /** * Get Product Custom Fields * @description Returns a list of product *Custom Fields*. You can pass in optional parameters. - * - * **Note:** - * The default rate limit for this endpoint is 40 concurrent requests. */ get: operations["getProductCustomFields"]; /** @@ -330,9 +333,6 @@ export interface paths { * **Limits** * - 200 custom fields per product limit. * - 250 characters per custom field limit. - * - * **Note:** - * The default rate limit for this endpoint is 40 concurrent requests. */ post: operations["createProductCustomField"]; parameters: { @@ -345,9 +345,6 @@ export interface paths { /** * Get a Product Custom Field * @description Returns a *Custom Field*. - * - * **Note:** - * The default rate limit for this endpoint is 40 concurrent requests. */ get: operations["getProductCustomField"]; /** @@ -366,15 +363,11 @@ export interface paths { * **Limits** * - 200 custom fields per product limit. * - 250 characters per custom field limit. - * - 40 concurrent requests default rate limit. */ put: operations["updateProductCustomField"]; /** * Delete a Product Custom Field * @description Deletes a product *Custom Field*. - * - * **Note:** - * The default rate limit for this endpoint is 40 concurrent requests. */ delete: operations["deleteProductCustomField"]; parameters: { @@ -883,6 +876,7 @@ export interface components { product_id?: number; /** @description Variant ID */ id?: number; + /** @description A unique user-defined alphanumeric product code/stock keeping unit (SKU). The SKU is always unique regardless of the letter case for both products and variants. */ sku?: string; /** @example 70 */ sku_id?: number; @@ -1051,33 +1045,30 @@ export interface components { */ productImage_Base: { /** - * @description The local path to the original image file uploaded to BigCommerce. Use image_url when creating a product. + * @description The URL for an image displayed on the storefront when the conditions are applied. Limit of 8MB per file. * - * Must be sent as a `multipart/form-data` field in the request body. Limit of 8 MB per file. + * Cannot be used with `image_file`. */ - image_file?: string; + image_url?: string; /** @description Flag for identifying whether the image is used as the productʼs thumbnail. */ is_thumbnail?: boolean; /** @description The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a `sort_order` the same as or greater than the imageʼs new `sort_order` value will have their `sort_order`s reordered. */ sort_order?: number; /** @description The description for the image. */ description?: string; + /** + * Format: date-time + * @description The date on which the product image was modified. + */ + date_modified?: string; }; /** - * productImage_Put - * @description The model for a PUT to update applicable Product Image fields. + * productImage_Post_Put + * @description The model for a POST or PUT to create or update applicable Product Image fields. */ - productImage_Put: { + productImage_Post_Put: { /** @description The unique numeric identifier for the product with which the image is associated. */ product_id?: number; - /** @description The zoom URL for this image. By default, this is used as the zoom image on product pages when zoom images are enabled. You should provide an image smaller than 1280x1280; otherwise, the API returns a resized image. */ - url_zoom?: string; - /** @description The standard URL for this image. By default, this is used for product-page images. */ - url_standard?: string; - /** @description The thumbnail URL for this image. By default, this is the image size used on the category page and in side panels. */ - url_thumbnail?: string; - /** @description The tiny URL for this image. By default, this is the image size used for thumbnails beneath the product image on a product page. */ - url_tiny?: string; } & components["schemas"]["productImage_Base"]; /** * productVideo_Base @@ -1130,7 +1121,7 @@ export interface components { * product_Put * @description The model for a PUT to update a product. */ - product_Put: Record & components["schemas"]["product_Base"]; + product_Put: Record & components["schemas"]["product_Base_PUT"]; /** * metafield_Base * @description Metafield for products, categories, variants, and brands; the max number of metafields allowed on each is 250. For more information, see [Platform Limits](https://support.bigcommerce.com/s/article/Platform-Limits) in the Help Center. @@ -1678,7 +1669,7 @@ export interface components { product_Put_Collection: ({ /** @description Unique ID of the *Product*. Read-Only. */ id: number; - } & components["schemas"]["product_Base"])[]; + } & components["schemas"]["product_Base_PUT"])[]; /** * config_Full * @description The values for option config can vary based on the Modifier created. @@ -1813,12 +1804,11 @@ export interface components { }; }; /** - * product_Base - * @description Shared `Product` properties used in: + * product_Base_POST + * @description `Product` properties used in: * * `POST` - * * `PUT` */ - product_Base: { + product_Base_POST: { /** * @description A unique product name. * @@ -1833,7 +1823,7 @@ export interface components { */ type: "physical" | "digital"; /** - * @description A unique user-defined alphanumeric product code/stock keeping unit (SKU). + * @description A unique user-defined alphanumeric product code/stock keeping unit (SKU). The SKU is always unique regardless of the letter case for both products and variants. * * @example SM-13 */ @@ -1890,6 +1880,250 @@ export interface components { tax_class_id?: number; /** @description Tax Codes, such as AvaTax System Tax Codes, identify products and services that fall into special sales-tax categories. By using these codes, merchants who subscribe to a tax provider integration, such as BigCommerceʼs Avalara Premium, can calculate sales taxes more accurately. Stores without a tax provider will ignore the code when calculating sales tax. Do not pass more than one code. The codes are case-sensitive. For details, please see the tax providerʼs documentation. */ product_tax_code?: string; + /** @description An array of IDs for the categories to which this product belongs. You will overwrite all product categories when updating a product and supplying an array of categories. The limit is 1,000 ID values. When you enable the catalog V2 product experience in the control panel, you must include the categories array in the request body. */ + categories?: number[]; + /** @description You can add a product to an existing brand during a product /PUT or /POST. Use either the `brand_id` or the `brand_name` field. The response body can include `brand_id`. */ + brand_id?: number; + /** + * @description You can create the brand during a product PUT or POST request. If the brand already exists, the product /PUT or /POST request adds the product to the brand. If not, the product /PUT or /POST request creates the brand and then adds the product to the brand. Brand name is not case-sensitive; "Common Good" and "Common good" are the same. Use either the `brand_id` or the `brand_name` field. The response body does not include `brand_name`. + * @example Common Good + */ + brand_name?: string; + /** + * @description Current inventory level of the product. You must track inventory by _product_ for this to take effect (see the `inventory_tracking` field). The Catalog API returns the inventory for only the default location. + * + * The inventory for a product cannot exceed 2,147,483,647 in the catalog. If you exceed the limit, the store sets the inventory level to the limit. + * + * The Catalog API handles limits in a different way than the Inventory API. For more information, see [Limit handling](/docs/store-operations/catalog/inventory-adjustments#limit-handling-in-inventory-versus-catalog-api). + */ + inventory_level?: number; + /** @description Inventory warning level for the product. When the productʼs inventory level drops below the warning level, the store owner will be informed. Simple inventory tracking must be enabled (see the `inventory_tracking` field) for this to take any effect. */ + inventory_warning_level?: number; + /** + * @description The type of inventory tracking for the product. Values are: `none` - inventory levels will not be tracked; `product` - inventory levels will be tracked using the `inventory_level` and `inventory_warning_level` fields; `variant` - inventory levels will be tracked based on variants, which maintain their own warning levels and inventory levels. + * + * @enum {string} + */ + inventory_tracking?: "none" | "product" | "variant"; + /** + * Format: float + * @description A fixed shipping cost for the product. If defined, this value will be used during checkout instead of normal shipping-cost calculation. + */ + fixed_cost_shipping_price?: number; + /** @description Flag used to indicate whether the product has free shipping. If `true`, the shipping cost for the product will be zero. */ + is_free_shipping?: boolean; + /** @description Flag to determine whether the product should be displayed to customers browsing the store. If `true`, the product will be displayed. If `false`, the product will be hidden from view. */ + is_visible?: boolean; + /** @description Flag to determine whether the product should be included in the `featured products` panel when viewing the store. */ + is_featured?: boolean; + /** @description An array of IDs for the related products. */ + related_products?: number[]; + /** @description Warranty information displayed on the product page. Can include HTML formatting. */ + warranty?: string; + /** @description The BIN picking number for the product. */ + bin_picking_number?: string; + /** @description The layout template file used to render this product category. This field is writable only for stores with a Blueprint theme applied. For stores with a Stencil theme applied, see [Custom Template Associations](/docs/rest-content/custom-template-associations). */ + layout_file?: string; + /** @description The product UPC code, which is used in feeds for shopping comparison sites and external channel integrations. */ + upc?: string; + /** @description A comma-separated list of keywords that can be used to locate the product when searching the store. */ + search_keywords?: string; + /** @description Availability text displayed on the checkout page, under the product title. Tells the customer how long it will normally take to ship this product, such as: 'Usually ships in 24 hours.' */ + availability_description?: string; + /** + * @description Availability of the product. (Corresponds to the productʼs [Purchasability](https://support.bigcommerce.com/s/article/Adding-Products-v3?language=en_US#sections) section in the control panel.) Supported values: `available` - the product is available for purchase; `disabled` - the product is listed on the storefront, but cannot be purchased; `preorder` - the product is listed for pre-orders. + * + * @enum {string} + */ + availability?: "available" | "disabled" | "preorder"; + /** + * @description Type of gift-wrapping options. Values: `any` - allow any gift-wrapping options in the store; `none` - disallow gift-wrapping on the product; `list` – provide a list of IDs in the `gift_wrapping_options_list` field. + * + * Always included in the response body; not applicable for the `include_fields` and `exclude_fields` query parameters. + * + * @enum {string} + */ + gift_wrapping_options_type?: "any" | "none" | "list"; + /** + * @description A list of gift-wrapping option IDs. + * + * Always included in the response body; not applicable for the `include_fields` and `exclude_fields` query parameters. + */ + gift_wrapping_options_list?: number[]; + /** @description Priority to give this product when included in product lists on category pages and in search results. Lower integers will place the product closer to the top of the results. */ + sort_order?: number; + /** + * @description The product condition. Will be shown on the product page if the `is_condition_shown` fieldʼs value is `true`. Possible values: `New`, `Used`, `Refurbished`. + * + * @enum {string} + */ + condition?: "New" | "Used" | "Refurbished"; + /** @description Flag used to determine whether the product condition is shown to the customer on the product page. */ + is_condition_shown?: boolean; + /** @description The minimum quantity an order must contain, to be eligible to purchase this product. */ + order_quantity_minimum?: number; + /** @description The maximum quantity an order can contain when purchasing the product. */ + order_quantity_maximum?: number; + /** @description Custom title for the product page. If not defined, the product name will be used as the meta title. */ + page_title?: string; + /** @description Custom meta keywords for the product page. If not defined, the storeʼs default keywords will be used. */ + meta_keywords?: string[]; + /** @description Custom meta description for the product page. If not defined, the storeʼs default meta description will be used. */ + meta_description?: string; + /** + * @deprecated + * @description The number of times the product has been viewed. + */ + view_count?: number; + /** + * Format: date-time + * @description Pre-order release date. See the `availability` field for details on setting a productʼs availability to accept pre-orders. + */ + preorder_release_date?: string | null; + /** @description Custom expected-date message to display on the product page. If undefined, the message defaults to the storewide setting. Can contain the `%%DATE%%` placeholder, which will be substituted for the release date. */ + preorder_message?: string; + /** + * @description If set to true then on the preorder release date the preorder status will automatically be removed. + * If set to false, then on the release date the preorder status **will not** be removed. It will need to be changed manually either in the + * control panel or using the API. Using the API set `availability` to `available`. + */ + is_preorder_only?: boolean; + /** @description False by default, indicating that this productʼs price should be shown on the product page. If set to `true`, the price is hidden. (NOTE: To successfully set `is_price_hidden` to `true`, the `availability` value must be `disabled`.) */ + is_price_hidden?: boolean; + /** @description By default, an empty string. If `is_price_hidden` is `true`, the value of `price_hidden_label` is displayed instead of the price. (NOTE: To successfully set a non-empty string value with `is_price_hidden` set to `true`, the `availability` value must be `disabled`.) */ + price_hidden_label?: string; + custom_url?: components["schemas"]["customUrl_Full"]; + /** + * @description Type of product, defaults to `product`. + * + * @enum {string} + */ + open_graph_type?: "product" | "album" | "book" | "drink" | "food" | "game" | "movie" | "song" | "tv_show"; + /** @description Title of the product, if not specified the product name will be used instead. */ + open_graph_title?: string; + /** @description Description to use for the product, if not specified then the meta_description will be used instead. */ + open_graph_description?: string; + /** @description Flag to determine if product description or open graph description is used. */ + open_graph_use_meta_description?: boolean; + /** @description Flag to determine if product name or open graph name is used. */ + open_graph_use_product_name?: boolean; + /** @description Flag to determine if product image or open graph image is used. */ + open_graph_use_image?: boolean; + /** @description Global Trade Item Number */ + gtin?: string; + /** @description Manufacturer Part Number */ + mpn?: string; + /** @description the date when the Product had been imported */ + date_last_imported?: string; + /** + * @description The total (cumulative) rating for the product. + * + * @example 3 + */ + reviews_rating_sum?: number; + /** + * @description The number of times the product has been rated. + * + * @example 4 + */ + reviews_count?: number; + /** + * @description The total quantity of this product sold. + * + * @example 80 + */ + total_sold?: number; + /** @description 200 maximum custom fields per product. 255 maximum characters per custom field. */ + custom_fields?: components["schemas"]["productCustomField_Put"][]; + bulk_pricing_rules?: ({ + /** @description Unique ID of the *Bulk Pricing Rule*. Read-Only. */ + id: number; + } & components["schemas"]["bulkPricingRule_Full"])[]; + images?: components["schemas"]["productImage_Full"][]; + /** + * @description The Catalog API integrates with third-party YouTube. + * The [YouTube Terms of Service](https://www.youtube.com/t/terms) and [Google Privacy Policy](https://policies.google.com/privacy) apply, as indicated in our [Privacy Policy](https://www.bigcommerce.com/privacy/) and [Terms of Service](https://www.bigcommerce.com/terms/). + */ + videos?: components["schemas"]["productVideo_Full"][]; + variants?: components["schemas"]["productVariant_Full"][]; + }; + /** + * product_Base_PUT + * @description `Product` properties used in: + * * `PUT` + */ + product_Base_PUT: { + /** + * @description A unique product name. + * + * @example Smith Journal 13 + */ + name?: string; + /** + * @description The product type. One of: `physical` - a physical stock unit, `digital` - a digital download. + * + * @example physical + * @enum {string} + */ + type?: "physical" | "digital"; + /** + * @description A unique user-defined alphanumeric product code/stock keeping unit (SKU). The SKU is always unique regardless of the letter case for both products and variants. + * + * @example SM-13 + */ + sku?: string; + /** + * @description The product description, which can include HTML formatting. + * + * @example

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi vel metus ac est egestas porta sed quis erat. Integer id nulla massa. Proin vitae enim nisi. Praesent non dignissim nulla. Nulla mattis id massa ac pharetra. Mauris et nisi in dolor aliquam sodales. Aliquam dui nisl, dictum quis leo sit amet, rutrum volutpat metus. Curabitur libero nunc, interdum ac libero non, tristique porttitor metus. Ut non dignissim lorem, in vestibulum leo. Vivamus sodales quis turpis eget.

+ */ + description?: string; + /** + * Format: float + * @description Weight of the product, which can be used when calculating shipping costs. This is based on the unit set on the store. + */ + weight?: number; + /** + * Format: float + * @description Width of the product, which can be used when calculating shipping costs. + */ + width?: number; + /** + * Format: float + * @description Depth of the product, which can be used when calculating shipping costs. + */ + depth?: number; + /** + * Format: float + * @description Height of the product, which can be used when calculating shipping costs. + */ + height?: number; + /** + * Format: float + * @description The price of the product. The price should include or exclude tax, based on the store settings. + */ + price?: number; + /** + * Format: float + * @description The cost price of the product. Stored for reference only; it is not used or displayed anywhere on the store. + */ + cost_price?: number; + /** + * Format: float + * @description The retail cost of the product. If entered, the retail cost price will be shown on the product page. + */ + retail_price?: number; + /** + * Format: float + * @description If entered, the sale price will be used instead of value in the price field when calculating the productʼs cost. + */ + sale_price?: number; + /** @description Minimum Advertised Price */ + map_price?: number; + /** @description The ID of the tax class applied to the product. (NOTE: Value ignored if automatic tax is enabled.) */ + tax_class_id?: number; + /** @description Tax Codes, such as AvaTax System Tax Codes, identify products and services that fall into special sales-tax categories. By using these codes, merchants who subscribe to a tax provider integration, such as BigCommerceʼs Avalara Premium, can calculate sales taxes more accurately. Stores without a tax provider will ignore the code when calculating sales tax. Do not pass more than one code. The codes are case-sensitive. For details, please see the tax providerʼs documentation. */ + product_tax_code?: string; /** @description An array of IDs for the categories to which this product belongs. When updating a product, if an array of categories is supplied, all product categories will be overwritten. Does not accept more than 1,000 ID values. */ categories?: number[]; /** @description You can add a product to an existing brand during a product /PUT or /POST. Use either the `brand_id` or the `brand_name` field. The response body can include `brand_id`. */ @@ -2043,7 +2277,7 @@ export interface components { * @example 80 */ total_sold?: number; - /** @description 200 maximum custom fields per product. 255 maximum characters per custom field. The default rate limit for this endpoint is 40 concurrent requests. */ + /** @description 200 maximum custom fields per product. 255 maximum characters per custom field. */ custom_fields?: components["schemas"]["productCustomField_Put"][]; bulk_pricing_rules?: ({ /** @description Unique ID of the *Bulk Pricing Rule*. Read-Only. */ @@ -2281,7 +2515,7 @@ export interface components { * @example 80 */ total_sold?: number; - /** @description 200 maximum custom fields per product. 255 maximum characters per custom field. The default rate limit for this endpoint is 40 concurrent requests. */ + /** @description 200 maximum custom fields per product. 255 maximum characters per custom field. */ custom_fields?: components["schemas"]["productCustomField_Put"][]; bulk_pricing_rules?: ({ /** @description Unique ID of the *Bulk Pricing Rule*. Read-Only. */ @@ -3036,7 +3270,7 @@ export interface components { /** @description Pass a comma-separated list to filter by one or more channel IDs. */ ChannelIdInParam?: number[]; /** @description A comma-separated list of sub-resources to return with a product object. When you specify `options` or `modifiers`, results are limited to 10 per page. */ - IncludeParam?: ("bulk_pricing_rules" | "reviews" | "modifiers" | "options" | "parent_relations" | "custom_fields")[]; + IncludeParam?: ("bulk_pricing_rules" | "reviews" | "modifiers" | "options" | "parent_relations" | "custom_fields" | "channels")[]; IdMinParam?: number; IdMaxParam?: number; IdGreaterParam?: number; @@ -3148,6 +3382,7 @@ export interface operations { /** @description Filter items by product ID. */ id?: number; "id:in"?: components["parameters"]["IdInParam"]; + "channel_id:in"?: components["parameters"]["ChannelIdInParam"]; "id:not_in"?: components["parameters"]["IdNotInParam"]; include?: components["parameters"]["IncludeParam"]; include_fields?: components["parameters"]["IncludeFieldsParam"]; @@ -3204,7 +3439,10 @@ export interface operations { 200: { content: { "application/json": { - data?: components["schemas"]["product_Full"][]; + data?: (components["schemas"]["product_Full"] & { + /** @description The channels to which the product is assigned. This field only appears in the response if you include `channels` in the `include` query parameter. */ + channels?: number[]; + })[]; meta?: components["schemas"]["metaCollection_Full"]; }; }; @@ -3416,6 +3654,7 @@ export interface operations { * - `type` * - `weight` * - `price` + * - `categories` (required when you enable the V2 product experience in the control panel) * * **Read-Only Fields** * - `id` @@ -3444,7 +3683,7 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["product_Base"]; + "application/json": components["schemas"]["product_Base_POST"]; }; }; responses: { @@ -3573,7 +3812,10 @@ export interface operations { 200: { content: { "application/json": { - data?: components["schemas"]["product_Full"]; + data?: components["schemas"]["product_Full"] & { + /** @description The channels to which the product is assigned. This field only appears in the response if you include `channels` in the `include` query parameter. */ + channels?: number[]; + }; meta?: components["schemas"]["metaEmpty_Full"]; }; }; @@ -3802,51 +4044,10 @@ export interface operations { }; requestBody: { content: { - "application/json": { - /** @description The unique numeric identifier for the product with which the image is associated. */ - product_id?: number; - /** @description The zoom URL for this image. By default, this is used as the zoom image on product pages when zoom images are enabled. You should provide an image smaller than 1280x1280; otherwise, the API returns a resized image. */ - url_zoom?: string; - /** @description The standard URL for this image. By default, this is used for product-page images. */ - url_standard?: string; - /** @description The thumbnail URL for this image. By default, this is the image size used on the category page and in side panels. */ - url_thumbnail?: string; - /** @description The tiny URL for this image. By default, this is the image size used for thumbnails beneath the product image on a product page. */ - url_tiny?: string; - /** - * Format: date-time - * @description The date on which the product image was modified. - */ - date_modified?: string; - /** @description Flag for identifying whether the image is used as the productʼs thumbnail. */ - is_thumbnail?: boolean; - /** @description The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a `sort_order` the same as or greater than the imageʼs new `sort_order` value will have their `sort_order`s reordered. */ - sort_order?: number; - /** @description The description for the image. */ - description?: string; - } & { - /** @description Must be a fully qualified URL path, including protocol. Limit of 8MB per file. */ - image_url?: string; - /** - * @description The local path to the original image file uploaded to BigCommerce. A `multipart/form-data` media type. - * - * Must be sent as a `multipart/form-data` field in the request body. Limit of 8 MB per file. - */ - image_file?: string; - }; + "application/json": components["schemas"]["productImage_Post_Put"]; "multipart/form-data": { - /** @description The unique numeric ID of the image; increments sequentially. */ - id?: number; /** @description The unique numeric identifier for the product with which the image is associated. */ product_id?: number; - /** @description The zoom URL for this image. By default, this is used as the zoom image on product pages when zoom images are enabled. You should provide an image smaller than 1280x1280; otherwise, the API returns a resized image. */ - url_zoom?: string; - /** @description The standard URL for this image. By default, this is used for product-page images. */ - url_standard?: string; - /** @description The thumbnail URL for this image. By default, this is the image size used on the category page and in side panels. */ - url_thumbnail?: string; - /** @description The tiny URL for this image. By default, this is the image size used for thumbnails beneath the product image on a product page. */ - url_tiny?: string; /** * Format: date-time * @description The date on which the product image was modified. @@ -3858,13 +4059,10 @@ export interface operations { sort_order?: number; /** @description The description for the image. */ description?: string; - } & { - /** @description Must be a fully qualified URL path, including protocol. Limit of 8MB per file. */ - image_url?: string; /** - * @description The local path to the original image file uploaded to BigCommerce. A `multipart/form-data` media type. + * @description The local path to the original image file uploaded to BigCommerce. Use image_url when creating a product. * - * Must be sent as a multipart/form-data field in the request body. Limit of 8 MB per file. + * Must be sent as a `multipart/form-data` field in the request body. Limit of 8 MB per file. Cannot be used with `image_url`. */ image_file?: string; }; @@ -3876,7 +4074,7 @@ export interface operations { content: { "application/json": { /** Product Image */ - data?: { + data?: OneOf<[{ /** @description The unique numeric ID of the image; increments sequentially. */ id?: number; /** @description The unique numeric identifier for the product with which the image is associated. */ @@ -3900,7 +4098,9 @@ export interface operations { sort_order?: number; /** @description The description for the image. */ description?: string; - } & { + /** @description Must be a fully qualified URL path, including protocol. Limit of 8MB per file. */ + image_url?: string; + }, { /** @description The unique numeric ID of the image; increments sequentially. */ id?: number; /** @description The unique numeric identifier for the product with which the image is associated. */ @@ -3925,7 +4125,13 @@ export interface operations { * @description The date on which the product image was modified. */ date_modified?: string; - }; + /** @description Flag for identifying whether the image is used as the productʼs thumbnail. */ + is_thumbnail?: boolean; + /** @description The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a `sort_order` the same as or greater than the imageʼs new `sort_order` value will have their `sort_order`s reordered. */ + sort_order?: number; + /** @description The description for the image. */ + description?: string; + }]>; meta?: components["schemas"]["metaEmpty_Full"]; }; }; @@ -4029,15 +4235,37 @@ export interface operations { }; requestBody: { content: { - "application/json": components["schemas"]["productImage_Put"]; + "application/json": components["schemas"]["productImage_Post_Put"]; + "multipart/form-data": { + /** @description The unique numeric identifier for the product with which the image is associated. */ + product_id?: number; + /** + * Format: date-time + * @description The date on which the product image was modified. + */ + date_modified?: string; + /** @description Flag for identifying whether the image is used as the productʼs thumbnail. */ + is_thumbnail?: boolean; + /** @description The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a `sort_order` the same as or greater than the imageʼs new `sort_order` value will have their `sort_order`s reordered. */ + sort_order?: number; + /** @description The description for the image. */ + description?: string; + /** + * @description The local path to the original image file uploaded to BigCommerce. Use image_url when creating a product. + * + * Must be sent as a `multipart/form-data` field in the request body. Limit of 8 MB per file. Cannot be used with `image_url`. + */ + image_file?: string; + }; }; }; responses: { + /** @description Success */ 200: { content: { "application/json": { /** Product Image */ - data?: { + data?: OneOf<[{ /** @description The unique numeric ID of the image; increments sequentially. */ id?: number; /** @description The unique numeric identifier for the product with which the image is associated. */ @@ -4061,15 +4289,18 @@ export interface operations { sort_order?: number; /** @description The description for the image. */ description?: string; - } & { + /** @description Must be a fully qualified URL path, including protocol. Limit of 8MB per file. */ + image_url?: string; + }, { /** @description The unique numeric ID of the image; increments sequentially. */ id?: number; /** @description The unique numeric identifier for the product with which the image is associated. */ product_id?: number; /** * @description The local path to the original image file uploaded to BigCommerce. Use image_url when creating a product. + * A `multipart/form-data` media type. * - * Must be sent as a `multipart/form-data` field in the request body. Limit of 8 MB per file. + * Must be sent as a multipart/form-data field in the request body. Limit of 8 MB per file. */ image_file?: string; /** @description The zoom URL for this image. By default, this is used as the zoom image on product pages when zoom images are enabled. You should provide an image smaller than 1280x1280; otherwise, the API returns a resized image. */ @@ -4085,7 +4316,13 @@ export interface operations { * @description The date on which the product image was modified. */ date_modified?: string; - }; + /** @description Flag for identifying whether the image is used as the productʼs thumbnail. */ + is_thumbnail?: boolean; + /** @description The order in which the image will be displayed on the product page. Higher integers give the image a lower priority. When updating, if the image is given a lower priority, all images with a `sort_order` the same as or greater than the imageʼs new `sort_order` value will have their `sort_order`s reordered. */ + sort_order?: number; + /** @description The description for the image. */ + description?: string; + }]>; meta?: components["schemas"]["metaEmpty_Full"]; }; }; @@ -5203,9 +5440,6 @@ export interface operations { /** * Get Product Custom Fields * @description Returns a list of product *Custom Fields*. You can pass in optional parameters. - * - * **Note:** - * The default rate limit for this endpoint is 40 concurrent requests. */ getProductCustomFields: { parameters: { @@ -5244,9 +5478,6 @@ export interface operations { * **Limits** * - 200 custom fields per product limit. * - 250 characters per custom field limit. - * - * **Note:** - * The default rate limit for this endpoint is 40 concurrent requests. */ createProductCustomField: { parameters: { @@ -5272,9 +5503,6 @@ export interface operations { /** * Get a Product Custom Field * @description Returns a *Custom Field*. - * - * **Note:** - * The default rate limit for this endpoint is 40 concurrent requests. */ getProductCustomField: { parameters: { @@ -5311,7 +5539,6 @@ export interface operations { * **Limits** * - 200 custom fields per product limit. * - 250 characters per custom field limit. - * - 40 concurrent requests default rate limit. */ updateProductCustomField: { parameters: { @@ -5338,9 +5565,6 @@ export interface operations { /** * Delete a Product Custom Field * @description Deletes a product *Custom Field*. - * - * **Note:** - * The default rate limit for this endpoint is 40 concurrent requests. */ deleteProductCustomField: { parameters: { diff --git a/src/generated/promotions.v3.ts b/src/generated/promotions.v3.ts index 9ebb3c6..18e1f19 100644 --- a/src/generated/promotions.v3.ts +++ b/src/generated/promotions.v3.ts @@ -579,6 +579,14 @@ export interface components { * @example 12.95 */ Money: string; + /** + * Collection Meta + * @description Contains data about paginating the response via cursors. If no pagination details are specified, then both properties will be present. When a 'before' or 'after' cursor is provided, only the 'cursor_pagination' property will be present. When a 'page' parameter is provided, only the offset based 'pagination' property will be present. + */ + OptionalCursorCollectionMeta: { + pagination?: components["schemas"]["DeprecatedPagination"]; + cursor_pagination?: components["schemas"]["CursorPagination"]; + }; /** * Collection Meta * @description Contains data about the response including pagination and collection totals. @@ -611,6 +619,74 @@ export interface components { next?: string; }; }; + /** + * Pagination + * @deprecated + * @description Data about the response, including pagination and collection totals. This property has been deprecated and cursor_pagination should be used instead. + */ + DeprecatedPagination: { + /** @description Total number of items in the result set. */ + total?: number; + /** @description Total number of items in the collection response. */ + count?: number; + /** @description The amount of items returned in the collection per page, controlled by the limit of items per page parameter. */ + per_page?: number; + /** @description The page you are currently on within the collection. */ + current_page?: number; + /** @description The total number of pages in the collection. */ + total_pages?: number; + /** @description Pagination links for the previous and next parts of the whole collection. */ + links?: { + /** @description Link to the previous page returned in the response. */ + previous?: string; + /** @description Link to the current page returned in the response. */ + current?: string; + /** @description Link to the next page returned in the response. */ + next?: string; + }; + }; + /** + * Cursor Pagination + * @description Contains data about paginating the response via cursors. + */ + CursorPagination: { + /** + * @description Total number of items in the result set. + * @example 12 + */ + count: number; + /** + * @description The amount of items returned in the collection per page, controlled by the limit of items per page parameter. + * @example 12 + */ + per_page: number; + /** + * @description The cursor to the first item in the result set. Can be used with the "before" query parameter to paginate backwards. This property is omitted when the result set is empty. + * + * @example eyJpZCI6IjIzNzU1NyJ9 + */ + start_cursor?: string; + /** + * @description The cursor to the last item in the result set. Can be used with the "after" query parameter to paginate forwards. This property is omitted when the result set is empty. + * + * @example eyJpZCI6IjIzNzU1NyJ9 + */ + end_cursor?: string; + links: { + /** + * @description Link to the previous page returned in the response. This property is omitted when the result set is empty or on the first page. + * + * @example ?limit=5&before=eyJpZCI6IjIzNzU1NyJ9 + */ + previous?: string; + /** + * @description Link to the next page returned in the response. This property is omitted when the result set is empty. + * + * @example ?limit=5&after=eyJpZCI6IjIzNzU1NyJ9 + */ + next?: string; + }; + }; /** Error Response */ ErrorResponse: { errors?: components["schemas"]["Error"][]; @@ -620,6 +696,32 @@ export interface components { status?: number; title?: string; }; + /** + * 400 Error Response + * @description The server cannot process the request because the syntax or data is invalid. + */ + ErrorResponse400: { + /** @description Bad request. */ + status?: string; + /** @description The error title describing the particular error. */ + title?: string; + /** @description Error payload for the BigCommerce API. */ + type?: string; + /** @description Detailed summary describing the particular error. */ + detail?: string; + }; + /** + * 403 Error Response + * @description The client is authenticated but does not have the necessary permissions to perform the requested action. + */ + ErrorResponse403: { + /** @description Forbidden. */ + status?: string; + /** @description The error title describing the particular error. */ + title?: string; + /** @description Error payload for the BigCommerce API. */ + error?: string; + }; /** * Notification * @description **Notification** @@ -888,7 +990,7 @@ export interface components { content: { "application/json": { data?: components["schemas"]["CouponCode"][]; - meta?: components["schemas"]["CollectionMeta"]; + meta?: components["schemas"]["OptionalCursorCollectionMeta"]; }; }; }; @@ -931,8 +1033,13 @@ export interface components { IdInQuery: number[]; /** @description Query parameter that specifies the page number in a paginated list of resources. */ PageQuery?: number; - /** @description Query parameter that limits the number of items displayed per page in a paginated list of resources. */ - LimitQuery: number; + /** + * @deprecated + * @description Query parameter that specifies the page number in a paginated list of resources. This field is deprecated and the 'before' and 'after' cursor parameters should be used instead. + */ + DeprecatedPageQuery?: number; + /** @description Query parameter that limits the number of items displayed per page in a paginated list of resources. When none is specified a default value of 50 is used. */ + LimitQuery?: number; /** @description Filter items by `name`. */ NameQuery?: string; /** @description Filter items by `code`. */ @@ -949,6 +1056,10 @@ export interface components { DirectionQuery?: "asc" | "desc"; /** @description The ID of the associated promotion. */ PromotionIdPath: string; + /** @description A cursor that can be used for backwards pagination. Will fetch results before the position corresponding to the cursor. Cannot be used with the 'page' query parameter. Cannot be used with the 'after' query parameter. */ + BeforeCursorQuery?: string; + /** @description A cursor that can be used for forwards pagination. Will fetch results after the position corresponding to the cursor. Cannot be used with the 'page' query parameter. Cannot be used with the 'before' query parameter. */ + AfterCursorQuery?: string; /** @description Filter promotions that target those `channel IDs`. Example: **?channels=1,2**. Note: promotions that target all the channels are included in the filtering result. */ ChannelQuery?: number[]; }; @@ -974,7 +1085,7 @@ export interface operations { */ getPromotions: { parameters: { - query: { + query?: { id?: components["parameters"]["IdQuery"]; name?: components["parameters"]["NameQuery"]; code?: components["parameters"]["CodeQuery"]; @@ -982,7 +1093,7 @@ export interface operations { redemption_type?: components["parameters"]["RedemptionTypeQuery"]; status?: components["parameters"]["StatusQuery"]; page?: components["parameters"]["PageQuery"]; - limit: components["parameters"]["LimitQuery"]; + limit?: components["parameters"]["LimitQuery"]; sort?: components["parameters"]["SortQuery"]; direction?: components["parameters"]["DirectionQuery"]; channels?: components["parameters"]["ChannelQuery"]; @@ -1025,6 +1136,18 @@ export interface operations { responses: { 201: components["responses"]["PromotionsResponse"]; /** @description The request payload was invalid. */ + 400: { + content: { + "application/json": components["schemas"]["ErrorResponse400"]; + }; + }; + /** @description The request payload was invalid. */ + 403: { + content: { + "application/json": components["schemas"]["ErrorResponse403"]; + }; + }; + /** @description The request payload was invalid. */ 422: { content: { "application/json": components["schemas"]["ErrorResponse"]; @@ -1150,6 +1273,12 @@ export interface operations { */ getPromotionCodes: { parameters: { + query?: { + before?: components["parameters"]["BeforeCursorQuery"]; + after?: components["parameters"]["AfterCursorQuery"]; + page?: components["parameters"]["DeprecatedPageQuery"]; + limit?: components["parameters"]["LimitQuery"]; + }; header: { Accept: components["parameters"]["Accept"]; }; diff --git a/src/generated/redirects.v3.ts b/src/generated/redirects.v3.ts index eb5599e..055e95e 100644 --- a/src/generated/redirects.v3.ts +++ b/src/generated/redirects.v3.ts @@ -272,6 +272,10 @@ export interface operations { site_id?: number; /** @description Filters items by redirect ID. Also accepts comma-separated values to filter for multiple redirects. */ "id:in"?: number[]; + /** @description Filters items by minimum redirect ID. */ + "id:min"?: number; + /** @description Filters items by maximum redirect ID. */ + "id:max"?: number; /** @description Controls the number of items to return per page. */ limit?: number; /** @description Specifies the page number in a limited (paginated) list of items. Used to paginate large collections. */ diff --git a/src/generated/settings.v3.ts b/src/generated/settings.v3.ts index 4167186..52a1bc9 100644 --- a/src/generated/settings.v3.ts +++ b/src/generated/settings.v3.ts @@ -384,9 +384,11 @@ export interface paths { * Update Storefront SEO Settings * @description Updates SEO settings. * - * - Channel ID can be used as a query parameter for updating channel-specific settings. If omitted, you will interact with the global settings only. + * - You can use `channel_id` as a query parameter to update channel-specific settings. If omitted, you will only interact with the global settings. * - * - `null` should be supplied to delete overrides per given channel and to inherit values from global level. Partial updates are not supported and all settings should be supplied with `null` value in order to delete overrides per channel. + * - You can use `channel_id` in the request body of a headless channel of this endpoint to control the `www_redirect` settings for the headless channel's unique checkout URL. + * + * - `null` should be supplied to delete overrides per given channel and to inherit values from a global level. */ put: operations["updateSettingsStorefrontSeo"]; parameters: { @@ -2046,9 +2048,11 @@ export interface operations { * Update Storefront SEO Settings * @description Updates SEO settings. * - * - Channel ID can be used as a query parameter for updating channel-specific settings. If omitted, you will interact with the global settings only. + * - You can use `channel_id` as a query parameter to update channel-specific settings. If omitted, you will only interact with the global settings. * - * - `null` should be supplied to delete overrides per given channel and to inherit values from global level. Partial updates are not supported and all settings should be supplied with `null` value in order to delete overrides per channel. + * - You can use `channel_id` in the request body of a headless channel of this endpoint to control the `www_redirect` settings for the headless channel's unique checkout URL. + * + * - `null` should be supplied to delete overrides per given channel and to inherit values from a global level. */ updateSettingsStorefrontSeo: { parameters: { diff --git a/src/generated/shipping.v2.ts b/src/generated/shipping.v2.ts index 98be75e..185946c 100644 --- a/src/generated/shipping.v2.ts +++ b/src/generated/shipping.v2.ts @@ -25,7 +25,7 @@ export interface paths { }; "/shipping/zones/{id}": { /** - * Get a Shipping Zones + * Get a Shipping Zone * @description Returns a single *Shipping Zone*. */ get: operations["getShippingZone"]; @@ -91,7 +91,7 @@ export interface paths { * #### USPS by Endicia Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | PriorityExpress, PriorityMailExpressInternational, FirstClassPackageInternationalService, Priority, PriorityMailInternational, First, ParcelSelect, MediaMail | * | packaging_type | array | FlatRateLegalEnvelope, FlatRatePaddedEnvelope, Parcel, SmallFlatRateBox, MediumFlatRateBox, LargeFlatRateBox, FlatRateEnvelope, RegionalRateBoxA, RegionalRateBoxB | * |show_transit_time | boolean | true, false | @@ -126,7 +126,7 @@ export interface paths { * #### FedEx Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | PRIORITY_OVERNIGHT, STANDARD_OVERNIGHT, FIRST_OVERNIGHT, FEDEX_2_DAY, FEDEX_EXPRESS_SAVER, INTERNATIONAL_PRIORITY, INTERNATIONAL_ECONOMY, INTERNATIONAL_FIRST, FEDEX_1_DAY_FREIGHT, FEDEX_2_DAY_FREIGHT, FEDEX_3_DAY_FREIGHT, FEDEX_GROUND, GROUND_HOME_DELIVERY, INTERNATIONAL_PRIORITY_FREIGHT, INTERNATIONAL_ECONOMY_FREIGHT, EUROPE_FIRST_INTERNATIONAL_PRIORITY | * | dropoff_type | string | REGULAR_PICKUP, REQUEST_COURIER, DROP_BOX, BUSINESS_SERVICE_CENTER, STATION | * | packaging_type | string | FEDEX_ENVELOPE, FEDEX_PAK, FEDEX_BOX, FEDEX_TUBE, FEDEX_10KG_BOX, FEDEX_25KG_BOX, YOUR_PACKAGING | @@ -164,7 +164,7 @@ export interface paths { * #### UPS Ready Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | 2nd_Day_Air, 2nd_Day_Air_AM, 3_Day_Select, Expedited, Express, Express_Plus, Express_Saver, Express_Early_AM, Ground, Next_Day_Air, Next_Day_Air_Early_AM, Next_Day_Air_Saver, Saver, Standard, Today_Dedicated_Courier, Today_Express, Today_Express_Saver, Today_Intercity, Today_Standard, Worldwide_Expedited, Worldwide_Express, Worldwide_Express_Plus, Worldwide_Express_Saver, Worldwide_Saver | * | destination_type | string | residential, business | * | packing_method | string | separate, combined | @@ -212,7 +212,7 @@ export interface paths { * #### Canada Post Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | DOM.RP, DOM.EP, DOM.XP, DOM.XP.CERT, DOM.PC DOM.LIB, USA.EP, USA.PW.ENV, USA.PW.PAK, USA.PW.PARCEL, USA.SP.AIR, USA.TP, USA.TP.LVM, USA.XP, INT.XP, INT.IP.AIR, INT.IP.SURF, INT.PW.ENV, INT.PW.PAK, INT.PW.PARCEL, INT.SP.AIR, INT.SP.SURF, INT.TP | * * ### Australia Post @@ -239,7 +239,7 @@ export interface paths { * #### Australia Post Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | AUS_LETTER_REGULAR_SMALL, AUS_LETTER_REGULAR_Large, AUS_LETTER_EXPRESS_SMALL, AUS_LETTER_EXPRESS_MEDIUM, AUS_LETTER_EXPRESS_LARGE, AUS_PARCEL_REGULAR, AUS_PARCEL_REGULAR_SATCHEL_500G, AUS_PARCEL_REGULAR_SATCHEL_3KG, AUS_PARCEL_REGULAR_SATCHEL_5KG, AUS_PARCEL_EXPRESS, AUS_PARCEL_EXPRESS_SATCHEL_500G, AUS_PARCEL_EXPRESS_SATCHEL_3KG, AUS_PARCEL_EXPRESS_SATCHEL_5KG, AUS_PARCEL_COURIER, AUS_PARCEL_COURIER_SATCHEL_MEDIUM, INT_PARCEL_COR_OWN_PACKAGING, INT_PARCEL_EXP_OWN_PACKAGING, INT_PARCEL_STD_OWN_PACKAGING, INT_PARCEL_AIR_OWN_PACKAGING, INT_PARCEL_SEA_OWN_PACKAGING | * * ### Royal Mail @@ -265,7 +265,7 @@ export interface paths { * #### Royal Mail Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | SpecialDelivery1pm, SpecialDelivery9am, SpecialDelivery1pmSaturday, SpecialDelivery9amSaturday, SignedForFirstClass, SignedForSecondClass, Express9, Express10, ExpressAM, Express24, Express48, StandardFirstClass, StandardSecondClass, InternationalStandard, InternationalTracked, InternationalEconomy | * * ### Zoom2U @@ -292,7 +292,7 @@ export interface paths { * #### Zoom2U Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | 3_hour, Same_day, VIP| * * ### Settings Objects @@ -304,7 +304,7 @@ export interface paths { * Object model for flat-rate shipping quotes per order. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | rate | number | Flat rate per order. | * * Example request body: @@ -327,7 +327,7 @@ export interface paths { * |:-----|:-----|:------------| * | rate | number | Flat rate per item. | * - * Ezample request body: + * Example request body: * * ```json * { @@ -344,7 +344,7 @@ export interface paths { * Object model for shipping quotes by weight. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | default_cost | number | null | Default shipping cost, applied either as a percentage of the orderʼs total value or as a fixed amount. If default cost is not required, you can supply a value of null. | * | default_cost_type | string | How the default shipping cost is calculated; either `percentage_of_total` or `fixed_amount`. | * | range | number | Array of [range](#range) objects. The units for these ranges' `lower_limit` and `upper_limit` properties depend on the default units set in the storeʼs control panel. | @@ -379,7 +379,7 @@ export interface paths { * Object model for shipping quotes by orderʼs total value. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | default_cost | number | null | Default shipping cost, applied either as a percentage of the orderʼs total value or as a fixed amount. If default cost is not required, you can supply a value of null. | * | default_cost_type | string | How the default shipping cost is calculated; either `percentage_of_total` or `fixed_amount`. | * | range | number | Array of [range](#range) objects. The units for these ranges' `lower_limit` and `upper_limit` properties are values in the storeʼs currency. | @@ -431,7 +431,7 @@ export interface paths { * Object model to define ranges for shipping quotes. Units are defined in the parent object. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | lower_limit | number | Lower limit for order total. | * | upper_limit | number | Upper limit for order total. | * | shipping_cost | number | Shipping cost for orders whose total falls between the lower and upper limits. | @@ -446,6 +446,25 @@ export interface paths { * "shipping_cost": 8 * } * ``` + * + * ### Channels + * + * Example request body: + * + * ```json + * { + * "name": "Method associated to channels 1, 3", + * "type": "peritem", + * "settings": { + * "rate": 5 + * }, + * channel_ids: [1, 3] + * } + * ``` + * + * | Property | Type | Description | + * | - | - | - | + * | channel_ids | array | Channels associated with the method as an array of integers. | */ post: operations["createShippingMethod"]; parameters: { @@ -483,6 +502,8 @@ export interface paths { * "type": "perorder", * "settings": { * "rate": 7 + * }, + * "channel_ids": [1] * }, * ``` * @@ -502,6 +523,8 @@ export interface paths { * "type": "peritem", * "settings": { * "rate": 8 + * }, + * "channel_ids: [1] * }, * ``` * @@ -536,7 +559,8 @@ export interface paths { * "shipping_cost": 12 * } * ] - * } + * }, + * "channel_ids": [1] * } * ``` * @@ -588,7 +612,8 @@ export interface paths { * "shipping_cost": 0 * } * ] - * } + * }, + * "channel_ids": [1] * } * ``` * @@ -611,6 +636,25 @@ export interface paths { * "shipping_cost": 8 * } * ``` + * + * ### Channels + * + * Example request body: + * + * ```json + * { + * "name": "Method associated to channels 1, 3", + * "type": "peritem", + * "settings": { + * "rate": 5 + * }, + * channel_ids: [1, 3] + * } + * ``` + * + * | Property | Type | Description | + * | - | - | - | + * | channel_ids | array | Channels associated with the method as an array of integers. | */ get: operations["getShippingMethod"]; /** @@ -629,7 +673,7 @@ export interface paths { * Object model for flat-rate shipping quotes per order. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | rate | number | Flat rate per order. | * * Example response: @@ -649,7 +693,7 @@ export interface paths { * Object model for flat-rate shipping quotes per item ordered. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | rate | number | Flat rate per item. | * * Example response: @@ -669,7 +713,7 @@ export interface paths { * Object model for shipping quotes by weight. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | default_cost | number | null | Default shipping cost, applied either as a percentage of the orderʼs total value or as a fixed amount. If default cost is not required, you can supply a value of null. | * | default_cost_type | string | How the default shipping cost is calculated; either `percentage_of_total` or `fixed_amount`. | * | range | number | Array of [range](#range) objects. The units for these ranges' `lower_limit` and `upper_limit` properties depend on the default units set in the storeʼs control panel. | @@ -705,7 +749,7 @@ export interface paths { * Object model for shipping quotes by orderʼs total value. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | default_cost | number | null | Default shipping cost, applied either as a percentage of the orderʼs total value or as a fixed amount. If default cost is not required, you can supply a value of null. | * | default_cost_type | string | How the default shipping cost is calculated; either `percentage_of_total` or `fixed_amount`. | * | range | number | Array of [range](#range) objects. The units for these ranges' `lower_limit` and `upper_limit` properties are values in the storeʼs currency. | @@ -757,7 +801,7 @@ export interface paths { * Object model to define ranges for shipping quotes. Units are defined in the parent object. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | lower_limit | number | Lower limit for order total. | * | upper_limit | number | Upper limit for order total. | * | shipping_cost | number | Shipping cost for orders whose total falls between the lower and upper limits. | @@ -771,6 +815,24 @@ export interface paths { * "shipping_cost": 8 * } * ``` + * ### Channels + * + * Example request body: + * + * ```json + * { + * "name": "Method associated to channels 1, 3", + * "type": "peritem", + * "settings": { + * "rate": 5 + * }, + * channel_ids: [1, 3] + * } + * ``` + * + * | Property | Type | Description | + * | - | - | - | + * | channel_ids | array | Channels associated with the method as an array of integers. | */ put: operations["updateShippingMethod"]; /** @@ -841,7 +903,7 @@ export interface paths { * * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | auth_key | string | Australia Post authorization key. | * | test_mode | boolean | Whether or not to use Australia Post test-mode settings. Acceptable values are `true` or `false`. | * @@ -874,7 +936,7 @@ export interface paths { * * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | account_id | string | Endicia account ID. | * | passphrase | string | Endicia passphrase. | * @@ -909,7 +971,7 @@ export interface paths { * * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | key | string | FedEx account ID. | * | password | string | FedEx passphrase. | * | account_number | string | FedEx account number. | @@ -995,7 +1057,7 @@ export interface paths { * * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | auth_key | string | Zoom2U authorization key. | * | test_mode | boolean | Whether or not to use Zoom2U test-mode settings. Acceptable values are `true` or `false`. | */ @@ -1208,6 +1270,14 @@ export interface components { * @example false */ is_fallback?: boolean; + /** + * @description List of channels associated to a method. When creating a new method, all available channels are associated by default. (Optional) + * @example [ + * 1, + * 3 + * ] + */ + channel_ids?: number[]; }; /** ShippingResponse */ ShippingResponse: Record; @@ -1401,7 +1471,7 @@ export interface operations { name: string; /** @enum {string} */ type: "zip" | "country" | "state" | "global"; - /** @description Array of zone locations. */ + /** @description Array of zone locations. BigCommerce has a platform limit of 40000 `zip` type locations. */ locations?: { /** * @description Location’s ID. @@ -1548,7 +1618,7 @@ export interface operations { }; }; /** - * Get a Shipping Zones + * Get a Shipping Zone * @description Returns a single *Shipping Zone*. */ getShippingZone: { @@ -1679,7 +1749,7 @@ export interface operations { name: string; /** @enum {string} */ type?: "zip" | "country" | "state" | "global"; - /** @description Array of zone locations. */ + /** @description Array of zone locations. BigCommerce has a platform limit of 40000 `zip` type locations. */ locations?: { /** * @description Location’s ID. @@ -1897,7 +1967,7 @@ export interface operations { * #### USPS by Endicia Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | PriorityExpress, PriorityMailExpressInternational, FirstClassPackageInternationalService, Priority, PriorityMailInternational, First, ParcelSelect, MediaMail | * | packaging_type | array | FlatRateLegalEnvelope, FlatRatePaddedEnvelope, Parcel, SmallFlatRateBox, MediumFlatRateBox, LargeFlatRateBox, FlatRateEnvelope, RegionalRateBoxA, RegionalRateBoxB | * |show_transit_time | boolean | true, false | @@ -1932,7 +2002,7 @@ export interface operations { * #### FedEx Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | PRIORITY_OVERNIGHT, STANDARD_OVERNIGHT, FIRST_OVERNIGHT, FEDEX_2_DAY, FEDEX_EXPRESS_SAVER, INTERNATIONAL_PRIORITY, INTERNATIONAL_ECONOMY, INTERNATIONAL_FIRST, FEDEX_1_DAY_FREIGHT, FEDEX_2_DAY_FREIGHT, FEDEX_3_DAY_FREIGHT, FEDEX_GROUND, GROUND_HOME_DELIVERY, INTERNATIONAL_PRIORITY_FREIGHT, INTERNATIONAL_ECONOMY_FREIGHT, EUROPE_FIRST_INTERNATIONAL_PRIORITY | * | dropoff_type | string | REGULAR_PICKUP, REQUEST_COURIER, DROP_BOX, BUSINESS_SERVICE_CENTER, STATION | * | packaging_type | string | FEDEX_ENVELOPE, FEDEX_PAK, FEDEX_BOX, FEDEX_TUBE, FEDEX_10KG_BOX, FEDEX_25KG_BOX, YOUR_PACKAGING | @@ -1970,7 +2040,7 @@ export interface operations { * #### UPS Ready Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | 2nd_Day_Air, 2nd_Day_Air_AM, 3_Day_Select, Expedited, Express, Express_Plus, Express_Saver, Express_Early_AM, Ground, Next_Day_Air, Next_Day_Air_Early_AM, Next_Day_Air_Saver, Saver, Standard, Today_Dedicated_Courier, Today_Express, Today_Express_Saver, Today_Intercity, Today_Standard, Worldwide_Expedited, Worldwide_Express, Worldwide_Express_Plus, Worldwide_Express_Saver, Worldwide_Saver | * | destination_type | string | residential, business | * | packing_method | string | separate, combined | @@ -2018,7 +2088,7 @@ export interface operations { * #### Canada Post Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | DOM.RP, DOM.EP, DOM.XP, DOM.XP.CERT, DOM.PC DOM.LIB, USA.EP, USA.PW.ENV, USA.PW.PAK, USA.PW.PARCEL, USA.SP.AIR, USA.TP, USA.TP.LVM, USA.XP, INT.XP, INT.IP.AIR, INT.IP.SURF, INT.PW.ENV, INT.PW.PAK, INT.PW.PARCEL, INT.SP.AIR, INT.SP.SURF, INT.TP | * * ### Australia Post @@ -2045,7 +2115,7 @@ export interface operations { * #### Australia Post Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | AUS_LETTER_REGULAR_SMALL, AUS_LETTER_REGULAR_Large, AUS_LETTER_EXPRESS_SMALL, AUS_LETTER_EXPRESS_MEDIUM, AUS_LETTER_EXPRESS_LARGE, AUS_PARCEL_REGULAR, AUS_PARCEL_REGULAR_SATCHEL_500G, AUS_PARCEL_REGULAR_SATCHEL_3KG, AUS_PARCEL_REGULAR_SATCHEL_5KG, AUS_PARCEL_EXPRESS, AUS_PARCEL_EXPRESS_SATCHEL_500G, AUS_PARCEL_EXPRESS_SATCHEL_3KG, AUS_PARCEL_EXPRESS_SATCHEL_5KG, AUS_PARCEL_COURIER, AUS_PARCEL_COURIER_SATCHEL_MEDIUM, INT_PARCEL_COR_OWN_PACKAGING, INT_PARCEL_EXP_OWN_PACKAGING, INT_PARCEL_STD_OWN_PACKAGING, INT_PARCEL_AIR_OWN_PACKAGING, INT_PARCEL_SEA_OWN_PACKAGING | * * ### Royal Mail @@ -2071,7 +2141,7 @@ export interface operations { * #### Royal Mail Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | SpecialDelivery1pm, SpecialDelivery9am, SpecialDelivery1pmSaturday, SpecialDelivery9amSaturday, SignedForFirstClass, SignedForSecondClass, Express9, Express10, ExpressAM, Express24, Express48, StandardFirstClass, StandardSecondClass, InternationalStandard, InternationalTracked, InternationalEconomy | * * ### Zoom2U @@ -2098,7 +2168,7 @@ export interface operations { * #### Zoom2U Object Properties * * | Property | Type | Values | - * |:---------|:-----|:-------| + * | - | - | - | * | delivery_services | array | 3_hour, Same_day, VIP| * * ### Settings Objects @@ -2110,7 +2180,7 @@ export interface operations { * Object model for flat-rate shipping quotes per order. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | rate | number | Flat rate per order. | * * Example request body: @@ -2133,7 +2203,7 @@ export interface operations { * |:-----|:-----|:------------| * | rate | number | Flat rate per item. | * - * Ezample request body: + * Example request body: * * ```json * { @@ -2150,7 +2220,7 @@ export interface operations { * Object model for shipping quotes by weight. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | default_cost | number | null | Default shipping cost, applied either as a percentage of the orderʼs total value or as a fixed amount. If default cost is not required, you can supply a value of null. | * | default_cost_type | string | How the default shipping cost is calculated; either `percentage_of_total` or `fixed_amount`. | * | range | number | Array of [range](#range) objects. The units for these ranges' `lower_limit` and `upper_limit` properties depend on the default units set in the storeʼs control panel. | @@ -2185,7 +2255,7 @@ export interface operations { * Object model for shipping quotes by orderʼs total value. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | default_cost | number | null | Default shipping cost, applied either as a percentage of the orderʼs total value or as a fixed amount. If default cost is not required, you can supply a value of null. | * | default_cost_type | string | How the default shipping cost is calculated; either `percentage_of_total` or `fixed_amount`. | * | range | number | Array of [range](#range) objects. The units for these ranges' `lower_limit` and `upper_limit` properties are values in the storeʼs currency. | @@ -2237,7 +2307,7 @@ export interface operations { * Object model to define ranges for shipping quotes. Units are defined in the parent object. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | lower_limit | number | Lower limit for order total. | * | upper_limit | number | Upper limit for order total. | * | shipping_cost | number | Shipping cost for orders whose total falls between the lower and upper limits. | @@ -2252,6 +2322,25 @@ export interface operations { * "shipping_cost": 8 * } * ``` + * + * ### Channels + * + * Example request body: + * + * ```json + * { + * "name": "Method associated to channels 1, 3", + * "type": "peritem", + * "settings": { + * "rate": 5 + * }, + * channel_ids: [1, 3] + * } + * ``` + * + * | Property | Type | Description | + * | - | - | - | + * | channel_ids | array | Channels associated with the method as an array of integers. | */ createShippingMethod: { parameters: { @@ -2276,7 +2365,10 @@ export interface operations { * "enabled": true, * "handling_fees": { * "fixed_surcharge": "3" - * } + * }, + * "channel_ids": [ + * 1 + * ] * } */ "application/json": components["schemas"]["shippingMethod_Base"]; @@ -2314,6 +2406,8 @@ export interface operations { * "type": "perorder", * "settings": { * "rate": 7 + * }, + * "channel_ids": [1] * }, * ``` * @@ -2333,6 +2427,8 @@ export interface operations { * "type": "peritem", * "settings": { * "rate": 8 + * }, + * "channel_ids: [1] * }, * ``` * @@ -2367,7 +2463,8 @@ export interface operations { * "shipping_cost": 12 * } * ] - * } + * }, + * "channel_ids": [1] * } * ``` * @@ -2419,7 +2516,8 @@ export interface operations { * "shipping_cost": 0 * } * ] - * } + * }, + * "channel_ids": [1] * } * ``` * @@ -2442,6 +2540,25 @@ export interface operations { * "shipping_cost": 8 * } * ``` + * + * ### Channels + * + * Example request body: + * + * ```json + * { + * "name": "Method associated to channels 1, 3", + * "type": "peritem", + * "settings": { + * "rate": 5 + * }, + * channel_ids: [1, 3] + * } + * ``` + * + * | Property | Type | Description | + * | - | - | - | + * | channel_ids | array | Channels associated with the method as an array of integers. | */ getShippingMethod: { parameters: { @@ -2497,6 +2614,14 @@ export interface operations { * @example false */ is_fallback?: boolean; + /** + * @description List of channels associated to a method. When creating a new method, all available channels are associated by default. (Optional) + * @example [ + * 1, + * 3 + * ] + */ + channel_ids?: number[]; }; }; }; @@ -2518,7 +2643,7 @@ export interface operations { * Object model for flat-rate shipping quotes per order. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | rate | number | Flat rate per order. | * * Example response: @@ -2538,7 +2663,7 @@ export interface operations { * Object model for flat-rate shipping quotes per item ordered. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | rate | number | Flat rate per item. | * * Example response: @@ -2558,7 +2683,7 @@ export interface operations { * Object model for shipping quotes by weight. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | default_cost | number | null | Default shipping cost, applied either as a percentage of the orderʼs total value or as a fixed amount. If default cost is not required, you can supply a value of null. | * | default_cost_type | string | How the default shipping cost is calculated; either `percentage_of_total` or `fixed_amount`. | * | range | number | Array of [range](#range) objects. The units for these ranges' `lower_limit` and `upper_limit` properties depend on the default units set in the storeʼs control panel. | @@ -2594,7 +2719,7 @@ export interface operations { * Object model for shipping quotes by orderʼs total value. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | default_cost | number | null | Default shipping cost, applied either as a percentage of the orderʼs total value or as a fixed amount. If default cost is not required, you can supply a value of null. | * | default_cost_type | string | How the default shipping cost is calculated; either `percentage_of_total` or `fixed_amount`. | * | range | number | Array of [range](#range) objects. The units for these ranges' `lower_limit` and `upper_limit` properties are values in the storeʼs currency. | @@ -2646,7 +2771,7 @@ export interface operations { * Object model to define ranges for shipping quotes. Units are defined in the parent object. * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | lower_limit | number | Lower limit for order total. | * | upper_limit | number | Upper limit for order total. | * | shipping_cost | number | Shipping cost for orders whose total falls between the lower and upper limits. | @@ -2660,6 +2785,24 @@ export interface operations { * "shipping_cost": 8 * } * ``` + * ### Channels + * + * Example request body: + * + * ```json + * { + * "name": "Method associated to channels 1, 3", + * "type": "peritem", + * "settings": { + * "rate": 5 + * }, + * channel_ids: [1, 3] + * } + * ``` + * + * | Property | Type | Description | + * | - | - | - | + * | channel_ids | array | Channels associated with the method as an array of integers. | */ updateShippingMethod: { parameters: { @@ -2683,7 +2826,11 @@ export interface operations { * }, * "handling_fees": { * "fixed_surcharge": "0" - * } + * }, + * "channel_ids": [ + * 2, + * 3 + * ] * } */ "application/json": components["schemas"]["shippingMethod_Base"]; @@ -2812,7 +2959,7 @@ export interface operations { * * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | auth_key | string | Australia Post authorization key. | * | test_mode | boolean | Whether or not to use Australia Post test-mode settings. Acceptable values are `true` or `false`. | * @@ -2845,7 +2992,7 @@ export interface operations { * * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | account_id | string | Endicia account ID. | * | passphrase | string | Endicia passphrase. | * @@ -2880,7 +3027,7 @@ export interface operations { * * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | key | string | FedEx account ID. | * | password | string | FedEx passphrase. | * | account_number | string | FedEx account number. | @@ -2966,7 +3113,7 @@ export interface operations { * * * | Property | Type | Description | - * |:---------|:-----|:------------| + * | - | - | - | * | auth_key | string | Zoom2U authorization key. | * | test_mode | boolean | Whether or not to use Zoom2U test-mode settings. Acceptable values are `true` or `false`. | */ diff --git a/src/generated/shipping.v3.ts b/src/generated/shipping.v3.ts index 05e64b2..127a131 100644 --- a/src/generated/shipping.v3.ts +++ b/src/generated/shipping.v3.ts @@ -47,6 +47,23 @@ export interface paths { }; }; }; + "/shipping/settings": { + /** + * Get Shipping Settings + * @description Get shipping settings. + */ + get: operations["getShippingSettings"]; + /** + * Update Shipping Settings + * @description Updates shipping settings. + */ + post: operations["updateShippingSettings"]; + parameters: { + header: { + Accept: components["parameters"]["Accept"]; + }; + }; + }; } export type webhooks = Record; @@ -82,6 +99,16 @@ export interface components { international_shipping: true | false; hs_codes: components["schemas"]["harmonizedSystemCodes"]; }; + shippingSettings: { + checkout?: { + /** + * @description The approach for displaying the list of countries at checkout. + * @example DISPLAY_ALL_COUNTRIES + * @enum {string} + */ + country_list_strategy?: "DISPLAY_ALL_COUNTRIES" | "DISPLAY_ONLY_SHIPPABLE_COUNTRIES"; + }; + }; /** * customsInformation * @description Data about the customs information object. @@ -387,4 +414,52 @@ export interface operations { }; }; }; + /** + * Get Shipping Settings + * @description Get shipping settings. + */ + getShippingSettings: { + parameters: { + header: { + Accept: components["parameters"]["Accept"]; + }; + }; + responses: { + 200: { + content: { + "application/json": { + data?: components["schemas"]["shippingSettings"]; + meta?: Record; + }; + }; + }; + }; + }; + /** + * Update Shipping Settings + * @description Updates shipping settings. + */ + updateShippingSettings: { + parameters: { + header: { + Accept: components["parameters"]["Accept"]; + "Content-Type": components["parameters"]["ContentType"]; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["shippingSettings"]; + }; + }; + responses: { + 200: { + content: { + "application/json": { + data?: components["schemas"]["shippingSettings"]; + meta?: Record; + }; + }; + }; + }; + }; } diff --git a/src/generated/store_content.v2.ts b/src/generated/store_content.v2.ts index 2feb34f..4a5fed2 100644 --- a/src/generated/store_content.v2.ts +++ b/src/generated/store_content.v2.ts @@ -154,6 +154,7 @@ export interface paths { * @deprecated * @description Updates a *Page*. The request payload limit is 1MB. * + * * **Read Only Fields** * * id * @@ -161,6 +162,7 @@ export interface paths { * > **Deprecated** * > * This API operation is deprecated. Avoid using this API operation if possible. It will be removed in a future version. * > * To update multiple pages, use Pages V3ʼs [Update pages](/docs/rest-content/pages#update-pages) endpoint. To update a single page, use Pages V3ʼs [Update a page](/docs/rest-content/pages#update-a-page) endpoint. + * > * Updating the channel ID for a page is not supported. */ put: operations["updatePage"]; /** @@ -903,7 +905,7 @@ export interface components { /** page_Base_Res */ page_Base_Res: { /** - * @description channel ID + * @description Channel ID. * @example 11 */ channel_id?: number; @@ -1375,6 +1377,7 @@ export interface operations { * @deprecated * @description Updates a *Page*. The request payload limit is 1MB. * + * * **Read Only Fields** * * id * @@ -1382,6 +1385,7 @@ export interface operations { * > **Deprecated** * > * This API operation is deprecated. Avoid using this API operation if possible. It will be removed in a future version. * > * To update multiple pages, use Pages V3ʼs [Update pages](/docs/rest-content/pages#update-pages) endpoint. To update a single page, use Pages V3ʼs [Update a page](/docs/rest-content/pages#update-a-page) endpoint. + * > * Updating the channel ID for a page is not supported. */ updatePage: { parameters: { diff --git a/src/generated/subscribers.v3.ts b/src/generated/subscribers.v3.ts index c5d39e1..f9097ce 100644 --- a/src/generated/subscribers.v3.ts +++ b/src/generated/subscribers.v3.ts @@ -328,8 +328,16 @@ export interface components { FilterOrderIdParam?: number; /** @description Filter items by date_modified. For example `v3/catalog/products?date_last_imported:min=2018-06-15` */ FilterDateModifiedParam?: string; + /** @description Filter items by minimum date modified, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields modified after this date. */ + FilterDateModifiedMinParam?: string; + /** @description Filter items by maximum date modified, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields modified before this date. */ + FilterDateModifiedMaxParam?: string; /** @description Filter items by date_created. */ FilterDateCreatedParam?: string; + /** @description Filter items by minimum date created, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields created after this date. */ + FilterDateCreatedMinParam?: string; + /** @description Filter items by maximum date created, for example, `2024-05-14T09:34:00` or `2024-05-14`. Returns metafields created before this date. */ + FilterDateCreatedMaxParam?: string; /** @description Specifies the page number in a limited (paginated) list of products. */ PageParam?: number; /** @description Controls the number of items per page in a limited (paginated) list of products. */ @@ -340,6 +348,11 @@ export interface components { DirectionParam?: "asc" | "desc"; /** @description Filter items by ID. */ IdParam: number; + /** + * @description Filter items by ID. + * `id:in=4,5,6` + */ + IdInParam?: number[]; /** @description The ID of the subscriber requested. */ SubscriberIdParam: number; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ @@ -371,10 +384,15 @@ export interface operations { source?: components["parameters"]["FilterSourceParam"]; order_id?: components["parameters"]["FilterOrderIdParam"]; date_created?: components["parameters"]["FilterDateCreatedParam"]; + "date_created:min"?: components["parameters"]["FilterDateCreatedMinParam"]; + "date_created:max"?: components["parameters"]["FilterDateCreatedMaxParam"]; date_modified?: components["parameters"]["FilterDateModifiedParam"]; + "date_modified:min"?: components["parameters"]["FilterDateModifiedMinParam"]; + "date_modified:max"?: components["parameters"]["FilterDateModifiedMaxParam"]; page?: components["parameters"]["PageParam"]; limit?: components["parameters"]["LimitParam"]; id: components["parameters"]["IdParam"]; + "id:in"?: components["parameters"]["IdInParam"]; }; header: { Accept: components["parameters"]["Accept"]; diff --git a/src/generated/tax_provider.ts b/src/generated/tax_provider.ts index a0fb3dc..6fbb973 100644 --- a/src/generated/tax_provider.ts +++ b/src/generated/tax_provider.ts @@ -110,7 +110,7 @@ export interface components { quantity: number; tax_class?: components["schemas"]["TaxClass"]; /** - * @description Flag whether or not this item is always tax-exempt. For example, gift certificate purchases and order-level refunds are tax-exempt. Tax-exempt items are included in the request for auditing purposes. + * @description Flag whether or not this item is always tax-exempt. For example, gift certificate purchases and order-level refunds are tax-exempt. Tax-exempt items are included in the request for auditing purposes. Tax-exempt items must have a tax amount of zero within the tax quote response. * @default false */ tax_exempt?: boolean; diff --git a/src/generated/widgets.v3.ts b/src/generated/widgets.v3.ts index 0e3ac1d..fb46a16 100644 --- a/src/generated/widgets.v3.ts +++ b/src/generated/widgets.v3.ts @@ -495,7 +495,7 @@ export interface components { */ conditional?: { /** - * @description The ID of the `setting` object the conditional attribute is related to. + * @description The ID of the `settings` object the conditional attribute is related to. The key must be defined within the same settings array as the conditional property. This ensures the conditional logic is scoped to the relevant settings group. * @example backgroundType */ key?: string; @@ -609,7 +609,7 @@ export interface components { */ conditional?: { /** - * @description The ID of the `setting` object the conditional attribute is related to. + * @description The ID of the `settings` object the conditional attribute is related to. You must define the key within the same settings array as the conditional property to scope the conditional logic to the relevant settings group. * @example backgroundType */ key?: string; @@ -631,7 +631,7 @@ export interface components { */ widgetSchemaConditional: { /** - * @description The ID of the `setting` object the conditional attribute is related to. + * @description The ID of the `settings` object the conditional attribute is related to. You must define the key within the same settings array as the conditional property to scope the conditional logic to the relevant settings group. * @example backgroundType */ key?: string;