@wix/wix-data-items-common 1.0.310 → 1.0.312

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 (78) hide show
  1. package/dist/cjs/api/WixDataAggregateOptionsBuilder.js +1 -38
  2. package/dist/cjs/api/WixDataAggregateOptionsBuilder.js.map +1 -1
  3. package/dist/cjs/api/WixDataApi.js.map +1 -1
  4. package/dist/cjs/api/WixDataBulkInsertOptionsBuilder.js +1 -13
  5. package/dist/cjs/api/WixDataBulkInsertOptionsBuilder.js.map +1 -1
  6. package/dist/cjs/api/WixDataBulkPatchOptionsBuilder.js +1 -13
  7. package/dist/cjs/api/WixDataBulkPatchOptionsBuilder.js.map +1 -1
  8. package/dist/cjs/api/WixDataBulkRemoveOptionsBuilder.js +1 -13
  9. package/dist/cjs/api/WixDataBulkRemoveOptionsBuilder.js.map +1 -1
  10. package/dist/cjs/api/WixDataBulkSaveOptionsBuilder.js +1 -13
  11. package/dist/cjs/api/WixDataBulkSaveOptionsBuilder.js.map +1 -1
  12. package/dist/cjs/api/WixDataBulkUpdateOptionsBuilder.js +1 -13
  13. package/dist/cjs/api/WixDataBulkUpdateOptionsBuilder.js.map +1 -1
  14. package/dist/cjs/api/WixDataFieldModificationsBuilder.js.map +1 -1
  15. package/dist/cjs/api/WixDataInsertOptionsBuilder.js +1 -13
  16. package/dist/cjs/api/WixDataInsertOptionsBuilder.js.map +1 -1
  17. package/dist/cjs/api/WixDataPatch.js.map +1 -1
  18. package/dist/cjs/api/WixDataQueryReferencedItemsOptionsBuilder.js +0 -25
  19. package/dist/cjs/api/WixDataQueryReferencedItemsOptionsBuilder.js.map +1 -1
  20. package/dist/cjs/api/WixDataRemoveOptionsBuilder.js +1 -13
  21. package/dist/cjs/api/WixDataRemoveOptionsBuilder.js.map +1 -1
  22. package/dist/cjs/api/WixDataSaveOptionsBuilder.js +1 -13
  23. package/dist/cjs/api/WixDataSaveOptionsBuilder.js.map +1 -1
  24. package/dist/cjs/api/WixDataUpdateOptionsBuilder.js +1 -13
  25. package/dist/cjs/api/WixDataUpdateOptionsBuilder.js.map +1 -1
  26. package/dist/cjs/api/types.js.map +1 -1
  27. package/dist/esm/api/WixDataAggregateOptionsBuilder.js +1 -30
  28. package/dist/esm/api/WixDataAggregateOptionsBuilder.js.map +1 -1
  29. package/dist/esm/api/WixDataApi.js.map +1 -1
  30. package/dist/esm/api/WixDataBulkInsertOptionsBuilder.js +0 -6
  31. package/dist/esm/api/WixDataBulkInsertOptionsBuilder.js.map +1 -1
  32. package/dist/esm/api/WixDataBulkPatchOptionsBuilder.js +0 -6
  33. package/dist/esm/api/WixDataBulkPatchOptionsBuilder.js.map +1 -1
  34. package/dist/esm/api/WixDataBulkRemoveOptionsBuilder.js +0 -6
  35. package/dist/esm/api/WixDataBulkRemoveOptionsBuilder.js.map +1 -1
  36. package/dist/esm/api/WixDataBulkSaveOptionsBuilder.js +0 -6
  37. package/dist/esm/api/WixDataBulkSaveOptionsBuilder.js.map +1 -1
  38. package/dist/esm/api/WixDataBulkUpdateOptionsBuilder.js +0 -6
  39. package/dist/esm/api/WixDataBulkUpdateOptionsBuilder.js.map +1 -1
  40. package/dist/esm/api/WixDataInsertOptionsBuilder.js +1 -9
  41. package/dist/esm/api/WixDataInsertOptionsBuilder.js.map +1 -1
  42. package/dist/esm/api/WixDataQueryReferencedItemsOptionsBuilder.js +0 -21
  43. package/dist/esm/api/WixDataQueryReferencedItemsOptionsBuilder.js.map +1 -1
  44. package/dist/esm/api/WixDataRemoveOptionsBuilder.js +1 -9
  45. package/dist/esm/api/WixDataRemoveOptionsBuilder.js.map +1 -1
  46. package/dist/esm/api/WixDataSaveOptionsBuilder.js +1 -9
  47. package/dist/esm/api/WixDataSaveOptionsBuilder.js.map +1 -1
  48. package/dist/esm/api/WixDataUpdateOptionsBuilder.js +1 -9
  49. package/dist/esm/api/WixDataUpdateOptionsBuilder.js.map +1 -1
  50. package/dist/types/api/WixDataAggregateOptionsBuilder.d.ts +0 -7
  51. package/dist/types/api/WixDataAggregateOptionsBuilder.d.ts.map +1 -1
  52. package/dist/types/api/WixDataApi.d.ts.map +1 -1
  53. package/dist/types/api/WixDataBulkInsertOptionsBuilder.d.ts +0 -1
  54. package/dist/types/api/WixDataBulkInsertOptionsBuilder.d.ts.map +1 -1
  55. package/dist/types/api/WixDataBulkPatchOptionsBuilder.d.ts +0 -1
  56. package/dist/types/api/WixDataBulkPatchOptionsBuilder.d.ts.map +1 -1
  57. package/dist/types/api/WixDataBulkRemoveOptionsBuilder.d.ts +0 -1
  58. package/dist/types/api/WixDataBulkRemoveOptionsBuilder.d.ts.map +1 -1
  59. package/dist/types/api/WixDataBulkSaveOptionsBuilder.d.ts +0 -1
  60. package/dist/types/api/WixDataBulkSaveOptionsBuilder.d.ts.map +1 -1
  61. package/dist/types/api/WixDataBulkUpdateOptionsBuilder.d.ts +0 -1
  62. package/dist/types/api/WixDataBulkUpdateOptionsBuilder.d.ts.map +1 -1
  63. package/dist/types/api/WixDataFieldModificationsBuilder.d.ts +6 -6
  64. package/dist/types/api/WixDataInsertOptionsBuilder.d.ts +0 -1
  65. package/dist/types/api/WixDataInsertOptionsBuilder.d.ts.map +1 -1
  66. package/dist/types/api/WixDataPatch.d.ts +28 -3
  67. package/dist/types/api/WixDataPatch.d.ts.map +1 -1
  68. package/dist/types/api/WixDataQueryReferencedItemsOptionsBuilder.d.ts +0 -6
  69. package/dist/types/api/WixDataQueryReferencedItemsOptionsBuilder.d.ts.map +1 -1
  70. package/dist/types/api/WixDataRemoveOptionsBuilder.d.ts +0 -1
  71. package/dist/types/api/WixDataRemoveOptionsBuilder.d.ts.map +1 -1
  72. package/dist/types/api/WixDataSaveOptionsBuilder.d.ts +0 -1
  73. package/dist/types/api/WixDataSaveOptionsBuilder.d.ts.map +1 -1
  74. package/dist/types/api/WixDataUpdateOptionsBuilder.d.ts +0 -1
  75. package/dist/types/api/WixDataUpdateOptionsBuilder.d.ts.map +1 -1
  76. package/dist/types/api/types.d.ts +333 -21
  77. package/dist/types/api/types.d.ts.map +1 -1
  78. package/package.json +2 -2
@@ -21,13 +21,6 @@ class WixDataBulkInsertOptionsBuilderImpl {
21
21
  showDrafts: value
22
22
  });
23
23
  }
