@wix/data 1.0.144 → 1.0.146

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.
@@ -1,3 +1,47 @@
1
+ type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
2
+ interface HttpClient {
3
+ request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
4
+ fetchWithAuth: typeof fetch;
5
+ wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
6
+ }
7
+ type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
8
+ type HttpResponse<T = any> = {
9
+ data: T;
10
+ status: number;
11
+ statusText: string;
12
+ headers: any;
13
+ request?: any;
14
+ };
15
+ type RequestOptions<_TResponse = any, Data = any> = {
16
+ method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
17
+ url: string;
18
+ data?: Data;
19
+ params?: URLSearchParams;
20
+ } & APIMetadata;
21
+ type APIMetadata = {
22
+ methodFqn?: string;
23
+ entityFqdn?: string;
24
+ packageName?: string;
25
+ };
26
+ type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
27
+ type EventDefinition<Payload = unknown, Type extends string = string> = {
28
+ __type: 'event-definition';
29
+ type: Type;
30
+ isDomainEvent?: boolean;
31
+ transformations?: (envelope: unknown) => Payload;
32
+ __payload: Payload;
33
+ };
34
+ declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
35
+ type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
36
+ type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
37
+
38
+ declare global {
39
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
40
+ interface SymbolConstructor {
41
+ readonly observable: symbol;
42
+ }
43
+ }
44
+
1
45
  /** An external database connection defines a connection between an external database and a Wix site or project. */
2
46
  interface ExternalDatabaseConnection {
3
47
  /**
@@ -415,55 +459,64 @@ interface UpdateExternalDatabaseConnection {
415
459
  capabilities?: Capabilities;
416
460
  }
417
461
 
418
- type RESTFunctionDescriptor<T extends (...args: any[]) => any = (...args: any[]) => any> = (httpClient: HttpClient) => T;
419
- interface HttpClient {
420
- request<TResponse, TData = any>(req: RequestOptionsFactory<TResponse, TData>): Promise<HttpResponse<TResponse>>;
421
- fetchWithAuth: typeof fetch;
422
- wixAPIFetch: (relativeUrl: string, options: RequestInit) => Promise<Response>;
462
+ declare function getExternalDatabaseConnection$1(httpClient: HttpClient): GetExternalDatabaseConnectionSignature;
463
+ interface GetExternalDatabaseConnectionSignature {
464
+ /**
465
+ * Retrieves an external database connection by name.
466
+ * @param - Name of the external database connection to retrieve.
467
+ * @returns Details of the external database connection requested.
468
+ */
469
+ (name: string): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
423
470
  }
