/** * This file was auto-generated by openapi-typescript and ts-morph. * Do not make direct changes to the file. */ export interface paths { readonly "/promotions/settings": { readonly parameters: { readonly query?: never; readonly header: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; /** * Get Global Promotion Settings * @description Returns global promotion settings. */ readonly get: operations["getGlobalPromotionSettings"]; /** * Update Global Promotion Settings * @description - Updates global promotion settings. * - Note: *promotions_apply_on_products_with_custom_product_price*, *number_of_coupons_allowed_at_checkout* and *promotions_triggered_by_products_with_zero_product_price* can only be modified by enterprise accounts. */ readonly put: operations["updateGlobalPromotionSettings"]; }; } export type webhooks = Record; export interface components { schemas: { readonly GlobalPromotionSettings: { /** * @description - When the property is set to "true", promotions will apply for products with custom pricing. * - When the property is set to "false", promotions will not apply for products with custom pricing. * - Note: This field can only be edited for Enterprise Accounts. * @default false * @example false */ readonly promotions_apply_on_products_with_custom_product_price: boolean; /** * @description - When the property is set to "true", promotions will be triggered by zero price products. * - When the property is set to "false", promotions will not be triggered by zero price products. * - Note: This field can only be edited for Enterprise Accounts. * @default false * @example false */ readonly promotions_triggered_by_products_with_zero_product_price: boolean; /** * @description Specifies the number of coupons allowed at checkout on a single order. * - Note: This field can only be edited for Enterprise Accounts. * @default 1 * @example 1 */ readonly number_of_coupons_allowed_at_checkout: number; /** * @description - When the property is set to "true", promotions in a cart are calculated independently, each applied to the original price of the included products. * - When the property is set to "false", promotions in a cart are calculated cumulatively, applied to the order sub-total based on your promotion order. * @default true * @example true */ readonly promotions_applied_on_original_product_price: boolean; }; readonly ErrorResponse400: { readonly schema?: components["schemas"]["betaErrorResponse400"]; }; readonly ErrorResponse403: { readonly schema?: components["schemas"]["betaErrorResponse403"]; }; readonly ErrorResponse422: { readonly schema?: components["schemas"]["betaErrorResponse422"]; }; readonly betaErrorResponse400: components["schemas"]["BaseError"] & { readonly error?: { /** @example Bad request. Authentication Required. */ readonly message?: string; }; }; readonly betaErrorResponse403: components["schemas"]["BaseError"] & { readonly error?: { /** @example Forbidden. Operation cannot be performed with existing privileges. */ readonly message?: string; }; }; readonly betaErrorResponse422: components["schemas"]["BaseError"] & { readonly errors?: readonly { /** @description The field that caused the validation error. */ readonly field?: string; /** @description A specific error message describing the issue. */ readonly message?: string; }[]; }; /** @description Error payload for the BigCommerce API. * */ readonly BaseError: { /** @description The HTTP status code. * */ readonly status?: number; /** @description The error title describing the particular error. * */ readonly title?: string; }; }; responses: never; parameters: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept: string; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly ContentType: string; }; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { readonly getGlobalPromotionSettings: { readonly parameters: { readonly query?: never; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description OK */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { /** @example { * "promotions_triggered_by_products_with_zero_product_price": true, * "promotions_apply_on_products_with_custom_product_price": false, * "number_of_coupons_allowed_at_checkout": 1, * "promotions_applied_on_original_product_price": true * } */ readonly "application/json": components["schemas"]["GlobalPromotionSettings"]; }; }; /** @description Bad request. */ readonly 400: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["ErrorResponse400"]; }; }; }; }; readonly updateGlobalPromotionSettings: { readonly parameters: { readonly query?: never; readonly header?: { /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body. */ readonly Accept?: components["parameters"]["Accept"]; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly "Content-Type"?: components["parameters"]["ContentType"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody: { readonly content: { /** @example { * "promotions_triggered_by_products_with_zero_product_price": true, * "promotions_apply_on_products_with_custom_product_price": false, * "number_of_coupons_allowed_at_checkout": 1, * "promotions_applied_on_original_product_price": true * } */ readonly "application/json": components["schemas"]["GlobalPromotionSettings"]; }; }; readonly responses: { /** @description OK */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["GlobalPromotionSettings"]; }; }; /** @description Bad request. */ readonly 400: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["ErrorResponse400"]; }; }; /** @description Promotion settings data is not valid. This is the result of missing required fields, or of invalid data. See the response for more details. */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["ErrorResponse422"]; }; }; }; }; }