/** * This file was auto-generated by openapi-typescript and ts-morph. * Do not make direct changes to the file. */ export interface paths { readonly "/content/pages": { readonly parameters: { readonly query?: never; readonly header: { readonly Accept: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; /** * Get Pages * @description Returns one or more content pages. This endpoint supports bulk operations. */ readonly get: operations["getPages"]; /** * Update Pages * @description Updates one or more content pages. This endpoint supports bulk operations. */ readonly put: operations["updatePages"]; /** * Create Pages * @description Creates one or more content pages. This endpoint supports bulk operations. */ readonly post: operations["createPages"]; /** * Delete Pages * @description Deletes one or more content pages. This endpoint supports bulk operations. */ readonly delete: operations["deletePages"]; }; readonly "/content/pages/{pageId}": { readonly parameters: { readonly query?: never; readonly header: { readonly Accept: components["parameters"]["Accept"]; }; readonly path: { /** @description The ID of the page to be operated on. */ readonly pageId: components["parameters"]["pageIdPath"]; }; readonly cookie?: never; }; /** * Get a Page * @description Returns one content page. * * > #### Warning * > **Pay attention to query parameters** * > This endpoint recognizes the same query parameters as [Get Multiple Pages](/docs/rest-content/pages#get-pages). If the requested page does not meet the query parameters you specify, you will receive a 404 response even if the requested `pageId` does exist. */ readonly get: operations["getPage"]; /** * Update a Page * @description Updates one content page. */ readonly put: operations["updatePage"]; /** * Delete a Page * @description Deletes one content page. * * > #### Warning * > **Query parameters not recognized** * > This endpoint does not recognize query parameters. */ readonly delete: operations["deletePage"]; }; } export type webhooks = Record; export interface components { schemas: { /** @description Error payload for the BigCommerce API. * */ readonly ResponseErrorBrief: { /** @description The HTTP status code. * */ readonly status: number; /** @description The error title describing the particular error. * */ readonly title?: string; readonly type?: string; }; /** @description Error payload for the BigCommerce API. * */ readonly ResponseErrorDetailed: { /** @description The HTTP status code. * */ readonly status: number; /** @description The error title describing the particular error. * */ readonly title?: string; readonly type?: string; readonly detail?: string; }; /** * ResponseErrorItemized * @description Error payload for the BigCommerce API. * */ readonly ResponseErrorItemized: { /** @description The HTTP status code. * */ readonly status: number; /** @description The error title describing the particular error. * */ readonly title?: string; readonly type?: string; readonly errors?: readonly string[]; }; /** @description Data about the response, including pagination and collection totals. * */ readonly ResponseMeta: { /** @description Data about the response, including pagination and collection totals. * */ readonly pagination?: { /** @description Total number of items in the result set. * */ readonly total?: number; /** @description Total number of items in the collection response. * */ readonly count?: number; /** @description The amount of items returned in the collection per page, controlled by the limit parameter. * */ readonly per_page?: number; /** @description The page you are currently on within the collection. * */ readonly current_page?: number; /** @description The total number of pages in the collection. * */ readonly total_pages?: number; /** @description Pagination links for the previous and next parts of the whole collection. * */ readonly links?: { /** @description Link to the previous page returned in the response. * */ readonly previous?: string; /** @description Link to the current page returned in the response. * */ readonly current?: string; /** @description Link to the next page returned in the response. * */ readonly next?: string; }; }; }; /** * Body * @description Response payload for the BigCommerce API. * */ readonly PagesCollectionResponse: { readonly data?: readonly (components["schemas"]["typePage"] | components["schemas"]["typeBlog"] | components["schemas"]["typeContactForm"] | components["schemas"]["typeRaw"] | components["schemas"]["typeLink"])[]; readonly meta?: components["schemas"]["ResponseMeta"]; }; /** * PageResponseObject * @description Response payload for a single content page. * */ readonly SinglePageResponse: { readonly data?: components["schemas"]["typePage"] | components["schemas"]["typeBlog"] | components["schemas"]["typeContactForm"] | components["schemas"]["typeRaw"] | components["schemas"]["typeLink"]; readonly meta?: components["schemas"]["ResponseMeta"]; }; /** @description Properties of the page modification request body. */ readonly PagePutObj: { /** * @description The ID of the channel where this page should be shown. * * @default 1 * @example 12 */ readonly channel_id: number; /** * @description The name of the page. Must be unique. * * @example My Store Page */ readonly name?: string; /** @description Boolean value that specifies the visibility of the page in the storefront’s navigation menu. * * Indicates whether the page is available to users and visible in any menus. * */ readonly is_visible?: boolean; /** * @description ID of any parent Web page. * * @default 0 * @example 0 */ readonly parent_id: number; /** * @description Specifies the order in which the page is displayed on the storefront. (Lower integers specify earlier display.) * * @default 0 * @example 0 */ readonly sort_order: number; /** * @description Specifies the type of page. See [Pages V3 page types](/docs/rest-content/pages#page-types) for more about the differences. * @example page * @enum {string} */ readonly type?: "page" | "raw" | "contact_form" | "link" | "blog"; /** * @description HTML or variable that populates the element of this page, in default/desktop view. Required in a `POST` request if the page type is `raw`. * * @example
Hello World!
*/ readonly body?: string | null; /** @description Boolean value that specifies whether this page is the storefront’s home page. * */ readonly is_homepage?: boolean; /** @description Boolean value. When `true`, this page is visible only to logged-in customers. * */ readonly is_customers_only?: boolean; /** @description Applicable when the page type is `contact_form`: contact email address that receives messages sent via the form. Must be unique. */ readonly email?: string; readonly meta_title?: string | null; /** @description Required in a `POST` request to create a link if the page type is `link`. * */ readonly link?: string; /** * @description Applicable when the page type is `contact_form`: comma-separated list of keywords representing the fields enabled in the control panel for storefront display. Possible fields include: * * |Field|Description| * |-|-| * |`fullname`|Full name of the customer submitting the form| * |`phone`|Customer’s phone number, as submitted on the form| * |`companyname`|Customer’s submitted company name| * |`orderno`|Customer’s submitted order number| * |`rma`|Customer’s submitted RMA (Return Merchandise Authorization) number| * * @example fullname,companyname,phone,orderno,rma */ readonly contact_fields?: string; /** * @description Comma-separated list of SEO-relevant keywords to include in the element of this page. * * @default */ readonly meta_keywords: string | null; /** @description Description contained within the element of this page. * */ readonly meta_description?: string | null; /** * @description Comma-separated list of keywords that shoppers can use to locate this page when searching the store. * * @example trousers,pockets,luxury */ readonly search_keywords?: string | null; /** * @description Relative URL on the storefront for this page. * * @example /my-store-page */ readonly url?: string; }; readonly PagePutBulk: { /** @description The ID of the target page. */ readonly id: number; } & components["schemas"]["PagePutObj"]; /** @description Properties of all Pages V3 pages. * */ readonly anyTypePage: { readonly id?: number; /** @default 1 */ readonly channel_id: number; /** * @description The name of the page. Must be unique. * @example About Our Company */ readonly name: string; /** * @description A boolean value that controls whether the page is available to users or visible in any navigation menus. * @default true * @example true */ readonly is_visible: boolean; /** * @description ID of the parent page, if any. * @default 0 * @example 0 */ readonly parent_id: number; /** * @description Determines the order in which the page is displayed in the parent page’s menu. Pages with lower integers display earlier. * @example 0 */ readonly sort_order?: number; /** * @description Determines the type of page. See [Pages V3 page types](/docs/rest-content/pages#page-types) for more about the differences. * @example page * @enum {string} */ readonly type: "page" | "raw" | "contact_form" | "link" | "blog"; /** * @description Determines whether this page loads at the siteʼs root route. For example, at `https://example.com/`. * @default false */ readonly is_homepage: boolean; /** * @description When `true`, this page is visible only to logged-in customers. * @default false */ readonly is_customers_only: boolean; /** * @description Relative URL on the storefront for this page. * * @example /my-store-page */ readonly url?: string; }; /** * page * @description `type: page`. A user-defined plain-text page. * */ readonly typePage: components["schemas"]["anyTypePage"] & components["schemas"]["pageMeta"] & components["schemas"]["searchKeywords"]; /** * blog * @description A page that contains blog posts. Use caution; `blog`-type pages can only be created in the store control panel, but you may be able to change the type of a blog page to something else with this API. Use the [blog feature of the REST Content API](/docs/rest-content/store-content/blog-posts#create-a-blog-post) to work with blog posts and tags. */ readonly typeBlog: unknown & components["schemas"]["anyTypePage"] & components["schemas"]["pageMeta"] & components["schemas"]["searchKeywords"] & { /** * @description Relative URL on the storefront for this page. * * @example /blog/ */ readonly url?: string; }; /** * contact form * @description `type: contact_form`. A user-customizable page that contains a contact form. Body content returns HTML. */ readonly typeContactForm: components["schemas"]["anyTypePage"] & components["schemas"]["pageMeta"] & components["schemas"]["searchKeywords"] & { /** @description Applicable when the page type is `contact_form`: contact email address that receives messages sent using the form. Must be unique. */ readonly email?: string; /** * @description A comma-separated list of the contact field forms that are enabled in the store control panel for display on the subject storefront. Possible fields include: * * | Field | Description | * |:------|:------------| * | `fullname` | The full name of the customer submitting the form. | * | `phone` | The customer’s phone number. | * | `companyname` | The customer’s company name. | * | `orderno` | A field that lets customers specify a subject order number. | * | `rma` | A customer’s submitted RMA (Return Merchandise Authorization) number. | * * @example fullname,companyname,phone,orderno,rma */ readonly contact_fields?: string; }; /** * raw * @description `type: raw`. A user-defined page with a body that contains HTML markup or other stringified code. */ readonly typeRaw: components["schemas"]["anyTypePage"] & components["schemas"]["searchKeywords"] & { /** * @description HTML or variable that populates the element of this page, in default/desktop view. Required in a `POST` request if the page type is `raw`. * * @example
Hello World!
*/ readonly body: string | null; /** * @description The MIME type of the page body. * @example text/html */ readonly content_type?: string; }; /** * link * @description `type: link`. A link to an external absolute URL. Displays in the menu of other pages that contain markup. Does not contain a body. */ readonly typeLink: components["schemas"]["anyTypePage"] & { /** @description The link for the page type `link`. */ readonly link: string; }; readonly pageMeta: { readonly meta_title?: string | null; /** * @description Comma-separated list of SEO-relevant keywords to include in the element of this page. * * @default "" */ readonly meta_keywords: string | null; /** * @description Description contained within the element of this page. * * @default "" */ readonly meta_description: string | null; }; readonly searchKeywords: { /** * @description Comma-separated list of keywords that shoppers can use to locate this page when searching the store. * * @default "" * @example trousers,pockets,luxury */ readonly search_keywords: string | null; }; }; responses: { /** @description Multiple operations have occurred and the status for each operation can be viewed in the body of the response. Typically indicates that a partial failure has occurred, such as when a `POST` or `PUT` request is successful, but saving the URL has failed. */ readonly HTTP207Response: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": unknown; }; }; /** @description Created. * * Response.data will inherit the data type of the request. A single entry passed as an object will return an object for the data property. Any number of entries passed in an array will return an array for the data property. * * Properties associated with a page `type` that are not required to create an entry will be created with default values. * * When you make bulk requests, an invalid input in any one entry will return 422. The entries that are valid will still be created. */ readonly HTTP201CreatePages: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data?: components["schemas"]["typePage"] | components["schemas"]["typeBlog"] | components["schemas"]["typeContactForm"] | components["schemas"]["typeRaw"] | components["schemas"]["typeLink"]; readonly meta?: components["schemas"]["ResponseMeta"]; }; }; }; /** @description No content. A 204 response with no payload indicates successful deletion of all specified pages. */ readonly HTTP204: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; parameters: { readonly Accept: string; readonly ContentType: string; /** @description The ID of the page to be operated on. */ readonly pageIdPath: string; /** @description Include the requested property in the response. The `body` property returns the page’s markup, text, or raw content. */ readonly includeQuery: readonly "body"[]; /** @description Return only pages associated with the specified channel. */ readonly channelIdQuery: number; /** @description A comma-separated string of page IDs to fetch. Supports bulk operations. If none of the page IDs passed exist, the query will return an empty `data` array. */ readonly idInQueryGet: readonly number[]; /** @description Request deletion of multiple pages by passing a comma-separated string of corresponding page IDs. Supports bulk operations. */ readonly idInQueryDelete: readonly 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 */ readonly deleteChildrenQuery: boolean; /** @description Name of the page. */ readonly nameQuery: string; /** @description Return only pages whose `name` or `body` contain the supplied string. */ readonly nameLikeQuery: string; /** @description The number of results to return per request. See `meta.pagination.per_page` in the response body. */ readonly limitQuery: number; /** @description The ordered grouping of results to return. See `meta.pagination.current_page` in the response body. */ readonly pageQuery: number; }; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { readonly getPages: { readonly parameters: { readonly query?: { /** @description Return only pages associated with the specified channel. */ readonly channel_id?: components["parameters"]["channelIdQuery"]; /** @description A comma-separated string of page IDs to fetch. Supports bulk operations. If none of the page IDs passed exist, the query will return an empty `data` array. */ readonly "id:in"?: components["parameters"]["idInQueryGet"]; /** @description Name of the page. */ readonly name?: components["parameters"]["nameQuery"]; /** @description Return only pages whose `name` or `body` contain the supplied string. */ readonly "name:like"?: components["parameters"]["nameLikeQuery"]; /** @description The number of results to return per request. See `meta.pagination.per_page` in the response body. */ readonly limit?: components["parameters"]["limitQuery"]; /** @description The ordered grouping of results to return. See `meta.pagination.current_page` in the response body. */ readonly page?: components["parameters"]["pageQuery"]; /** @description Include the requested property in the response. The `body` property returns the page’s markup, text, or raw content. */ readonly include?: components["parameters"]["includeQuery"]; }; readonly header?: { readonly Accept?: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["PagesCollectionResponse"]; }; }; /** @description Bad Request; reasons for failure include passing query parameters that are not supported on this endpoint, but are common on other BigCommerce endpoints. */ readonly 400: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorDetailed"]; }; }; /** @description Invalid input. Reasons for failure include passing supported parameters with values that have the incorrect datatype. */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorItemized"]; }; }; }; }; readonly updatePages: { readonly parameters: { readonly query?: { /** @description Include the requested property in the response. The `body` property returns the page’s markup, text, or raw content. */ readonly include?: components["parameters"]["includeQuery"]; }; readonly header?: { readonly Accept?: components["parameters"]["Accept"]; readonly "Content-Type"?: components["parameters"]["ContentType"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: { readonly content: { readonly "application/json": components["schemas"]["PagePutBulk"] | readonly components["schemas"]["PagePutBulk"][]; }; }; readonly responses: { /** @description Updated. * */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["PagesCollectionResponse"]; }; }; /** @description Not Found */ readonly 404: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorBrief"]; }; }; /** @description The input was not valid. This is the result of missing required fields or other invalid arguments. See the response for more details. */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorDetailed"]; }; }; }; }; readonly createPages: { readonly parameters: { readonly query?: { /** @description Include the requested property in the response. The `body` property returns the page’s markup, text, or raw content. */ readonly include?: components["parameters"]["includeQuery"]; }; readonly header?: { readonly Accept?: components["parameters"]["Accept"]; readonly "Content-Type"?: components["parameters"]["ContentType"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody: { readonly content: { readonly "application/json": (components["schemas"]["typePage"] | components["schemas"]["typeBlog"] | components["schemas"]["typeContactForm"] | components["schemas"]["typeRaw"] | components["schemas"]["typeLink"]) | readonly (components["schemas"]["typePage"] | components["schemas"]["typeBlog"] | components["schemas"]["typeContactForm"] | components["schemas"]["typeRaw"] | components["schemas"]["typeLink"])[]; }; }; readonly responses: { readonly 201: components["responses"]["HTTP201CreatePages"]; readonly 207: components["responses"]["HTTP207Response"]; /** @description The input was not valid. This is the result of missing required fields or other invalid arguments. See the response for more details. * * When making bulk requests, an invalid input in any one entry will cause the whole request to return 422. The entries that are valid will still be created. */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorDetailed"]; }; }; }; }; readonly deletePages: { readonly parameters: { readonly query: { /** @description Request deletion of multiple pages by passing a comma-separated string of corresponding page IDs. Supports bulk operations. */ readonly "id:in": components["parameters"]["idInQueryDelete"]; /** * @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 */ readonly delete_children?: components["parameters"]["deleteChildrenQuery"]; }; readonly header?: { readonly Accept?: components["parameters"]["Accept"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { readonly 204: components["responses"]["HTTP204"]; /** @description Not Found. One of more of the pages specified for deletion did not exist. Specified pages that did exist were successfully deleted. */ readonly 404: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorBrief"]; }; }; /** @description Invalid input. See response for details. */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorDetailed"]; }; }; }; }; readonly getPage: { readonly parameters: { readonly query?: { /** @description Include the requested property in the response. The `body` property returns the page’s markup, text, or raw content. */ readonly include?: components["parameters"]["includeQuery"]; }; readonly header?: { readonly Accept?: components["parameters"]["Accept"]; }; readonly path: { /** @description The ID of the page to be operated on. */ readonly pageId: components["parameters"]["pageIdPath"]; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["SinglePageResponse"]; }; }; /** @description Not Found. */ readonly 404: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorBrief"]; }; }; /** @description Invalid input. One or more path parameter(s) did not have the correct datatype. */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorItemized"]; }; }; }; }; readonly updatePage: { readonly parameters: { readonly query?: { /** @description Include the requested property in the response. The `body` property returns the page’s markup, text, or raw content. */ readonly include?: components["parameters"]["includeQuery"]; }; readonly header?: { readonly Accept?: components["parameters"]["Accept"]; readonly "Content-Type"?: components["parameters"]["ContentType"]; }; readonly path: { /** @description The ID of the page to be operated on. */ readonly pageId: components["parameters"]["pageIdPath"]; }; readonly cookie?: never; }; readonly requestBody: { readonly content: { readonly "application/json": components["schemas"]["PagePutObj"]; }; }; readonly responses: { readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["SinglePageResponse"]; }; }; /** @description Bad Request; reasons for failure include invalid query parameters. See the response for more details. */ readonly 400: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorDetailed"]; }; }; /** @description Not Found */ readonly 404: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorBrief"]; }; }; /** @description The input was not valid. This error is the result of missing required fields or other invalid arguments. See the response for more details. */ readonly 422: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorDetailed"]; }; }; }; }; readonly deletePage: { readonly parameters: { readonly query?: never; readonly header?: { readonly Accept?: components["parameters"]["Accept"]; }; readonly path: { /** @description The ID of the page to be operated on. */ readonly pageId: components["parameters"]["pageIdPath"]; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { readonly 204: components["responses"]["HTTP204"]; /** @description The page specified for deletion did not exist. */ readonly 404: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/problem+json": components["schemas"]["ResponseErrorBrief"]; }; }; }; }; }