@wix/auto_sdk_crm_pipelines 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.d.ts +18 -6
- package/build/cjs/index.js +502 -23
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +486 -7
- package/build/cjs/index.typings.js.map +1 -1
- package/build/es/index.d.mts +18 -6
- package/build/es/index.mjs +492 -23
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.mjs +476 -7
- package/build/es/index.typings.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +18 -6
- package/build/internal/cjs/index.js +502 -23
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.js +486 -7
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/es/index.d.mts +18 -6
- package/build/internal/es/index.mjs +492 -23
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.mjs +476 -7
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/crm-pipelines-v1-pipeline-pipelines.public.ts","../../src/crm-pipelines-v1-pipeline-pipelines.universal.ts","../../src/crm-pipelines-v1-pipeline-pipelines.http.ts","../../src/crm-pipelines-v1-pipeline-pipelines.context.ts"],"sourcesContent":["export * from './src/crm-pipelines-v1-pipeline-pipelines.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkUpdatePipelineTagsApplicationErrors,\n BulkUpdatePipelineTagsByFilterApplicationErrors,\n BulkUpdatePipelineTagsByFilterOptions,\n BulkUpdatePipelineTagsByFilterResponse,\n BulkUpdatePipelineTagsOptions,\n BulkUpdatePipelineTagsResponse,\n DeletePipelineApplicationErrors,\n Pipeline,\n PipelineCreatedEnvelope,\n PipelineDeletedEnvelope,\n PipelineQuery,\n PipelineUpdatedEnvelope,\n PipelinesQueryBuilder,\n QueryPipelinesResponse,\n UpdatePipeline,\n UpdatePipelineApplicationErrors,\n bulkUpdatePipelineTags as universalBulkUpdatePipelineTags,\n bulkUpdatePipelineTagsByFilter as universalBulkUpdatePipelineTagsByFilter,\n createPipeline as universalCreatePipeline,\n deletePipeline as universalDeletePipeline,\n getPipeline as universalGetPipeline,\n queryPipelines as universalQueryPipelines,\n typedQueryPipelines as universalTypedQueryPipelines,\n updatePipeline as universalUpdatePipeline,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/crm' };\n\nexport function createPipeline(\n httpClient: HttpClient\n): CreatePipelineSignature {\n return (\n pipeline: NonNullablePaths<\n Pipeline,\n | `doneStage`\n | `doneStage.allowedOutcomes`\n | `doneStage.name`\n | `name`\n | `stages`\n | `stages.${number}.name`,\n 4\n >\n ) =>\n universalCreatePipeline(\n pipeline,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreatePipelineSignature {\n /**\n * Creates a pipeline with defined stages and a final stage.\n *\n * Pipelines must have at least one stage in addition to the `doneStage`.\n * You must specify allowed outcomes that cards can have when moved to the final stage.\n * @param - Pipeline to create.\n * @returns Created pipeline.\n */\n (\n pipeline: NonNullablePaths<\n Pipeline,\n | `doneStage`\n | `doneStage.allowedOutcomes`\n | `doneStage.name`\n | `name`\n | `stages`\n | `stages.${number}.name`,\n 4\n >\n ): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n >\n >;\n}\n\nexport function getPipeline(httpClient: HttpClient): GetPipelineSignature {\n return (pipelineId: string) =>\n universalGetPipeline(\n pipelineId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface GetPipelineSignature {\n /**\n * Retrieves a pipeline by ID.\n * @param - Pipeline ID to retrieve.\n * @returns Retrieved pipeline.\n */\n (pipelineId: string): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n >\n >;\n}\n\nexport function updatePipeline(\n httpClient: HttpClient\n): UpdatePipelineSignature {\n return (\n _id: string,\n pipeline: NonNullablePaths<UpdatePipeline, `revision`, 2>\n ) =>\n universalUpdatePipeline(\n _id,\n pipeline,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface UpdatePipelineSignature {\n /**\n * Updates a pipeline.\n *\n * Each time the pipeline is updated, `revision` increments by 1. The current `revision` must be specified when updating the pipeline. This ensures you're working with the latest pipeline and prevents unintended overwrites.\n *\n * >**Note:**\n * > You can add and remove stages by calling this method. However, the done stage and any stages that contain cards can't be removed.\n *\n * </blockquote>\n * @param - Pipeline ID.\n * @returns Updated pipeline.\n */\n (\n _id: string,\n pipeline: NonNullablePaths<UpdatePipeline, `revision`, 2>\n ): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: UpdatePipelineApplicationErrors;\n }\n >;\n}\n\nexport function deletePipeline(\n httpClient: HttpClient\n): DeletePipelineSignature {\n return (pipelineId: string) =>\n universalDeletePipeline(\n pipelineId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DeletePipelineSignature {\n /**\n * Deletes a pipeline.\n *\n * >**Notes:**\n * > - You can't delete a pipeline that contains cards. Make sure to remove all cards in the pipeline before calling this method.\n * > - Deleting a pipeline permanently removes it from a site.\n * @param - Pipeline ID.\n */\n (pipelineId: string): Promise<\n void & {\n __applicationErrorsType?: DeletePipelineApplicationErrors;\n }\n >;\n}\n\nexport function queryPipelines(\n httpClient: HttpClient\n): QueryPipelinesSignature {\n return () =>\n universalQueryPipelines(\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface QueryPipelinesSignature {\n /**\n * Retrieves a list of up to 100 pipelines, given the provided paging, filtering, and sorting.\n *\n * By default, 50 pipelines are returned and sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported operations, see [Pipelines: Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-management/pipelines/supported-filters-and-sorting).\n *\n * To learn more about querying pipelines, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n */\n (): PipelinesQueryBuilder;\n}\n\nexport function typedQueryPipelines(\n httpClient: HttpClient\n): TypedQueryPipelinesSignature {\n return (query: PipelineQuery) =>\n universalTypedQueryPipelines(\n query,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface TypedQueryPipelinesSignature {\n /** */\n (query: PipelineQuery): Promise<\n NonNullablePaths<QueryPipelinesResponse, `pipelines`, 2>\n >;\n}\n\nexport function bulkUpdatePipelineTags(\n httpClient: HttpClient\n): BulkUpdatePipelineTagsSignature {\n return (pipelineIds: string[], options?: BulkUpdatePipelineTagsOptions) =>\n universalBulkUpdatePipelineTags(\n pipelineIds,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdatePipelineTagsSignature {\n /**\n * Updates tags on multiple pipelines by specified pipeline IDs.\n *\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n * @param - List of pipeline IDs to update.\n */\n (pipelineIds: string[], options?: BulkUpdatePipelineTagsOptions): Promise<\n NonNullablePaths<\n BulkUpdatePipelineTagsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkUpdatePipelineTagsApplicationErrors;\n }\n >;\n}\n\nexport function bulkUpdatePipelineTagsByFilter(\n httpClient: HttpClient\n): BulkUpdatePipelineTagsByFilterSignature {\n return (\n filter: Record<string, any>,\n options?: BulkUpdatePipelineTagsByFilterOptions\n ) =>\n universalBulkUpdatePipelineTagsByFilter(\n filter,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface BulkUpdatePipelineTagsByFilterSignature {\n /**\n * Updates tags on multiple pipelines, using a filter to select which pipelines to update.\n *\n * If you don't specify a filter, all pipelines on the site are updated.\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n *\n * > **Note:**\n * > This is an asynchronous method that returns a job ID for tracking progress.\n * To get the status of the job, call [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n * @param - Filter to select which pipelines to update.\n */\n (\n filter: Record<string, any>,\n options?: BulkUpdatePipelineTagsByFilterOptions\n ): Promise<\n NonNullablePaths<BulkUpdatePipelineTagsByFilterResponse, `jobId`, 2> & {\n __applicationErrorsType?: BulkUpdatePipelineTagsByFilterApplicationErrors;\n }\n >;\n}\n\nexport const onPipelineCreated = EventDefinition(\n 'wix.crm.pipelines.v1.pipeline_created',\n true,\n (event: PipelineCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PipelineCreatedEnvelope>();\nexport const onPipelineDeleted = EventDefinition(\n 'wix.crm.pipelines.v1.pipeline_deleted',\n true,\n (event: PipelineDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PipelineDeletedEnvelope>();\nexport const onPipelineUpdated = EventDefinition(\n 'wix.crm.pipelines.v1.pipeline_updated',\n true,\n (event: PipelineUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n ],\n },\n ])\n )\n)<PipelineUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkUpdatePipelineTagsByFilterOptions,\n BulkUpdatePipelineTagsByFilterRequest,\n BulkUpdatePipelineTagsByFilterResponse,\n BulkUpdatePipelineTagsOptions,\n BulkUpdatePipelineTagsRequest,\n BulkUpdatePipelineTagsResponse,\n BulkUpdatePipelineTagsResult,\n CreatePipelineRequest,\n CreatePipelineResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeletePipelineRequest,\n DeletePipelineResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n DoneStage,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GetPipelineRequest,\n GetPipelineResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n MessageEnvelope,\n Outcome,\n Pipeline,\n PipelineCreatedEnvelope,\n PipelineDeletedEnvelope,\n PipelineQuerySpec,\n PipelineType,\n PipelineUpdatedEnvelope,\n PipelinesQueryBuilder,\n PipelinesQueryResult,\n PrivateTags,\n QueryPipelinesRequest,\n QueryPipelinesResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n Stage,\n TagList,\n UpdatePipeline,\n UpdatePipelineRequest,\n UpdatePipelineResponse,\n WebhookIdentityType,\n utils,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixCrmPipelinesV1Pipeline from './crm-pipelines-v1-pipeline-pipelines.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/**\n * A structured business process workflow consisting of multiple ordered stages and a final stage.\n *\n * Pipelines define the path that cards (deals, leads, projects, etc.) follow from start to completion.\n * Each pipeline has a currency setting that applies to all monetary values within that pipeline.\n * Pipeline stages can be configured with stale duration settings to identify workflow delays.\n */\nexport interface Pipeline {\n /**\n * Pipeline ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the pipeline is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the pipeline.\n *\n * Ignored when creating a pipeline.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Pipeline name.\n * @minLength 1\n * @maxLength 60\n */\n name?: string | null;\n /**\n * Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\n *\n * Default: Based on the site's currency settings.\n * @format CURRENCY\n * @immutable\n */\n currency?: string | null;\n /**\n * Pipeline stages in order.\n * Cards move through these stages as they progress through the business process.\n * @minSize 1\n * @maxSize 30\n */\n stages?: Stage[];\n /** The final pipeline stage where cards receive a final outcome. */\n doneStage?: DoneStage;\n /** Extended fields data. */\n extendedFields?: ExtendedFields;\n /** Tags for organizing and categorizing pipelines. */\n tags?: PrivateTags;\n}\n\nexport interface Stage {\n /**\n * Stage ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Stage name.\n * @minLength 1\n * @maxLength 40\n */\n name?: string | null;\n /**\n * The duration (in hours) a card can remain in this stage before becoming stale.\n * When a card exceeds this duration, it's marked as stale to indicate potential workflow delays.\n * @min 1\n * @max 100000\n */\n staleDurationInHours?: number | null;\n}\n\nexport interface DoneStage {\n /**\n * Done stage ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Done stage name.\n * @minLength 1\n * @maxLength 40\n */\n name?: string | null;\n /**\n * Outcomes that cards can have when moved to the done stage.\n * @minSize 1\n * @maxSize 3\n */\n allowedOutcomes?: OutcomeWithLiterals[];\n}\n\nexport enum Outcome {\n /** No specific outcome. The process reached the final stage but has not been specified as successful or unsuccessful. */\n NONE = 'NONE',\n /** Successful outcome. The process achieved its intended goal. */\n WON = 'WON',\n /** Unsuccessful outcome. The process didn't achieve its intended goal. */\n LOST = 'LOST',\n}\n\n/** @enumType */\nexport type OutcomeWithLiterals = Outcome | 'NONE' | 'WON' | 'LOST';\n\nexport enum PipelineType {\n /** Generic pipeline type. */\n GENERIC = 'GENERIC',\n /** Lead pipeline type. */\n LEAD = 'LEAD',\n}\n\n/** @enumType */\nexport type PipelineTypeWithLiterals = PipelineType | 'GENERIC' | 'LEAD';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface PrivateTags {\n /** Tags that are exposed to anyone with access to the entity, including site members and visitors. */\n privateTags?: TagList;\n}\n\nexport interface TagList {\n /**\n * List of tag IDs.\n * @maxSize 100\n * @maxLength 5\n */\n tagIds?: string[];\n}\n\nexport interface CreatePipelineRequest {\n /** Pipeline to create. */\n pipeline: Pipeline;\n}\n\nexport interface CreatePipelineResponse {\n /** Created pipeline. */\n pipeline?: Pipeline;\n}\n\nexport interface GetPipelineRequest {\n /**\n * Pipeline ID to retrieve.\n * @format GUID\n */\n pipelineId: string;\n}\n\nexport interface GetPipelineResponse {\n /** Retrieved pipeline. */\n pipeline?: Pipeline;\n}\n\nexport interface UpdatePipelineRequest {\n /** Pipeline to update, may be partial. */\n pipeline: Pipeline;\n}\n\nexport interface UpdatePipelineResponse {\n /** Updated pipeline. */\n pipeline?: Pipeline;\n}\n\nexport interface DeletePipelineRequest {\n /**\n * Pipeline ID.\n * @format GUID\n */\n pipelineId: string;\n}\n\nexport interface DeletePipelineResponse {}\n\nexport interface QueryPipelinesRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryPipelinesResponse {\n /** Retrieved pipelines. */\n pipelines?: Pipeline[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface BulkUpdatePipelineTagsRequest {\n /**\n * List of pipeline IDs to update.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n pipelineIds: string[];\n /** List of tags to assign. */\n assignTags?: PrivateTags;\n /** List of tags to unassign. */\n unassignTags?: PrivateTags;\n /**\n * Whether to return the updated pipelines in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkUpdatePipelineTagsResponse {\n /**\n * Results for each updated pipeline.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdatePipelineTagsResult[];\n /** Metadata about the bulk update. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkUpdatePipelineTagsResult {\n /** Metadata about the individual updated pipeline. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkUpdatePipelineTagsByFilterRequest {\n /** Filter to select which pipelines to update. */\n filter: Record<string, any> | null;\n /** List of tags to assign. */\n assignTags?: PrivateTags;\n /** List of tags to unassign. */\n unassignTags?: PrivateTags;\n /**\n * Whether to return the updated pipelines in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkUpdatePipelineTagsByFilterResponse {\n /**\n * Job ID for tracking the asynchronous tag updates.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type UpdatePipelineApplicationErrors =\n | {\n code?: 'CANNOT_CHANGE_DURATION_ON_STAGE_WITH_CARDS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_DELETE_STAGE_WITH_CARDS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_DELETE_PIPELINE_DONE_STAGE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INSUFFICIENT_PIPELINE_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'STAGE_IDS_MUST_BE_UNIQUE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeletePipelineApplicationErrors = {\n code?: 'CANNOT_DELETE_NON_EMPTY_PIPELINE';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkUpdatePipelineTagsApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkUpdatePipelineTagsByFilterApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface PipelineCreatedEnvelope {\n entity: Pipeline;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a pipeline is created.\n * @permissionScope Manage Pipelines\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES\n * @permissionScope Read Pipelines\n * @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES\n * @permissionId PIPELINES.PIPELINE_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.pipeline_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onPipelineCreated(\n handler: (event: PipelineCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PipelineDeletedEnvelope {\n entity: Pipeline;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a pipeline is deleted.\n * @permissionScope Manage Pipelines\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES\n * @permissionScope Read Pipelines\n * @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES\n * @permissionId PIPELINES.PIPELINE_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.pipeline_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onPipelineDeleted(\n handler: (event: PipelineDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PipelineUpdatedEnvelope {\n entity: Pipeline;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a pipeline is updated.\n * @permissionScope Manage Pipelines\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES\n * @permissionScope Read Pipelines\n * @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES\n * @permissionId PIPELINES.PIPELINE_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.pipeline_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onPipelineUpdated(\n handler: (event: PipelineUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a pipeline with defined stages and a final stage.\n *\n * Pipelines must have at least one stage in addition to the `doneStage`.\n * You must specify allowed outcomes that cards can have when moved to the final stage.\n * @param pipeline - Pipeline to create.\n * @public\n * @documentationMaturity preview\n * @requiredField pipeline\n * @requiredField pipeline.doneStage\n * @requiredField pipeline.doneStage.allowedOutcomes\n * @requiredField pipeline.doneStage.name\n * @requiredField pipeline.name\n * @requiredField pipeline.stages\n * @requiredField pipeline.stages.name\n * @permissionId PIPELINES.PIPELINE_CREATE\n * @applicableIdentity APP\n * @returns Created pipeline.\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.CreatePipeline\n */\nexport async function createPipeline(\n pipeline: NonNullablePaths<\n Pipeline,\n | `doneStage`\n | `doneStage.allowedOutcomes`\n | `doneStage.name`\n | `name`\n | `stages`\n | `stages.${number}.name`,\n 4\n >\n): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ pipeline: pipeline });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Pipeline.createPipeline(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.pipeline!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { pipeline: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['pipeline']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a pipeline by ID.\n * @param pipelineId - Pipeline ID to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField pipelineId\n * @permissionId PIPELINES.PIPELINE_READ\n * @applicableIdentity APP\n * @returns Retrieved pipeline.\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.GetPipeline\n */\nexport async function getPipeline(\n pipelineId: string\n): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pipelineId: pipelineId,\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Pipeline.getPipeline(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.pipeline!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { pipelineId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['pipelineId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a pipeline.\n *\n * Each time the pipeline is updated, `revision` increments by 1. The current `revision` must be specified when updating the pipeline. This ensures you're working with the latest pipeline and prevents unintended overwrites.\n *\n * >**Note:**\n * > You can add and remove stages by calling this method. However, the done stage and any stages that contain cards can't be removed.\n *\n * </blockquote>\n * @param _id - Pipeline ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField pipeline\n * @requiredField pipeline.revision\n * @permissionId PIPELINES.PIPELINE_UPDATE\n * @applicableIdentity APP\n * @returns Updated pipeline.\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.UpdatePipeline\n */\nexport async function updatePipeline(\n _id: string,\n pipeline: NonNullablePaths<UpdatePipeline, `revision`, 2>\n): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: UpdatePipelineApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pipeline: { ...pipeline, id: _id },\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Pipeline.updatePipeline(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.pipeline!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { pipeline: '$[1]' },\n explicitPathsToArguments: { 'pipeline.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'pipeline']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdatePipeline {\n /**\n * Pipeline ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the pipeline is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the pipeline.\n *\n * Ignored when creating a pipeline.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Pipeline name.\n * @minLength 1\n * @maxLength 60\n */\n name?: string | null;\n /**\n * Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\n *\n * Default: Based on the site's currency settings.\n * @format CURRENCY\n * @immutable\n */\n currency?: string | null;\n /**\n * Pipeline stages in order.\n * Cards move through these stages as they progress through the business process.\n * @minSize 1\n * @maxSize 30\n */\n stages?: Stage[];\n /** The final pipeline stage where cards receive a final outcome. */\n doneStage?: DoneStage;\n /** Extended fields data. */\n extendedFields?: ExtendedFields;\n /** Tags for organizing and categorizing pipelines. */\n tags?: PrivateTags;\n}\n\n/**\n * Deletes a pipeline.\n *\n * >**Notes:**\n * > - You can't delete a pipeline that contains cards. Make sure to remove all cards in the pipeline before calling this method.\n * > - Deleting a pipeline permanently removes it from a site.\n * @param pipelineId - Pipeline ID.\n * @public\n * @documentationMaturity preview\n * @requiredField pipelineId\n * @permissionId PIPELINES.PIPELINE_DELETE\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.DeletePipeline\n */\nexport async function deletePipeline(pipelineId: string): Promise<\n void & {\n __applicationErrorsType?: DeletePipelineApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pipelineId: pipelineId,\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Pipeline.deletePipeline(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { pipelineId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['pipelineId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 100 pipelines, given the provided paging, filtering, and sorting.\n *\n * By default, 50 pipelines are returned and sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported operations, see [Pipelines: Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-management/pipelines/supported-filters-and-sorting).\n *\n * To learn more about querying pipelines, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n * @public\n * @documentationMaturity preview\n * @permissionId PIPELINES.PIPELINE_READ\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.QueryPipelines\n */\nexport function queryPipelines(): PipelinesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Pipeline,\n 'CURSOR',\n QueryPipelinesRequest,\n QueryPipelinesResponse\n >({\n func: async (payload: QueryPipelinesRequest) => {\n const reqOpts =\n ambassadorWixCrmPipelinesV1Pipeline.queryPipelines(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryPipelinesRequest['query']) => {\n const args = [query, {}] as [QueryPipelinesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryPipelinesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.pipelines,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface PipelinesQueryResult extends QueryCursorResult {\n items: Pipeline[];\n query: PipelinesQueryBuilder;\n next: () => Promise<PipelinesQueryResult>;\n prev: () => Promise<PipelinesQueryResult>;\n}\n\nexport interface PipelinesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (propertyName: 'name', value: string) => PipelinesQueryBuilder;\n /** @documentationMaturity preview */\n in: (propertyName: '_id' | 'name', value: any) => PipelinesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<'_createdDate' | 'name'>\n ) => PipelinesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<'_updatedDate'>\n ) => PipelinesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => PipelinesQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => PipelinesQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<PipelinesQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.QueryPipelines\n * @requiredField query\n */\nexport async function typedQueryPipelines(\n query: PipelineQuery\n): Promise<NonNullablePaths<QueryPipelinesResponse, `pipelines`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Pipeline.queryPipelines(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PipelineQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id'];\n operators: ['$eq', '$in', '$ne', '$nin'];\n sort: 'NONE';\n },\n {\n fields: ['_createdDate'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'ASC';\n },\n {\n fields: ['_updatedDate'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'DESC';\n },\n {\n fields: ['name'];\n operators: ['$eq', '$in', '$ne', '$nin', '$startsWith'];\n sort: 'ASC';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Pipeline,\n PipelineQuerySpec\n>;\nexport type PipelineQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: {\n ...createQueryUtils<Pipeline, PipelineQuerySpec, PipelineQuery>(),\n },\n};\n\n/**\n * Updates tags on multiple pipelines by specified pipeline IDs.\n *\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n * @param pipelineIds - List of pipeline IDs to update.\n * @public\n * @documentationMaturity preview\n * @requiredField pipelineIds\n * @permissionId PIPELINES.PIPELINE_UPDATE_TAGS\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.BulkUpdatePipelineTags\n */\nexport async function bulkUpdatePipelineTags(\n pipelineIds: string[],\n options?: BulkUpdatePipelineTagsOptions\n): Promise<\n NonNullablePaths<\n BulkUpdatePipelineTagsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkUpdatePipelineTagsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pipelineIds: pipelineIds,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts =\n ambassadorWixCrmPipelinesV1Pipeline.bulkUpdatePipelineTags(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n pipelineIds: '$[0]',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['pipelineIds', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdatePipelineTagsOptions {\n /** List of tags to assign. */\n assignTags?: PrivateTags;\n /** List of tags to unassign. */\n unassignTags?: PrivateTags;\n /**\n * Whether to return the updated pipelines in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Updates tags on multiple pipelines, using a filter to select which pipelines to update.\n *\n * If you don't specify a filter, all pipelines on the site are updated.\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n *\n * > **Note:**\n * > This is an asynchronous method that returns a job ID for tracking progress.\n * To get the status of the job, call [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n * @param filter - Filter to select which pipelines to update.\n * @public\n * @documentationMaturity preview\n * @requiredField filter\n * @permissionId PIPELINES.PIPELINE_UPDATE_TAGS\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.BulkUpdatePipelineTagsByFilter\n */\nexport async function bulkUpdatePipelineTagsByFilter(\n filter: Record<string, any>,\n options?: BulkUpdatePipelineTagsByFilterOptions\n): Promise<\n NonNullablePaths<BulkUpdatePipelineTagsByFilterResponse, `jobId`, 2> & {\n __applicationErrorsType?: BulkUpdatePipelineTagsByFilterApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts =\n ambassadorWixCrmPipelinesV1Pipeline.bulkUpdatePipelineTagsByFilter(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0]',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdatePipelineTagsByFilterOptions {\n /** List of tags to assign. */\n assignTags?: PrivateTags;\n /** List of tags to unassign. */\n unassignTags?: PrivateTags;\n /**\n * Whether to return the updated pipelines in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCrmPipelinesPipelinesV1PipelinesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/pipelines-app/v1/pipelines',\n destPath: '/v1/pipelines',\n },\n {\n srcPath: '/_api/pipelines-app/v1/bulk/pipelines/',\n destPath: '/v1/bulk/pipelines/',\n },\n {\n srcPath: '/_api/pipelines/v1/pipelines',\n destPath: '/v1/pipelines',\n },\n {\n srcPath: '/_api/pipelines/v1/bulk/pipelines',\n destPath: '/v1/bulk/pipelines',\n },\n ],\n _: [\n {\n srcPath: '/_api/pipelines/v1/pipelines',\n destPath: '/v1/pipelines',\n },\n {\n srcPath: '/_api/pipelines/v1/bulk/pipelines',\n destPath: '/v1/bulk/pipelines',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/pipelines/v1/pipelines',\n destPath: '/v1/pipelines',\n },\n {\n srcPath: '/_api/pipelines/v1/bulk/pipelines',\n destPath: '/v1/bulk/pipelines',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/crm/pipelines/v1/pipelines',\n destPath: '/v1/pipelines',\n },\n {\n srcPath: '/crm/pipelines/v1/bulk/pipelines',\n destPath: '/v1/bulk/pipelines',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_crm_pipelines';\n\n/**\n * Creates a pipeline with defined stages and a final stage.\n *\n * Pipelines must have at least one stage in addition to the `doneStage`.\n * You must specify allowed outcomes that cards can have when moved to the final stage.\n */\nexport function createPipeline(payload: object): RequestOptionsFactory<any> {\n function __createPipeline({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'pipeline.createdDate' },\n { path: 'pipeline.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'POST' as any,\n methodFqn: 'wix.crm.pipelines.pipelines.v1.Pipelines.CreatePipeline',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pipeline.createdDate' },\n { path: 'pipeline.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createPipeline;\n}\n\n/** Retrieves a pipeline by ID. */\nexport function getPipeline(payload: object): RequestOptionsFactory<any> {\n function __getPipeline({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'GET' as any,\n methodFqn: 'wix.crm.pipelines.pipelines.v1.Pipelines.GetPipeline',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines/{pipelineId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pipeline.createdDate' },\n { path: 'pipeline.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPipeline;\n}\n\n/**\n * Updates a pipeline.\n *\n * Each time the pipeline is updated, `revision` increments by 1. The current `revision` must be specified when updating the pipeline. This ensures you're working with the latest pipeline and prevents unintended overwrites.\n *\n * >**Note:**\n * > You can add and remove stages by calling this method. However, the done stage and any stages that contain cards can't be removed.\n *\n * </blockquote>\n */\nexport function updatePipeline(payload: object): RequestOptionsFactory<any> {\n function __updatePipeline({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'pipeline.createdDate' },\n { path: 'pipeline.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'PATCH' as any,\n methodFqn: 'wix.crm.pipelines.pipelines.v1.Pipelines.UpdatePipeline',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines/{pipeline.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pipeline.createdDate' },\n { path: 'pipeline.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updatePipeline;\n}\n\n/**\n * Deletes a pipeline.\n *\n * >**Notes:**\n * > - You can't delete a pipeline that contains cards. Make sure to remove all cards in the pipeline before calling this method.\n * > - Deleting a pipeline permanently removes it from a site.\n */\nexport function deletePipeline(payload: object): RequestOptionsFactory<any> {\n function __deletePipeline({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'DELETE' as any,\n methodFqn: 'wix.crm.pipelines.pipelines.v1.Pipelines.DeletePipeline',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines/{pipelineId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deletePipeline;\n}\n\n/**\n * Retrieves a list of up to 100 pipelines, given the provided paging, filtering, and sorting.\n *\n * By default, 50 pipelines are returned and sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported operations, see [Pipelines: Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-management/pipelines/supported-filters-and-sorting).\n *\n * To learn more about querying pipelines, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n */\nexport function queryPipelines(payload: object): RequestOptionsFactory<any> {\n function __queryPipelines({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'GET' as any,\n methodFqn: 'wix.crm.pipelines.pipelines.v1.Pipelines.QueryPipelines',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pipelines.createdDate' },\n { path: 'pipelines.updatedDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryPipelines;\n}\n\n/**\n * Updates tags on multiple pipelines by specified pipeline IDs.\n *\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n */\nexport function bulkUpdatePipelineTags(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdatePipelineTags({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'POST' as any,\n methodFqn:\n 'wix.crm.pipelines.pipelines.v1.Pipelines.BulkUpdatePipelineTags',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/bulk/pipelines/update-tags',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdatePipelineTags;\n}\n\n/**\n * Updates tags on multiple pipelines, using a filter to select which pipelines to update.\n *\n * If you don't specify a filter, all pipelines on the site are updated.\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n *\n * > **Note:**\n * > This is an asynchronous method that returns a job ID for tracking progress.\n * To get the status of the job, call [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n */\nexport function bulkUpdatePipelineTagsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdatePipelineTagsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'POST' as any,\n methodFqn:\n 'wix.crm.pipelines.pipelines.v1.Pipelines.BulkUpdatePipelineTagsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/bulk/pipelines/update-tags-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdatePipelineTagsByFilter;\n}\n","import {\n createPipeline as publicCreatePipeline,\n getPipeline as publicGetPipeline,\n updatePipeline as publicUpdatePipeline,\n deletePipeline as publicDeletePipeline,\n queryPipelines as publicQueryPipelines,\n typedQueryPipelines as publicTypedQueryPipelines,\n bulkUpdatePipelineTags as publicBulkUpdatePipelineTags,\n bulkUpdatePipelineTagsByFilter as publicBulkUpdatePipelineTagsByFilter,\n} from './crm-pipelines-v1-pipeline-pipelines.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n PipelineQuery,\n PipelinesQueryBuilder,\n typedQueryPipelines as universalTypedQueryPipelines,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\nimport { onPipelineCreated as publicOnPipelineCreated } from './crm-pipelines-v1-pipeline-pipelines.public.js';\nimport { onPipelineDeleted as publicOnPipelineDeleted } from './crm-pipelines-v1-pipeline-pipelines.public.js';\nimport { onPipelineUpdated as publicOnPipelineUpdated } from './crm-pipelines-v1-pipeline-pipelines.public.js';\n\nfunction customQueryPipelines(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryPipelines(httpClient)(),\n typedQueryFunction: (query: PipelineQuery) =>\n publicTypedQueryPipelines(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): PipelinesQueryBuilder;\n function overloadedQuery(\n query: PipelineQuery\n ): ReturnType<typeof universalTypedQueryPipelines>;\n function overloadedQuery(query?: PipelineQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const createPipeline: MaybeContext<\n BuildRESTFunction<typeof publicCreatePipeline> & typeof publicCreatePipeline\n> = /*#__PURE__*/ createRESTModule(publicCreatePipeline);\nexport const getPipeline: MaybeContext<\n BuildRESTFunction<typeof publicGetPipeline> & typeof publicGetPipeline\n> = /*#__PURE__*/ createRESTModule(publicGetPipeline);\nexport const updatePipeline: MaybeContext<\n BuildRESTFunction<typeof publicUpdatePipeline> & typeof publicUpdatePipeline\n> = /*#__PURE__*/ createRESTModule(publicUpdatePipeline);\nexport const deletePipeline: MaybeContext<\n BuildRESTFunction<typeof publicDeletePipeline> & typeof publicDeletePipeline\n> = /*#__PURE__*/ createRESTModule(publicDeletePipeline);\nexport const bulkUpdatePipelineTags: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdatePipelineTags> &\n typeof publicBulkUpdatePipelineTags\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdatePipelineTags);\nexport const bulkUpdatePipelineTagsByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdatePipelineTagsByFilter> &\n typeof publicBulkUpdatePipelineTagsByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdatePipelineTagsByFilter);\nexport const queryPipelines: MaybeContext<\n BuildRESTFunction<typeof customQueryPipelines> & typeof customQueryPipelines\n> = /*#__PURE__*/ createRESTModule(customQueryPipelines);\n/**\n * Triggered when a pipeline is created.\n */\nexport const onPipelineCreated: BuildEventDefinition<\n typeof publicOnPipelineCreated\n> &\n typeof publicOnPipelineCreated = createEventModule(publicOnPipelineCreated);\n/**\n * Triggered when a pipeline is deleted.\n */\nexport const onPipelineDeleted: BuildEventDefinition<\n typeof publicOnPipelineDeleted\n> &\n typeof publicOnPipelineDeleted = createEventModule(publicOnPipelineDeleted);\n/**\n * Triggered when a pipeline is updated.\n */\nexport const onPipelineUpdated: BuildEventDefinition<\n typeof publicOnPipelineUpdated\n> &\n typeof publicOnPipelineUpdated = createEventModule(publicOnPipelineUpdated);\n\nexport {\n Outcome,\n PipelineType,\n SortOrder,\n WebhookIdentityType,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\nexport {\n Pipeline,\n Stage,\n DoneStage,\n ExtendedFields,\n PrivateTags,\n TagList,\n CreatePipelineRequest,\n CreatePipelineResponse,\n GetPipelineRequest,\n GetPipelineResponse,\n UpdatePipelineRequest,\n UpdatePipelineResponse,\n DeletePipelineRequest,\n DeletePipelineResponse,\n QueryPipelinesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryPipelinesResponse,\n CursorPagingMetadata,\n Cursors,\n BulkUpdatePipelineTagsRequest,\n BulkUpdatePipelineTagsResponse,\n ItemMetadata,\n ApplicationError,\n BulkUpdatePipelineTagsResult,\n BulkActionMetadata,\n BulkUpdatePipelineTagsByFilterRequest,\n BulkUpdatePipelineTagsByFilterResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n PipelineCreatedEnvelope,\n PipelineDeletedEnvelope,\n PipelineUpdatedEnvelope,\n UpdatePipeline,\n PipelinesQueryResult,\n PipelinesQueryBuilder,\n PipelineQuerySpec,\n BulkUpdatePipelineTagsOptions,\n BulkUpdatePipelineTagsByFilterOptions,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\nexport { utils } from './crm-pipelines-v1-pipeline-pipelines.universal.js';\nexport {\n OutcomeWithLiterals,\n PipelineTypeWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n UpdatePipelineApplicationErrors,\n DeletePipelineApplicationErrors,\n BulkUpdatePipelineTagsApplicationErrors,\n BulkUpdatePipelineTagsByFilterApplicationErrors,\n CommonQueryWithEntityContext,\n PipelineQuery,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA,sCAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,yBAAAC;AAAA,EAAA,yBAAAC;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AAMP,kBAEK,2DAAiB,oBAAoB;AAIhD,IAAMQ,yBAGsB,mDAAkB,iBAAuB;AAIrE,IAAMC,yBAGsB,mDAAkB,iBAAuB;AAIrE,IAAMC,yBAGsB,mDAAkB,iBAAuB;","names":["bulkUpdatePipelineTags","bulkUpdatePipelineTagsByFilter","createPipeline","deletePipeline","getPipeline","onPipelineCreated","onPipelineDeleted","onPipelineUpdated","queryPipelines","updatePipeline","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","Outcome","PipelineType","SortOrder","WebhookIdentityType","createPipeline","sdkTransformError","getPipeline","updatePipeline","deletePipeline","queryPipelines","bulkUpdatePipelineTags","bulkUpdatePipelineTagsByFilter","createPipeline","getPipeline","updatePipeline","deletePipeline","queryPipelines","typedQueryPipelines","bulkUpdatePipelineTags","bulkUpdatePipelineTagsByFilter","import_rest_modules","queryPipelines","typedQueryPipelines","createPipeline","getPipeline","updatePipeline","deletePipeline","bulkUpdatePipelineTags","bulkUpdatePipelineTagsByFilter","onPipelineCreated","onPipelineDeleted","onPipelineUpdated"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/crm-pipelines-v1-pipeline-pipelines.public.ts","../../src/crm-pipelines-v1-pipeline-pipelines.universal.ts","../../src/crm-pipelines-v1-pipeline-pipelines.http.ts","../../src/crm-pipelines-v1-pipeline-pipelines.schemas.ts","../../src/crm-pipelines-v1-pipeline-pipelines.context.ts"],"sourcesContent":["export * from './src/crm-pipelines-v1-pipeline-pipelines.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n BulkUpdatePipelineTagsApplicationErrors,\n BulkUpdatePipelineTagsByFilterApplicationErrors,\n BulkUpdatePipelineTagsByFilterOptions,\n BulkUpdatePipelineTagsByFilterResponse,\n BulkUpdatePipelineTagsOptions,\n BulkUpdatePipelineTagsResponse,\n DeletePipelineApplicationErrors,\n Pipeline,\n PipelineCreatedEnvelope,\n PipelineDeletedEnvelope,\n PipelineQuery,\n PipelineUpdatedEnvelope,\n PipelinesQueryBuilder,\n QueryPipelinesResponse,\n UpdatePipeline,\n UpdatePipelineApplicationErrors,\n bulkUpdatePipelineTags as universalBulkUpdatePipelineTags,\n bulkUpdatePipelineTagsByFilter as universalBulkUpdatePipelineTagsByFilter,\n createPipeline as universalCreatePipeline,\n deletePipeline as universalDeletePipeline,\n getPipeline as universalGetPipeline,\n queryPipelines as universalQueryPipelines,\n typedQueryPipelines as universalTypedQueryPipelines,\n updatePipeline as universalUpdatePipeline,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/crm' };\n\nexport function createPipeline(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): CreatePipelineSignature {\n return (\n pipeline: NonNullablePaths<\n Pipeline,\n | `doneStage`\n | `doneStage.allowedOutcomes`\n | `doneStage.name`\n | `name`\n | `stages`\n | `stages.${number}.name`,\n 4\n >\n ) =>\n universalCreatePipeline(\n pipeline,\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface CreatePipelineSignature {\n /**\n * Creates a pipeline with defined stages and a final stage.\n *\n * Pipelines must have at least one stage in addition to the `doneStage`.\n * You must specify allowed outcomes that cards can have when moved to the final stage.\n * @param - Pipeline to create.\n * @returns Created pipeline.\n */\n (\n pipeline: NonNullablePaths<\n Pipeline,\n | `doneStage`\n | `doneStage.allowedOutcomes`\n | `doneStage.name`\n | `name`\n | `stages`\n | `stages.${number}.name`,\n 4\n >\n ): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n >\n >;\n}\n\nexport function getPipeline(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): GetPipelineSignature {\n return (pipelineId: string) =>\n universalGetPipeline(\n pipelineId,\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface GetPipelineSignature {\n /**\n * Retrieves a pipeline by ID.\n * @param - Pipeline ID to retrieve.\n * @returns Retrieved pipeline.\n */\n (pipelineId: string): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n >\n >;\n}\n\nexport function updatePipeline(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): UpdatePipelineSignature {\n return (\n _id: string,\n pipeline: NonNullablePaths<UpdatePipeline, `revision`, 2>\n ) =>\n universalUpdatePipeline(\n _id,\n pipeline,\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface UpdatePipelineSignature {\n /**\n * Updates a pipeline.\n *\n * Each time the pipeline is updated, `revision` increments by 1. The current `revision` must be specified when updating the pipeline. This ensures you're working with the latest pipeline and prevents unintended overwrites.\n *\n * >**Note:**\n * > You can add and remove stages by calling this method. However, the done stage and any stages that contain cards can't be removed.\n *\n * </blockquote>\n * @param - Pipeline ID.\n * @returns Updated pipeline.\n */\n (\n _id: string,\n pipeline: NonNullablePaths<UpdatePipeline, `revision`, 2>\n ): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: UpdatePipelineApplicationErrors;\n }\n >;\n}\n\nexport function deletePipeline(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): DeletePipelineSignature {\n return (pipelineId: string) =>\n universalDeletePipeline(\n pipelineId,\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface DeletePipelineSignature {\n /**\n * Deletes a pipeline.\n *\n * >**Notes:**\n * > - You can't delete a pipeline that contains cards. Make sure to remove all cards in the pipeline before calling this method.\n * > - Deleting a pipeline permanently removes it from a site.\n * @param - Pipeline ID.\n */\n (pipelineId: string): Promise<\n void & {\n __applicationErrorsType?: DeletePipelineApplicationErrors;\n }\n >;\n}\n\nexport function queryPipelines(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): QueryPipelinesSignature {\n return () =>\n universalQueryPipelines(\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface QueryPipelinesSignature {\n /**\n * Retrieves a list of up to 100 pipelines, given the provided paging, filtering, and sorting.\n *\n * By default, 50 pipelines are returned and sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported operations, see [Pipelines: Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-management/pipelines/supported-filters-and-sorting).\n *\n * To learn more about querying pipelines, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n */\n (): PipelinesQueryBuilder;\n}\n\nexport function typedQueryPipelines(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): TypedQueryPipelinesSignature {\n return (query: PipelineQuery) =>\n universalTypedQueryPipelines(\n query,\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface TypedQueryPipelinesSignature {\n /** */\n (query: PipelineQuery): Promise<\n NonNullablePaths<QueryPipelinesResponse, `pipelines`, 2>\n >;\n}\n\nexport function bulkUpdatePipelineTags(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): BulkUpdatePipelineTagsSignature {\n return (pipelineIds: string[], options?: BulkUpdatePipelineTagsOptions) =>\n universalBulkUpdatePipelineTags(\n pipelineIds,\n options,\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface BulkUpdatePipelineTagsSignature {\n /**\n * Updates tags on multiple pipelines by specified pipeline IDs.\n *\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n * @param - List of pipeline IDs to update.\n */\n (pipelineIds: string[], options?: BulkUpdatePipelineTagsOptions): Promise<\n NonNullablePaths<\n BulkUpdatePipelineTagsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkUpdatePipelineTagsApplicationErrors;\n }\n >;\n}\n\nexport function bulkUpdatePipelineTagsByFilter(\n httpClient: HttpClient,\n __options?: { validateRequestSchema?: boolean }\n): BulkUpdatePipelineTagsByFilterSignature {\n return (\n filter: Record<string, any>,\n options?: BulkUpdatePipelineTagsByFilterOptions\n ) =>\n universalBulkUpdatePipelineTagsByFilter(\n filter,\n options,\n // @ts-ignore\n { httpClient, validateRequestSchema: __options?.validateRequestSchema }\n );\n}\n\ninterface BulkUpdatePipelineTagsByFilterSignature {\n /**\n * Updates tags on multiple pipelines, using a filter to select which pipelines to update.\n *\n * If you don't specify a filter, all pipelines on the site are updated.\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n *\n * > **Note:**\n * > This is an asynchronous method that returns a job ID for tracking progress.\n * To get the status of the job, call [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n * @param - Filter to select which pipelines to update.\n */\n (\n filter: Record<string, any>,\n options?: BulkUpdatePipelineTagsByFilterOptions\n ): Promise<\n NonNullablePaths<BulkUpdatePipelineTagsByFilterResponse, `jobId`, 2> & {\n __applicationErrorsType?: BulkUpdatePipelineTagsByFilterApplicationErrors;\n }\n >;\n}\n\nexport const onPipelineCreated = EventDefinition(\n 'wix.crm.pipelines.v1.pipeline_created',\n true,\n (event: PipelineCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PipelineCreatedEnvelope>();\nexport const onPipelineDeleted = EventDefinition(\n 'wix.crm.pipelines.v1.pipeline_deleted',\n true,\n (event: PipelineDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n ],\n },\n ])\n )\n)<PipelineDeletedEnvelope>();\nexport const onPipelineUpdated = EventDefinition(\n 'wix.crm.pipelines.v1.pipeline_updated',\n true,\n (event: PipelineUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'entity.createdDate' },\n { path: 'entity.updatedDate' },\n { path: 'metadata.eventTime' },\n { path: 'modifiedFields.createdDate' },\n { path: 'modifiedFields.updatedDate' },\n ],\n },\n ])\n )\n)<PipelineUpdatedEnvelope>();\n\nexport {\n AccountInfo,\n AccountInfoMetadata,\n ActionEvent,\n ApplicationError,\n BaseEventMetadata,\n BulkActionMetadata,\n BulkUpdatePipelineTagsByFilterOptions,\n BulkUpdatePipelineTagsByFilterRequest,\n BulkUpdatePipelineTagsByFilterResponse,\n BulkUpdatePipelineTagsOptions,\n BulkUpdatePipelineTagsRequest,\n BulkUpdatePipelineTagsResponse,\n BulkUpdatePipelineTagsResult,\n CreatePipelineRequest,\n CreatePipelineResponse,\n CursorPaging,\n CursorPagingMetadata,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Cursors,\n DeletePipelineRequest,\n DeletePipelineResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n DoneStage,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n EventMetadata,\n ExtendedFields,\n GetPipelineRequest,\n GetPipelineResponse,\n IdentificationData,\n IdentificationDataIdOneOf,\n ItemMetadata,\n MessageEnvelope,\n Outcome,\n Pipeline,\n PipelineCreatedEnvelope,\n PipelineDeletedEnvelope,\n PipelineQuerySpec,\n PipelineType,\n PipelineUpdatedEnvelope,\n PipelinesQueryBuilder,\n PipelinesQueryResult,\n PrivateTags,\n QueryPipelinesRequest,\n QueryPipelinesResponse,\n RestoreInfo,\n SortOrder,\n Sorting,\n Stage,\n TagList,\n UpdatePipeline,\n UpdatePipelineRequest,\n UpdatePipelineResponse,\n WebhookIdentityType,\n utils,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport { queryBuilder } from '@wix/sdk-runtime/query-builder';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport {\n HttpClient,\n HttpResponse,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n} from '@wix/sdk-types';\nimport * as ambassadorWixCrmPipelinesV1Pipeline from './crm-pipelines-v1-pipeline-pipelines.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport {\n CreatePipelineRequest as CreatePipelineRequestSchema,\n GetPipelineRequest as GetPipelineRequestSchema,\n UpdatePipelineRequest as UpdatePipelineRequestSchema,\n DeletePipelineRequest as DeletePipelineRequestSchema,\n QueryPipelinesRequest as QueryPipelinesRequestSchema,\n BulkUpdatePipelineTagsRequest as BulkUpdatePipelineTagsRequestSchema,\n BulkUpdatePipelineTagsByFilterRequest as BulkUpdatePipelineTagsByFilterRequestSchema,\n} from './crm-pipelines-v1-pipeline-pipelines.schemas.js';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\n\n/**\n * A structured business process workflow consisting of multiple ordered stages and a final stage.\n *\n * Pipelines define the path that cards (deals, leads, projects, etc.) follow from start to completion.\n * Each pipeline has a currency setting that applies to all monetary values within that pipeline.\n * Pipeline stages can be configured with stale duration settings to identify workflow delays.\n */\nexport interface Pipeline {\n /**\n * Pipeline ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the pipeline is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the pipeline.\n *\n * Ignored when creating a pipeline.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Pipeline name.\n * @minLength 1\n * @maxLength 60\n */\n name?: string | null;\n /**\n * Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\n *\n * Default: Based on the site's currency settings.\n * @format CURRENCY\n * @immutable\n */\n currency?: string | null;\n /**\n * Pipeline stages in order.\n * Cards move through these stages as they progress through the business process.\n * @minSize 1\n * @maxSize 30\n */\n stages?: Stage[];\n /** The final pipeline stage where cards receive a final outcome. */\n doneStage?: DoneStage;\n /** Extended fields data. */\n extendedFields?: ExtendedFields;\n /** Tags for organizing and categorizing pipelines. */\n tags?: PrivateTags;\n}\n\nexport interface Stage {\n /**\n * Stage ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Stage name.\n * @minLength 1\n * @maxLength 40\n */\n name?: string | null;\n /**\n * The duration (in hours) a card can remain in this stage before becoming stale.\n * When a card exceeds this duration, it's marked as stale to indicate potential workflow delays.\n * @min 1\n * @max 100000\n */\n staleDurationInHours?: number | null;\n}\n\nexport interface DoneStage {\n /**\n * Done stage ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Done stage name.\n * @minLength 1\n * @maxLength 40\n */\n name?: string | null;\n /**\n * Outcomes that cards can have when moved to the done stage.\n * @minSize 1\n * @maxSize 3\n */\n allowedOutcomes?: OutcomeWithLiterals[];\n}\n\nexport enum Outcome {\n /** No specific outcome. The process reached the final stage but has not been specified as successful or unsuccessful. */\n NONE = 'NONE',\n /** Successful outcome. The process achieved its intended goal. */\n WON = 'WON',\n /** Unsuccessful outcome. The process didn't achieve its intended goal. */\n LOST = 'LOST',\n}\n\n/** @enumType */\nexport type OutcomeWithLiterals = Outcome | 'NONE' | 'WON' | 'LOST';\n\nexport enum PipelineType {\n /** Generic pipeline type. */\n GENERIC = 'GENERIC',\n /** Lead pipeline type. */\n LEAD = 'LEAD',\n}\n\n/** @enumType */\nexport type PipelineTypeWithLiterals = PipelineType | 'GENERIC' | 'LEAD';\n\nexport interface ExtendedFields {\n /**\n * Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\n * The value of each key is structured according to the schema defined when the extended fields were configured.\n *\n * You can only access fields for which you have the appropriate permissions.\n *\n * Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).\n */\n namespaces?: Record<string, Record<string, any>>;\n}\n\nexport interface PrivateTags {\n /** Tags that are exposed to anyone with access to the entity, including site members and visitors. */\n privateTags?: TagList;\n}\n\nexport interface TagList {\n /**\n * List of tag IDs.\n * @maxSize 100\n * @maxLength 5\n */\n tagIds?: string[];\n}\n\nexport interface CreatePipelineRequest {\n /** Pipeline to create. */\n pipeline: Pipeline;\n}\n\nexport interface CreatePipelineResponse {\n /** Created pipeline. */\n pipeline?: Pipeline;\n}\n\nexport interface GetPipelineRequest {\n /**\n * Pipeline ID to retrieve.\n * @format GUID\n */\n pipelineId: string;\n}\n\nexport interface GetPipelineResponse {\n /** Retrieved pipeline. */\n pipeline?: Pipeline;\n}\n\nexport interface UpdatePipelineRequest {\n /** Pipeline to update, may be partial. */\n pipeline: Pipeline;\n}\n\nexport interface UpdatePipelineResponse {\n /** Updated pipeline. */\n pipeline?: Pipeline;\n}\n\nexport interface DeletePipelineRequest {\n /**\n * Pipeline ID.\n * @format GUID\n */\n pipelineId: string;\n}\n\nexport interface DeletePipelineResponse {}\n\nexport interface QueryPipelinesRequest {\n /** Query options. */\n query?: CursorQuery;\n}\n\nexport interface CursorQuery extends CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n /**\n * Filter object.\n *\n * Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * Sort object.\n *\n * Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 5\n */\n sort?: Sorting[];\n}\n\n/** @oneof */\nexport interface CursorQueryPagingMethodOneOf {\n /**\n * Cursor paging options.\n *\n * Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).\n */\n cursorPaging?: CursorPaging;\n}\n\nexport interface Sorting {\n /**\n * Name of the field to sort by.\n * @maxLength 512\n */\n fieldName?: string;\n /** Sort order. */\n order?: SortOrderWithLiterals;\n}\n\nexport enum SortOrder {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type SortOrderWithLiterals = SortOrder | 'ASC' | 'DESC';\n\nexport interface CursorPaging {\n /**\n * Maximum number of items to return.\n * @max 100\n */\n limit?: number | null;\n /**\n * Pointer to the next or previous page in the list of results.\n *\n * Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n * Not relevant for the first request.\n * @maxLength 16000\n */\n cursor?: string | null;\n}\n\nexport interface QueryPipelinesResponse {\n /** Retrieved pipelines. */\n pipelines?: Pipeline[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n}\n\nexport interface CursorPagingMetadata {\n /** Number of items returned in current page. */\n count?: number | null;\n /** Cursor strings that point to the next page, previous page, or both. */\n cursors?: Cursors;\n /**\n * Whether there are more pages to retrieve following the current page.\n *\n * + `true`: Another page of results can be retrieved.\n * + `false`: This is the last page.\n */\n hasNext?: boolean | null;\n}\n\nexport interface Cursors {\n /**\n * Cursor string pointing to the next page in the list of results.\n * @maxLength 16000\n */\n next?: string | null;\n /**\n * Cursor pointing to the previous page in the list of results.\n * @maxLength 16000\n */\n prev?: string | null;\n}\n\nexport interface BulkUpdatePipelineTagsRequest {\n /**\n * List of pipeline IDs to update.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n pipelineIds: string[];\n /** List of tags to assign. */\n assignTags?: PrivateTags;\n /** List of tags to unassign. */\n unassignTags?: PrivateTags;\n /**\n * Whether to return the updated pipelines in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkUpdatePipelineTagsResponse {\n /**\n * Results for each updated pipeline.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdatePipelineTagsResult[];\n /** Metadata about the bulk update. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface ItemMetadata {\n /**\n * Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\n * @format GUID\n */\n _id?: string | null;\n /** Index of the item within the request array. Allows for correlation between request and response items. */\n originalIndex?: number;\n /** Whether the requested action was successful for this item. When `false`, the `error` field is populated. */\n success?: boolean;\n /** Details about the error in case of failure. */\n error?: ApplicationError;\n}\n\nexport interface ApplicationError {\n /** Error code. */\n code?: string;\n /** Description of the error. */\n description?: string;\n /** Data related to the error. */\n data?: Record<string, any> | null;\n}\n\nexport interface BulkUpdatePipelineTagsResult {\n /** Metadata about the individual updated pipeline. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface BulkActionMetadata {\n /** Number of items that were successfully processed. */\n totalSuccesses?: number;\n /** Number of items that couldn't be processed. */\n totalFailures?: number;\n /** Number of failures without details because detailed failure threshold was exceeded. */\n undetailedFailures?: number;\n}\n\nexport interface BulkUpdatePipelineTagsByFilterRequest {\n /** Filter to select which pipelines to update. */\n filter: Record<string, any> | null;\n /** List of tags to assign. */\n assignTags?: PrivateTags;\n /** List of tags to unassign. */\n unassignTags?: PrivateTags;\n /**\n * Whether to return the updated pipelines in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkUpdatePipelineTagsByFilterResponse {\n /**\n * Job ID for tracking the asynchronous tag updates.\n * @format GUID\n */\n jobId?: string;\n}\n\nexport interface DomainEvent extends DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n}\n\n/** @oneof */\nexport interface DomainEventBodyOneOf {\n createdEvent?: EntityCreatedEvent;\n updatedEvent?: EntityUpdatedEvent;\n deletedEvent?: EntityDeletedEvent;\n actionEvent?: ActionEvent;\n}\n\nexport interface EntityCreatedEvent {\n entity?: string;\n}\n\nexport interface RestoreInfo {\n deletedDate?: Date | null;\n}\n\nexport interface EntityUpdatedEvent {\n /**\n * Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.\n * This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.\n * We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.\n */\n currentEntity?: string;\n}\n\nexport interface EntityDeletedEvent {\n /** Entity that was deleted. */\n deletedEntity?: string | null;\n}\n\nexport interface ActionEvent {\n body?: string;\n}\n\nexport interface MessageEnvelope {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Stringify payload. */\n data?: string;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface IdentificationData extends IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n /** @readonly */\n identityType?: WebhookIdentityTypeWithLiterals;\n}\n\n/** @oneof */\nexport interface IdentificationDataIdOneOf {\n /**\n * ID of a site visitor that has not logged in to the site.\n * @format GUID\n */\n anonymousVisitorId?: string;\n /**\n * ID of a site visitor that has logged in to the site.\n * @format GUID\n */\n memberId?: string;\n /**\n * ID of a Wix user (site owner, contributor, etc.).\n * @format GUID\n */\n wixUserId?: string;\n /**\n * ID of an app.\n * @format GUID\n */\n appId?: string;\n}\n\nexport enum WebhookIdentityType {\n UNKNOWN = 'UNKNOWN',\n ANONYMOUS_VISITOR = 'ANONYMOUS_VISITOR',\n MEMBER = 'MEMBER',\n WIX_USER = 'WIX_USER',\n APP = 'APP',\n}\n\n/** @enumType */\nexport type WebhookIdentityTypeWithLiterals =\n | WebhookIdentityType\n | 'UNKNOWN'\n | 'ANONYMOUS_VISITOR'\n | 'MEMBER'\n | 'WIX_USER'\n | 'APP';\n\nexport interface AccountInfo {\n /**\n * ID of the Wix account associated with the event.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent Wix account. Only included when accountId belongs to a child account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the Wix site associated with the event. Only included when the event is tied to a specific site.\n * @format GUID\n */\n siteId?: string | null;\n}\n\n/** @docsIgnore */\nexport type UpdatePipelineApplicationErrors =\n | {\n code?: 'CANNOT_CHANGE_DURATION_ON_STAGE_WITH_CARDS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_DELETE_STAGE_WITH_CARDS';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_DELETE_PIPELINE_DONE_STAGE';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INSUFFICIENT_PIPELINE_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'STAGE_IDS_MUST_BE_UNIQUE';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type DeletePipelineApplicationErrors = {\n code?: 'CANNOT_DELETE_NON_EMPTY_PIPELINE';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkUpdatePipelineTagsApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkUpdatePipelineTagsByFilterApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n\nexport interface BaseEventMetadata {\n /**\n * App instance ID.\n * @format GUID\n */\n instanceId?: string | null;\n /**\n * Event type.\n * @maxLength 150\n */\n eventType?: string;\n /** The identification type and identity data. */\n identity?: IdentificationData;\n /** Details related to the account */\n accountInfo?: AccountInfo;\n}\n\nexport interface EventMetadata extends BaseEventMetadata {\n /** Event ID. With this ID you can easily spot duplicated events and ignore them. */\n _id?: string;\n /**\n * Fully Qualified Domain Name of an entity. This is a unique identifier assigned to the API main business entities.\n * For example, `wix.stores.catalog.product`, `wix.bookings.session`, `wix.payments.transaction`.\n */\n entityFqdn?: string;\n /**\n * Event action name, placed at the top level to make it easier for users to dispatch messages.\n * For example: `created`/`updated`/`deleted`/`started`/`completed`/`email_opened`.\n */\n slug?: string;\n /** ID of the entity associated with the event. */\n entityId?: string;\n /** Event timestamp in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601) format and UTC time. For example, `2020-04-26T13:57:50.699Z`. */\n eventTime?: Date | null;\n /**\n * Whether the event was triggered as a result of a privacy regulation application\n * (for example, GDPR).\n */\n triggeredByAnonymizeRequest?: boolean | null;\n /** If present, indicates the action that triggered the event. */\n originatedFrom?: string | null;\n /**\n * A sequence number that indicates the order of updates to an entity. For example, if an entity was updated at 16:00 and then again at 16:01, the second update will always have a higher sequence number.\n * You can use this number to make sure you're handling updates in the right order. Just save the latest sequence number on your end and compare it to the one in each new message. If the new message has an older (lower) number, you can safely ignore it.\n */\n entityEventSequence?: string | null;\n accountInfo?: AccountInfoMetadata;\n}\n\nexport interface AccountInfoMetadata {\n /** ID of the Wix account associated with the event */\n accountId: string;\n /** ID of the Wix site associated with the event. Only included when the event is tied to a specific site. */\n siteId?: string;\n /** ID of the parent Wix account. Only included when 'accountId' belongs to a child account. */\n parentAccountId?: string;\n}\n\nexport interface PipelineCreatedEnvelope {\n entity: Pipeline;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a pipeline is created.\n * @permissionScope Manage Pipelines\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES\n * @permissionScope Read Pipelines\n * @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES\n * @permissionId PIPELINES.PIPELINE_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.pipeline_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onPipelineCreated(\n handler: (event: PipelineCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PipelineDeletedEnvelope {\n entity: Pipeline;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a pipeline is deleted.\n * @permissionScope Manage Pipelines\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES\n * @permissionScope Read Pipelines\n * @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES\n * @permissionId PIPELINES.PIPELINE_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.pipeline_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onPipelineDeleted(\n handler: (event: PipelineDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface PipelineUpdatedEnvelope {\n entity: Pipeline;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a pipeline is updated.\n * @permissionScope Manage Pipelines\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES\n * @permissionScope Read Pipelines\n * @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES\n * @permissionId PIPELINES.PIPELINE_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.pipeline_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onPipelineUpdated(\n handler: (event: PipelineUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a pipeline with defined stages and a final stage.\n *\n * Pipelines must have at least one stage in addition to the `doneStage`.\n * You must specify allowed outcomes that cards can have when moved to the final stage.\n * @param pipeline - Pipeline to create.\n * @public\n * @documentationMaturity preview\n * @requiredField pipeline\n * @requiredField pipeline.doneStage\n * @requiredField pipeline.doneStage.allowedOutcomes\n * @requiredField pipeline.doneStage.name\n * @requiredField pipeline.name\n * @requiredField pipeline.stages\n * @requiredField pipeline.stages.name\n * @permissionId PIPELINES.PIPELINE_CREATE\n * @applicableIdentity APP\n * @returns Created pipeline.\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.CreatePipeline\n */\nexport async function createPipeline(\n pipeline: NonNullablePaths<\n Pipeline,\n | `doneStage`\n | `doneStage.allowedOutcomes`\n | `doneStage.name`\n | `name`\n | `stages`\n | `stages.${number}.name`,\n 4\n >\n): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n CreatePipelineRequestSchema.parse({ pipeline });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ pipeline: pipeline });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Pipeline.createPipeline(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.pipeline!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { pipeline: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['pipeline']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a pipeline by ID.\n * @param pipelineId - Pipeline ID to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField pipelineId\n * @permissionId PIPELINES.PIPELINE_READ\n * @applicableIdentity APP\n * @returns Retrieved pipeline.\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.GetPipeline\n */\nexport async function getPipeline(\n pipelineId: string\n): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n >\n> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n GetPipelineRequestSchema.parse({ pipelineId });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pipelineId: pipelineId,\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Pipeline.getPipeline(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.pipeline!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { pipelineId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['pipelineId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a pipeline.\n *\n * Each time the pipeline is updated, `revision` increments by 1. The current `revision` must be specified when updating the pipeline. This ensures you're working with the latest pipeline and prevents unintended overwrites.\n *\n * >**Note:**\n * > You can add and remove stages by calling this method. However, the done stage and any stages that contain cards can't be removed.\n *\n * </blockquote>\n * @param _id - Pipeline ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @requiredField pipeline\n * @requiredField pipeline.revision\n * @permissionId PIPELINES.PIPELINE_UPDATE\n * @applicableIdentity APP\n * @returns Updated pipeline.\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.UpdatePipeline\n */\nexport async function updatePipeline(\n _id: string,\n pipeline: NonNullablePaths<UpdatePipeline, `revision`, 2>\n): Promise<\n NonNullablePaths<\n Pipeline,\n `stages` | `doneStage.allowedOutcomes` | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: UpdatePipelineApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n UpdatePipelineRequestSchema.parse({ _id, pipeline });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pipeline: { ...pipeline, id: _id },\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Pipeline.updatePipeline(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.pipeline!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { pipeline: '$[1]' },\n explicitPathsToArguments: { 'pipeline.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'pipeline']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdatePipeline {\n /**\n * Pipeline ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the pipeline is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the pipeline.\n *\n * Ignored when creating a pipeline.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _createdDate?: Date | null;\n /**\n * Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n _updatedDate?: Date | null;\n /**\n * Pipeline name.\n * @minLength 1\n * @maxLength 60\n */\n name?: string | null;\n /**\n * Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\n *\n * Default: Based on the site's currency settings.\n * @format CURRENCY\n * @immutable\n */\n currency?: string | null;\n /**\n * Pipeline stages in order.\n * Cards move through these stages as they progress through the business process.\n * @minSize 1\n * @maxSize 30\n */\n stages?: Stage[];\n /** The final pipeline stage where cards receive a final outcome. */\n doneStage?: DoneStage;\n /** Extended fields data. */\n extendedFields?: ExtendedFields;\n /** Tags for organizing and categorizing pipelines. */\n tags?: PrivateTags;\n}\n\n/**\n * Deletes a pipeline.\n *\n * >**Notes:**\n * > - You can't delete a pipeline that contains cards. Make sure to remove all cards in the pipeline before calling this method.\n * > - Deleting a pipeline permanently removes it from a site.\n * @param pipelineId - Pipeline ID.\n * @public\n * @documentationMaturity preview\n * @requiredField pipelineId\n * @permissionId PIPELINES.PIPELINE_DELETE\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.DeletePipeline\n */\nexport async function deletePipeline(pipelineId: string): Promise<\n void & {\n __applicationErrorsType?: DeletePipelineApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n DeletePipelineRequestSchema.parse({ pipelineId });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pipelineId: pipelineId,\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Pipeline.deletePipeline(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { pipelineId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['pipelineId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 100 pipelines, given the provided paging, filtering, and sorting.\n *\n * By default, 50 pipelines are returned and sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported operations, see [Pipelines: Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-management/pipelines/supported-filters-and-sorting).\n *\n * To learn more about querying pipelines, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n * @public\n * @documentationMaturity preview\n * @permissionId PIPELINES.PIPELINE_READ\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.QueryPipelines\n */\nexport function queryPipelines(): PipelinesQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<\n Pipeline,\n 'CURSOR',\n QueryPipelinesRequest,\n QueryPipelinesResponse\n >({\n func: async (payload: QueryPipelinesRequest) => {\n const reqOpts =\n ambassadorWixCrmPipelinesV1Pipeline.queryPipelines(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n return result;\n } catch (err) {\n sideEffects?.onError?.(err);\n throw err;\n }\n },\n requestTransformer: (query: QueryPipelinesRequest['query']) => {\n const args = [query, {}] as [QueryPipelinesRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryPipelinesResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.pipelines,\n pagingMetadata: transformedData?.pagingMetadata,\n };\n },\n errorTransformer: (err: unknown) => {\n const transformedError = sdkTransformError(err, {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n });\n\n throw transformedError;\n },\n pagingMethod: 'CURSOR',\n transformationPaths: {},\n });\n}\n\ninterface QueryCursorResult {\n cursors: Cursors;\n hasNext: () => boolean;\n hasPrev: () => boolean;\n length: number;\n pageSize: number;\n}\n\nexport interface PipelinesQueryResult extends QueryCursorResult {\n items: Pipeline[];\n query: PipelinesQueryBuilder;\n next: () => Promise<PipelinesQueryResult>;\n prev: () => Promise<PipelinesQueryResult>;\n}\n\nexport interface PipelinesQueryBuilder {\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n eq: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ne: (\n propertyName: '_id' | '_createdDate' | '_updatedDate' | 'name',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n ge: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n gt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n le: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `value`.\n * @param value - Value to compare against.\n * @documentationMaturity preview\n */\n lt: (\n propertyName: '_createdDate' | '_updatedDate',\n value: any\n ) => PipelinesQueryBuilder;\n /** @param propertyName - Property whose value is compared with `string`.\n * @param string - String to compare against. Case-insensitive.\n * @documentationMaturity preview\n */\n startsWith: (propertyName: 'name', value: string) => PipelinesQueryBuilder;\n /** @documentationMaturity preview */\n in: (propertyName: '_id' | 'name', value: any) => PipelinesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (\n ...propertyNames: Array<'_createdDate' | 'name'>\n ) => PipelinesQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (\n ...propertyNames: Array<'_updatedDate'>\n ) => PipelinesQueryBuilder;\n /** @param limit - Number of items to return, which is also the `pageSize` of the results object.\n * @documentationMaturity preview\n */\n limit: (limit: number) => PipelinesQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => PipelinesQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<PipelinesQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.QueryPipelines\n * @requiredField query\n */\nexport async function typedQueryPipelines(\n query: PipelineQuery\n): Promise<NonNullablePaths<QueryPipelinesResponse, `pipelines`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n QueryPipelinesRequestSchema.parse({ query });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ query: query });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Pipeline.queryPipelines(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { query: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['query']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface PipelineQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id'];\n operators: ['$eq', '$in', '$ne', '$nin'];\n sort: 'NONE';\n },\n {\n fields: ['_createdDate'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'ASC';\n },\n {\n fields: ['_updatedDate'];\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n sort: 'DESC';\n },\n {\n fields: ['name'];\n operators: ['$eq', '$in', '$ne', '$nin', '$startsWith'];\n sort: 'ASC';\n }\n ];\n}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<\n Pipeline,\n PipelineQuerySpec\n>;\nexport type PipelineQuery = {\n /** \n Cursor paging options.\n\n Learn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging). \n */\n cursorPaging?: {\n /** \n Maximum number of items to return. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['limit']\n | null;\n /** \n Pointer to the next or previous page in the list of results.\n\n Pass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\n Not relevant for the first request. \n @maxLength: 16000 \n */\n cursor?:\n | NonNullable<CommonQueryWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonQueryWithEntityContext['filter'] | null;\n /** \n Sort object.\n\n Learn more about [sorting](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 5 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonQueryWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonQueryWithEntityContext['sort']>[number]['order'];\n }[];\n};\n\nexport const utils = {\n query: {\n ...createQueryUtils<Pipeline, PipelineQuerySpec, PipelineQuery>(),\n },\n};\n\n/**\n * Updates tags on multiple pipelines by specified pipeline IDs.\n *\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n * @param pipelineIds - List of pipeline IDs to update.\n * @public\n * @documentationMaturity preview\n * @requiredField pipelineIds\n * @permissionId PIPELINES.PIPELINE_UPDATE_TAGS\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.BulkUpdatePipelineTags\n */\nexport async function bulkUpdatePipelineTags(\n pipelineIds: string[],\n options?: BulkUpdatePipelineTagsOptions\n): Promise<\n NonNullablePaths<\n BulkUpdatePipelineTagsResponse,\n | `results`\n | `results.${number}.itemMetadata.originalIndex`\n | `results.${number}.itemMetadata.success`\n | `results.${number}.itemMetadata.error.code`\n | `results.${number}.itemMetadata.error.description`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\n > & {\n __applicationErrorsType?: BulkUpdatePipelineTagsApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n BulkUpdatePipelineTagsRequestSchema.parse({ pipelineIds, options });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pipelineIds: pipelineIds,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts =\n ambassadorWixCrmPipelinesV1Pipeline.bulkUpdatePipelineTags(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n pipelineIds: '$[0]',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['pipelineIds', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdatePipelineTagsOptions {\n /** List of tags to assign. */\n assignTags?: PrivateTags;\n /** List of tags to unassign. */\n unassignTags?: PrivateTags;\n /**\n * Whether to return the updated pipelines in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Updates tags on multiple pipelines, using a filter to select which pipelines to update.\n *\n * If you don't specify a filter, all pipelines on the site are updated.\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n *\n * > **Note:**\n * > This is an asynchronous method that returns a job ID for tracking progress.\n * To get the status of the job, call [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n * @param filter - Filter to select which pipelines to update.\n * @public\n * @documentationMaturity preview\n * @requiredField filter\n * @permissionId PIPELINES.PIPELINE_UPDATE_TAGS\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.pipelines.v1.Pipelines.BulkUpdatePipelineTagsByFilter\n */\nexport async function bulkUpdatePipelineTagsByFilter(\n filter: Record<string, any>,\n options?: BulkUpdatePipelineTagsByFilterOptions\n): Promise<\n NonNullablePaths<BulkUpdatePipelineTagsByFilterResponse, `jobId`, 2> & {\n __applicationErrorsType?: BulkUpdatePipelineTagsByFilterApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects, validateRequestSchema } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n validateRequestSchema?: boolean;\n };\n\n if (validateRequestSchema) {\n BulkUpdatePipelineTagsByFilterRequestSchema.parse({ filter, options });\n }\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n filter: filter,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts =\n ambassadorWixCrmPipelinesV1Pipeline.bulkUpdatePipelineTagsByFilter(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: {\n filter: '$[0]',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdatePipelineTagsByFilterOptions {\n /** List of tags to assign. */\n assignTags?: PrivateTags;\n /** List of tags to unassign. */\n unassignTags?: PrivateTags;\n /**\n * Whether to return the updated pipelines in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKTimestampToRESTTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformSDKFieldMaskToRESTFieldMask } from '@wix/sdk-runtime/transformations/field-mask';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveWixCrmPipelinesPipelinesV1PipelinesUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/pipelines-app/v1/pipelines',\n destPath: '/v1/pipelines',\n },\n {\n srcPath: '/_api/pipelines-app/v1/bulk/pipelines/',\n destPath: '/v1/bulk/pipelines/',\n },\n {\n srcPath: '/_api/pipelines/v1/pipelines',\n destPath: '/v1/pipelines',\n },\n {\n srcPath: '/_api/pipelines/v1/bulk/pipelines',\n destPath: '/v1/bulk/pipelines',\n },\n ],\n _: [\n {\n srcPath: '/_api/pipelines/v1/pipelines',\n destPath: '/v1/pipelines',\n },\n {\n srcPath: '/_api/pipelines/v1/bulk/pipelines',\n destPath: '/v1/bulk/pipelines',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/pipelines/v1/pipelines',\n destPath: '/v1/pipelines',\n },\n {\n srcPath: '/_api/pipelines/v1/bulk/pipelines',\n destPath: '/v1/bulk/pipelines',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/crm/pipelines/v1/pipelines',\n destPath: '/v1/pipelines',\n },\n {\n srcPath: '/crm/pipelines/v1/bulk/pipelines',\n destPath: '/v1/bulk/pipelines',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_crm_pipelines';\n\n/**\n * Creates a pipeline with defined stages and a final stage.\n *\n * Pipelines must have at least one stage in addition to the `doneStage`.\n * You must specify allowed outcomes that cards can have when moved to the final stage.\n */\nexport function createPipeline(payload: object): RequestOptionsFactory<any> {\n function __createPipeline({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'pipeline.createdDate' },\n { path: 'pipeline.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'POST' as any,\n methodFqn: 'wix.crm.pipelines.pipelines.v1.Pipelines.CreatePipeline',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pipeline.createdDate' },\n { path: 'pipeline.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createPipeline;\n}\n\n/** Retrieves a pipeline by ID. */\nexport function getPipeline(payload: object): RequestOptionsFactory<any> {\n function __getPipeline({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'GET' as any,\n methodFqn: 'wix.crm.pipelines.pipelines.v1.Pipelines.GetPipeline',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines/{pipelineId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pipeline.createdDate' },\n { path: 'pipeline.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getPipeline;\n}\n\n/**\n * Updates a pipeline.\n *\n * Each time the pipeline is updated, `revision` increments by 1. The current `revision` must be specified when updating the pipeline. This ensures you're working with the latest pipeline and prevents unintended overwrites.\n *\n * >**Note:**\n * > You can add and remove stages by calling this method. However, the done stage and any stages that contain cards can't be removed.\n *\n * </blockquote>\n */\nexport function updatePipeline(payload: object): RequestOptionsFactory<any> {\n function __updatePipeline({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'pipeline.createdDate' },\n { path: 'pipeline.updatedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'PATCH' as any,\n methodFqn: 'wix.crm.pipelines.pipelines.v1.Pipelines.UpdatePipeline',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines/{pipeline.id}',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pipeline.createdDate' },\n { path: 'pipeline.updatedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updatePipeline;\n}\n\n/**\n * Deletes a pipeline.\n *\n * >**Notes:**\n * > - You can't delete a pipeline that contains cards. Make sure to remove all cards in the pipeline before calling this method.\n * > - Deleting a pipeline permanently removes it from a site.\n */\nexport function deletePipeline(payload: object): RequestOptionsFactory<any> {\n function __deletePipeline({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'DELETE' as any,\n methodFqn: 'wix.crm.pipelines.pipelines.v1.Pipelines.DeletePipeline',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines/{pipelineId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deletePipeline;\n}\n\n/**\n * Retrieves a list of up to 100 pipelines, given the provided paging, filtering, and sorting.\n *\n * By default, 50 pipelines are returned and sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported operations, see [Pipelines: Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-management/pipelines/supported-filters-and-sorting).\n *\n * To learn more about querying pipelines, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language) and [Sorting and Paging](https://dev.wix.com/docs/api-reference/articles/work-with-wix-apis/data-retrieval/about-sorting-and-paging).\n */\nexport function queryPipelines(payload: object): RequestOptionsFactory<any> {\n function __queryPipelines({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'GET' as any,\n methodFqn: 'wix.crm.pipelines.pipelines.v1.Pipelines.QueryPipelines',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines/query',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'pipelines.createdDate' },\n { path: 'pipelines.updatedDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/pipelines/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryPipelines;\n}\n\n/**\n * Updates tags on multiple pipelines by specified pipeline IDs.\n *\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n */\nexport function bulkUpdatePipelineTags(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdatePipelineTags({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'POST' as any,\n methodFqn:\n 'wix.crm.pipelines.pipelines.v1.Pipelines.BulkUpdatePipelineTags',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/bulk/pipelines/update-tags',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdatePipelineTags;\n}\n\n/**\n * Updates tags on multiple pipelines, using a filter to select which pipelines to update.\n *\n * If you don't specify a filter, all pipelines on the site are updated.\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the pipelines.\n *\n * > **Note:**\n * > This is an asynchronous method that returns a job ID for tracking progress.\n * To get the status of the job, call [Get Async Job](https://dev.wix.com/docs/api-reference/business-management/async-job/get-async-job).\n */\nexport function bulkUpdatePipelineTagsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdatePipelineTagsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.pipeline',\n method: 'POST' as any,\n methodFqn:\n 'wix.crm.pipelines.pipelines.v1.Pipelines.BulkUpdatePipelineTagsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesPipelinesV1PipelinesUrl({\n protoPath: '/v1/bulk/pipelines/update-tags-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdatePipelineTagsByFilter;\n}\n","import * as z from 'zod';\n\nexport const CreatePipelineRequest = z.object({\n pipeline: z\n .object({\n _id: z\n .string()\n .describe('Pipeline ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n revision: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Revision number, which increments by 1 each time the pipeline is updated.\\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\\n\\nIgnored when creating a pipeline.'\n )\n .optional()\n .nullable(),\n _createdDate: z\n .date()\n .describe(\n 'Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe(\n 'Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n name: z.string().describe('Pipeline name.').min(1).max(60),\n currency: z\n .string()\n .describe(\n \"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\\n\\nDefault: Based on the site's currency settings.\"\n )\n .optional()\n .nullable(),\n stages: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z.string().describe('Stage name.').min(1).max(40),\n staleDurationInHours: z\n .number()\n .int()\n .describe(\n \"The duration (in hours) a card can remain in this stage before becoming stale.\\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays.\"\n )\n .min(1)\n .max(100000)\n .optional()\n .nullable(),\n })\n )\n .min(1)\n .max(30),\n doneStage: z\n .object({\n _id: z\n .string()\n .describe('Done stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z.string().describe('Done stage name.').min(1).max(40),\n allowedOutcomes: z\n .array(z.enum(['NONE', 'WON', 'LOST']))\n .min(1)\n .max(3),\n })\n .describe(\n 'The final pipeline stage where cards receive a final outcome.'\n ),\n extendedFields: z\n .object({\n namespaces: z\n .record(z.string(), z.record(z.string(), z.any()))\n .describe(\n 'Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\\nThe value of each key is structured according to the schema defined when the extended fields were configured.\\n\\nYou can only access fields for which you have the appropriate permissions.\\n\\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).'\n )\n .optional(),\n })\n .describe('Extended fields data.')\n .optional(),\n tags: z\n .object({\n privateTags: z\n .object({ tagIds: z.array(z.string()).max(100).optional() })\n .describe(\n 'Tags that are exposed to anyone with access to the entity, including site members and visitors.'\n )\n .optional(),\n })\n .describe('Tags for organizing and categorizing pipelines.')\n .optional(),\n })\n .describe('Pipeline to create.'),\n});\nexport const CreatePipelineResponse = z.object({\n _id: z\n .string()\n .describe('Pipeline ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n revision: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Revision number, which increments by 1 each time the pipeline is updated.\\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\\n\\nIgnored when creating a pipeline.'\n )\n .optional()\n .nullable(),\n _createdDate: z\n .date()\n .describe(\n 'Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe(\n 'Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Pipeline name.')\n .min(1)\n .max(60)\n .optional()\n .nullable(),\n currency: z\n .string()\n .describe(\n \"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\\n\\nDefault: Based on the site's currency settings.\"\n )\n .optional()\n .nullable(),\n stages: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Stage name.')\n .min(1)\n .max(40)\n .optional()\n .nullable(),\n staleDurationInHours: z\n .number()\n .int()\n .describe(\n \"The duration (in hours) a card can remain in this stage before becoming stale.\\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays.\"\n )\n .min(1)\n .max(100000)\n .optional()\n .nullable(),\n })\n )\n .min(1)\n .max(30)\n .optional(),\n doneStage: z\n .object({\n _id: z\n .string()\n .describe('Done stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Done stage name.')\n .min(1)\n .max(40)\n .optional()\n .nullable(),\n allowedOutcomes: z\n .array(z.enum(['NONE', 'WON', 'LOST']))\n .min(1)\n .max(3)\n .optional(),\n })\n .describe('The final pipeline stage where cards receive a final outcome.')\n .optional(),\n extendedFields: z\n .object({\n namespaces: z\n .record(z.string(), z.record(z.string(), z.any()))\n .describe(\n 'Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\\nThe value of each key is structured according to the schema defined when the extended fields were configured.\\n\\nYou can only access fields for which you have the appropriate permissions.\\n\\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).'\n )\n .optional(),\n })\n .describe('Extended fields data.')\n .optional(),\n tags: z\n .object({\n privateTags: z\n .object({ tagIds: z.array(z.string()).max(100).optional() })\n .describe(\n 'Tags that are exposed to anyone with access to the entity, including site members and visitors.'\n )\n .optional(),\n })\n .describe('Tags for organizing and categorizing pipelines.')\n .optional(),\n});\nexport const GetPipelineRequest = z.object({\n pipelineId: z\n .string()\n .describe('Pipeline ID to retrieve.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n});\nexport const GetPipelineResponse = z.object({\n _id: z\n .string()\n .describe('Pipeline ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n revision: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Revision number, which increments by 1 each time the pipeline is updated.\\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\\n\\nIgnored when creating a pipeline.'\n )\n .optional()\n .nullable(),\n _createdDate: z\n .date()\n .describe(\n 'Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe(\n 'Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Pipeline name.')\n .min(1)\n .max(60)\n .optional()\n .nullable(),\n currency: z\n .string()\n .describe(\n \"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\\n\\nDefault: Based on the site's currency settings.\"\n )\n .optional()\n .nullable(),\n stages: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Stage name.')\n .min(1)\n .max(40)\n .optional()\n .nullable(),\n staleDurationInHours: z\n .number()\n .int()\n .describe(\n \"The duration (in hours) a card can remain in this stage before becoming stale.\\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays.\"\n )\n .min(1)\n .max(100000)\n .optional()\n .nullable(),\n })\n )\n .min(1)\n .max(30)\n .optional(),\n doneStage: z\n .object({\n _id: z\n .string()\n .describe('Done stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Done stage name.')\n .min(1)\n .max(40)\n .optional()\n .nullable(),\n allowedOutcomes: z\n .array(z.enum(['NONE', 'WON', 'LOST']))\n .min(1)\n .max(3)\n .optional(),\n })\n .describe('The final pipeline stage where cards receive a final outcome.')\n .optional(),\n extendedFields: z\n .object({\n namespaces: z\n .record(z.string(), z.record(z.string(), z.any()))\n .describe(\n 'Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\\nThe value of each key is structured according to the schema defined when the extended fields were configured.\\n\\nYou can only access fields for which you have the appropriate permissions.\\n\\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).'\n )\n .optional(),\n })\n .describe('Extended fields data.')\n .optional(),\n tags: z\n .object({\n privateTags: z\n .object({ tagIds: z.array(z.string()).max(100).optional() })\n .describe(\n 'Tags that are exposed to anyone with access to the entity, including site members and visitors.'\n )\n .optional(),\n })\n .describe('Tags for organizing and categorizing pipelines.')\n .optional(),\n});\nexport const UpdatePipelineRequest = z.object({\n _id: z\n .string()\n .describe('Pipeline ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n pipeline: z\n .object({\n _id: z\n .string()\n .describe('Pipeline ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n revision: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Revision number, which increments by 1 each time the pipeline is updated.\\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\\n\\nIgnored when creating a pipeline.'\n ),\n _createdDate: z\n .date()\n .describe(\n 'Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe(\n 'Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Pipeline name.')\n .min(1)\n .max(60)\n .optional()\n .nullable(),\n currency: z\n .string()\n .describe(\n \"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\\n\\nDefault: Based on the site's currency settings.\"\n )\n .optional()\n .nullable(),\n stages: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Stage name.')\n .min(1)\n .max(40)\n .optional()\n .nullable(),\n staleDurationInHours: z\n .number()\n .int()\n .describe(\n \"The duration (in hours) a card can remain in this stage before becoming stale.\\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays.\"\n )\n .min(1)\n .max(100000)\n .optional()\n .nullable(),\n })\n )\n .min(1)\n .max(30)\n .optional(),\n doneStage: z\n .object({\n _id: z\n .string()\n .describe('Done stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Done stage name.')\n .min(1)\n .max(40)\n .optional()\n .nullable(),\n allowedOutcomes: z\n .array(z.enum(['NONE', 'WON', 'LOST']))\n .min(1)\n .max(3)\n .optional(),\n })\n .describe(\n 'The final pipeline stage where cards receive a final outcome.'\n )\n .optional(),\n extendedFields: z\n .object({\n namespaces: z\n .record(z.string(), z.record(z.string(), z.any()))\n .describe(\n 'Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\\nThe value of each key is structured according to the schema defined when the extended fields were configured.\\n\\nYou can only access fields for which you have the appropriate permissions.\\n\\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).'\n )\n .optional(),\n })\n .describe('Extended fields data.')\n .optional(),\n tags: z\n .object({\n privateTags: z\n .object({ tagIds: z.array(z.string()).max(100).optional() })\n .describe(\n 'Tags that are exposed to anyone with access to the entity, including site members and visitors.'\n )\n .optional(),\n })\n .describe('Tags for organizing and categorizing pipelines.')\n .optional(),\n })\n .describe('Pipeline to update, may be partial.'),\n});\nexport const UpdatePipelineResponse = z.object({\n _id: z\n .string()\n .describe('Pipeline ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n revision: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Revision number, which increments by 1 each time the pipeline is updated.\\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\\n\\nIgnored when creating a pipeline.'\n )\n .optional()\n .nullable(),\n _createdDate: z\n .date()\n .describe(\n 'Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe(\n 'Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Pipeline name.')\n .min(1)\n .max(60)\n .optional()\n .nullable(),\n currency: z\n .string()\n .describe(\n \"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\\n\\nDefault: Based on the site's currency settings.\"\n )\n .optional()\n .nullable(),\n stages: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Stage name.')\n .min(1)\n .max(40)\n .optional()\n .nullable(),\n staleDurationInHours: z\n .number()\n .int()\n .describe(\n \"The duration (in hours) a card can remain in this stage before becoming stale.\\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays.\"\n )\n .min(1)\n .max(100000)\n .optional()\n .nullable(),\n })\n )\n .min(1)\n .max(30)\n .optional(),\n doneStage: z\n .object({\n _id: z\n .string()\n .describe('Done stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Done stage name.')\n .min(1)\n .max(40)\n .optional()\n .nullable(),\n allowedOutcomes: z\n .array(z.enum(['NONE', 'WON', 'LOST']))\n .min(1)\n .max(3)\n .optional(),\n })\n .describe('The final pipeline stage where cards receive a final outcome.')\n .optional(),\n extendedFields: z\n .object({\n namespaces: z\n .record(z.string(), z.record(z.string(), z.any()))\n .describe(\n 'Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\\nThe value of each key is structured according to the schema defined when the extended fields were configured.\\n\\nYou can only access fields for which you have the appropriate permissions.\\n\\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).'\n )\n .optional(),\n })\n .describe('Extended fields data.')\n .optional(),\n tags: z\n .object({\n privateTags: z\n .object({ tagIds: z.array(z.string()).max(100).optional() })\n .describe(\n 'Tags that are exposed to anyone with access to the entity, including site members and visitors.'\n )\n .optional(),\n })\n .describe('Tags for organizing and categorizing pipelines.')\n .optional(),\n});\nexport const DeletePipelineRequest = z.object({\n pipelineId: z\n .string()\n .describe('Pipeline ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n ),\n});\nexport const DeletePipelineResponse = z.object({});\nexport const QueryPipelinesRequest = z.object({\n query: z\n .intersection(\n z.object({\n filter: z\n .record(z.string(), z.any())\n .describe(\n 'Filter object.\\n\\nLearn more about [filtering](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).'\n )\n .optional()\n .nullable(),\n sort: z\n .array(\n z.object({\n fieldName: z\n .string()\n .describe('Name of the field to sort by.')\n .max(512)\n .optional(),\n order: z.enum(['ASC', 'DESC']).optional(),\n })\n )\n .max(5)\n .optional(),\n }),\n z.xor([\n z.object({ cursorPaging: z.never().optional() }),\n z.object({\n cursorPaging: z\n .object({\n limit: z\n .number()\n .int()\n .describe('Maximum number of items to return.')\n .min(0)\n .max(100)\n .optional()\n .nullable(),\n cursor: z\n .string()\n .describe(\n \"Pointer to the next or previous page in the list of results.\\n\\nPass the relevant cursor token from the `pagingMetadata` object in the previous call's response.\\nNot relevant for the first request.\"\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .describe(\n 'Cursor paging options.\\n\\nLearn more about [cursor paging](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#cursor-paging).'\n ),\n }),\n ])\n )\n .describe('Query options.'),\n});\nexport const QueryPipelinesResponse = z.object({\n pipelines: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Pipeline ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n revision: z\n .string()\n .regex(/^-?\\d+$/, 'Must be a valid Int64 string')\n .describe(\n 'Revision number, which increments by 1 each time the pipeline is updated.\\nTo prevent conflicting changes, the current revision must be passed when updating the pipeline.\\n\\nIgnored when creating a pipeline.'\n )\n .optional()\n .nullable(),\n _createdDate: z\n .date()\n .describe(\n 'Date and time the pipeline was created in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n _updatedDate: z\n .date()\n .describe(\n 'Date and time the pipeline was last updated in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Pipeline name.')\n .min(1)\n .max(60)\n .optional()\n .nullable(),\n currency: z\n .string()\n .describe(\n \"Currency code for monetary values in this pipeline. Must be a valid ISO 4217 currency code. For example, `USD`.\\n\\nDefault: Based on the site's currency settings.\"\n )\n .optional()\n .nullable(),\n stages: z\n .array(\n z.object({\n _id: z\n .string()\n .describe('Stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Stage name.')\n .min(1)\n .max(40)\n .optional()\n .nullable(),\n staleDurationInHours: z\n .number()\n .int()\n .describe(\n \"The duration (in hours) a card can remain in this stage before becoming stale.\\nWhen a card exceeds this duration, it's marked as stale to indicate potential workflow delays.\"\n )\n .min(1)\n .max(100000)\n .optional()\n .nullable(),\n })\n )\n .min(1)\n .max(30)\n .optional(),\n doneStage: z\n .object({\n _id: z\n .string()\n .describe('Done stage ID.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n name: z\n .string()\n .describe('Done stage name.')\n .min(1)\n .max(40)\n .optional()\n .nullable(),\n allowedOutcomes: z\n .array(z.enum(['NONE', 'WON', 'LOST']))\n .min(1)\n .max(3)\n .optional(),\n })\n .describe(\n 'The final pipeline stage where cards receive a final outcome.'\n )\n .optional(),\n extendedFields: z\n .object({\n namespaces: z\n .record(z.string(), z.record(z.string(), z.any()))\n .describe(\n 'Extended field data. Each key corresponds to the namespace of the app that created the extended fields.\\nThe value of each key is structured according to the schema defined when the extended fields were configured.\\n\\nYou can only access fields for which you have the appropriate permissions.\\n\\nLearn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields).'\n )\n .optional(),\n })\n .describe('Extended fields data.')\n .optional(),\n tags: z\n .object({\n privateTags: z\n .object({ tagIds: z.array(z.string()).max(100).optional() })\n .describe(\n 'Tags that are exposed to anyone with access to the entity, including site members and visitors.'\n )\n .optional(),\n })\n .describe('Tags for organizing and categorizing pipelines.')\n .optional(),\n })\n )\n .optional(),\n pagingMetadata: z\n .object({\n count: z\n .number()\n .int()\n .describe('Number of items returned in current page.')\n .optional()\n .nullable(),\n cursors: z\n .object({\n next: z\n .string()\n .describe(\n 'Cursor string pointing to the next page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n prev: z\n .string()\n .describe(\n 'Cursor pointing to the previous page in the list of results.'\n )\n .max(16000)\n .optional()\n .nullable(),\n })\n .describe(\n 'Cursor strings that point to the next page, previous page, or both.'\n )\n .optional(),\n hasNext: z\n .boolean()\n .describe(\n 'Whether there are more pages to retrieve following the current page.\\n\\n+ `true`: Another page of results can be retrieved.\\n+ `false`: This is the last page.'\n )\n .optional()\n .nullable(),\n })\n .describe('Paging metadata.')\n .optional(),\n});\nexport const BulkUpdatePipelineTagsRequest = z.object({\n pipelineIds: z.array(z.string()).min(1).max(100),\n options: z\n .object({\n assignTags: z\n .object({\n privateTags: z\n .object({ tagIds: z.array(z.string()).max(100).optional() })\n .describe(\n 'Tags that are exposed to anyone with access to the entity, including site members and visitors.'\n )\n .optional(),\n })\n .describe('List of tags to assign.')\n .optional(),\n unassignTags: z\n .object({\n privateTags: z\n .object({ tagIds: z.array(z.string()).max(100).optional() })\n .describe(\n 'Tags that are exposed to anyone with access to the entity, including site members and visitors.'\n )\n .optional(),\n })\n .describe('List of tags to unassign.')\n .optional(),\n returnEntity: z\n .boolean()\n .describe(\n 'Whether to return the updated pipelines in the response.\\n\\nDefault: `false`'\n )\n .optional(),\n })\n .optional(),\n});\nexport const BulkUpdatePipelineTagsResponse = z.object({\n results: z\n .array(\n z.object({\n itemMetadata: z\n .object({\n _id: z\n .string()\n .describe(\n \"Item ID. Should always be available, unless it's impossible (for example, when failing to create an item).\"\n )\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional()\n .nullable(),\n originalIndex: z\n .number()\n .int()\n .describe(\n 'Index of the item within the request array. Allows for correlation between request and response items.'\n )\n .optional(),\n success: z\n .boolean()\n .describe(\n 'Whether the requested action was successful for this item. When `false`, the `error` field is populated.'\n )\n .optional(),\n error: z\n .object({\n code: z.string().describe('Error code.').optional(),\n description: z\n .string()\n .describe('Description of the error.')\n .optional(),\n data: z\n .record(z.string(), z.any())\n .describe('Data related to the error.')\n .optional()\n .nullable(),\n })\n .describe('Details about the error in case of failure.')\n .optional(),\n })\n .describe('Metadata about the individual updated pipeline.')\n .optional(),\n })\n )\n .min(1)\n .max(100)\n .optional(),\n bulkActionMetadata: z\n .object({\n totalSuccesses: z\n .number()\n .int()\n .describe('Number of items that were successfully processed.')\n .optional(),\n totalFailures: z\n .number()\n .int()\n .describe(\"Number of items that couldn't be processed.\")\n .optional(),\n undetailedFailures: z\n .number()\n .int()\n .describe(\n 'Number of failures without details because detailed failure threshold was exceeded.'\n )\n .optional(),\n })\n .describe('Metadata about the bulk update.')\n .optional(),\n});\nexport const BulkUpdatePipelineTagsByFilterRequest = z.object({\n filter: z\n .record(z.string(), z.any())\n .describe('Filter to select which pipelines to update.'),\n options: z\n .object({\n assignTags: z\n .object({\n privateTags: z\n .object({ tagIds: z.array(z.string()).max(100).optional() })\n .describe(\n 'Tags that are exposed to anyone with access to the entity, including site members and visitors.'\n )\n .optional(),\n })\n .describe('List of tags to assign.')\n .optional(),\n unassignTags: z\n .object({\n privateTags: z\n .object({ tagIds: z.array(z.string()).max(100).optional() })\n .describe(\n 'Tags that are exposed to anyone with access to the entity, including site members and visitors.'\n )\n .optional(),\n })\n .describe('List of tags to unassign.')\n .optional(),\n returnEntity: z\n .boolean()\n .describe(\n 'Whether to return the updated pipelines in the response.\\n\\nDefault: `false`'\n )\n .optional(),\n })\n .optional(),\n});\nexport const BulkUpdatePipelineTagsByFilterResponse = z.object({\n jobId: z\n .string()\n .describe('Job ID for tracking the asynchronous tag updates.')\n .regex(\n /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/,\n 'Must be a valid GUID'\n )\n .optional(),\n});\n","import {\n createPipeline as publicCreatePipeline,\n getPipeline as publicGetPipeline,\n updatePipeline as publicUpdatePipeline,\n deletePipeline as publicDeletePipeline,\n queryPipelines as publicQueryPipelines,\n typedQueryPipelines as publicTypedQueryPipelines,\n bulkUpdatePipelineTags as publicBulkUpdatePipelineTags,\n bulkUpdatePipelineTagsByFilter as publicBulkUpdatePipelineTagsByFilter,\n} from './crm-pipelines-v1-pipeline-pipelines.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { HttpClient } from '@wix/sdk-types';\nimport { createQueryOverloadRouter } from '@wix/sdk-runtime/query-method-router';\nimport {\n PipelineQuery,\n PipelinesQueryBuilder,\n typedQueryPipelines as universalTypedQueryPipelines,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\nimport { onPipelineCreated as publicOnPipelineCreated } from './crm-pipelines-v1-pipeline-pipelines.public.js';\nimport { onPipelineDeleted as publicOnPipelineDeleted } from './crm-pipelines-v1-pipeline-pipelines.public.js';\nimport { onPipelineUpdated as publicOnPipelineUpdated } from './crm-pipelines-v1-pipeline-pipelines.public.js';\n\nfunction customQueryPipelines(httpClient: HttpClient) {\n const router = createQueryOverloadRouter({\n builderQueryFunction: () => publicQueryPipelines(httpClient)(),\n typedQueryFunction: (query: PipelineQuery) =>\n publicTypedQueryPipelines(httpClient)(query),\n hasOptionsParameter: false,\n });\n\n function overloadedQuery(): PipelinesQueryBuilder;\n function overloadedQuery(\n query: PipelineQuery\n ): ReturnType<typeof universalTypedQueryPipelines>;\n function overloadedQuery(query?: PipelineQuery): any {\n return router(...arguments);\n }\n\n return overloadedQuery;\n}\n\nexport const createPipeline: MaybeContext<\n BuildRESTFunction<typeof publicCreatePipeline> & typeof publicCreatePipeline\n> = /*#__PURE__*/ createRESTModule(publicCreatePipeline);\nexport const getPipeline: MaybeContext<\n BuildRESTFunction<typeof publicGetPipeline> & typeof publicGetPipeline\n> = /*#__PURE__*/ createRESTModule(publicGetPipeline);\nexport const updatePipeline: MaybeContext<\n BuildRESTFunction<typeof publicUpdatePipeline> & typeof publicUpdatePipeline\n> = /*#__PURE__*/ createRESTModule(publicUpdatePipeline);\nexport const deletePipeline: MaybeContext<\n BuildRESTFunction<typeof publicDeletePipeline> & typeof publicDeletePipeline\n> = /*#__PURE__*/ createRESTModule(publicDeletePipeline);\nexport const bulkUpdatePipelineTags: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdatePipelineTags> &\n typeof publicBulkUpdatePipelineTags\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdatePipelineTags);\nexport const bulkUpdatePipelineTagsByFilter: MaybeContext<\n BuildRESTFunction<typeof publicBulkUpdatePipelineTagsByFilter> &\n typeof publicBulkUpdatePipelineTagsByFilter\n> = /*#__PURE__*/ createRESTModule(publicBulkUpdatePipelineTagsByFilter);\nexport const queryPipelines: MaybeContext<\n BuildRESTFunction<typeof customQueryPipelines> & typeof customQueryPipelines\n> = /*#__PURE__*/ createRESTModule(customQueryPipelines);\n/**\n * Triggered when a pipeline is created.\n */\nexport const onPipelineCreated: BuildEventDefinition<\n typeof publicOnPipelineCreated\n> &\n typeof publicOnPipelineCreated = createEventModule(publicOnPipelineCreated);\n/**\n * Triggered when a pipeline is deleted.\n */\nexport const onPipelineDeleted: BuildEventDefinition<\n typeof publicOnPipelineDeleted\n> &\n typeof publicOnPipelineDeleted = createEventModule(publicOnPipelineDeleted);\n/**\n * Triggered when a pipeline is updated.\n */\nexport const onPipelineUpdated: BuildEventDefinition<\n typeof publicOnPipelineUpdated\n> &\n typeof publicOnPipelineUpdated = createEventModule(publicOnPipelineUpdated);\n\nexport {\n Outcome,\n PipelineType,\n SortOrder,\n WebhookIdentityType,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\nexport {\n Pipeline,\n Stage,\n DoneStage,\n ExtendedFields,\n PrivateTags,\n TagList,\n CreatePipelineRequest,\n CreatePipelineResponse,\n GetPipelineRequest,\n GetPipelineResponse,\n UpdatePipelineRequest,\n UpdatePipelineResponse,\n DeletePipelineRequest,\n DeletePipelineResponse,\n QueryPipelinesRequest,\n CursorQuery,\n CursorQueryPagingMethodOneOf,\n Sorting,\n CursorPaging,\n QueryPipelinesResponse,\n CursorPagingMetadata,\n Cursors,\n BulkUpdatePipelineTagsRequest,\n BulkUpdatePipelineTagsResponse,\n ItemMetadata,\n ApplicationError,\n BulkUpdatePipelineTagsResult,\n BulkActionMetadata,\n BulkUpdatePipelineTagsByFilterRequest,\n BulkUpdatePipelineTagsByFilterResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountInfo,\n BaseEventMetadata,\n EventMetadata,\n AccountInfoMetadata,\n PipelineCreatedEnvelope,\n PipelineDeletedEnvelope,\n PipelineUpdatedEnvelope,\n UpdatePipeline,\n PipelinesQueryResult,\n PipelinesQueryBuilder,\n PipelineQuerySpec,\n BulkUpdatePipelineTagsOptions,\n BulkUpdatePipelineTagsByFilterOptions,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\nexport { utils } from './crm-pipelines-v1-pipeline-pipelines.universal.js';\nexport {\n OutcomeWithLiterals,\n PipelineTypeWithLiterals,\n SortOrderWithLiterals,\n WebhookIdentityTypeWithLiterals,\n UpdatePipelineApplicationErrors,\n DeletePipelineApplicationErrors,\n BulkUpdatePipelineTagsApplicationErrors,\n BulkUpdatePipelineTagsByFilterApplicationErrors,\n CommonQueryWithEntityContext,\n PipelineQuery,\n} from './crm-pipelines-v1-pipeline-pipelines.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAAA;A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M,qBAAqB;AAAA,UAC7B,EAAE,MAAM,qBAAqB;AAAA,UAC7B,EAAE,MAAM,6BAA6B;AAAA,UACrC,EAAE,MAAM,6BAA6B;AAAA,QACvC;AAAA,MACF;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAA2B;;;AIxV3B,IAAAC,uBAAiC;AACjC,sCAAkC;AAOlC,iCAA0C;AAU1C,SAAS,qBAAqB,YAAwB;AACpD,QAAM,aAAS,sDAA0B;AAAA,IACvC,sBAAsB,MAAMC,gBAAqB,UAAU,EAAE;AAAA,IAC7D,oBAAoB,CAAC,UACnBC,qBAA0B,UAAU,EAAE,KAAK;AAAA,IAC7C,qBAAqB;AAAA,EACvB,CAAC;AAMD,WAAS,gBAAgB,OAA4B;AACnD,WAAO,OAAO,GAAG,SAAS;AAAA,EAC5B;AAEA,SAAO;AACT;AAEO,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,kBAEK,2DAAiBA,eAAoB;AAChD,IAAMC,0BAGK,2DAAiBA,uBAA4B;AACxD,IAAMC,kCAGK,2DAAiBA,+BAAoC;AAChE,IAAMP,kBAEK,2DAAiB,oBAAoB;AAIhD,IAAMQ,yBAGsB,mDAAkB,iBAAuB;AAIrE,IAAMC,yBAGsB,mDAAkB,iBAAuB;AAIrE,IAAMC,yBAGsB,mDAAkB,iBAAuB;","names":["bulkUpdatePipelineTags","bulkUpdatePipelineTagsByFilter","createPipeline","deletePipeline","getPipeline","onPipelineCreated","onPipelineDeleted","onPipelineUpdated","queryPipelines","updatePipeline","import_rename_all_nested_keys","import_timestamp","import_transform_paths","import_timestamp","import_rest_modules","payload","import_transform_paths","Outcome","PipelineType","SortOrder","WebhookIdentityType","createPipeline","sdkTransformError","getPipeline","updatePipeline","deletePipeline","queryPipelines","bulkUpdatePipelineTags","bulkUpdatePipelineTagsByFilter","createPipeline","getPipeline","updatePipeline","deletePipeline","queryPipelines","typedQueryPipelines","bulkUpdatePipelineTags","bulkUpdatePipelineTagsByFilter","import_rest_modules","queryPipelines","typedQueryPipelines","createPipeline","getPipeline","updatePipeline","deletePipeline","bulkUpdatePipelineTags","bulkUpdatePipelineTagsByFilter","onPipelineCreated","onPipelineDeleted","onPipelineUpdated"]}
|