@wix/wix-data-items-common 1.0.319 → 1.0.321

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.
Files changed (95) hide show
  1. package/dist/cjs/api/WixDataAggregateOptionsBuilder.js +3 -3
  2. package/dist/cjs/api/WixDataAggregateOptionsBuilder.js.map +1 -1
  3. package/dist/cjs/api/WixDataAsyncPatchByFilterOptionsBuilder.js +3 -3
  4. package/dist/cjs/api/WixDataAsyncPatchByFilterOptionsBuilder.js.map +1 -1
  5. package/dist/cjs/api/WixDataAsyncRemoveByFilterOptionsBuilder.js +3 -3
  6. package/dist/cjs/api/WixDataAsyncRemoveByFilterOptionsBuilder.js.map +1 -1
  7. package/dist/cjs/api/WixDataBulkInsertOptionsBuilder.js +3 -3
  8. package/dist/cjs/api/WixDataBulkInsertOptionsBuilder.js.map +1 -1
  9. package/dist/cjs/api/WixDataBulkPatchOptionsBuilder.js +3 -3
  10. package/dist/cjs/api/WixDataBulkPatchOptionsBuilder.js.map +1 -1
  11. package/dist/cjs/api/WixDataBulkRemoveOptionsBuilder.js +3 -3
  12. package/dist/cjs/api/WixDataBulkRemoveOptionsBuilder.js.map +1 -1
  13. package/dist/cjs/api/WixDataBulkSaveOptionsBuilder.js +3 -3
  14. package/dist/cjs/api/WixDataBulkSaveOptionsBuilder.js.map +1 -1
  15. package/dist/cjs/api/WixDataBulkUpdateOptionsBuilder.js +3 -3
  16. package/dist/cjs/api/WixDataBulkUpdateOptionsBuilder.js.map +1 -1
  17. package/dist/cjs/api/WixDataCountOptionsBuilder.js +3 -3
  18. package/dist/cjs/api/WixDataCountOptionsBuilder.js.map +1 -1
  19. package/dist/cjs/api/WixDataDistinctOptionsBuilder.js +3 -3
  20. package/dist/cjs/api/WixDataDistinctOptionsBuilder.js.map +1 -1
  21. package/dist/cjs/api/WixDataFieldModificationsBuilder.js +2 -2
  22. package/dist/cjs/api/WixDataFieldModificationsBuilder.js.map +1 -1
  23. package/dist/cjs/api/WixDataGetOptionsBuilder.js +3 -3
  24. package/dist/cjs/api/WixDataGetOptionsBuilder.js.map +1 -1
  25. package/dist/cjs/api/WixDataInsertOptionsBuilder.js +3 -3
  26. package/dist/cjs/api/WixDataInsertOptionsBuilder.js.map +1 -1
  27. package/dist/cjs/api/WixDataIsReferencedOptionsBuilder.js +3 -3
  28. package/dist/cjs/api/WixDataIsReferencedOptionsBuilder.js.map +1 -1
  29. package/dist/cjs/api/WixDataPatchOptionsBuilder.js +3 -3
  30. package/dist/cjs/api/WixDataPatchOptionsBuilder.js.map +1 -1
  31. package/dist/cjs/api/WixDataQueryBuilder.js +4 -4
  32. package/dist/cjs/api/WixDataQueryBuilder.js.map +1 -1
  33. package/dist/cjs/api/WixDataQueryOptionsBuilder.js +3 -3
  34. package/dist/cjs/api/WixDataQueryOptionsBuilder.js.map +1 -1
  35. package/dist/cjs/api/WixDataQueryReferencedItemsOptionsBuilder.js +3 -3
  36. package/dist/cjs/api/WixDataQueryReferencedItemsOptionsBuilder.js.map +1 -1
  37. package/dist/cjs/api/WixDataRemoveOptionsBuilder.js +3 -3
  38. package/dist/cjs/api/WixDataRemoveOptionsBuilder.js.map +1 -1
  39. package/dist/cjs/api/WixDataSaveOptionsBuilder.js +3 -3
  40. package/dist/cjs/api/WixDataSaveOptionsBuilder.js.map +1 -1
  41. package/dist/cjs/api/WixDataSearchBuilder.js +4 -4
  42. package/dist/cjs/api/WixDataSearchBuilder.js.map +1 -1
  43. package/dist/cjs/api/WixDataSearchOptionsBuilder.js +3 -3
  44. package/dist/cjs/api/WixDataSearchOptionsBuilder.js.map +1 -1
  45. package/dist/cjs/api/WixDataUpdateOptionsBuilder.js +3 -3
  46. package/dist/cjs/api/WixDataUpdateOptionsBuilder.js.map +1 -1
  47. package/dist/esm/api/WixDataAggregateOptionsBuilder.js +2 -2
  48. package/dist/esm/api/WixDataAsyncPatchByFilterOptionsBuilder.js +2 -2
  49. package/dist/esm/api/WixDataAsyncRemoveByFilterOptionsBuilder.js +2 -2
  50. package/dist/esm/api/WixDataBulkInsertOptionsBuilder.js +2 -2
  51. package/dist/esm/api/WixDataBulkPatchOptionsBuilder.js +2 -2
  52. package/dist/esm/api/WixDataBulkRemoveOptionsBuilder.js +2 -2
  53. package/dist/esm/api/WixDataBulkSaveOptionsBuilder.js +2 -2
  54. package/dist/esm/api/WixDataBulkUpdateOptionsBuilder.js +2 -2
  55. package/dist/esm/api/WixDataCountOptionsBuilder.js +2 -2
  56. package/dist/esm/api/WixDataDistinctOptionsBuilder.js +2 -2
  57. package/dist/esm/api/WixDataFieldModificationsBuilder.js +2 -2
  58. package/dist/esm/api/WixDataGetOptionsBuilder.js +2 -2
  59. package/dist/esm/api/WixDataInsertOptionsBuilder.js +2 -2
  60. package/dist/esm/api/WixDataIsReferencedOptionsBuilder.js +2 -2
  61. package/dist/esm/api/WixDataPatchOptionsBuilder.js +2 -2
  62. package/dist/esm/api/WixDataQueryBuilder.js +4 -4
  63. package/dist/esm/api/WixDataQueryOptionsBuilder.js +2 -2
  64. package/dist/esm/api/WixDataQueryReferencedItemsOptionsBuilder.js +2 -2
  65. package/dist/esm/api/WixDataRemoveOptionsBuilder.js +2 -2
  66. package/dist/esm/api/WixDataSaveOptionsBuilder.js +2 -2
  67. package/dist/esm/api/WixDataSearchBuilder.js +3 -3
  68. package/dist/esm/api/WixDataSearchOptionsBuilder.js +2 -2
  69. package/dist/esm/api/WixDataUpdateOptionsBuilder.js +2 -2
  70. package/dist/types/api/WixDataAggregateOptionsBuilder.d.ts +5 -5
  71. package/dist/types/api/WixDataApi.d.ts +1 -1
  72. package/dist/types/api/WixDataApi.d.ts.map +1 -1
  73. package/dist/types/api/WixDataAsyncPatchByFilterOptionsBuilder.d.ts +5 -5
  74. package/dist/types/api/WixDataAsyncRemoveByFilterOptionsBuilder.d.ts +5 -5
  75. package/dist/types/api/WixDataBulkInsertOptionsBuilder.d.ts +6 -6
  76. package/dist/types/api/WixDataBulkPatchOptionsBuilder.d.ts +6 -6
  77. package/dist/types/api/WixDataBulkRemoveOptionsBuilder.d.ts +6 -6
  78. package/dist/types/api/WixDataBulkSaveOptionsBuilder.d.ts +6 -6
  79. package/dist/types/api/WixDataBulkUpdateOptionsBuilder.d.ts +7 -7
  80. package/dist/types/api/WixDataCountOptionsBuilder.d.ts +5 -5
  81. package/dist/types/api/WixDataDistinctOptionsBuilder.d.ts +6 -6
  82. package/dist/types/api/WixDataFieldModificationsBuilder.d.ts +2 -2
  83. package/dist/types/api/WixDataGetOptionsBuilder.d.ts +5 -5
  84. package/dist/types/api/WixDataInsertOptionsBuilder.d.ts +7 -7
  85. package/dist/types/api/WixDataIsReferencedOptionsBuilder.d.ts +3 -3
  86. package/dist/types/api/WixDataPatchOptionsBuilder.d.ts +6 -6
  87. package/dist/types/api/WixDataQueryBuilder.d.ts +4 -4
  88. package/dist/types/api/WixDataQueryOptionsBuilder.d.ts +7 -7
  89. package/dist/types/api/WixDataQueryReferencedItemsOptionsBuilder.d.ts +5 -5
  90. package/dist/types/api/WixDataRemoveOptionsBuilder.d.ts +6 -6
  91. package/dist/types/api/WixDataSaveOptionsBuilder.d.ts +7 -7
  92. package/dist/types/api/WixDataSearchBuilder.d.ts +4 -4
  93. package/dist/types/api/WixDataSearchOptionsBuilder.d.ts +4 -4
  94. package/dist/types/api/WixDataUpdateOptionsBuilder.d.ts +8 -8
  95. package/package.json +4 -4
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.InsertOptionsBuilder = void 0;
5
5
  /**
6
- * Builder for insert options used by Wix Data insert operations.
6
+ * Options builder for insert operations.
7
7
  *
8
8
  * Use this builder to configure insert behavior such as hooks suppression,
9
9
  * and reference handling.
@@ -50,12 +50,12 @@ class WixDataInsertOptionsBuilderImpl {
50
50
  }
51
51
 
52
52
  /**
53
- * Creates a new WixData insert options builder.
53
+ * Creates a new insert options builder.
54
54
  * @public
55
55
  * @documentationMaturity preview
56
56
  *
57
57
  * @example
58
- * ```ts
58
+ * ```ts title="Create an insert options builder"
59
59
  * import { items, InsertOptionsBuilder } from '@wix/data'
60
60
  *
61
61
  * const options = InsertOptionsBuilder()
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataInsertOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withIncludeReferences","includeReferences","withSaveReferences","saveReferences","build","InsertOptionsBuilder","exports"],"sources":["../../../src/api/WixDataInsertOptionsBuilder.ts"],"sourcesContent":["import type { WixDataInsertOptions } from './types'\n\n/**\n * Builder for insert options used by Wix Data insert operations.\n *\n * Use this builder to configure insert behavior such as hooks suppression,\n * and reference handling.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataInsertOptionsBuilder {\n /**\n * Sets whether insert hooks are suppressed.\n *\n * When `true`, the insert runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataInsertOptionsBuilder\n /**\n * Sets whether draft items are included when inserting an item.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataInsertOptionsBuilder\n /**\n * Sets whether references are included when inserting an item.\n * @internal\n */\n withIncludeReferences(value: boolean): WixDataInsertOptionsBuilder\n /**\n * Sets whether referenced items are saved when inserting an item.\n */\n withSaveReferences(value: boolean): WixDataInsertOptionsBuilder\n /**\n * Builds the insert options object.\n */\n build(): WixDataInsertOptions\n}\n\nclass WixDataInsertOptionsBuilderImpl implements WixDataInsertOptionsBuilder {\n constructor(private readonly options: WixDataInsertOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataInsertOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataInsertOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withIncludeReferences(value: boolean): WixDataInsertOptionsBuilder {\n return this.copy({ includeReferences: value })\n }\n\n withSaveReferences(value: boolean): WixDataInsertOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n build(): WixDataInsertOptions {\n return { ...this.options }\n }\n\n private copy(options: WixDataInsertOptions): WixDataInsertOptionsBuilder {\n return new WixDataInsertOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData insert options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { items, InsertOptionsBuilder } from '@wix/data'\n *\n * const options = InsertOptionsBuilder()\n * .withSuppressHooks(true)\n * .build()\n *\n * const item = await items.insert('myCollection', { foo: 'bar' }, options)\n * ```\n */\nexport const InsertOptionsBuilder: () => WixDataInsertOptionsBuilder = () =>\n new WixDataInsertOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA4BA,MAAMA,+BAA+B,CAAwC;EAC3EC,WAAWA,CAAkBC,OAA6B,GAAG,CAAC,CAAC,EAAE;IAAA,KAApCA,OAA6B,GAA7BA,OAA6B;EAAQ;EAElEC,iBAAiBA,CAACC,KAAc,EAA+B;IAC7D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA+B;IAC1D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,qBAAqBA,CAACL,KAAc,EAA+B;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,iBAAiB,EAAEN;IAAM,CAAC,CAAC;EAChD;EAEAO,kBAAkBA,CAACP,KAAc,EAA+B;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,cAAc,EAAER;IAAM,CAAC,CAAC;EAC7C;EAEAS,KAAKA,CAAA,EAAyB;IAC5B,OAAO;MAAE,GAAG,IAAI,CAACX;IAAQ,CAAC;EAC5B;EAEQG,IAAIA,CAACH,OAA6B,EAA+B;IACvE,OAAO,IAAIF,+BAA+B,CAAC;MACzC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMY,oBAAuD,GAAGA,CAAA,KACrE,IAAId,+BAA+B,CAAC,CAAC;AAAAe,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataInsertOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withIncludeReferences","includeReferences","withSaveReferences","saveReferences","build","InsertOptionsBuilder","exports"],"sources":["../../../src/api/WixDataInsertOptionsBuilder.ts"],"sourcesContent":["import type { WixDataInsertOptions } from './types'\n\n/**\n * Options builder for insert operations.\n *\n * Use this builder to configure insert behavior such as hooks suppression,\n * and reference handling.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataInsertOptionsBuilder {\n /**\n * Sets whether to suppress insert hooks.\n *\n * When `true`, the insert runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataInsertOptionsBuilder\n /**\n * Sets whether to include draft items when inserting an item.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataInsertOptionsBuilder\n /**\n * Sets whether to include references when inserting an item.\n * @internal\n */\n withIncludeReferences(value: boolean): WixDataInsertOptionsBuilder\n /**\n * Sets whether to save referenced items when inserting an item.\n */\n withSaveReferences(value: boolean): WixDataInsertOptionsBuilder\n /**\n * Builds the insert options object.\n */\n build(): WixDataInsertOptions\n}\n\nclass WixDataInsertOptionsBuilderImpl implements WixDataInsertOptionsBuilder {\n constructor(private readonly options: WixDataInsertOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataInsertOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataInsertOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withIncludeReferences(value: boolean): WixDataInsertOptionsBuilder {\n return this.copy({ includeReferences: value })\n }\n\n withSaveReferences(value: boolean): WixDataInsertOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n build(): WixDataInsertOptions {\n return { ...this.options }\n }\n\n private copy(options: WixDataInsertOptions): WixDataInsertOptionsBuilder {\n return new WixDataInsertOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new insert options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Create an insert options builder\"\n * import { items, InsertOptionsBuilder } from '@wix/data'\n *\n * const options = InsertOptionsBuilder()\n * .withSuppressHooks(true)\n * .build()\n *\n * const item = await items.insert('myCollection', { foo: 'bar' }, options)\n * ```\n */\nexport const InsertOptionsBuilder: () => WixDataInsertOptionsBuilder = () =>\n new WixDataInsertOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA4BA,MAAMA,+BAA+B,CAAwC;EAC3EC,WAAWA,CAAkBC,OAA6B,GAAG,CAAC,CAAC,EAAE;IAAA,KAApCA,OAA6B,GAA7BA,OAA6B;EAAQ;EAElEC,iBAAiBA,CAACC,KAAc,EAA+B;IAC7D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA+B;IAC1D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,qBAAqBA,CAACL,KAAc,EAA+B;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,iBAAiB,EAAEN;IAAM,CAAC,CAAC;EAChD;EAEAO,kBAAkBA,CAACP,KAAc,EAA+B;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,cAAc,EAAER;IAAM,CAAC,CAAC;EAC7C;EAEAS,KAAKA,CAAA,EAAyB;IAC5B,OAAO;MAAE,GAAG,IAAI,CAACX;IAAQ,CAAC;EAC5B;EAEQG,IAAIA,CAACH,OAA6B,EAA+B;IACvE,OAAO,IAAIF,+BAA+B,CAAC;MACzC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMY,oBAAuD,GAAGA,CAAA,KACrE,IAAId,+BAA+B,CAAC,CAAC;AAAAe,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.IsReferencedOptionsBuilder = void 0;
5
5
  /**
6
- * Builder for isReferenced options used by Wix Data isReferenced operations.
6
+ * Options builder for isReferenced operations.
7
7
  *
8
8
  * Use this builder to configure whether the reference check uses a consistent read.
9
9
  * @public
@@ -34,12 +34,12 @@ class WixDataIsReferencedOptionsBuilderImpl {
34
34
  }
35
35
 
36
36
  /**
37
- * Creates a new WixData isReferenced options builder.
37
+ * Creates a new isReferenced options builder.
38
38
  * @public
39
39
  * @documentationMaturity preview
40
40
  *
41
41
  * @example
42
- * ```ts
42
+ * ```ts title="Create an isReferenced options builder"
43
43
  * import { items, IsReferencedOptionsBuilder } from '@wix/data'
44
44
  *
45
45
  * const options = IsReferencedOptionsBuilder()
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataIsReferencedOptionsBuilderImpl","constructor","options","withConsistentRead","value","copy","consistentRead","build","IsReferencedOptionsBuilder","exports"],"sources":["../../../src/api/WixDataIsReferencedOptionsBuilder.ts"],"sourcesContent":["import type { WixDataIsReferencedOptions } from './types'\n\n/**\n * Builder for isReferenced options used by Wix Data isReferenced operations.\n *\n * Use this builder to configure whether the reference check uses a consistent read.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataIsReferencedOptionsBuilder {\n /**\n * Sets whether the reference check uses a consistent read.\n */\n withConsistentRead(value: boolean): WixDataIsReferencedOptionsBuilder\n /**\n * Builds the isReferenced options object.\n */\n build(): WixDataIsReferencedOptions\n}\n\nclass WixDataIsReferencedOptionsBuilderImpl\n implements WixDataIsReferencedOptionsBuilder\n{\n constructor(private readonly options: WixDataIsReferencedOptions = {}) {}\n\n withConsistentRead(value: boolean): WixDataIsReferencedOptionsBuilder {\n return this.copy({ consistentRead: value })\n }\n\n build(): WixDataIsReferencedOptions {\n return {\n ...this.options,\n }\n }\n\n private copy(\n options: WixDataIsReferencedOptions\n ): WixDataIsReferencedOptionsBuilder {\n return new WixDataIsReferencedOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData isReferenced options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { items, IsReferencedOptionsBuilder } from '@wix/data'\n *\n * const options = IsReferencedOptionsBuilder()\n * .withConsistentRead(true)\n * .build()\n *\n * const isReferenced = await items.isReferenced(\n * 'myCollection',\n * 'someField',\n * 'referringItemId',\n * 'referencedItemId',\n * options\n * )\n * ```\n */\nexport const IsReferencedOptionsBuilder: () => WixDataIsReferencedOptionsBuilder =\n () => new WixDataIsReferencedOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,MAAMA,qCAAqC,CAE3C;EACEC,WAAWA,CAAkBC,OAAmC,GAAG,CAAC,CAAC,EAAE;IAAA,KAA1CA,OAAmC,GAAnCA,OAAmC;EAAQ;EAExEC,kBAAkBA,CAACC,KAAc,EAAqC;IACpE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,cAAc,EAAEF;IAAM,CAAC,CAAC;EAC7C;EAEAG,KAAKA,CAAA,EAA+B;IAClC,OAAO;MACL,GAAG,IAAI,CAACL;IACV,CAAC;EACH;EAEQG,IAAIA,CACVH,OAAmC,EACA;IACnC,OAAO,IAAIF,qCAAqC,CAAC;MAC/C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,0BAAmE,GAC9EA,CAAA,KAAM,IAAIR,qCAAqC,CAAC,CAAC;AAAAS,OAAA,CAAAD,0BAAA,GAAAA,0BAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataIsReferencedOptionsBuilderImpl","constructor","options","withConsistentRead","value","copy","consistentRead","build","IsReferencedOptionsBuilder","exports"],"sources":["../../../src/api/WixDataIsReferencedOptionsBuilder.ts"],"sourcesContent":["import type { WixDataIsReferencedOptions } from './types'\n\n/**\n * Options builder for isReferenced operations.\n *\n * Use this builder to configure whether the reference check uses a consistent read.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataIsReferencedOptionsBuilder {\n /**\n * Sets whether the reference check uses a consistent read.\n */\n withConsistentRead(value: boolean): WixDataIsReferencedOptionsBuilder\n /**\n * Builds the isReferenced options object.\n */\n build(): WixDataIsReferencedOptions\n}\n\nclass WixDataIsReferencedOptionsBuilderImpl\n implements WixDataIsReferencedOptionsBuilder\n{\n constructor(private readonly options: WixDataIsReferencedOptions = {}) {}\n\n withConsistentRead(value: boolean): WixDataIsReferencedOptionsBuilder {\n return this.copy({ consistentRead: value })\n }\n\n build(): WixDataIsReferencedOptions {\n return {\n ...this.options,\n }\n }\n\n private copy(\n options: WixDataIsReferencedOptions\n ): WixDataIsReferencedOptionsBuilder {\n return new WixDataIsReferencedOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new isReferenced options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Create an isReferenced options builder\"\n * import { items, IsReferencedOptionsBuilder } from '@wix/data'\n *\n * const options = IsReferencedOptionsBuilder()\n * .withConsistentRead(true)\n * .build()\n *\n * const isReferenced = await items.isReferenced(\n * 'myCollection',\n * 'someField',\n * 'referringItemId',\n * 'referencedItemId',\n * options\n * )\n * ```\n */\nexport const IsReferencedOptionsBuilder: () => WixDataIsReferencedOptionsBuilder =\n () => new WixDataIsReferencedOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA,MAAMA,qCAAqC,CAE3C;EACEC,WAAWA,CAAkBC,OAAmC,GAAG,CAAC,CAAC,EAAE;IAAA,KAA1CA,OAAmC,GAAnCA,OAAmC;EAAQ;EAExEC,kBAAkBA,CAACC,KAAc,EAAqC;IACpE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,cAAc,EAAEF;IAAM,CAAC,CAAC;EAC7C;EAEAG,KAAKA,CAAA,EAA+B;IAClC,OAAO;MACL,GAAG,IAAI,CAACL;IACV,CAAC;EACH;EAEQG,IAAIA,CACVH,OAAmC,EACA;IACnC,OAAO,IAAIF,qCAAqC,CAAC;MAC/C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMM,0BAAmE,GAC9EA,CAAA,KAAM,IAAIR,qCAAqC,CAAC,CAAC;AAAAS,OAAA,CAAAD,0BAAA,GAAAA,0BAAA","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.PatchOptionsBuilder = void 0;
5
5
  /**
6
- * Builder for patch options used by Wix Data patch operations.
6
+ * Options builder for patch operations.
7
7
  *
8
8
  * Use this builder to configure patch behavior such as hooks suppression,
9
9
  * and conditional patching.
@@ -45,12 +45,12 @@ class WixDataPatchOptionsBuilderImpl {
45
45
  }
46
46
 
47
47
  /**
48
- * Creates a new WixData patch options builder.
48
+ * Creates a new patch options builder.
49
49
  * @public
50
50
  * @documentationMaturity preview
51
51
  *
52
52
  * @example
53
- * ```ts
53
+ * ```ts title="Create a patch options builder"
54
54
  * import { items, PatchOptionsBuilder, Filter } from '@wix/data'
55
55
  *
56
56
  * const options = PatchOptionsBuilder()
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataPatchOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withCondition","condition","filter","build","PatchOptionsBuilder","exports"],"sources":["../../../src/api/WixDataPatchOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type { WixDataItem, WixDataQuerySpec } from './types'\nimport type { WixDataPatchOptions } from './WixDataPatch'\n\n/**\n * Builder for patch options used by Wix Data patch operations.\n *\n * Use this builder to configure patch behavior such as hooks suppression,\n * and conditional patching.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataPatchOptionsBuilder {\n /**\n * Sets whether patch hooks are suppressed.\n *\n * When `true`, the patch runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataPatchOptionsBuilder\n /**\n * Sets whether draft items are included when patching an item.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataPatchOptionsBuilder\n /**\n * Sets the condition that determines whether the item is patched.\n */\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataPatchOptionsBuilder\n /**\n * Builds the patch options object.\n */\n build(): WixDataPatchOptions\n}\n\nclass WixDataPatchOptionsBuilderImpl implements WixDataPatchOptionsBuilder {\n constructor(private readonly options: WixDataPatchOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataPatchOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataPatchOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataPatchOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataPatchOptions {\n return {\n ...this.options,\n }\n }\n\n private copy(options: WixDataPatchOptions): WixDataPatchOptionsBuilder {\n return new WixDataPatchOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData patch options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { items, PatchOptionsBuilder, Filter } from '@wix/data'\n *\n * const options = PatchOptionsBuilder()\n * .withSuppressHooks(true)\n * .withCondition(Filter('status').eq('active'))\n * .build()\n *\n * const item = await items.patch('myCollection', 'someId', option)\n * ```\n */\nexport const PatchOptionsBuilder: () => WixDataPatchOptionsBuilder = () =>\n new WixDataPatchOptionsBuilderImpl()\n"],"mappings":";;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBA,MAAMA,8BAA8B,CAAuC;EACzEC,WAAWA,CAAkBC,OAA4B,GAAG,CAAC,CAAC,EAAE;IAAA,KAAnCA,OAA4B,GAA5BA,OAA4B;EAAQ;EAEjEC,iBAAiBA,CAACC,KAAc,EAA8B;IAC5D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA8B;IACzD,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,aAAaA,CACXL,KAAsD,EAC1B;IAC5B,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,SAAS,EAAEN,KAAK,CAACO;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAAwB;IAC3B,OAAO;MACL,GAAG,IAAI,CAACV;IACV,CAAC;EACH;EAEQG,IAAIA,CAACH,OAA4B,EAA8B;IACrE,OAAO,IAAIF,8BAA8B,CAAC;MACxC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMW,mBAAqD,GAAGA,CAAA,KACnE,IAAIb,8BAA8B,CAAC,CAAC;AAAAc,OAAA,CAAAD,mBAAA,GAAAA,mBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataPatchOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withCondition","condition","filter","build","PatchOptionsBuilder","exports"],"sources":["../../../src/api/WixDataPatchOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type { WixDataItem, WixDataQuerySpec } from './types'\nimport type { WixDataPatchOptions } from './WixDataPatch'\n\n/**\n * Options builder for patch operations.\n *\n * Use this builder to configure patch behavior such as hooks suppression,\n * and conditional patching.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataPatchOptionsBuilder {\n /**\n * Sets whether to suppress patch hooks.\n *\n * When `true`, the patch runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataPatchOptionsBuilder\n /**\n * Sets whether to include draft items when patching an item.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataPatchOptionsBuilder\n /**\n * Sets the condition that determines whether to patch the item.\n */\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataPatchOptionsBuilder\n /**\n * Builds the patch options object.\n */\n build(): WixDataPatchOptions\n}\n\nclass WixDataPatchOptionsBuilderImpl implements WixDataPatchOptionsBuilder {\n constructor(private readonly options: WixDataPatchOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataPatchOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataPatchOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataPatchOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataPatchOptions {\n return {\n ...this.options,\n }\n }\n\n private copy(options: WixDataPatchOptions): WixDataPatchOptionsBuilder {\n return new WixDataPatchOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new patch options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Create a patch options builder\"\n * import { items, PatchOptionsBuilder, Filter } from '@wix/data'\n *\n * const options = PatchOptionsBuilder()\n * .withSuppressHooks(true)\n * .withCondition(Filter('status').eq('active'))\n * .build()\n *\n * const item = await items.patch('myCollection', 'someId', option)\n * ```\n */\nexport const PatchOptionsBuilder: () => WixDataPatchOptionsBuilder = () =>\n new WixDataPatchOptionsBuilderImpl()\n"],"mappings":";;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBA,MAAMA,8BAA8B,CAAuC;EACzEC,WAAWA,CAAkBC,OAA4B,GAAG,CAAC,CAAC,EAAE;IAAA,KAAnCA,OAA4B,GAA5BA,OAA4B;EAAQ;EAEjEC,iBAAiBA,CAACC,KAAc,EAA8B;IAC5D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA8B;IACzD,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,aAAaA,CACXL,KAAsD,EAC1B;IAC5B,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,SAAS,EAAEN,KAAK,CAACO;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAAwB;IAC3B,OAAO;MACL,GAAG,IAAI,CAACV;IACV,CAAC;EACH;EAEQG,IAAIA,CAACH,OAA4B,EAA8B;IACrE,OAAO,IAAIF,8BAA8B,CAAC;MACxC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMW,mBAAqD,GAAGA,CAAA,KACnE,IAAIb,8BAA8B,CAAC,CAAC;AAAAc,OAAA,CAAAD,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -12,12 +12,12 @@ const baseQueryUtils = (0, _queryBuilderUtils.createQueryUtils)();
12
12
  */
13
13
 
14
14
  /**
15
- * Creates a new WixData query builder.
15
+ * Creates a new query builder.
16
16
  * @public
17
17
  * @documentationMaturity preview
18
18
  *
19
19
  * @example
20
- * ```ts
20
+ * ```ts title="Build a query"
21
21
  * import { items, QueryBuilder, Filter, Sort } from '@wix/data'
22
22
  *
23
23
  * const request = QueryBuilder()
@@ -42,7 +42,7 @@ const QueryBuilder = exports.QueryBuilder = baseQueryUtils.QueryBuilder;
42
42
  * @documentationMaturity preview
43
43
  *
44
44
  * @example
45
- * ```ts
45
+ * ```ts title="Create filter expressions"
46
46
  * import { Filter } from '@wix/data'
47
47
  *
48
48
  * // Simple field filter
@@ -72,7 +72,7 @@ const Filter = exports.Filter = baseQueryUtils.Filter;
72
72
  * @documentationMaturity preview
73
73
  *
74
74
  * @example
75
- * ```ts
75
+ * ```ts title="Create sort expressions"
76
76
  * import { Sort, QueryBuilder } from '@wix/data'
77
77
  *
78
78
  * // Descending sort
@@ -1 +1 @@
1
- {"version":3,"names":["_queryBuilderUtils","require","baseQueryUtils","createQueryUtils","QueryBuilder","exports","Filter","Sort"],"sources":["../../../src/api/WixDataQueryBuilder.ts"],"sourcesContent":["import { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils'\nimport type {\n QueryBuilder as SDKQueryBuilder,\n FilterFactory,\n SortFactory,\n} from '@wix/sdk-types'\nimport { WixDataQueryRequest, WixDataQuerySpec, WixDataItem } from './types'\n\n// Create the base query utilities from SDK runtime\nconst baseQueryUtils = createQueryUtils<\n WixDataItem,\n WixDataQuerySpec,\n WixDataQueryRequest\n>()\n\n/**\n * WixData QueryBuilder type.\n * @internal\n */\nexport type WixDataQueryBuilder = SDKQueryBuilder<\n WixDataItem,\n WixDataQuerySpec,\n WixDataQueryRequest\n>\n\n/**\n * Creates a new WixData query builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { items, QueryBuilder, Filter, Sort } from '@wix/data'\n *\n * const request = QueryBuilder()\n * .withFilter(\n * Filter.and(\n * Filter('status').eq('active'),\n * Filter('age').gt(25)\n * )\n * )\n * .withSorting(Sort('lastName').asc())\n * .withPaging({ limit: 10, offset: 0 })\n * .build()\n *\n * const result = await items.query<MyItem>('myCollection', request)\n * ```\n */\nexport const QueryBuilder: () => WixDataQueryBuilder =\n baseQueryUtils.QueryBuilder\n\n/**\n * Filter factory for creating filter expressions.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { Filter } from '@wix/data'\n *\n * // Simple field filter\n * Filter('status').eq('active')\n *\n * // Combining filters with AND\n * Filter.and(\n * Filter('orderId').eq('123'),\n * Filter('amount').gt(100)\n * )\n *\n * // Combining filters with OR\n * Filter.or(\n * Filter('status').eq('pending'),\n * Filter('status').eq('active')\n * )\n *\n * // Negating a filter\n * Filter.not(Filter('status').eq('deleted'))\n * ```\n */\nexport const Filter: FilterFactory<WixDataItem, WixDataQuerySpec> =\n baseQueryUtils.Filter\n\n/**\n * Sort factory for creating sort expressions.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { Sort, QueryBuilder } from '@wix/data'\n *\n * // Descending sort\n * Sort('amount').desc()\n *\n * // Ascending sort\n * Sort('name').asc()\n *\n * // Use with QueryBuilder\n * QueryBuilder()\n * .withSorting(Sort('amount').desc(), Sort('name').asc())\n * .build()\n * ```\n */\nexport const Sort: SortFactory<WixDataQuerySpec> = baseQueryUtils.Sort\n\n// Re-export types for convenience\nexport type {\n FilterExpression,\n SortExpression,\n PagingFor,\n} from '@wix/sdk-types'\n"],"mappings":";;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAQA;AACA,MAAMC,cAAc,GAAG,IAAAC,mCAAgB,EAIrC,CAAC;;AAEH;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAuC,GAAAC,OAAA,CAAAD,YAAA,GAClDF,cAAc,CAACE,YAAY;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,MAAoD,GAAAD,OAAA,CAAAC,MAAA,GAC/DJ,cAAc,CAACI,MAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,IAAmC,GAAAF,OAAA,CAAAE,IAAA,GAAGL,cAAc,CAACK,IAAI;;AAEtE","ignoreList":[]}
1
+ {"version":3,"names":["_queryBuilderUtils","require","baseQueryUtils","createQueryUtils","QueryBuilder","exports","Filter","Sort"],"sources":["../../../src/api/WixDataQueryBuilder.ts"],"sourcesContent":["import { createQueryUtils } from '@wix/sdk-runtime/query-builder-utils'\nimport type {\n QueryBuilder as SDKQueryBuilder,\n FilterFactory,\n SortFactory,\n} from '@wix/sdk-types'\nimport { WixDataQueryRequest, WixDataQuerySpec, WixDataItem } from './types'\n\n// Create the base query utilities from SDK runtime\nconst baseQueryUtils = createQueryUtils<\n WixDataItem,\n WixDataQuerySpec,\n WixDataQueryRequest\n>()\n\n/**\n * WixData QueryBuilder type.\n * @internal\n */\nexport type WixDataQueryBuilder = SDKQueryBuilder<\n WixDataItem,\n WixDataQuerySpec,\n WixDataQueryRequest\n>\n\n/**\n * Creates a new query builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Build a query\"\n * import { items, QueryBuilder, Filter, Sort } from '@wix/data'\n *\n * const request = QueryBuilder()\n * .withFilter(\n * Filter.and(\n * Filter('status').eq('active'),\n * Filter('age').gt(25)\n * )\n * )\n * .withSorting(Sort('lastName').asc())\n * .withPaging({ limit: 10, offset: 0 })\n * .build()\n *\n * const result = await items.query<MyItem>('myCollection', request)\n * ```\n */\nexport const QueryBuilder: () => WixDataQueryBuilder =\n baseQueryUtils.QueryBuilder\n\n/**\n * Filter factory for creating filter expressions.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Create filter expressions\"\n * import { Filter } from '@wix/data'\n *\n * // Simple field filter\n * Filter('status').eq('active')\n *\n * // Combining filters with AND\n * Filter.and(\n * Filter('orderId').eq('123'),\n * Filter('amount').gt(100)\n * )\n *\n * // Combining filters with OR\n * Filter.or(\n * Filter('status').eq('pending'),\n * Filter('status').eq('active')\n * )\n *\n * // Negating a filter\n * Filter.not(Filter('status').eq('deleted'))\n * ```\n */\nexport const Filter: FilterFactory<WixDataItem, WixDataQuerySpec> =\n baseQueryUtils.Filter\n\n/**\n * Sort factory for creating sort expressions.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Create sort expressions\"\n * import { Sort, QueryBuilder } from '@wix/data'\n *\n * // Descending sort\n * Sort('amount').desc()\n *\n * // Ascending sort\n * Sort('name').asc()\n *\n * // Use with QueryBuilder\n * QueryBuilder()\n * .withSorting(Sort('amount').desc(), Sort('name').asc())\n * .build()\n * ```\n */\nexport const Sort: SortFactory<WixDataQuerySpec> = baseQueryUtils.Sort\n\n// Re-export types for convenience\nexport type {\n FilterExpression,\n SortExpression,\n PagingFor,\n} from '@wix/sdk-types'\n"],"mappings":";;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAQA;AACA,MAAMC,cAAc,GAAG,IAAAC,mCAAgB,EAIrC,CAAC;;AAEH;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,YAAuC,GAAAC,OAAA,CAAAD,YAAA,GAClDF,cAAc,CAACE,YAAY;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,MAAoD,GAAAD,OAAA,CAAAC,MAAA,GAC/DJ,cAAc,CAACI,MAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,IAAmC,GAAAF,OAAA,CAAAE,IAAA,GAAGL,cAAc,CAACK,IAAI;;AAEtE","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.QueryOptionsBuilder = void 0;
5
5
  /**
6
- * Builder for query options used by Wix Data query operations.
6
+ * Options builder for query operations.
7
7
  *
8
8
  * Use this builder to configure query behavior such as hooks suppression,
9
9
  * language, reference inclusion, and field groups.
@@ -87,12 +87,12 @@ class WixDataQueryOptionsBuilderImpl {
87
87
  }
88
88
 
89
89
  /**
90
- * Creates a new WixData query options builder.
90
+ * Creates a new query options builder.
91
91
  * @public
92
92
  * @documentationMaturity preview
93
93
  *
94
94
  * @example
95
- * ```ts
95
+ * ```ts title="Create a query options builder"
96
96
  * import { items, QueryOptionsBuilder } from '@wix/data'
97
97
  *
98
98
  * const options = QueryOptionsBuilder()
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataQueryOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","withLanguage","language","withConsistentRead","consistentRead","withIncludeReferences","includeReferences","map","includeReference","withReturnTotalCount","returnTotalCount","withIncludeFieldGroups","includeFieldGroups","build","QueryOptionsBuilder","exports"],"sources":["../../../src/api/WixDataQueryOptionsBuilder.ts"],"sourcesContent":["import type { WixDataQueryOptions } from './types'\n\n/**\n * Builder for query options used by Wix Data query operations.\n *\n * Use this builder to configure query behavior such as hooks suppression,\n * language, reference inclusion, and field groups.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataQueryOptionsBuilder {\n /**\n * Sets whether query hooks are suppressed.\n *\n * When `true`, the query runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataQueryOptionsBuilder\n /**\n * Sets whether draft items are included in query results.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataQueryOptionsBuilder\n /**\n * Sets app-specific query options.\n */\n withAppOptions(value: Record<string, any>): WixDataQueryOptionsBuilder\n /**\n * Sets the language used for the query.\n */\n withLanguage(value: string): WixDataQueryOptionsBuilder\n /**\n * Sets whether the query uses consistent read mode.\n */\n withConsistentRead(value: boolean): WixDataQueryOptionsBuilder\n /**\n * Includes referenced items for the specified reference fields.\n *\n * Use `limit` to cap how many referenced items are returned per field.\n */\n withIncludeReferences(\n value: { field: string; limit?: number }[]\n ): WixDataQueryOptionsBuilder\n /**\n * Sets whether the total result count is returned with the query response.\n */\n withReturnTotalCount(value: boolean): WixDataQueryOptionsBuilder\n /**\n * Includes the specified field groups in the query results.\n */\n withIncludeFieldGroups(...value: string[]): WixDataQueryOptionsBuilder\n /**\n * Builds the query options object.\n */\n build(): WixDataQueryOptions\n}\n\nclass WixDataQueryOptionsBuilderImpl implements WixDataQueryOptionsBuilder {\n constructor(private readonly options: WixDataQueryOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataQueryOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataQueryOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withAppOptions(value: Record<string, any>): WixDataQueryOptionsBuilder {\n return this.copy({ appOptions: { ...value } })\n }\n\n withLanguage(value: string): WixDataQueryOptionsBuilder {\n return this.copy({ language: value })\n }\n\n withConsistentRead(value: boolean): WixDataQueryOptionsBuilder {\n return this.copy({ consistentRead: value })\n }\n\n withIncludeReferences(\n value: { field: string; limit?: number }[]\n ): WixDataQueryOptionsBuilder {\n return this.copy({\n includeReferences: value.map((includeReference) => ({\n ...includeReference,\n })),\n })\n }\n\n withReturnTotalCount(value: boolean): WixDataQueryOptionsBuilder {\n return this.copy({ returnTotalCount: value })\n }\n\n withIncludeFieldGroups(...value: string[]): WixDataQueryOptionsBuilder {\n return this.copy({ includeFieldGroups: [...value] })\n }\n\n build(): WixDataQueryOptions {\n return {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n ...(this.options.includeReferences\n ? {\n includeReferences: this.options.includeReferences.map(\n (includeReference) => ({ ...includeReference })\n ),\n }\n : {}),\n ...(this.options.includeFieldGroups\n ? { includeFieldGroups: [...this.options.includeFieldGroups] }\n : {}),\n }\n }\n\n private copy(options: WixDataQueryOptions): WixDataQueryOptionsBuilder {\n return new WixDataQueryOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData query options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { items, QueryOptionsBuilder } from '@wix/data'\n *\n * const options = QueryOptionsBuilder()\n * .withSuppressHooks(true)\n * .withAppOptions({ key: 'value' })\n * .withLanguage('en')\n * .withConsistentRead(true)\n * .withIncludeReferences([{ field: 'author', limit: 3 }])\n * .withReturnTotalCount(true)\n * .withIncludeFieldGroups('seo', 'details')\n * .build()\n *\n * const result = await items.query<MyItem>(\n * 'myCollection',\n * {},\n * options\n * )\n * ```\n */\nexport const QueryOptionsBuilder: () => WixDataQueryOptionsBuilder = () =>\n new WixDataQueryOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA+CA,MAAMA,8BAA8B,CAAuC;EACzEC,WAAWA,CAAkBC,OAA4B,GAAG,CAAC,CAAC,EAAE;IAAA,KAAnCA,OAA4B,GAA5BA,OAA4B;EAAQ;EAEjEC,iBAAiBA,CAACC,KAAc,EAA8B;IAC5D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA8B;IACzD,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,cAAcA,CAACL,KAA0B,EAA8B;IACrE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,YAAYA,CAACP,KAAa,EAA8B;IACtD,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,QAAQ,EAAER;IAAM,CAAC,CAAC;EACvC;EAEAS,kBAAkBA,CAACT,KAAc,EAA8B;IAC7D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,cAAc,EAAEV;IAAM,CAAC,CAAC;EAC7C;EAEAW,qBAAqBA,CACnBX,KAA0C,EACd;IAC5B,OAAO,IAAI,CAACC,IAAI,CAAC;MACfW,iBAAiB,EAAEZ,KAAK,CAACa,GAAG,CAAEC,gBAAgB,KAAM;QAClD,GAAGA;MACL,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;EAEAC,oBAAoBA,CAACf,KAAc,EAA8B;IAC/D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEe,gBAAgB,EAAEhB;IAAM,CAAC,CAAC;EAC/C;EAEAiB,sBAAsBA,CAAC,GAAGjB,KAAe,EAA8B;IACrE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEiB,kBAAkB,EAAE,CAAC,GAAGlB,KAAK;IAAE,CAAC,CAAC;EACtD;EAEAmB,KAAKA,CAAA,EAAwB;IAC3B,OAAO;MACL,GAAG,IAAI,CAACrB,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACQ,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACR,OAAO,CAACQ;QAAW;MAAE,CAAC,GAC9C,CAAC,CAAC,CAAC;MACP,IAAI,IAAI,CAACR,OAAO,CAACc,iBAAiB,GAC9B;QACEA,iBAAiB,EAAE,IAAI,CAACd,OAAO,CAACc,iBAAiB,CAACC,GAAG,CAClDC,gBAAgB,KAAM;UAAE,GAAGA;QAAiB,CAAC,CAChD;MACF,CAAC,GACD,CAAC,CAAC,CAAC;MACP,IAAI,IAAI,CAAChB,OAAO,CAACoB,kBAAkB,GAC/B;QAAEA,kBAAkB,EAAE,CAAC,GAAG,IAAI,CAACpB,OAAO,CAACoB,kBAAkB;MAAE,CAAC,GAC5D,CAAC,CAAC;IACR,CAAC;EACH;EAEQjB,IAAIA,CAACH,OAA4B,EAA8B;IACrE,OAAO,IAAIF,8BAA8B,CAAC;MACxC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMsB,mBAAqD,GAAGA,CAAA,KACnE,IAAIxB,8BAA8B,CAAC,CAAC;AAAAyB,OAAA,CAAAD,mBAAA,GAAAA,mBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataQueryOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","withLanguage","language","withConsistentRead","consistentRead","withIncludeReferences","includeReferences","map","includeReference","withReturnTotalCount","returnTotalCount","withIncludeFieldGroups","includeFieldGroups","build","QueryOptionsBuilder","exports"],"sources":["../../../src/api/WixDataQueryOptionsBuilder.ts"],"sourcesContent":["import type { WixDataQueryOptions } from './types'\n\n/**\n * Options builder for query operations.\n *\n * Use this builder to configure query behavior such as hooks suppression,\n * language, reference inclusion, and field groups.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataQueryOptionsBuilder {\n /**\n * Sets whether to suppress query hooks.\n *\n * When `true`, the query runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataQueryOptionsBuilder\n /**\n * Sets whether to include draft items in query results.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataQueryOptionsBuilder\n /**\n * Sets app-specific query options.\n */\n withAppOptions(value: Record<string, any>): WixDataQueryOptionsBuilder\n /**\n * Sets the language used for the query.\n */\n withLanguage(value: string): WixDataQueryOptionsBuilder\n /**\n * Sets whether the query uses consistent read mode.\n */\n withConsistentRead(value: boolean): WixDataQueryOptionsBuilder\n /**\n * Includes referenced items for the specified reference fields.\n *\n * Use `limit` to cap how many referenced items each field returns.\n */\n withIncludeReferences(\n value: { field: string; limit?: number }[]\n ): WixDataQueryOptionsBuilder\n /**\n * Sets whether to return the total result count with the query response.\n */\n withReturnTotalCount(value: boolean): WixDataQueryOptionsBuilder\n /**\n * Includes the specified field groups in the query results.\n */\n withIncludeFieldGroups(...value: string[]): WixDataQueryOptionsBuilder\n /**\n * Builds the query options object.\n */\n build(): WixDataQueryOptions\n}\n\nclass WixDataQueryOptionsBuilderImpl implements WixDataQueryOptionsBuilder {\n constructor(private readonly options: WixDataQueryOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataQueryOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataQueryOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withAppOptions(value: Record<string, any>): WixDataQueryOptionsBuilder {\n return this.copy({ appOptions: { ...value } })\n }\n\n withLanguage(value: string): WixDataQueryOptionsBuilder {\n return this.copy({ language: value })\n }\n\n withConsistentRead(value: boolean): WixDataQueryOptionsBuilder {\n return this.copy({ consistentRead: value })\n }\n\n withIncludeReferences(\n value: { field: string; limit?: number }[]\n ): WixDataQueryOptionsBuilder {\n return this.copy({\n includeReferences: value.map((includeReference) => ({\n ...includeReference,\n })),\n })\n }\n\n withReturnTotalCount(value: boolean): WixDataQueryOptionsBuilder {\n return this.copy({ returnTotalCount: value })\n }\n\n withIncludeFieldGroups(...value: string[]): WixDataQueryOptionsBuilder {\n return this.copy({ includeFieldGroups: [...value] })\n }\n\n build(): WixDataQueryOptions {\n return {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n ...(this.options.includeReferences\n ? {\n includeReferences: this.options.includeReferences.map(\n (includeReference) => ({ ...includeReference })\n ),\n }\n : {}),\n ...(this.options.includeFieldGroups\n ? { includeFieldGroups: [...this.options.includeFieldGroups] }\n : {}),\n }\n }\n\n private copy(options: WixDataQueryOptions): WixDataQueryOptionsBuilder {\n return new WixDataQueryOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new query options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Create a query options builder\"\n * import { items, QueryOptionsBuilder } from '@wix/data'\n *\n * const options = QueryOptionsBuilder()\n * .withSuppressHooks(true)\n * .withAppOptions({ key: 'value' })\n * .withLanguage('en')\n * .withConsistentRead(true)\n * .withIncludeReferences([{ field: 'author', limit: 3 }])\n * .withReturnTotalCount(true)\n * .withIncludeFieldGroups('seo', 'details')\n * .build()\n *\n * const result = await items.query<MyItem>(\n * 'myCollection',\n * {},\n * options\n * )\n * ```\n */\nexport const QueryOptionsBuilder: () => WixDataQueryOptionsBuilder = () =>\n new WixDataQueryOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA+CA,MAAMA,8BAA8B,CAAuC;EACzEC,WAAWA,CAAkBC,OAA4B,GAAG,CAAC,CAAC,EAAE;IAAA,KAAnCA,OAA4B,GAA5BA,OAA4B;EAAQ;EAEjEC,iBAAiBA,CAACC,KAAc,EAA8B;IAC5D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA8B;IACzD,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,cAAcA,CAACL,KAA0B,EAA8B;IACrE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,YAAYA,CAACP,KAAa,EAA8B;IACtD,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,QAAQ,EAAER;IAAM,CAAC,CAAC;EACvC;EAEAS,kBAAkBA,CAACT,KAAc,EAA8B;IAC7D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,cAAc,EAAEV;IAAM,CAAC,CAAC;EAC7C;EAEAW,qBAAqBA,CACnBX,KAA0C,EACd;IAC5B,OAAO,IAAI,CAACC,IAAI,CAAC;MACfW,iBAAiB,EAAEZ,KAAK,CAACa,GAAG,CAAEC,gBAAgB,KAAM;QAClD,GAAGA;MACL,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;EAEAC,oBAAoBA,CAACf,KAAc,EAA8B;IAC/D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEe,gBAAgB,EAAEhB;IAAM,CAAC,CAAC;EAC/C;EAEAiB,sBAAsBA,CAAC,GAAGjB,KAAe,EAA8B;IACrE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEiB,kBAAkB,EAAE,CAAC,GAAGlB,KAAK;IAAE,CAAC,CAAC;EACtD;EAEAmB,KAAKA,CAAA,EAAwB;IAC3B,OAAO;MACL,GAAG,IAAI,CAACrB,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACQ,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACR,OAAO,CAACQ;QAAW;MAAE,CAAC,GAC9C,CAAC,CAAC,CAAC;MACP,IAAI,IAAI,CAACR,OAAO,CAACc,iBAAiB,GAC9B;QACEA,iBAAiB,EAAE,IAAI,CAACd,OAAO,CAACc,iBAAiB,CAACC,GAAG,CAClDC,gBAAgB,KAAM;UAAE,GAAGA;QAAiB,CAAC,CAChD;MACF,CAAC,GACD,CAAC,CAAC,CAAC;MACP,IAAI,IAAI,CAAChB,OAAO,CAACoB,kBAAkB,GAC/B;QAAEA,kBAAkB,EAAE,CAAC,GAAG,IAAI,CAACpB,OAAO,CAACoB,kBAAkB;MAAE,CAAC,GAC5D,CAAC,CAAC;IACR,CAAC;EACH;EAEQjB,IAAIA,CAACH,OAA4B,EAA8B;IACrE,OAAO,IAAIF,8BAA8B,CAAC;MACxC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMsB,mBAAqD,GAAGA,CAAA,KACnE,IAAIxB,8BAA8B,CAAC,CAAC;AAAAyB,OAAA,CAAAD,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.QueryReferencedItemsOptionsBuilder = void 0;
5
5
  /**
6
- * Builder for query referenced items options used by Wix Data query referenced items operations.
6
+ * Options builder for query referenced items operations.
7
7
  *
8
8
  * Use this builder to configure referenced item query behavior such as language,
9
9
  * selected fields, sort order and paging.
@@ -99,12 +99,12 @@ class WixDataQueryReferencedItemsOptionsBuilderImpl {
99
99
  }
100
100
 
101
101
  /**
102
- * Creates a new WixData query referenced items options builder.
102
+ * Creates a new query referenced items options builder.
103
103
  * @public
104
104
  * @documentationMaturity preview
105
105
  *
106
106
  * @example
107
- * ```ts
107
+ * ```ts title="Create a query referenced items options builder"
108
108
  * import { items, QueryReferencedItemsOptionsBuilder } from '@wix/data'
109
109
  *
110
110
  * const options = QueryReferencedItemsOptionsBuilder()
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataQueryReferencedItemsOptionsBuilderImpl","constructor","options","withShowDrafts","value","copy","showDrafts","withAppOptions","appOptions","withLanguage","language","withConsistentRead","consistentRead","withReturnTotalCount","returnTotalCount","withFields","fields","withOrder","order","withPaging","paging","withCursorPaging","cursorPaging","build","QueryReferencedItemsOptionsBuilder","exports"],"sources":["../../../src/api/WixDataQueryReferencedItemsOptionsBuilder.ts"],"sourcesContent":["import type { SortOrder } from '../types/data-item-types'\nimport type { WixDataQueryReferencedItemsOptions } from './types'\n\n/**\n * Builder for query referenced items options used by Wix Data query referenced items operations.\n *\n * Use this builder to configure referenced item query behavior such as language,\n * selected fields, sort order and paging.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataQueryReferencedItemsOptionsBuilder {\n /**\n * Sets whether draft items are included in query results.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets app-specific query options.\n */\n withAppOptions(\n value: Record<string, any>\n ): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets the language used for the query.\n */\n withLanguage(value: string): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets whether the query uses consistent read mode.\n */\n withConsistentRead(value: boolean): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets whether the total result count is returned with the query response.\n */\n withReturnTotalCount(\n value: boolean\n ): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets the fields returned for each referenced item.\n */\n withFields(...value: string[]): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets the sort order of the query results.\n */\n withOrder(value: SortOrder): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets offset-based paging options.\n */\n withPaging(value: {\n limit?: number\n offset?: number\n }): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets cursor-based paging options.\n */\n withCursorPaging(value: {\n cursor?: string\n limit?: number\n }): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Builds the query referenced items options object.\n */\n build(): WixDataQueryReferencedItemsOptions\n}\n\nclass WixDataQueryReferencedItemsOptionsBuilderImpl\n implements WixDataQueryReferencedItemsOptionsBuilder\n{\n constructor(\n private readonly options: WixDataQueryReferencedItemsOptions = {}\n ) {}\n\n withShowDrafts(value: boolean): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withAppOptions(\n value: Record<string, any>\n ): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ appOptions: { ...value } })\n }\n\n withLanguage(value: string): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ language: value })\n }\n\n withConsistentRead(\n value: boolean\n ): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ consistentRead: value })\n }\n\n withReturnTotalCount(\n value: boolean\n ): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ returnTotalCount: value })\n }\n\n withFields(...value: string[]): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ fields: [...value] })\n }\n\n withOrder(value: SortOrder): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ order: value })\n }\n\n withPaging(value: {\n limit?: number\n offset?: number\n }): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ paging: { ...value } })\n }\n\n withCursorPaging(value: {\n cursor?: string\n limit?: number\n }): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ cursorPaging: { ...value } })\n }\n\n build(): WixDataQueryReferencedItemsOptions {\n return {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n ...(this.options.fields ? { fields: [...this.options.fields] } : {}),\n ...(this.options.paging ? { paging: { ...this.options.paging } } : {}),\n ...(this.options.cursorPaging\n ? { cursorPaging: { ...this.options.cursorPaging } }\n : {}),\n }\n }\n\n private copy(\n options: WixDataQueryReferencedItemsOptions\n ): WixDataQueryReferencedItemsOptionsBuilder {\n return new WixDataQueryReferencedItemsOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData query referenced items options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { items, QueryReferencedItemsOptionsBuilder } from '@wix/data'\n *\n * const options = QueryReferencedItemsOptionsBuilder()\n * .withAppOptions({ key: 'value' })\n * .withLanguage('en')\n * .withConsistentRead(true)\n * .withReturnTotalCount(true)\n * .withFields('_id', 'title')\n * .withOrder('ASC')\n * .withPaging({ limit: 10, offset: 0 })\n * .withCursorPaging({ cursor: 'eyJpZCI6IjEyMyJ9', limit: 10 })\n * .build()\n *\n * const result = await items.queryReferencedItems<MyItem>(\n * 'myCollection',\n * 'myItemId',\n * 'relatedItems',\n * options\n * )\n * ```\n */\nexport const QueryReferencedItemsOptionsBuilder: () => WixDataQueryReferencedItemsOptionsBuilder =\n () => new WixDataQueryReferencedItemsOptionsBuilderImpl()\n"],"mappings":";;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAuDA,MAAMA,6CAA6C,CAEnD;EACEC,WAAWA,CACQC,OAA2C,GAAG,CAAC,CAAC,EACjE;IAAA,KADiBA,OAA2C,GAA3CA,OAA2C;EAC3D;EAEHC,cAAcA,CAACC,KAAc,EAA6C;IACxE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,UAAU,EAAEF;IAAM,CAAC,CAAC;EACzC;EAEAG,cAAcA,CACZH,KAA0B,EACiB;IAC3C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAE;QAAE,GAAGJ;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAK,YAAYA,CAACL,KAAa,EAA6C;IACrE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,QAAQ,EAAEN;IAAM,CAAC,CAAC;EACvC;EAEAO,kBAAkBA,CAChBP,KAAc,EAC6B;IAC3C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,cAAc,EAAER;IAAM,CAAC,CAAC;EAC7C;EAEAS,oBAAoBA,CAClBT,KAAc,EAC6B;IAC3C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,gBAAgB,EAAEV;IAAM,CAAC,CAAC;EAC/C;EAEAW,UAAUA,CAAC,GAAGX,KAAe,EAA6C;IACxE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEW,MAAM,EAAE,CAAC,GAAGZ,KAAK;IAAE,CAAC,CAAC;EAC1C;EAEAa,SAASA,CAACb,KAAgB,EAA6C;IACrE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEa,KAAK,EAAEd;IAAM,CAAC,CAAC;EACpC;EAEAe,UAAUA,CAACf,KAGV,EAA6C;IAC5C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEe,MAAM,EAAE;QAAE,GAAGhB;MAAM;IAAE,CAAC,CAAC;EAC5C;EAEAiB,gBAAgBA,CAACjB,KAGhB,EAA6C;IAC5C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEiB,YAAY,EAAE;QAAE,GAAGlB;MAAM;IAAE,CAAC,CAAC;EAClD;EAEAmB,KAAKA,CAAA,EAAuC;IAC1C,OAAO;MACL,GAAG,IAAI,CAACrB,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACM,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACN,OAAO,CAACM;QAAW;MAAE,CAAC,GAC9C,CAAC,CAAC,CAAC;MACP,IAAI,IAAI,CAACN,OAAO,CAACc,MAAM,GAAG;QAAEA,MAAM,EAAE,CAAC,GAAG,IAAI,CAACd,OAAO,CAACc,MAAM;MAAE,CAAC,GAAG,CAAC,CAAC,CAAC;MACpE,IAAI,IAAI,CAACd,OAAO,CAACkB,MAAM,GAAG;QAAEA,MAAM,EAAE;UAAE,GAAG,IAAI,CAAClB,OAAO,CAACkB;QAAO;MAAE,CAAC,GAAG,CAAC,CAAC,CAAC;MACtE,IAAI,IAAI,CAAClB,OAAO,CAACoB,YAAY,GACzB;QAAEA,YAAY,EAAE;UAAE,GAAG,IAAI,CAACpB,OAAO,CAACoB;QAAa;MAAE,CAAC,GAClD,CAAC,CAAC;IACR,CAAC;EACH;EAEQjB,IAAIA,CACVH,OAA2C,EACA;IAC3C,OAAO,IAAIF,6CAA6C,CAAC;MACvD,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMsB,kCAAmF,GAC9FA,CAAA,KAAM,IAAIxB,6CAA6C,CAAC,CAAC;AAAAyB,OAAA,CAAAD,kCAAA,GAAAA,kCAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataQueryReferencedItemsOptionsBuilderImpl","constructor","options","withShowDrafts","value","copy","showDrafts","withAppOptions","appOptions","withLanguage","language","withConsistentRead","consistentRead","withReturnTotalCount","returnTotalCount","withFields","fields","withOrder","order","withPaging","paging","withCursorPaging","cursorPaging","build","QueryReferencedItemsOptionsBuilder","exports"],"sources":["../../../src/api/WixDataQueryReferencedItemsOptionsBuilder.ts"],"sourcesContent":["import type { SortOrder } from '../types/data-item-types'\nimport type { WixDataQueryReferencedItemsOptions } from './types'\n\n/**\n * Options builder for query referenced items operations.\n *\n * Use this builder to configure referenced item query behavior such as language,\n * selected fields, sort order and paging.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataQueryReferencedItemsOptionsBuilder {\n /**\n * Sets whether to include draft items in query results.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets app-specific query options.\n */\n withAppOptions(\n value: Record<string, any>\n ): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets the language used for the query.\n */\n withLanguage(value: string): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets whether the query uses consistent read mode.\n */\n withConsistentRead(value: boolean): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets whether to return the total result count with the query response.\n */\n withReturnTotalCount(\n value: boolean\n ): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets the fields returned for each referenced item.\n */\n withFields(...value: string[]): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets the sort order of the query results.\n */\n withOrder(value: SortOrder): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets offset-based paging options.\n */\n withPaging(value: {\n limit?: number\n offset?: number\n }): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Sets cursor-based paging options.\n */\n withCursorPaging(value: {\n cursor?: string\n limit?: number\n }): WixDataQueryReferencedItemsOptionsBuilder\n /**\n * Builds the query referenced items options object.\n */\n build(): WixDataQueryReferencedItemsOptions\n}\n\nclass WixDataQueryReferencedItemsOptionsBuilderImpl\n implements WixDataQueryReferencedItemsOptionsBuilder\n{\n constructor(\n private readonly options: WixDataQueryReferencedItemsOptions = {}\n ) {}\n\n withShowDrafts(value: boolean): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withAppOptions(\n value: Record<string, any>\n ): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ appOptions: { ...value } })\n }\n\n withLanguage(value: string): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ language: value })\n }\n\n withConsistentRead(\n value: boolean\n ): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ consistentRead: value })\n }\n\n withReturnTotalCount(\n value: boolean\n ): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ returnTotalCount: value })\n }\n\n withFields(...value: string[]): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ fields: [...value] })\n }\n\n withOrder(value: SortOrder): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ order: value })\n }\n\n withPaging(value: {\n limit?: number\n offset?: number\n }): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ paging: { ...value } })\n }\n\n withCursorPaging(value: {\n cursor?: string\n limit?: number\n }): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ cursorPaging: { ...value } })\n }\n\n build(): WixDataQueryReferencedItemsOptions {\n return {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n ...(this.options.fields ? { fields: [...this.options.fields] } : {}),\n ...(this.options.paging ? { paging: { ...this.options.paging } } : {}),\n ...(this.options.cursorPaging\n ? { cursorPaging: { ...this.options.cursorPaging } }\n : {}),\n }\n }\n\n private copy(\n options: WixDataQueryReferencedItemsOptions\n ): WixDataQueryReferencedItemsOptionsBuilder {\n return new WixDataQueryReferencedItemsOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new query referenced items options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Create a query referenced items options builder\"\n * import { items, QueryReferencedItemsOptionsBuilder } from '@wix/data'\n *\n * const options = QueryReferencedItemsOptionsBuilder()\n * .withAppOptions({ key: 'value' })\n * .withLanguage('en')\n * .withConsistentRead(true)\n * .withReturnTotalCount(true)\n * .withFields('_id', 'title')\n * .withOrder('ASC')\n * .withPaging({ limit: 10, offset: 0 })\n * .withCursorPaging({ cursor: 'eyJpZCI6IjEyMyJ9', limit: 10 })\n * .build()\n *\n * const result = await items.queryReferencedItems<MyItem>(\n * 'myCollection',\n * 'myItemId',\n * 'relatedItems',\n * options\n * )\n * ```\n */\nexport const QueryReferencedItemsOptionsBuilder: () => WixDataQueryReferencedItemsOptionsBuilder =\n () => new WixDataQueryReferencedItemsOptionsBuilderImpl()\n"],"mappings":";;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAuDA,MAAMA,6CAA6C,CAEnD;EACEC,WAAWA,CACQC,OAA2C,GAAG,CAAC,CAAC,EACjE;IAAA,KADiBA,OAA2C,GAA3CA,OAA2C;EAC3D;EAEHC,cAAcA,CAACC,KAAc,EAA6C;IACxE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,UAAU,EAAEF;IAAM,CAAC,CAAC;EACzC;EAEAG,cAAcA,CACZH,KAA0B,EACiB;IAC3C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAE;QAAE,GAAGJ;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAK,YAAYA,CAACL,KAAa,EAA6C;IACrE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,QAAQ,EAAEN;IAAM,CAAC,CAAC;EACvC;EAEAO,kBAAkBA,CAChBP,KAAc,EAC6B;IAC3C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,cAAc,EAAER;IAAM,CAAC,CAAC;EAC7C;EAEAS,oBAAoBA,CAClBT,KAAc,EAC6B;IAC3C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,gBAAgB,EAAEV;IAAM,CAAC,CAAC;EAC/C;EAEAW,UAAUA,CAAC,GAAGX,KAAe,EAA6C;IACxE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEW,MAAM,EAAE,CAAC,GAAGZ,KAAK;IAAE,CAAC,CAAC;EAC1C;EAEAa,SAASA,CAACb,KAAgB,EAA6C;IACrE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEa,KAAK,EAAEd;IAAM,CAAC,CAAC;EACpC;EAEAe,UAAUA,CAACf,KAGV,EAA6C;IAC5C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEe,MAAM,EAAE;QAAE,GAAGhB;MAAM;IAAE,CAAC,CAAC;EAC5C;EAEAiB,gBAAgBA,CAACjB,KAGhB,EAA6C;IAC5C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEiB,YAAY,EAAE;QAAE,GAAGlB;MAAM;IAAE,CAAC,CAAC;EAClD;EAEAmB,KAAKA,CAAA,EAAuC;IAC1C,OAAO;MACL,GAAG,IAAI,CAACrB,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACM,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACN,OAAO,CAACM;QAAW;MAAE,CAAC,GAC9C,CAAC,CAAC,CAAC;MACP,IAAI,IAAI,CAACN,OAAO,CAACc,MAAM,GAAG;QAAEA,MAAM,EAAE,CAAC,GAAG,IAAI,CAACd,OAAO,CAACc,MAAM;MAAE,CAAC,GAAG,CAAC,CAAC,CAAC;MACpE,IAAI,IAAI,CAACd,OAAO,CAACkB,MAAM,GAAG;QAAEA,MAAM,EAAE;UAAE,GAAG,IAAI,CAAClB,OAAO,CAACkB;QAAO;MAAE,CAAC,GAAG,CAAC,CAAC,CAAC;MACtE,IAAI,IAAI,CAAClB,OAAO,CAACoB,YAAY,GACzB;QAAEA,YAAY,EAAE;UAAE,GAAG,IAAI,CAACpB,OAAO,CAACoB;QAAa;MAAE,CAAC,GAClD,CAAC,CAAC;IACR,CAAC;EACH;EAEQjB,IAAIA,CACVH,OAA2C,EACA;IAC3C,OAAO,IAAIF,6CAA6C,CAAC;MACvD,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMsB,kCAAmF,GAC9FA,CAAA,KAAM,IAAIxB,6CAA6C,CAAC,CAAC;AAAAyB,OAAA,CAAAD,kCAAA,GAAAA,kCAAA","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.RemoveOptionsBuilder = void 0;
5
5
  /**
6
- * Builder for remove options used by Wix Data remove operations.
6
+ * Options builder for remove operations.
7
7
  *
8
8
  * Use this builder to configure remove behavior such as hooks suppression,
9
9
  * and conditional removal.
@@ -45,12 +45,12 @@ class WixDataRemoveOptionsBuilderImpl {
45
45
  }
46
46
 
47
47
  /**
48
- * Creates a new WixData remove options builder.
48
+ * Creates a new remove options builder.
49
49
  * @public
50
50
  * @documentationMaturity preview
51
51
  *
52
52
  * @example
53
- * ```ts
53
+ * ```ts title="Create a remove options builder"
54
54
  * import { items, Filter, RemoveOptionsBuilder } from '@wix/data'
55
55
  *
56
56
  * const options = RemoveOptionsBuilder()
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataRemoveOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withCondition","condition","filter","build","RemoveOptionsBuilder","exports"],"sources":["../../../src/api/WixDataRemoveOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type {\n WixDataItem,\n WixDataQuerySpec,\n WixDataRemoveOptions,\n} from './types'\n\n/**\n * Builder for remove options used by Wix Data remove operations.\n *\n * Use this builder to configure remove behavior such as hooks suppression,\n * and conditional removal.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataRemoveOptionsBuilder {\n /**\n * Sets whether remove hooks are suppressed.\n *\n * When `true`, the remove operation runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataRemoveOptionsBuilder\n /**\n * Sets whether draft items are included when removing items.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataRemoveOptionsBuilder\n /**\n * Removes the item only when the specified condition is met.\n */\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataRemoveOptionsBuilder\n /**\n * Builds the remove options object.\n */\n build(): WixDataRemoveOptions\n}\n\nclass WixDataRemoveOptionsBuilderImpl implements WixDataRemoveOptionsBuilder {\n constructor(private readonly options: WixDataRemoveOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataRemoveOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataRemoveOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataRemoveOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataRemoveOptions {\n return { ...this.options }\n }\n\n private copy(options: WixDataRemoveOptions): WixDataRemoveOptionsBuilder {\n return new WixDataRemoveOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData remove options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { items, Filter, RemoveOptionsBuilder } from '@wix/data'\n *\n * const options = RemoveOptionsBuilder()\n * .withSuppressHooks(true)\n * .withCondition(Filter('status').eq('active'))\n * .build()\n *\n * const removedItem = await items.remove<MyItem>(\n * 'myCollection',\n * 'myItemId',\n * options\n * )\n * ```\n */\nexport const RemoveOptionsBuilder: () => WixDataRemoveOptionsBuilder = () =>\n new WixDataRemoveOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBA,MAAMA,+BAA+B,CAAwC;EAC3EC,WAAWA,CAAkBC,OAA6B,GAAG,CAAC,CAAC,EAAE;IAAA,KAApCA,OAA6B,GAA7BA,OAA6B;EAAQ;EAElEC,iBAAiBA,CAACC,KAAc,EAA+B;IAC7D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA+B;IAC1D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,aAAaA,CACXL,KAAsD,EACzB;IAC7B,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,SAAS,EAAEN,KAAK,CAACO;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAAyB;IAC5B,OAAO;MAAE,GAAG,IAAI,CAACV;IAAQ,CAAC;EAC5B;EAEQG,IAAIA,CAACH,OAA6B,EAA+B;IACvE,OAAO,IAAIF,+BAA+B,CAAC;MACzC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMW,oBAAuD,GAAGA,CAAA,KACrE,IAAIb,+BAA+B,CAAC,CAAC;AAAAc,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataRemoveOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withCondition","condition","filter","build","RemoveOptionsBuilder","exports"],"sources":["../../../src/api/WixDataRemoveOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type {\n WixDataItem,\n WixDataQuerySpec,\n WixDataRemoveOptions,\n} from './types'\n\n/**\n * Options builder for remove operations.\n *\n * Use this builder to configure remove behavior such as hooks suppression,\n * and conditional removal.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataRemoveOptionsBuilder {\n /**\n * Sets whether to suppress remove hooks.\n *\n * When `true`, the remove operation runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataRemoveOptionsBuilder\n /**\n * Sets whether to include draft items when removing items.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataRemoveOptionsBuilder\n /**\n * Removes the item only when it matches the specified condition.\n */\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataRemoveOptionsBuilder\n /**\n * Builds the remove options object.\n */\n build(): WixDataRemoveOptions\n}\n\nclass WixDataRemoveOptionsBuilderImpl implements WixDataRemoveOptionsBuilder {\n constructor(private readonly options: WixDataRemoveOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataRemoveOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataRemoveOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataRemoveOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataRemoveOptions {\n return { ...this.options }\n }\n\n private copy(options: WixDataRemoveOptions): WixDataRemoveOptionsBuilder {\n return new WixDataRemoveOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new remove options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Create a remove options builder\"\n * import { items, Filter, RemoveOptionsBuilder } from '@wix/data'\n *\n * const options = RemoveOptionsBuilder()\n * .withSuppressHooks(true)\n * .withCondition(Filter('status').eq('active'))\n * .build()\n *\n * const removedItem = await items.remove<MyItem>(\n * 'myCollection',\n * 'myItemId',\n * options\n * )\n * ```\n */\nexport const RemoveOptionsBuilder: () => WixDataRemoveOptionsBuilder = () =>\n new WixDataRemoveOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAyBA,MAAMA,+BAA+B,CAAwC;EAC3EC,WAAWA,CAAkBC,OAA6B,GAAG,CAAC,CAAC,EAAE;IAAA,KAApCA,OAA6B,GAA7BA,OAA6B;EAAQ;EAElEC,iBAAiBA,CAACC,KAAc,EAA+B;IAC7D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA+B;IAC1D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,aAAaA,CACXL,KAAsD,EACzB;IAC7B,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,SAAS,EAAEN,KAAK,CAACO;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAAyB;IAC5B,OAAO;MAAE,GAAG,IAAI,CAACV;IAAQ,CAAC;EAC5B;EAEQG,IAAIA,CAACH,OAA6B,EAA+B;IACvE,OAAO,IAAIF,+BAA+B,CAAC;MACzC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMW,oBAAuD,GAAGA,CAAA,KACrE,IAAIb,+BAA+B,CAAC,CAAC;AAAAc,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.SaveOptionsBuilder = void 0;
5
5
  /**
6
- * Builder for save options used by Wix Data save operations.
6
+ * Options builder for save operations.
7
7
  *
8
8
  * Use this builder to configure save behavior such as hooks suppression,
9
9
  * and saving reference values.
@@ -50,12 +50,12 @@ class WixDataSaveOptionsBuilderImpl {
50
50
  }
51
51
 
52
52
  /**
53
- * Creates a new WixData save options builder.
53
+ * Creates a new save options builder.
54
54
  * @public
55
55
  * @documentationMaturity preview
56
56
  *
57
57
  * @example
58
- * ```ts
58
+ * ```ts title="Create a save options builder"
59
59
  * import { items, SaveOptionsBuilder } from '@wix/data'
60
60
  *
61
61
  * const options = SaveOptionsBuilder()
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataSaveOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withIncludeReferences","includeReferences","withSaveReferences","saveReferences","build","SaveOptionsBuilder","exports"],"sources":["../../../src/api/WixDataSaveOptionsBuilder.ts"],"sourcesContent":["import type { WixDataSaveOptions } from './types'\n\n/**\n * Builder for save options used by Wix Data save operations.\n *\n * Use this builder to configure save behavior such as hooks suppression,\n * and saving reference values.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataSaveOptionsBuilder {\n /**\n * Sets whether save hooks are suppressed.\n *\n * When `true`, the save operation runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataSaveOptionsBuilder\n /**\n * Sets whether draft items are included when saving items.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataSaveOptionsBuilder\n /**\n * Sets whether referenced items are included in the save response.\n * @internal\n */\n withIncludeReferences(value: boolean): WixDataSaveOptionsBuilder\n /**\n * Sets whether reference values should be saved from the data item.\n */\n withSaveReferences(value: boolean): WixDataSaveOptionsBuilder\n /**\n * Builds the save options object.\n */\n build(): WixDataSaveOptions\n}\n\nclass WixDataSaveOptionsBuilderImpl implements WixDataSaveOptionsBuilder {\n constructor(private readonly options: WixDataSaveOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataSaveOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataSaveOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withIncludeReferences(value: boolean): WixDataSaveOptionsBuilder {\n return this.copy({ includeReferences: value })\n }\n\n withSaveReferences(value: boolean): WixDataSaveOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n build(): WixDataSaveOptions {\n return { ...this.options }\n }\n\n private copy(options: WixDataSaveOptions): WixDataSaveOptionsBuilder {\n return new WixDataSaveOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData save options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { items, SaveOptionsBuilder } from '@wix/data'\n *\n * const options = SaveOptionsBuilder()\n * .withSuppressHooks(true)\n * .build()\n *\n * const savedItem = await items.save<MyItem>(\n * 'myCollection',\n * { _id: 'myItemId', title: 'Updated title' },\n * options\n * )\n * ```\n */\nexport const SaveOptionsBuilder: () => WixDataSaveOptionsBuilder = () =>\n new WixDataSaveOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA4BA,MAAMA,6BAA6B,CAAsC;EACvEC,WAAWA,CAAkBC,OAA2B,GAAG,CAAC,CAAC,EAAE;IAAA,KAAlCA,OAA2B,GAA3BA,OAA2B;EAAQ;EAEhEC,iBAAiBA,CAACC,KAAc,EAA6B;IAC3D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA6B;IACxD,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,qBAAqBA,CAACL,KAAc,EAA6B;IAC/D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,iBAAiB,EAAEN;IAAM,CAAC,CAAC;EAChD;EAEAO,kBAAkBA,CAACP,KAAc,EAA6B;IAC5D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,cAAc,EAAER;IAAM,CAAC,CAAC;EAC7C;EAEAS,KAAKA,CAAA,EAAuB;IAC1B,OAAO;MAAE,GAAG,IAAI,CAACX;IAAQ,CAAC;EAC5B;EAEQG,IAAIA,CAACH,OAA2B,EAA6B;IACnE,OAAO,IAAIF,6BAA6B,CAAC;MACvC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMY,kBAAmD,GAAGA,CAAA,KACjE,IAAId,6BAA6B,CAAC,CAAC;AAAAe,OAAA,CAAAD,kBAAA,GAAAA,kBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataSaveOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withIncludeReferences","includeReferences","withSaveReferences","saveReferences","build","SaveOptionsBuilder","exports"],"sources":["../../../src/api/WixDataSaveOptionsBuilder.ts"],"sourcesContent":["import type { WixDataSaveOptions } from './types'\n\n/**\n * Options builder for save operations.\n *\n * Use this builder to configure save behavior such as hooks suppression,\n * and saving reference values.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataSaveOptionsBuilder {\n /**\n * Sets whether to suppress save hooks.\n *\n * When `true`, the save operation runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataSaveOptionsBuilder\n /**\n * Sets whether to include draft items when saving items.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataSaveOptionsBuilder\n /**\n * Sets whether to include referenced items in the save response.\n * @internal\n */\n withIncludeReferences(value: boolean): WixDataSaveOptionsBuilder\n /**\n * Sets whether to save reference values from the data item.\n */\n withSaveReferences(value: boolean): WixDataSaveOptionsBuilder\n /**\n * Builds the save options object.\n */\n build(): WixDataSaveOptions\n}\n\nclass WixDataSaveOptionsBuilderImpl implements WixDataSaveOptionsBuilder {\n constructor(private readonly options: WixDataSaveOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataSaveOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataSaveOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withIncludeReferences(value: boolean): WixDataSaveOptionsBuilder {\n return this.copy({ includeReferences: value })\n }\n\n withSaveReferences(value: boolean): WixDataSaveOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n build(): WixDataSaveOptions {\n return { ...this.options }\n }\n\n private copy(options: WixDataSaveOptions): WixDataSaveOptionsBuilder {\n return new WixDataSaveOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new save options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Create a save options builder\"\n * import { items, SaveOptionsBuilder } from '@wix/data'\n *\n * const options = SaveOptionsBuilder()\n * .withSuppressHooks(true)\n * .build()\n *\n * const savedItem = await items.save<MyItem>(\n * 'myCollection',\n * { _id: 'myItemId', title: 'Updated title' },\n * options\n * )\n * ```\n */\nexport const SaveOptionsBuilder: () => WixDataSaveOptionsBuilder = () =>\n new WixDataSaveOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AA4BA,MAAMA,6BAA6B,CAAsC;EACvEC,WAAWA,CAAkBC,OAA2B,GAAG,CAAC,CAAC,EAAE;IAAA,KAAlCA,OAA2B,GAA3BA,OAA2B;EAAQ;EAEhEC,iBAAiBA,CAACC,KAAc,EAA6B;IAC3D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA6B;IACxD,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,qBAAqBA,CAACL,KAAc,EAA6B;IAC/D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,iBAAiB,EAAEN;IAAM,CAAC,CAAC;EAChD;EAEAO,kBAAkBA,CAACP,KAAc,EAA6B;IAC5D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,cAAc,EAAER;IAAM,CAAC,CAAC;EAC7C;EAEAS,KAAKA,CAAA,EAAuB;IAC1B,OAAO;MAAE,GAAG,IAAI,CAACX;IAAQ,CAAC;EAC5B;EAEQG,IAAIA,CAACH,OAA2B,EAA6B;IACnE,OAAO,IAAIF,6BAA6B,CAAC;MACvC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMY,kBAAmD,GAAGA,CAAA,KACjE,IAAId,6BAA6B,CAAC,CAAC;AAAAe,OAAA,CAAAD,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -9,18 +9,18 @@ var _searchBuilderUtils = require("@wix/sdk-runtime/search-builder-utils");
9
9
  */
10
10
 
11
11
  /**
12
- * WixData SearchBuilder.
12
+ * Search builder.
13
13
  * @public
14
14
  */
15
15
 
16
16
  const searchUtils = (0, _searchBuilderUtils.createSearchUtils)();
17
17
 
18
18
  /**
19
- * Creates a new WixData search builder.
19
+ * Creates a new search builder.
20
20
  * @public
21
21
  *
22
22
  * @example
23
- * ```ts
23
+ * ```ts title="Build a search"
24
24
  * import { items, SearchBuilder, SearchParams, Filter } from '@wix/data'
25
25
  *
26
26
  * const request = SearchBuilder()
@@ -39,7 +39,7 @@ const SearchBuilder = exports.SearchBuilder = searchUtils.SearchBuilder;
39
39
  * @public
40
40
  *
41
41
  * @example
42
- * ```ts
42
+ * ```ts title="Create search parameters"
43
43
  * import { SearchParams } from '@wix/data'
44
44
  * // Simple expression
45
45
  * SearchParams.expression('search text')
@@ -1 +1 @@
1
- {"version":3,"names":["_searchBuilderUtils","require","searchUtils","createSearchUtils","SearchBuilder","exports","SearchParams"],"sources":["../../../src/api/WixDataSearchBuilder.ts"],"sourcesContent":["import { createSearchUtils } from '@wix/sdk-runtime/search-builder-utils'\nimport type {\n SearchSpec,\n SearchBuilder as SDKSearchBuilder,\n SearchRequest,\n SearchParamsFactory,\n} from '@wix/sdk-types'\nimport type { WixDataItem } from './types'\n\n/**\n * WixData SearchSpec - allows searching/sorting on any string field\n * since WixData collections are dynamic and don't have a fixed schema.\n */\ninterface WixDataSearchSpec extends SearchSpec {\n wql: [\n {\n fields: string[]\n sort: 'BOTH'\n }\n ]\n paging: 'offset' | 'cursor'\n}\n\ntype WixDataSearchRequest = SearchRequest<WixDataItem, WixDataSearchSpec>\n\n/**\n * WixData SearchBuilder.\n * @public\n */\nexport type WixDataSearchBuilder = Omit<\n SDKSearchBuilder<WixDataItem, WixDataSearchSpec, WixDataSearchRequest>,\n 'withAggregation' | 'withTimeZone'\n>\n\nconst searchUtils = createSearchUtils<WixDataItem, WixDataSearchSpec>()\n\n/**\n * Creates a new WixData search builder.\n * @public\n *\n * @example\n * ```ts\n * import { items, SearchBuilder, SearchParams, Filter } from '@wix/data'\n *\n * const request = SearchBuilder()\n * .withSearch(SearchParams.expression('red car'))\n * .withFilter(Filter('status').eq('active'))\n * .withPaging({ limit: 10, offset: 0 })\n * .build()\n *\n * const result = await items.search('myCollection', request)\n * ```\n */\nexport const SearchBuilder: () => WixDataSearchBuilder =\n searchUtils.SearchBuilder\n\n/**\n * Search parameter factory for creating search expressions.\n * @public\n *\n * @example\n * ```ts\n * import { SearchParams } from '@wix/data'\n * // Simple expression\n * SearchParams.expression('search text')\n *\n * // Fuzzy search\n * SearchParams.fuzzy(true)\n *\n * // AND mode (all terms must match)\n * SearchParams.mode('AND')\n * ```\n */\nexport const SearchParams: SearchParamsFactory<WixDataSearchSpec> =\n searchUtils.SearchParams\n"],"mappings":";;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AASA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;;AAMA,MAAMC,WAAW,GAAG,IAAAC,qCAAiB,EAAiC,CAAC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,aAAyC,GAAAC,OAAA,CAAAD,aAAA,GACpDF,WAAW,CAACE,aAAa;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,YAAoD,GAAAD,OAAA,CAAAC,YAAA,GAC/DJ,WAAW,CAACI,YAAY","ignoreList":[]}
1
+ {"version":3,"names":["_searchBuilderUtils","require","searchUtils","createSearchUtils","SearchBuilder","exports","SearchParams"],"sources":["../../../src/api/WixDataSearchBuilder.ts"],"sourcesContent":["import { createSearchUtils } from '@wix/sdk-runtime/search-builder-utils'\nimport type {\n SearchSpec,\n SearchBuilder as SDKSearchBuilder,\n SearchRequest,\n SearchParamsFactory,\n} from '@wix/sdk-types'\nimport type { WixDataItem } from './types'\n\n/**\n * WixData SearchSpec - allows searching/sorting on any string field\n * since WixData collections are dynamic and don't have a fixed schema.\n */\ninterface WixDataSearchSpec extends SearchSpec {\n wql: [\n {\n fields: string[]\n sort: 'BOTH'\n }\n ]\n paging: 'offset' | 'cursor'\n}\n\ntype WixDataSearchRequest = SearchRequest<WixDataItem, WixDataSearchSpec>\n\n/**\n * Search builder.\n * @public\n */\nexport type WixDataSearchBuilder = Omit<\n SDKSearchBuilder<WixDataItem, WixDataSearchSpec, WixDataSearchRequest>,\n 'withAggregation' | 'withTimeZone'\n>\n\nconst searchUtils = createSearchUtils<WixDataItem, WixDataSearchSpec>()\n\n/**\n * Creates a new search builder.\n * @public\n *\n * @example\n * ```ts title=\"Build a search\"\n * import { items, SearchBuilder, SearchParams, Filter } from '@wix/data'\n *\n * const request = SearchBuilder()\n * .withSearch(SearchParams.expression('red car'))\n * .withFilter(Filter('status').eq('active'))\n * .withPaging({ limit: 10, offset: 0 })\n * .build()\n *\n * const result = await items.search('myCollection', request)\n * ```\n */\nexport const SearchBuilder: () => WixDataSearchBuilder =\n searchUtils.SearchBuilder\n\n/**\n * Search parameter factory for creating search expressions.\n * @public\n *\n * @example\n * ```ts title=\"Create search parameters\"\n * import { SearchParams } from '@wix/data'\n * // Simple expression\n * SearchParams.expression('search text')\n *\n * // Fuzzy search\n * SearchParams.fuzzy(true)\n *\n * // AND mode (all terms must match)\n * SearchParams.mode('AND')\n * ```\n */\nexport const SearchParams: SearchParamsFactory<WixDataSearchSpec> =\n searchUtils.SearchParams\n"],"mappings":";;;;AAAA,IAAAA,mBAAA,GAAAC,OAAA;AASA;AACA;AACA;AACA;;AAaA;AACA;AACA;AACA;;AAMA,MAAMC,WAAW,GAAG,IAAAC,qCAAiB,EAAiC,CAAC;;AAEvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,aAAyC,GAAAC,OAAA,CAAAD,aAAA,GACpDF,WAAW,CAACE,aAAa;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,YAAoD,GAAAD,OAAA,CAAAC,YAAA,GAC/DJ,WAAW,CAACI,YAAY","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.SearchOptionsBuilder = void 0;
5
5
  /**
6
- * Builder for search options used by Wix Data search operations.
6
+ * Options builder for search operations.
7
7
  *
8
8
  * Use this builder to configure search behavior such as translation language
9
9
  * and reference inclusion.
@@ -47,12 +47,12 @@ class WixDataSearchOptionsBuilderImpl {
47
47
  }
48
48
 
49
49
  /**
50
- * Creates a new WixData search options builder.
50
+ * Creates a new search options builder.
51
51
  * @public
52
52
  * @documentationMaturity preview
53
53
  *
54
54
  * @example
55
- * ```ts
55
+ * ```ts title="Create a search options builder"
56
56
  * import { items, SearchBuilder, SearchOptionsBuilder, SearchParams } from '@wix/data'
57
57
  *
58
58
  * const searchRequest = SearchBuilder()
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataSearchOptionsBuilderImpl","constructor","options","withLanguage","value","copy","language","withIncludeReferences","includeReferences","map","includeReference","build","SearchOptionsBuilder","exports"],"sources":["../../../src/api/WixDataSearchOptionsBuilder.ts"],"sourcesContent":["import type { WixDataSearchOptions } from './types'\n\n/**\n * Builder for search options used by Wix Data search operations.\n *\n * Use this builder to configure search behavior such as translation language\n * and reference inclusion.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataSearchOptionsBuilder {\n /**\n * Sets the language used for the search.\n */\n withLanguage(value: string): WixDataSearchOptionsBuilder\n /**\n * Includes referenced items for the specified reference fields.\n *\n * Use `limit` to cap how many referenced items are returned per field.\n */\n withIncludeReferences(\n value: { field: string; limit?: number }[]\n ): WixDataSearchOptionsBuilder\n /**\n * Builds the search options object.\n */\n build(): WixDataSearchOptions\n}\n\nclass WixDataSearchOptionsBuilderImpl implements WixDataSearchOptionsBuilder {\n constructor(private readonly options: WixDataSearchOptions = {}) {}\n\n withLanguage(value: string): WixDataSearchOptionsBuilder {\n return this.copy({ language: value })\n }\n\n withIncludeReferences(\n value: { field: string; limit?: number }[]\n ): WixDataSearchOptionsBuilder {\n return this.copy({\n includeReferences: value.map((includeReference) => ({\n ...includeReference,\n })),\n })\n }\n\n build(): WixDataSearchOptions {\n return {\n ...this.options,\n ...(this.options.includeReferences\n ? {\n includeReferences: this.options.includeReferences.map(\n (includeReference) => ({ ...includeReference })\n ),\n }\n : {}),\n }\n }\n\n private copy(options: WixDataSearchOptions): WixDataSearchOptionsBuilder {\n return new WixDataSearchOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData search options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { items, SearchBuilder, SearchOptionsBuilder, SearchParams } from '@wix/data'\n *\n * const searchRequest = SearchBuilder()\n * .withSearch(SearchParams.expression('red car'))\n * .build()\n *\n * const options = SearchOptionsBuilder()\n * .withIncludeReferences([{ field: 'author', limit: 3 }])\n * .build()\n *\n * const result = await items.search<MyItem>(\n * 'myCollection',\n * searchRequest,\n * options\n * )\n * ```\n */\nexport const SearchOptionsBuilder: () => WixDataSearchOptionsBuilder = () =>\n new WixDataSearchOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA,MAAMA,+BAA+B,CAAwC;EAC3EC,WAAWA,CAAkBC,OAA6B,GAAG,CAAC,CAAC,EAAE;IAAA,KAApCA,OAA6B,GAA7BA,OAA6B;EAAQ;EAElEC,YAAYA,CAACC,KAAa,EAA+B;IACvD,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,QAAQ,EAAEF;IAAM,CAAC,CAAC;EACvC;EAEAG,qBAAqBA,CACnBH,KAA0C,EACb;IAC7B,OAAO,IAAI,CAACC,IAAI,CAAC;MACfG,iBAAiB,EAAEJ,KAAK,CAACK,GAAG,CAAEC,gBAAgB,KAAM;QAClD,GAAGA;MACL,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;EAEAC,KAAKA,CAAA,EAAyB;IAC5B,OAAO;MACL,GAAG,IAAI,CAACT,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACM,iBAAiB,GAC9B;QACEA,iBAAiB,EAAE,IAAI,CAACN,OAAO,CAACM,iBAAiB,CAACC,GAAG,CAClDC,gBAAgB,KAAM;UAAE,GAAGA;QAAiB,CAAC,CAChD;MACF,CAAC,GACD,CAAC,CAAC;IACR,CAAC;EACH;EAEQL,IAAIA,CAACH,OAA6B,EAA+B;IACvE,OAAO,IAAIF,+BAA+B,CAAC;MACzC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMU,oBAAuD,GAAGA,CAAA,KACrE,IAAIZ,+BAA+B,CAAC,CAAC;AAAAa,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataSearchOptionsBuilderImpl","constructor","options","withLanguage","value","copy","language","withIncludeReferences","includeReferences","map","includeReference","build","SearchOptionsBuilder","exports"],"sources":["../../../src/api/WixDataSearchOptionsBuilder.ts"],"sourcesContent":["import type { WixDataSearchOptions } from './types'\n\n/**\n * Options builder for search operations.\n *\n * Use this builder to configure search behavior such as translation language\n * and reference inclusion.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataSearchOptionsBuilder {\n /**\n * Sets the language used for the search.\n */\n withLanguage(value: string): WixDataSearchOptionsBuilder\n /**\n * Includes referenced items for the specified reference fields.\n *\n * Use `limit` to cap how many referenced items each field returns.\n */\n withIncludeReferences(\n value: { field: string; limit?: number }[]\n ): WixDataSearchOptionsBuilder\n /**\n * Builds the search options object.\n */\n build(): WixDataSearchOptions\n}\n\nclass WixDataSearchOptionsBuilderImpl implements WixDataSearchOptionsBuilder {\n constructor(private readonly options: WixDataSearchOptions = {}) {}\n\n withLanguage(value: string): WixDataSearchOptionsBuilder {\n return this.copy({ language: value })\n }\n\n withIncludeReferences(\n value: { field: string; limit?: number }[]\n ): WixDataSearchOptionsBuilder {\n return this.copy({\n includeReferences: value.map((includeReference) => ({\n ...includeReference,\n })),\n })\n }\n\n build(): WixDataSearchOptions {\n return {\n ...this.options,\n ...(this.options.includeReferences\n ? {\n includeReferences: this.options.includeReferences.map(\n (includeReference) => ({ ...includeReference })\n ),\n }\n : {}),\n }\n }\n\n private copy(options: WixDataSearchOptions): WixDataSearchOptionsBuilder {\n return new WixDataSearchOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new search options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Create a search options builder\"\n * import { items, SearchBuilder, SearchOptionsBuilder, SearchParams } from '@wix/data'\n *\n * const searchRequest = SearchBuilder()\n * .withSearch(SearchParams.expression('red car'))\n * .build()\n *\n * const options = SearchOptionsBuilder()\n * .withIncludeReferences([{ field: 'author', limit: 3 }])\n * .build()\n *\n * const result = await items.search<MyItem>(\n * 'myCollection',\n * searchRequest,\n * options\n * )\n * ```\n */\nexport const SearchOptionsBuilder: () => WixDataSearchOptionsBuilder = () =>\n new WixDataSearchOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAoBA,MAAMA,+BAA+B,CAAwC;EAC3EC,WAAWA,CAAkBC,OAA6B,GAAG,CAAC,CAAC,EAAE;IAAA,KAApCA,OAA6B,GAA7BA,OAA6B;EAAQ;EAElEC,YAAYA,CAACC,KAAa,EAA+B;IACvD,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,QAAQ,EAAEF;IAAM,CAAC,CAAC;EACvC;EAEAG,qBAAqBA,CACnBH,KAA0C,EACb;IAC7B,OAAO,IAAI,CAACC,IAAI,CAAC;MACfG,iBAAiB,EAAEJ,KAAK,CAACK,GAAG,CAAEC,gBAAgB,KAAM;QAClD,GAAGA;MACL,CAAC,CAAC;IACJ,CAAC,CAAC;EACJ;EAEAC,KAAKA,CAAA,EAAyB;IAC5B,OAAO;MACL,GAAG,IAAI,CAACT,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACM,iBAAiB,GAC9B;QACEA,iBAAiB,EAAE,IAAI,CAACN,OAAO,CAACM,iBAAiB,CAACC,GAAG,CAClDC,gBAAgB,KAAM;UAAE,GAAGA;QAAiB,CAAC,CAChD;MACF,CAAC,GACD,CAAC,CAAC;IACR,CAAC;EACH;EAEQL,IAAIA,CAACH,OAA6B,EAA+B;IACvE,OAAO,IAAIF,+BAA+B,CAAC;MACzC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMU,oBAAuD,GAAGA,CAAA,KACrE,IAAIZ,+BAA+B,CAAC,CAAC;AAAAa,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -3,7 +3,7 @@
3
3
  exports.__esModule = true;
4
4
  exports.UpdateOptionsBuilder = void 0;
5
5
  /**
6
- * Builder for update options used by Wix Data update operations.
6
+ * Options builder for update operations.
7
7
  *
8
8
  * Use this builder to configure update behavior such as hooks suppression,
9
9
  * reference handling, and conditional updates.
@@ -55,12 +55,12 @@ class WixDataUpdateOptionsBuilderImpl {
55
55
  }
56
56
 
57
57
  /**
58
- * Creates a new WixData update options builder.
58
+ * Creates a new update options builder.
59
59
  * @public
60
60
  * @documentationMaturity preview
61
61
  *
62
62
  * @example
63
- * ```ts
63
+ * ```ts title="Create an update options builder"
64
64
  * import { items, Filter, UpdateOptionsBuilder } from '@wix/data'
65
65
  *
66
66
  * const options = UpdateOptionsBuilder()
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataUpdateOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withIncludeReferences","includeReferences","withSaveReferences","saveReferences","withCondition","condition","filter","build","UpdateOptionsBuilder","exports"],"sources":["../../../src/api/WixDataUpdateOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type {\n WixDataItem,\n WixDataQuerySpec,\n WixDataUpdateOptions,\n} from './types'\n\n/**\n * Builder for update options used by Wix Data update operations.\n *\n * Use this builder to configure update behavior such as hooks suppression,\n * reference handling, and conditional updates.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataUpdateOptionsBuilder {\n /**\n * Sets whether update hooks are suppressed.\n *\n * When `true`, the update operation runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataUpdateOptionsBuilder\n /**\n * Sets whether draft items are included when updating items.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataUpdateOptionsBuilder\n /**\n * Sets whether referenced items are included in the update response.\n * @internal\n */\n withIncludeReferences(value: boolean): WixDataUpdateOptionsBuilder\n /**\n * Sets whether reference values should be saved from the data item.\n */\n withSaveReferences(value: boolean): WixDataUpdateOptionsBuilder\n /**\n * Updates the item only when the specified condition is met.\n */\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataUpdateOptionsBuilder\n /**\n * Builds the update options object.\n */\n build(): WixDataUpdateOptions\n}\n\nclass WixDataUpdateOptionsBuilderImpl implements WixDataUpdateOptionsBuilder {\n constructor(private readonly options: WixDataUpdateOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataUpdateOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataUpdateOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withIncludeReferences(value: boolean): WixDataUpdateOptionsBuilder {\n return this.copy({ includeReferences: value })\n }\n\n withSaveReferences(value: boolean): WixDataUpdateOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataUpdateOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataUpdateOptions {\n return { ...this.options }\n }\n\n private copy(options: WixDataUpdateOptions): WixDataUpdateOptionsBuilder {\n return new WixDataUpdateOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData update options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts\n * import { items, Filter, UpdateOptionsBuilder } from '@wix/data'\n *\n * const options = UpdateOptionsBuilder()\n * .withSuppressHooks(true)\n * .withCondition(Filter('status').eq('active'))\n * .build()\n *\n * const updatedItem = await items.update<MyItem>(\n * 'myCollection',\n * { _id: 'myItemId', status: 'active' },\n * options\n * )\n * ```\n */\nexport const UpdateOptionsBuilder: () => WixDataUpdateOptionsBuilder = () =>\n new WixDataUpdateOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkCA,MAAMA,+BAA+B,CAAwC;EAC3EC,WAAWA,CAAkBC,OAA6B,GAAG,CAAC,CAAC,EAAE;IAAA,KAApCA,OAA6B,GAA7BA,OAA6B;EAAQ;EAElEC,iBAAiBA,CAACC,KAAc,EAA+B;IAC7D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA+B;IAC1D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,qBAAqBA,CAACL,KAAc,EAA+B;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,iBAAiB,EAAEN;IAAM,CAAC,CAAC;EAChD;EAEAO,kBAAkBA,CAACP,KAAc,EAA+B;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,cAAc,EAAER;IAAM,CAAC,CAAC;EAC7C;EAEAS,aAAaA,CACXT,KAAsD,EACzB;IAC7B,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,SAAS,EAAEV,KAAK,CAACW;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAAyB;IAC5B,OAAO;MAAE,GAAG,IAAI,CAACd;IAAQ,CAAC;EAC5B;EAEQG,IAAIA,CAACH,OAA6B,EAA+B;IACvE,OAAO,IAAIF,+BAA+B,CAAC;MACzC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMe,oBAAuD,GAAGA,CAAA,KACrE,IAAIjB,+BAA+B,CAAC,CAAC;AAAAkB,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataUpdateOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withIncludeReferences","includeReferences","withSaveReferences","saveReferences","withCondition","condition","filter","build","UpdateOptionsBuilder","exports"],"sources":["../../../src/api/WixDataUpdateOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type {\n WixDataItem,\n WixDataQuerySpec,\n WixDataUpdateOptions,\n} from './types'\n\n/**\n * Options builder for update operations.\n *\n * Use this builder to configure update behavior such as hooks suppression,\n * reference handling, and conditional updates.\n * @public\n * @builder\n * @documentationMaturity preview\n */\nexport interface WixDataUpdateOptionsBuilder {\n /**\n * Sets whether to suppress update hooks.\n *\n * When `true`, the update operation runs without triggering hooks.\n */\n withSuppressHooks(value: boolean): WixDataUpdateOptionsBuilder\n /**\n * Sets whether to include draft items when updating items.\n * @internal\n */\n withShowDrafts(value: boolean): WixDataUpdateOptionsBuilder\n /**\n * Sets whether to include referenced items in the update response.\n * @internal\n */\n withIncludeReferences(value: boolean): WixDataUpdateOptionsBuilder\n /**\n * Sets whether to save reference values from the data item.\n */\n withSaveReferences(value: boolean): WixDataUpdateOptionsBuilder\n /**\n * Updates the item only when it matches the specified condition.\n */\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataUpdateOptionsBuilder\n /**\n * Builds the update options object.\n */\n build(): WixDataUpdateOptions\n}\n\nclass WixDataUpdateOptionsBuilderImpl implements WixDataUpdateOptionsBuilder {\n constructor(private readonly options: WixDataUpdateOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataUpdateOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataUpdateOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withIncludeReferences(value: boolean): WixDataUpdateOptionsBuilder {\n return this.copy({ includeReferences: value })\n }\n\n withSaveReferences(value: boolean): WixDataUpdateOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataUpdateOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataUpdateOptions {\n return { ...this.options }\n }\n\n private copy(options: WixDataUpdateOptions): WixDataUpdateOptionsBuilder {\n return new WixDataUpdateOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new update options builder.\n * @public\n * @documentationMaturity preview\n *\n * @example\n * ```ts title=\"Create an update options builder\"\n * import { items, Filter, UpdateOptionsBuilder } from '@wix/data'\n *\n * const options = UpdateOptionsBuilder()\n * .withSuppressHooks(true)\n * .withCondition(Filter('status').eq('active'))\n * .build()\n *\n * const updatedItem = await items.update<MyItem>(\n * 'myCollection',\n * { _id: 'myItemId', status: 'active' },\n * options\n * )\n * ```\n */\nexport const UpdateOptionsBuilder: () => WixDataUpdateOptionsBuilder = () =>\n new WixDataUpdateOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkCA,MAAMA,+BAA+B,CAAwC;EAC3EC,WAAWA,CAAkBC,OAA6B,GAAG,CAAC,CAAC,EAAE;IAAA,KAApCA,OAA6B,GAA7BA,OAA6B;EAAQ;EAElEC,iBAAiBA,CAACC,KAAc,EAA+B;IAC7D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA+B;IAC1D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,qBAAqBA,CAACL,KAAc,EAA+B;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,iBAAiB,EAAEN;IAAM,CAAC,CAAC;EAChD;EAEAO,kBAAkBA,CAACP,KAAc,EAA+B;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,cAAc,EAAER;IAAM,CAAC,CAAC;EAC7C;EAEAS,aAAaA,CACXT,KAAsD,EACzB;IAC7B,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,SAAS,EAAEV,KAAK,CAACW;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAAyB;IAC5B,OAAO;MAAE,GAAG,IAAI,CAACd;IAAQ,CAAC;EAC5B;EAEQG,IAAIA,CAACH,OAA6B,EAA+B;IACvE,OAAO,IAAIF,+BAA+B,CAAC;MACzC,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMe,oBAAuD,GAAGA,CAAA,KACrE,IAAIjB,+BAA+B,CAAC,CAAC;AAAAkB,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -25,12 +25,12 @@ class WixDataAggregateOptionsBuilderImpl {
25
25
  }
26
26
  }
27
27
  /**
28
- * Creates a new WixData aggregate options builder.
28
+ * Creates a new aggregate options builder.
29
29
  * @public
30
30
  * @documentationMaturity preview
31
31
  *
32
32
  * @example
33
- * ```ts
33
+ * ```ts title="Create an aggregate options builder"
34
34
  * import { items, AggregateOptionsBuilder } from '@wix/data'
35
35
  *
36
36
  *
@@ -21,12 +21,12 @@ class WixDataAsyncPatchByFilterOptionsBuilderImpl {
21
21
  }
22
22
  }
23
23
  /**
24
- * Creates a new WixData async patch by filter options builder.
24
+ * Creates a new async patch-by-filter options builder.
25
25
  * @public
26
26
  * @documentationMaturity preview
27
27
  *
28
28
  * @example
29
- * ```ts
29
+ * ```ts title="Create an async patch-by-filter options builder"
30
30
  * import { items, AsyncPatchByFilterOptionsBuilder } from '@wix/data'
31
31
  *
32
32
  * const options = AsyncPatchByFilterOptionsBuilder()
@@ -21,12 +21,12 @@ class WixDataAsyncRemoveByFilterOptionsBuilderImpl {
21
21
  }
22
22
  }
23
23
  /**
24
- * Creates a new WixData async remove by filter options builder.
24
+ * Creates a new async remove-by-filter options builder.
25
25
  * @public
26
26
  * @documentationMaturity preview
27
27
  *
28
28
  * @example
29
- * ```ts
29
+ * ```ts title="Create an async remove-by-filter options builder"
30
30
  * import { items, AsyncRemoveByFilterOptionsBuilder } from '@wix/data'
31
31
  *
32
32
  * const options = AsyncRemoveByFilterOptionsBuilder()