424
- type RequestOptionsFactory<TResponse = any, TData = any> = (context: any) => RequestOptions<TResponse, TData>;
425
- type HttpResponse<T = any> = {
426
- data: T;
427
- status: number;
428
- statusText: string;
429
- headers: any;
430
- request?: any;
431
- };
432
- type RequestOptions<_TResponse = any, Data = any> = {
433
- method: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS';
434
- url: string;
435
- data?: Data;
436
- params?: URLSearchParams;
437
- } & APIMetadata;
438
- type APIMetadata = {
439
- methodFqn?: string;
440
- entityFqdn?: string;
441
- packageName?: string;
442
- };
443
- type BuildRESTFunction<T extends RESTFunctionDescriptor> = T extends RESTFunctionDescriptor<infer U> ? U : never;
444
- type EventDefinition<Payload = unknown, Type extends string = string> = {
445
- __type: 'event-definition';
446
- type: Type;
447
- isDomainEvent?: boolean;
448
- transformations?: (envelope: unknown) => Payload;
449
- __payload: Payload;
450
- };
451
- declare function EventDefinition<Type extends string>(type: Type, isDomainEvent?: boolean, transformations?: (envelope: any) => unknown): <Payload = unknown>() => EventDefinition<Payload, Type>;
452
- type EventHandler<T extends EventDefinition> = (payload: T['__payload']) => void | Promise<void>;
453
- type BuildEventDefinition<T extends EventDefinition<any, string>> = (handler: EventHandler<T>) => void;
454
-
455
- declare global {
456
- // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
457
- interface SymbolConstructor {
458
- readonly observable: symbol;
459
- }
471
+ declare function listExternalDatabaseConnections$1(httpClient: HttpClient): ListExternalDatabaseConnectionsSignature;
472
+ interface ListExternalDatabaseConnectionsSignature {
473
+ /**
474
+ * Retrieves a list of all external database collections associated with the site or project.
475
+ */
476
+ (options?: ListExternalDatabaseConnectionsOptions | undefined): Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
477
+ }
478
+ declare function createExternalDatabaseConnection$1(httpClient: HttpClient): CreateExternalDatabaseConnectionSignature;
479
+ interface CreateExternalDatabaseConnectionSignature {
480
+ /**
481
+ * Creates a new external database connection.
482
+ *
483
+ * The `externalDatabaseConnection` parameter must include a `name`, `endpoint`, and `configuration` details for the external database.
484
+ * If any of these are missing, the external database connection isn't created.
485
+ * @param - External database connection details.
486
+ * @param - Options for creating an external database connection.
487
+ * @returns Details of external database connection created.
488
+ */
489
+ (externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
490
+ }
491
+ declare function updateExternalDatabaseConnection$1(httpClient: HttpClient): UpdateExternalDatabaseConnectionSignature;
492
+ interface UpdateExternalDatabaseConnectionSignature {
493
+ /**
494
+ * Updates an external database connection.
495
+ *
496
+ * An external database collection name must be provided in `name`.
497
+ * If an existing external database connection is found with the same name, that connection's details are updated.
498
+ * If no external database connection has that name, the request fails.
499
+ *
500
+ * > **Note:** After an external database connection is updated, it only contains the values provided in the request. All previous values are lost.
501
+ * @param - Name of the external database connection.
502
+ * An external database connection may connect to one or more external data collections or tables.
503
+ * These are represented as `connectionName/dataCollectionId`.
504
+ * @param - Options for updating an external database connection.
505
+ * @param - Updated external database connection details. The existing connection is replaced with this version.
506
+ * @returns Updated external database connection details.
507
+ */
508
+ (name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection): Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
509
+ }
510
+ declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient): DeleteExternalDatabaseConnectionSignature;
511
+ interface DeleteExternalDatabaseConnectionSignature {
512
+ /**
513
+ * Deletes an external database connection.
514
+ *
515
+ * > **Note:** Once an external database connection is deleted, it can't be restored. To reconnect the database you need to create a new external database connection.
516
+ * @param - Name of the external database connection to delete.
517
+ */
518
+ (name: string): Promise<void>;
460
519
  }
461
-
462
- declare function getExternalDatabaseConnection$1(httpClient: HttpClient): (name: string) => Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
463
- declare function listExternalDatabaseConnections$1(httpClient: HttpClient): (options?: ListExternalDatabaseConnectionsOptions) => Promise<ListExternalDatabaseConnectionsResponse & ListExternalDatabaseConnectionsResponseNonNullableFields>;
464
- declare function createExternalDatabaseConnection$1(httpClient: HttpClient): (externalDatabaseConnection: ExternalDatabaseConnection, options: CreateExternalDatabaseConnectionOptions) => Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
465
- declare function updateExternalDatabaseConnection$1(httpClient: HttpClient): (name: string, externalDatabaseConnection: UpdateExternalDatabaseConnection) => Promise<ExternalDatabaseConnection & ExternalDatabaseConnectionNonNullableFields>;
466
- declare function deleteExternalDatabaseConnection$1(httpClient: HttpClient): (name: string) => Promise<void>;
467
520
  declare const onExternalDatabaseConnectionCreated$1: EventDefinition<ExternalDatabaseConnectionCreatedEnvelope, "wix.data.v1.external_database_connection_created">;
468
521
  declare const onExternalDatabaseConnectionUpdated$1: EventDefinition<ExternalDatabaseConnectionUpdatedEnvelope, "wix.data.v1.external_database_connection_updated">;
469
522
  declare const onExternalDatabaseConnectionDeleted$1: EventDefinition<ExternalDatabaseConnectionDeletedEnvelope, "wix.data.v1.external_database_connection_deleted">;
@@ -484,12 +537,21 @@ type _publicDeleteExternalDatabaseConnectionType = typeof deleteExternalDatabase
484
537
  declare const deleteExternalDatabaseConnection: ReturnType<typeof createRESTModule$3<_publicDeleteExternalDatabaseConnectionType>>;
485
538
 
486
539
  type _publicOnExternalDatabaseConnectionCreatedType = typeof onExternalDatabaseConnectionCreated$1;
540
+ /**
541
+ * Triggered when an external database connection is created.
542
+ */
487
543
  declare const onExternalDatabaseConnectionCreated: ReturnType<typeof createEventModule$2<_publicOnExternalDatabaseConnectionCreatedType>>;
488
544
 
489
545
  type _publicOnExternalDatabaseConnectionUpdatedType = typeof onExternalDatabaseConnectionUpdated$1;
546
+ /**
547
+ * Triggered when an external database connection is updated.
548
+ */
490
549
  declare const onExternalDatabaseConnectionUpdated: ReturnType<typeof createEventModule$2<_publicOnExternalDatabaseConnectionUpdatedType>>;
491
550
 
492
551
  type _publicOnExternalDatabaseConnectionDeletedType = typeof onExternalDatabaseConnectionDeleted$1;
552
+ /**
553
+ * Triggered when an external database connection is deleted.
554
+ */
493
555
  declare const onExternalDatabaseConnectionDeleted: ReturnType<typeof createEventModule$2<_publicOnExternalDatabaseConnectionDeletedType>>;
494
556
 
495
557
  type context$3_Capabilities = Capabilities;
@@ -1004,7 +1066,10 @@ declare enum Role {
1004
1066
  ANYONE = "ANYONE"
1005
1067
  }
1006
1068
  interface Plugin extends PluginOptionsOneOf {
1007
- /** Options for the Publish plugin. */
1069
+ /**
1070
+ * Options for the Publish plugin.
1071
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
1072
+ */
1008
1073
  publishOptions?: PublishPluginOptions$1;
1009
1074
  /** Options for the Single Item plugin. */
1010
1075
  singleItemOptions?: SingleItemPluginOptions;
@@ -1029,7 +1094,10 @@ interface Plugin extends PluginOptionsOneOf {
1029
1094
  }
1030
1095
  /** @oneof */
1031
1096
  interface PluginOptionsOneOf {
1032
- /** Options for the Publish plugin. */
1097
+ /**
1098
+ * Options for the Publish plugin.
1099
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
1100
+ */
1033
1101
  publishOptions?: PublishPluginOptions$1;
1034
1102
  /** Options for the Single Item plugin. */
1035
1103
  singleItemOptions?: SingleItemPluginOptions;
@@ -1847,11 +1915,69 @@ interface ListDataCollectionsOptions {
1847
1915
  consistentRead?: boolean;
1848
1916
  }
1849
1917
 
1850
- declare function createDataCollection$1(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & DataCollectionNonNullableFields>;
1851
- declare function getDataCollection$1(httpClient: HttpClient): (dataCollectionId: string, options?: GetDataCollectionOptions) => Promise<DataCollection & DataCollectionNonNullableFields>;
1852
- declare function listDataCollections$1(httpClient: HttpClient): (options?: ListDataCollectionsOptions) => Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
1853
- declare function updateDataCollection$1(httpClient: HttpClient): (collection: DataCollection) => Promise<DataCollection & DataCollectionNonNullableFields>;
1854
- declare function deleteDataCollection$1(httpClient: HttpClient): (dataCollectionId: string) => Promise<void>;
1918
+ declare function createDataCollection$1(httpClient: HttpClient): CreateDataCollectionSignature;
1919
+ interface CreateDataCollectionSignature {
1920
+ /**
1921
+ * Creates a new data collection.
1922
+ *
1923
+ * The request body must include an ID, details for at least 1 field, and a permissions object. If any of these are missing, the collection isn't created.
1924
+ * @param - Collection details.
1925
+ * @param - Options for creating a data collection.
1926
+ * @returns Details of collection created.
1927
+ */
1928
+ (collection: DataCollection): Promise<DataCollection & DataCollectionNonNullableFields>;
1929
+ }
1930
+ declare function getDataCollection$1(httpClient: HttpClient): GetDataCollectionSignature;
1931
+ interface GetDataCollectionSignature {
1932
+ /**
1933
+ * Retrieves a data collection by ID.
1934
+ * @param - ID of the collection to retrieve.
1935
+ * @param - Options for retrieving a data collection.
1936
+ * @returns Details of the collection requested.
1937
+ */
1938
+ (dataCollectionId: string, options?: GetDataCollectionOptions | undefined): Promise<DataCollection & DataCollectionNonNullableFields>;
1939
+ }
1940
+ declare function listDataCollections$1(httpClient: HttpClient): ListDataCollectionsSignature;
1941
+ interface ListDataCollectionsSignature {
1942
+ /**
1943
+ * Retrieves a list of all data collections associated with the site or project.
1944
+ *
1945
+ * By default, the list is ordered by ID in ascending order.
1946
+ * @param - Options for retrieving a list of data collections.
1947
+ */
1948
+ (options?: ListDataCollectionsOptions | undefined): Promise<ListDataCollectionsResponse & ListDataCollectionsResponseNonNullableFields>;
1949
+ }
1950
+ declare function updateDataCollection$1(httpClient: HttpClient): UpdateDataCollectionSignature;
1951
+ interface UpdateDataCollectionSignature {
1952
+ /**
1953
+ * Updates a data collection.
1954
+ *
1955
+ * A collection ID, revision number, permissions, and at least 1 field must be provided within `options.collection`.
1956
+ * If a collection with that ID exists, and if its current `revision` number matches the one provided, it is updated.
1957
+ * Otherwise, the request fails.
1958
+ *
1959
+ * When a collection is updated, its `_updatedDate` property is changed to the current date and its `revision` property is incremented.
1960
+ *
1961
+ * > **Note:**
1962
+ * > After a collection is updated, it only contains the properties included in the `updateDataCollection()` call. If the existing collection has properties with values and those properties
1963
+ * > aren't included in the updated collection details, their values are lost.
1964
+ * @param - Updated collection details. The existing collection is replaced with this version.
1965
+ * @param - Options for updating a data collection.
1966
+ * @returns Updated collection details.
1967
+ */
1968
+ (collection: DataCollection): Promise<DataCollection & DataCollectionNonNullableFields>;
1969
+ }
1970
+ declare function deleteDataCollection$1(httpClient: HttpClient): DeleteDataCollectionSignature;
1971
+ interface DeleteDataCollectionSignature {
1972
+ /**
1973
+ * Deletes a data collection.
1974
+ *
1975
+ * > **Note:**
1976
+ * > Once a collection is deleted, it can't be restored.
1977
+ * @param - ID of the collection to delete.
1978
+ */
1979
+ (dataCollectionId: string): Promise<void>;
1980
+ }
1855
1981
  declare const onDataCollectionClonedEvent$1: EventDefinition<DataCollectionClonedEnvelope, "wix.data.v2.data_collection_data_collection_cloned_event">;
1856
1982
  declare const onDataCollectionChangedEvent$1: EventDefinition<DataCollectionChangedEnvelope, "wix.data.v2.data_collection_data_collection_changed_event">;
1857
1983
  declare const onDataCollectionCreated$1: EventDefinition<DataCollectionCreatedEnvelope, "wix.data.v2.data_collection_created">;
@@ -1874,18 +2000,29 @@ type _publicDeleteDataCollectionType = typeof deleteDataCollection$1;
1874
2000
  declare const deleteDataCollection: ReturnType<typeof createRESTModule$2<_publicDeleteDataCollectionType>>;
1875
2001
 
1876
2002
  type _publicOnDataCollectionClonedEventType = typeof onDataCollectionClonedEvent$1;
2003
+ /**
2004
+ * Event triggered when collection is cloned from other instance
2005
+ * CREATED event will be also triggered along with this action
2006
+ */
1877
2007
  declare const onDataCollectionClonedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionClonedEventType>>;
1878
2008
 
1879
2009
  type _publicOnDataCollectionChangedEventType = typeof onDataCollectionChangedEvent$1;
2010
+ /**
2011
+ * Event triggered when collection is changed, describing some of changes
2012
+ * UPDATED event will be also triggered along with this action
2013
+ */
1880
2014
  declare const onDataCollectionChangedEvent: ReturnType<typeof createEventModule$1<_publicOnDataCollectionChangedEventType>>;
1881
2015
 
1882
2016
  type _publicOnDataCollectionCreatedType = typeof onDataCollectionCreated$1;
2017
+ /** */
1883
2018
  declare const onDataCollectionCreated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionCreatedType>>;
1884
2019
 
1885
2020
  type _publicOnDataCollectionUpdatedType = typeof onDataCollectionUpdated$1;
2021
+ /** */
1886
2022
  declare const onDataCollectionUpdated: ReturnType<typeof createEventModule$1<_publicOnDataCollectionUpdatedType>>;
1887
2023
 
1888
2024
  type _publicOnDataCollectionDeletedType = typeof onDataCollectionDeleted$1;
2025
+ /** */
1889
2026
  declare const onDataCollectionDeleted: ReturnType<typeof createEventModule$1<_publicOnDataCollectionDeletedType>>;
1890
2027
 
1891
2028
  type context$2_AccessLevel = AccessLevel;
@@ -2045,6 +2182,14 @@ interface InsertDataItemRequest {
2045
2182
  dataCollectionId: string;
2046
2183
  /** Item to insert. */
2047
2184
  dataItem: DataItem;
2185
+ /**
2186
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2187
+ *
2188
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2189
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2190
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2191
+ */
2192
+ appOptions?: Record<string, any> | null;
2048
2193
  }
2049
2194
  declare enum Environment$1 {
2050
2195
  LIVE = "LIVE",
@@ -2065,6 +2210,19 @@ interface PatchDataItemRequest {
2065
2210
  dataCollectionId?: string;
2066
2211
  /** Patch set applied during item update. */
2067
2212
  patchSet?: PatchSet;
2213
+ /**
2214
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2215
+ *
2216
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2217
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2218
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2219
+ */
2220
+ appOptions?: Record<string, any> | null;
2221
+ /**
2222
+ * Options for the Publish plugin.
2223
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2224
+ */
2225
+ publishPluginOptions?: DataPublishPluginOptions;
2068
2226
  }
2069
2227
  interface PatchSet {
2070
2228
  /** Data item ID. */
@@ -2110,6 +2268,12 @@ interface RemoveFromArray {
2110
2268
  value?: any;
2111
2269
  }
2112
2270
  interface DataPublishPluginOptions {
2271
+ /**
2272
+ * Whether to include draft items.
2273
+ * When `true`, the response includes both published and draft items. Default: `false`.
2274
+ *
2275
+ * **Note:** This option is only relevant for [data collections](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) that use the Publish plugin.
2276
+ */
2113
2277
  includeDraftItems?: boolean;
2114
2278
  }
2115
2279
  interface PatchDataItemResponse {
@@ -2128,6 +2292,19 @@ interface BulkPatchDataItemsRequest {
2128
2292
  * Default: `false`
2129
2293
  */
2130
2294
  returnEntity?: boolean;
2295
+ /**
2296
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2297
+ *
2298
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2299
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2300
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2301
+ */
2302
+ appOptions?: Record<string, any> | null;
2303
+ /**
2304
+ * Options for the Publish plugin.
2305
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2306
+ */
2307
+ publishPluginOptions?: DataPublishPluginOptions;
2131
2308
  }
2132
2309
  interface BulkPatchDataItemsResponse {
2133
2310
  /** Information about the updated items. */
@@ -2183,6 +2360,19 @@ interface UpdateDataItemRequest {
2183
2360
  dataCollectionId: string;
2184
2361
  /** Updated data item content. The existing data item's content is replaced entirely. */
2185
2362
  dataItem: DataItem;
2363
+ /**
2364
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2365
+ *
2366
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2367
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2368
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2369
+ */
2370
+ appOptions?: Record<string, any> | null;
2371
+ /**
2372
+ * Options for the Publish plugin.
2373
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2374
+ */
2375
+ publishPluginOptions?: DataPublishPluginOptions;
2186
2376
  }
2187
2377
  interface UpdateDataItemResponse {
2188
2378
  /** Updated data item. */
@@ -2193,6 +2383,19 @@ interface SaveDataItemRequest {
2193
2383
  dataCollectionId: string;
2194
2384
  /** Data item to insert or update. */
2195
2385
  dataItem: DataItem;
2386
+ /**
2387
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2388
+ *
2389
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2390
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2391
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2392
+ */
2393
+ appOptions?: Record<string, any> | null;
2394
+ /**
2395
+ * Options for the Publish plugin.
2396
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2397
+ */
2398
+ publishPluginOptions?: DataPublishPluginOptions;
2196
2399
  }
2197
2400
  interface SaveDataItemResponse {
2198
2401
  /**
@@ -2235,6 +2438,19 @@ interface GetDataItemRequest {
2235
2438
  * **Note:** The `_id` system field is always returned.
2236
2439
  */
2237
2440
  fields?: string[];
2441
+ /**
2442
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2443
+ *
2444
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2445
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2446
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2447
+ */
2448
+ appOptions?: Record<string, any> | null;
2449
+ /**
2450
+ * Options for the Publish plugin.
2451
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2452
+ */
2453
+ publishPluginOptions?: DataPublishPluginOptions;
2238
2454
  }
2239
2455
  interface GetDataItemResponse {
2240
2456
  /** Retrieved item. */
@@ -2245,6 +2461,19 @@ interface RemoveDataItemRequest {
2245
2461
  dataCollectionId: string;
2246
2462
  /** ID of the item to remove. */
2247
2463
  dataItemId: string;
2464
+ /**
2465
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2466
+ *
2467
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2468
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2469
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2470
+ */
2471
+ appOptions?: Record<string, any> | null;
2472
+ /**
2473
+ * Options for the Publish plugin.
2474
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2475
+ */
2476
+ publishPluginOptions?: DataPublishPluginOptions;
2248
2477
  }
2249
2478
  interface RemoveDataItemResponse {
2250
2479
  /** Removed item. */
@@ -2291,6 +2520,19 @@ interface QueryDataItemsRequest {
2291
2520
  * If not provided, result text is not translated.
2292
2521
  */
2293
2522
  language?: string | null;
2523
+ /**
2524
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2525
+ *
2526
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2527
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2528
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2529
+ */
2530
+ appOptions?: Record<string, any> | null;
2531
+ /**
2532
+ * Options for the Publish plugin.
2533
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2534
+ */
2535
+ publishPluginOptions?: DataPublishPluginOptions;
2294
2536
  /** Options for retrieving referenced items. */
2295
2537
  referencedItemOptions?: ReferencedItemOptions[];
2296
2538
  }
@@ -2445,6 +2687,19 @@ interface AggregateDataItemsRequest extends AggregateDataItemsRequestPagingMetho
2445
2687
  * If not provided, result text is not translated.
2446
2688
  */
2447
2689
  language?: string | null;
2690
+ /**
2691
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2692
+ *
2693
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2694
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2695
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2696
+ */
2697
+ appOptions?: Record<string, any> | null;
2698
+ /**
2699
+ * Options for the Publish plugin.
2700
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2701
+ */
2702
+ publishPluginOptions?: DataPublishPluginOptions;
2448
2703
  }
2449
2704
  /** @oneof */
2450
2705
  interface AggregateDataItemsRequestPagingMethodOneOf {
@@ -2541,6 +2796,19 @@ interface CountDataItemsRequest {
2541
2796
  * If not provided, result text is not translated.
2542
2797
  */
2543
2798
  language?: string | null;
2799
+ /**
2800
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2801
+ *
2802
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2803
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2804
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2805
+ */
2806
+ appOptions?: Record<string, any> | null;
2807
+ /**
2808
+ * Options for the Publish plugin.
2809
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2810
+ */
2811
+ publishPluginOptions?: DataPublishPluginOptions;
2544
2812
  }
2545
2813
  interface CountDataItemsResponse {
2546
2814
  /** Number of items matching the query. */
@@ -2596,6 +2864,11 @@ interface QueryDistinctValuesRequest extends QueryDistinctValuesRequestPagingMet
2596
2864
  * If not provided, result text is not translated.
2597
2865
  */
2598
2866
  language?: string | null;
2867
+ /**
2868
+ * Options for the Publish plugin.
2869
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2870
+ */
2871
+ publishPluginOptions?: DataPublishPluginOptions;
2599
2872
  }
2600
2873
  /** @oneof */
2601
2874
  interface QueryDistinctValuesRequestPagingMethodOneOf {
@@ -2622,6 +2895,14 @@ interface BulkInsertDataItemsRequest {
2622
2895
  * Default: `false`
2623
2896
  */
2624
2897
  returnEntity?: boolean;
2898
+ /**
2899
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2900
+ *
2901
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2902
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2903
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2904
+ */
2905
+ appOptions?: Record<string, any> | null;
2625
2906
  }
2626
2907
  interface BulkInsertDataItemsResponse {
2627
2908
  /** Information about the inserted items. */
@@ -2641,6 +2922,19 @@ interface BulkUpdateDataItemsRequest {
2641
2922
  * Default: `false`
2642
2923
  */
2643
2924
  returnEntity?: boolean;
2925
+ /**
2926
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2927
+ *
2928
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2929
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2930
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2931
+ */
2932
+ appOptions?: Record<string, any> | null;
2933
+ /**
2934
+ * Options for the Publish plugin.
2935
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2936
+ */
2937
+ publishPluginOptions?: DataPublishPluginOptions;
2644
2938
  }
2645
2939
  interface BulkUpdateDataItemsResponse {
2646
2940
  /** Information about the updated items. */
@@ -2660,6 +2954,19 @@ interface BulkSaveDataItemsRequest {
2660
2954
  * Default: `false`
2661
2955
  */
2662
2956
  returnEntity?: boolean;
2957
+ /**
2958
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2959
+ *
2960
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2961
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2962
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2963
+ */
2964
+ appOptions?: Record<string, any> | null;
2965
+ /**
2966
+ * Options for the Publish plugin.
2967
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2968
+ */
2969
+ publishPluginOptions?: DataPublishPluginOptions;
2663
2970
  }
2664
2971
  interface BulkSaveDataItemsResponse {
2665
2972
  /** Information about the saved items. */
@@ -2672,6 +2979,19 @@ interface BulkRemoveDataItemsRequest {
2672
2979
  dataCollectionId: string;
2673
2980
  /** IDs of data items to remove. */
2674
2981
  dataItemIds: string[];
2982
+ /**
2983
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
2984
+ *
2985
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
2986
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
2987
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
2988
+ */
2989
+ appOptions?: Record<string, any> | null;
2990
+ /**
2991
+ * Options for the Publish plugin.
2992
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
2993
+ */
2994
+ publishPluginOptions?: DataPublishPluginOptions;
2675
2995
  }
2676
2996
  interface BulkRemoveDataItemsResponse {
2677
2997
  /** Information about the removed data items. */
@@ -2719,6 +3039,19 @@ interface QueryReferencedDataItemsRequest extends QueryReferencedDataItemsReques
2719
3039
  * **Note:** The `_id` system field is always returned.
2720
3040
  */
2721
3041
  fields?: string[];
3042
+ /**
3043
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3044
+ *
3045
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3046
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3047
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3048
+ */
3049
+ appOptions?: Record<string, any> | null;
3050
+ /**
3051
+ * Options for the Publish plugin.
3052
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3053
+ */
3054
+ publishPluginOptions?: DataPublishPluginOptions;
2722
3055
  }
2723
3056
  /** @oneof */
2724
3057
  interface QueryReferencedDataItemsRequestPagingMethodOneOf {
@@ -2778,6 +3111,14 @@ interface InsertDataItemReferenceRequest {
2778
3111
  dataCollectionId: string;
2779
3112
  /** Reference to insert */
2780
3113
  dataItemReference?: DataItemReference;
3114
+ /**
3115
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3116
+ *
3117
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3118
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3119
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3120
+ */
3121
+ appOptions?: Record<string, any> | null;
2781
3122
  }
2782
3123
  interface DataItemReference {
2783
3124
  /** Referring item field containing the references to the referenced items. */
@@ -3136,6 +3477,14 @@ interface InsertDataItemOptions {
3136
3477
  dataCollectionId: string;
3137
3478
  /** Item to insert. */
3138
3479
  dataItem: DataItem;
3480
+ /**
3481
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3482
+ *
3483
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3484
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3485
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3486
+ */
3487
+ appOptions?: Record<string, any> | null;
3139
3488
  }
3140
3489
  interface UpdateDataItemOptions {
3141
3490
  /** Updated data item content. The existing data item's content is replaced entirely. */
@@ -3161,12 +3510,38 @@ interface UpdateDataItemOptions {
3161
3510
  };
3162
3511
  /** ID of the collection containing the existing item. */
3163
3512
  dataCollectionId: string;
3513
+ /**
3514
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3515
+ *
3516
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3517
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3518
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3519
+ */
3520
+ appOptions?: Record<string, any> | null;
3521
+ /**
3522
+ * Options for the Publish plugin.
3523
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3524
+ */
3525
+ publishPluginOptions?: DataPublishPluginOptions;
3164
3526
  }
3165
3527
  interface SaveDataItemOptions {
3166
3528
  /** ID of the collection in which to insert or update the item. */
3167
3529
  dataCollectionId: string;
3168
3530
  /** Data item to insert or update. */
3169
3531
  dataItem: DataItem;
3532
+ /**
3533
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3534
+ *
3535
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3536
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3537
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3538
+ */
3539
+ appOptions?: Record<string, any> | null;
3540
+ /**
3541
+ * Options for the Publish plugin.
3542
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3543
+ */
3544
+ publishPluginOptions?: DataPublishPluginOptions;
3170
3545
  }
3171
3546
  interface GetDataItemOptions {
3172
3547
  /** ID of the collection from which to retrieve the data item. */
@@ -3191,10 +3566,36 @@ interface GetDataItemOptions {
3191
3566
  * **Note:** The `_id` system field is always returned.
3192
3567
  */
3193
3568
  fields?: string[];
3569
+ /**
3570
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3571
+ *
3572
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3573
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3574
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3575
+ */
3576
+ appOptions?: Record<string, any> | null;
3577
+ /**
3578
+ * Options for the Publish plugin.
3579
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3580
+ */
3581
+ publishPluginOptions?: DataPublishPluginOptions;
3194
3582
  }
3195
3583
  interface RemoveDataItemOptions {
3196
3584
  /** ID of the collection from which to remove the item. */
3197
3585
  dataCollectionId: string;
3586
+ /**
3587
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3588
+ *
3589
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3590
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3591
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3592
+ */
3593
+ appOptions?: Record<string, any> | null;
3594
+ /**
3595
+ * Options for the Publish plugin.
3596
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3597
+ */
3598
+ publishPluginOptions?: DataPublishPluginOptions;
3198
3599
  }
3199
3600
  interface TruncateDataItemsOptions {
3200
3601
  /** ID of the collection to truncate. */
@@ -3233,6 +3634,19 @@ interface QueryDataItemsOptions {
3233
3634
  * If not provided, result text is not translated.
3234
3635
  */
3235
3636
  language?: string | null | undefined;
3637
+ /**
3638
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3639
+ *
3640
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3641
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3642
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3643
+ */
3644
+ appOptions?: Record<string, any> | null | undefined;
3645
+ /**
3646
+ * Options for the Publish plugin.
3647
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3648
+ */
3649
+ publishPluginOptions?: DataPublishPluginOptions | undefined;
3236
3650
  /** Options for retrieving referenced items. */
3237
3651
  referencedItemOptions?: ReferencedItemOptions[] | undefined;
3238
3652
  }
@@ -3337,6 +3751,19 @@ interface AggregateDataItemsOptions extends AggregateDataItemsRequestPagingMetho
3337
3751
  * If not provided, result text is not translated.
3338
3752
  */
3339
3753
  language?: string | null;
3754
+ /**
3755
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3756
+ *
3757
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3758
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3759
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3760
+ */
3761
+ appOptions?: Record<string, any> | null;
3762
+ /**
3763
+ * Options for the Publish plugin.
3764
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3765
+ */
3766
+ publishPluginOptions?: DataPublishPluginOptions;
3340
3767
  }
3341
3768
  interface CountDataItemsOptions {
3342
3769
  /** ID of the collection for which to count query results. */
@@ -3369,6 +3796,19 @@ interface CountDataItemsOptions {
3369
3796
  * If not provided, result text is not translated.
3370
3797
  */
3371
3798
  language?: string | null;
3799
+ /**
3800
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3801
+ *
3802
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3803
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3804
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3805
+ */
3806
+ appOptions?: Record<string, any> | null;
3807
+ /**
3808
+ * Options for the Publish plugin.
3809
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3810
+ */
3811
+ publishPluginOptions?: DataPublishPluginOptions;
3372
3812
  }
3373
3813
  interface QueryDistinctValuesOptions extends QueryDistinctValuesRequestPagingMethodOneOf {
3374
3814
  /** ID of the collection to query. */
@@ -3420,6 +3860,11 @@ interface QueryDistinctValuesOptions extends QueryDistinctValuesRequestPagingMet
3420
3860
  * If not provided, result text is not translated.
3421
3861
  */
3422
3862
  language?: string | null;
3863
+ /**
3864
+ * Options for the Publish plugin.
3865
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3866
+ */
3867
+ publishPluginOptions?: DataPublishPluginOptions;
3423
3868
  }
3424
3869
  interface BulkInsertDataItemsOptions {
3425
3870
  /** ID of the collection in which to insert the items. */
@@ -3433,6 +3878,14 @@ interface BulkInsertDataItemsOptions {
3433
3878
  * Default: `false`
3434
3879
  */
3435
3880
  returnEntity?: boolean;
3881
+ /**
3882
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3883
+ *
3884
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3885
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3886
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3887
+ */
3888
+ appOptions?: Record<string, any> | null;
3436
3889
  }
3437
3890
  interface BulkUpdateDataItemsOptions {
3438
3891
  /** ID of the collection in which to update items. */
@@ -3446,6 +3899,19 @@ interface BulkUpdateDataItemsOptions {
3446
3899
  * Default: `false`
3447
3900
  */
3448
3901
  returnEntity?: boolean;
3902
+ /**
3903
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3904
+ *
3905
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3906
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3907
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3908
+ */
3909
+ appOptions?: Record<string, any> | null;
3910
+ /**
3911
+ * Options for the Publish plugin.
3912
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3913
+ */
3914
+ publishPluginOptions?: DataPublishPluginOptions;
3449
3915
  }
3450
3916
  interface BulkSaveDataItemsOptions {
3451
3917
  /** ID of the collection in which to insert or update the items. */
@@ -3459,12 +3925,38 @@ interface BulkSaveDataItemsOptions {
3459
3925
  * Default: `false`
3460
3926
  */
3461
3927
  returnEntity?: boolean;
3928
+ /**
3929
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3930
+ *
3931
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3932
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3933
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3934
+ */
3935
+ appOptions?: Record<string, any> | null;
3936
+ /**
3937
+ * Options for the Publish plugin.
3938
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3939
+ */
3940
+ publishPluginOptions?: DataPublishPluginOptions;
3462
3941
  }
3463
3942
  interface BulkRemoveDataItemsOptions {
3464
3943
  /** ID of the collection from which to remove the item. */
3465
3944
  dataCollectionId: string;
3466
3945
  /** IDs of data items to remove. */
3467
3946
  dataItemIds: string[];
3947
+ /**
3948
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
3949
+ *
3950
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
3951
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
3952
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
3953
+ */
3954
+ appOptions?: Record<string, any> | null;
3955
+ /**
3956
+ * Options for the Publish plugin.
3957
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
3958
+ */
3959
+ publishPluginOptions?: DataPublishPluginOptions;
3468
3960
  }
3469
3961
  interface QueryReferencedDataItemsOptions extends QueryReferencedDataItemsRequestPagingMethodOneOf {
3470
3962
  /** ID of the collection containing the referring item. */
@@ -3506,6 +3998,19 @@ interface QueryReferencedDataItemsOptions extends QueryReferencedDataItemsReques
3506
3998
  * **Note:** The `_id` system field is always returned.
3507
3999
  */
3508
4000
  fields?: string[];
4001
+ /**
4002
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
4003
+ *
4004
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
4005
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
4006
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
4007
+ */
4008
+ appOptions?: Record<string, any> | null;
4009
+ /**
4010
+ * Options for the Publish plugin.
4011
+ * This plugin allows items in a [data collection](https://dev.wix.com/docs/rest/business-solutions/cms/data-collections/data-collection-object) to be marked as draft or published. Published items are visible to site visitors, while draft items are not.
4012
+ */
4013
+ publishPluginOptions?: DataPublishPluginOptions;
3509
4014
  }
3510
4015
  interface IsReferencedDataItemOptions {
3511
4016
  /** ID of the collection containing the referring data item. */
@@ -3529,6 +4034,14 @@ interface InsertDataItemReferenceOptions {
3529
4034
  dataCollectionId: string;
3530
4035
  /** Reference to insert */
3531
4036
  dataItemReference?: DataItemReference;
4037
+ /**
4038
+ * Additional parameters specific to the [Wix app collection](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections) you are querying:
4039
+ *
4040
+ * When querying the Wix Stores [Products collection](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-e-commerce-stores/wix-stores-products-collection-fields), pass the following optional parameters:
4041
+ * - `includeHiddenProducts`: Whether to include hidden products in the response. Default: `false`.
4042
+ * - `includeVariants`: Whether to include product variants in the query. Default: `false`.
4043
+ */
4044
+ appOptions?: Record<string, any> | null;
3532
4045
  }
3533
4046
  interface RemoveDataItemReferenceOptions {
3534
4047
  /** ID of the collection containing the referring item. */
@@ -3566,27 +4079,322 @@ interface ReplaceDataItemReferencesOptions {
3566
4079
  newReferencedItemIds?: string[];
3567
4080
  }
3568
4081
 
3569
- declare function insertDataItem$1(httpClient: HttpClient): (options: InsertDataItemOptions) => Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
3570
- declare function updateDataItem$1(httpClient: HttpClient): (_id: string, options: UpdateDataItemOptions) => Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
3571
- declare function saveDataItem$1(httpClient: HttpClient): (options: SaveDataItemOptions) => Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
3572
- declare function getDataItem$1(httpClient: HttpClient): (dataItemId: string, options?: GetDataItemOptions) => Promise<DataItem & DataItemNonNullableFields>;
3573
- declare function removeDataItem$1(httpClient: HttpClient): (dataItemId: string, options: RemoveDataItemOptions) => Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
3574
- declare function truncateDataItems$1(httpClient: HttpClient): (options: TruncateDataItemsOptions) => Promise<void>;
3575
- declare function queryDataItems$1(httpClient: HttpClient): (options: QueryDataItemsOptions) => DataItemsQueryBuilder;
3576
- declare function aggregateDataItems$1(httpClient: HttpClient): (options?: AggregateDataItemsOptions) => Promise<AggregateDataItemsResponse>;
3577
- declare function countDataItems$1(httpClient: HttpClient): (options?: CountDataItemsOptions) => Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
3578
- declare function queryDistinctValues$1(httpClient: HttpClient): (options?: QueryDistinctValuesOptions) => Promise<QueryDistinctValuesResponse>;
3579
- declare function bulkInsertDataItems$1(httpClient: HttpClient): (options?: BulkInsertDataItemsOptions) => Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
3580
- declare function bulkUpdateDataItems$1(httpClient: HttpClient): (options?: BulkUpdateDataItemsOptions) => Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
3581
- declare function bulkSaveDataItems$1(httpClient: HttpClient): (options?: BulkSaveDataItemsOptions) => Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
3582
- declare function bulkRemoveDataItems$1(httpClient: HttpClient): (options: BulkRemoveDataItemsOptions) => Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
3583
- declare function queryReferencedDataItems$1(httpClient: HttpClient): (options?: QueryReferencedDataItemsOptions) => Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
3584
- declare function isReferencedDataItem$1(httpClient: HttpClient): (options?: IsReferencedDataItemOptions) => Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
3585
- declare function insertDataItemReference$1(httpClient: HttpClient): (options?: InsertDataItemReferenceOptions) => Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
3586
- declare function removeDataItemReference$1(httpClient: HttpClient): (options: RemoveDataItemReferenceOptions) => Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
3587
- declare function bulkInsertDataItemReferences$1(httpClient: HttpClient): (options?: BulkInsertDataItemReferencesOptions) => Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
3588
- declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient): (options: BulkRemoveDataItemReferencesOptions) => Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
3589
- declare function replaceDataItemReferences$1(httpClient: HttpClient): (options?: ReplaceDataItemReferencesOptions) => Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
4082
+ declare function insertDataItem$1(httpClient: HttpClient): InsertDataItemSignature;
4083
+ interface InsertDataItemSignature {
4084
+ /**
4085
+ * Adds an item to a collection.
4086
+ *
4087
+ *
4088
+ * An item can only be inserted into an existing connection.
4089
+ * You can create a new collection using the Data Collections API.
4090
+ *
4091
+ * When an item is inserted into a collection, the item's ID is automatically assigned a random value.
4092
+ * You can optionally provide a custom ID in `dataItem.id` when inserting the item.
4093
+ * If you specify an ID that already exists in the collection, the insertion will fail.
4094
+ *
4095
+ * If `options.dataItem.data` is empty, a new item is created with no data fields.
4096
+ * @param - Options for adding an item to a collection.
4097
+ */
4098
+ (options?: InsertDataItemOptions | undefined): Promise<InsertDataItemResponse & InsertDataItemResponseNonNullableFields>;
4099
+ }
4100
+ declare function updateDataItem$1(httpClient: HttpClient): UpdateDataItemSignature;
4101
+ interface UpdateDataItemSignature {
4102
+ /**
4103
+ * Updates an item in a collection.
4104
+ *
4105
+ *
4106
+ * This function replaces the data item's existing data with the payload provided in `options.dataItem.data` in the request.
4107
+ *
4108
+ * To update an item, you need to specify an item ID and a collection ID.
4109
+ * If an item is found in the specified collection with the specified ID, that item is updated.
4110
+ * If the collection doesn't contain an item with that ID, the request fails.
4111
+ *
4112
+ * When an item is updated, its `data._updatedDate` field is changed to the current date and time.
4113
+ *
4114
+ * > **Note:**
4115
+ * > After an item is updated, it only contains the fields included in the `options.dataItem.data` payload in the `updateDataItem()` call.
4116
+ * > If the existing item has fields with values and those fields aren't included in the updated item, their values are lost.
4117
+ * @param - Data item ID.
4118
+ * @param - Options for updating an item in a collection.
4119
+ */
4120
+ (_id: string, options?: UpdateDataItemOptions | undefined): Promise<UpdateDataItemResponse & UpdateDataItemResponseNonNullableFields>;
4121
+ }
4122
+ declare function saveDataItem$1(httpClient: HttpClient): SaveDataItemSignature;
4123
+ interface SaveDataItemSignature {
4124
+ /**
4125
+ * Inserts or updates an item in a collection.
4126
+ *
4127
+ *
4128
+ * The `saveDataItem()` function inserts or updates the specified item, depending on whether it already exists in the collection.
4129
+ *
4130
+ * + If you don't provide an ID, a new item is created.
4131
+ *
4132
+ * + If you provide an ID that does not exist in the collection, a new item is created with that ID.
4133
+ *
4134
+ * + If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time.
4135
+ *
4136
+ * > **Note:** When you provide an item with an ID that already exists in the collection, the payload you provide in `options.dataItem.data` replaces the existing item with that ID.
4137
+ * > This means that the item's previous fields and values are lost.
4138
+ * @param - Options for saving an item in a collection.
4139
+ */
4140
+ (options?: SaveDataItemOptions | undefined): Promise<SaveDataItemResponse & SaveDataItemResponseNonNullableFields>;
4141
+ }
4142
+ declare function getDataItem$1(httpClient: HttpClient): GetDataItemSignature;
4143
+ interface GetDataItemSignature {
4144
+ /**
4145
+ * Retrieves an item from a collection.
4146
+ *
4147
+ *
4148
+ * > **Note**: When calling `getDataItem()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
4149
+ * @param - ID of the data item to retrieve.
4150
+ * @param - Options for retrieving an item from a collection.
4151
+ * @returns Retrieved item.
4152
+ */
4153
+ (dataItemId: string, options?: GetDataItemOptions | undefined): Promise<DataItem & DataItemNonNullableFields>;
4154
+ }
4155
+ declare function removeDataItem$1(httpClient: HttpClient): RemoveDataItemSignature;
4156
+ interface RemoveDataItemSignature {
4157
+ /**
4158
+ * Removes an item from a collection.
4159
+ *
4160
+ *
4161
+ * If any items in other collections reference the removed item in reference or multi-reference fields, those fields are cleared.
4162
+ *
4163
+ * > **Note:**
4164
+ * > Once an item has been removed from a collection, it can't be restored.
4165
+ * @param - ID of the item to remove.
4166
+ * @param - Options for removing an item from a collection.
4167
+ */
4168
+ (dataItemId: string, options?: RemoveDataItemOptions | undefined): Promise<RemoveDataItemResponse & RemoveDataItemResponseNonNullableFields>;
4169
+ }
4170
+ declare function truncateDataItems$1(httpClient: HttpClient): TruncateDataItemsSignature;
4171
+ interface TruncateDataItemsSignature {
4172
+ /**
4173
+ * Removes all items from a collection.
4174
+ *
4175
+ *
4176
+ * If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
4177
+ *
4178
+ * > **Note:**
4179
+ * > Once items have been removed from a collection, they can't be restored.
4180
+ * @param - Options for truncating data items from a collection.
4181
+ */
4182
+ (options: TruncateDataItemsOptions): Promise<void>;
4183
+ }
4184
+ declare function queryDataItems$1(httpClient: HttpClient): QueryDataItemsSignature;
4185
+ interface QueryDataItemsSignature {
4186
+ /**
4187
+ * Creates a query to retrieve items from a database collection.
4188
+ *
4189
+ * The `queryDataItems()` function builds a query to retrieve data items from a collection and returns a `DataItemsQueryBuilder` object.
4190
+ *
4191
+ * The returned object contains the query definition which is typically used to run the query using the `find()` function.
4192
+ *
4193
+ * You can refine the query by chaining `DataItemsQueryBuilder` functions onto the query. `DataItemsQueryBuilder` functions enable you to sort, filter, and control the results that `queryDataItems()` returns.
4194
+ *
4195
+ * The `queryDataItems()` function runs with the following `DataItemsQueryBuilder` defaults that you can override:
4196
+ *
4197
+ * + `skip`: 0
4198
+ * + `limit`: 50
4199
+ * + `descending`: by `_createdDate`
4200
+ *
4201
+ * The functions that are chained to `queryDataItems()` are applied in the order they are called. For example, if you sort on an `age` field in ascending order and then on a `name` field in descending order, the results are sorted first by the age of the items and then, if there are multiple results with the same age, the items are sorted by name in descending order, per age value.
4202
+ *
4203
+ * If the collection that you are querying has references to other collections, by default the data from referenced collections is not retrieved. To get the data from referenced items, specify them in the `options.includeReferencedItems` parameter.
4204
+ *
4205
+ * > **Note**: When calling `queryDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
4206
+ *
4207
+ *
4208
+ * @param - Options for querying data items.
4209
+ */
4210
+ (options: QueryDataItemsOptions): DataItemsQueryBuilder;
4211
+ }
4212
+ declare function aggregateDataItems$1(httpClient: HttpClient): AggregateDataItemsSignature;
4213
+ interface AggregateDataItemsSignature {
4214
+ /**
4215
+ * Runs an aggregation on a data collection and returns the resulting list of items.
4216
+ *
4217
+ *
4218
+ * An aggregation enables you to perform certain calculations on your collection data, or on groups of items that you define, to retrieve meaningful summaries.
4219
+ * You can also add paging, filtering, and sorting preferences to your aggregation to retrieve exactly what you need.
4220
+ * @param - Options for running an aggregation.
4221
+ */
4222
+ (options?: AggregateDataItemsOptions | undefined): Promise<AggregateDataItemsResponse>;
4223
+ }
4224
+ declare function countDataItems$1(httpClient: HttpClient): CountDataItemsSignature;
4225
+ interface CountDataItemsSignature {
4226
+ /**
4227
+ * Counts the number of items in a data collection that match the provided filtering preferences.
4228
+ *
4229
+ * > **Note**: When calling `countDataItems()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
4230
+ * @param - Options for counting the number of items in a data collection.
4231
+ */
4232
+ (options?: CountDataItemsOptions | undefined): Promise<CountDataItemsResponse & CountDataItemsResponseNonNullableFields>;
4233
+ }
4234
+ declare function queryDistinctValues$1(httpClient: HttpClient): QueryDistinctValuesSignature;
4235
+ interface QueryDistinctValuesSignature {
4236
+ /**
4237
+ * Retrieves a list of distinct values for a given field in all items that match a query, without duplicates.
4238
+ *
4239
+ *
4240
+ * As with `queryDataItems()`, this endpoint retrieves items based on the filtering, sorting, and paging preferences you provide.
4241
+ * However, `queryDistinctValues()` doesn't return all of the full items that match the query.
4242
+ * Rather, it returns all unique values of the field you specify in `options.fieldName` for items that match the query.
4243
+ * If more than one item has the same value for that field, that value appears only once.
4244
+ *
4245
+ * For more details on using queries, see [API Query Language](https://dev.wix.com/api/rest/getting-started/api-query-language).
4246
+ *
4247
+ * > **Note**: When calling `queryDistinctValues()` following an update to your collection, the data retrieved may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
4248
+ * @param - Options for querying distinct values.
4249
+ */
4250
+ (options?: QueryDistinctValuesOptions | undefined): Promise<QueryDistinctValuesResponse>;
4251
+ }
4252
+ declare function bulkInsertDataItems$1(httpClient: HttpClient): BulkInsertDataItemsSignature;
4253
+ interface BulkInsertDataItemsSignature {
4254
+ /**
4255
+ * Adds multiple items to a collection.
4256
+ *
4257
+ *
4258
+ * When each item is inserted into a collection, its ID is automatically assigned a random value.
4259
+ * You can optionally provide your own ID when inserting the item. If you specify an ID that already exists in the collection, the insertion will fail.
4260
+ * @param - Options for adding multiple items to a collection.
4261
+ */
4262
+ (options?: BulkInsertDataItemsOptions | undefined): Promise<BulkInsertDataItemsResponse & BulkInsertDataItemsResponseNonNullableFields>;
4263
+ }
4264
+ declare function bulkUpdateDataItems$1(httpClient: HttpClient): BulkUpdateDataItemsSignature;
4265
+ interface BulkUpdateDataItemsSignature {
4266
+ /**
4267
+ * Updates multiple items in a collection.
4268
+ *
4269
+ *
4270
+ * This function replaces each specified data item's existing data with the payload provided in the request.
4271
+ *
4272
+ * Each item in the request must include an ID. If an item is found in the specified collection with
4273
+ * the same ID, that item is updated. If the collection doesn't contain an item with that ID, the update fails.
4274
+ *
4275
+ * When an item is updated, its `data._updatedDate` field is changed to the current date and time.
4276
+ *
4277
+ * > **Note:**
4278
+ * > After each item is updated, it only contains the fields included in the request. If the existing item has fields with values and those fields
4279
+ * > aren't included in the updated item, their values are lost.
4280
+ * @param - Options for updating multiple items in a collection.
4281
+ */
4282
+ (options?: BulkUpdateDataItemsOptions | undefined): Promise<BulkUpdateDataItemsResponse & BulkUpdateDataItemsResponseNonNullableFields>;
4283
+ }
4284
+ declare function bulkSaveDataItems$1(httpClient: HttpClient): BulkSaveDataItemsSignature;
4285
+ interface BulkSaveDataItemsSignature {
4286
+ /**
4287
+ * Inserts or updates multiple items in a collection.
4288
+ *
4289
+ *
4290
+ * This function inserts or updates each item provided, depending on whether it already exists in the collection. For each item:
4291
+ *
4292
+ * + If you don't provide an ID, a new item is created.
4293
+ *
4294
+ * + If you provide an ID that doesn't exist in the collection, a new item is created with that ID.
4295
+ *
4296
+ * + If an item with the ID you provide already exists in the collection, that item is updated. When an item is updated, its `data._updatedDate` field is changed to the current date and time.
4297
+ *
4298
+ * > **Note:** When you provide an item with an ID that already exists in the collection, the item you provide completely replaces the existing item with that ID.
4299
+ * > This means that all of the item's previous fields and values are lost.
4300
+ * @param - Options for saving multiple items in a collection.
4301
+ */
4302
+ (options?: BulkSaveDataItemsOptions | undefined): Promise<BulkSaveDataItemsResponse & BulkSaveDataItemsResponseNonNullableFields>;
4303
+ }
4304
+ declare function bulkRemoveDataItems$1(httpClient: HttpClient): BulkRemoveDataItemsSignature;
4305
+ interface BulkRemoveDataItemsSignature {
4306
+ /**
4307
+ * Removes multiple items from a collection.
4308
+ *
4309
+ *
4310
+ * If any items in other collections reference the removed items in reference or multi-reference fields, those fields are cleared.
4311
+ *
4312
+ * > **Note:** Once an item has been removed from a collection, it can't be restored.
4313
+ * @param - Options for removing multiple items from a collection.
4314
+ */
4315
+ (options?: BulkRemoveDataItemsOptions | undefined): Promise<BulkRemoveDataItemsResponse & BulkRemoveDataItemsResponseNonNullableFields>;
4316
+ }
4317
+ declare function queryReferencedDataItems$1(httpClient: HttpClient): QueryReferencedDataItemsSignature;
4318
+ interface QueryReferencedDataItemsSignature {
4319
+ /**
4320
+ * Retrieves the full items referenced in the specified field of an item.
4321
+ *
4322
+ *
4323
+ * Reference and multi-reference fields refer to items in different collections.
4324
+ * Use this function to retrieve the full details of the referenced items themselves.
4325
+ *
4326
+ * For example, suppose you have a **Movies** collection with an **Actors** field that contains references to items in a **People** collection.
4327
+ * Querying the **Movies** collection using `queryReferencedDataItems()` returns the relevant **People** items referenced in the **Actors** field of the specified **Movie** item.
4328
+ * This gives you information from the **People** collection about each of the actors in the specified movie.
4329
+ *
4330
+ * > **Note**: When calling `queryReferencedDataItems()` following an update to your collection, the data retrieved may not contain the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
4331
+ * @param - Options for querying referenced data items.
4332
+ */
4333
+ (options?: QueryReferencedDataItemsOptions | undefined): Promise<QueryReferencedDataItemsResponse & QueryReferencedDataItemsResponseNonNullableFields>;
4334
+ }
4335
+ declare function isReferencedDataItem$1(httpClient: HttpClient): IsReferencedDataItemSignature;
4336
+ interface IsReferencedDataItemSignature {
4337
+ /**
4338
+ * Checks whether a field in a referring item contains a reference to a specified item.
4339
+ *
4340
+ * > **Note**: When calling `isReferencedDataItem()` following an update to your collection, the result returned may not reflect the most recent changes. If you need the most up-to-date data, set `options.consistentRead` to `true`.
4341
+ * @param - Options for checking whether a field contains a reference to an item.
4342
+ */
4343
+ (options?: IsReferencedDataItemOptions | undefined): Promise<IsReferencedDataItemResponse & IsReferencedDataItemResponseNonNullableFields>;
4344
+ }
4345
+ declare function insertDataItemReference$1(httpClient: HttpClient): InsertDataItemReferenceSignature;
4346
+ interface InsertDataItemReferenceSignature {
4347
+ /**
4348
+ * Inserts a reference in the specified field in an item in a collection.
4349
+ *
4350
+ *
4351
+ * A reference in `options.dataItemReference` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
4352
+ * @param - Options for inserting a reference.
4353
+ */
4354
+ (options?: InsertDataItemReferenceOptions | undefined): Promise<InsertDataItemReferenceResponse & InsertDataItemReferenceResponseNonNullableFields>;
4355
+ }
4356
+ declare function removeDataItemReference$1(httpClient: HttpClient): RemoveDataItemReferenceSignature;
4357
+ interface RemoveDataItemReferenceSignature {
4358
+ /**
4359
+ * Removes the specified reference from the specified field.
4360
+ * @param - Options for removing a reference.
4361
+ */
4362
+ (options: RemoveDataItemReferenceOptions): Promise<RemoveDataItemReferenceResponse & RemoveDataItemReferenceResponseNonNullableFields>;
4363
+ }
4364
+ declare function bulkInsertDataItemReferences$1(httpClient: HttpClient): BulkInsertDataItemReferencesSignature;
4365
+ interface BulkInsertDataItemReferencesSignature {
4366
+ /**
4367
+ * Inserts one or more references in the specified fields of items in a collection.
4368
+ *
4369
+ *
4370
+ * This endpoint adds one or more references to a collection.
4371
+ * Each new reference in `options.dataItemReferences` specifies a referring item's ID, the field in which to insert the reference, and the ID of the referenced item.
4372
+ * @param - Options for inserting one or more references.
4373
+ */
4374
+ (options?: BulkInsertDataItemReferencesOptions | undefined): Promise<BulkInsertDataItemReferencesResponse & BulkInsertDataItemReferencesResponseNonNullableFields>;
4375
+ }
4376
+ declare function bulkRemoveDataItemReferences$1(httpClient: HttpClient): BulkRemoveDataItemReferencesSignature;
4377
+ interface BulkRemoveDataItemReferencesSignature {
4378
+ /**
4379
+ * Removes one or more references.
4380
+ * @param - Options for removing one or more references.
4381
+ */
4382
+ (options: BulkRemoveDataItemReferencesOptions): Promise<BulkRemoveDataItemReferencesResponse & BulkRemoveDataItemReferencesResponseNonNullableFields>;
4383
+ }
4384
+ declare function replaceDataItemReferences$1(httpClient: HttpClient): ReplaceDataItemReferencesSignature;
4385
+ interface ReplaceDataItemReferencesSignature {
4386
+ /**
4387
+ * Replaces references in a specified field of a specified data item.
4388
+ *
4389
+ *
4390
+ * This function replaces the existing reference or references contained in the field specified in `options.referringItemFieldName` within the data item specified in `options.referringItemId`.
4391
+ * The function removes existing references and in their place it adds references to the items specified in `options.newReferencedItemIds`.
4392
+ *
4393
+ * > **Note:** If you pass an empty array in `options.newReferencedItemIds`, all existing references are removed.
4394
+ * @param - Options for replacing references.
4395
+ */
4396
+ (options?: ReplaceDataItemReferencesOptions | undefined): Promise<ReplaceDataItemReferencesResponse & ReplaceDataItemReferencesResponseNonNullableFields>;
4397
+ }
3590
4398
  declare const onDataItemCreated$1: EventDefinition<DataItemCreatedEnvelope, "wix.data.v2.data_item_created">;
3591
4399
  declare const onDataItemUpdated$1: EventDefinition<DataItemUpdatedEnvelope, "wix.data.v2.data_item_updated">;
3592
4400
  declare const onDataItemDeleted$1: EventDefinition<DataItemDeletedEnvelope, "wix.data.v2.data_item_deleted">;
@@ -3639,12 +4447,21 @@ type _publicReplaceDataItemReferencesType = typeof replaceDataItemReferences$1;
3639
4447
  declare const replaceDataItemReferences: ReturnType<typeof createRESTModule$1<_publicReplaceDataItemReferencesType>>;
3640
4448
 
3641
4449
  type _publicOnDataItemCreatedType = typeof onDataItemCreated$1;
4450
+ /**
4451
+ * Triggered when a data item is inserted.
4452
+ */
3642
4453
  declare const onDataItemCreated: ReturnType<typeof createEventModule<_publicOnDataItemCreatedType>>;
3643
4454
 
3644
4455
  type _publicOnDataItemUpdatedType = typeof onDataItemUpdated$1;
4456
+ /**
4457
+ * Triggered when a data item is updated.
4458
+ */
3645
4459
  declare const onDataItemUpdated: ReturnType<typeof createEventModule<_publicOnDataItemUpdatedType>>;
3646
4460
 
3647
4461
  type _publicOnDataItemDeletedType = typeof onDataItemDeleted$1;
4462
+ /**
4463
+ * Triggered when a data item is deleted.
4464
+ */
3648
4465
  declare const onDataItemDeleted: ReturnType<typeof createEventModule<_publicOnDataItemDeletedType>>;
3649
4466
 
3650
4467
  type context$1_ACTION = ACTION;
@@ -4023,9 +4840,51 @@ interface ListIndexesOptions {
4023
4840
  paging?: Paging;
4024
4841
  }
4025
4842
 
4026
- declare function createIndex$1(httpClient: HttpClient): (dataCollectionId: string, index: Index) => Promise<Index & IndexNonNullableFields>;
4027
- declare function dropIndex$1(httpClient: HttpClient): (dataCollectionId: string, indexName: string) => Promise<void>;
4028
- declare function listIndexes$1(httpClient: HttpClient): (dataCollectionId: string, options?: ListIndexesOptions) => Promise<ListIndexesResponse & ListIndexesResponseNonNullableFields>;
4843
+ declare function createIndex$1(httpClient: HttpClient): CreateIndexSignature;
4844
+ interface CreateIndexSignature {
4845
+ /**
4846
+ * Creates an index for a data collection.
4847
+ *
4848
+ * The index can't be used immediately, as the process of generating the index takes time.
4849
+ * You can check whether your index is ready using `listIndexes()`.
4850
+ *
4851
+ * Note that when an index fails to create, the failed index still occupies a slot.
4852
+ * To remove the failed index and free up the slot for a new index, use `dropIndex()`.
4853
+ * @param - ID of the data collection for which to generate the index.
4854
+ * @param - Details of the index to be created.
4855
+ * @param - Options for creating an index.
4856
+ * @returns Details of the index being generated.
4857
+ */
4858
+ (dataCollectionId: string, index: Index): Promise<Index & IndexNonNullableFields>;
4859
+ }
4860
+ declare function dropIndex$1(httpClient: HttpClient): DropIndexSignature;
4861
+ interface DropIndexSignature {
4862
+ /**
4863
+ * Removes an index from a data collection.
4864
+ *
4865
+ * The process of dropping an index from a collection takes time.
4866
+ * You can check whether your index has been dropped by calling `listIndexes()`.
4867
+ * @param - ID of the data collection for which the index to be dropped is defined.
4868
+ * @param - Name of the index to drop.
4869
+ * @param - Options for dropping an index.
4870
+ */
4871
+ (dataCollectionId: string, indexName: string): Promise<void>;
4872
+ }
4873
+ declare function listIndexes$1(httpClient: HttpClient): ListIndexesSignature;
4874
+ interface ListIndexesSignature {
4875
+ /**
4876
+ * Lists all indexes defined for a data collection.
4877
+ *
4878
+ * When an index's status is `ACTIVE`, it is ready to use.
4879
+ * While it is still being created, its status is `BUILDING`.
4880
+ *
4881
+ * When an index's status is `DROPPED`, it has been dropped successfully.
4882
+ * While it is still in the process of being removed, its status is `DROPPING`.
4883
+ * @param - ID of the data collection for which to list indexes.
4884
+ * @param - Options for retrieving a list of indexes.
4885
+ */
4886
+ (dataCollectionId: string, options?: ListIndexesOptions | undefined): Promise<ListIndexesResponse & ListIndexesResponseNonNullableFields>;
4887
+ }
4029
4888
 
4030
4889
  declare function createRESTModule<T extends RESTFunctionDescriptor>(descriptor: T, elevated?: boolean): BuildRESTFunction<T> & T;
4031
4890