/** * This file was auto-generated by openapi-typescript and ts-morph. * Do not make direct changes to the file. */ export interface paths { readonly "/storefront/redirects": { 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 Redirects * @description Returns a collection of the store's 301 redirects across all sites. */ readonly get: operations["getRedirects"]; /** * Upsert Redirects * @description Upserts new redirect data across all storefronts. */ readonly put: operations["upsertRedirects"]; /** * Delete Redirects * @description Deletes redirects. */ readonly delete: operations["deleteRedirects"]; }; readonly "/storefront/redirects/imex/jobs": { 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 Redirect Import-Export Jobs * @description Returns a collection of the storeʼs 301 redirects across all sites. */ readonly get: operations["getRedirectImportExportJobs"]; }; readonly "/storefront/redirects/imex/export": { 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; }; /** * Create Redirects Export Job * @description Creates a new 301 Redirects export job. */ readonly post: operations["createRedirectExportJob"]; }; readonly "/storefront/redirects/imex/import": { 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; }; /** * Create Redirects Import Job * @description Creates a new 301 Redirects import job. */ readonly post: operations["createRedirectImportJob"]; }; readonly "/storefront/redirects/imex/export/{uuid}/events": { 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"]["AcceptEventStream"]; }; readonly path: { /** @description The import-export job identifier. */ readonly uuid: components["parameters"]["ImportExportIdParam"]; }; readonly cookie?: never; }; /** * Open Redirect Export Event Stream * @description Opens an event stream to receive live updates from an export job. */ readonly get: operations["getRedirectExportEvents"]; }; readonly "/storefront/redirects/imex/import/{uuid}/events": { 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"]["AcceptEventStream"]; }; readonly path: { /** @description The import-export job identifier. */ readonly uuid: components["parameters"]["ImportExportIdParam"]; }; readonly cookie?: never; }; /** * Open Redirect Import Event Stream * @description Opens an event stream to receive live updates from an import job. */ readonly get: operations["getRedirectImportEvents"]; }; readonly "/storefront/redirects/imex/export/{uuid}/download": { 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 request body. */ readonly "Content-Type": components["parameters"]["ContentTypeCsv"]; }; readonly path: { /** @description The import-export job identifier. */ readonly uuid: components["parameters"]["ImportExportIdParam"]; }; readonly cookie?: never; }; /** * Download Redirect Export * @description Downloads the CSV file containing the results of an export job. */ readonly get: operations["getRedirectExportDownload"]; }; } export type webhooks = Record; export interface components { schemas: { readonly Error: { readonly status?: number; readonly message?: string; }; readonly ErrorResponse400: { readonly schema?: components["schemas"]["Error"]; }; readonly ErrorResponse404: { readonly schema?: components["schemas"]["Error"]; }; readonly ErrorResponse409: { readonly schema?: components["schemas"]["Error"]; }; readonly ErrorResponse422: { readonly schema?: components["schemas"]["Error"]; }; /** @description Data necessary to create or update a redirect. If there’s a conflict on the from_path and site_id, the redirect will be overwritten with new data. */ readonly "301RedirectUpsert": { /** @example /old-url/ */ readonly from_path: string; readonly site_id: number; readonly to?: components["schemas"]["RedirectTo"]; }; /** @description Full detail of a Redirect, optionally including the full destination URL. */ readonly "301RedirectRead": { readonly id?: number; readonly site_id?: number; /** @example /old-url */ readonly from_path?: string; readonly to?: components["schemas"]["RedirectTo"]; /** * Format: uri * @description Full destination URL for the redirect. Must be explicitly included via URL parameter. * @example https://store-domain.com/new-url */ readonly to_url?: string; }; /** @enum {string} */ readonly ImportExportJobType: "import" | "export"; /** @enum {string} */ readonly ImportExportJobStatus: "new" | "working" | "complete" | "aborted" | "failed"; readonly ImportErrors: readonly { /** @description The row in the import CSV where the error occurred. */ readonly row?: number; readonly message?: string; }[]; /** @description Full detail of a Redirect Import-Export job. */ readonly "301RedirectImportExportJobRead": { /** * Format: uuid * @description The Import-Export job ID. */ readonly id?: string; readonly type?: components["schemas"]["ImportExportJobType"]; readonly status?: components["schemas"]["ImportExportJobStatus"]; /** @description The number of items that were successfully imported or exported. */ readonly completed_items?: number; /** @description The number of items that were not successfully imported or exported. */ readonly failed_items?: number; /** @description The number of items in the import or export job. */ readonly total_items?: number; readonly errors?: components["schemas"]["ImportErrors"]; /** * Format: date-time * @description The date-time that the import-export job was created, formatted as an [RFC-3339](https://www.ietf.org/rfc/rfc3339.txt) string. * @example 2022-01-04T04:15:50.000Z */ readonly created_at?: string; /** * Format: date-time * @description The date-time that the import-export job was completed, formatted as an [RFC-3339](https://www.ietf.org/rfc/rfc3339.txt) string. * @example 2022-01-04T04:15:50.000Z */ readonly completed_at?: string; }; readonly MetaPaginationObject: { readonly pagination?: { /** @example 246 */ readonly total?: number; /** @example 5 */ readonly count?: number; /** @example 5 */ readonly per_page?: number; /** @example 1 */ readonly current_page?: number; /** @example 50 */ readonly total_pages?: number; readonly links?: { /** @example ?limit=5&page=2 */ readonly next?: string; /** @example ?limit=5&page=1 */ readonly current?: string; }; }; }; /** RedirectTo */ readonly RedirectTo: { /** @enum {string} */ readonly type?: "product" | "brand" | "category" | "page" | "post" | "url"; readonly entity_id?: number; /** @example /new-url/ */ readonly url?: string; }; /** Detailed Errors */ readonly DetailedErrors: { readonly [key: string]: unknown; }; /** @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; readonly type?: string; readonly instance?: string; }; readonly ErrorResponse: components["schemas"]["BaseError"] & { readonly errors?: components["schemas"]["DetailedErrors"]; }; }; 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 response body. */ readonly AcceptEventStream: 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; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly ContentTypeFormData: string; /** @description The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body. */ readonly ContentTypeCsv: string; /** @description The import-export job identifier. */ readonly ImportExportIdParam: string; }; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { readonly getRedirects: { readonly parameters: { readonly query?: { /** @description Filters items by site ID. */ readonly site_id?: number; /** @description Filters items by redirect ID. Also accepts comma-separated values to filter for multiple redirects. */ readonly "id:in"?: readonly number[]; /** @description Filters items by minimum redirect ID. */ readonly "id:min"?: number; /** @description Filters items by maximum redirect ID. */ readonly "id:max"?: number; /** @description Controls the number of items to return per page. */ readonly limit?: number; /** @description Specifies the page number in a limited (paginated) list of items. Used to paginate large collections. */ readonly page?: number; /** @description Field name to sort by. Since redirect IDs increment when new redirects are added, you can sort by ID to return results in redirect create date order. * */ readonly sort?: "from_path" | "type" | "site_id" | "id"; /** @description Sort direction. Acceptable values are `asc`, `desc`. */ readonly direction?: "asc" | "desc"; /** @description Indicates whether to include redirect sub-resources. Only `to_url` is supported. */ readonly include?: readonly "to_url"[]; /** @description Filters redirects by the specified keyword. Will only search from the beginning of a URL path. For example, `blue` will match `/blue` and `/blue-shirt` , **not** `/royal-blue-shirt`. */ readonly keyword?: string; }; 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: { readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data?: readonly components["schemas"]["301RedirectRead"][]; readonly meta?: components["schemas"]["MetaPaginationObject"]; }; }; }; }; }; readonly upsertRedirects: { 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: { readonly "application/json": readonly components["schemas"]["301RedirectUpsert"][]; }; }; readonly responses: { /** @description Created */ readonly 201: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data?: readonly components["schemas"]["301RedirectRead"][]; readonly meta?: components["schemas"]["MetaPaginationObject"]; }; }; }; }; }; readonly deleteRedirects: { readonly parameters: { readonly query: { /** @description A comma-separated list of redirect IDs to delete explicitly. */ readonly "id:in": readonly number[]; /** @description To delete all redirects for a given site, provide the site ID. */ readonly site_id?: number; }; 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 No Content */ readonly 204: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly getRedirectImportExportJobs: { readonly parameters: { readonly query?: { /** @description Filters results by redirect import-export job ID. */ readonly id?: string; /** @description Filters results by the type of the redirect import-export job. */ readonly type?: components["schemas"]["ImportExportJobType"]; /** @description Filters results by the status of the Redirect Import-Export job. */ readonly status?: components["schemas"]["ImportExportJobStatus"]; /** @description Determines the number of items returned per page. The default is 10 items per page. */ readonly limit?: number; /** @description Specifies the page number to return when the number of items returned exceeds the page limit. Used to paginate large collections. */ readonly page?: number; }; 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: { readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data?: readonly components["schemas"]["301RedirectImportExportJobRead"][]; readonly meta?: components["schemas"]["MetaPaginationObject"]; }; }; }; }; }; readonly createRedirectExportJob: { 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: { readonly "application/json": { /** * @description The site ID for which you wish to export redirects. If no site ID is provided, the request exports all redirects for all sites. * @default null */ readonly site_id?: number | null; /** * @description A list of the redirect IDs you wish to export. If no redirect IDs are provided, the request exports all redirects for the given site selection. * @default [] */ readonly redirect_ids?: readonly number[]; /** * @description If true, the exported CSV will contain an additional read-only column containing the target URL for dynamic redirects. * @default false */ readonly include_dynamic_target_urls?: boolean; }; }; }; readonly responses: { /** @description Created */ readonly 201: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @example ab1c2de3-f4gh-5678-i90j-klm12n345o67 */ readonly id?: string; }; }; }; /** @description No Redirects in your store meet the criteria in your request. */ readonly 409: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Your store already has an active Redirects import or export job running. */ readonly 429: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly createRedirectImportJob: { 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"]["ContentTypeFormData"]; }; readonly path?: never; readonly cookie?: never; }; readonly requestBody: { readonly content: { readonly "multipart/form-data": { /** * Format: binary * @description A CSV file containing a list of Redirects to be imported. * * The headers must be defined as follows: * * `Domain,Old Path,Manual URL/Path,Dynamic Target Type,Dynamic Target ID` * * Not every line will have a value for every column. * @example Domain,Old Path,Manual URL/Path,Dynamic Target Type,Dynamic Target ID * store.example.com,/old-path,/new-manual-path,, * store.example.com,/old-product,,Product,12 * store.example.com,/old-brand,,Brand,34 * store.example.com,/old-category,,Category,56 * store.example.com,/old-page,,Page,78 * store.example.com,/old-post,,Post,90 */ readonly import_file: string; }; }; }; readonly responses: { /** @description Created */ readonly 201: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { /** @example ab1c2de3-f4gh-5678-i90j-klm12n345o67 */ readonly id?: string; }; }; }; /** @description The provided form data was invalid or the file is not a CSV. */ readonly 400: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description The provided file is too large. The maximum file size is 20MB. */ readonly 413: { headers: { readonly [name: string]: unknown; }; content?: never; }; /** @description Your store already has an active Redirects import or export job running. */ readonly 429: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly getRedirectExportEvents: { 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"]["AcceptEventStream"]; }; readonly path: { /** @description The import-export job identifier. */ readonly uuid: components["parameters"]["ImportExportIdParam"]; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Stream of export events. The `data` attribute is stringified JSON. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "text/event-stream": string; }; }; /** @description The provided export job ID does not exist. */ readonly 404: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly getRedirectImportEvents: { 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"]["AcceptEventStream"]; }; readonly path: { /** @description The import-export job identifier. */ readonly uuid: components["parameters"]["ImportExportIdParam"]; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description Stream of import events. The `data` attribute is stringified JSON. */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "text/event-stream": string; }; }; /** @description The provided import job ID does not exist. */ readonly 404: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly getRedirectExportDownload: { 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 request body. */ readonly "Content-Type"?: components["parameters"]["ContentTypeCsv"]; }; readonly path: { /** @description The import-export job identifier. */ readonly uuid: components["parameters"]["ImportExportIdParam"]; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description The exported Redirects in CSV format */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "text/csv": string; }; }; /** @description The requested export download does not exist. */ readonly 404: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; }