@wix/auto_sdk_data_indexes 1.0.37 → 1.0.38
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 +1 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.d.ts +18 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.d.ts +18 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/es/index.d.mts +1 -1
- package/build/es/index.mjs.map +1 -1
- package/build/es/index.typings.d.mts +18 -1
- package/build/es/index.typings.mjs.map +1 -1
- package/build/es/meta.d.mts +18 -1
- package/build/es/meta.mjs.map +1 -1
- package/build/internal/cjs/index.d.ts +1 -1
- package/build/internal/cjs/index.js.map +1 -1
- package/build/internal/cjs/index.typings.d.ts +18 -1
- package/build/internal/cjs/index.typings.js.map +1 -1
- package/build/internal/cjs/meta.d.ts +18 -1
- package/build/internal/cjs/meta.js.map +1 -1
- package/build/internal/es/index.d.mts +1 -1
- package/build/internal/es/index.mjs.map +1 -1
- package/build/internal/es/index.typings.d.mts +18 -1
- package/build/internal/es/index.typings.mjs.map +1 -1
- package/build/internal/es/meta.d.mts +18 -1
- package/build/internal/es/meta.mjs.map +1 -1
- package/package.json +2 -2
package/build/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient, NonNullablePaths, EventDefinition, MaybeContext, BuildRESTFunction, BuildEventDefinition } from '@wix/sdk-types';
|
|
2
2
|
import { Index, ListIndexesOptions, ListIndexesResponse, IndexCreatedEnvelope, IndexDeletedEnvelope, IndexUpdatedEnvelope } from './index.typings.js';
|
|
3
|
-
export { ActionEvent, BaseEventMetadata, CreateIndexRequest, CreateIndexResponse, DomainEvent, DomainEventBodyOneOf, DropIndexRequest, DropIndexResponse, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Environment, EnvironmentWithLiterals, EventMetadata, Failure, Field, IdentificationData, IdentificationDataIdOneOf, IndexSource, IndexSourceWithLiterals, ListAvailableIndexesRequest, ListAvailableIndexesResponse, ListIndexesRequest, MessageEnvelope, Order, OrderWithLiterals, Paging, PagingMetadata, RestoreInfo, Status, StatusWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
3
|
+
export { AccountDetails, ActionEvent, BaseEventMetadata, CreateIndexRequest, CreateIndexResponse, DomainEvent, DomainEventBodyOneOf, DropIndexRequest, DropIndexResponse, EntityCreatedEvent, EntityDeletedEvent, EntityUpdatedEvent, Environment, EnvironmentWithLiterals, EventMetadata, Failure, Field, IdentificationData, IdentificationDataIdOneOf, IndexSource, IndexSourceWithLiterals, ListAvailableIndexesRequest, ListAvailableIndexesResponse, ListIndexesRequest, MessageEnvelope, Order, OrderWithLiterals, Paging, PagingMetadata, RestoreInfo, Status, StatusWithLiterals, WebhookIdentityType, WebhookIdentityTypeWithLiterals } from './index.typings.js';
|
|
4
4
|
|
|
5
5
|
declare function createIndex$1(httpClient: HttpClient): CreateIndexSignature;
|
|
6
6
|
interface CreateIndexSignature {
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.ts","../../src/data-v2-index-indexes.public.ts","../../src/data-v2-index-indexes.universal.ts","../../src/data-v2-index-indexes.http.ts","../../src/data-v2-index-indexes.context.ts"],"sourcesContent":["export * from './src/data-v2-index-indexes.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Index,\n IndexCreatedEnvelope,\n IndexDeletedEnvelope,\n IndexUpdatedEnvelope,\n ListAvailableIndexesResponse,\n ListIndexesOptions,\n ListIndexesResponse,\n createIndex as universalCreateIndex,\n dropIndex as universalDropIndex,\n listAvailableIndexes as universalListAvailableIndexes,\n listIndexes as universalListIndexes,\n} from './data-v2-index-indexes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/data' };\n\nexport function createIndex(httpClient: HttpClient): CreateIndexSignature {\n return (\n dataCollectionId: string,\n index: NonNullablePaths<\n Index,\n `fields` | `fields.${number}.path` | `name`,\n 4\n >\n ) =>\n universalCreateIndex(\n dataCollectionId,\n index,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateIndexSignature {\n /**\n * Creates an index for a data collection.\n *\n * The index can't be used immediately, as the process of generating the index takes time.\n * You can check whether an index is ready by calling List Indexes.\n *\n * Note that when an index fails to create, the failed index still occupies a slot.\n * To remove the failed index and free up the slot for a new index, call Drop Index.\n * @param - ID of the data collection for which to generate the index.\n * @param - Details of the index to be created.\n * @param - Options for creating an index.\n * @returns Details of the index being generated.\n */\n (\n dataCollectionId: string,\n index: NonNullablePaths<\n Index,\n `fields` | `fields.${number}.path` | `name`,\n 4\n >\n ): Promise<\n NonNullablePaths<\n Index,\n | `_id`\n | `name`\n | `fields`\n | `fields.${number}.path`\n | `fields.${number}.order`\n | `status`\n | `failure.code`\n | `failure.description`\n | `unique`\n | `caseInsensitive`\n | `source`,\n 4\n >\n >;\n}\n\nexport function dropIndex(httpClient: HttpClient): DropIndexSignature {\n return (dataCollectionId: string, indexName: string) =>\n universalDropIndex(\n dataCollectionId,\n indexName,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DropIndexSignature {\n /**\n * Removes an index from a data collection.\n *\n * The process of dropping an index from a collection takes time.\n * You can check whether an index has been dropped by calling List Indexes.\n * @param - ID of the data collection for which the index to be dropped is defined.\n * @param - Name of the index to drop.\n * @param - Options for dropping an index.\n */\n (dataCollectionId: string, indexName: string): Promise<void>;\n}\n\nexport function listIndexes(httpClient: HttpClient): ListIndexesSignature {\n return (dataCollectionId: string, options?: ListIndexesOptions) =>\n universalListIndexes(\n dataCollectionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListIndexesSignature {\n /**\n * Lists all indexes defined for a data collection.\n *\n * When an index's status is `ACTIVE`, it is ready to use.\n * While it is still being created, its status is `BUILDING`.\n *\n * When an index's status is `DROPPED`, it has been dropped successfully.\n * While it is still in the process of being removed, its status is `DROPPING`.\n * @param - ID of the data collection for which to list indexes.\n * @param - Options for retrieving a list of indexes.\n */\n (dataCollectionId: string, options?: ListIndexesOptions): Promise<\n NonNullablePaths<\n ListIndexesResponse,\n | `indexes`\n | `indexes.${number}._id`\n | `indexes.${number}.name`\n | `indexes.${number}.status`\n | `indexes.${number}.failure.code`\n | `indexes.${number}.failure.description`\n | `indexes.${number}.unique`\n | `indexes.${number}.caseInsensitive`\n | `indexes.${number}.source`,\n 5\n >\n >;\n}\n\n/** @internal */\nexport function listAvailableIndexes(\n httpClient: HttpClient\n): ListAvailableIndexesSignature {\n return (dataCollectionId: string) =>\n universalListAvailableIndexes(\n dataCollectionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListAvailableIndexesSignature {\n /**\n * Lists available indexes limits\n * @param - Data collection to show available indexes for\n */\n (dataCollectionId: string): Promise<\n NonNullablePaths<\n ListAvailableIndexesResponse,\n `regular1Field` | `regular3Field` | `unique1Field`,\n 2\n >\n >;\n}\n\nexport const onIndexCreated = EventDefinition(\n 'wix.data.v2.index_created',\n true,\n (event: IndexCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<IndexCreatedEnvelope>();\nexport const onIndexDeleted = EventDefinition(\n 'wix.data.v2.index_deleted',\n true,\n (event: IndexDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<IndexDeletedEnvelope>();\nexport const onIndexUpdated = EventDefinition(\n 'wix.data.v2.index_updated',\n true,\n (event: IndexUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<IndexUpdatedEnvelope>();\n\nexport {\n ActionEvent,\n BaseEventMetadata,\n CreateIndexRequest,\n CreateIndexResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n DropIndexRequest,\n DropIndexResponse,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n Environment,\n EventMetadata,\n Failure,\n Field,\n IdentificationData,\n IdentificationDataIdOneOf,\n Index,\n IndexCreatedEnvelope,\n IndexDeletedEnvelope,\n IndexSource,\n IndexUpdatedEnvelope,\n ListAvailableIndexesRequest,\n ListAvailableIndexesResponse,\n ListIndexesOptions,\n ListIndexesRequest,\n ListIndexesResponse,\n MessageEnvelope,\n Order,\n Paging,\n PagingMetadata,\n RestoreInfo,\n Status,\n WebhookIdentityType,\n} from './data-v2-index-indexes.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixDataV2Index from './data-v2-index-indexes.http.js';\n\n/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */\nexport interface Index {\n /**\n * ID of the index.\n * @readonly\n * @format GUID\n */\n _id?: string;\n /**\n * Name of the index.\n * @minLength 1\n * @maxLength 128\n */\n name?: string;\n /**\n * Fields for which the index is defined.\n *\n * Max: 3 fields (for a unique index: 1 field)\n * @minSize 1\n * @maxSize 3\n */\n fields?: Field[];\n /**\n * Current status of the index.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Contains details about the reasons for failure when `status` is `FAILED`.\n * @readonly\n */\n failure?: Failure;\n /**\n * Whether the index enforces uniqueness of values in the field for which it's defined.\n * If `true`, the index can have only 1 field.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * Whether the index ignores case.\n *\n * Default: `false`\n */\n caseInsensitive?: boolean;\n /**\n * Source of the index. See index sources in [Index Types](https://dev.wix.com/docs/api-reference/business-solutions/cms/indexes/index-types#index-sources).\n *\n * Default: `USER`\n */\n source?: IndexSourceWithLiterals;\n}\n\n/**\n * Order determines how values are ordered in the index. This is important when\n * ordering and/or range querying by indexed fields.\n */\nexport enum Order {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type OrderWithLiterals = Order | 'ASC' | 'DESC';\n\nexport interface Field {\n /**\n * Path of the field to index. For example: `title` or `options.price`.\n * @minLength 1\n * @maxLength 128\n */\n path?: string;\n /**\n * Sort order for the index. Base on how the data is regularly queried.\n *\n * Default: `ASC`\n */\n order?: OrderWithLiterals;\n}\n\nexport enum Status {\n /** Place holder. Never returned by the service. */\n UNKNOWN = 'UNKNOWN',\n /** Index creation is in progress. */\n BUILDING = 'BUILDING',\n /** Index has been successfully created and can be used in queries. */\n ACTIVE = 'ACTIVE',\n /** Index is in the process of being dropped. */\n DROPPING = 'DROPPING',\n /** Index has been dropped successfully. */\n DROPPED = 'DROPPED',\n /** Index creation has failed. */\n FAILED = 'FAILED',\n /** Index contains incorrectly indexed data. */\n INVALID = 'INVALID',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'BUILDING'\n | 'ACTIVE'\n | 'DROPPING'\n | 'DROPPED'\n | 'FAILED'\n | 'INVALID';\n\nexport interface Failure {\n /**\n * Error code.\n * - `WDE0112`: Unknown error while building collection index.\n * - `WDE0113`: Duplicate key error while building collection index.\n * - `WDE0114`: Document too large while building collection index.\n * @maxLength 7\n */\n code?: string;\n /**\n * Description of the failure.\n * @maxLength 1024\n */\n description?: string;\n /**\n * ID of the data item that caused the failure.\n * For example, if `unique` is `true`, the ID of an item containing a duplicate value.\n * @maxLength 16000\n */\n itemId?: string | null;\n}\n\nexport enum IndexSource {\n /** Place holder. Never returned by the service. */\n UNKNOWN_INDEX_SOURCE = 'UNKNOWN_INDEX_SOURCE',\n /**\n * Automatically created by Wix for all collections.\n *\n * System indexes are created for essential attributes, such as ID and creation date.\n * You can't delete them and they don't count towards the index limit.\n */\n SYSTEM = 'SYSTEM',\n /** Created by a Wix user via the API or in the dashboard. */\n USER = 'USER',\n /**\n * Created automatically by Wix based on a Wix user's queries.\n *\n * For large collections, Wix identifies slow-running queries and creates indexes automatically to improve performance.\n * These indexes don't count towards the index limit. They're created dynamically, and may be deleted if they no longer fit\n * the system's parameters. To keep an automatic index permanently, manually create an identical `USER` index.\n */\n AUTO = 'AUTO',\n}\n\n/** @enumType */\nexport type IndexSourceWithLiterals =\n | IndexSource\n | 'UNKNOWN_INDEX_SOURCE'\n | 'SYSTEM'\n | 'USER'\n | 'AUTO';\n\nexport interface CreateIndexRequest {\n /** Details of the index to be created. */\n index: Index;\n /**\n * ID of the data collection for which to generate the index.\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport enum Environment {\n /** Place holder. Never returned by the service. */\n UNKNOWN_ENVIRONMENT = 'UNKNOWN_ENVIRONMENT',\n /** Collection [sandbox environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#sandbox-collections). */\n SANDBOX = 'SANDBOX',\n /** If the [collection's sandbox environment is enabled](https://support.wix.com/en/article/cms-accessing-and-syncing-your-sandbox-and-live-collections#enabling-sandbox-collections), run the task in the collection's sandbox environment. If not, run the task in the collection's live environment. */\n SANDBOX_PREFERRED = 'SANDBOX_PREFERRED',\n /** Collection [live environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#live-collections). */\n LIVE = 'LIVE',\n}\n\n/** @enumType */\nexport type EnvironmentWithLiterals =\n | Environment\n | 'UNKNOWN_ENVIRONMENT'\n | 'SANDBOX'\n | 'SANDBOX_PREFERRED'\n | 'LIVE';\n\nexport interface CreateIndexResponse {\n /** Details of the index being generated. */\n index?: Index;\n}\n\nexport interface DropIndexRequest {\n /**\n * Name of the index to drop.\n * @minLength 1\n * @maxLength 128\n */\n indexName: string;\n /**\n * ID of the data collection for which the index to be dropped is defined.\n * @maxLength 1024\n */\n dataCollectionId: string;\n}\n\nexport interface DropIndexResponse {}\n\nexport interface ListIndexesRequest {\n /**\n * ID of the data collection for which to list indexes.\n * @maxLength 1024\n */\n dataCollectionId: string;\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListIndexesResponse {\n /** List of all indexes for the requested data collection. */\n indexes?: Index[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface ListAvailableIndexesRequest {\n /**\n * Data collection to show available indexes for\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport interface ListAvailableIndexesResponse {\n /**\n * limit of regular single-field indexes, even if 0 1-field indices may be created using\n * 3-field quota (if available)\n */\n regular1Field?: number;\n /** limit of regular indexes up to 3-fields (in addition to 1-field indexes quota) */\n regular3Field?: number;\n /** limit of unique indexes */\n unique1Field?: number;\n /** Overall index limit, missing value means there's no overall limit */\n total?: number | null;\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}\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 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}\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}\n\nexport interface IndexCreatedEnvelope {\n entity: Index;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index is created.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onIndexCreated(\n handler: (event: IndexCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface IndexDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index is dropped.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onIndexDeleted(\n handler: (event: IndexDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface IndexUpdatedEnvelope {\n entity: Index;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index's status field is updated.\n *\n * For example, during index creation, the index's status transitions from `BUILDING` to `ACTIVE` or `FAILED`. Either transition triggers this event.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onIndexUpdated(\n handler: (event: IndexUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates an index for a data collection.\n *\n * The index can't be used immediately, as the process of generating the index takes time.\n * You can check whether an index is ready by calling List Indexes.\n *\n * Note that when an index fails to create, the failed index still occupies a slot.\n * To remove the failed index and free up the slot for a new index, call Drop Index.\n * @param dataCollectionId - ID of the data collection for which to generate the index.\n * @param index - Details of the index to be created.\n * @public\n * @requiredField dataCollectionId\n * @requiredField index\n * @requiredField index.fields\n * @requiredField index.fields.path\n * @requiredField index.name\n * @param options - Options for creating an index.\n * @permissionId WIX_DATA.CREATE_INDEX\n * @applicableIdentity APP\n * @returns Details of the index being generated.\n * @fqn com.wixpress.cloud.data.api.index.IndexService.CreateIndex\n */\nexport async function createIndex(\n dataCollectionId: string,\n index: NonNullablePaths<Index, `fields` | `fields.${number}.path` | `name`, 4>\n): Promise<\n NonNullablePaths<\n Index,\n | `_id`\n | `name`\n | `fields`\n | `fields.${number}.path`\n | `fields.${number}.order`\n | `status`\n | `failure.code`\n | `failure.description`\n | `unique`\n | `caseInsensitive`\n | `source`,\n 4\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 dataCollectionId: dataCollectionId,\n index: index,\n });\n\n const reqOpts = ambassadorWixDataV2Index.createIndex(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.index!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { dataCollectionId: '$[0]', index: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'index']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Removes an index from a data collection.\n *\n * The process of dropping an index from a collection takes time.\n * You can check whether an index has been dropped by calling List Indexes.\n * @param dataCollectionId - ID of the data collection for which the index to be dropped is defined.\n * @param indexName - Name of the index to drop.\n * @public\n * @requiredField dataCollectionId\n * @requiredField indexName\n * @param options - Options for dropping an index.\n * @permissionId WIX_DATA.DROP_INDEX\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.DropIndex\n */\nexport async function dropIndex(\n dataCollectionId: string,\n indexName: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataCollectionId: dataCollectionId,\n indexName: indexName,\n });\n\n const reqOpts = ambassadorWixDataV2Index.dropIndex(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: {\n dataCollectionId: '$[0]',\n indexName: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'indexName']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists all indexes defined for a data collection.\n *\n * When an index's status is `ACTIVE`, it is ready to use.\n * While it is still being created, its status is `BUILDING`.\n *\n * When an index's status is `DROPPED`, it has been dropped successfully.\n * While it is still in the process of being removed, its status is `DROPPING`.\n * @param dataCollectionId - ID of the data collection for which to list indexes.\n * @public\n * @requiredField dataCollectionId\n * @param options - Options for retrieving a list of indexes.\n * @permissionId WIX_DATA.LIST_INDEXES\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.ListIndexes\n */\nexport async function listIndexes(\n dataCollectionId: string,\n options?: ListIndexesOptions\n): Promise<\n NonNullablePaths<\n ListIndexesResponse,\n | `indexes`\n | `indexes.${number}._id`\n | `indexes.${number}.name`\n | `indexes.${number}.status`\n | `indexes.${number}.failure.code`\n | `indexes.${number}.failure.description`\n | `indexes.${number}.unique`\n | `indexes.${number}.caseInsensitive`\n | `indexes.${number}.source`,\n 5\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 dataCollectionId: dataCollectionId,\n paging: options?.paging,\n });\n\n const reqOpts = ambassadorWixDataV2Index.listIndexes(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 dataCollectionId: '$[0]',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListIndexesOptions {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n}\n\n/**\n * Lists available indexes limits\n * @param dataCollectionId - Data collection to show available indexes for\n * @internal\n * @documentationMaturity preview\n * @requiredField dataCollectionId\n * @permissionId WIX_DATA.LIST_INDEXES\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.ListAvailableIndexes\n */\nexport async function listAvailableIndexes(\n dataCollectionId: string\n): Promise<\n NonNullablePaths<\n ListAvailableIndexesResponse,\n `regular1Field` | `regular3Field` | `unique1Field`,\n 2\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 dataCollectionId: dataCollectionId,\n });\n\n const reqOpts = ambassadorWixDataV2Index.listAvailableIndexes(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: { dataCollectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressCloudDataApiIndexIndexServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/cloud-data',\n destPath: '',\n },\n ],\n 'code._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n ],\n 'cloud-data.wix-code.com': [\n {\n srcPath: '',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-data/v1/collections',\n destPath: '/v1/wix-data/collections',\n },\n {\n srcPath: '/wix-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/wix-data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n {\n srcPath: '/wix-data/v1/external-databases',\n destPath: '/v1/external-databases',\n },\n {\n srcPath: '/wix-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/data/v2/bulk/items',\n destPath: '/v2/bulk/items',\n },\n {\n srcPath: '/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_data_indexes';\n\n/**\n * Creates an index for a data collection.\n *\n * The index can't be used immediately, as the process of generating the index takes time.\n * You can check whether an index is ready by calling List Indexes.\n *\n * Note that when an index fails to create, the failed index still occupies a slot.\n * To remove the failed index and free up the slot for a new index, call Drop Index.\n */\nexport function createIndex(payload: object): RequestOptionsFactory<any> {\n function __createIndex({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.CreateIndex',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __createIndex;\n}\n\n/**\n * Removes an index from a data collection.\n *\n * The process of dropping an index from a collection takes time.\n * You can check whether an index has been dropped by calling List Indexes.\n */\nexport function dropIndex(payload: object): RequestOptionsFactory<any> {\n function __dropIndex({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'DELETE' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.DropIndex',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __dropIndex;\n}\n\n/**\n * Lists all indexes defined for a data collection.\n *\n * When an index's status is `ACTIVE`, it is ready to use.\n * While it is still being created, its status is `BUILDING`.\n *\n * When an index's status is `DROPPED`, it has been dropped successfully.\n * While it is still in the process of being removed, its status is `DROPPING`.\n */\nexport function listIndexes(payload: object): RequestOptionsFactory<any> {\n function __listIndexes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.ListIndexes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listIndexes;\n}\n\n/** Lists available indexes limits */\nexport function listAvailableIndexes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAvailableIndexes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.index.IndexService.ListAvailableIndexes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes/available',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAvailableIndexes;\n}\n","import {\n createIndex as publicCreateIndex,\n dropIndex as publicDropIndex,\n listIndexes as publicListIndexes,\n listAvailableIndexes as publicListAvailableIndexes,\n} from './data-v2-index-indexes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onIndexCreated as publicOnIndexCreated } from './data-v2-index-indexes.public.js';\nimport { onIndexDeleted as publicOnIndexDeleted } from './data-v2-index-indexes.public.js';\nimport { onIndexUpdated as publicOnIndexUpdated } from './data-v2-index-indexes.public.js';\n\nexport const createIndex: MaybeContext<\n BuildRESTFunction<typeof publicCreateIndex> & typeof publicCreateIndex\n> = /*#__PURE__*/ createRESTModule(publicCreateIndex);\nexport const dropIndex: MaybeContext<\n BuildRESTFunction<typeof publicDropIndex> & typeof publicDropIndex\n> = /*#__PURE__*/ createRESTModule(publicDropIndex);\nexport const listIndexes: MaybeContext<\n BuildRESTFunction<typeof publicListIndexes> & typeof publicListIndexes\n> = /*#__PURE__*/ createRESTModule(publicListIndexes);\n/** @internal */\nexport const listAvailableIndexes: MaybeContext<\n BuildRESTFunction<typeof publicListAvailableIndexes> &\n typeof publicListAvailableIndexes\n> = /*#__PURE__*/ createRESTModule(publicListAvailableIndexes);\n/**\n * Triggered when an index is created.\n */\nexport const onIndexCreated: BuildEventDefinition<typeof publicOnIndexCreated> &\n typeof publicOnIndexCreated = createEventModule(publicOnIndexCreated);\n/**\n * Triggered when an index is dropped.\n */\nexport const onIndexDeleted: BuildEventDefinition<typeof publicOnIndexDeleted> &\n typeof publicOnIndexDeleted = createEventModule(publicOnIndexDeleted);\n/**\n * Triggered when an index's status field is updated.\n *\n * For example, during index creation, the index's status transitions from `BUILDING` to `ACTIVE` or `FAILED`. Either transition triggers this event.\n */\nexport const onIndexUpdated: BuildEventDefinition<typeof publicOnIndexUpdated> &\n typeof publicOnIndexUpdated = createEventModule(publicOnIndexUpdated);\n\nexport {\n Order,\n Status,\n IndexSource,\n Environment,\n WebhookIdentityType,\n} from './data-v2-index-indexes.universal.js';\nexport {\n Index,\n Field,\n Failure,\n CreateIndexRequest,\n CreateIndexResponse,\n DropIndexRequest,\n DropIndexResponse,\n ListIndexesRequest,\n Paging,\n ListIndexesResponse,\n PagingMetadata,\n ListAvailableIndexesRequest,\n ListAvailableIndexesResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n BaseEventMetadata,\n EventMetadata,\n IndexCreatedEnvelope,\n IndexDeletedEnvelope,\n IndexUpdatedEnvelope,\n ListIndexesOptions,\n} from './data-v2-index-indexes.universal.js';\nexport {\n OrderWithLiterals,\n StatusWithLiterals,\n IndexSourceWithLiterals,\n EnvironmentWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './data-v2-index-indexes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA,iBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAAqD;AACrD,6BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,mDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;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,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,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,I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AAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAwB;AACjB,IAAM,qBAAiB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,uCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAwB;AACjB,IAAM,qBAAiB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA,CAAC,cACC;AAAA,QACE,uCAAe,OAAO;AAAA,MACpB;AAAA,QACE,aAAa;AAAA,QACb,OAAO,CAAC,EAAE,MAAM,qBAAqB,CAAC;AAAA,MACxC;AAAA,IACF,CAAC;AAAA,EACH;AACJ,EAAwB;;;AGrMxB,IAAAC,uBAAiC;AACjC,sCAAkC;AAU3B,IAAMC,eAEK,2DAAiBA,YAAiB;AAC7C,IAAMC,aAEK,2DAAiBA,UAAe;AAC3C,IAAMC,eAEK,2DAAiBA,YAAiB;AAE7C,IAAMC,wBAGK,2DAAiBA,qBAA0B;AAItD,IAAMC,sBACmB,mDAAkB,cAAoB;AAI/D,IAAMC,sBACmB,mDAAkB,cAAoB;AAM/D,IAAMC,sBACmB,mDAAkB,cAAoB;","names":["createIndex","dropIndex","listAvailableIndexes","listIndexes","onIndexCreated","onIndexDeleted","onIndexUpdated","import_rename_all_nested_keys","import_rest_modules","Order","Status","IndexSource","Environment","WebhookIdentityType","createIndex","sdkTransformError","dropIndex","listIndexes","listAvailableIndexes","createIndex","dropIndex","listIndexes","listAvailableIndexes","import_rest_modules","createIndex","dropIndex","listIndexes","listAvailableIndexes","onIndexCreated","onIndexDeleted","onIndexUpdated"]}
|
|
1
|
+
{"version":3,"sources":["../../index.ts","../../src/data-v2-index-indexes.public.ts","../../src/data-v2-index-indexes.universal.ts","../../src/data-v2-index-indexes.http.ts","../../src/data-v2-index-indexes.context.ts"],"sourcesContent":["export * from './src/data-v2-index-indexes.context.js';\n","import { renameKeysFromRESTResponseToSDKResponse } from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { transformRESTTimestampToSDKTimestamp } from '@wix/sdk-runtime/transformations/timestamp';\nimport { transformPaths } from '@wix/sdk-runtime/transformations/transform-paths';\nimport { EventDefinition, HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport {\n Index,\n IndexCreatedEnvelope,\n IndexDeletedEnvelope,\n IndexUpdatedEnvelope,\n ListAvailableIndexesResponse,\n ListIndexesOptions,\n ListIndexesResponse,\n createIndex as universalCreateIndex,\n dropIndex as universalDropIndex,\n listAvailableIndexes as universalListAvailableIndexes,\n listIndexes as universalListIndexes,\n} from './data-v2-index-indexes.universal.js';\n\nexport const __metadata = { PACKAGE_NAME: '@wix/data' };\n\nexport function createIndex(httpClient: HttpClient): CreateIndexSignature {\n return (\n dataCollectionId: string,\n index: NonNullablePaths<\n Index,\n `fields` | `fields.${number}.path` | `name`,\n 4\n >\n ) =>\n universalCreateIndex(\n dataCollectionId,\n index,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface CreateIndexSignature {\n /**\n * Creates an index for a data collection.\n *\n * The index can't be used immediately, as the process of generating the index takes time.\n * You can check whether an index is ready by calling List Indexes.\n *\n * Note that when an index fails to create, the failed index still occupies a slot.\n * To remove the failed index and free up the slot for a new index, call Drop Index.\n * @param - ID of the data collection for which to generate the index.\n * @param - Details of the index to be created.\n * @param - Options for creating an index.\n * @returns Details of the index being generated.\n */\n (\n dataCollectionId: string,\n index: NonNullablePaths<\n Index,\n `fields` | `fields.${number}.path` | `name`,\n 4\n >\n ): Promise<\n NonNullablePaths<\n Index,\n | `_id`\n | `name`\n | `fields`\n | `fields.${number}.path`\n | `fields.${number}.order`\n | `status`\n | `failure.code`\n | `failure.description`\n | `unique`\n | `caseInsensitive`\n | `source`,\n 4\n >\n >;\n}\n\nexport function dropIndex(httpClient: HttpClient): DropIndexSignature {\n return (dataCollectionId: string, indexName: string) =>\n universalDropIndex(\n dataCollectionId,\n indexName,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface DropIndexSignature {\n /**\n * Removes an index from a data collection.\n *\n * The process of dropping an index from a collection takes time.\n * You can check whether an index has been dropped by calling List Indexes.\n * @param - ID of the data collection for which the index to be dropped is defined.\n * @param - Name of the index to drop.\n * @param - Options for dropping an index.\n */\n (dataCollectionId: string, indexName: string): Promise<void>;\n}\n\nexport function listIndexes(httpClient: HttpClient): ListIndexesSignature {\n return (dataCollectionId: string, options?: ListIndexesOptions) =>\n universalListIndexes(\n dataCollectionId,\n options,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListIndexesSignature {\n /**\n * Lists all indexes defined for a data collection.\n *\n * When an index's status is `ACTIVE`, it is ready to use.\n * While it is still being created, its status is `BUILDING`.\n *\n * When an index's status is `DROPPED`, it has been dropped successfully.\n * While it is still in the process of being removed, its status is `DROPPING`.\n * @param - ID of the data collection for which to list indexes.\n * @param - Options for retrieving a list of indexes.\n */\n (dataCollectionId: string, options?: ListIndexesOptions): Promise<\n NonNullablePaths<\n ListIndexesResponse,\n | `indexes`\n | `indexes.${number}._id`\n | `indexes.${number}.name`\n | `indexes.${number}.status`\n | `indexes.${number}.failure.code`\n | `indexes.${number}.failure.description`\n | `indexes.${number}.unique`\n | `indexes.${number}.caseInsensitive`\n | `indexes.${number}.source`,\n 5\n >\n >;\n}\n\n/** @internal */\nexport function listAvailableIndexes(\n httpClient: HttpClient\n): ListAvailableIndexesSignature {\n return (dataCollectionId: string) =>\n universalListAvailableIndexes(\n dataCollectionId,\n // @ts-ignore\n { httpClient }\n );\n}\n\ninterface ListAvailableIndexesSignature {\n /**\n * Lists available indexes limits\n * @param - Data collection to show available indexes for\n */\n (dataCollectionId: string): Promise<\n NonNullablePaths<\n ListAvailableIndexesResponse,\n `regular1Field` | `regular3Field` | `unique1Field`,\n 2\n >\n >;\n}\n\nexport const onIndexCreated = EventDefinition(\n 'wix.data.v2.index_created',\n true,\n (event: IndexCreatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<IndexCreatedEnvelope>();\nexport const onIndexDeleted = EventDefinition(\n 'wix.data.v2.index_deleted',\n true,\n (event: IndexDeletedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<IndexDeletedEnvelope>();\nexport const onIndexUpdated = EventDefinition(\n 'wix.data.v2.index_updated',\n true,\n (event: IndexUpdatedEnvelope) =>\n renameKeysFromRESTResponseToSDKResponse(\n transformPaths(event, [\n {\n transformFn: transformRESTTimestampToSDKTimestamp,\n paths: [{ path: 'metadata.eventTime' }],\n },\n ])\n )\n)<IndexUpdatedEnvelope>();\n\nexport {\n AccountDetails,\n ActionEvent,\n BaseEventMetadata,\n CreateIndexRequest,\n CreateIndexResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n DropIndexRequest,\n DropIndexResponse,\n EntityCreatedEvent,\n EntityDeletedEvent,\n EntityUpdatedEvent,\n Environment,\n EventMetadata,\n Failure,\n Field,\n IdentificationData,\n IdentificationDataIdOneOf,\n Index,\n IndexCreatedEnvelope,\n IndexDeletedEnvelope,\n IndexSource,\n IndexUpdatedEnvelope,\n ListAvailableIndexesRequest,\n ListAvailableIndexesResponse,\n ListIndexesOptions,\n ListIndexesRequest,\n ListIndexesResponse,\n MessageEnvelope,\n Order,\n Paging,\n PagingMetadata,\n RestoreInfo,\n Status,\n WebhookIdentityType,\n} from './data-v2-index-indexes.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixDataV2Index from './data-v2-index-indexes.http.js';\n\n/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */\nexport interface Index {\n /**\n * ID of the index.\n * @readonly\n * @format GUID\n */\n _id?: string;\n /**\n * Name of the index.\n * @minLength 1\n * @maxLength 128\n */\n name?: string;\n /**\n * Fields for which the index is defined.\n *\n * Max: 3 fields (for a unique index: 1 field)\n * @minSize 1\n * @maxSize 3\n */\n fields?: Field[];\n /**\n * Current status of the index.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Contains details about the reasons for failure when `status` is `FAILED`.\n * @readonly\n */\n failure?: Failure;\n /**\n * Whether the index enforces uniqueness of values in the field for which it's defined.\n * If `true`, the index can have only 1 field.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * Whether the index ignores case.\n *\n * Default: `false`\n */\n caseInsensitive?: boolean;\n /**\n * Source of the index. See index sources in [Index Types](https://dev.wix.com/docs/api-reference/business-solutions/cms/indexes/index-types#index-sources).\n *\n * Default: `USER`\n */\n source?: IndexSourceWithLiterals;\n}\n\n/**\n * Order determines how values are ordered in the index. This is important when\n * ordering and/or range querying by indexed fields.\n */\nexport enum Order {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type OrderWithLiterals = Order | 'ASC' | 'DESC';\n\nexport interface Field {\n /**\n * Path of the field to index. For example: `title` or `options.price`.\n * @minLength 1\n * @maxLength 128\n */\n path?: string;\n /**\n * Sort order for the index. Base on how the data is regularly queried.\n *\n * Default: `ASC`\n */\n order?: OrderWithLiterals;\n}\n\nexport enum Status {\n /** Place holder. Never returned by the service. */\n UNKNOWN = 'UNKNOWN',\n /** Index creation is in progress. */\n BUILDING = 'BUILDING',\n /** Index has been successfully created and can be used in queries. */\n ACTIVE = 'ACTIVE',\n /** Index is in the process of being dropped. */\n DROPPING = 'DROPPING',\n /** Index has been dropped successfully. */\n DROPPED = 'DROPPED',\n /** Index creation has failed. */\n FAILED = 'FAILED',\n /** Index contains incorrectly indexed data. */\n INVALID = 'INVALID',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'BUILDING'\n | 'ACTIVE'\n | 'DROPPING'\n | 'DROPPED'\n | 'FAILED'\n | 'INVALID';\n\nexport interface Failure {\n /**\n * Error code.\n * - `WDE0112`: Unknown error while building collection index.\n * - `WDE0113`: Duplicate key error while building collection index.\n * - `WDE0114`: Document too large while building collection index.\n * @maxLength 7\n */\n code?: string;\n /**\n * Description of the failure.\n * @maxLength 1024\n */\n description?: string;\n /**\n * ID of the data item that caused the failure.\n * For example, if `unique` is `true`, the ID of an item containing a duplicate value.\n * @maxLength 16000\n */\n itemId?: string | null;\n}\n\nexport enum IndexSource {\n /** Place holder. Never returned by the service. */\n UNKNOWN_INDEX_SOURCE = 'UNKNOWN_INDEX_SOURCE',\n /**\n * Automatically created by Wix for all collections.\n *\n * System indexes are created for essential attributes, such as ID and creation date.\n * You can't delete them and they don't count towards the index limit.\n */\n SYSTEM = 'SYSTEM',\n /** Created by a Wix user via the API or in the dashboard. */\n USER = 'USER',\n /**\n * Created automatically by Wix based on a Wix user's queries.\n *\n * For large collections, Wix identifies slow-running queries and creates indexes automatically to improve performance.\n * These indexes don't count towards the index limit. They're created dynamically, and may be deleted if they no longer fit\n * the system's parameters. To keep an automatic index permanently, manually create an identical `USER` index.\n */\n AUTO = 'AUTO',\n}\n\n/** @enumType */\nexport type IndexSourceWithLiterals =\n | IndexSource\n | 'UNKNOWN_INDEX_SOURCE'\n | 'SYSTEM'\n | 'USER'\n | 'AUTO';\n\nexport interface CreateIndexRequest {\n /** Details of the index to be created. */\n index: Index;\n /**\n * ID of the data collection for which to generate the index.\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport enum Environment {\n /** Place holder. Never returned by the service. */\n UNKNOWN_ENVIRONMENT = 'UNKNOWN_ENVIRONMENT',\n /** Collection [sandbox environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#sandbox-collections). */\n SANDBOX = 'SANDBOX',\n /** If the [collection's sandbox environment is enabled](https://support.wix.com/en/article/cms-accessing-and-syncing-your-sandbox-and-live-collections#enabling-sandbox-collections), run the task in the collection's sandbox environment. If not, run the task in the collection's live environment. */\n SANDBOX_PREFERRED = 'SANDBOX_PREFERRED',\n /** Collection [live environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#live-collections). */\n LIVE = 'LIVE',\n}\n\n/** @enumType */\nexport type EnvironmentWithLiterals =\n | Environment\n | 'UNKNOWN_ENVIRONMENT'\n | 'SANDBOX'\n | 'SANDBOX_PREFERRED'\n | 'LIVE';\n\nexport interface CreateIndexResponse {\n /** Details of the index being generated. */\n index?: Index;\n}\n\nexport interface DropIndexRequest {\n /**\n * Name of the index to drop.\n * @minLength 1\n * @maxLength 128\n */\n indexName: string;\n /**\n * ID of the data collection for which the index to be dropped is defined.\n * @maxLength 1024\n */\n dataCollectionId: string;\n}\n\nexport interface DropIndexResponse {}\n\nexport interface ListIndexesRequest {\n /**\n * ID of the data collection for which to list indexes.\n * @maxLength 1024\n */\n dataCollectionId: string;\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListIndexesResponse {\n /** List of all indexes for the requested data collection. */\n indexes?: Index[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface ListAvailableIndexesRequest {\n /**\n * Data collection to show available indexes for\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport interface ListAvailableIndexesResponse {\n /**\n * limit of regular single-field indexes, even if 0 1-field indices may be created using\n * 3-field quota (if available)\n */\n regular1Field?: number;\n /** limit of regular indexes up to 3-fields (in addition to 1-field indexes quota) */\n regular3Field?: number;\n /** limit of unique indexes */\n unique1Field?: number;\n /** Overall index limit, missing value means there's no overall limit */\n total?: number | null;\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}\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 AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\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}\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}\n\nexport interface IndexCreatedEnvelope {\n entity: Index;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index is created.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onIndexCreated(\n handler: (event: IndexCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface IndexDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index is dropped.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onIndexDeleted(\n handler: (event: IndexDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface IndexUpdatedEnvelope {\n entity: Index;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index's status field is updated.\n *\n * For example, during index creation, the index's status transitions from `BUILDING` to `ACTIVE` or `FAILED`. Either transition triggers this event.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onIndexUpdated(\n handler: (event: IndexUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates an index for a data collection.\n *\n * The index can't be used immediately, as the process of generating the index takes time.\n * You can check whether an index is ready by calling List Indexes.\n *\n * Note that when an index fails to create, the failed index still occupies a slot.\n * To remove the failed index and free up the slot for a new index, call Drop Index.\n * @param dataCollectionId - ID of the data collection for which to generate the index.\n * @param index - Details of the index to be created.\n * @public\n * @requiredField dataCollectionId\n * @requiredField index\n * @requiredField index.fields\n * @requiredField index.fields.path\n * @requiredField index.name\n * @param options - Options for creating an index.\n * @permissionId WIX_DATA.CREATE_INDEX\n * @applicableIdentity APP\n * @returns Details of the index being generated.\n * @fqn com.wixpress.cloud.data.api.index.IndexService.CreateIndex\n */\nexport async function createIndex(\n dataCollectionId: string,\n index: NonNullablePaths<Index, `fields` | `fields.${number}.path` | `name`, 4>\n): Promise<\n NonNullablePaths<\n Index,\n | `_id`\n | `name`\n | `fields`\n | `fields.${number}.path`\n | `fields.${number}.order`\n | `status`\n | `failure.code`\n | `failure.description`\n | `unique`\n | `caseInsensitive`\n | `source`,\n 4\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 dataCollectionId: dataCollectionId,\n index: index,\n });\n\n const reqOpts = ambassadorWixDataV2Index.createIndex(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.index!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { dataCollectionId: '$[0]', index: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'index']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Removes an index from a data collection.\n *\n * The process of dropping an index from a collection takes time.\n * You can check whether an index has been dropped by calling List Indexes.\n * @param dataCollectionId - ID of the data collection for which the index to be dropped is defined.\n * @param indexName - Name of the index to drop.\n * @public\n * @requiredField dataCollectionId\n * @requiredField indexName\n * @param options - Options for dropping an index.\n * @permissionId WIX_DATA.DROP_INDEX\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.DropIndex\n */\nexport async function dropIndex(\n dataCollectionId: string,\n indexName: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataCollectionId: dataCollectionId,\n indexName: indexName,\n });\n\n const reqOpts = ambassadorWixDataV2Index.dropIndex(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: {\n dataCollectionId: '$[0]',\n indexName: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'indexName']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists all indexes defined for a data collection.\n *\n * When an index's status is `ACTIVE`, it is ready to use.\n * While it is still being created, its status is `BUILDING`.\n *\n * When an index's status is `DROPPED`, it has been dropped successfully.\n * While it is still in the process of being removed, its status is `DROPPING`.\n * @param dataCollectionId - ID of the data collection for which to list indexes.\n * @public\n * @requiredField dataCollectionId\n * @param options - Options for retrieving a list of indexes.\n * @permissionId WIX_DATA.LIST_INDEXES\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.ListIndexes\n */\nexport async function listIndexes(\n dataCollectionId: string,\n options?: ListIndexesOptions\n): Promise<\n NonNullablePaths<\n ListIndexesResponse,\n | `indexes`\n | `indexes.${number}._id`\n | `indexes.${number}.name`\n | `indexes.${number}.status`\n | `indexes.${number}.failure.code`\n | `indexes.${number}.failure.description`\n | `indexes.${number}.unique`\n | `indexes.${number}.caseInsensitive`\n | `indexes.${number}.source`,\n 5\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 dataCollectionId: dataCollectionId,\n paging: options?.paging,\n });\n\n const reqOpts = ambassadorWixDataV2Index.listIndexes(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 dataCollectionId: '$[0]',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListIndexesOptions {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n}\n\n/**\n * Lists available indexes limits\n * @param dataCollectionId - Data collection to show available indexes for\n * @internal\n * @documentationMaturity preview\n * @requiredField dataCollectionId\n * @permissionId WIX_DATA.LIST_INDEXES\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.ListAvailableIndexes\n */\nexport async function listAvailableIndexes(\n dataCollectionId: string\n): Promise<\n NonNullablePaths<\n ListAvailableIndexesResponse,\n `regular1Field` | `regular3Field` | `unique1Field`,\n 2\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 dataCollectionId: dataCollectionId,\n });\n\n const reqOpts = ambassadorWixDataV2Index.listAvailableIndexes(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: { dataCollectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressCloudDataApiIndexIndexServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/cloud-data',\n destPath: '',\n },\n ],\n 'code._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n ],\n 'cloud-data.wix-code.com': [\n {\n srcPath: '',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-data/v1/collections',\n destPath: '/v1/wix-data/collections',\n },\n {\n srcPath: '/wix-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/wix-data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n {\n srcPath: '/wix-data/v1/external-databases',\n destPath: '/v1/external-databases',\n },\n {\n srcPath: '/wix-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/data/v2/bulk/items',\n destPath: '/v2/bulk/items',\n },\n {\n srcPath: '/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_data_indexes';\n\n/**\n * Creates an index for a data collection.\n *\n * The index can't be used immediately, as the process of generating the index takes time.\n * You can check whether an index is ready by calling List Indexes.\n *\n * Note that when an index fails to create, the failed index still occupies a slot.\n * To remove the failed index and free up the slot for a new index, call Drop Index.\n */\nexport function createIndex(payload: object): RequestOptionsFactory<any> {\n function __createIndex({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.CreateIndex',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __createIndex;\n}\n\n/**\n * Removes an index from a data collection.\n *\n * The process of dropping an index from a collection takes time.\n * You can check whether an index has been dropped by calling List Indexes.\n */\nexport function dropIndex(payload: object): RequestOptionsFactory<any> {\n function __dropIndex({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'DELETE' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.DropIndex',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __dropIndex;\n}\n\n/**\n * Lists all indexes defined for a data collection.\n *\n * When an index's status is `ACTIVE`, it is ready to use.\n * While it is still being created, its status is `BUILDING`.\n *\n * When an index's status is `DROPPED`, it has been dropped successfully.\n * While it is still in the process of being removed, its status is `DROPPING`.\n */\nexport function listIndexes(payload: object): RequestOptionsFactory<any> {\n function __listIndexes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.ListIndexes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listIndexes;\n}\n\n/** Lists available indexes limits */\nexport function listAvailableIndexes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAvailableIndexes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.index.IndexService.ListAvailableIndexes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes/available',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAvailableIndexes;\n}\n","import {\n createIndex as publicCreateIndex,\n dropIndex as publicDropIndex,\n listIndexes as publicListIndexes,\n listAvailableIndexes as publicListAvailableIndexes,\n} from './data-v2-index-indexes.public.js';\nimport { createRESTModule } from '@wix/sdk-runtime/rest-modules';\nimport { createEventModule } from '@wix/sdk-runtime/event-definition-modules';\nimport {\n BuildRESTFunction,\n MaybeContext,\n BuildEventDefinition,\n} from '@wix/sdk-types';\nimport { onIndexCreated as publicOnIndexCreated } from './data-v2-index-indexes.public.js';\nimport { onIndexDeleted as publicOnIndexDeleted } from './data-v2-index-indexes.public.js';\nimport { onIndexUpdated as publicOnIndexUpdated } from './data-v2-index-indexes.public.js';\n\nexport const createIndex: MaybeContext<\n BuildRESTFunction<typeof publicCreateIndex> & typeof publicCreateIndex\n> = /*#__PURE__*/ createRESTModule(publicCreateIndex);\nexport const dropIndex: MaybeContext<\n BuildRESTFunction<typeof publicDropIndex> & typeof publicDropIndex\n> = /*#__PURE__*/ createRESTModule(publicDropIndex);\nexport const listIndexes: MaybeContext<\n BuildRESTFunction<typeof publicListIndexes> & typeof publicListIndexes\n> = /*#__PURE__*/ createRESTModule(publicListIndexes);\n/** @internal */\nexport const listAvailableIndexes: MaybeContext<\n BuildRESTFunction<typeof publicListAvailableIndexes> &\n typeof publicListAvailableIndexes\n> = /*#__PURE__*/ createRESTModule(publicListAvailableIndexes);\n/**\n * Triggered when an index is created.\n */\nexport const onIndexCreated: BuildEventDefinition<typeof publicOnIndexCreated> &\n typeof publicOnIndexCreated = createEventModule(publicOnIndexCreated);\n/**\n * Triggered when an index is dropped.\n */\nexport const onIndexDeleted: BuildEventDefinition<typeof publicOnIndexDeleted> &\n typeof publicOnIndexDeleted = createEventModule(publicOnIndexDeleted);\n/**\n * Triggered when an index's status field is updated.\n *\n * For example, during index creation, the index's status transitions from `BUILDING` to `ACTIVE` or `FAILED`. Either transition triggers this event.\n */\nexport const onIndexUpdated: BuildEventDefinition<typeof publicOnIndexUpdated> &\n typeof publicOnIndexUpdated = createEventModule(publicOnIndexUpdated);\n\nexport {\n Order,\n Status,\n IndexSource,\n Environment,\n WebhookIdentityType,\n} from './data-v2-index-indexes.universal.js';\nexport {\n Index,\n Field,\n Failure,\n CreateIndexRequest,\n CreateIndexResponse,\n DropIndexRequest,\n DropIndexResponse,\n ListIndexesRequest,\n Paging,\n ListIndexesResponse,\n PagingMetadata,\n ListAvailableIndexesRequest,\n ListAvailableIndexesResponse,\n DomainEvent,\n DomainEventBodyOneOf,\n EntityCreatedEvent,\n RestoreInfo,\n EntityUpdatedEvent,\n EntityDeletedEvent,\n ActionEvent,\n MessageEnvelope,\n IdentificationData,\n IdentificationDataIdOneOf,\n AccountDetails,\n BaseEventMetadata,\n EventMetadata,\n IndexCreatedEnvelope,\n IndexDeletedEnvelope,\n IndexUpdatedEnvelope,\n ListIndexesOptions,\n} from './data-v2-index-indexes.universal.js';\nexport {\n OrderWithLiterals,\n StatusWithLiterals,\n IndexSourceWithLiterals,\n EnvironmentWithLiterals,\n WebhookIdentityTypeWithLiterals,\n} from './data-v2-index-indexes.universal.js';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA,iBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,mBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA,EAAA,sBAAAC;AAAA;AAAA;;;ACAA,IAAAC,iCAAwD;AACxD,uBAAqD;AACrD,6BAA+B;AAC/B,uBAA8D;;;ACH9D,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,mDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA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K,2DAAiBA,UAAe;AAC3C,IAAMC,eAEK,2DAAiBA,YAAiB;AAE7C,IAAMC,wBAGK,2DAAiBA,qBAA0B;AAItD,IAAMC,sBACmB,mDAAkB,cAAoB;AAI/D,IAAMC,sBACmB,mDAAkB,cAAoB;AAM/D,IAAMC,sBACmB,mDAAkB,cAAoB;","names":["createIndex","dropIndex","listAvailableIndexes","listIndexes","onIndexCreated","onIndexDeleted","onIndexUpdated","import_rename_all_nested_keys","import_rest_modules","Order","Status","IndexSource","Environment","WebhookIdentityType","createIndex","sdkTransformError","dropIndex","listIndexes","listAvailableIndexes","createIndex","dropIndex","listIndexes","listAvailableIndexes","import_rest_modules","createIndex","dropIndex","listIndexes","listAvailableIndexes","onIndexCreated","onIndexDeleted","onIndexUpdated"]}
|
|
@@ -363,6 +363,23 @@ declare enum WebhookIdentityType {
|
|
|
363
363
|
}
|
|
364
364
|
/** @enumType */
|
|
365
365
|
type WebhookIdentityTypeWithLiterals = WebhookIdentityType | 'UNKNOWN' | 'ANONYMOUS_VISITOR' | 'MEMBER' | 'WIX_USER' | 'APP';
|
|
366
|
+
interface AccountDetails {
|
|
367
|
+
/**
|
|
368
|
+
* ID of the account.
|
|
369
|
+
* @format GUID
|
|
370
|
+
*/
|
|
371
|
+
accountId?: string | null;
|
|
372
|
+
/**
|
|
373
|
+
* ID of the parent account.
|
|
374
|
+
* @format GUID
|
|
375
|
+
*/
|
|
376
|
+
parentAccountId?: string | null;
|
|
377
|
+
/**
|
|
378
|
+
* ID of the site, if applicable.
|
|
379
|
+
* @format GUID
|
|
380
|
+
*/
|
|
381
|
+
siteId?: string | null;
|
|
382
|
+
}
|
|
366
383
|
interface BaseEventMetadata {
|
|
367
384
|
/**
|
|
368
385
|
* App instance ID.
|
|
@@ -514,4 +531,4 @@ interface ListIndexesOptions {
|
|
|
514
531
|
paging?: Paging;
|
|
515
532
|
}
|
|
516
533
|
|
|
517
|
-
export { type ActionEvent, type BaseEventMetadata, type CreateIndexRequest, type CreateIndexResponse, type DomainEvent, type DomainEventBodyOneOf, type DropIndexRequest, type DropIndexResponse, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Environment, type EnvironmentWithLiterals, type EventMetadata, type Failure, type Field, type IdentificationData, type IdentificationDataIdOneOf, type Index, type IndexCreatedEnvelope, type IndexDeletedEnvelope, IndexSource, type IndexSourceWithLiterals, type IndexUpdatedEnvelope, type ListAvailableIndexesRequest, type ListAvailableIndexesResponse, type ListIndexesOptions, type ListIndexesRequest, type ListIndexesResponse, type MessageEnvelope, Order, type OrderWithLiterals, type Paging, type PagingMetadata, type RestoreInfo, Status, type StatusWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createIndex, dropIndex, listIndexes, onIndexCreated, onIndexDeleted, onIndexUpdated };
|
|
534
|
+
export { type AccountDetails, type ActionEvent, type BaseEventMetadata, type CreateIndexRequest, type CreateIndexResponse, type DomainEvent, type DomainEventBodyOneOf, type DropIndexRequest, type DropIndexResponse, type EntityCreatedEvent, type EntityDeletedEvent, type EntityUpdatedEvent, Environment, type EnvironmentWithLiterals, type EventMetadata, type Failure, type Field, type IdentificationData, type IdentificationDataIdOneOf, type Index, type IndexCreatedEnvelope, type IndexDeletedEnvelope, IndexSource, type IndexSourceWithLiterals, type IndexUpdatedEnvelope, type ListAvailableIndexesRequest, type ListAvailableIndexesResponse, type ListIndexesOptions, type ListIndexesRequest, type ListIndexesResponse, type MessageEnvelope, Order, type OrderWithLiterals, type Paging, type PagingMetadata, type RestoreInfo, Status, type StatusWithLiterals, WebhookIdentityType, type WebhookIdentityTypeWithLiterals, createIndex, dropIndex, listIndexes, onIndexCreated, onIndexDeleted, onIndexUpdated };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../index.typings.ts","../../src/data-v2-index-indexes.universal.ts","../../src/data-v2-index-indexes.http.ts"],"sourcesContent":["export * from './src/data-v2-index-indexes.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixDataV2Index from './data-v2-index-indexes.http.js';\n\n/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */\nexport interface Index {\n /**\n * ID of the index.\n * @readonly\n * @format GUID\n */\n _id?: string;\n /**\n * Name of the index.\n * @minLength 1\n * @maxLength 128\n */\n name?: string;\n /**\n * Fields for which the index is defined.\n *\n * Max: 3 fields (for a unique index: 1 field)\n * @minSize 1\n * @maxSize 3\n */\n fields?: Field[];\n /**\n * Current status of the index.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Contains details about the reasons for failure when `status` is `FAILED`.\n * @readonly\n */\n failure?: Failure;\n /**\n * Whether the index enforces uniqueness of values in the field for which it's defined.\n * If `true`, the index can have only 1 field.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * Whether the index ignores case.\n *\n * Default: `false`\n */\n caseInsensitive?: boolean;\n /**\n * Source of the index. See index sources in [Index Types](https://dev.wix.com/docs/api-reference/business-solutions/cms/indexes/index-types#index-sources).\n *\n * Default: `USER`\n */\n source?: IndexSourceWithLiterals;\n}\n\n/**\n * Order determines how values are ordered in the index. This is important when\n * ordering and/or range querying by indexed fields.\n */\nexport enum Order {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type OrderWithLiterals = Order | 'ASC' | 'DESC';\n\nexport interface Field {\n /**\n * Path of the field to index. For example: `title` or `options.price`.\n * @minLength 1\n * @maxLength 128\n */\n path?: string;\n /**\n * Sort order for the index. Base on how the data is regularly queried.\n *\n * Default: `ASC`\n */\n order?: OrderWithLiterals;\n}\n\nexport enum Status {\n /** Place holder. Never returned by the service. */\n UNKNOWN = 'UNKNOWN',\n /** Index creation is in progress. */\n BUILDING = 'BUILDING',\n /** Index has been successfully created and can be used in queries. */\n ACTIVE = 'ACTIVE',\n /** Index is in the process of being dropped. */\n DROPPING = 'DROPPING',\n /** Index has been dropped successfully. */\n DROPPED = 'DROPPED',\n /** Index creation has failed. */\n FAILED = 'FAILED',\n /** Index contains incorrectly indexed data. */\n INVALID = 'INVALID',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'BUILDING'\n | 'ACTIVE'\n | 'DROPPING'\n | 'DROPPED'\n | 'FAILED'\n | 'INVALID';\n\nexport interface Failure {\n /**\n * Error code.\n * - `WDE0112`: Unknown error while building collection index.\n * - `WDE0113`: Duplicate key error while building collection index.\n * - `WDE0114`: Document too large while building collection index.\n * @maxLength 7\n */\n code?: string;\n /**\n * Description of the failure.\n * @maxLength 1024\n */\n description?: string;\n /**\n * ID of the data item that caused the failure.\n * For example, if `unique` is `true`, the ID of an item containing a duplicate value.\n * @maxLength 16000\n */\n itemId?: string | null;\n}\n\nexport enum IndexSource {\n /** Place holder. Never returned by the service. */\n UNKNOWN_INDEX_SOURCE = 'UNKNOWN_INDEX_SOURCE',\n /**\n * Automatically created by Wix for all collections.\n *\n * System indexes are created for essential attributes, such as ID and creation date.\n * You can't delete them and they don't count towards the index limit.\n */\n SYSTEM = 'SYSTEM',\n /** Created by a Wix user via the API or in the dashboard. */\n USER = 'USER',\n /**\n * Created automatically by Wix based on a Wix user's queries.\n *\n * For large collections, Wix identifies slow-running queries and creates indexes automatically to improve performance.\n * These indexes don't count towards the index limit. They're created dynamically, and may be deleted if they no longer fit\n * the system's parameters. To keep an automatic index permanently, manually create an identical `USER` index.\n */\n AUTO = 'AUTO',\n}\n\n/** @enumType */\nexport type IndexSourceWithLiterals =\n | IndexSource\n | 'UNKNOWN_INDEX_SOURCE'\n | 'SYSTEM'\n | 'USER'\n | 'AUTO';\n\nexport interface CreateIndexRequest {\n /** Details of the index to be created. */\n index: Index;\n /**\n * ID of the data collection for which to generate the index.\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport enum Environment {\n /** Place holder. Never returned by the service. */\n UNKNOWN_ENVIRONMENT = 'UNKNOWN_ENVIRONMENT',\n /** Collection [sandbox environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#sandbox-collections). */\n SANDBOX = 'SANDBOX',\n /** If the [collection's sandbox environment is enabled](https://support.wix.com/en/article/cms-accessing-and-syncing-your-sandbox-and-live-collections#enabling-sandbox-collections), run the task in the collection's sandbox environment. If not, run the task in the collection's live environment. */\n SANDBOX_PREFERRED = 'SANDBOX_PREFERRED',\n /** Collection [live environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#live-collections). */\n LIVE = 'LIVE',\n}\n\n/** @enumType */\nexport type EnvironmentWithLiterals =\n | Environment\n | 'UNKNOWN_ENVIRONMENT'\n | 'SANDBOX'\n | 'SANDBOX_PREFERRED'\n | 'LIVE';\n\nexport interface CreateIndexResponse {\n /** Details of the index being generated. */\n index?: Index;\n}\n\nexport interface DropIndexRequest {\n /**\n * Name of the index to drop.\n * @minLength 1\n * @maxLength 128\n */\n indexName: string;\n /**\n * ID of the data collection for which the index to be dropped is defined.\n * @maxLength 1024\n */\n dataCollectionId: string;\n}\n\nexport interface DropIndexResponse {}\n\nexport interface ListIndexesRequest {\n /**\n * ID of the data collection for which to list indexes.\n * @maxLength 1024\n */\n dataCollectionId: string;\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListIndexesResponse {\n /** List of all indexes for the requested data collection. */\n indexes?: Index[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface ListAvailableIndexesRequest {\n /**\n * Data collection to show available indexes for\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport interface ListAvailableIndexesResponse {\n /**\n * limit of regular single-field indexes, even if 0 1-field indices may be created using\n * 3-field quota (if available)\n */\n regular1Field?: number;\n /** limit of regular indexes up to 3-fields (in addition to 1-field indexes quota) */\n regular3Field?: number;\n /** limit of unique indexes */\n unique1Field?: number;\n /** Overall index limit, missing value means there's no overall limit */\n total?: number | null;\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}\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 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}\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}\n\nexport interface IndexCreatedEnvelope {\n entity: Index;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index is created.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onIndexCreated(\n handler: (event: IndexCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface IndexDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index is dropped.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onIndexDeleted(\n handler: (event: IndexDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface IndexUpdatedEnvelope {\n entity: Index;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index's status field is updated.\n *\n * For example, during index creation, the index's status transitions from `BUILDING` to `ACTIVE` or `FAILED`. Either transition triggers this event.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onIndexUpdated(\n handler: (event: IndexUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates an index for a data collection.\n *\n * The index can't be used immediately, as the process of generating the index takes time.\n * You can check whether an index is ready by calling List Indexes.\n *\n * Note that when an index fails to create, the failed index still occupies a slot.\n * To remove the failed index and free up the slot for a new index, call Drop Index.\n * @param dataCollectionId - ID of the data collection for which to generate the index.\n * @param index - Details of the index to be created.\n * @public\n * @requiredField dataCollectionId\n * @requiredField index\n * @requiredField index.fields\n * @requiredField index.fields.path\n * @requiredField index.name\n * @param options - Options for creating an index.\n * @permissionId WIX_DATA.CREATE_INDEX\n * @applicableIdentity APP\n * @returns Details of the index being generated.\n * @fqn com.wixpress.cloud.data.api.index.IndexService.CreateIndex\n */\nexport async function createIndex(\n dataCollectionId: string,\n index: NonNullablePaths<Index, `fields` | `fields.${number}.path` | `name`, 4>\n): Promise<\n NonNullablePaths<\n Index,\n | `_id`\n | `name`\n | `fields`\n | `fields.${number}.path`\n | `fields.${number}.order`\n | `status`\n | `failure.code`\n | `failure.description`\n | `unique`\n | `caseInsensitive`\n | `source`,\n 4\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 dataCollectionId: dataCollectionId,\n index: index,\n });\n\n const reqOpts = ambassadorWixDataV2Index.createIndex(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.index!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { dataCollectionId: '$[0]', index: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'index']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Removes an index from a data collection.\n *\n * The process of dropping an index from a collection takes time.\n * You can check whether an index has been dropped by calling List Indexes.\n * @param dataCollectionId - ID of the data collection for which the index to be dropped is defined.\n * @param indexName - Name of the index to drop.\n * @public\n * @requiredField dataCollectionId\n * @requiredField indexName\n * @param options - Options for dropping an index.\n * @permissionId WIX_DATA.DROP_INDEX\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.DropIndex\n */\nexport async function dropIndex(\n dataCollectionId: string,\n indexName: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataCollectionId: dataCollectionId,\n indexName: indexName,\n });\n\n const reqOpts = ambassadorWixDataV2Index.dropIndex(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: {\n dataCollectionId: '$[0]',\n indexName: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'indexName']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists all indexes defined for a data collection.\n *\n * When an index's status is `ACTIVE`, it is ready to use.\n * While it is still being created, its status is `BUILDING`.\n *\n * When an index's status is `DROPPED`, it has been dropped successfully.\n * While it is still in the process of being removed, its status is `DROPPING`.\n * @param dataCollectionId - ID of the data collection for which to list indexes.\n * @public\n * @requiredField dataCollectionId\n * @param options - Options for retrieving a list of indexes.\n * @permissionId WIX_DATA.LIST_INDEXES\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.ListIndexes\n */\nexport async function listIndexes(\n dataCollectionId: string,\n options?: ListIndexesOptions\n): Promise<\n NonNullablePaths<\n ListIndexesResponse,\n | `indexes`\n | `indexes.${number}._id`\n | `indexes.${number}.name`\n | `indexes.${number}.status`\n | `indexes.${number}.failure.code`\n | `indexes.${number}.failure.description`\n | `indexes.${number}.unique`\n | `indexes.${number}.caseInsensitive`\n | `indexes.${number}.source`,\n 5\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 dataCollectionId: dataCollectionId,\n paging: options?.paging,\n });\n\n const reqOpts = ambassadorWixDataV2Index.listIndexes(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 dataCollectionId: '$[0]',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListIndexesOptions {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n}\n\n/**\n * Lists available indexes limits\n * @param dataCollectionId - Data collection to show available indexes for\n * @internal\n * @documentationMaturity preview\n * @requiredField dataCollectionId\n * @permissionId WIX_DATA.LIST_INDEXES\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.ListAvailableIndexes\n */\nexport async function listAvailableIndexes(\n dataCollectionId: string\n): Promise<\n NonNullablePaths<\n ListAvailableIndexesResponse,\n `regular1Field` | `regular3Field` | `unique1Field`,\n 2\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 dataCollectionId: dataCollectionId,\n });\n\n const reqOpts = ambassadorWixDataV2Index.listAvailableIndexes(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: { dataCollectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressCloudDataApiIndexIndexServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/cloud-data',\n destPath: '',\n },\n ],\n 'code._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n ],\n 'cloud-data.wix-code.com': [\n {\n srcPath: '',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-data/v1/collections',\n destPath: '/v1/wix-data/collections',\n },\n {\n srcPath: '/wix-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/wix-data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n {\n srcPath: '/wix-data/v1/external-databases',\n destPath: '/v1/external-databases',\n },\n {\n srcPath: '/wix-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/data/v2/bulk/items',\n destPath: '/v2/bulk/items',\n },\n {\n srcPath: '/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_data_indexes';\n\n/**\n * Creates an index for a data collection.\n *\n * The index can't be used immediately, as the process of generating the index takes time.\n * You can check whether an index is ready by calling List Indexes.\n *\n * Note that when an index fails to create, the failed index still occupies a slot.\n * To remove the failed index and free up the slot for a new index, call Drop Index.\n */\nexport function createIndex(payload: object): RequestOptionsFactory<any> {\n function __createIndex({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.CreateIndex',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __createIndex;\n}\n\n/**\n * Removes an index from a data collection.\n *\n * The process of dropping an index from a collection takes time.\n * You can check whether an index has been dropped by calling List Indexes.\n */\nexport function dropIndex(payload: object): RequestOptionsFactory<any> {\n function __dropIndex({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'DELETE' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.DropIndex',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __dropIndex;\n}\n\n/**\n * Lists all indexes defined for a data collection.\n *\n * When an index's status is `ACTIVE`, it is ready to use.\n * While it is still being created, its status is `BUILDING`.\n *\n * When an index's status is `DROPPED`, it has been dropped successfully.\n * While it is still in the process of being removed, its status is `DROPPING`.\n */\nexport function listIndexes(payload: object): RequestOptionsFactory<any> {\n function __listIndexes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.ListIndexes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listIndexes;\n}\n\n/** Lists available indexes limits */\nexport function listAvailableIndexes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAvailableIndexes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.index.IndexService.ListAvailableIndexes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes/available',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAvailableIndexes;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA,iBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,mBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,mDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;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,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,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,2BAA2B;AAAA,MACzB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,GAAG;AAAA,MACD;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,qBAAqB;AAAA,MACnB;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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OAAO;AAC/C,iBAAa,YAAY,MAAM;AAE/B,eAAO,uEAAwC,OAAO,IAAI;AAAA,EAC5D,SAAS,KAAU;AACjB,UAAM,uBAAmB,uBAAAH;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,kBAAkB,OAAO;AAAA,QACrD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,kBAAkB;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createIndex","dropIndex","listAvailableIndexes","listIndexes","import_rest_modules","Order","Status","IndexSource","Environment","WebhookIdentityType","createIndex","sdkTransformError","dropIndex","listIndexes","listAvailableIndexes"]}
|
|
1
|
+
{"version":3,"sources":["../../index.typings.ts","../../src/data-v2-index-indexes.universal.ts","../../src/data-v2-index-indexes.http.ts"],"sourcesContent":["export * from './src/data-v2-index-indexes.universal.js';\n","import { transformError as sdkTransformError } from '@wix/sdk-runtime/transform-error';\nimport {\n renameKeysFromSDKRequestToRESTRequest,\n renameKeysFromRESTResponseToSDKResponse,\n} from '@wix/sdk-runtime/rename-all-nested-keys';\nimport { HttpClient, NonNullablePaths } from '@wix/sdk-types';\nimport * as ambassadorWixDataV2Index from './data-v2-index-indexes.http.js';\n\n/** An index is a map of a collection's data, organized according to specific fields to increase query speed. */\nexport interface Index {\n /**\n * ID of the index.\n * @readonly\n * @format GUID\n */\n _id?: string;\n /**\n * Name of the index.\n * @minLength 1\n * @maxLength 128\n */\n name?: string;\n /**\n * Fields for which the index is defined.\n *\n * Max: 3 fields (for a unique index: 1 field)\n * @minSize 1\n * @maxSize 3\n */\n fields?: Field[];\n /**\n * Current status of the index.\n * @readonly\n */\n status?: StatusWithLiterals;\n /**\n * Contains details about the reasons for failure when `status` is `FAILED`.\n * @readonly\n */\n failure?: Failure;\n /**\n * Whether the index enforces uniqueness of values in the field for which it's defined.\n * If `true`, the index can have only 1 field.\n *\n * Default: `false`\n */\n unique?: boolean;\n /**\n * Whether the index ignores case.\n *\n * Default: `false`\n */\n caseInsensitive?: boolean;\n /**\n * Source of the index. See index sources in [Index Types](https://dev.wix.com/docs/api-reference/business-solutions/cms/indexes/index-types#index-sources).\n *\n * Default: `USER`\n */\n source?: IndexSourceWithLiterals;\n}\n\n/**\n * Order determines how values are ordered in the index. This is important when\n * ordering and/or range querying by indexed fields.\n */\nexport enum Order {\n ASC = 'ASC',\n DESC = 'DESC',\n}\n\n/** @enumType */\nexport type OrderWithLiterals = Order | 'ASC' | 'DESC';\n\nexport interface Field {\n /**\n * Path of the field to index. For example: `title` or `options.price`.\n * @minLength 1\n * @maxLength 128\n */\n path?: string;\n /**\n * Sort order for the index. Base on how the data is regularly queried.\n *\n * Default: `ASC`\n */\n order?: OrderWithLiterals;\n}\n\nexport enum Status {\n /** Place holder. Never returned by the service. */\n UNKNOWN = 'UNKNOWN',\n /** Index creation is in progress. */\n BUILDING = 'BUILDING',\n /** Index has been successfully created and can be used in queries. */\n ACTIVE = 'ACTIVE',\n /** Index is in the process of being dropped. */\n DROPPING = 'DROPPING',\n /** Index has been dropped successfully. */\n DROPPED = 'DROPPED',\n /** Index creation has failed. */\n FAILED = 'FAILED',\n /** Index contains incorrectly indexed data. */\n INVALID = 'INVALID',\n}\n\n/** @enumType */\nexport type StatusWithLiterals =\n | Status\n | 'UNKNOWN'\n | 'BUILDING'\n | 'ACTIVE'\n | 'DROPPING'\n | 'DROPPED'\n | 'FAILED'\n | 'INVALID';\n\nexport interface Failure {\n /**\n * Error code.\n * - `WDE0112`: Unknown error while building collection index.\n * - `WDE0113`: Duplicate key error while building collection index.\n * - `WDE0114`: Document too large while building collection index.\n * @maxLength 7\n */\n code?: string;\n /**\n * Description of the failure.\n * @maxLength 1024\n */\n description?: string;\n /**\n * ID of the data item that caused the failure.\n * For example, if `unique` is `true`, the ID of an item containing a duplicate value.\n * @maxLength 16000\n */\n itemId?: string | null;\n}\n\nexport enum IndexSource {\n /** Place holder. Never returned by the service. */\n UNKNOWN_INDEX_SOURCE = 'UNKNOWN_INDEX_SOURCE',\n /**\n * Automatically created by Wix for all collections.\n *\n * System indexes are created for essential attributes, such as ID and creation date.\n * You can't delete them and they don't count towards the index limit.\n */\n SYSTEM = 'SYSTEM',\n /** Created by a Wix user via the API or in the dashboard. */\n USER = 'USER',\n /**\n * Created automatically by Wix based on a Wix user's queries.\n *\n * For large collections, Wix identifies slow-running queries and creates indexes automatically to improve performance.\n * These indexes don't count towards the index limit. They're created dynamically, and may be deleted if they no longer fit\n * the system's parameters. To keep an automatic index permanently, manually create an identical `USER` index.\n */\n AUTO = 'AUTO',\n}\n\n/** @enumType */\nexport type IndexSourceWithLiterals =\n | IndexSource\n | 'UNKNOWN_INDEX_SOURCE'\n | 'SYSTEM'\n | 'USER'\n | 'AUTO';\n\nexport interface CreateIndexRequest {\n /** Details of the index to be created. */\n index: Index;\n /**\n * ID of the data collection for which to generate the index.\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport enum Environment {\n /** Place holder. Never returned by the service. */\n UNKNOWN_ENVIRONMENT = 'UNKNOWN_ENVIRONMENT',\n /** Collection [sandbox environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#sandbox-collections). */\n SANDBOX = 'SANDBOX',\n /** If the [collection's sandbox environment is enabled](https://support.wix.com/en/article/cms-accessing-and-syncing-your-sandbox-and-live-collections#enabling-sandbox-collections), run the task in the collection's sandbox environment. If not, run the task in the collection's live environment. */\n SANDBOX_PREFERRED = 'SANDBOX_PREFERRED',\n /** Collection [live environment](https://support.wix.com/en/article/cms-about-sandbox-and-live-collections-and-syncing#live-collections). */\n LIVE = 'LIVE',\n}\n\n/** @enumType */\nexport type EnvironmentWithLiterals =\n | Environment\n | 'UNKNOWN_ENVIRONMENT'\n | 'SANDBOX'\n | 'SANDBOX_PREFERRED'\n | 'LIVE';\n\nexport interface CreateIndexResponse {\n /** Details of the index being generated. */\n index?: Index;\n}\n\nexport interface DropIndexRequest {\n /**\n * Name of the index to drop.\n * @minLength 1\n * @maxLength 128\n */\n indexName: string;\n /**\n * ID of the data collection for which the index to be dropped is defined.\n * @maxLength 1024\n */\n dataCollectionId: string;\n}\n\nexport interface DropIndexResponse {}\n\nexport interface ListIndexesRequest {\n /**\n * ID of the data collection for which to list indexes.\n * @maxLength 1024\n */\n dataCollectionId: string;\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n}\n\nexport interface Paging {\n /** Number of items to load. */\n limit?: number | null;\n /** Number of items to skip in the current sort order. */\n offset?: number | null;\n}\n\nexport interface ListIndexesResponse {\n /** List of all indexes for the requested data collection. */\n indexes?: Index[];\n /** Paging metadata. */\n pagingMetadata?: PagingMetadata;\n}\n\nexport interface PagingMetadata {\n /** Number of items returned in the response. */\n count?: number | null;\n /** Offset that was requested. */\n offset?: number | null;\n /** Total number of items that match the query. */\n total?: number | null;\n /** Flag that indicates the server failed to calculate the `total` field. */\n tooManyToCount?: boolean | null;\n}\n\nexport interface ListAvailableIndexesRequest {\n /**\n * Data collection to show available indexes for\n * @maxLength 256\n */\n dataCollectionId: string;\n}\n\nexport interface ListAvailableIndexesResponse {\n /**\n * limit of regular single-field indexes, even if 0 1-field indices may be created using\n * 3-field quota (if available)\n */\n regular1Field?: number;\n /** limit of regular indexes up to 3-fields (in addition to 1-field indexes quota) */\n regular3Field?: number;\n /** limit of unique indexes */\n unique1Field?: number;\n /** Overall index limit, missing value means there's no overall limit */\n total?: number | null;\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}\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 AccountDetails {\n /**\n * ID of the account.\n * @format GUID\n */\n accountId?: string | null;\n /**\n * ID of the parent account.\n * @format GUID\n */\n parentAccountId?: string | null;\n /**\n * ID of the site, if applicable.\n * @format GUID\n */\n siteId?: string | null;\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}\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}\n\nexport interface IndexCreatedEnvelope {\n entity: Index;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index is created.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_created\n * @slug created\n * @documentationMaturity preview\n */\nexport declare function onIndexCreated(\n handler: (event: IndexCreatedEnvelope) => void | Promise<void>\n): void;\n\nexport interface IndexDeletedEnvelope {\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index is dropped.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_deleted\n * @slug deleted\n * @documentationMaturity preview\n */\nexport declare function onIndexDeleted(\n handler: (event: IndexDeletedEnvelope) => void | Promise<void>\n): void;\n\nexport interface IndexUpdatedEnvelope {\n entity: Index;\n metadata: EventMetadata;\n}\n\n/**\n * Triggered when an index's status field is updated.\n *\n * For example, during index creation, the index's status transitions from `BUILDING` to `ACTIVE` or `FAILED`. Either transition triggers this event.\n * @permissionScope Manage Data Indexes\n * @permissionScopeId SCOPE.DC-DATA.INDEXES-MANAGE\n * @permissionId WIX_DATA.LIST_INDEXES\n * @webhook\n * @eventType wix.data.v2.index_updated\n * @slug updated\n * @documentationMaturity preview\n */\nexport declare function onIndexUpdated(\n handler: (event: IndexUpdatedEnvelope) => void | Promise<void>\n): void;\n\n/**\n * Creates an index for a data collection.\n *\n * The index can't be used immediately, as the process of generating the index takes time.\n * You can check whether an index is ready by calling List Indexes.\n *\n * Note that when an index fails to create, the failed index still occupies a slot.\n * To remove the failed index and free up the slot for a new index, call Drop Index.\n * @param dataCollectionId - ID of the data collection for which to generate the index.\n * @param index - Details of the index to be created.\n * @public\n * @requiredField dataCollectionId\n * @requiredField index\n * @requiredField index.fields\n * @requiredField index.fields.path\n * @requiredField index.name\n * @param options - Options for creating an index.\n * @permissionId WIX_DATA.CREATE_INDEX\n * @applicableIdentity APP\n * @returns Details of the index being generated.\n * @fqn com.wixpress.cloud.data.api.index.IndexService.CreateIndex\n */\nexport async function createIndex(\n dataCollectionId: string,\n index: NonNullablePaths<Index, `fields` | `fields.${number}.path` | `name`, 4>\n): Promise<\n NonNullablePaths<\n Index,\n | `_id`\n | `name`\n | `fields`\n | `fields.${number}.path`\n | `fields.${number}.order`\n | `status`\n | `failure.code`\n | `failure.description`\n | `unique`\n | `caseInsensitive`\n | `source`,\n 4\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 dataCollectionId: dataCollectionId,\n index: index,\n });\n\n const reqOpts = ambassadorWixDataV2Index.createIndex(payload);\n\n sideEffects?.onSiteCall?.();\n try {\n const result = await httpClient.request(reqOpts);\n sideEffects?.onSuccess?.(result);\n\n return renameKeysFromRESTResponseToSDKResponse(result.data)?.index!;\n } catch (err: any) {\n const transformedError = sdkTransformError(\n err,\n {\n spreadPathsToArguments: {},\n explicitPathsToArguments: { dataCollectionId: '$[0]', index: '$[1]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'index']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Removes an index from a data collection.\n *\n * The process of dropping an index from a collection takes time.\n * You can check whether an index has been dropped by calling List Indexes.\n * @param dataCollectionId - ID of the data collection for which the index to be dropped is defined.\n * @param indexName - Name of the index to drop.\n * @public\n * @requiredField dataCollectionId\n * @requiredField indexName\n * @param options - Options for dropping an index.\n * @permissionId WIX_DATA.DROP_INDEX\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.DropIndex\n */\nexport async function dropIndex(\n dataCollectionId: string,\n indexName: string\n): Promise<void> {\n // @ts-ignore\n const { httpClient, sideEffects } = arguments[2] as {\n httpClient: HttpClient;\n sideEffects?: any;\n };\n\n const payload = renameKeysFromSDKRequestToRESTRequest({\n dataCollectionId: dataCollectionId,\n indexName: indexName,\n });\n\n const reqOpts = ambassadorWixDataV2Index.dropIndex(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: {\n dataCollectionId: '$[0]',\n indexName: '$[1]',\n },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'indexName']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\n/**\n * Lists all indexes defined for a data collection.\n *\n * When an index's status is `ACTIVE`, it is ready to use.\n * While it is still being created, its status is `BUILDING`.\n *\n * When an index's status is `DROPPED`, it has been dropped successfully.\n * While it is still in the process of being removed, its status is `DROPPING`.\n * @param dataCollectionId - ID of the data collection for which to list indexes.\n * @public\n * @requiredField dataCollectionId\n * @param options - Options for retrieving a list of indexes.\n * @permissionId WIX_DATA.LIST_INDEXES\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.ListIndexes\n */\nexport async function listIndexes(\n dataCollectionId: string,\n options?: ListIndexesOptions\n): Promise<\n NonNullablePaths<\n ListIndexesResponse,\n | `indexes`\n | `indexes.${number}._id`\n | `indexes.${number}.name`\n | `indexes.${number}.status`\n | `indexes.${number}.failure.code`\n | `indexes.${number}.failure.description`\n | `indexes.${number}.unique`\n | `indexes.${number}.caseInsensitive`\n | `indexes.${number}.source`,\n 5\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 dataCollectionId: dataCollectionId,\n paging: options?.paging,\n });\n\n const reqOpts = ambassadorWixDataV2Index.listIndexes(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 dataCollectionId: '$[0]',\n paging: '$[1].paging',\n },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId', 'options']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n\nexport interface ListIndexesOptions {\n /** Paging options to limit and skip the number of items. */\n paging?: Paging;\n}\n\n/**\n * Lists available indexes limits\n * @param dataCollectionId - Data collection to show available indexes for\n * @internal\n * @documentationMaturity preview\n * @requiredField dataCollectionId\n * @permissionId WIX_DATA.LIST_INDEXES\n * @applicableIdentity APP\n * @fqn com.wixpress.cloud.data.api.index.IndexService.ListAvailableIndexes\n */\nexport async function listAvailableIndexes(\n dataCollectionId: string\n): Promise<\n NonNullablePaths<\n ListAvailableIndexesResponse,\n `regular1Field` | `regular3Field` | `unique1Field`,\n 2\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 dataCollectionId: dataCollectionId,\n });\n\n const reqOpts = ambassadorWixDataV2Index.listAvailableIndexes(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: { dataCollectionId: '$[0]' },\n singleArgumentUnchanged: false,\n },\n ['dataCollectionId']\n );\n sideEffects?.onError?.(err);\n\n throw transformedError;\n }\n}\n","import { toURLSearchParams } from '@wix/sdk-runtime/rest-modules';\nimport { resolveUrl } from '@wix/sdk-runtime/rest-modules';\nimport { ResolveUrlOpts } from '@wix/sdk-runtime/rest-modules';\nimport { RequestOptionsFactory } from '@wix/sdk-types';\n\nfunction resolveComWixpressCloudDataApiIndexIndexServiceUrl(\n opts: Omit<ResolveUrlOpts, 'domainToMappings'>\n) {\n const domainToMappings = {\n 'api._api_base_domain_': [\n {\n srcPath: '/cloud-data',\n destPath: '',\n },\n ],\n 'code._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/v1/connector',\n destPath: '/v1/connector',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n ],\n 'cloud-data.wix-code.com': [\n {\n srcPath: '',\n destPath: '',\n },\n ],\n _: [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'www._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'dev._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'bo._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wixbo.ai': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'wix-bo.com': [\n {\n srcPath: '/_api/cloud-data/v1',\n destPath: '/v1',\n },\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n ],\n 'manage._base_domain_': [\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n {\n srcPath: '/_api/data',\n destPath: '',\n },\n {\n srcPath: '/_api/cloud-data',\n destPath: '',\n },\n ],\n 'editor._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'blocks._base_domain_': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'create.editorx': [\n {\n srcPath: '/_api/cloud-data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/cloud-data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/data/v1/schemas',\n destPath: '/v1/schemas',\n },\n {\n srcPath: '/_api/data/dbs/tasks',\n destPath: '/dbs/tasks',\n },\n {\n srcPath: '/_api/cloud-data/v1/wix-data',\n destPath: '/v1/wix-data',\n },\n {\n srcPath: '/_api/cloud-data/v1/data-settings',\n destPath: '/v1/data-settings',\n },\n {\n srcPath: '/_api/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/_api/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n {\n srcPath: '/_api/cloud-data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/_api/cloud-data/v2/bulk',\n destPath: '/v2/bulk',\n },\n {\n srcPath: '/_api/cloud-data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/_api/cloud-data/v2/dbs/tasks',\n destPath: '/v2/dbs/tasks',\n },\n ],\n 'www.wixapis.com': [\n {\n srcPath: '/wix-data/v1/collections',\n destPath: '/v1/wix-data/collections',\n },\n {\n srcPath: '/wix-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/wix-data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n {\n srcPath: '/wix-data/v1/external-databases',\n destPath: '/v1/external-databases',\n },\n {\n srcPath: '/wix-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/data/v2/collections',\n destPath: '/v2/collections',\n },\n {\n srcPath: '/data/v2/items',\n destPath: '/v2/items',\n },\n {\n srcPath: '/data/v2/bulk/items',\n destPath: '/v2/bulk/items',\n },\n {\n srcPath: '/data/v2/indexes',\n destPath: '/v2/indexes',\n },\n {\n srcPath: '/data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n 'www.wixgateway.com': [\n {\n srcPath: '/wix-data/v1/items',\n destPath: '/v1/items',\n },\n {\n srcPath: '/wix-data/v1/bulk',\n destPath: '/v1/bulk',\n },\n ],\n '*.dev.wix-code.com': [\n {\n srcPath: '/_api/cloud-data/v2',\n destPath: '/v2',\n },\n {\n srcPath: '/_api/cloud-data/v1/external-database-connections',\n destPath: '/v1/external-database-connections',\n },\n {\n srcPath: '/data/v1/data-collection-sharing',\n destPath: '/v1/data-collection-sharing',\n },\n ],\n };\n\n return resolveUrl(Object.assign(opts, { domainToMappings }));\n}\n\nconst PACKAGE_NAME = '@wix/auto_sdk_data_indexes';\n\n/**\n * Creates an index for a data collection.\n *\n * The index can't be used immediately, as the process of generating the index takes time.\n * You can check whether an index is ready by calling List Indexes.\n *\n * Note that when an index fails to create, the failed index still occupies a slot.\n * To remove the failed index and free up the slot for a new index, call Drop Index.\n */\nexport function createIndex(payload: object): RequestOptionsFactory<any> {\n function __createIndex({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'POST' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.CreateIndex',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n data: payload,\n };\n\n return metadata;\n }\n\n return __createIndex;\n}\n\n/**\n * Removes an index from a data collection.\n *\n * The process of dropping an index from a collection takes time.\n * You can check whether an index has been dropped by calling List Indexes.\n */\nexport function dropIndex(payload: object): RequestOptionsFactory<any> {\n function __dropIndex({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'DELETE' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.DropIndex',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __dropIndex;\n}\n\n/**\n * Lists all indexes defined for a data collection.\n *\n * When an index's status is `ACTIVE`, it is ready to use.\n * While it is still being created, its status is `BUILDING`.\n *\n * When an index's status is `DROPPED`, it has been dropped successfully.\n * While it is still in the process of being removed, its status is `DROPPING`.\n */\nexport function listIndexes(payload: object): RequestOptionsFactory<any> {\n function __listIndexes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'GET' as any,\n methodFqn: 'com.wixpress.cloud.data.api.index.IndexService.ListIndexes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listIndexes;\n}\n\n/** Lists available indexes limits */\nexport function listAvailableIndexes(\n payload: object\n): RequestOptionsFactory<any> {\n function __listAvailableIndexes({ host }: any) {\n const metadata = {\n entityFqdn: 'wix.data.v2.index',\n method: 'GET' as any,\n methodFqn:\n 'com.wixpress.cloud.data.api.index.IndexService.ListAvailableIndexes',\n packageName: PACKAGE_NAME,\n migrationOptions: {\n optInTransformResponse: true,\n },\n url: resolveComWixpressCloudDataApiIndexIndexServiceUrl({\n protoPath: '/v2/indexes/available',\n data: payload,\n host,\n }),\n params: toURLSearchParams(payload),\n };\n\n return metadata;\n }\n\n return __listAvailableIndexes;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAAA;AAAA,EAAA,iBAAAC;AAAA,EAAA,4BAAAC;AAAA,EAAA,mBAAAC;AAAA;AAAA;;;ACAA,6BAAoD;AACpD,oCAGO;;;ACJP,0BAAkC;AAClC,IAAAC,uBAA2B;AAI3B,SAAS,mDACP,MACA;AACA,QAAM,mBAAmB;AAAA,IACvB,yBAAyB;AAAA,MACvB;AAAA,QACE,SAAS;AAAA,QACT,UAAU;AAAA,MACZ;AAAA,IACF;AAAA,IACA,sBAAsB;AAAA,M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AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,IACA,QAAQ,SAAS;AAAA,EACnB,CAAC;AAED,QAAM,UAAmC,YAAY,OAAO;AAE5D,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,uBAAAF;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B;AAAA,UACxB,kBAAkB;AAAA,UAClB,QAAQ;AAAA,QACV;AAAA,QACA,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,oBAAoB,SAAS;AAAA,IAChC;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;AAiBA,eAAsBG,sBACpB,kBAOA;AAEA,QAAM,EAAE,YAAY,YAAY,IAAI,UAAU,CAAC;AAK/C,QAAM,cAAU,qEAAsC;AAAA,IACpD;AAAA,EACF,CAAC;AAED,QAAM,UAAmC,qBAAqB,OAAO;AAErE,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,uBAAAH;AAAA,MACvB;AAAA,MACA;AAAA,QACE,wBAAwB,CAAC;AAAA,QACzB,0BAA0B,EAAE,kBAAkB,OAAO;AAAA,QACrD,yBAAyB;AAAA,MAC3B;AAAA,MACA,CAAC,kBAAkB;AAAA,IACrB;AACA,iBAAa,UAAU,GAAG;AAE1B,UAAM;AAAA,EACR;AACF;","names":["createIndex","dropIndex","listAvailableIndexes","listIndexes","import_rest_modules","Order","Status","IndexSource","Environment","WebhookIdentityType","createIndex","sdkTransformError","dropIndex","listIndexes","listAvailableIndexes"]}
|