@wix/wix-data-items-common 1.0.248 → 1.0.249

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 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/api/WixDataPatch.ts"],"sourcesContent":["import { WixDataItem, WixDataBulkResult, WixDataPatchOptions } from './types'\n\nexport interface FieldModification {\n fieldPath: string\n action:\n | 'SET_FIELD'\n | 'REMOVE_FIELD'\n | 'INCREMENT_FIELD'\n | 'APPEND_TO_ARRAY'\n | 'REMOVE_FROM_ARRAY'\n actionOptions?: any\n}\n\n/**\n * @builder\n */\nexport interface WixDataBulkPatch {\n /**\n * Refines a patch operation to increment the specified field value by the specified parameter.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is incremented. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param by - Value by which to increment the specified field. To decrement, specify a negative value.\n * @requiredField by\n * @returns Updated patch object.\n */\n incrementField(field: string, by: number): WixDataBulkPatch\n\n /**\n * Refines a patch operation to set the specified field to the specified value.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is set. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to set for the specified field.\n * @requiredField value\n * @returns Updated patch object.\n */\n setField(field: string, value: any): WixDataBulkPatch\n\n /**\n * Refines a patch operation to append the specified value to the specified array field.\n * @public\n * @documentationMaturity preview\n * @param field - Array field to append the specified value to. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to append to the specified array field.\n * @requiredField value\n * @returns Updated patch object.\n */\n appendToArray(field: string, value: any): WixDataBulkPatch\n\n /**\n * Refines a patch operation to remove the first instance of the specified value from the specified array field.\n * @public\n * @documentationMaturity preview\n * @param field - Array field to remove the specified value from. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value whose first instance is removed from the specified array field.\n * @requiredField value\n * @returns Updated patch object.\n */\n removeFromArray(field: string, value: any): WixDataBulkPatch\n\n /**\n * Refines a patch operation to clear the specified field.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is cleared. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @returns Updated patch object.\n */\n removeField(field: string): WixDataBulkPatch\n\n /**\n * Runs the bulk patch operation and returns a Promise that resolves to information about the results.\n *\n * @public\n * @documentationMaturity preview\n * @returns Bulk operation results.\n */\n run(options?: WixDataPatchOptions): Promise<WixDataBulkResult>\n}\n\n/**\n * @builder\n */\nexport interface WixDataPatch {\n /**\n * Refines a patch operation to increment the specified field value by the specified parameter.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is incremented. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param by - Value by which to increment the specified field. To decrement, specify a negative value.\n * @requiredField by\n * @returns Updated patch object.\n */\n incrementField(field: string, by: number): WixDataPatch\n\n /**\n * Refines a patch operation to set the specified field to the specified value.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is set. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to set for the specified field.\n * @requiredField value\n * @returns Updated patch object.\n */\n setField(field: string, value: any): WixDataPatch\n\n /**\n * Refines a patch operation to append the specified value to the specified array field.\n * @public\n * @documentationMaturity preview\n * @param field - Array field to append the specified value to. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to append to the specified array field.\n * @requiredField value\n * @returns Updated patch object.\n */\n appendToArray(field: string, value: any): WixDataPatch\n\n /**\n * Refines a patch operation to remove the first instance of the specified value from the specified array field.\n * @public\n * @documentationMaturity preview\n * @param field - Array field to remove the specified value from. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value whose first instance is removed from the specified array field.\n * @requiredField value\n * @returns Updated patch object.\n */\n removeFromArray(field: string, value: any): WixDataPatch\n\n /**\n * Refines a patch operation to clear the specified field.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is cleared. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @returns Updated patch object.\n */\n removeField(field: string): WixDataPatch\n\n /**\n * Runs the patch operation and returns a Promise that resolves to the patched item and operation metadata.\n *\n * @public\n * @documentationMaturity preview\n * @returns Modified data item.\n */\n\n run(options?: WixDataPatchOptions): Promise<WixDataItem | null>\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/api/WixDataPatch.ts"],"sourcesContent":["import {\n WixDataItem,\n WixDataBulkResult,\n WixDataPatchOptions,\n WixDataBulkPatchOptions,\n} from './types'\n\nexport interface FieldModification {\n fieldPath: string\n action:\n | 'SET_FIELD'\n | 'REMOVE_FIELD'\n | 'INCREMENT_FIELD'\n | 'APPEND_TO_ARRAY'\n | 'REMOVE_FROM_ARRAY'\n actionOptions?: any\n}\n\n/**\n * @builder\n */\nexport interface WixDataBulkPatch {\n /**\n * Refines a patch operation to increment the specified field value by the specified parameter.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is incremented. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param by - Value by which to increment the specified field. To decrement, specify a negative value.\n * @requiredField by\n * @returns Updated patch object.\n */\n incrementField(field: string, by: number): WixDataBulkPatch\n\n /**\n * Refines a patch operation to set the specified field to the specified value.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is set. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to set for the specified field.\n * @requiredField value\n * @returns Updated patch object.\n */\n setField(field: string, value: any): WixDataBulkPatch\n\n /**\n * Refines a patch operation to append the specified value to the specified array field.\n * @public\n * @documentationMaturity preview\n * @param field - Array field to append the specified value to. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to append to the specified array field.\n * @requiredField value\n * @returns Updated patch object.\n */\n appendToArray(field: string, value: any): WixDataBulkPatch\n\n /**\n * Refines a patch operation to remove the first instance of the specified value from the specified array field.\n * @public\n * @documentationMaturity preview\n * @param field - Array field to remove the specified value from. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value whose first instance is removed from the specified array field.\n * @requiredField value\n * @returns Updated patch object.\n */\n removeFromArray(field: string, value: any): WixDataBulkPatch\n\n /**\n * Refines a patch operation to clear the specified field.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is cleared. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @returns Updated patch object.\n */\n removeField(field: string): WixDataBulkPatch\n\n /**\n * Runs the bulk patch operation and returns a Promise that resolves to information about the results.\n *\n * @public\n * @documentationMaturity preview\n * @returns Bulk operation results.\n */\n run(options?: WixDataBulkPatchOptions): Promise<WixDataBulkResult>\n}\n\n/**\n * @builder\n */\nexport interface WixDataPatch {\n /**\n * Refines a patch operation to increment the specified field value by the specified parameter.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is incremented. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param by - Value by which to increment the specified field. To decrement, specify a negative value.\n * @requiredField by\n * @returns Updated patch object.\n */\n incrementField(field: string, by: number): WixDataPatch\n\n /**\n * Refines a patch operation to set the specified field to the specified value.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is set. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to set for the specified field.\n * @requiredField value\n * @returns Updated patch object.\n */\n setField(field: string, value: any): WixDataPatch\n\n /**\n * Refines a patch operation to append the specified value to the specified array field.\n * @public\n * @documentationMaturity preview\n * @param field - Array field to append the specified value to. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to append to the specified array field.\n * @requiredField value\n * @returns Updated patch object.\n */\n appendToArray(field: string, value: any): WixDataPatch\n\n /**\n * Refines a patch operation to remove the first instance of the specified value from the specified array field.\n * @public\n * @documentationMaturity preview\n * @param field - Array field to remove the specified value from. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value whose first instance is removed from the specified array field.\n * @requiredField value\n * @returns Updated patch object.\n */\n removeFromArray(field: string, value: any): WixDataPatch\n\n /**\n * Refines a patch operation to clear the specified field.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is cleared. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @returns Updated patch object.\n */\n removeField(field: string): WixDataPatch\n\n /**\n * Runs the patch operation and returns a Promise that resolves to the patched item and operation metadata.\n *\n * @public\n * @documentationMaturity preview\n * @returns Modified data item.\n */\n\n run(options?: WixDataPatchOptions): Promise<WixDataItem | null>\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/api/types.ts"],"sourcesContent":["import { WixDataFilter } from './WixDataFilter'\n\nexport interface BaseOptions {\n /**\n * Prevents hooks from running for the operation. Can only be used in the [backend code of a Wix site](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/about-the-site-backend).\n *\n * Default: `false`.\n */\n suppressHooks?: boolean\n\n /**\n * When `true`, operations include draft items. Read operations include draft items in their response, and write operations modify draft items.\n *\n * Default: `false`.\n */\n showDrafts?: boolean\n}\n\nexport interface WithAppOptions {\n /**\n * Options for [querying Wix app collections](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections).\n */\n appOptions?: Record<string, any>\n}\n\nexport interface WixDataRemoveOptions extends WixDataOptions {\n /** @internal */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkPatchOptions extends WixDataOptions {\n /** @internal */\n condition?: WixDataFilter\n}\n\nexport interface WixDataOptions extends BaseOptions, WithAppOptions {}\n\nexport interface WixDataReadOptions extends WixDataOptions, WithAppOptions {\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * > **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string\n\n /**\n * When `true`, reads data from the primary database instance. This decreases performance but ensures data retrieved is\n * up-to-date even immediately after an update. Learn more about [Wix Data and eventual consistency](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency).\n */\n consistentRead?: boolean\n}\n\nexport interface WixDataReadWithProjectionOptions\n extends WixDataReadOptions,\n ProjectionOptions {}\n\nexport interface WixDataSaveOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n}\n\nexport interface WixDataInsertOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n}\n\nexport interface WixDataUpdateOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n /** @internal */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkUpdateOptions extends WixDataOptions {\n /** @internal */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkRemoveOptions extends WixDataOptions {\n /** @internal */\n condition?: WixDataFilter\n}\n\nexport interface WixDataPatchOptions extends BaseOptions {\n /** @internal */\n condition?: WixDataFilter\n}\n\nexport interface WixDataAggregateOptions extends WixDataQueryOptions {}\n\nexport interface WixDataQueryOptions extends WixDataReadOptions {\n /**\n * When `true`, the query results include a `totalCount` and `totalPages` properties containing the totals of items\n * matching query. Requesting total count slows down the query.\n *\n * Default: `false`\n */\n returnTotalCount?: boolean\n}\n\nexport interface WixDataQueryReferencedOptions\n extends WixDataQueryOptions,\n ProjectionOptions {\n /**\n * Order of the returned referenced items. Sorted by the date each item was referenced.\n *\n * Default: `asc`\n */\n order?: 'asc' | 'desc'\n\n /**\n * Number of items to load.\n *\n * Default: `50`\n */\n skip?: number\n\n /**\n * Number of items to skip in the current sort order.\n *\n * Default: `0`\n */\n limit?: number\n}\n\ninterface ProjectionOptions {\n /**\n * Lists of fields to return in a result.\n */\n fields?: string[]\n}\n\nexport interface WixDataItem {\n /**\n * Data item ID.\n */\n _id: string\n\n /**\n * Date and time the item was added to the collection.\n * @readonly\n */\n _createdDate?: Date\n\n /**\n * Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have\n * the same value.\n * @readonly\n */\n _updatedDate?: Date\n\n /**\n * ID of the user who created the item. Can be modified with site owner permissions.\n */\n _owner?: string\n\n /**\n * Data item contents.\n */\n [key: string]: any\n}\n\nexport type WixDataItemOrId = WixDataItem | string\nexport type Comparable = string | number | Date\n\nexport interface WixDataReference {\n relationshipName: string\n left: WixDataItemOrId\n right: WixDataItemOrId\n}\n\nexport interface Provider<T> {\n get(): T | Promise<T>\n}\n\nexport interface WixDataBulkError extends Error {\n /**\n * Description of the error.\n */\n message: string\n\n /**\n * Error code.\n */\n code: string\n\n /**\n * Index of the item within the request array. Allows for correlation between request and response items.\n */\n originalIndex: number\n\n /**\n * Failed item (or ID in case of `bulkRemove()`).\n */\n item: WixDataItem | string\n}\n\nexport interface WixDataBulkResult {\n /**\n * Number of inserted items.\n */\n inserted: number\n\n /**\n * Number of updated items.\n */\n updated: number\n\n /**\n * Number of removed items.\n */\n removed: number\n\n /**\n * Number of skipped items.\n */\n skipped: number\n\n /**\n * List of errors.\n */\n errors: WixDataBulkError[]\n\n /**\n * List of IDs of inserted items.\n */\n insertedItemIds: string[]\n\n /**\n * List of IDs of updated items.\n */\n updatedItemIds: string[]\n\n /**\n * List of IDs of removed items.\n */\n removedItemIds: string[]\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/api/types.ts"],"sourcesContent":["import { WixDataFilter } from './WixDataFilter'\n\nexport interface BaseOptions {\n /**\n * Prevents hooks from running for the operation. Can only be used in the [backend code of a Wix site](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/about-the-site-backend).\n *\n * Default: `false`.\n */\n suppressHooks?: boolean\n\n /**\n * When `true`, operations include draft items. Read operations include draft items in their response, and write operations modify draft items.\n *\n * Default: `false`.\n */\n showDrafts?: boolean\n}\n\nexport interface WithAppOptions {\n /**\n * Options for [querying Wix app collections](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections).\n */\n appOptions?: Record<string, any>\n}\n\nexport interface WixDataRemoveOptions extends WixDataOptions {\n /**\n * If provided, item will be updated only if condition is met.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkPatchOptions extends WixDataOptions {\n /**\n * If provided, only items matching condition will be patched.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataOptions extends BaseOptions, WithAppOptions {}\n\nexport interface WixDataReadOptions extends WixDataOptions, WithAppOptions {\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * > **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string\n\n /**\n * When `true`, reads data from the primary database instance. This decreases performance but ensures data retrieved is\n * up-to-date even immediately after an update. Learn more about [Wix Data and eventual consistency](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency).\n */\n consistentRead?: boolean\n}\n\nexport interface WixDataReadWithProjectionOptions\n extends WixDataReadOptions,\n ProjectionOptions {}\n\nexport interface WixDataSaveOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n}\n\nexport interface WixDataInsertOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n}\n\nexport interface WixDataUpdateOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n /**\n * If provided, item will be updated only if condition is met.\n * @internal\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkUpdateOptions extends WixDataOptions {\n /**\n * If provided, only items matching condition will be updated.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkRemoveOptions extends WixDataOptions {\n /**\n * If provided, only items matching condition will be removed.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataPatchOptions extends BaseOptions {\n /**\n * If provided, item will be patched only if condition is met.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataAggregateOptions extends WixDataQueryOptions {}\n\nexport interface WixDataQueryOptions extends WixDataReadOptions {\n /**\n * When `true`, the query results include a `totalCount` and `totalPages` properties containing the totals of items\n * matching query. Requesting total count slows down the query.\n *\n * Default: `false`\n */\n returnTotalCount?: boolean\n}\n\nexport interface WixDataQueryReferencedOptions\n extends WixDataQueryOptions,\n ProjectionOptions {\n /**\n * Order of the returned referenced items. Sorted by the date each item was referenced.\n *\n * Default: `asc`\n */\n order?: 'asc' | 'desc'\n\n /**\n * Number of items to load.\n *\n * Default: `50`\n */\n skip?: number\n\n /**\n * Number of items to skip in the current sort order.\n *\n * Default: `0`\n */\n limit?: number\n}\n\ninterface ProjectionOptions {\n /**\n * Lists of fields to return in a result.\n */\n fields?: string[]\n}\n\nexport interface WixDataItem {\n /**\n * Data item ID.\n */\n _id: string\n\n /**\n * Date and time the item was added to the collection.\n * @readonly\n */\n _createdDate?: Date\n\n /**\n * Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have\n * the same value.\n * @readonly\n */\n _updatedDate?: Date\n\n /**\n * ID of the user who created the item. Can be modified with site owner permissions.\n */\n _owner?: string\n\n /**\n * Data item contents.\n */\n [key: string]: any\n}\n\nexport type WixDataItemOrId = WixDataItem | string\nexport type Comparable = string | number | Date\n\nexport interface WixDataReference {\n relationshipName: string\n left: WixDataItemOrId\n right: WixDataItemOrId\n}\n\nexport interface Provider<T> {\n get(): T | Promise<T>\n}\n\nexport interface WixDataBulkError extends Error {\n /**\n * Description of the error.\n */\n message: string\n\n /**\n * Error code.\n */\n code: string\n\n /**\n * Index of the item within the request array. Allows for correlation between request and response items.\n */\n originalIndex: number\n\n /**\n * Failed item (or ID in case of `bulkRemove()`).\n */\n item: WixDataItem | string\n}\n\nexport interface WixDataBulkResult {\n /**\n * Number of inserted items.\n */\n inserted: number\n\n /**\n * Number of updated items.\n */\n updated: number\n\n /**\n * Number of removed items.\n */\n removed: number\n\n /**\n * Number of skipped items.\n */\n skipped: number\n\n /**\n * List of errors.\n */\n errors: WixDataBulkError[]\n\n /**\n * List of IDs of inserted items.\n */\n insertedItemIds: string[]\n\n /**\n * List of IDs of updated items.\n */\n updatedItemIds: string[]\n\n /**\n * List of IDs of removed items.\n */\n removedItemIds: string[]\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { WixDataItem, WixDataBulkResult, WixDataPatchOptions } from './types';
1
+ import { WixDataItem, WixDataBulkResult, WixDataPatchOptions, WixDataBulkPatchOptions } from './types';
2
2
  export interface FieldModification {
3
3
  fieldPath: string;
4
4
  action: 'SET_FIELD' | 'REMOVE_FIELD' | 'INCREMENT_FIELD' | 'APPEND_TO_ARRAY' | 'REMOVE_FROM_ARRAY';
@@ -68,7 +68,7 @@ export interface WixDataBulkPatch {
68
68
  * @documentationMaturity preview
69
69
  * @returns Bulk operation results.
70
70
  */
71
- run(options?: WixDataPatchOptions): Promise<WixDataBulkResult>;
71
+ run(options?: WixDataBulkPatchOptions): Promise<WixDataBulkResult>;
72
72
  }
73
73
  /**
74
74
  * @builder
@@ -1 +1 @@
1
- {"version":3,"file":"WixDataPatch.d.ts","sourceRoot":"","sources":["../../../src/api/WixDataPatch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAE7E,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EACF,WAAW,GACX,cAAc,GACd,iBAAiB,GACjB,iBAAiB,GACjB,mBAAmB,CAAA;IACvB,aAAa,CAAC,EAAE,GAAG,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;;;;OASG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,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ACH,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,YAAY,CAAA;IAExD;;;;;;;OAOG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY,CAAA;IAExC;;;;;;OAMG;IAEH,GAAG,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CAChE"}
@@ -20,11 +20,15 @@ export interface WithAppOptions {
20
20
  appOptions?: Record<string, any>;
21
21
  }
22
22
  export interface WixDataRemoveOptions extends WixDataOptions {
23
- /** @internal */
23
+ /**
24
+ * If provided, item will be updated only if condition is met.
25
+ */
24
26
  condition?: WixDataFilter;
25
27
  }
26
28
  export interface WixDataBulkPatchOptions extends WixDataOptions {
27
- /** @internal */
29
+ /**
30
+ * If provided, only items matching condition will be patched.
31
+ */
28
32
  condition?: WixDataFilter;
29
33
  }
30
34
  export interface WixDataOptions extends BaseOptions, WithAppOptions {
@@ -66,19 +70,28 @@ export interface WixDataUpdateOptions extends WixDataOptions {
66
70
  * @internal
67
71
  */
68
72
  includeReferences?: boolean;
69
- /** @internal */
73
+ /**
74
+ * If provided, item will be updated only if condition is met.
75
+ * @internal
76
+ */
70
77
  condition?: WixDataFilter;
71
78
  }
72
79
  export interface WixDataBulkUpdateOptions extends WixDataOptions {
73
- /** @internal */
80
+ /**
81
+ * If provided, only items matching condition will be updated.
82
+ */
74
83
  condition?: WixDataFilter;
75
84
  }
76
85
  export interface WixDataBulkRemoveOptions extends WixDataOptions {
77
- /** @internal */
86
+ /**
87
+ * If provided, only items matching condition will be removed.
88
+ */
78
89
  condition?: WixDataFilter;
79
90
  }
80
91
  export interface WixDataPatchOptions extends BaseOptions {
81
- /** @internal */
92
+ /**
93
+ * If provided, item will be patched only if condition is met.
94
+ */
82
95
  condition?: WixDataFilter;
83
96
  }
84
97
  export interface WixDataAggregateOptions extends WixDataQueryOptions {
@@ -1 +1 @@
1
- {"version":3,"file":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IACH,MAAM,EAAE,gBAAgB,EAAE,CAAA;IAE1B;;OAEG;IACH,eAAe,EAAE,MAAM,EAAE,CAAA;IAEzB;;OAEG;IACH,cAAc,EAAE,MAAM,EAAE,CAAA;IAExB;;OAEG;IACH,cAAc,EAAE,MAAM,EAAE,CAAA;CACzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/wix-data-items-common",
3
- "version": "1.0.248",
3
+ "version": "1.0.249",
4
4
  "license": "UNLICENSED",
5
5
  "author": {
6
6
  "name": "Rimvydas Gimbutas",
@@ -85,5 +85,5 @@
85
85
  "wallaby": {
86
86
  "autoDetect": true
87
87
  },
88
- "falconPackageHash": "1ba1de178157bca34046b100664ed0b3842c26ce8c7fdb3be08700fd"
88
+ "falconPackageHash": "ffcf174308b3469ec7ade27a2c5b741716dd66b4898c8747ba3c18c0"
89
89
  }