@wix/wix-data-items-common 1.0.64 → 1.0.65

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/types.ts"],"sourcesContent":["export interface WixDataOptions {\n /**\n * Prevents hooks from running for the operation. Can only be used in backend code.\n */\n suppressHooks?: boolean\n\n /**\n * If `true`, operations work on draft items too.\n * Read operations includes draft items in response.\n * Write operations modifies draft items.\n */\n showDrafts?: boolean\n\n /**\n * Optional instructions for accessing Wix App Collections.\n */\n appOptions?: Record<string, any>\n}\n\nexport interface WixDataReadOptions extends WixDataOptions {\n /**\n * Language to translate result text into, in\n * [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.\n *\n * **Note:** Translation for the specified language must be enabled for the collection in\n * [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n * If not provided, result text is not translated.\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. See Wix Data and Eventual Consistency for more information.\n */\n consistentRead?: boolean\n}\n\nexport interface WixDataReadWithProjectionOptions\n extends WixDataReadOptions,\n ProjectionOptions {}\n\nexport interface WixDataUpdateOptions extends WixDataOptions {\n /**\n * If true, referenced items will be included.\n * @internal\n */\n includeReferences?: boolean\n}\n\nexport interface WixDataQueryOptions extends WixDataReadOptions {\n /**\n * When `true`, the query result 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 */\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 */\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\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 * The description of the error.\n */\n message: string\n\n /**\n * The 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 * The failed item (or ID in case of `bulkRemove`).\n */\n item: WixDataItem | string\n}\n\nexport interface WixDataBulkResult {\n /**\n * The number of inserted items.\n */\n inserted: number\n\n /**\n * The number of updated items.\n */\n updated: number\n\n /**\n * The number of removed items.\n */\n removed: number\n\n /**\n * The 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":""}
1
+ {"version":3,"names":[],"sources":["../../../src/api/types.ts"],"sourcesContent":["export interface WixDataOptions {\n /**\n * Prevents hooks from running for the operation. Can only be used in backend code.\n */\n suppressHooks?: boolean\n\n /**\n * If `true`, operations work on draft items too.\n * Read operations includes draft items in response.\n * Write operations modifies draft items.\n */\n showDrafts?: boolean\n\n /**\n * Optional instructions for accessing Wix App Collections.\n */\n appOptions?: Record<string, any>\n}\n\nexport interface WixDataReadOptions extends WixDataOptions {\n /**\n * Language to translate result text into, in\n * [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.\n *\n * **Note:** Translation for the specified language must be enabled for the collection in\n * [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n * If not provided, result text is not translated.\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 WixDataUpdateOptions extends WixDataOptions {\n /**\n * If true, referenced items will be included.\n * @internal\n */\n includeReferences?: boolean\n}\n\nexport interface WixDataQueryOptions extends WixDataReadOptions {\n /**\n * When `true`, the query result 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 */\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 */\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\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 * The description of the error.\n */\n message: string\n\n /**\n * The 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 * The failed item (or ID in case of `bulkRemove`).\n */\n item: WixDataItem | string\n}\n\nexport interface WixDataBulkResult {\n /**\n * The number of inserted items.\n */\n inserted: number\n\n /**\n * The number of updated items.\n */\n updated: number\n\n /**\n * The number of removed items.\n */\n removed: number\n\n /**\n * The 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":""}
@@ -28,7 +28,7 @@ export interface WixDataReadOptions extends WixDataOptions {
28
28
  language?: string;
29
29
  /**
30
30
  * When true, reads data from the primary database instance. This decreases performance but ensures data retrieved is
31
- * up-to-date even immediately after an update. See Wix Data and Eventual Consistency for more information.
31
+ * 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).
32
32
  */
33
33
  consistentRead?: boolean;
34
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/wix-data-items-common",
3
- "version": "1.0.64",
3
+ "version": "1.0.65",
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": "dfb1b4864c69f3bfa479b720b4cb627ce4ce12812efa6d16c602db33"
88
+ "falconPackageHash": "d743652489d9de5935487924c26046a4b44113e439361974945742c5"
89
89
  }