@wix/auto_sdk_crm_pipelines 1.0.0 → 1.0.1
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 +76 -130
- package/build/cjs/index.js +194 -977
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +998 -15
- package/build/cjs/index.typings.js +146 -767
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +133 -1005
- package/build/cjs/meta.js +128 -682
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +76 -130
- package/build/es/index.mjs +184 -947
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +998 -15
- package/build/es/index.typings.mjs +138 -743
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +133 -1005
- package/build/es/meta.mjs +121 -659
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +76 -163
- package/build/internal/cjs/index.js +194 -977
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +998 -15
- package/build/internal/cjs/index.typings.js +146 -767
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +133 -1005
- package/build/internal/cjs/meta.js +128 -682
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +76 -163
- package/build/internal/es/index.mjs +184 -947
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +998 -15
- package/build/internal/es/index.typings.mjs +138 -743
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +133 -1005
- package/build/internal/es/meta.mjs +121 -659
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +3 -3
- package/build/cjs/crm-pipelines-v1-card-pipelines.universal-DGtqU_Zb.d.ts +0 -2265
- package/build/es/crm-pipelines-v1-card-pipelines.universal-DGtqU_Zb.d.mts +0 -2265
- package/build/internal/cjs/crm-pipelines-v1-card-pipelines.universal-BHszxzqA.d.ts +0 -2303
- package/build/internal/es/crm-pipelines-v1-card-pipelines.universal-BHszxzqA.d.mts +0 -2303
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/crm-pipelines-v1-card-pipelines.universal.ts","../../src/crm-pipelines-v1-card-pipelines.http.ts"],"sourcesContent":["import {\n SearchCardsResponse,\n CursorSearch,\n SearchCardsOptions,\n} from './src/crm-pipelines-v1-card-pipelines.universal';\n\nexport * from './src/crm-pipelines-v1-card-pipelines.universal.js';\n\n/** @hidden */\nexport type CardSearch = {};\n\n/**\n * Retrieves a list of cards given the provided free-text search expression, filtering, and sorting.\n *\n * By default, cards are sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported filters, sorting options, and search capabilities, see [Cards: Supported Filters, Sorting, and Search](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-wip/card-v1/sort-filter-and-search).\n *\n * To learn more about working with _Search_ methods, 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 * @param search - Search options.\n * @public\n * @documentationMaturity preview\n * @requiredField search\n * @permissionId PIPELINE_CARDS.CARD_READ\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.cards.v1.Cards.SearchCards\n */\nexport declare function searchCards(\n search: CursorSearch,\n options: SearchCardsOptions\n): Promise<SearchCardsResponse>;\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 Search as SearchSdkType,\n NonNullablePaths,\n QuerySpec,\n Query as QuerySdkType,\n SearchSpec,\n} from '@wix/sdk-types';\nimport * as ambassadorWixCrmPipelinesV1Card from './crm-pipelines-v1-card-pipelines.http.js';\n// @ts-ignore\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils';\nimport { createSearchUtils } from '@wix/sdk-runtime/search-builder-utils';\n\n/**\n * A business entity representing a deal, lead, opportunity, or project that moves through pipeline stages.\n *\n * Cards contain comprehensive business information including contact details, monetary values,\n * priorities, due dates, and outcomes. They progress through pipeline stages as work advances\n * and can be assigned to team members for ownership and responsibility tracking.\n */\nexport interface Card {\n /**\n * Card ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the card is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the card.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the card 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 card 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 * ID of the pipeline containing this card.\n * @format GUID\n * @readonly\n */\n pipelineId?: string | null;\n /**\n * ID of the cards' current.\n * @format GUID\n */\n stageId?: string | null;\n /**\n * Date and time when the card last moved between stagesin [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n stageUpdatedDate?: Date | null;\n /**\n * How the card was moved to its current stage.\n * @readonly\n */\n stageUpdateSource?: CardSource;\n /**\n * The Card name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string | null;\n /**\n * Card description.\n * @maxLength 1000\n */\n description?: string | null;\n /**\n * Priority level of the card for task management.\n *\n * Default: `P3_MEDIUM`\n */\n priority?: PriorityWithLiterals;\n /**\n * ID of the Wix user assigned to manage the card.\n * @format GUID\n */\n assigneeId?: string | null;\n /**\n * Date and time when the card is expected to moved to the done stage in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * If the card remains active past this date, it becomes overdue.\n */\n dueDate?: Date | null;\n /**\n * Date and time when the card becomes stale based on the stage's stale duration setting in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * This date is automatically calculated and updated when the card moves to a new stage.\n * @readonly\n */\n staleDate?: Date | null;\n /** Monetary value assigned to the card. */\n value?: Money;\n /**\n * Final outcome of the card when moved to the done stage.\n *\n * Default: `NONE`\n */\n outcome?: OutcomeWithLiterals;\n /** Primary contact associated with the card. */\n mainContact?: ContactInfo;\n /**\n * Secondary contacts associated with the card.\n * @maxSize 10\n */\n additionalContacts?: ContactInfo[];\n /**\n * Other entities linked to the card.\n *\n * For example, orders, invoices, activities, or other relevant entities.\n * @maxSize 20\n */\n linkedEntities?: LinkedEntity[];\n /** Extended fields data. */\n extendedFields?: ExtendedFields;\n /** Tags for organizing and categorizing the card. */\n tags?: PrivateTags;\n}\n\nexport interface CardSource {\n /**\n * ID of the Wix user who last moved the card.\n * @format GUID\n * @readonly\n */\n userId?: string | null;\n /**\n * ID of the app that last moved the card.\n * @format GUID\n * @readonly\n */\n appId?: string | null;\n}\n\nexport enum Priority {\n /** Urgent priority. Card requires immediate attention. */\n P1_URGENT = 'P1_URGENT',\n /** High priority. Card is important and should be addressed promptly. */\n P2_HIGH = 'P2_HIGH',\n /** Medium priority. Card should be completed within regular workflow timelines. */\n P3_MEDIUM = 'P3_MEDIUM',\n /** Low priority. Card can be addressed when time and resources allow. */\n P4_LOW = 'P4_LOW',\n}\n\n/** @enumType */\nexport type PriorityWithLiterals =\n | Priority\n | 'P1_URGENT'\n | 'P2_HIGH'\n | 'P3_MEDIUM'\n | 'P4_LOW';\n\n/**\n * Monetary amount with currency information.\n * Default format to use. Sufficiently compliant with majority of standards: w3c, ISO 4217, ISO 20022, ISO 8583:2003.\n */\nexport interface Money {\n /**\n * Monetary amount. For example, `\"3.99\"`, or `\"-4.99\"` for a negative amount.\n * @format DECIMAL_VALUE\n * @decimalValue options { maxScale:2 }\n */\n value?: string;\n /**\n * Three-letter currency code in ISO-4217 format.\n * Currency is the same as the pipeline currency and is immutable.\n * @format CURRENCY\n * @readonly\n */\n currency?: string;\n}\n\nexport enum Outcome {\n /** No specific outcome. The card reached the final stage but hasn't been specified as successful or unsuccessful. */\n NONE = 'NONE',\n /** Successful outcome. The card achieved its intended goal. */\n WON = 'WON',\n /** Unsuccessful outcome. The card didn't achieve its intended goal. */\n LOST = 'LOST',\n}\n\n/** @enumType */\nexport type OutcomeWithLiterals = Outcome | 'NONE' | 'WON' | 'LOST';\n\nexport interface ContactInfo {\n /**\n * ID of the contact associated with the card.\n * @format GUID\n */\n contactId?: string | null;\n /**\n * Contact's first name.\n * @readonly\n * @maxLength 50\n */\n firstName?: string | null;\n /**\n * Contact's last name.\n * @readonly\n * @maxLength 50\n */\n lastName?: string | null;\n /**\n * Contact's primary email.\n * @format EMAIL\n * @maxLength 320\n * @readonly\n */\n email?: string | null;\n /**\n * Contact's primary phone.\n * @minLength 1\n * @maxLength 50\n * @readonly\n */\n phone?: string | null;\n}\n\nexport interface LinkedEntity {\n /**\n * ID of the linked entity.\n * @format GUID\n */\n entityId?: string;\n /**\n * Linked entity type.\n *\n * Identifies the type of entity associated with this card such as a contact submitted by a form, or an invoice sent to close a deal.\n * You can store any value that helps identify the entity type.\n * Use the item selection provider key to make the item selectable by the client.\n * For example, an invoice uses \"13ee94c1-b635-8505-3391-97919052c16f_InvoiceSelectionProvider\".\n * @minLength 1\n * @maxLength 100\n */\n referencedEntity?: string;\n /**\n * Date and time the entity was linked to the card in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n linkedDate?: Date | null;\n}\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 CardMoved {\n /** The card that moved. */\n card?: Card;\n /**\n * The ID of the stage to which the card was moved.\n * @format GUID\n */\n targetStageId?: string;\n /**\n * The ID of the stage from which the card was moved.\n * @format GUID\n */\n sourceStageId?: string;\n}\n\nexport interface CardAssigned {\n /** The card that is assigned. */\n card?: Card;\n}\n\nexport interface CardOverdue {\n /** The card that is overdue. */\n card?: Card;\n}\n\nexport interface CardStale {\n /** The card that is stale. */\n card?: Card;\n}\n\nexport interface CreateCardRequest {\n /** Card to create. */\n card?: Card;\n}\n\nexport interface CreateCardResponse {\n /** Created card. */\n card?: Card;\n}\n\nexport interface ContactsNotFound {\n /**\n * The contact IDs that were not found.\n * @format GUID\n * @minSize 1\n * @maxSize 11\n */\n contactIds?: string[] | null;\n}\n\nexport interface GetCardRequest {\n /**\n * Card ID to retrieve.\n * @format GUID\n */\n cardId: string;\n}\n\nexport interface GetCardResponse {\n /** Retrieved card. */\n card?: Card;\n}\n\nexport interface UpdateCardRequest {\n /** Card to update, may be partial. */\n card?: Card;\n}\n\nexport interface UpdateCardResponse {\n /** Updated card. */\n card?: Card;\n}\n\nexport interface MoveCardRequest {\n /**\n * Card ID to move.\n * @format GUID\n */\n cardId: string;\n /**\n * ID of the stage to move the card to.\n * @format GUID\n */\n stageId: string;\n /** Revision of the card to move. Moving the card changes the `stageId` on the card and increases `revision` by 1. */\n revision: string | null;\n /** New card outcome. */\n outcome?: OutcomeWithLiterals;\n}\n\nexport interface MoveCardResponse {\n /** Updated card. */\n card?: Card;\n}\n\nexport interface DeleteCardRequest {\n /**\n * Card ID to delete.\n * @format GUID\n */\n cardId: string;\n}\n\nexport interface DeleteCardResponse {}\n\nexport interface QueryCardsRequest {\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 the [filter section](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 the [sort section](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 in the results. Default is 50.\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 QueryCardsResponse {\n /** List of cards. */\n cards?: Card[];\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 SearchCardsRequest {\n /** Search options. */\n search?: CursorSearch;\n /**\n * Specifies how contact names should be formatted and ordered when filtering, sorting, or searching cards by contact names.\n * By default, names are ordered by first name followed by last name.\n * When set to `\"BY_LAST_NAME\"`, names are ordered by last name followed by first name.\n */\n nameFormat?: NameFormatWithLiterals;\n}\n\nexport interface CursorSearch extends CursorSearchPagingMethodOneOf {\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 the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section).\n */\n filter?: Record<string, any> | null;\n /**\n * List of sort objects.\n *\n * Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section).\n * @maxSize 10\n */\n sort?: Sorting[];\n /**\n * Aggregations are a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition.\n * @maxSize 10\n */\n aggregations?: Aggregation[];\n /** Free text to match in searchable fields. */\n search?: SearchDetails;\n /**\n * UTC offset or IANA time zone. Valid values are\n * ISO 8601 UTC offsets, such as +02:00 or -06:00,\n * and IANA time zone IDs, such as Europe/Rome.\n *\n * Affects all filters and aggregations returned values.\n * You may override this behavior in a specific filter by providing\n * timestamps including time zone. For example, `\"2023-12-20T10:52:34.795Z\"`.\n * @maxLength 50\n */\n timeZone?: string | null;\n}\n\n/** @oneof */\nexport interface CursorSearchPagingMethodOneOf {\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 Aggregation extends AggregationKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n /** Nested aggregation. */\n nested?: NestedAggregation;\n /**\n * User-defined name of aggregation, should be unique, will appear in aggregation results.\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation, client must provide matching aggregation field below. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by, use dot notation to specify json path.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n /** Nested aggregation. */\n nested?: NestedAggregation;\n}\n\nexport interface RangeBucket {\n /** Inclusive lower bound of the range. Required if `to` is not provided. */\n from?: number | null;\n /** Exclusive upper bound of the range. Required if `from` is not provided. */\n to?: number | null;\n}\n\nexport enum SortType {\n /** Sort by number of matches. */\n COUNT = 'COUNT',\n /** Sort by value of the field alphabetically. */\n VALUE = 'VALUE',\n}\n\n/** @enumType */\nexport type SortTypeWithLiterals = SortType | 'COUNT' | 'VALUE';\n\nexport enum SortDirection {\n /** Sort in descending order. */\n DESC = 'DESC',\n /** Sort in ascending order. */\n ASC = 'ASC',\n}\n\n/** @enumType */\nexport type SortDirectionWithLiterals = SortDirection | 'DESC' | 'ASC';\n\nexport enum MissingValues {\n /** Exclude missing values from the aggregation results. */\n EXCLUDE = 'EXCLUDE',\n /** Include missing values in the aggregation results. */\n INCLUDE = 'INCLUDE',\n}\n\n/** @enumType */\nexport type MissingValuesWithLiterals = MissingValues | 'EXCLUDE' | 'INCLUDE';\n\nexport interface IncludeMissingValuesOptions {\n /**\n * Specify custom bucket name. Defaults are [string -> \"N/A\"], [int -> \"0\"], [bool -> \"false\"] ...\n * @maxLength 20\n */\n addToBucket?: string;\n}\n\nexport enum ScalarType {\n /** Count of distinct values. */\n COUNT_DISTINCT = 'COUNT_DISTINCT',\n /** Minimum value. */\n MIN = 'MIN',\n /** Maximum value. */\n MAX = 'MAX',\n}\n\n/** @enumType */\nexport type ScalarTypeWithLiterals =\n | ScalarType\n | 'COUNT_DISTINCT'\n | 'MIN'\n | 'MAX';\n\nexport interface ValueAggregation extends ValueAggregationOptionsOneOf {\n /** Options for including missing values. */\n includeOptions?: IncludeMissingValuesOptions;\n /** Whether to sort by number of matches or value of the field. */\n sortType?: SortTypeWithLiterals;\n /** Whether to sort in ascending or descending order. */\n sortDirection?: SortDirectionWithLiterals;\n /** How many aggregations to return. Can be between 1 and 250. 10 is the default. */\n limit?: number | null;\n /** Whether to include or exclude missing values from the aggregation results. Default: `EXCLUDE`. */\n missingValues?: MissingValuesWithLiterals;\n}\n\n/** @oneof */\nexport interface ValueAggregationOptionsOneOf {\n /** Options for including missing values. */\n includeOptions?: IncludeMissingValuesOptions;\n}\n\nexport enum NestedAggregationType {\n /** An aggregation where result buckets are dynamically built - one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation, where user can define set of ranges - each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation. For example, min, max, sum, avg. */\n SCALAR = 'SCALAR',\n /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.). */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n}\n\n/** @enumType */\nexport type NestedAggregationTypeWithLiterals =\n | NestedAggregationType\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM';\n\nexport interface RangeAggregation {\n /**\n * List of range buckets, where during aggregation each entity will be placed in the first bucket its value falls into, based on the provided range bounds.\n * @maxSize 50\n */\n buckets?: RangeBucket[];\n}\n\nexport interface ScalarAggregation {\n /** Define the operator for the scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n}\n\nexport interface DateHistogramAggregation {\n /** Interval for date histogram aggregation. */\n interval?: IntervalWithLiterals;\n}\n\nexport enum Interval {\n /** Yearly interval */\n YEAR = 'YEAR',\n /** Monthly interval */\n MONTH = 'MONTH',\n /** Weekly interval */\n WEEK = 'WEEK',\n /** Daily interval */\n DAY = 'DAY',\n /** Hourly interval */\n HOUR = 'HOUR',\n /** Minute interval */\n MINUTE = 'MINUTE',\n /** Second interval */\n SECOND = 'SECOND',\n}\n\n/** @enumType */\nexport type IntervalWithLiterals =\n | Interval\n | 'YEAR'\n | 'MONTH'\n | 'WEEK'\n | 'DAY'\n | 'HOUR'\n | 'MINUTE'\n | 'SECOND';\n\nexport interface NestedAggregationItem extends NestedAggregationItemKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n /**\n * User-defined name of aggregation, should be unique, will appear in aggregation results.\n * @maxLength 100\n */\n name?: string | null;\n /** Type of aggregation, client must provide matching aggregation field below. */\n type?: NestedAggregationTypeWithLiterals;\n /**\n * Field to aggregate by, use dot notation to specify json path.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationItemKindOneOf {\n /** Value aggregation. */\n value?: ValueAggregation;\n /** Range aggregation. */\n range?: RangeAggregation;\n /** Scalar aggregation. */\n scalar?: ScalarAggregation;\n /** Date histogram aggregation. */\n dateHistogram?: DateHistogramAggregation;\n}\n\nexport enum AggregationType {\n /** An aggregation where result buckets are dynamically built - one per unique value. */\n VALUE = 'VALUE',\n /** An aggregation, where user can define set of ranges - each representing a bucket. */\n RANGE = 'RANGE',\n /** A single-value metric aggregation. For example, min, max, sum, avg. */\n SCALAR = 'SCALAR',\n /** An aggregation, where result buckets are dynamically built - one per time interval (hour, day, week, etc.) */\n DATE_HISTOGRAM = 'DATE_HISTOGRAM',\n /** Multi-level aggregation, where each next aggregation is nested within previous one. */\n NESTED = 'NESTED',\n}\n\n/** @enumType */\nexport type AggregationTypeWithLiterals =\n | AggregationType\n | 'VALUE'\n | 'RANGE'\n | 'SCALAR'\n | 'DATE_HISTOGRAM'\n | 'NESTED';\n\n/** Nested aggregation expressed through a list of aggregation where each next aggregation is nested within previous one. */\nexport interface NestedAggregation {\n /**\n * Flattened list of aggregations, where each next aggregation is nested within previous one.\n * @minSize 2\n * @maxSize 3\n */\n nestedAggregations?: NestedAggregationItem[];\n}\n\nexport interface SearchDetails {\n /** Defines how separate search terms in `expression` are combined. */\n mode?: ModeWithLiterals;\n /**\n * Search term or expression.\n * @maxLength 100\n */\n expression?: string | null;\n /**\n * Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path.\n * @maxLength 200\n * @maxSize 20\n */\n fields?: string[];\n /** Whether to use auto fuzzy search (allowing typos by a managed proximity algorithm). */\n fuzzy?: boolean;\n}\n\nexport enum Mode {\n /** Any of the search terms must be present. */\n OR = 'OR',\n /** All search terms must be present. */\n AND = 'AND',\n}\n\n/** @enumType */\nexport type ModeWithLiterals = Mode | 'OR' | 'AND';\n\n/** Name format types for sorting and searching. */\nexport enum NameFormat {\n /** Names are ordered by first name followed by last name. */\n BY_FIRST_NAME = 'BY_FIRST_NAME',\n /** Names are ordered by last name followed by first name. */\n BY_LAST_NAME = 'BY_LAST_NAME',\n}\n\n/** @enumType */\nexport type NameFormatWithLiterals =\n | NameFormat\n | 'BY_FIRST_NAME'\n | 'BY_LAST_NAME';\n\nexport interface SearchCardsResponse {\n /** List of cards. */\n cards?: Card[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n /** Aggregation data. */\n aggregationData?: AggregationData;\n}\n\nexport interface AggregationData {\n /**\n * key = aggregation name (as derived from search request).\n * @maxSize 10000\n */\n results?: AggregationResults[];\n}\n\nexport interface ValueAggregationResult {\n /**\n * Value of the field.\n * @maxLength 100\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number;\n}\n\nexport interface RangeAggregationResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in this range. */\n count?: number;\n}\n\nexport interface NestedAggregationResults\n extends NestedAggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /**\n * User-defined name of aggregation, matches the one provided in request.\n * @maxLength 100\n */\n name?: string;\n /** Type of aggregation that matches result. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by, matches the one provided in request.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface NestedAggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n}\n\nexport interface ValueResults {\n /**\n * List of value aggregations.\n * @maxSize 250\n */\n results?: ValueAggregationResult[];\n}\n\nexport interface RangeResults {\n /**\n * List of ranges returned in same order as requested.\n * @maxSize 50\n */\n results?: RangeAggregationResult[];\n}\n\nexport interface AggregationResultsScalarResult {\n /** Type of scalar aggregation. */\n type?: ScalarTypeWithLiterals;\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface NestedValueAggregationResult {\n /**\n * Value of the field.\n * @maxLength 1000\n */\n value?: string;\n /** Nested aggregations. */\n nestedResults?: NestedAggregationResults;\n}\n\nexport interface ValueResult {\n /**\n * Value of the field.\n * @maxLength 1000\n */\n value?: string;\n /** Count of entities with this value. */\n count?: number | null;\n}\n\nexport interface RangeResult {\n /** Inclusive lower bound of the range. */\n from?: number | null;\n /** Exclusive upper bound of the range. */\n to?: number | null;\n /** Count of entities in this range. */\n count?: number | null;\n}\n\nexport interface ScalarResult {\n /** Value of the scalar aggregation. */\n value?: number;\n}\n\nexport interface NestedResultValue extends NestedResultValueResultOneOf {\n /** Value aggregation result. */\n value?: ValueResult;\n /** Range aggregation result. */\n range?: RangeResult;\n /** Scalar aggregation result. */\n scalar?: ScalarResult;\n /** Date histogram aggregation result. */\n dateHistogram?: ValueResult;\n}\n\n/** @oneof */\nexport interface NestedResultValueResultOneOf {\n /** Value aggregation result. */\n value?: ValueResult;\n /** Range aggregation result. */\n range?: RangeResult;\n /** Scalar aggregation result. */\n scalar?: ScalarResult;\n /** Date histogram aggregation result. */\n dateHistogram?: ValueResult;\n}\n\nexport interface Results {\n /** List of nested aggregations. */\n results?: Record<string, NestedResultValue>;\n}\n\nexport interface DateHistogramResult {\n /**\n * Date in ISO 8601 format.\n * @maxLength 100\n */\n value?: string;\n /** Count of documents in the bucket. */\n count?: number;\n}\n\nexport interface GroupByValueResults {\n /**\n * List of value aggregations.\n * @maxSize 1000\n */\n results?: NestedValueAggregationResult[];\n}\n\nexport interface DateHistogramResults {\n /**\n * List of date histogram aggregations.\n * @maxSize 200\n */\n results?: DateHistogramResult[];\n}\n\n/**\n * Results of `NESTED` aggregation type in a flattened form.\n * Aggregations in resulting array are keyed by requested aggregation `name`.\n */\nexport interface NestedResults {\n /**\n * List of nested aggregations.\n * @maxSize 1000\n */\n results?: Results[];\n}\n\nexport interface AggregationResults extends AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** Group by value aggregation results. */\n groupedByValue?: GroupByValueResults;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n /**\n * User-defined name of aggregation as derived from search request.\n * @maxLength 100\n */\n name?: string;\n /** Type of aggregation that must match provided kind as derived from search request. */\n type?: AggregationTypeWithLiterals;\n /**\n * Field to aggregate by as derived from search request.\n * @maxLength 200\n */\n fieldPath?: string;\n}\n\n/** @oneof */\nexport interface AggregationResultsResultOneOf {\n /** Value aggregation results. */\n values?: ValueResults;\n /** Range aggregation results. */\n ranges?: RangeResults;\n /** Scalar aggregation results. */\n scalar?: AggregationResultsScalarResult;\n /** Group by value aggregation results. */\n groupedByValue?: GroupByValueResults;\n /** Date histogram aggregation results. */\n dateHistogram?: DateHistogramResults;\n /** Nested aggregation results. */\n nested?: NestedResults;\n}\n\nexport interface SearchCardsByStageRequest {\n /**\n * ID of the pipeline in which to look for cards.\n * @format GUID\n */\n pipelineId: string | null;\n /**\n * Stage IDs to filter by.\n * @format GUID\n * @minSize 1\n * @maxSize 35\n */\n stageIds: string[];\n /** Search options. `search.cursorPaging.cursor` is not supported in this request and is ignored. */\n search?: CursorSearch;\n /**\n * Specifies how contact names should be formatted and ordered when filtering, sorting, or searching cards by contact names.\n * By default, names are ordered by first name followed by last name.\n * When set to `\"BY_LAST_NAME\"`, names are ordered by last name followed by first name.\n */\n nameFormat?: NameFormatWithLiterals;\n}\n\nexport interface SearchCardsByStageResponse {\n /**\n * List of card results matching the filter and search.\n * @minSize 1\n * @maxSize 30\n */\n results?: BulkSearchCardsResult[];\n}\n\nexport interface BulkSearchCardsResult {\n /**\n * ID of the pipeline containing the cards.\n * @format GUID\n */\n pipelineId?: string | null;\n /**\n * ID of the stage containing the cards.\n * @format GUID\n */\n stageId?: string | null;\n /** List of cards. */\n cards?: Card[];\n /** Paging metadata. */\n pagingMetadata?: CursorPagingMetadata;\n /** Aggregation data. */\n aggregationData?: AggregationData;\n}\n\nexport interface BulkCreateCardsRequest {\n /**\n * List of cards to create.\n * @minSize 1\n * @maxSize 100\n */\n cards: Card[];\n /**\n * Whether to return the created cards in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkCreateCardsResponse {\n /**\n * List of cards created by the bulk operation.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkCardResult[];\n /** Bulk operation metadata. */\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 BulkCardResult {\n /** Information about the card that was created. */\n itemMetadata?: ItemMetadata;\n /**\n * Created card.\n *\n * Only returned if `returnEntity` was set to `true` in the request.\n */\n item?: Card;\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 BulkUpdateCardsRequest {\n /**\n * List of cards to update.\n * @minSize 1\n * @maxSize 100\n * @readonly\n */\n cards: MaskedCard[];\n /**\n * Whether to return the updated cards in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface MaskedCard {\n /**\n * Card to update, may be partial.\n * @readonly\n */\n card?: Card;\n}\n\nexport interface BulkUpdateCardsResponse {\n /**\n * List of cards updated by the bulk operation.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdateCardsResponseBulkCardResult[];\n /** Bulk operation metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkUpdateCardsResponseBulkCardResult {\n /** Information about the card that was updated. */\n itemMetadata?: ItemMetadata;\n /**\n * Updated card.\n *\n * Only returned if `returnEntity` was set to `true` in the request.\n */\n item?: Card;\n}\n\nexport interface BulkDeleteCardsRequest {\n /**\n * Card IDs to delete.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n cardIds: string[];\n}\n\nexport interface BulkDeleteCardsResponse {\n /**\n * List of cards deleted by the bulk operation.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkDeleteCardsResponseBulkCardResult[];\n /** Bulk operation metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkDeleteCardsResponseBulkCardResult {\n /** Information about the card that was deleted. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface BulkUpdateCardTagsRequest {\n /**\n * List of card IDs whose tags will be updated.\n * @minSize 1\n * @maxSize 100\n * @format GUID\n */\n cardIds: 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 cards in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\nexport interface BulkUpdateCardTagsResponse {\n /**\n * List of cards whose tags were updated.\n * @minSize 1\n * @maxSize 100\n */\n results?: BulkUpdateCardTagsResult[];\n /** Bulk operation metadata. */\n bulkActionMetadata?: BulkActionMetadata;\n}\n\nexport interface BulkUpdateCardTagsResult {\n /** Information about the card that was updated. */\n itemMetadata?: ItemMetadata;\n}\n\nexport interface BulkUpdateCardTagsByFilterRequest {\n /** Filter object. */\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\nexport interface BulkUpdateCardTagsByFilterResponse {\n /**\n * Job ID.\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 Empty {}\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 CreateCardApplicationErrors =\n | {\n code?: 'PIPELINE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'STAGE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ASSIGNEE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACTS_NOT_FOUND';\n description?: string;\n data?: ContactsNotFound;\n }\n | {\n code?: 'INVALID_OUTCOME';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'ADDITIONAL_CONTACTS_WITHOUT_MAIN_CONTACT';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type UpdateCardApplicationErrors =\n | {\n code?: 'REVISION_MISSING';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'STAGE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_OUTCOME';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_REMOVE_NAME';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_ASSIGNEE_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_CONTACT_ID';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CANNOT_CHANGE_CURRENCY';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INSUFFICIENT_CARD_DATA';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'CONTACTS_NOT_FOUND';\n description?: string;\n data?: ContactsNotFound;\n }\n | {\n code?: 'ADDITIONAL_CONTACTS_WITHOUT_MAIN_CONTACT';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type MoveCardApplicationErrors =\n | {\n code?: 'STAGE_NOT_FOUND';\n description?: string;\n data?: Record<string, any>;\n }\n | {\n code?: 'INVALID_OUTCOME';\n description?: string;\n data?: Record<string, any>;\n };\n/** @docsIgnore */\nexport type BulkUpdateCardTagsApplicationErrors = {\n code?: 'EMPTY_ASSIGN_AND_UNASSIGN_LISTS';\n description?: string;\n data?: Record<string, any>;\n};\n/** @docsIgnore */\nexport type BulkUpdateCardTagsByFilterApplicationErrors = {\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 CardAssignedEnvelope {\n data: CardAssigned;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a card is assigned.\n * @permissionScope Manage Pipelines\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES\n * @permissionScope Read Pipelines\n * @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES\n * @permissionId PIPELINE_CARDS.CARD_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.card_assigned\n * @slug assigned\n * @documentationMaturity preview\n */\nexport declare function onCardAssigned(\n handler: (event: CardAssignedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CardCreatedEnvelope {\n entity: Card;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a card 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 PIPELINE_CARDS.CARD_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.card_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onCardCreated(\n handler: (event: CardCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CardDeletedEnvelope {\n entity: Card;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a card 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 PIPELINE_CARDS.CARD_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.card_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onCardDeleted(\n handler: (event: CardDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CardMovedEnvelope {\n data: CardMoved;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a card is moved from one stage to another.\n * @permissionScope Manage Pipelines\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES\n * @permissionScope Read Pipelines\n * @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES\n * @permissionId PIPELINE_CARDS.CARD_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.card_moved\n * @slug moved\n * @documentationMaturity preview\n */\nexport declare function onCardMoved(\n handler: (event: CardMovedEnvelope) => void | Promise<void>\n): void;\n\nexport interface CardOverdueEnvelope {\n data: CardOverdue;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a card's `dueDate` passes.\n * @permissionScope Manage Pipelines\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES\n * @permissionScope Read Pipelines\n * @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES\n * @permissionId PIPELINE_CARDS.CARD_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.card_overdue\n * @slug overdue\n * @documentationMaturity preview\n */\nexport declare function onCardOverdue(\n handler: (event: CardOverdueEnvelope) => void | Promise<void>\n): void;\n\nexport interface CardStaleEnvelope {\n data: CardStale;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when a card's `staleDate` passes.\n * @permissionScope Manage Pipelines\n * @permissionScopeId SCOPE.DC-CRM.MANAGE-PIPELINES\n * @permissionScope Read Pipelines\n * @permissionScopeId SCOPE.DC-CRM.READ-PIPELINES\n * @permissionId PIPELINE_CARDS.CARD_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.card_stale\n * @slug stale\n * @documentationMaturity preview\n */\nexport declare function onCardStale(\n handler: (event: CardStaleEnvelope) => void | Promise<void>\n): void;\n\nexport interface CardUpdatedEnvelope {\n entity: Card;\n metadata: EventMetadata;\n /** @hidden */\n modifiedFields: Record<string, any>;\n}\n\n/**\n * Triggered when a card 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 PIPELINE_CARDS.CARD_READ\n * @webhook\n * @eventType wix.crm.pipelines.v1.card_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onCardUpdated(\n handler: (event: CardUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates a card in a specific pipeline stage.\n * @public\n * @documentationMaturity preview\n * @requiredField options.card.name\n * @requiredField options.card.pipelineId\n * @requiredField options.card.stageId\n * @permissionId PIPELINE_CARDS.CARD_CREATE\n * @applicableIdentity APP\n * @returns Created card.\n * @fqn wix.crm.pipelines.cards.v1.Cards.CreateCard\n */\nexport async function createCard(\n options?: NonNullablePaths<\n CreateCardOptions,\n `card.name` | `card.pipelineId` | `card.stageId`,\n 3\n >\n): Promise<\n NonNullablePaths<\n Card,\n | `priority`\n | `value.value`\n | `value.currency`\n | `outcome`\n | `additionalContacts`\n | `linkedEntities`\n | `linkedEntities.${number}.entityId`\n | `linkedEntities.${number}.referencedEntity`\n | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: CreateCardApplicationErrors;\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 card: options?.card,\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Card.createCard(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.card!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { card: '$[0].card' },\n singleArgumentUnchanged: false,\n },\n ['options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface CreateCardOptions {\n /** Card to create. */\n card?: Card;\n}\n\n/**\n * Retrieves a card by ID.\n * @param cardId - Card ID to retrieve.\n * @public\n * @documentationMaturity preview\n * @requiredField cardId\n * @permissionId PIPELINE_CARDS.CARD_READ\n * @applicableIdentity APP\n * @returns Retrieved card.\n * @fqn wix.crm.pipelines.cards.v1.Cards.GetCard\n */\nexport async function getCard(\n cardId: string\n): Promise<\n NonNullablePaths<\n Card,\n | `priority`\n | `value.value`\n | `value.currency`\n | `outcome`\n | `additionalContacts`\n | `linkedEntities`\n | `linkedEntities.${number}.entityId`\n | `linkedEntities.${number}.referencedEntity`\n | `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({ cardId: cardId });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Card.getCard(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.card!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cardId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['cardId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates a card by ID.\n *\n * Each time the card is updated, `revision` increments by 1. The current `revision` must be specified when updating the card. This ensures you're working with the latest card and prevents unintended overwrites.\n *\n * The card's `pipelineId` and `currency` fields can't be updated.\n * @param _id - Card ID.\n * @public\n * @documentationMaturity preview\n * @requiredField _id\n * @permissionId PIPELINE_CARDS.CARD_UPDATE\n * @permissionId PIPELINE_CARDS.CARD_UPDATE_WITHOUT_REVISION\n * @applicableIdentity APP\n * @returns Updated card.\n * @fqn wix.crm.pipelines.cards.v1.Cards.UpdateCard\n */\nexport async function updateCard(\n _id: string,\n options?: UpdateCardOptions\n): Promise<\n NonNullablePaths<\n Card,\n | `priority`\n | `value.value`\n | `value.currency`\n | `outcome`\n | `additionalContacts`\n | `linkedEntities`\n | `linkedEntities.${number}.entityId`\n | `linkedEntities.${number}.referencedEntity`\n | `tags.privateTags.tagIds`,\n 4\n > & {\n __applicationErrorsType?: UpdateCardApplicationErrors;\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 card: { ...options?.card, id: _id },\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Card.updateCard(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.card!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: { card: '$[1].card' },\n explicitPathsToArguments: { 'card.id': '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['_id', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface UpdateCardOptions {\n card: {\n /**\n * Card ID.\n * @format GUID\n * @readonly\n */\n _id?: string | null;\n /**\n * Revision number, which increments by 1 each time the card is updated.\n * To prevent conflicting changes, the current revision must be passed when updating the card.\n * @readonly\n */\n revision?: string | null;\n /**\n * Date and time the card 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 card 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 * ID of the pipeline containing this card.\n * @format GUID\n * @readonly\n */\n pipelineId?: string | null;\n /**\n * ID of the cards' current.\n * @format GUID\n */\n stageId?: string | null;\n /**\n * Date and time when the card last moved between stagesin [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * @readonly\n */\n stageUpdatedDate?: Date | null;\n /**\n * How the card was moved to its current stage.\n * @readonly\n */\n stageUpdateSource?: CardSource;\n /**\n * The Card name.\n * @minLength 1\n * @maxLength 100\n */\n name?: string | null;\n /**\n * Card description.\n * @maxLength 1000\n */\n description?: string | null;\n /**\n * Priority level of the card for task management.\n *\n * Default: `P3_MEDIUM`\n */\n priority?: PriorityWithLiterals;\n /**\n * ID of the Wix user assigned to manage the card.\n * @format GUID\n */\n assigneeId?: string | null;\n /**\n * Date and time when the card is expected to moved to the done stage in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * If the card remains active past this date, it becomes overdue.\n */\n dueDate?: Date | null;\n /**\n * Date and time when the card becomes stale based on the stage's stale duration setting in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#combined_date_and_time_representations) format.\n * This date is automatically calculated and updated when the card moves to a new stage.\n * @readonly\n */\n staleDate?: Date | null;\n /** Monetary value assigned to the card. */\n value?: Money;\n /**\n * Final outcome of the card when moved to the done stage.\n *\n * Default: `NONE`\n */\n outcome?: OutcomeWithLiterals;\n /** Primary contact associated with the card. */\n mainContact?: ContactInfo;\n /**\n * Secondary contacts associated with the card.\n * @maxSize 10\n */\n additionalContacts?: ContactInfo[];\n /**\n * Other entities linked to the card.\n *\n * For example, orders, invoices, activities, or other relevant entities.\n * @maxSize 20\n */\n linkedEntities?: LinkedEntity[];\n /** Extended fields data. */\n extendedFields?: ExtendedFields;\n /** Tags for organizing and categorizing the card. */\n tags?: PrivateTags;\n };\n}\n\n/**\n * Moves a card to a different stage within the same pipeline.\n *\n * Cards can only be moved between stages within the same pipeline.\n *\n * Each time a card is moved, its `revision` increments by 1.\n * @param cardId - Card ID to move.\n * @param stageId - ID of the stage to move the card to.\n * @public\n * @documentationMaturity preview\n * @requiredField cardId\n * @requiredField options.revision\n * @requiredField stageId\n * @permissionId PIPELINE_CARDS.CARD_UPDATE\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.cards.v1.Cards.MoveCard\n */\nexport async function moveCard(\n cardId: string,\n stageId: string,\n options?: NonNullablePaths<MoveCardOptions, `revision`, 2>\n): Promise<\n NonNullablePaths<\n MoveCardResponse,\n | `card.priority`\n | `card.value.value`\n | `card.value.currency`\n | `card.outcome`\n | `card.additionalContacts`\n | `card.linkedEntities`\n | `card.linkedEntities.${number}.entityId`\n | `card.linkedEntities.${number}.referencedEntity`\n | `card.tags.privateTags.tagIds`,\n 5\n > & {\n __applicationErrorsType?: MoveCardApplicationErrors;\n }\n> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[3] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n cardId: cardId,\n stageId: stageId,\n revision: options?.revision,\n outcome: options?.outcome,\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Card.moveCard(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 cardId: '$[0]',\n stageId: '$[1]',\n revision: '$[2].revision',\n outcome: '$[2].outcome',\n },\n singleArgumentUnchanged: false,\n },\n ['cardId', 'stageId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface MoveCardOptions {\n /** Revision of the card to move. Moving the card changes the `stageId` on the card and increases `revision` by 1. */\n revision: string | null;\n /** New card outcome. */\n outcome?: OutcomeWithLiterals;\n}\n\n/**\n * Deletes a card.\n *\n * Deleting a card permanently removes it from a site.\n * @param cardId - Card ID to delete.\n * @public\n * @documentationMaturity preview\n * @requiredField cardId\n * @permissionId PIPELINE_CARDS.CARD_DELETE\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.cards.v1.Cards.DeleteCard\n */\nexport async function deleteCard(cardId: string): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ cardId: cardId });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Card.deleteCard(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { cardId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['cardId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Retrieves a list of up to 100 cards, given the provided paging, filtering, and sorting.\n *\n * By default, 50 cards are returned and sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported operations, see [Cards: Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/crm/crm/pipelines/card-v1/supported-filters-sorting-and-search).\n *\n * To learn more about working with _Query_ methods, 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 PIPELINE_CARDS.CARD_READ\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.cards.v1.Cards.QueryCards\n */\nexport function queryCards(): CardsQueryBuilder {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[0] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n return queryBuilder<Card, 'CURSOR', QueryCardsRequest, QueryCardsResponse>({\n func: async (payload: QueryCardsRequest) => {\n const reqOpts = ambassadorWixCrmPipelinesV1Card.queryCards(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: QueryCardsRequest['query']) => {\n const args = [query, {}] as [QueryCardsRequest['query'], {}];\n return renameKeysFromSDKRequestToRESTRequest({\n ...args?.[1],\n query: args?.[0],\n });\n },\n responseTransformer: ({ data }: HttpResponse<QueryCardsResponse>) => {\n const transformedData = renameKeysFromRESTResponseToSDKResponse(\n transformPaths(data, [])\n );\n\n return {\n items: transformedData?.cards,\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 CardsQueryResult extends QueryCursorResult {\n items: Card[];\n query: CardsQueryBuilder;\n next: () => Promise<CardsQueryResult>;\n prev: () => Promise<CardsQueryResult>;\n}\n\nexport interface CardsQueryBuilder {\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:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'pipelineId'\n | 'stageId',\n value: any\n ) => CardsQueryBuilder;\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:\n | '_id'\n | '_createdDate'\n | '_updatedDate'\n | 'pipelineId'\n | 'stageId',\n value: any\n ) => CardsQueryBuilder;\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 ) => CardsQueryBuilder;\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 ) => CardsQueryBuilder;\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 ) => CardsQueryBuilder;\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 ) => CardsQueryBuilder;\n /** @documentationMaturity preview */\n in: (\n propertyName: '_id' | 'pipelineId' | 'stageId',\n value: any\n ) => CardsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n ascending: (...propertyNames: Array<'_createdDate'>) => CardsQueryBuilder;\n /** @param propertyNames - Properties used in the sort. To sort by multiple properties, pass properties as additional arguments.\n * @documentationMaturity preview\n */\n descending: (...propertyNames: Array<'_updatedDate'>) => CardsQueryBuilder;\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) => CardsQueryBuilder;\n /** @param cursor - A pointer to specific record\n * @documentationMaturity preview\n */\n skipTo: (cursor: string) => CardsQueryBuilder;\n /** @documentationMaturity preview */\n find: () => Promise<CardsQueryResult>;\n}\n\n/**\n * @hidden\n * @fqn wix.crm.pipelines.cards.v1.Cards.QueryCards\n * @requiredField query\n */\nexport async function typedQueryCards(\n query: CardQuery\n): Promise<\n NonNullablePaths<\n QueryCardsResponse,\n | `cards`\n | `cards.${number}.priority`\n | `cards.${number}.value.value`\n | `cards.${number}.value.currency`\n | `cards.${number}.outcome`,\n 5\n >\n> {\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 = ambassadorWixCrmPipelinesV1Card.queryCards(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 CardQuerySpec extends QuerySpec {\n paging: 'cursor';\n wql: [\n {\n fields: ['_id', 'pipelineId', 'stageId'];\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}\n\nexport type CommonQueryWithEntityContext = QuerySdkType<Card, CardQuerySpec>;\nexport type CardQuery = {\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 in the results. Default is 50. \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 the [filter section](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 the [sort section](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<Card, CardQuerySpec, CardQuery>(),\n },\n search: {\n ...createSearchUtils<Card, CardSearchSpec, CardSearch>(),\n },\n};\n\n/**\n * Retrieves a list of cards given the provided free-text search expression, filtering, and sorting.\n *\n * By default, cards are sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported filters, sorting options, and search capabilities, see [Cards: Supported Filters, Sorting, and Search](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-wip/card-v1/sort-filter-and-search).\n *\n * To learn more about working with _Search_ methods, 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 * @param search - Search options.\n * @public\n * @documentationMaturity preview\n * @requiredField search\n * @permissionId PIPELINE_CARDS.CARD_READ\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.cards.v1.Cards.SearchCards\n */\nexport async function searchCards(\n search: CardSearch,\n options?: SearchCardsOptions\n): Promise<\n NonNullablePaths<\n SearchCardsResponse,\n | `cards`\n | `cards.${number}.priority`\n | `cards.${number}.value.value`\n | `cards.${number}.value.currency`\n | `cards.${number}.outcome`\n | `aggregationData.results`\n | `aggregationData.results.${number}.scalar.type`\n | `aggregationData.results.${number}.scalar.value`\n | `aggregationData.results.${number}.name`\n | `aggregationData.results.${number}.type`\n | `aggregationData.results.${number}.fieldPath`,\n 6\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 search: search,\n nameFormat: options?.nameFormat,\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Card.searchCards(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 search: '$[0]',\n nameFormat: '$[1].nameFormat',\n },\n singleArgumentUnchanged: false,\n },\n ['search', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchCardsOptions {\n /**\n * Specifies how contact names should be formatted and ordered when filtering, sorting, or searching cards by contact names.\n * By default, names are ordered by first name followed by last name.\n * When set to `\"BY_LAST_NAME\"`, names are ordered by last name followed by first name.\n */\n nameFormat?: NameFormatWithLiterals;\n}\n\nexport interface CardSearchSpec extends SearchSpec {\n searchable: [\n 'additionalContacts.email',\n 'additionalContacts.fullName',\n 'additionalContacts.phone',\n 'description',\n 'mainContact.email',\n 'mainContact.fullName',\n 'mainContact.phone',\n 'name'\n ];\n aggregatable: [\n '_createdDate',\n '_id',\n '_updatedDate',\n 'additionalContacts',\n 'additionalContacts.contactId',\n 'assigneeId',\n 'description',\n 'dueDate',\n 'linkedEntities',\n 'linkedEntities.entityId',\n 'linkedEntities.referencedEntity',\n 'mainContact.contactId',\n 'name',\n 'outcome',\n 'pipelineId',\n 'priority',\n 'stageId',\n 'stageUpdatedDate',\n 'staleDate',\n 'tags.privateTags.tagIds',\n 'value.value'\n ];\n paging: 'cursor';\n wql: [\n {\n operators: ['$eq', '$in', '$ne', '$nin'];\n fields: ['_id', 'pipelineId', 'stageId'];\n sort: 'ASC';\n },\n {\n operators: ['$eq', '$exists', '$in', '$ne', '$nin'];\n fields: ['assigneeId', 'mainContact.contactId'];\n sort: 'ASC';\n },\n {\n operators: ['$eq', '$gt', '$gte', '$lt', '$lte', '$ne'];\n fields: ['_createdDate', '_updatedDate', 'stageUpdatedDate'];\n sort: 'BOTH';\n },\n {\n operators: ['$eq', '$exists', '$gt', '$gte', '$lt', '$lte'];\n fields: ['dueDate', 'staleDate', 'value.value'];\n sort: 'BOTH';\n },\n {\n operators: ['$hasAll', '$hasSome', '$isEmpty'];\n fields: ['tags.privateTags.tagIds'];\n sort: 'NONE';\n },\n {\n operators: ['$isEmpty', '$matchItems'];\n fields: ['additionalContacts'];\n sort: 'NONE';\n },\n {\n operators: ['$matchItems'];\n fields: ['linkedEntities'];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$exists', '$in', '$ne', '$nin', '$startsWith'];\n fields: ['description'];\n sort: 'NONE';\n },\n {\n operators: ['$eq', '$in', '$ne', '$nin', '$startsWith'];\n fields: ['mainContact.email', 'mainContact.phone', 'name'];\n sort: 'BOTH';\n },\n {\n operators: ['$eq', '$in', '$ne', '$nin'];\n fields: ['outcome', 'priority'];\n sort: 'BOTH';\n }\n ];\n}\n\nexport type CommonSearchWithEntityContext = SearchSdkType<Card, CardSearchSpec>;\nexport type CardSearch = {\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 in the results. Default is 50. \n @max: 100 \n */\n limit?:\n | NonNullable<CommonSearchWithEntityContext['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<CommonSearchWithEntityContext['cursorPaging']>['cursor']\n | null;\n };\n /** \n Filter object.\n\n Learn more about the [filter section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-filter-section). \n */\n filter?: CommonSearchWithEntityContext['filter'] | null;\n /** \n List of sort objects.\n\n Learn more about the [sort section](https://dev.wix.com/docs/rest/articles/getting-started/api-query-language#the-sort-section). \n @maxSize: 10 \n */\n sort?: {\n /** \n Name of the field to sort by. \n @maxLength: 512 \n */\n fieldName?: NonNullable<\n CommonSearchWithEntityContext['sort']\n >[number]['fieldName'];\n /** \n Sort order. \n */\n order?: NonNullable<CommonSearchWithEntityContext['sort']>[number]['order'];\n }[];\n /** \n Aggregations are a way to explore large amounts of data by displaying summaries about various partitions of the data and later allowing to narrow the navigation to a specific partition. \n @maxSize: 10 \n */\n aggregations?: {\n /** \n Value aggregation. \n */\n value?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['value'];\n /** \n Range aggregation. \n */\n range?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['range'];\n /** \n Scalar aggregation. \n */\n scalar?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['scalar'];\n /** \n Date histogram aggregation. \n */\n dateHistogram?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['dateHistogram'];\n /** \n Nested aggregation. \n */\n nested?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['nested'];\n /** \n User-defined name of aggregation, should be unique, will appear in aggregation results. \n @maxLength: 100 \n */\n name?:\n | NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['name']\n | null;\n /** \n Type of aggregation, client must provide matching aggregation field below. \n */\n type?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['type'];\n /** \n Field to aggregate by, use dot notation to specify json path. \n @maxLength: 200 \n */\n fieldPath?: NonNullable<\n CommonSearchWithEntityContext['aggregations']\n >[number]['fieldPath'];\n }[];\n /** \n Free text to match in searchable fields. \n */\n search?: {\n /** \n Defines how separate search terms in `expression` are combined. \n */\n mode?: NonNullable<CommonSearchWithEntityContext['search']>['mode'];\n /** \n Search term or expression. \n @maxLength: 100 \n */\n expression?:\n | NonNullable<CommonSearchWithEntityContext['search']>['expression']\n | null;\n /** \n Fields to search in. If empty - will search in all searchable fields. Use dot notation to specify json path. \n @maxLength: 200,\n @maxSize: 20 \n */\n fields?: NonNullable<CommonSearchWithEntityContext['search']>['fields'];\n /** \n Whether to use auto fuzzy search (allowing typos by a managed proximity algorithm). \n */\n fuzzy?: NonNullable<CommonSearchWithEntityContext['search']>['fuzzy'];\n };\n /** \n UTC offset or IANA time zone. Valid values are\n ISO 8601 UTC offsets, such as +02:00 or -06:00,\n and IANA time zone IDs, such as Europe/Rome.\n\n Affects all filters and aggregations returned values.\n You may override this behavior in a specific filter by providing\n timestamps including time zone. For example, `\"2023-12-20T10:52:34.795Z\"`. \n @maxLength: 50 \n */\n timeZone?: CommonSearchWithEntityContext['timeZone'] | null;\n};\n\n/**\n * Retrieves a list of cards by the pipeline's stage, given the provided free-text search expression, filtering, and sorting.\n *\n * By default, cards are sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported filters, sorting options, and search capabilities, see [Cards: Supported Filters, Sorting, and Search](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-wip/card-v1/sort-filter-and-search).\n *\n * To learn more about working with _Search_ methods, 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 * @param pipelineId - ID of the pipeline in which to look for cards.\n * @public\n * @documentationMaturity preview\n * @requiredField options.stageIds\n * @requiredField pipelineId\n * @permissionId PIPELINE_CARDS.CARD_READ\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.cards.v1.Cards.SearchCardsByStage\n */\nexport async function searchCardsByStage(\n pipelineId: string,\n options?: NonNullablePaths<SearchCardsByStageOptions, `stageIds`, 2>\n): Promise<NonNullablePaths<SearchCardsByStageResponse, `results`, 2>> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n pipelineId: pipelineId,\n stageIds: options?.stageIds,\n search: options?.search,\n nameFormat: options?.nameFormat,\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Card.searchCardsByStage(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 pipelineId: '$[0]',\n stageIds: '$[1].stageIds',\n search: '$[1].search',\n nameFormat: '$[1].nameFormat',\n },\n singleArgumentUnchanged: false,\n },\n ['pipelineId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface SearchCardsByStageOptions {\n /**\n * Stage IDs to filter by.\n * @format GUID\n * @minSize 1\n * @maxSize 35\n */\n stageIds: string[];\n /** Search options. `search.cursorPaging.cursor` is not supported in this request and is ignored. */\n search?: CursorSearch;\n /**\n * Specifies how contact names should be formatted and ordered when filtering, sorting, or searching cards by contact names.\n * By default, names are ordered by first name followed by last name.\n * When set to `\"BY_LAST_NAME\"`, names are ordered by last name followed by first name.\n */\n nameFormat?: NameFormatWithLiterals;\n}\n\n/**\n * Creates multiple cards.\n * @param cards - List of cards to create.\n * @internal\n * @documentationMaturity preview\n * @requiredField cards\n * @requiredField cards.name\n * @requiredField cards.pipelineId\n * @requiredField cards.stageId\n * @permissionId PIPELINE_CARDS.CARD_CREATE\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.cards.v1.Cards.BulkCreateCards\n */\nexport async function bulkCreateCards(\n cards: NonNullablePaths<Card, `name` | `pipelineId` | `stageId`, 2>[],\n options?: BulkCreateCardsOptions\n): Promise<\n NonNullablePaths<\n BulkCreateCardsResponse,\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 | `results.${number}.item.priority`\n | `results.${number}.item.value.value`\n | `results.${number}.item.value.currency`\n | `results.${number}.item.outcome`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\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 cards: cards,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Card.bulkCreateCards(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 cards: '$[0]',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['cards', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkCreateCardsOptions {\n /**\n * Whether to return the created cards in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Updates multiple cards.\n * @param cards - List of cards to update.\n * @internal\n * @documentationMaturity preview\n * @requiredField cards\n * @requiredField cards.card._id\n * @requiredField cards.card.revision\n * @permissionId PIPELINE_CARDS.CARD_UPDATE\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.cards.v1.Cards.BulkUpdateCards\n */\nexport async function bulkUpdateCards(\n cards: NonNullablePaths<MaskedCard, `card._id` | `card.revision`, 3>[],\n options?: BulkUpdateCardsOptions\n): Promise<\n NonNullablePaths<\n BulkUpdateCardsResponse,\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 | `results.${number}.item.priority`\n | `results.${number}.item.value.value`\n | `results.${number}.item.value.currency`\n | `results.${number}.item.outcome`\n | `bulkActionMetadata.totalSuccesses`\n | `bulkActionMetadata.totalFailures`\n | `bulkActionMetadata.undetailedFailures`,\n 6\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 cards: cards,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Card.bulkUpdateCards(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 cards: '$[0]',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['cards', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateCardsOptions {\n /**\n * Whether to return the updated cards in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Deletes multiple cards.\n * @param cardIds - Card IDs to delete.\n * @internal\n * @documentationMaturity preview\n * @requiredField cardIds\n * @permissionId PIPELINE_CARDS.CARD_DELETE\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.cards.v1.Cards.BulkDeleteCards\n */\nexport async function bulkDeleteCards(\n cardIds: string[]\n): Promise<\n NonNullablePaths<\n BulkDeleteCardsResponse,\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> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[1] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({ cardIds: cardIds });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Card.bulkDeleteCards(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: { cardIds: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['cardIds']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Updates tags on multiple cards by specified card IDs.\n *\n * If you specify a tag that in both `assignTags` and `unassignTags`, the tag is assigned to the cards.\n * @param cardIds - List of card IDs whose tags will be updated.\n * @public\n * @documentationMaturity preview\n * @requiredField cardIds\n * @permissionId PIPELINE_CARDS.CARD_UPDATE_TAGS\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.cards.v1.Cards.BulkUpdateCardTags\n */\nexport async function bulkUpdateCardTags(\n cardIds: string[],\n options?: BulkUpdateCardTagsOptions\n): Promise<\n NonNullablePaths<\n BulkUpdateCardTagsResponse,\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?: BulkUpdateCardTagsApplicationErrors;\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 cardIds: cardIds,\n assignTags: options?.assignTags,\n unassignTags: options?.unassignTags,\n returnEntity: options?.returnEntity,\n });\n\n const reqOpts = ambassadorWixCrmPipelinesV1Card.bulkUpdateCardTags(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 cardIds: '$[0]',\n assignTags: '$[1].assignTags',\n unassignTags: '$[1].unassignTags',\n returnEntity: '$[1].returnEntity',\n },\n singleArgumentUnchanged: false,\n },\n ['cardIds', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateCardTagsOptions {\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 cards in the response.\n *\n * Default: `false`\n */\n returnEntity?: boolean;\n}\n\n/**\n * Asynchronously updates tags on multiple cards using a filter to specify which cards to update.\n *\n * An empty filter updates all cards in the pipeline.\n *\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the cards.\n * @param filter - Filter object.\n * @public\n * @documentationMaturity preview\n * @requiredField filter\n * @permissionId PIPELINE_CARDS.CARD_UPDATE_TAGS\n * @applicableIdentity APP\n * @fqn wix.crm.pipelines.cards.v1.Cards.BulkUpdateCardTagsByFilter\n */\nexport async function bulkUpdateCardTagsByFilter(\n filter: Record<string, any>,\n options?: BulkUpdateCardTagsByFilterOptions\n): Promise<\n NonNullablePaths<BulkUpdateCardTagsByFilterResponse, `jobId`, 2> & {\n __applicationErrorsType?: BulkUpdateCardTagsByFilterApplicationErrors;\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 });\n\n const reqOpts =\n ambassadorWixCrmPipelinesV1Card.bulkUpdateCardTagsByFilter(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 },\n singleArgumentUnchanged: false,\n },\n ['filter', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface BulkUpdateCardTagsByFilterOptions {\n /** List of tags to assign. */\n assignTags?: PrivateTags;\n /** List of tags to unassign. */\n unassignTags?: PrivateTags;\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { transformSDKFloatToRESTFloat } from '@wix/sdk-runtime/transformations/float';\nimport { transformRESTFloatToSDKFloat } from '@wix/sdk-runtime/transformations/float';\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 resolveWixCrmPipelinesCardsV1CardsUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'manage._base_domain_': [\n {\n srcPath: '/_api/cards-app/v1/cards',\n destPath: '/v1/cards',\n },\n {\n srcPath: '/_api/cards-app/v1/bulk/cards',\n destPath: '/v1/bulk/cards',\n },\n {\n srcPath: '/_api/cards/v1/cards',\n destPath: '/v1/cards',\n },\n {\n srcPath: '/_api/cards/v1/bulk/cards',\n destPath: '/v1/bulk/cards',\n },\n ],\n _: [\n {\n srcPath: '/_api/cards/v1/cards',\n destPath: '/v1/cards',\n },\n {\n srcPath: '/_api/cards/v1/bulk/cards',\n destPath: '/v1/bulk/cards',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/cards/v1/cards',\n destPath: '/v1/cards',\n },\n {\n srcPath: '/_api/cards/v1/bulk/cards',\n destPath: '/v1/bulk/cards',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/crm/pipelines/v1/cards',\n destPath: '/v1/cards',\n },\n {\n srcPath: '/crm/pipelines/v1/bulk/cards',\n destPath: '/v1/bulk/cards',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_crm_pipelines';\n\n/** Creates a card in a specific pipeline stage. */\nexport function createCard(payload: object): RequestOptionsFactory<any> {\n function __createCard({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'card.createdDate' },\n { path: 'card.updatedDate' },\n { path: 'card.stageUpdatedDate' },\n { path: 'card.dueDate' },\n { path: 'card.staleDate' },\n { path: 'card.linkedEntities.linkedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'POST' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.CreateCard',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/cards',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'card.createdDate' },\n { path: 'card.updatedDate' },\n { path: 'card.stageUpdatedDate' },\n { path: 'card.dueDate' },\n { path: 'card.staleDate' },\n { path: 'card.linkedEntities.linkedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __createCard;\n}\n\n/** Retrieves a card by ID. */\nexport function getCard(payload: object): RequestOptionsFactory<any> {\n function __getCard({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'GET' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.GetCard',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/cards/{cardId}',\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: 'card.createdDate' },\n { path: 'card.updatedDate' },\n { path: 'card.stageUpdatedDate' },\n { path: 'card.dueDate' },\n { path: 'card.staleDate' },\n { path: 'card.linkedEntities.linkedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __getCard;\n}\n\n/**\n * Updates a card by ID.\n *\n * Each time the card is updated, `revision` increments by 1. The current `revision` must be specified when updating the card. This ensures you're working with the latest card and prevents unintended overwrites.\n *\n * The card's `pipelineId` and `currency` fields can't be updated.\n */\nexport function updateCard(payload: object): RequestOptionsFactory<any> {\n function __updateCard({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'card.createdDate' },\n { path: 'card.updatedDate' },\n { path: 'card.stageUpdatedDate' },\n { path: 'card.dueDate' },\n { path: 'card.staleDate' },\n { path: 'card.linkedEntities.linkedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'PATCH' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.UpdateCard',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/cards/{card.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: 'card.createdDate' },\n { path: 'card.updatedDate' },\n { path: 'card.stageUpdatedDate' },\n { path: 'card.dueDate' },\n { path: 'card.staleDate' },\n { path: 'card.linkedEntities.linkedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __updateCard;\n}\n\n/**\n * Moves a card to a different stage within the same pipeline.\n *\n * Cards can only be moved between stages within the same pipeline.\n *\n * Each time a card is moved, its `revision` increments by 1.\n */\nexport function moveCard(payload: object): RequestOptionsFactory<any> {\n function __moveCard({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'PATCH' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.MoveCard',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/cards/move/{cardId}',\n data: payload,\n host,\n }),\n data: payload,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'card.createdDate' },\n { path: 'card.updatedDate' },\n { path: 'card.stageUpdatedDate' },\n { path: 'card.dueDate' },\n { path: 'card.staleDate' },\n { path: 'card.linkedEntities.linkedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __moveCard;\n}\n\n/**\n * Deletes a card.\n *\n * Deleting a card permanently removes it from a site.\n */\nexport function deleteCard(payload: object): RequestOptionsFactory<any> {\n function __deleteCard({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'DELETE' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.DeleteCard',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/cards/{cardId}',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __deleteCard;\n}\n\n/**\n * Retrieves a list of up to 100 cards, given the provided paging, filtering, and sorting.\n *\n * By default, 50 cards are returned and sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported operations, see [Cards: Supported Filters and Sorting](https://dev.wix.com/docs/api-reference/crm/crm/pipelines/card-v1/supported-filters-sorting-and-search).\n *\n * To learn more about working with _Query_ methods, 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 queryCards(payload: object): RequestOptionsFactory<any> {\n function __queryCards({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'GET' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.QueryCards',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/cards/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: 'cards.createdDate' },\n { path: 'cards.updatedDate' },\n { path: 'cards.stageUpdatedDate' },\n { path: 'cards.dueDate' },\n { path: 'cards.staleDate' },\n { path: 'cards.linkedEntities.linkedDate' },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/cards/query',\n data: payload,\n host,\n }),\n data: payload,\n },\n ],\n };\n\n return metadata;\n }\n\n return __queryCards;\n}\n\n/**\n * Retrieves a list of cards given the provided free-text search expression, filtering, and sorting.\n *\n * By default, cards are sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported filters, sorting options, and search capabilities, see [Cards: Supported Filters, Sorting, and Search](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-wip/card-v1/sort-filter-and-search).\n *\n * To learn more about working with _Search_ methods, 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 searchCards(payload: object): RequestOptionsFactory<any> {\n function __searchCards({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'search.aggregations.range.buckets.from' },\n { path: 'search.aggregations.range.buckets.to' },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',\n },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'GET' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.SearchCards',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/cards/search',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'cards.createdDate' },\n { path: 'cards.updatedDate' },\n { path: 'cards.stageUpdatedDate' },\n { path: 'cards.dueDate' },\n { path: 'cards.staleDate' },\n { path: 'cards.linkedEntities.linkedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'aggregationData.results.ranges.results.from' },\n { path: 'aggregationData.results.ranges.results.to' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from',\n },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.from',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.range.to',\n },\n { path: 'aggregationData.results.scalar.value' },\n {\n path: 'aggregationData.results.groupedByValue.results.nestedResults.scalar.value',\n },\n {\n path: 'aggregationData.results.nested.results.results.*.scalar.value',\n },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/cards/search',\n data: serializedData,\n host,\n }),\n data: serializedData,\n },\n ],\n };\n\n return metadata;\n }\n\n return __searchCards;\n}\n\n/**\n * Retrieves a list of cards by the pipeline's stage, given the provided free-text search expression, filtering, and sorting.\n *\n * By default, cards are sorted by `updatedDate` in descending order.\n *\n * For a detailed list of supported filters, sorting options, and search capabilities, see [Cards: Supported Filters, Sorting, and Search](https://dev.wix.com/docs/api-reference/crm/crm/pipelines-wip/card-v1/sort-filter-and-search).\n *\n * To learn more about working with _Search_ methods, 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 searchCardsByStage(\n payload: object\n): RequestOptionsFactory<any> {\n function __searchCardsByStage({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFloatToRESTFloat,\n paths: [\n { path: 'search.aggregations.range.buckets.from' },\n { path: 'search.aggregations.range.buckets.to' },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.from',\n },\n {\n path: 'search.aggregations.nested.nestedAggregations.range.buckets.to',\n },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'GET' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.SearchCardsByStage',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/cards/search-by-stage',\n data: serializedData,\n host,\n }),\n params: toURLSearchParams(serializedData, true),\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.cards.createdDate' },\n { path: 'results.cards.updatedDate' },\n { path: 'results.cards.stageUpdatedDate' },\n { path: 'results.cards.dueDate' },\n { path: 'results.cards.staleDate' },\n { path: 'results.cards.linkedEntities.linkedDate' },\n ],\n },\n {\n transformFn: transformRESTFloatToSDKFloat,\n paths: [\n { path: 'results.aggregationData.results.ranges.results.from' },\n { path: 'results.aggregationData.results.ranges.results.to' },\n {\n path: 'results.aggregationData.results.groupedByValue.results.nestedResults.ranges.results.from',\n },\n {\n path: 'results.aggregationData.results.groupedByValue.results.nestedResults.ranges.results.to',\n },\n {\n path: 'results.aggregationData.results.nested.results.results.*.range.from',\n },\n {\n path: 'results.aggregationData.results.nested.results.results.*.range.to',\n },\n { path: 'results.aggregationData.results.scalar.value' },\n {\n path: 'results.aggregationData.results.groupedByValue.results.nestedResults.scalar.value',\n },\n {\n path: 'results.aggregationData.results.nested.results.results.*.scalar.value',\n },\n ],\n },\n ]),\n fallback: [\n {\n method: 'POST' as any,\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/cards/search-by-stage',\n data: serializedData,\n host,\n }),\n data: serializedData,\n },\n ],\n };\n\n return metadata;\n }\n\n return __searchCardsByStage;\n}\n\n/** Creates multiple cards. */\nexport function bulkCreateCards(payload: object): RequestOptionsFactory<any> {\n function __bulkCreateCards({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'cards.createdDate' },\n { path: 'cards.updatedDate' },\n { path: 'cards.stageUpdatedDate' },\n { path: 'cards.dueDate' },\n { path: 'cards.staleDate' },\n { path: 'cards.linkedEntities.linkedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'POST' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.BulkCreateCards',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/bulk/cards/create',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.stageUpdatedDate' },\n { path: 'results.item.dueDate' },\n { path: 'results.item.staleDate' },\n { path: 'results.item.linkedEntities.linkedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkCreateCards;\n}\n\n/** Updates multiple cards. */\nexport function bulkUpdateCards(payload: object): RequestOptionsFactory<any> {\n function __bulkUpdateCards({ host }: any) {\n const serializedData = transformPaths(payload, [\n {\n transformFn: transformSDKFieldMaskToRESTFieldMask,\n paths: [{ path: 'cards.fieldMask' }],\n },\n {\n transformFn: transformSDKTimestampToRESTTimestamp,\n paths: [\n { path: 'cards.card.createdDate' },\n { path: 'cards.card.updatedDate' },\n { path: 'cards.card.stageUpdatedDate' },\n { path: 'cards.card.dueDate' },\n { path: 'cards.card.staleDate' },\n { path: 'cards.card.linkedEntities.linkedDate' },\n ],\n },\n ]);\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'POST' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.BulkUpdateCards',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/bulk/cards/update',\n data: serializedData,\n host,\n }),\n data: serializedData,\n transformResponse: (payload: any) =>\n transformPaths(payload, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [\n { path: 'results.item.createdDate' },\n { path: 'results.item.updatedDate' },\n { path: 'results.item.stageUpdatedDate' },\n { path: 'results.item.dueDate' },\n { path: 'results.item.staleDate' },\n { path: 'results.item.linkedEntities.linkedDate' },\n ],\n },\n ]),\n };\n\n return metadata;\n }\n\n return __bulkUpdateCards;\n}\n\n/** Deletes multiple cards. */\nexport function bulkDeleteCards(payload: object): RequestOptionsFactory<any> {\n function __bulkDeleteCards({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'POST' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.BulkDeleteCards',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/bulk/cards/delete',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkDeleteCards;\n}\n\n/**\n * Updates tags on multiple cards by specified card IDs.\n *\n * If you specify a tag that in both `assignTags` and `unassignTags`, the tag is assigned to the cards.\n */\nexport function bulkUpdateCardTags(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateCardTags({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'POST' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.BulkUpdateCardTags',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/bulk/cards/update-tags',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdateCardTags;\n}\n\n/**\n * Asynchronously updates tags on multiple cards using a filter to specify which cards to update.\n *\n * An empty filter updates all cards in the pipeline.\n *\n * If you specify a tag in both `assignTags` and `unassignTags`, the tag is assigned to the cards.\n */\nexport function bulkUpdateCardTagsByFilter(\n payload: object\n): RequestOptionsFactory<any> {\n function __bulkUpdateCardTagsByFilter({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.crm.pipelines.v1.card',\n method: 'POST' as any,\n methodFqn: 'wix.crm.pipelines.cards.v1.Cards.BulkUpdateCardTagsByFilter',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveWixCrmPipelinesCardsV1CardsUrl({\n protoPath: '/v1/bulk/cards/update-tags-by-filter',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __bulkUpdateCardTagsByFilter;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAAAA;AAAA,EAAA,uBAAAC;AAAA,EAAA,0BAAAC;AAAA,EAAA,kCAAAC;AAAA,EAAA,uBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,eAAAC;AAAA,EAAA,gBAAAC;AAAA,EAAA,kBAAAC;AAAA,EAAA,mB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F,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAX;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,SAAS;AAAA,UACT,YAAY;AAAA,UACZ,cAAc;AAAA,UACd,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,WAAW,SAAS;AAAA,IACvB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AA6BA,eAAsBY,4BACpB,QACA,SAKA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,YAAY,SAAS;AAAA,IACrB,cAAc,SAAS;AAAA,EACzB,CAAC;AAED,QAAM,UAC4B,2BAA2B,OAAO;AAEpE,eAAa,aAAa;AAC1B,MAAI;AACF,UAAM,SAAS,MAAM,WAAW,QAAQ,OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAZ;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,QAAQ;AAAA,UACR,YAAY;AAAA,UACZ,cAAc;AAAA,QAChB;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,UAAU,SAAS;AAAA,IACtB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["bulkCreateCards","bulkDeleteCards","bulkUpdateCardTags","bulkUpdateCardTagsByFilter","bulkUpdateCards","createCard","deleteCard","getCard","moveCard","queryCards","searchCards","searchCardsByStage","updateCard","import_float","import_timestamp","import_rest_modules","payload","import_transform_paths","Priority","Outcome","SortOrder","SortType","SortDirection","MissingValues","ScalarType","NestedAggregationType","Interval","AggregationType","Mode","NameFormat","WebhookIdentityType","createCard","sdkTransformError","getCard","updateCard","moveCard","deleteCard","queryCards","searchCards","searchCardsByStage","bulkCreateCards","bulkUpdateCards","bulkDeleteCards","bulkUpdateCardTags","bulkUpdateCardTagsByFilter"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/crm-pipelines-v1-pipeline-pipelines.universal.ts","../../src/crm-pipelines-v1-pipeline-pipelines.http.ts"],"sourcesContent":["export * from './src/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 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 descening order.\n *\n * For a detailed list of supported operations, see [Pipelines: Supported Filters and Sorting](http://dev.wix.com/docs/api-reference/crm/crm/pipelines/pipeline-v1/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 descening order.\n *\n * For a detailed list of supported operations, see [Pipelines: Supported Filters and Sorting](http://dev.wix.com/docs/api-reference/crm/crm/pipelines/pipeline-v1/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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gCAAAA;AAAA,EAAA,sCAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA;AAAA,wBAAAC;AAAA,EAAA;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,2BAA6B;AAC7B,oCAGO;;;ACLP,0BAAkC;AAClC,uBAAqD;AACrD,IAAAC,oBAAqD;AACrD,wBAAqD;AACrD,6BAA+B;AAC/B,IAAAC,uBAA2B;AAI3B,SAAS,8CACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,wBAAwB;AAAA,MACtB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,MACpB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,EACF;AAEA,aAAO,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SAAS;AAAA,IACtB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["bulkUpdatePipelineTags","bulkUpdatePipelineTagsByFilter","createPipeline","deletePipeline","getPipeline","queryPipelines","updatePipeline","import_timestamp","import_rest_modules","payload","import_transform_paths","Outcome","SortOrder","WebhookIdentityType","createPipeline","sdkTransformError","getPipeline","updatePipeline","deletePipeline","queryPipelines","bulkUpdatePipelineTags","bulkUpdatePipelineTagsByFilter"]}
|