24
- withAppOptions(value) {
25
- return this.copy({
26
- appOptions: {
27
- ...value
28
- }
29
- });
30
- }
31
24
  withSaveReferences(value) {
32
25
  return this.copy({
33
26
  saveReferences: value
@@ -40,12 +33,7 @@ class WixDataBulkInsertOptionsBuilderImpl {
40
33
  }
41
34
  build() {
42
35
  return {
43
- ...this.options,
44
- ...(this.options.appOptions ? {
45
- appOptions: {
46
- ...this.options.appOptions
47
- }
48
- } : {})
36
+ ...this.options
49
37
  };
50
38
  }
51
39
  copy(options) {
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataBulkInsertOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","withSaveReferences","saveReferences","withOverrideExisting","overrideExisting","build","BulkInsertOptionsBuilder","exports"],"sources":["../../../src/api/WixDataBulkInsertOptionsBuilder.ts"],"sourcesContent":["import type { WixDataBulkInsertOptions } from './types'\n\n/**\n * WixData bulk insert options builder.\n * @internal\n */\nexport interface WixDataBulkInsertOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataBulkInsertOptionsBuilder\n withShowDrafts(value: boolean): WixDataBulkInsertOptionsBuilder\n withAppOptions(value: Record<string, any>): WixDataBulkInsertOptionsBuilder\n withSaveReferences(value: boolean): WixDataBulkInsertOptionsBuilder\n withOverrideExisting(value: boolean): WixDataBulkInsertOptionsBuilder\n build(): WixDataBulkInsertOptions\n}\n\nclass WixDataBulkInsertOptionsBuilderImpl\n implements WixDataBulkInsertOptionsBuilder\n{\n constructor(private readonly options: WixDataBulkInsertOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataBulkInsertOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataBulkInsertOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withAppOptions(value: Record<string, any>): WixDataBulkInsertOptionsBuilder {\n return this.copy({ appOptions: { ...value } })\n }\n\n withSaveReferences(value: boolean): WixDataBulkInsertOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n withOverrideExisting(value: boolean): WixDataBulkInsertOptionsBuilder {\n return this.copy({ overrideExisting: value })\n }\n\n build(): WixDataBulkInsertOptions {\n return {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n }\n }\n\n private copy(\n options: WixDataBulkInsertOptions\n ): WixDataBulkInsertOptionsBuilder {\n return new WixDataBulkInsertOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData bulk insert options builder.\n * @internal\n */\nexport const BulkInsertOptionsBuilder: () => WixDataBulkInsertOptionsBuilder =\n () => new WixDataBulkInsertOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;;AAUA,MAAMA,mCAAmC,CAEzC;EACEC,WAAWA,CAAkBC,OAAiC,GAAG,CAAC,CAAC,EAAE;IAAA,KAAxCA,OAAiC,GAAjCA,OAAiC;EAAQ;EAEtEC,iBAAiBA,CAACC,KAAc,EAAmC;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAAmC;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,cAAcA,CAACL,KAA0B,EAAmC;IAC1E,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,kBAAkBA,CAACP,KAAc,EAAmC;IAClE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,cAAc,EAAER;IAAM,CAAC,CAAC;EAC7C;EAEAS,oBAAoBA,CAACT,KAAc,EAAmC;IACpE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,gBAAgB,EAAEV;IAAM,CAAC,CAAC;EAC/C;EAEAW,KAAKA,CAAA,EAA6B;IAChC,OAAO;MACL,GAAG,IAAI,CAACb,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACQ,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACR,OAAO,CAACQ;QAAW;MAAE,CAAC,GAC9C,CAAC,CAAC;IACR,CAAC;EACH;EAEQL,IAAIA,CACVH,OAAiC,EACA;IACjC,OAAO,IAAIF,mCAAmC,CAAC;MAC7C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACO,MAAMc,wBAA+D,GAC1EA,CAAA,KAAM,IAAIhB,mCAAmC,CAAC,CAAC;AAAAiB,OAAA,CAAAD,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataBulkInsertOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withSaveReferences","saveReferences","withOverrideExisting","overrideExisting","build","BulkInsertOptionsBuilder","exports"],"sources":["../../../src/api/WixDataBulkInsertOptionsBuilder.ts"],"sourcesContent":["import type { WixDataBulkInsertOptions } from './types'\n\n/**\n * WixData bulk insert options builder.\n * @internal\n */\nexport interface WixDataBulkInsertOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataBulkInsertOptionsBuilder\n withShowDrafts(value: boolean): WixDataBulkInsertOptionsBuilder\n withSaveReferences(value: boolean): WixDataBulkInsertOptionsBuilder\n withOverrideExisting(value: boolean): WixDataBulkInsertOptionsBuilder\n build(): WixDataBulkInsertOptions\n}\n\nclass WixDataBulkInsertOptionsBuilderImpl\n implements WixDataBulkInsertOptionsBuilder\n{\n constructor(private readonly options: WixDataBulkInsertOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataBulkInsertOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataBulkInsertOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withSaveReferences(value: boolean): WixDataBulkInsertOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n withOverrideExisting(value: boolean): WixDataBulkInsertOptionsBuilder {\n return this.copy({ overrideExisting: value })\n }\n\n build(): WixDataBulkInsertOptions {\n return {\n ...this.options,\n }\n }\n\n private copy(\n options: WixDataBulkInsertOptions\n ): WixDataBulkInsertOptionsBuilder {\n return new WixDataBulkInsertOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData bulk insert options builder.\n * @internal\n */\nexport const BulkInsertOptionsBuilder: () => WixDataBulkInsertOptionsBuilder =\n () => new WixDataBulkInsertOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;;AASA,MAAMA,mCAAmC,CAEzC;EACEC,WAAWA,CAAkBC,OAAiC,GAAG,CAAC,CAAC,EAAE;IAAA,KAAxCA,OAAiC,GAAjCA,OAAiC;EAAQ;EAEtEC,iBAAiBA,CAACC,KAAc,EAAmC;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAAmC;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,kBAAkBA,CAACL,KAAc,EAAmC;IAClE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,cAAc,EAAEN;IAAM,CAAC,CAAC;EAC7C;EAEAO,oBAAoBA,CAACP,KAAc,EAAmC;IACpE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,gBAAgB,EAAER;IAAM,CAAC,CAAC;EAC/C;EAEAS,KAAKA,CAAA,EAA6B;IAChC,OAAO;MACL,GAAG,IAAI,CAACX;IACV,CAAC;EACH;EAEQG,IAAIA,CACVH,OAAiC,EACA;IACjC,OAAO,IAAIF,mCAAmC,CAAC;MAC7C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACO,MAAMY,wBAA+D,GAC1EA,CAAA,KAAM,IAAId,mCAAmC,CAAC,CAAC;AAAAe,OAAA,CAAAD,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -21,13 +21,6 @@ class WixDataBulkPatchOptionsBuilderImpl {
21
21
  showDrafts: value
22
22
  });
23
23
  }
24
- withAppOptions(value) {
25
- return this.copy({
26
- appOptions: {
27
- ...value
28
- }
29
- });
30
- }
31
24
  withCondition(value) {
32
25
  return this.copy({
33
26
  condition: value.filter
@@ -35,12 +28,7 @@ class WixDataBulkPatchOptionsBuilderImpl {
35
28
  }
36
29
  build() {
37
30
  return {
38
- ...this.options,
39
- ...(this.options.appOptions ? {
40
- appOptions: {
41
- ...this.options.appOptions
42
- }
43
- } : {})
31
+ ...this.options
44
32
  };
45
33
  }
46
34
  copy(options) {
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataBulkPatchOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","withCondition","condition","filter","build","BulkPatchOptionsBuilder","exports"],"sources":["../../../src/api/WixDataBulkPatchOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type { WixDataItem, WixDataQuerySpec } from './types'\nimport type { WixDataBulkPatchOptions } from './WixDataPatch'\n\n/**\n * WixData bulk patch options builder.\n * @internal\n */\nexport interface WixDataBulkPatchOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataBulkPatchOptionsBuilder\n withShowDrafts(value: boolean): WixDataBulkPatchOptionsBuilder\n withAppOptions(value: Record<string, any>): WixDataBulkPatchOptionsBuilder\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkPatchOptionsBuilder\n build(): WixDataBulkPatchOptions\n}\n\nclass WixDataBulkPatchOptionsBuilderImpl\n implements WixDataBulkPatchOptionsBuilder\n{\n constructor(private readonly options: WixDataBulkPatchOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataBulkPatchOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataBulkPatchOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withAppOptions(value: Record<string, any>): WixDataBulkPatchOptionsBuilder {\n return this.copy({ appOptions: { ...value } })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkPatchOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataBulkPatchOptions {\n return {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n }\n }\n\n private copy(\n options: WixDataBulkPatchOptions\n ): WixDataBulkPatchOptionsBuilder {\n return new WixDataBulkPatchOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData bulk patch options builder.\n * @internal\n */\nexport const BulkPatchOptionsBuilder: () => WixDataBulkPatchOptionsBuilder =\n () => new WixDataBulkPatchOptionsBuilderImpl()\n"],"mappings":";;;;AAIA;AACA;AACA;AACA;;AAWA,MAAMA,kCAAkC,CAExC;EACEC,WAAWA,CAAkBC,OAAgC,GAAG,CAAC,CAAC,EAAE;IAAA,KAAvCA,OAAgC,GAAhCA,OAAgC;EAAQ;EAErEC,iBAAiBA,CAACC,KAAc,EAAkC;IAChE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAAkC;IAC7D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,cAAcA,CAACL,KAA0B,EAAkC;IACzE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,aAAaA,CACXP,KAAsD,EACtB;IAChC,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,SAAS,EAAER,KAAK,CAACS;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAA4B;IAC/B,OAAO;MACL,GAAG,IAAI,CAACZ,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACQ,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACR,OAAO,CAACQ;QAAW;MAAE,CAAC,GAC9C,CAAC,CAAC;IACR,CAAC;EACH;EAEQL,IAAIA,CACVH,OAAgC,EACA;IAChC,OAAO,IAAIF,kCAAkC,CAAC;MAC5C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACO,MAAMa,uBAA6D,GACxEA,CAAA,KAAM,IAAIf,kCAAkC,CAAC,CAAC;AAAAgB,OAAA,CAAAD,uBAAA,GAAAA,uBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataBulkPatchOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withCondition","condition","filter","build","BulkPatchOptionsBuilder","exports"],"sources":["../../../src/api/WixDataBulkPatchOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type { WixDataItem, WixDataQuerySpec } from './types'\nimport type { WixDataBulkPatchOptions } from './WixDataPatch'\n\n/**\n * WixData bulk patch options builder.\n * @internal\n */\nexport interface WixDataBulkPatchOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataBulkPatchOptionsBuilder\n withShowDrafts(value: boolean): WixDataBulkPatchOptionsBuilder\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkPatchOptionsBuilder\n build(): WixDataBulkPatchOptions\n}\n\nclass WixDataBulkPatchOptionsBuilderImpl\n implements WixDataBulkPatchOptionsBuilder\n{\n constructor(private readonly options: WixDataBulkPatchOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataBulkPatchOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataBulkPatchOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkPatchOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataBulkPatchOptions {\n return {\n ...this.options,\n }\n }\n\n private copy(\n options: WixDataBulkPatchOptions\n ): WixDataBulkPatchOptionsBuilder {\n return new WixDataBulkPatchOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData bulk patch options builder.\n * @internal\n */\nexport const BulkPatchOptionsBuilder: () => WixDataBulkPatchOptionsBuilder =\n () => new WixDataBulkPatchOptionsBuilderImpl()\n"],"mappings":";;;;AAIA;AACA;AACA;AACA;;AAUA,MAAMA,kCAAkC,CAExC;EACEC,WAAWA,CAAkBC,OAAgC,GAAG,CAAC,CAAC,EAAE;IAAA,KAAvCA,OAAgC,GAAhCA,OAAgC;EAAQ;EAErEC,iBAAiBA,CAACC,KAAc,EAAkC;IAChE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAAkC;IAC7D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,aAAaA,CACXL,KAAsD,EACtB;IAChC,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,SAAS,EAAEN,KAAK,CAACO;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAA4B;IAC/B,OAAO;MACL,GAAG,IAAI,CAACV;IACV,CAAC;EACH;EAEQG,IAAIA,CACVH,OAAgC,EACA;IAChC,OAAO,IAAIF,kCAAkC,CAAC;MAC5C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACO,MAAMW,uBAA6D,GACxEA,CAAA,KAAM,IAAIb,kCAAkC,CAAC,CAAC;AAAAc,OAAA,CAAAD,uBAAA,GAAAA,uBAAA","ignoreList":[]}
@@ -21,13 +21,6 @@ class WixDataBulkRemoveOptionsBuilderImpl {
21
21
  showDrafts: value
22
22
  });
23
23
  }
24
- withAppOptions(value) {
25
- return this.copy({
26
- appOptions: {
27
- ...value
28
- }
29
- });
30
- }
31
24
  withCondition(value) {
32
25
  return this.copy({
33
26
  condition: value.filter
@@ -35,12 +28,7 @@ class WixDataBulkRemoveOptionsBuilderImpl {
35
28
  }
36
29
  build() {
37
30
  return {
38
- ...this.options,
39
- ...(this.options.appOptions ? {
40
- appOptions: {
41
- ...this.options.appOptions
42
- }
43
- } : {})
31
+ ...this.options
44
32
  };
45
33
  }
46
34
  copy(options) {
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataBulkRemoveOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","withCondition","condition","filter","build","BulkRemoveOptionsBuilder","exports"],"sources":["../../../src/api/WixDataBulkRemoveOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type {\n WixDataBulkRemoveOptions,\n WixDataItem,\n WixDataQuerySpec,\n} from './types'\n\n/**\n * WixData bulk remove options builder.\n * @internal\n */\nexport interface WixDataBulkRemoveOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataBulkRemoveOptionsBuilder\n withShowDrafts(value: boolean): WixDataBulkRemoveOptionsBuilder\n withAppOptions(value: Record<string, any>): WixDataBulkRemoveOptionsBuilder\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkRemoveOptionsBuilder\n build(): WixDataBulkRemoveOptions\n}\n\nclass WixDataBulkRemoveOptionsBuilderImpl\n implements WixDataBulkRemoveOptionsBuilder\n{\n constructor(private readonly options: WixDataBulkRemoveOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataBulkRemoveOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataBulkRemoveOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withAppOptions(value: Record<string, any>): WixDataBulkRemoveOptionsBuilder {\n return this.copy({ appOptions: { ...value } })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkRemoveOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataBulkRemoveOptions {\n return {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n }\n }\n\n private copy(\n options: WixDataBulkRemoveOptions\n ): WixDataBulkRemoveOptionsBuilder {\n return new WixDataBulkRemoveOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData bulk remove options builder.\n * @internal\n */\nexport const BulkRemoveOptionsBuilder: () => WixDataBulkRemoveOptionsBuilder =\n () => new WixDataBulkRemoveOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;;AAWA,MAAMA,mCAAmC,CAEzC;EACEC,WAAWA,CAAkBC,OAAiC,GAAG,CAAC,CAAC,EAAE;IAAA,KAAxCA,OAAiC,GAAjCA,OAAiC;EAAQ;EAEtEC,iBAAiBA,CAACC,KAAc,EAAmC;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAAmC;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,cAAcA,CAACL,KAA0B,EAAmC;IAC1E,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,aAAaA,CACXP,KAAsD,EACrB;IACjC,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,SAAS,EAAER,KAAK,CAACS;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAA6B;IAChC,OAAO;MACL,GAAG,IAAI,CAACZ,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACQ,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACR,OAAO,CAACQ;QAAW;MAAE,CAAC,GAC9C,CAAC,CAAC;IACR,CAAC;EACH;EAEQL,IAAIA,CACVH,OAAiC,EACA;IACjC,OAAO,IAAIF,mCAAmC,CAAC;MAC7C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACO,MAAMa,wBAA+D,GAC1EA,CAAA,KAAM,IAAIf,mCAAmC,CAAC,CAAC;AAAAgB,OAAA,CAAAD,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataBulkRemoveOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withCondition","condition","filter","build","BulkRemoveOptionsBuilder","exports"],"sources":["../../../src/api/WixDataBulkRemoveOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type {\n WixDataBulkRemoveOptions,\n WixDataItem,\n WixDataQuerySpec,\n} from './types'\n\n/**\n * WixData bulk remove options builder.\n * @internal\n */\nexport interface WixDataBulkRemoveOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataBulkRemoveOptionsBuilder\n withShowDrafts(value: boolean): WixDataBulkRemoveOptionsBuilder\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkRemoveOptionsBuilder\n build(): WixDataBulkRemoveOptions\n}\n\nclass WixDataBulkRemoveOptionsBuilderImpl\n implements WixDataBulkRemoveOptionsBuilder\n{\n constructor(private readonly options: WixDataBulkRemoveOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataBulkRemoveOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataBulkRemoveOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkRemoveOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataBulkRemoveOptions {\n return {\n ...this.options,\n }\n }\n\n private copy(\n options: WixDataBulkRemoveOptions\n ): WixDataBulkRemoveOptionsBuilder {\n return new WixDataBulkRemoveOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData bulk remove options builder.\n * @internal\n */\nexport const BulkRemoveOptionsBuilder: () => WixDataBulkRemoveOptionsBuilder =\n () => new WixDataBulkRemoveOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;;AAUA,MAAMA,mCAAmC,CAEzC;EACEC,WAAWA,CAAkBC,OAAiC,GAAG,CAAC,CAAC,EAAE;IAAA,KAAxCA,OAAiC,GAAjCA,OAAiC;EAAQ;EAEtEC,iBAAiBA,CAACC,KAAc,EAAmC;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAAmC;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,aAAaA,CACXL,KAAsD,EACrB;IACjC,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,SAAS,EAAEN,KAAK,CAACO;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAA6B;IAChC,OAAO;MACL,GAAG,IAAI,CAACV;IACV,CAAC;EACH;EAEQG,IAAIA,CACVH,OAAiC,EACA;IACjC,OAAO,IAAIF,mCAAmC,CAAC;MAC7C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACO,MAAMW,wBAA+D,GAC1EA,CAAA,KAAM,IAAIb,mCAAmC,CAAC,CAAC;AAAAc,OAAA,CAAAD,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -21,13 +21,6 @@ class WixDataBulkSaveOptionsBuilderImpl {
21
21
  showDrafts: value
22
22
  });
23
23
  }
24
- withAppOptions(value) {
25
- return this.copy({
26
- appOptions: {
27
- ...value
28
- }
29
- });
30
- }
31
24
  withSaveReferences(value) {
32
25
  return this.copy({
33
26
  saveReferences: value
@@ -35,12 +28,7 @@ class WixDataBulkSaveOptionsBuilderImpl {
35
28
  }
36
29
  build() {
37
30
  return {
38
- ...this.options,
39
- ...(this.options.appOptions ? {
40
- appOptions: {
41
- ...this.options.appOptions
42
- }
43
- } : {})
31
+ ...this.options
44
32
  };
45
33
  }
46
34
  copy(options) {
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataBulkSaveOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","withSaveReferences","saveReferences","build","BulkSaveOptionsBuilder","exports"],"sources":["../../../src/api/WixDataBulkSaveOptionsBuilder.ts"],"sourcesContent":["import type { WixDataBulkSaveOptions } from './types'\n\n/**\n * WixData bulk save options builder.\n * @internal\n */\nexport interface WixDataBulkSaveOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataBulkSaveOptionsBuilder\n withShowDrafts(value: boolean): WixDataBulkSaveOptionsBuilder\n withAppOptions(value: Record<string, any>): WixDataBulkSaveOptionsBuilder\n withSaveReferences(value: boolean): WixDataBulkSaveOptionsBuilder\n build(): WixDataBulkSaveOptions\n}\n\nclass WixDataBulkSaveOptionsBuilderImpl\n implements WixDataBulkSaveOptionsBuilder\n{\n constructor(private readonly options: WixDataBulkSaveOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataBulkSaveOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataBulkSaveOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withAppOptions(value: Record<string, any>): WixDataBulkSaveOptionsBuilder {\n return this.copy({ appOptions: { ...value } })\n }\n\n withSaveReferences(value: boolean): WixDataBulkSaveOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n build(): WixDataBulkSaveOptions {\n return {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n }\n }\n\n private copy(options: WixDataBulkSaveOptions): WixDataBulkSaveOptionsBuilder {\n return new WixDataBulkSaveOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData bulk save options builder.\n * @internal\n */\nexport const BulkSaveOptionsBuilder: () => WixDataBulkSaveOptionsBuilder = () =>\n new WixDataBulkSaveOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;;AASA,MAAMA,iCAAiC,CAEvC;EACEC,WAAWA,CAAkBC,OAA+B,GAAG,CAAC,CAAC,EAAE;IAAA,KAAtCA,OAA+B,GAA/BA,OAA+B;EAAQ;EAEpEC,iBAAiBA,CAACC,KAAc,EAAiC;IAC/D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAAiC;IAC5D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,cAAcA,CAACL,KAA0B,EAAiC;IACxE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,kBAAkBA,CAACP,KAAc,EAAiC;IAChE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,cAAc,EAAER;IAAM,CAAC,CAAC;EAC7C;EAEAS,KAAKA,CAAA,EAA2B;IAC9B,OAAO;MACL,GAAG,IAAI,CAACX,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACQ,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACR,OAAO,CAACQ;QAAW;MAAE,CAAC,GAC9C,CAAC,CAAC;IACR,CAAC;EACH;EAEQL,IAAIA,CAACH,OAA+B,EAAiC;IAC3E,OAAO,IAAIF,iCAAiC,CAAC;MAC3C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACO,MAAMY,sBAA2D,GAAGA,CAAA,KACzE,IAAId,iCAAiC,CAAC,CAAC;AAAAe,OAAA,CAAAD,sBAAA,GAAAA,sBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataBulkSaveOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withSaveReferences","saveReferences","build","BulkSaveOptionsBuilder","exports"],"sources":["../../../src/api/WixDataBulkSaveOptionsBuilder.ts"],"sourcesContent":["import type { WixDataBulkSaveOptions } from './types'\n\n/**\n * WixData bulk save options builder.\n * @internal\n */\nexport interface WixDataBulkSaveOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataBulkSaveOptionsBuilder\n withShowDrafts(value: boolean): WixDataBulkSaveOptionsBuilder\n withSaveReferences(value: boolean): WixDataBulkSaveOptionsBuilder\n build(): WixDataBulkSaveOptions\n}\n\nclass WixDataBulkSaveOptionsBuilderImpl\n implements WixDataBulkSaveOptionsBuilder\n{\n constructor(private readonly options: WixDataBulkSaveOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataBulkSaveOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataBulkSaveOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withSaveReferences(value: boolean): WixDataBulkSaveOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n build(): WixDataBulkSaveOptions {\n return {\n ...this.options,\n }\n }\n\n private copy(options: WixDataBulkSaveOptions): WixDataBulkSaveOptionsBuilder {\n return new WixDataBulkSaveOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData bulk save options builder.\n * @internal\n */\nexport const BulkSaveOptionsBuilder: () => WixDataBulkSaveOptionsBuilder = () =>\n new WixDataBulkSaveOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;;AAQA,MAAMA,iCAAiC,CAEvC;EACEC,WAAWA,CAAkBC,OAA+B,GAAG,CAAC,CAAC,EAAE;IAAA,KAAtCA,OAA+B,GAA/BA,OAA+B;EAAQ;EAEpEC,iBAAiBA,CAACC,KAAc,EAAiC;IAC/D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAAiC;IAC5D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,kBAAkBA,CAACL,KAAc,EAAiC;IAChE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,cAAc,EAAEN;IAAM,CAAC,CAAC;EAC7C;EAEAO,KAAKA,CAAA,EAA2B;IAC9B,OAAO;MACL,GAAG,IAAI,CAACT;IACV,CAAC;EACH;EAEQG,IAAIA,CAACH,OAA+B,EAAiC;IAC3E,OAAO,IAAIF,iCAAiC,CAAC;MAC3C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACO,MAAMU,sBAA2D,GAAGA,CAAA,KACzE,IAAIZ,iCAAiC,CAAC,CAAC;AAAAa,OAAA,CAAAD,sBAAA,GAAAA,sBAAA","ignoreList":[]}
@@ -21,13 +21,6 @@ class WixDataBulkUpdateOptionsBuilderImpl {
21
21
  showDrafts: value
22
22
  });
23
23
  }
24
- withAppOptions(value) {
25
- return this.copy({
26
- appOptions: {
27
- ...value
28
- }
29
- });
30
- }
31
24
  withSaveReferences(value) {
32
25
  return this.copy({
33
26
  saveReferences: value
@@ -40,12 +33,7 @@ class WixDataBulkUpdateOptionsBuilderImpl {
40
33
  }
41
34
  build() {
42
35
  return {
43
- ...this.options,
44
- ...(this.options.appOptions ? {
45
- appOptions: {
46
- ...this.options.appOptions
47
- }
48
- } : {})
36
+ ...this.options
49
37
  };
50
38
  }
51
39
  copy(options) {
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataBulkUpdateOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","withSaveReferences","saveReferences","withCondition","condition","filter","build","BulkUpdateOptionsBuilder","exports"],"sources":["../../../src/api/WixDataBulkUpdateOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type {\n WixDataBulkUpdateOptions,\n WixDataItem,\n WixDataQuerySpec,\n} from './types'\n\n/**\n * WixData bulk update options builder.\n * @internal\n */\nexport interface WixDataBulkUpdateOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataBulkUpdateOptionsBuilder\n withShowDrafts(value: boolean): WixDataBulkUpdateOptionsBuilder\n withAppOptions(value: Record<string, any>): WixDataBulkUpdateOptionsBuilder\n withSaveReferences(value: boolean): WixDataBulkUpdateOptionsBuilder\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkUpdateOptionsBuilder\n build(): WixDataBulkUpdateOptions\n}\n\nclass WixDataBulkUpdateOptionsBuilderImpl\n implements WixDataBulkUpdateOptionsBuilder\n{\n constructor(private readonly options: WixDataBulkUpdateOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataBulkUpdateOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataBulkUpdateOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withAppOptions(value: Record<string, any>): WixDataBulkUpdateOptionsBuilder {\n return this.copy({ appOptions: { ...value } })\n }\n\n withSaveReferences(value: boolean): WixDataBulkUpdateOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkUpdateOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataBulkUpdateOptions {\n return {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n }\n }\n\n private copy(\n options: WixDataBulkUpdateOptions\n ): WixDataBulkUpdateOptionsBuilder {\n return new WixDataBulkUpdateOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData bulk update options builder.\n * @internal\n */\nexport const BulkUpdateOptionsBuilder: () => WixDataBulkUpdateOptionsBuilder =\n () => new WixDataBulkUpdateOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;;AAYA,MAAMA,mCAAmC,CAEzC;EACEC,WAAWA,CAAkBC,OAAiC,GAAG,CAAC,CAAC,EAAE;IAAA,KAAxCA,OAAiC,GAAjCA,OAAiC;EAAQ;EAEtEC,iBAAiBA,CAACC,KAAc,EAAmC;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAAmC;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,cAAcA,CAACL,KAA0B,EAAmC;IAC1E,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,kBAAkBA,CAACP,KAAc,EAAmC;IAClE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,cAAc,EAAER;IAAM,CAAC,CAAC;EAC7C;EAEAS,aAAaA,CACXT,KAAsD,EACrB;IACjC,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,SAAS,EAAEV,KAAK,CAACW;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAA6B;IAChC,OAAO;MACL,GAAG,IAAI,CAACd,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACQ,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACR,OAAO,CAACQ;QAAW;MAAE,CAAC,GAC9C,CAAC,CAAC;IACR,CAAC;EACH;EAEQL,IAAIA,CACVH,OAAiC,EACA;IACjC,OAAO,IAAIF,mCAAmC,CAAC;MAC7C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACO,MAAMe,wBAA+D,GAC1EA,CAAA,KAAM,IAAIjB,mCAAmC,CAAC,CAAC;AAAAkB,OAAA,CAAAD,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["WixDataBulkUpdateOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withSaveReferences","saveReferences","withCondition","condition","filter","build","BulkUpdateOptionsBuilder","exports"],"sources":["../../../src/api/WixDataBulkUpdateOptionsBuilder.ts"],"sourcesContent":["import type { FilterExpression } from '@wix/sdk-types'\nimport type {\n WixDataBulkUpdateOptions,\n WixDataItem,\n WixDataQuerySpec,\n} from './types'\n\n/**\n * WixData bulk update options builder.\n * @internal\n */\nexport interface WixDataBulkUpdateOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataBulkUpdateOptionsBuilder\n withShowDrafts(value: boolean): WixDataBulkUpdateOptionsBuilder\n withSaveReferences(value: boolean): WixDataBulkUpdateOptionsBuilder\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkUpdateOptionsBuilder\n build(): WixDataBulkUpdateOptions\n}\n\nclass WixDataBulkUpdateOptionsBuilderImpl\n implements WixDataBulkUpdateOptionsBuilder\n{\n constructor(private readonly options: WixDataBulkUpdateOptions = {}) {}\n\n withSuppressHooks(value: boolean): WixDataBulkUpdateOptionsBuilder {\n return this.copy({ suppressHooks: value })\n }\n\n withShowDrafts(value: boolean): WixDataBulkUpdateOptionsBuilder {\n return this.copy({ showDrafts: value })\n }\n\n withSaveReferences(value: boolean): WixDataBulkUpdateOptionsBuilder {\n return this.copy({ saveReferences: value })\n }\n\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataBulkUpdateOptionsBuilder {\n return this.copy({ condition: value.filter })\n }\n\n build(): WixDataBulkUpdateOptions {\n return {\n ...this.options,\n }\n }\n\n private copy(\n options: WixDataBulkUpdateOptions\n ): WixDataBulkUpdateOptionsBuilder {\n return new WixDataBulkUpdateOptionsBuilderImpl({\n ...this.options,\n ...options,\n })\n }\n}\n\n/**\n * Creates a new WixData bulk update options builder.\n * @internal\n */\nexport const BulkUpdateOptionsBuilder: () => WixDataBulkUpdateOptionsBuilder =\n () => new WixDataBulkUpdateOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;;AAWA,MAAMA,mCAAmC,CAEzC;EACEC,WAAWA,CAAkBC,OAAiC,GAAG,CAAC,CAAC,EAAE;IAAA,KAAxCA,OAAiC,GAAjCA,OAAiC;EAAQ;EAEtEC,iBAAiBA,CAACC,KAAc,EAAmC;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAAmC;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,kBAAkBA,CAACL,KAAc,EAAmC;IAClE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,cAAc,EAAEN;IAAM,CAAC,CAAC;EAC7C;EAEAO,aAAaA,CACXP,KAAsD,EACrB;IACjC,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,SAAS,EAAER,KAAK,CAACS;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAA6B;IAChC,OAAO;MACL,GAAG,IAAI,CAACZ;IACV,CAAC;EACH;EAEQG,IAAIA,CACVH,OAAiC,EACA;IACjC,OAAO,IAAIF,mCAAmC,CAAC;MAC7C,GAAG,IAAI,CAACE,OAAO;MACf,GAAGA;IACL,CAAC,CAAC;EACJ;AACF;;AAEA;AACA;AACA;AACA;AACO,MAAMa,wBAA+D,GAC1EA,CAAA,KAAM,IAAIf,mCAAmC,CAAC,CAAC;AAAAgB,OAAA,CAAAD,wBAAA,GAAAA,wBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_BaseFieldModificationsBuilder","require","WixDataFieldModificationsBuilderImpl","BaseFieldModificationsBuilder","constructor","origin","copy","params","invalidArguments","ownInvalidArguments","fieldModifications","addFieldModification","build","FieldModificationsBuilder","exports"],"sources":["../../../src/api/WixDataFieldModificationsBuilder.ts"],"sourcesContent":["import type { FieldModification } from './FieldModification'\nimport { BaseFieldModificationsBuilder } from './impl/BaseFieldModificationsBuilder'\n\n/**\n * WixData FieldModificationsBuilder type.\n * @internal\n */\nexport interface FieldModificationsBuilder<Self> {\n /**\n * Refines a patch operation to increment the specified field value by the specified parameter.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is incremented. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param by - Value by which to increment the specified field. To decrement, specify a negative value.\n * @requiredField by\n * @returns Updated patch object.\n */\n incrementField(field: string, by: number): Self\n\n /**\n * Refines a patch operation to set the specified field to the specified value.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is set. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to set for the specified field.\n * @requiredField value\n * @returns Updated patch object.\n */\n setField(field: string, value: any): Self\n\n /**\n * Refines a patch operation to append the specified value to the specified array field.\n * @public\n * @documentationMaturity preview\n * @param field - Array field to append the specified value to. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to append to the specified array field.\n * @requiredField value\n * @returns Updated patch object.\n */\n appendToArray(field: string, value: any): Self\n\n /**\n * Refines a patch operation to remove the first instance of the specified value from the specified array field.\n * @public\n * @documentationMaturity preview\n * @param field - Array field to remove the specified value from. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value whose first instance is removed from the specified array field.\n * @requiredField value\n * @returns Updated patch object.\n */\n removeFromArray(field: string, value: any): Self\n\n /**\n * Refines a patch operation to clear the specified field.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is cleared. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @returns Updated patch object.\n */\n removeField(field: string): Self\n}\n\n/**\n * WixData field modifications builder.\n * @internal\n */\nexport interface WixDataFieldModificationsBuilder\n extends FieldModificationsBuilder<WixDataFieldModificationsBuilder> {\n /** Build the final array of field modifications */\n build(): FieldModification[]\n}\n\nclass WixDataFieldModificationsBuilderImpl\n extends BaseFieldModificationsBuilder<WixDataFieldModificationsBuilderImpl>\n implements WixDataFieldModificationsBuilder\n{\n constructor(origin?: {\n invalidArguments?: string[]\n fieldModifications?: FieldModification[]\n }) {\n super(origin ?? {})\n }\n\n protected copy(params: {\n invalidArguments?: string[]\n addFieldModification: FieldModification\n }): WixDataFieldModificationsBuilderImpl {\n return new WixDataFieldModificationsBuilderImpl({\n invalidArguments: params.invalidArguments ?? this.ownInvalidArguments,\n fieldModifications: [\n ...this.fieldModifications,\n params.addFieldModification,\n ],\n })\n }\n\n build(): FieldModification[] {\n return [...this.fieldModifications]\n }\n}\n\n/**\n * Creates a new WixData field modifications builder.\n * @internal\n *\n * @example\n * ```ts\n * import { FieldModificationsBuilder } from '@wix/wix-data-items-common'\n *\n * const fieldModifications = FieldModificationsBuilder()\n * .setField('title', 'Updated title')\n * .incrementField('viewCount', 1)\n * .appendToArray('tags', 'featured')\n * .removeField('legacyField')\n * .build()\n *\n * const item = await wixData.patch('myCollection', 'itemId', fieldModifications)\n * ```\n */\nexport const FieldModificationsBuilder: () => WixDataFieldModificationsBuilder =\n () => new WixDataFieldModificationsBuilderImpl()\n"],"mappings":";;;;AACA,IAAAA,8BAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;;AA6DA;AACA;AACA;AACA;;AAOA,MAAMC,oCAAoC,SAChCC,4DAA6B,CAEvC;EACEC,WAAWA,CAACC,MAGX,EAAE;IACD,KAAK,CAACA,MAAM,IAAI,CAAC,CAAC,CAAC;EACrB;EAEUC,IAAIA,CAACC,MAGd,EAAwC;IACvC,OAAO,IAAIL,oCAAoC,CAAC;MAC9CM,gBAAgB,EAAED,MAAM,CAACC,gBAAgB,IAAI,IAAI,CAACC,mBAAmB;MACrEC,kBAAkB,EAAE,CAClB,GAAG,IAAI,CAACA,kBAAkB,EAC1BH,MAAM,CAACI,oBAAoB;IAE/B,CAAC,CAAC;EACJ;EAEAC,KAAKA,CAAA,EAAwB;IAC3B,OAAO,CAAC,GAAG,IAAI,CAACF,kBAAkB,CAAC;EACrC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,yBAAiE,GAC5EA,CAAA,KAAM,IAAIX,oCAAoC,CAAC,CAAC;AAAAY,OAAA,CAAAD,yBAAA,GAAAA,yBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_BaseFieldModificationsBuilder","require","WixDataFieldModificationsBuilderImpl","BaseFieldModificationsBuilder","constructor","origin","copy","params","invalidArguments","ownInvalidArguments","fieldModifications","addFieldModification","build","FieldModificationsBuilder","exports"],"sources":["../../../src/api/WixDataFieldModificationsBuilder.ts"],"sourcesContent":["import type { FieldModification } from './FieldModification'\nimport { BaseFieldModificationsBuilder } from './impl/BaseFieldModificationsBuilder'\n\n/**\n * WixData FieldModificationsBuilder type.\n * @internal\n */\nexport interface FieldModificationsBuilder<Self> {\n /**\n * Refines a patch operation to increment the specified field value by the specified parameter.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is incremented. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param by - Value by which to increment the specified field. To decrement, specify a negative value.\n * @requiredField by\n * @returns Updated patch object.\n */\n incrementField(field: string, by: number): Self\n\n /**\n * Refines a patch operation to set the specified field to the specified value.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is set. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to set for the specified field.\n * @requiredField value\n * @returns Updated patch object.\n */\n setField(field: string, value: any): Self\n\n /**\n * Refines a patch operation to append the specified value to the specified array or multi-reference field.\n * @public\n * @documentationMaturity preview\n * @param field - Array or multi-reference field to append the specified value to. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value to append to the specified array or multi-reference field.\n * @requiredField value\n * @returns Updated patch object.\n */\n appendToArray(field: string, value: any): Self\n\n /**\n * Refines a patch operation to remove the first instance of the specified value from the specified array or multi-reference field.\n * @public\n * @documentationMaturity preview\n * @param field - Array or multi-reference field to remove the specified value from. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @param value - Value whose first instance is removed from the specified array or multi-reference field.\n * @requiredField value\n * @returns Updated patch object.\n */\n removeFromArray(field: string, value: any): Self\n\n /**\n * Refines a patch operation to clear the specified field.\n * @public\n * @documentationMaturity preview\n * @param field - Field whose value is cleared. Nested fields can be specified using dot notation. For example: `address.street`.\n * @requiredField field\n * @returns Updated patch object.\n */\n removeField(field: string): Self\n}\n\n/**\n * WixData field modifications builder.\n * @internal\n */\nexport interface WixDataFieldModificationsBuilder\n extends FieldModificationsBuilder<WixDataFieldModificationsBuilder> {\n /** Build the final array of field modifications */\n build(): FieldModification[]\n}\n\nclass WixDataFieldModificationsBuilderImpl\n extends BaseFieldModificationsBuilder<WixDataFieldModificationsBuilderImpl>\n implements WixDataFieldModificationsBuilder\n{\n constructor(origin?: {\n invalidArguments?: string[]\n fieldModifications?: FieldModification[]\n }) {\n super(origin ?? {})\n }\n\n protected copy(params: {\n invalidArguments?: string[]\n addFieldModification: FieldModification\n }): WixDataFieldModificationsBuilderImpl {\n return new WixDataFieldModificationsBuilderImpl({\n invalidArguments: params.invalidArguments ?? this.ownInvalidArguments,\n fieldModifications: [\n ...this.fieldModifications,\n params.addFieldModification,\n ],\n })\n }\n\n build(): FieldModification[] {\n return [...this.fieldModifications]\n }\n}\n\n/**\n * Creates a new WixData field modifications builder.\n * @internal\n *\n * @example\n * ```ts\n * import { FieldModificationsBuilder } from '@wix/wix-data-items-common'\n *\n * const fieldModifications = FieldModificationsBuilder()\n * .setField('title', 'Updated title')\n * .incrementField('viewCount', 1)\n * .appendToArray('tags', 'featured')\n * .removeField('legacyField')\n * .build()\n *\n * const item = await wixData.patch('myCollection', 'itemId', fieldModifications)\n * ```\n */\nexport const FieldModificationsBuilder: () => WixDataFieldModificationsBuilder =\n () => new WixDataFieldModificationsBuilderImpl()\n"],"mappings":";;;;AACA,IAAAA,8BAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;;AA6DA;AACA;AACA;AACA;;AAOA,MAAMC,oCAAoC,SAChCC,4DAA6B,CAEvC;EACEC,WAAWA,CAACC,MAGX,EAAE;IACD,KAAK,CAACA,MAAM,IAAI,CAAC,CAAC,CAAC;EACrB;EAEUC,IAAIA,CAACC,MAGd,EAAwC;IACvC,OAAO,IAAIL,oCAAoC,CAAC;MAC9CM,gBAAgB,EAAED,MAAM,CAACC,gBAAgB,IAAI,IAAI,CAACC,mBAAmB;MACrEC,kBAAkB,EAAE,CAClB,GAAG,IAAI,CAACA,kBAAkB,EAC1BH,MAAM,CAACI,oBAAoB;IAE/B,CAAC,CAAC;EACJ;EAEAC,KAAKA,CAAA,EAAwB;IAC3B,OAAO,CAAC,GAAG,IAAI,CAACF,kBAAkB,CAAC;EACrC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,yBAAiE,GAC5EA,CAAA,KAAM,IAAIX,oCAAoC,CAAC,CAAC;AAAAY,OAAA,CAAAD,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -21,13 +21,6 @@ class WixDataInsertOptionsBuilderImpl {
21
21
  showDrafts: value
22
22
  });
23
23
  }
24
- withAppOptions(value) {
25
- return this.copy({
26
- appOptions: {
27
- ...value
28
- }
29
- });
30
- }
31
24
  withIncludeReferences(value) {
32
25
  return this.copy({
33
26
  includeReferences: value
@@ -40,12 +33,7 @@ class WixDataInsertOptionsBuilderImpl {
40
33
  }
41
34
  build() {
42
35
  return {
43
- ...this.options,
44
- ...(this.options.appOptions ? {
45
- appOptions: {
46
- ...this.options.appOptions
47
- }
48
- } : {})
36
+ ...this.options
49
37
  };
50
38
  }
51
39
  copy(options) {
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataInsertOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","withIncludeReferences","includeReferences","withSaveReferences","saveReferences","build","InsertOptionsBuilder","exports"],"sources":["../../../src/api/WixDataInsertOptionsBuilder.ts"],"sourcesContent":["import type { WixDataInsertOptions } from './types'\n\n/**\n * WixData insert options builder.\n * @internal\n */\nexport interface WixDataInsertOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataInsertOptionsBuilder\n withShowDrafts(value: boolean): WixDataInsertOptionsBuilder\n withAppOptions(value: Record<string, any>): WixDataInsertOptionsBuilder\n withIncludeReferences(value: boolean): WixDataInsertOptionsBuilder\n withSaveReferences(value: boolean): WixDataInsertOptionsBuilder\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 withAppOptions(value: Record<string, any>): WixDataInsertOptionsBuilder {\n return this.copy({ appOptions: { ...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 {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n }\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 * @internal\n */\nexport const InsertOptionsBuilder: () => WixDataInsertOptionsBuilder = () =>\n new WixDataInsertOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;;AAUA,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,cAAcA,CAACL,KAA0B,EAA+B;IACtE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,qBAAqBA,CAACP,KAAc,EAA+B;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,iBAAiB,EAAER;IAAM,CAAC,CAAC;EAChD;EAEAS,kBAAkBA,CAACT,KAAc,EAA+B;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,cAAc,EAAEV;IAAM,CAAC,CAAC;EAC7C;EAEAW,KAAKA,CAAA,EAAyB;IAC5B,OAAO;MACL,GAAG,IAAI,CAACb,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACQ,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACR,OAAO,CAACQ;QAAW;MAAE,CAAC,GAC9C,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;AACO,MAAMc,oBAAuD,GAAGA,CAAA,KACrE,IAAIhB,+BAA+B,CAAC,CAAC;AAAAiB,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 * WixData insert options builder.\n * @internal\n */\nexport interface WixDataInsertOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataInsertOptionsBuilder\n withShowDrafts(value: boolean): WixDataInsertOptionsBuilder\n withIncludeReferences(value: boolean): WixDataInsertOptionsBuilder\n withSaveReferences(value: boolean): WixDataInsertOptionsBuilder\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 * @internal\n */\nexport const InsertOptionsBuilder: () => WixDataInsertOptionsBuilder = () =>\n new WixDataInsertOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;;AASA,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;AACO,MAAMY,oBAAuD,GAAGA,CAAA,KACrE,IAAId,+BAA+B,CAAC,CAAC;AAAAe,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/api/WixDataPatch.ts"],"sourcesContent":["import {\n BaseOptions,\n WixDataOptions,\n WixDataItem,\n WixDataBulkResult,\n WixDataAsyncByFilterOptions,\n WixDataAsyncJob,\n WixDataFilterInput,\n} from './types'\nimport { FieldModificationsBuilder } from './WixDataFieldModificationsBuilder'\n\nexport interface WixDataPatchOptions extends BaseOptions {\n /**\n * If provided, item will be patched only if condition is met.\n */\n condition?: WixDataFilterInput\n}\n\nexport interface WixDataBulkPatchOptions extends WixDataOptions {\n /**\n * If provided, only items matching condition will be patched.\n */\n condition?: WixDataFilterInput\n}\n\n/**\n * @builder\n */\nexport interface WixDataBulkPatch\n extends FieldModificationsBuilder<WixDataBulkPatch> {\n /**\n * Runs the bulk patch operation and returns a Promise that resolves to information about the results.\n *\n * @public\n * @documentationMaturity preview\n * @returns Bulk operation results.\n */\n run(options?: WixDataBulkPatchOptions): Promise<WixDataBulkResult>\n}\n\n/**\n * @builder\n */\nexport interface WixDataPatchByFilter\n extends FieldModificationsBuilder<WixDataPatchByFilter> {\n /**\n * Starts the async patch operation and returns a Promise that resolves to the async job.\n *\n * @public\n * @documentationMaturity preview\n * @returns Async job information.\n */\n run(options?: WixDataAsyncByFilterOptions): Promise<WixDataAsyncJob>\n}\n\n/**\n * @builder\n */\nexport interface WixDataPatch extends FieldModificationsBuilder<WixDataPatch> {\n /**\n * Runs the patch operation and returns a Promise that resolves to the patched item and operation metadata.\n *\n * @public\n * @documentationMaturity preview\n * @returns Modified data item.\n */\n\n run(options?: WixDataPatchOptions): Promise<WixDataItem | null>\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/api/WixDataPatch.ts"],"sourcesContent":["import {\n WixDataItem,\n WixDataBulkResult,\n WixDataAsyncByFilterOptions,\n WixDataAsyncJob,\n WixDataFilterInput,\n} from './types'\nimport { FieldModificationsBuilder } from './WixDataFieldModificationsBuilder'\n\nexport interface WixDataPatchOptions {\n /**\n * Prevents hooks from running for the operation. Can only be used in the [backend code of a Wix site](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/about-the-site-backend).\n *\n * Default: `false`.\n */\n suppressHooks?: boolean\n\n /**\n * When `true`, operations include draft items. Read operations include draft items in their response, and write operations modify draft items.\n *\n * Default: `false`.\n */\n showDrafts?: boolean\n\n /**\n * If provided, item will be patched only if condition is met.\n */\n condition?: WixDataFilterInput\n}\n\nexport interface WixDataBulkPatchOptions {\n /**\n * Prevents hooks from running for the operation. Can only be used in the [backend code of a Wix site](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/about-the-site-backend).\n *\n * Default: `false`.\n */\n suppressHooks?: boolean\n\n /**\n * When `true`, operations include draft items. Read operations include draft items in their response, and write operations modify draft items.\n *\n * Default: `false`.\n * @internal\n */\n showDrafts?: boolean\n\n /**\n * If provided, only items matching condition will be patched.\n */\n condition?: WixDataFilterInput\n}\n\n/**\n * @builder\n */\nexport interface WixDataBulkPatch\n extends FieldModificationsBuilder<WixDataBulkPatch> {\n /**\n * Runs the bulk patch operation and returns a Promise that resolves to information about the results.\n *\n * @public\n * @documentationMaturity preview\n * @returns Bulk operation results.\n */\n run(options?: WixDataBulkPatchOptions): Promise<WixDataBulkResult>\n}\n\n/**\n * @builder\n */\nexport interface WixDataPatchByFilter\n extends FieldModificationsBuilder<WixDataPatchByFilter> {\n /**\n * Starts the async patch operation and returns a Promise that resolves to the async job.\n *\n * @public\n * @documentationMaturity preview\n * @returns Async job information.\n */\n run(options?: WixDataAsyncByFilterOptions): Promise<WixDataAsyncJob>\n}\n\n/**\n * @builder\n */\nexport interface WixDataPatch extends FieldModificationsBuilder<WixDataPatch> {\n /**\n * Runs the patch operation and returns a Promise that resolves to the patched item and operation metadata.\n *\n * @public\n * @documentationMaturity preview\n * @returns Modified data item.\n */\n\n run(options?: WixDataPatchOptions): Promise<WixDataItem | null>\n}\n"],"mappings":"","ignoreList":[]}
@@ -11,11 +11,6 @@ class WixDataQueryReferencedItemsOptionsBuilderImpl {
11
11
  constructor(options = {}) {
12
12
  this.options = options;
13
13
  }
14
- withSuppressHooks(value) {
15
- return this.copy({
16
- suppressHooks: value
17
- });
18
- }
19
14
  withShowDrafts(value) {
20
15
  return this.copy({
21
16
  showDrafts: value
@@ -38,23 +33,11 @@ class WixDataQueryReferencedItemsOptionsBuilderImpl {
38
33
  consistentRead: value
39
34
  });
40
35
  }
41
- withIncludeReferences(value) {
42
- return this.copy({
43
- includeReferences: value.map(includeReference => ({
44
- ...includeReference
45
- }))
46
- });
47
- }
48
36
  withReturnTotalCount(value) {
49
37
  return this.copy({
50
38
  returnTotalCount: value
51
39
  });
52
40
  }
53
- withIncludeFieldGroups(...value) {
54
- return this.copy({
55
- includeFieldGroups: [...value]
56
- });
57
- }
58
41
  withFields(...value) {
59
42
  return this.copy({
60
43
  fields: [...value]
@@ -87,14 +70,6 @@ class WixDataQueryReferencedItemsOptionsBuilderImpl {
87
70
  ...this.options.appOptions
88
71
  }
89
72
  } : {}),
90
- ...(this.options.includeReferences ? {
91
- includeReferences: this.options.includeReferences.map(includeReference => ({
92
- ...includeReference
93
- }))
94
- } : {}),
95
- ...(this.options.includeFieldGroups ? {
96
- includeFieldGroups: [...this.options.includeFieldGroups]
97
- } : {}),
98
73
  ...(this.options.fields ? {
99
74
  fields: [...this.options.fields]
100
75
  } : {}),
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataQueryReferencedItemsOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","withLanguage","language","withConsistentRead","consistentRead","withIncludeReferences","includeReferences","map","includeReference","withReturnTotalCount","returnTotalCount","withIncludeFieldGroups","includeFieldGroups","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 * WixData query referenced items options builder.\n * @internal\n */\nexport interface WixDataQueryReferencedItemsOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataQueryReferencedItemsOptionsBuilder\n withShowDrafts(value: boolean): WixDataQueryReferencedItemsOptionsBuilder\n withAppOptions(\n value: Record<string, any>\n ): WixDataQueryReferencedItemsOptionsBuilder\n withLanguage(value: string): WixDataQueryReferencedItemsOptionsBuilder\n withConsistentRead(value: boolean): WixDataQueryReferencedItemsOptionsBuilder\n withIncludeReferences(\n value: { field: string; limit?: number }[]\n ): WixDataQueryReferencedItemsOptionsBuilder\n withReturnTotalCount(\n value: boolean\n ): WixDataQueryReferencedItemsOptionsBuilder\n withIncludeFieldGroups(\n ...value: string[]\n ): WixDataQueryReferencedItemsOptionsBuilder\n withFields(...value: string[]): WixDataQueryReferencedItemsOptionsBuilder\n withOrder(value: SortOrder): WixDataQueryReferencedItemsOptionsBuilder\n withPaging(value: {\n limit?: number\n offset?: number\n }): WixDataQueryReferencedItemsOptionsBuilder\n withCursorPaging(value: {\n cursor?: string\n limit?: number\n }): WixDataQueryReferencedItemsOptionsBuilder\n build(): WixDataQueryReferencedItemsOptions\n}\n\nclass WixDataQueryReferencedItemsOptionsBuilderImpl\n implements WixDataQueryReferencedItemsOptionsBuilder\n{\n constructor(\n private readonly options: WixDataQueryReferencedItemsOptions = {}\n ) {}\n\n withSuppressHooks(value: boolean): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ suppressHooks: value })\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 withIncludeReferences(\n value: { field: string; limit?: number }[]\n ): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({\n includeReferences: value.map((includeReference) => ({\n ...includeReference,\n })),\n })\n }\n\n withReturnTotalCount(\n value: boolean\n ): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ returnTotalCount: value })\n }\n\n withIncludeFieldGroups(\n ...value: string[]\n ): WixDataQueryReferencedItemsOptionsBuilder {\n return this.copy({ includeFieldGroups: [...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.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 ...(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 * @internal\n */\nexport const QueryReferencedItemsOptionsBuilder: () => WixDataQueryReferencedItemsOptionsBuilder =\n () => new WixDataQueryReferencedItemsOptionsBuilderImpl()\n"],"mappings":";;;;AAGA;AACA;AACA;AACA;;AA+BA,MAAMA,6CAA6C,CAEnD;EACEC,WAAWA,CACQC,OAA2C,GAAG,CAAC,CAAC,EACjE;IAAA,KADiBA,OAA2C,GAA3CA,OAA2C;EAC3D;EAEHC,iBAAiBA,CAACC,KAAc,EAA6C;IAC3E,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEC,aAAa,EAAEF;IAAM,CAAC,CAAC;EAC5C;EAEAG,cAAcA,CAACH,KAAc,EAA6C;IACxE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEG,UAAU,EAAEJ;IAAM,CAAC,CAAC;EACzC;EAEAK,cAAcA,CACZL,KAA0B,EACiB;IAC3C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,YAAYA,CAACP,KAAa,EAA6C;IACrE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,QAAQ,EAAER;IAAM,CAAC,CAAC;EACvC;EAEAS,kBAAkBA,CAChBT,KAAc,EAC6B;IAC3C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,cAAc,EAAEV;IAAM,CAAC,CAAC;EAC7C;EAEAW,qBAAqBA,CACnBX,KAA0C,EACC;IAC3C,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,CAClBf,KAAc,EAC6B;IAC3C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEe,gBAAgB,EAAEhB;IAAM,CAAC,CAAC;EAC/C;EAEAiB,sBAAsBA,CACpB,GAAGjB,KAAe,EACyB;IAC3C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEiB,kBAAkB,EAAE,CAAC,GAAGlB,KAAK;IAAE,CAAC,CAAC;EACtD;EAEAmB,UAAUA,CAAC,GAAGnB,KAAe,EAA6C;IACxE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEmB,MAAM,EAAE,CAAC,GAAGpB,KAAK;IAAE,CAAC,CAAC;EAC1C;EAEAqB,SAASA,CAACrB,KAAgB,EAA6C;IACrE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEqB,KAAK,EAAEtB;IAAM,CAAC,CAAC;EACpC;EAEAuB,UAAUA,CAACvB,KAGV,EAA6C;IAC5C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEuB,MAAM,EAAE;QAAE,GAAGxB;MAAM;IAAE,CAAC,CAAC;EAC5C;EAEAyB,gBAAgBA,CAACzB,KAGhB,EAA6C;IAC5C,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEyB,YAAY,EAAE;QAAE,GAAG1B;MAAM;IAAE,CAAC,CAAC;EAClD;EAEA2B,KAAKA,CAAA,EAAuC;IAC1C,OAAO;MACL,GAAG,IAAI,CAAC7B,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,CAAC;MACP,IAAI,IAAI,CAACpB,OAAO,CAACsB,MAAM,GAAG;QAAEA,MAAM,EAAE,CAAC,GAAG,IAAI,CAACtB,OAAO,CAACsB,MAAM;MAAE,CAAC,GAAG,CAAC,CAAC,CAAC;MACpE,IAAI,IAAI,CAACtB,OAAO,CAAC0B,MAAM,GAAG;QAAEA,MAAM,EAAE;UAAE,GAAG,IAAI,CAAC1B,OAAO,CAAC0B;QAAO;MAAE,CAAC,GAAG,CAAC,CAAC,CAAC;MACtE,IAAI,IAAI,CAAC1B,OAAO,CAAC4B,YAAY,GACzB;QAAEA,YAAY,EAAE;UAAE,GAAG,IAAI,CAAC5B,OAAO,CAAC4B;QAAa;MAAE,CAAC,GAClD,CAAC,CAAC;IACR,CAAC;EACH;EAEQzB,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;AACO,MAAM8B,kCAAmF,GAC9FA,CAAA,KAAM,IAAIhC,6CAA6C,CAAC,CAAC;AAAAiC,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 * WixData query referenced items options builder.\n * @internal\n */\nexport interface WixDataQueryReferencedItemsOptionsBuilder {\n withShowDrafts(value: boolean): WixDataQueryReferencedItemsOptionsBuilder\n withAppOptions(\n value: Record<string, any>\n ): WixDataQueryReferencedItemsOptionsBuilder\n withLanguage(value: string): WixDataQueryReferencedItemsOptionsBuilder\n withConsistentRead(value: boolean): WixDataQueryReferencedItemsOptionsBuilder\n withReturnTotalCount(\n value: boolean\n ): WixDataQueryReferencedItemsOptionsBuilder\n withFields(...value: string[]): WixDataQueryReferencedItemsOptionsBuilder\n withOrder(value: SortOrder): WixDataQueryReferencedItemsOptionsBuilder\n withPaging(value: {\n limit?: number\n offset?: number\n }): WixDataQueryReferencedItemsOptionsBuilder\n withCursorPaging(value: {\n cursor?: string\n limit?: number\n }): WixDataQueryReferencedItemsOptionsBuilder\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 * @internal\n */\nexport const QueryReferencedItemsOptionsBuilder: () => WixDataQueryReferencedItemsOptionsBuilder =\n () => new WixDataQueryReferencedItemsOptionsBuilderImpl()\n"],"mappings":";;;;AAGA;AACA;AACA;AACA;;AAwBA,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;AACO,MAAMsB,kCAAmF,GAC9FA,CAAA,KAAM,IAAIxB,6CAA6C,CAAC,CAAC;AAAAyB,OAAA,CAAAD,kCAAA,GAAAA,kCAAA","ignoreList":[]}
@@ -21,13 +21,6 @@ class WixDataRemoveOptionsBuilderImpl {
21
21
  showDrafts: value
22
22
  });
23
23
  }
24
- withAppOptions(value) {
25
- return this.copy({
26
- appOptions: {
27
- ...value
28
- }
29
- });
30
- }
31
24
  withCondition(value) {
32
25
  return this.copy({
33
26
  condition: value.filter
@@ -35,12 +28,7 @@ class WixDataRemoveOptionsBuilderImpl {
35
28
  }
36
29
  build() {
37
30
  return {
38
- ...this.options,
39
- ...(this.options.appOptions ? {
40
- appOptions: {
41
- ...this.options.appOptions
42
- }
43
- } : {})
31
+ ...this.options
44
32
  };
45
33
  }
46
34
  copy(options) {
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataRemoveOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","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 * WixData remove options builder.\n * @internal\n */\nexport interface WixDataRemoveOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataRemoveOptionsBuilder\n withShowDrafts(value: boolean): WixDataRemoveOptionsBuilder\n withAppOptions(value: Record<string, any>): WixDataRemoveOptionsBuilder\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataRemoveOptionsBuilder\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 withAppOptions(value: Record<string, any>): WixDataRemoveOptionsBuilder {\n return this.copy({ appOptions: { ...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 {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n }\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 * @internal\n */\nexport const RemoveOptionsBuilder: () => WixDataRemoveOptionsBuilder = () =>\n new WixDataRemoveOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;;AAWA,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,cAAcA,CAACL,KAA0B,EAA+B;IACtE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,aAAaA,CACXP,KAAsD,EACzB;IAC7B,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,SAAS,EAAER,KAAK,CAACS;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAAyB;IAC5B,OAAO;MACL,GAAG,IAAI,CAACZ,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACQ,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACR,OAAO,CAACQ;QAAW;MAAE,CAAC,GAC9C,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;AACO,MAAMa,oBAAuD,GAAGA,CAAA,KACrE,IAAIf,+BAA+B,CAAC,CAAC;AAAAgB,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 * WixData remove options builder.\n * @internal\n */\nexport interface WixDataRemoveOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataRemoveOptionsBuilder\n withShowDrafts(value: boolean): WixDataRemoveOptionsBuilder\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataRemoveOptionsBuilder\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 * @internal\n */\nexport const RemoveOptionsBuilder: () => WixDataRemoveOptionsBuilder = () =>\n new WixDataRemoveOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;;AAUA,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;AACO,MAAMW,oBAAuD,GAAGA,CAAA,KACrE,IAAIb,+BAA+B,CAAC,CAAC;AAAAc,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -21,13 +21,6 @@ class WixDataSaveOptionsBuilderImpl {
21
21
  showDrafts: value
22
22
  });
23
23
  }
24
- withAppOptions(value) {
25
- return this.copy({
26
- appOptions: {
27
- ...value
28
- }
29
- });
30
- }
31
24
  withIncludeReferences(value) {
32
25
  return this.copy({
33
26
  includeReferences: value
@@ -40,12 +33,7 @@ class WixDataSaveOptionsBuilderImpl {
40
33
  }
41
34
  build() {
42
35
  return {
43
- ...this.options,
44
- ...(this.options.appOptions ? {
45
- appOptions: {
46
- ...this.options.appOptions
47
- }
48
- } : {})
36
+ ...this.options
49
37
  };
50
38
  }
51
39
  copy(options) {
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataSaveOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","withIncludeReferences","includeReferences","withSaveReferences","saveReferences","build","SaveOptionsBuilder","exports"],"sources":["../../../src/api/WixDataSaveOptionsBuilder.ts"],"sourcesContent":["import type { WixDataSaveOptions } from './types'\n\n/**\n * WixData save options builder.\n * @internal\n */\nexport interface WixDataSaveOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataSaveOptionsBuilder\n withShowDrafts(value: boolean): WixDataSaveOptionsBuilder\n withAppOptions(value: Record<string, any>): WixDataSaveOptionsBuilder\n withIncludeReferences(value: boolean): WixDataSaveOptionsBuilder\n withSaveReferences(value: boolean): WixDataSaveOptionsBuilder\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 withAppOptions(value: Record<string, any>): WixDataSaveOptionsBuilder {\n return this.copy({ appOptions: { ...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 {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n }\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 * @internal\n */\nexport const SaveOptionsBuilder: () => WixDataSaveOptionsBuilder = () =>\n new WixDataSaveOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;;AAUA,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,cAAcA,CAACL,KAA0B,EAA6B;IACpE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,qBAAqBA,CAACP,KAAc,EAA6B;IAC/D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,iBAAiB,EAAER;IAAM,CAAC,CAAC;EAChD;EAEAS,kBAAkBA,CAACT,KAAc,EAA6B;IAC5D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,cAAc,EAAEV;IAAM,CAAC,CAAC;EAC7C;EAEAW,KAAKA,CAAA,EAAuB;IAC1B,OAAO;MACL,GAAG,IAAI,CAACb,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACQ,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACR,OAAO,CAACQ;QAAW;MAAE,CAAC,GAC9C,CAAC,CAAC;IACR,CAAC;EACH;EAEQL,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;AACO,MAAMc,kBAAmD,GAAGA,CAAA,KACjE,IAAIhB,6BAA6B,CAAC,CAAC;AAAAiB,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 * WixData save options builder.\n * @internal\n */\nexport interface WixDataSaveOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataSaveOptionsBuilder\n withShowDrafts(value: boolean): WixDataSaveOptionsBuilder\n withIncludeReferences(value: boolean): WixDataSaveOptionsBuilder\n withSaveReferences(value: boolean): WixDataSaveOptionsBuilder\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 * @internal\n */\nexport const SaveOptionsBuilder: () => WixDataSaveOptionsBuilder = () =>\n new WixDataSaveOptionsBuilderImpl()\n"],"mappings":";;;;AAEA;AACA;AACA;AACA;;AASA,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;AACO,MAAMY,kBAAmD,GAAGA,CAAA,KACjE,IAAId,6BAA6B,CAAC,CAAC;AAAAe,OAAA,CAAAD,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -21,13 +21,6 @@ class WixDataUpdateOptionsBuilderImpl {
21
21
  showDrafts: value
22
22
  });
23
23
  }
24
- withAppOptions(value) {
25
- return this.copy({
26
- appOptions: {
27
- ...value
28
- }
29
- });
30
- }
31
24
  withIncludeReferences(value) {
32
25
  return this.copy({
33
26
  includeReferences: value
@@ -45,12 +38,7 @@ class WixDataUpdateOptionsBuilderImpl {
45
38
  }
46
39
  build() {
47
40
  return {
48
- ...this.options,
49
- ...(this.options.appOptions ? {
50
- appOptions: {
51
- ...this.options.appOptions
52
- }
53
- } : {})
41
+ ...this.options
54
42
  };
55
43
  }
56
44
  copy(options) {
@@ -1 +1 @@
1
- {"version":3,"names":["WixDataUpdateOptionsBuilderImpl","constructor","options","withSuppressHooks","value","copy","suppressHooks","withShowDrafts","showDrafts","withAppOptions","appOptions","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 * WixData update options builder.\n * @internal\n */\nexport interface WixDataUpdateOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataUpdateOptionsBuilder\n withShowDrafts(value: boolean): WixDataUpdateOptionsBuilder\n withAppOptions(value: Record<string, any>): WixDataUpdateOptionsBuilder\n withIncludeReferences(value: boolean): WixDataUpdateOptionsBuilder\n withSaveReferences(value: boolean): WixDataUpdateOptionsBuilder\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataUpdateOptionsBuilder\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 withAppOptions(value: Record<string, any>): WixDataUpdateOptionsBuilder {\n return this.copy({ appOptions: { ...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 {\n ...this.options,\n ...(this.options.appOptions\n ? { appOptions: { ...this.options.appOptions } }\n : {}),\n }\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 * @internal\n */\nexport const UpdateOptionsBuilder: () => WixDataUpdateOptionsBuilder = () =>\n new WixDataUpdateOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;;AAaA,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,cAAcA,CAACL,KAA0B,EAA+B;IACtE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEK,UAAU,EAAE;QAAE,GAAGN;MAAM;IAAE,CAAC,CAAC;EAChD;EAEAO,qBAAqBA,CAACP,KAAc,EAA+B;IACjE,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEO,iBAAiB,EAAER;IAAM,CAAC,CAAC;EAChD;EAEAS,kBAAkBA,CAACT,KAAc,EAA+B;IAC9D,OAAO,IAAI,CAACC,IAAI,CAAC;MAAES,cAAc,EAAEV;IAAM,CAAC,CAAC;EAC7C;EAEAW,aAAaA,CACXX,KAAsD,EACzB;IAC7B,OAAO,IAAI,CAACC,IAAI,CAAC;MAAEW,SAAS,EAAEZ,KAAK,CAACa;IAAO,CAAC,CAAC;EAC/C;EAEAC,KAAKA,CAAA,EAAyB;IAC5B,OAAO;MACL,GAAG,IAAI,CAAChB,OAAO;MACf,IAAI,IAAI,CAACA,OAAO,CAACQ,UAAU,GACvB;QAAEA,UAAU,EAAE;UAAE,GAAG,IAAI,CAACR,OAAO,CAACQ;QAAW;MAAE,CAAC,GAC9C,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;AACO,MAAMiB,oBAAuD,GAAGA,CAAA,KACrE,IAAInB,+BAA+B,CAAC,CAAC;AAAAoB,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 * WixData update options builder.\n * @internal\n */\nexport interface WixDataUpdateOptionsBuilder {\n withSuppressHooks(value: boolean): WixDataUpdateOptionsBuilder\n withShowDrafts(value: boolean): WixDataUpdateOptionsBuilder\n withIncludeReferences(value: boolean): WixDataUpdateOptionsBuilder\n withSaveReferences(value: boolean): WixDataUpdateOptionsBuilder\n withCondition(\n value: FilterExpression<WixDataItem, WixDataQuerySpec>\n ): WixDataUpdateOptionsBuilder\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 * @internal\n */\nexport const UpdateOptionsBuilder: () => WixDataUpdateOptionsBuilder = () =>\n new WixDataUpdateOptionsBuilderImpl()\n"],"mappings":";;;;AAOA;AACA;AACA;AACA;;AAYA,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;AACO,MAAMe,oBAAuD,GAAGA,CAAA,KACrE,IAAIjB,+BAA+B,CAAC,CAAC;AAAAkB,OAAA,CAAAD,oBAAA,GAAAA,oBAAA","ignoreList":[]}