/** * This file was auto-generated by openapi-typescript and ts-morph. * Do not make direct changes to the file. */ export interface paths { readonly "/segments": { 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 All Segments * @description Returns a paginated *Segments List*. */ readonly get: operations["GetPaginatedSegmentsList"]; /** * Update Segments * @description Updates *Segments*. * * **Limits** * * Limit of 10 concurrent requests. * */ readonly put: operations["PutSegmentObjects"]; /** * Create Segments * @description Creates *Segments*. * * **Limits** * * Limit of 10 concurrent requests. * */ readonly post: operations["SegmentsPostRequest"]; /** * Delete Segments * @description Deletes one or more *Segments* from a store. This will not delete any associated *Shopper Profiles*. * */ readonly delete: operations["DeleteStoreSegment"]; }; readonly "/segments/{segmentId}/shopper-profiles": { 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: { /** @description The *Segment* ID. */ readonly segmentId: components["parameters"]["SegmentIdPathParam"]; }; readonly cookie?: never; }; /** * Get All Shopper Profiles in a Segment * @description Returns a list of *Shopper Profiles* that are associated with a given *Segment*. * * **NOTE**: The `modify` Customers OAuth scope is a requirement for this endpoint. * */ readonly get: operations["GetSegmentProfiles"]; /** * Add Shopper Profiles to a Segment * @description Add *Shopper Profiles* to a specific *Segment*. * * **Limits** * * Limit of *Shopper Profiles* per request is `50`. * * Limit of 10 concurrent requests. */ readonly post: operations["PostShopperProfile"]; /** * Remove Shopper Profiles from a Segment * @description Remove one or more *Shopper Profiles* that are associated with a *Segment*. This operation only removes the association; it doesn't delete the *Shopper Profiles*. * */ readonly delete: operations["DeleteShopperProfile"]; }; readonly "/shopper-profiles": { 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 All Shopper Profiles * @description Returns a paginated *Shopper Profiles* list. * */ readonly get: operations["GetShopperList"]; /** * Create Shopper Profiles * @description Creates a *Shopper Profile*. * */ readonly post: operations["ShopperProfilesRequest"]; /** * Delete Shopper Profiles * @description Deletes one or more *Shopper Profiles* from a store. * */ readonly delete: operations["DeleteStoreShopperProfile"]; }; readonly "/shopper-profiles/{shopperProfileId}/segments": { 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: { /** @description The *Shopper Profile* ID. */ readonly shopperProfileId: components["parameters"]["ShopperIdPathParam"]; }; readonly cookie?: never; }; /** * Get All Segments for a Shopper Profile * @description Returns a paginated *Segments* list for a *Shopper Profile*. */ readonly get: operations["GetListShopperProfile"]; }; } export type webhooks = Record; export interface components { schemas: { /** @description Response payload for the BigCommerce API. * */ readonly SegmentsResponse: { readonly data?: readonly components["schemas"]["Segment"][]; readonly meta?: Record; }; /** @description Request payload for the BigCommerce API. * */ readonly SegmentsPostRequest: readonly components["schemas"]["SegmentPost"][]; /** @description Request payload for the BigCommerce API. * */ readonly SegmentsPutRequest: readonly components["schemas"]["SegmentPut"][]; readonly SegmentPost: { /** * @description Name of the segment * @example My Segment */ readonly name: string; /** * @description Description of the segment * @example Description */ readonly description?: string; }; readonly SegmentPut: { /** * Format: uuid * @description ID of the segment. */ readonly id: string; /** * @description Name of the segment. * @example My Segment */ readonly name?: string; /** * @description Description of the segment. * @example Description */ readonly description?: string; }; /** @description Data about the response including pagination, and collection totals. * */ readonly Pagination: { /** * @description Total number of items in the result set. * * @example 1 */ readonly total?: number; /** * @description Total number of items in the collection response. * * @example 1 */ readonly count?: number; /** * @description The amount of items returned in the collection per page, controlled by the limit parameter. * * @example 50 */ readonly per_page?: number; /** * @description The page you are currently on within the collection. * * @example 1 */ readonly current_page?: number; /** * @description The total number of pages in the collection. * * @example 1 */ readonly total_pages?: number; }; /** @description Data about the response including pagination, and collection totals. * */ readonly CollectionMeta: { readonly pagination?: components["schemas"]["Pagination"]; }; readonly ErrorResponse: components["schemas"]["BaseError"] & { readonly errors?: components["schemas"]["DetailedErrors"]; }; /** @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 DetailedErrors: { readonly [key: string]: string; }; readonly Segment: { /** * Format: uuid * @description The ID of the segment. * */ readonly id?: string; /** * @description The name of the segment. * * @example My Segment */ readonly name?: string; /** * @description The description of the segment. * * @example Description */ readonly description?: string; /** * Format: date-time * @description The date of which the segment was created. * * @example 2022-09-15T23:44:05Z */ readonly created_at?: string; /** * Format: date-time * @description The date of which the segment was updated. * * @example 2022-09-15T23:44:05Z */ readonly updated_at?: string; }; /** @description Response payload for the BigCommerce API. * */ readonly SegmentCollectionResponse: { readonly data?: readonly components["schemas"]["Segment"][]; readonly meta?: components["schemas"]["CollectionMeta"]; }; readonly ShopperProfile: { /** * Format: uuid * @description The ID of the *Shopper Profile*. * */ readonly id?: string; /** * @description The ID of the registered *Customer* associated with this *Shopper Profile*. * * @example 1 */ readonly customer_id?: number; /** * Format: date-time * @description The date and time when the *Shopper Profile* was created. * */ readonly created_at?: string; /** * Format: date-time * @description The date and time when the *Shopper Profile* was last updated. * */ readonly updated_at?: string; }; /** @description A list of *Shopper Profiles* to associate with the segment. */ readonly ShopperProfilesAddRequest: readonly string[]; readonly ShopperProfilesAddResponse: { readonly data?: readonly components["schemas"]["ShopperProfile"][]; }; readonly ShopperProfilesGetResponse: { readonly data?: readonly components["schemas"]["ShopperProfile"][]; readonly meta?: components["schemas"]["CollectionMeta"]; }; /** @description Response payload for the BigCommerce API. * */ readonly ShopperProfilesCollectionResponse: { readonly data?: readonly components["schemas"]["ShopperProfile"][]; readonly meta?: components["schemas"]["CollectionMeta"]; }; /** @description Request payload for the BigCommerce API. * */ readonly ShopperProfilesPostRequest: readonly components["schemas"]["ShopperProfilePost"][]; readonly ShopperProfilePost: { /** * @description The ID of a registered Customer to associate with the new *Shopper Profile*. * @example 1 */ readonly customer_id?: number; }; /** @description Response payload for the BigCommerce API. * */ readonly ShopperProfilesResponse: { readonly data?: readonly components["schemas"]["ShopperProfile"][]; readonly meta?: Record; }; }; 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; /** @description The *Segment* ID. */ readonly SegmentIdPathParam: string; /** @description The *Shopper Profile* ID. */ readonly ShopperIdPathParam: string; /** @description Comma separated IDs. * */ readonly FilterIdParam: readonly string[]; /** @description Page number. * */ readonly FilterPageParam: number; /** @description Items count per page. * */ readonly FilterLimitParam: number; }; requestBodies: never; headers: never; pathItems: never; } export type $defs = Record; export interface operations { readonly GetPaginatedSegmentsList: { readonly parameters: { readonly query?: { /** @description Page number. * */ readonly page?: components["parameters"]["FilterPageParam"]; /** @description Items count per page. * */ readonly limit?: components["parameters"]["FilterLimitParam"]; /** @description Comma separated IDs. * */ readonly "id:in"?: components["parameters"]["FilterIdParam"]; }; 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": components["schemas"]["SegmentCollectionResponse"]; }; }; }; }; readonly PutSegmentObjects: { 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": components["schemas"]["SegmentsPutRequest"]; }; }; readonly responses: { /** @description An array of created *Segments*. * */ readonly 201: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["SegmentsResponse"]; }; }; /** @description The *Segment* was not valid. This is the result of either missing required fields, or because of invalid data. See the response for more details. * */ readonly 400: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }; readonly SegmentsPostRequest: { 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": components["schemas"]["SegmentsPostRequest"]; readonly "application/xml": Record; }; }; readonly responses: { /** @description | An array of created *Segments*. */ readonly 201: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["SegmentsResponse"]; }; }; /** @description The *Segment* was not valid. This is the result of either missing required fields, or because of invalid data. See the response for more details. * */ readonly 400: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["ErrorResponse"]; }; }; /** @description Conflict */ readonly 409: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data: readonly Record[]; readonly errors: readonly { readonly status: number; readonly title?: string; readonly type?: string; readonly errors?: Record; }[]; readonly meta: { readonly total?: number; readonly success?: number; readonly failed?: number; }; }; }; }; }; }; readonly DeleteStoreSegment: { readonly parameters: { readonly query?: { /** @description Comma separated IDs. * */ readonly "id:in"?: components["parameters"]["FilterIdParam"]; }; 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 An empty response. * */ readonly 204: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly GetSegmentProfiles: { readonly parameters: { readonly query?: { /** @description Page number. * */ readonly page?: components["parameters"]["FilterPageParam"]; /** @description Items count per page. * */ readonly limit?: components["parameters"]["FilterLimitParam"]; }; 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: { /** @description The *Segment* ID. */ readonly segmentId: components["parameters"]["SegmentIdPathParam"]; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description An array of *Shopper Profiles* objects and metadata. * */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["ShopperProfilesGetResponse"]; }; }; }; }; readonly PostShopperProfile: { 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: { /** @description The *Segment* ID. */ readonly segmentId: components["parameters"]["SegmentIdPathParam"]; }; readonly cookie?: never; }; readonly requestBody?: { readonly content: { readonly "application/json": components["schemas"]["ShopperProfilesAddRequest"]; }; }; readonly responses: { /** @description An array of *Shopper Profiles* added to a *Segment*. */ readonly 201: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["ShopperProfilesAddResponse"]; }; }; /** @description Conflict */ readonly 409: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": { readonly data: readonly Record[]; readonly errors: readonly { readonly status?: number; readonly title?: string; readonly type?: string; readonly errors?: { readonly 0?: string; }; }[]; readonly meta: { readonly total: number; readonly success: number; readonly failed: number; }; }; }; }; }; }; readonly DeleteShopperProfile: { readonly parameters: { readonly query?: { /** @description Comma separated IDs. * */ readonly "id:in"?: components["parameters"]["FilterIdParam"]; }; 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: { /** @description The *Segment* ID. */ readonly segmentId: components["parameters"]["SegmentIdPathParam"]; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description An empty response. * */ readonly 204: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly GetShopperList: { readonly parameters: { readonly query?: { /** @description Page number. * */ readonly page?: components["parameters"]["FilterPageParam"]; /** @description Items count per page. * */ readonly limit?: components["parameters"]["FilterLimitParam"]; }; 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 An array of *Shopper Profiles* objects and metadata. * */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["ShopperProfilesCollectionResponse"]; }; }; }; }; readonly ShopperProfilesRequest: { 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": components["schemas"]["ShopperProfilesPostRequest"]; }; }; readonly responses: { /** @description An array of created *Shopper Profiles*. * */ readonly 201: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["ShopperProfilesResponse"]; }; }; /** @description The *Segment* was not valid. This is the result of either missing required fields, or because of invalid data. See the response for more details. * */ readonly 400: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["ErrorResponse"]; }; }; }; }; readonly DeleteStoreShopperProfile: { readonly parameters: { readonly query?: { /** @description Comma separated IDs. * */ readonly "id:in"?: components["parameters"]["FilterIdParam"]; }; 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 An empty response. * */ readonly 204: { headers: { readonly [name: string]: unknown; }; content?: never; }; }; }; readonly GetListShopperProfile: { readonly parameters: { readonly query?: { /** @description Page number. * */ readonly page?: components["parameters"]["FilterPageParam"]; /** @description Items count per page. * */ readonly limit?: components["parameters"]["FilterLimitParam"]; }; 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: { /** @description The *Shopper Profile* ID. */ readonly shopperProfileId: components["parameters"]["ShopperIdPathParam"]; }; readonly cookie?: never; }; readonly requestBody?: never; readonly responses: { /** @description An array of *Segments* objects and metadata. * */ readonly 200: { headers: { readonly [name: string]: unknown; }; content: { readonly "application/json": components["schemas"]["SegmentCollectionResponse"]; }; }; }; }; }