@wix/wix-data-items-common 1.0.303 → 1.0.304

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 (39) hide show
  1. package/dist/cjs/api/ApiClient.js +18 -0
  2. package/dist/cjs/api/ApiClient.js.map +1 -1
  3. package/dist/cjs/api/WixDataApi.js +80 -0
  4. package/dist/cjs/api/WixDataApi.js.map +1 -1
  5. package/dist/cjs/api/WixDataPatch.js.map +1 -1
  6. package/dist/cjs/api/impl/WixDataPatchImpl.js +27 -1
  7. package/dist/cjs/api/impl/WixDataPatchImpl.js.map +1 -1
  8. package/dist/cjs/api/index.js +7 -1
  9. package/dist/cjs/api/index.js.map +1 -1
  10. package/dist/cjs/api/types.js.map +1 -1
  11. package/dist/cjs/types/api.js.map +1 -1
  12. package/dist/cjs/types/data-item-types.js +9 -1
  13. package/dist/cjs/types/data-item-types.js.map +1 -1
  14. package/dist/esm/api/ApiClient.js +18 -0
  15. package/dist/esm/api/ApiClient.js.map +1 -1
  16. package/dist/esm/api/WixDataApi.js +70 -1
  17. package/dist/esm/api/WixDataApi.js.map +1 -1
  18. package/dist/esm/api/impl/WixDataPatchImpl.js +26 -0
  19. package/dist/esm/api/impl/WixDataPatchImpl.js.map +1 -1
  20. package/dist/esm/api/index.js.map +1 -1
  21. package/dist/esm/types/data-item-types.js +8 -0
  22. package/dist/esm/types/data-item-types.js.map +1 -1
  23. package/dist/types/api/ApiClient.d.ts +4 -1
  24. package/dist/types/api/ApiClient.d.ts.map +1 -1
  25. package/dist/types/api/WixDataApi.d.ts +5 -2
  26. package/dist/types/api/WixDataApi.d.ts.map +1 -1
  27. package/dist/types/api/WixDataPatch.d.ts +67 -1
  28. package/dist/types/api/WixDataPatch.d.ts.map +1 -1
  29. package/dist/types/api/impl/WixDataPatchImpl.d.ts +25 -2
  30. package/dist/types/api/impl/WixDataPatchImpl.d.ts.map +1 -1
  31. package/dist/types/api/index.d.ts +2 -2
  32. package/dist/types/api/index.d.ts.map +1 -1
  33. package/dist/types/api/types.d.ts +14 -0
  34. package/dist/types/api/types.d.ts.map +1 -1
  35. package/dist/types/types/api.d.ts +4 -1
  36. package/dist/types/types/api.d.ts.map +1 -1
  37. package/dist/types/types/data-item-types.d.ts +73 -0
  38. package/dist/types/types/data-item-types.d.ts.map +1 -1
  39. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"names":["_errors","require","_utils","WixDataPatchBase","constructor","origin","_defineProperty2","default","ownInvalidArguments","invalidArguments","fieldModifications","collectionName","incrementField","fieldName","by","patchValidator","arityIsTwo","arguments","isNumber","validateAndAggregate","copy","addFieldModification","fieldPath","action","actionOptions","setField","value","appendToArray","removeFromArray","removeField","operatorName","PatchValidator","WixDataBulkPatchImpl","onRun","itemIds","params","run","options","exports","WixDataPatchImpl","itemId","AggregatingValidator","previousInvalidArguments","specifier","operand","addValidation","messages","queryValidations"],"sources":["../../../../src/api/impl/WixDataPatchImpl.ts"],"sourcesContent":["import { WixDataItem, WixDataBulkResult, WixDataPatchOptions } from '../types'\nimport { AggregatingValidator, messages } from '../../errors'\nimport { isNumber } from '../../utils'\nimport {\n FieldModification,\n WixDataBulkPatch,\n WixDataPatch,\n} from '../WixDataPatch'\n\ninterface BulkPatchParams {\n collectionName: string\n itemIds: string[]\n invalidArguments: string[]\n fieldModifications: FieldModification[]\n}\n\ninterface PatchParams {\n collectionName: string\n itemId: string\n invalidArguments: string[]\n fieldModifications: FieldModification[]\n}\n\ntype OnRun = (\n args: IArguments,\n params: PatchParams,\n options?: WixDataPatchOptions\n) => Promise<WixDataItem | null>\n\ntype OnBulkRun = (\n args: IArguments,\n params: BulkPatchParams,\n options?: WixDataPatchOptions\n) => Promise<WixDataBulkResult>\n\nabstract class WixDataPatchBase<Self> {\n protected readonly fieldModifications: FieldModification[]\n protected readonly collectionName: string\n protected readonly ownInvalidArguments: string[]\n\n constructor(origin: {\n collectionName: string\n invalidArguments?: string[]\n fieldModifications?: FieldModification[]\n }) {\n this.ownInvalidArguments = origin.invalidArguments ?? []\n this.fieldModifications = origin.fieldModifications ?? []\n this.collectionName = origin.collectionName\n }\n\n protected abstract copy(params: {\n invalidArguments?: string[]\n addFieldModification: FieldModification\n }): Self\n\n incrementField(fieldName: string, by: number): Self {\n const [invalidArguments] = this.patchValidator('.incrementField')\n .arityIsTwo(arguments)\n .isNumber(fieldName, by)\n .validateAndAggregate()\n\n return this.copy({\n invalidArguments,\n addFieldModification: {\n fieldPath: fieldName,\n action: 'INCREMENT_FIELD',\n actionOptions: by,\n },\n })\n }\n\n setField(fieldName: string, value: any): Self {\n const [invalidArguments] = this.patchValidator('.setField')\n .arityIsTwo(arguments)\n .validateAndAggregate()\n\n return this.copy({\n invalidArguments,\n addFieldModification: {\n fieldPath: fieldName,\n action: 'SET_FIELD',\n actionOptions: value,\n },\n })\n }\n\n appendToArray(fieldName: string, value: any): Self {\n const [invalidArguments] = this.patchValidator('.appendToArray')\n .arityIsTwo(arguments)\n .validateAndAggregate()\n\n return this.copy({\n invalidArguments,\n addFieldModification: {\n fieldPath: fieldName,\n action: 'APPEND_TO_ARRAY',\n actionOptions: value,\n },\n })\n }\n\n removeFromArray(fieldName: string, value: any): Self {\n const [invalidArguments] = this.patchValidator('.removeFromArray')\n .arityIsTwo(arguments)\n .validateAndAggregate()\n\n return this.copy({\n invalidArguments,\n addFieldModification: {\n fieldPath: fieldName,\n action: 'REMOVE_FROM_ARRAY',\n actionOptions: value,\n },\n })\n }\n\n removeField(fieldName: string): Self {\n const [invalidArguments] = this.patchValidator('.removeField')\n .arityIsTwo(arguments)\n .validateAndAggregate()\n\n return this.copy({\n invalidArguments,\n addFieldModification: {\n fieldPath: fieldName,\n action: 'REMOVE_FIELD',\n },\n })\n }\n\n private patchValidator(operatorName: string) {\n return new PatchValidator(operatorName, this.ownInvalidArguments)\n }\n}\n\nexport class WixDataBulkPatchImpl\n extends WixDataPatchBase<WixDataBulkPatchImpl>\n implements WixDataBulkPatch\n{\n private readonly onRun: OnBulkRun\n readonly itemIds: string[]\n\n constructor(origin: {\n collectionName: string\n itemIds: string[]\n invalidArguments?: string[]\n fieldModifications?: FieldModification[]\n onRun: OnBulkRun\n }) {\n super(origin)\n this.onRun = origin.onRun\n this.itemIds = origin.itemIds\n }\n\n protected copy(params: {\n invalidArguments?: string[]\n addFieldModification: FieldModification\n }): WixDataBulkPatchImpl {\n return new WixDataBulkPatchImpl({\n ...this,\n invalidArguments: params.invalidArguments ?? this.ownInvalidArguments,\n fieldModifications: [\n ...this.fieldModifications,\n ...[params.addFieldModification],\n ],\n onRun: this.onRun,\n })\n }\n\n run(options?: WixDataPatchOptions): Promise<WixDataBulkResult> {\n return this.onRun(\n arguments,\n {\n collectionName: this.collectionName,\n itemIds: this.itemIds,\n invalidArguments: this.ownInvalidArguments,\n fieldModifications: this.fieldModifications,\n },\n options\n )\n }\n}\n\nexport class WixDataPatchImpl\n extends WixDataPatchBase<WixDataPatchImpl>\n implements WixDataPatch\n{\n private readonly onRun: OnRun\n readonly itemId: string\n\n constructor(origin: {\n collectionName: string\n itemId: string\n invalidArguments?: string[]\n fieldModifications?: FieldModification[]\n onRun: OnRun\n }) {\n super(origin)\n this.onRun = origin.onRun\n this.itemId = origin.itemId\n }\n\n protected copy(params: {\n invalidArguments?: string[]\n addFieldModification: FieldModification\n }): WixDataPatchImpl {\n return new WixDataPatchImpl({\n ...this,\n invalidArguments: params.invalidArguments ?? this.ownInvalidArguments,\n fieldModifications: [\n ...this.fieldModifications,\n ...[params.addFieldModification],\n ],\n onRun: this.onRun,\n })\n }\n\n run(options?: WixDataPatchOptions): Promise<WixDataItem | null> {\n return this.onRun(\n arguments,\n {\n collectionName: this.collectionName,\n itemId: this.itemId,\n invalidArguments: this.ownInvalidArguments,\n fieldModifications: this.fieldModifications,\n },\n options\n )\n }\n}\n\nclass PatchValidator extends AggregatingValidator {\n constructor(public operatorName: string, previousInvalidArguments: string[]) {\n super(previousInvalidArguments)\n this.operatorName = operatorName\n }\n\n isNumber(specifier: string, operand: any) {\n return this.addValidation(\n () => isNumber(operand),\n () =>\n messages.queryValidations.isNumber(\n this.operatorName,\n specifier,\n operand\n )\n )\n }\n}\n"],"mappings":";;;;;;AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAiCA,MAAeE,gBAAgB,CAAO;EAKpCC,WAAWA,CAACC,MAIX,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IACD,IAAI,CAACC,mBAAmB,GAAGH,MAAM,CAACI,gBAAgB,IAAI,EAAE;IACxD,IAAI,CAACC,kBAAkB,GAAGL,MAAM,CAACK,kBAAkB,IAAI,EAAE;IACzD,IAAI,CAACC,cAAc,GAAGN,MAAM,CAACM,cAAc;EAC7C;EAOAC,cAAcA,CAACC,SAAiB,EAAEC,EAAU,EAAQ;IAClD,MAAM,CAACL,gBAAgB,CAAC,GAAG,IAAI,CAACM,cAAc,CAAC,iBAAiB,CAAC,CAC9DC,UAAU,CAACC,SAAS,CAAC,CACrBC,QAAQ,CAACL,SAAS,EAAEC,EAAE,CAAC,CACvBK,oBAAoB,CAAC,CAAC;IAEzB,OAAO,IAAI,CAACC,IAAI,CAAC;MACfX,gBAAgB;MAChBY,oBAAoB,EAAE;QACpBC,SAAS,EAAET,SAAS;QACpBU,MAAM,EAAE,iBAAiB;QACzBC,aAAa,EAAEV;MACjB;IACF,CAAC,CAAC;EACJ;EAEAW,QAAQA,CAACZ,SAAiB,EAAEa,KAAU,EAAQ;IAC5C,MAAM,CAACjB,gBAAgB,CAAC,GAAG,IAAI,CAACM,cAAc,CAAC,WAAW,CAAC,CACxDC,UAAU,CAACC,SAAS,CAAC,CACrBE,oBAAoB,CAAC,CAAC;IAEzB,OAAO,IAAI,CAACC,IAAI,CAAC;MACfX,gBAAgB;MAChBY,oBAAoB,EAAE;QACpBC,SAAS,EAAET,SAAS;QACpBU,M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,MAGd,EAAoB;IACnB,OAAO,IAAII,gBAAgB,CAAC;MAC1B,GAAG,IAAI;MACP9B,gBAAgB,EAAE0B,MAAM,CAAC1B,gBAAgB,IAAI,IAAI,CAACD,mBAAmB;MACrEE,kBAAkB,EAAE,CAClB,GAAG,IAAI,CAACA,kBAAkB,EAC1B,GAAG,CAACyB,MAAM,CAACd,oBAAoB,CAAC,CACjC;MACDY,KAAK,EAAE,IAAI,CAACA;IACd,CAAC,CAAC;EACJ;EAEAG,GAAGA,CAACC,OAA6B,EAA+B;IAC9D,OAAO,IAAI,CAACJ,KAAK,CACfhB,SAAS,EACT;MACEN,cAAc,EAAE,IAAI,CAACA,cAAc;MACnC6B,MAAM,EAAE,IAAI,CAACA,MAAM;MACnB/B,gBAAgB,EAAE,IAAI,CAACD,mBAAmB;MAC1CE,kBAAkB,EAAE,IAAI,CAACA;IAC3B,CAAC,EACD2B,OACF,CAAC;EACH;AACF;AAACC,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAED,MAAMR,cAAc,SAASU,4BAAoB,CAAC;EAChDrC,WAAWA,CAAQ0B,YAAoB,EAAEY,wBAAkC,EAAE;IAC3E,KAAK,CAACA,wBAAwB,CAAC;IAAA,KADdZ,YAAoB,GAApBA,YAAoB;IAErC,IAAI,CAACA,YAAY,GAAGA,YAAY;EAClC;EAEAZ,QAAQA,CAACyB,SAAiB,EAAEC,OAAY,EAAE;IACxC,OAAO,IAAI,CAACC,aAAa,CACvB,MAAM,IAAA3B,eAAQ,EAAC0B,OAAO,CAAC,EACvB,MACEE,gBAAQ,CAACC,gBAAgB,CAAC7B,QAAQ,CAChC,IAAI,CAACY,YAAY,EACjBa,SAAS,EACTC,OACF,CACJ,CAAC;EACH;AACF","ignoreList":[]}
1
+ {"version":3,"names":["_errors","require","_utils","WixDataPatchBase","constructor","origin","_defineProperty2","default","ownInvalidArguments","invalidArguments","fieldModifications","collectionName","incrementField","fieldName","by","patchValidator","arityIsTwo","arguments","isNumber","validateAndAggregate","copy","addFieldModification","fieldPath","action","actionOptions","setField","value","appendToArray","removeFromArray","removeField","operatorName","PatchValidator","WixDataBulkPatchImpl","onRun","itemIds","params","run","options","exports","WixDataPatchImpl","itemId","WixDataPatchByFilterImpl","filter","AggregatingValidator","previousInvalidArguments","specifier","operand","addValidation","messages","queryValidations"],"sources":["../../../../src/api/impl/WixDataPatchImpl.ts"],"sourcesContent":["import {\n WixDataAsyncByFilterOptions,\n WixDataAsyncJob,\n WixDataBulkResult,\n WixDataItem,\n WixDataPatchOptions,\n} from '../types'\nimport { AggregatingValidator, messages } from '../../errors'\nimport { isNumber } from '../../utils'\nimport {\n FieldModification,\n WixDataBulkPatch,\n WixDataPatch,\n WixDataPatchByFilter,\n} from '../WixDataPatch'\n\ninterface BulkPatchParams {\n collectionName: string\n itemIds: string[]\n invalidArguments: string[]\n fieldModifications: FieldModification[]\n}\n\ninterface PatchParams {\n collectionName: string\n itemId: string\n invalidArguments: string[]\n fieldModifications: FieldModification[]\n}\n\ninterface PatchByFilterParams {\n collectionName: string\n filter: Record<string, any>\n invalidArguments: string[]\n fieldModifications: FieldModification[]\n}\n\ntype OnRun = (\n args: IArguments,\n params: PatchParams,\n options?: WixDataPatchOptions\n) => Promise<WixDataItem | null>\n\ntype OnBulkRun = (\n args: IArguments,\n params: BulkPatchParams,\n options?: WixDataPatchOptions\n) => Promise<WixDataBulkResult>\n\ntype OnPatchByFilterRun = (\n args: IArguments,\n params: PatchByFilterParams,\n options?: WixDataAsyncByFilterOptions\n) => Promise<WixDataAsyncJob>\n\nabstract class WixDataPatchBase<Self> {\n protected readonly fieldModifications: FieldModification[]\n protected readonly collectionName: string\n protected readonly ownInvalidArguments: string[]\n\n constructor(origin: {\n collectionName: string\n invalidArguments?: string[]\n fieldModifications?: FieldModification[]\n }) {\n this.ownInvalidArguments = origin.invalidArguments ?? []\n this.fieldModifications = origin.fieldModifications ?? []\n this.collectionName = origin.collectionName\n }\n\n protected abstract copy(params: {\n invalidArguments?: string[]\n addFieldModification: FieldModification\n }): Self\n\n incrementField(fieldName: string, by: number): Self {\n const [invalidArguments] = this.patchValidator('.incrementField')\n .arityIsTwo(arguments)\n .isNumber(fieldName, by)\n .validateAndAggregate()\n\n return this.copy({\n invalidArguments,\n addFieldModification: {\n fieldPath: fieldName,\n action: 'INCREMENT_FIELD',\n actionOptions: by,\n },\n })\n }\n\n setField(fieldName: string, value: any): Self {\n const [invalidArguments] = this.patchValidator('.setField')\n .arityIsTwo(arguments)\n .validateAndAggregate()\n\n return this.copy({\n invalidArguments,\n addFieldModification: {\n fieldPath: fieldName,\n action: 'SET_FIELD',\n actionOptions: value,\n },\n })\n }\n\n appendToArray(fieldName: string, value: any): Self {\n const [invalidArguments] = this.patchValidator('.appendToArray')\n .arityIsTwo(arguments)\n .validateAndAggregate()\n\n return this.copy({\n invalidArguments,\n addFieldModification: {\n fieldPath: fieldName,\n action: 'APPEND_TO_ARRAY',\n actionOptions: value,\n },\n })\n }\n\n removeFromArray(fieldName: string, value: any): Self {\n const [invalidArguments] = this.patchValidator('.removeFromArray')\n .arityIsTwo(arguments)\n .validateAndAggregate()\n\n return this.copy({\n invalidArguments,\n addFieldModification: {\n fieldPath: fieldName,\n action: 'REMOVE_FROM_ARRAY',\n actionOptions: value,\n },\n })\n }\n\n removeField(fieldName: string): Self {\n const [invalidArguments] = this.patchValidator('.removeField')\n .arityIsTwo(arguments)\n .validateAndAggregate()\n\n return this.copy({\n invalidArguments,\n addFieldModification: {\n fieldPath: fieldName,\n action: 'REMOVE_FIELD',\n },\n })\n }\n\n private patchValidator(operatorName: string) {\n return new PatchValidator(operatorName, this.ownInvalidArguments)\n }\n}\n\nexport class WixDataBulkPatchImpl\n extends WixDataPatchBase<WixDataBulkPatchImpl>\n implements WixDataBulkPatch\n{\n private readonly onRun: OnBulkRun\n readonly itemIds: string[]\n\n constructor(origin: {\n collectionName: string\n itemIds: string[]\n invalidArguments?: string[]\n fieldModifications?: FieldModification[]\n onRun: OnBulkRun\n }) {\n super(origin)\n this.onRun = origin.onRun\n this.itemIds = origin.itemIds\n }\n\n protected copy(params: {\n invalidArguments?: string[]\n addFieldModification: FieldModification\n }): WixDataBulkPatchImpl {\n return new WixDataBulkPatchImpl({\n ...this,\n invalidArguments: params.invalidArguments ?? this.ownInvalidArguments,\n fieldModifications: [\n ...this.fieldModifications,\n ...[params.addFieldModification],\n ],\n onRun: this.onRun,\n })\n }\n\n run(options?: WixDataPatchOptions): Promise<WixDataBulkResult> {\n return this.onRun(\n arguments,\n {\n collectionName: this.collectionName,\n itemIds: this.itemIds,\n invalidArguments: this.ownInvalidArguments,\n fieldModifications: this.fieldModifications,\n },\n options\n )\n }\n}\n\nexport class WixDataPatchImpl\n extends WixDataPatchBase<WixDataPatchImpl>\n implements WixDataPatch\n{\n private readonly onRun: OnRun\n readonly itemId: string\n\n constructor(origin: {\n collectionName: string\n itemId: string\n invalidArguments?: string[]\n fieldModifications?: FieldModification[]\n onRun: OnRun\n }) {\n super(origin)\n this.onRun = origin.onRun\n this.itemId = origin.itemId\n }\n\n protected copy(params: {\n invalidArguments?: string[]\n addFieldModification: FieldModification\n }): WixDataPatchImpl {\n return new WixDataPatchImpl({\n ...this,\n invalidArguments: params.invalidArguments ?? this.ownInvalidArguments,\n fieldModifications: [\n ...this.fieldModifications,\n ...[params.addFieldModification],\n ],\n onRun: this.onRun,\n })\n }\n\n run(options?: WixDataPatchOptions): Promise<WixDataItem | null> {\n return this.onRun(\n arguments,\n {\n collectionName: this.collectionName,\n itemId: this.itemId,\n invalidArguments: this.ownInvalidArguments,\n fieldModifications: this.fieldModifications,\n },\n options\n )\n }\n}\n\nexport class WixDataPatchByFilterImpl\n extends WixDataPatchBase<WixDataPatchByFilterImpl>\n implements WixDataPatchByFilter\n{\n private readonly onRun: OnPatchByFilterRun\n readonly filter: Record<string, any>\n\n constructor(origin: {\n collectionName: string\n filter: Record<string, any>\n invalidArguments?: string[]\n fieldModifications?: FieldModification[]\n onRun: OnPatchByFilterRun\n }) {\n super(origin)\n this.onRun = origin.onRun\n this.filter = origin.filter\n }\n\n protected copy(params: {\n invalidArguments?: string[]\n addFieldModification: FieldModification\n }): WixDataPatchByFilterImpl {\n return new WixDataPatchByFilterImpl({\n ...this,\n invalidArguments: params.invalidArguments ?? this.ownInvalidArguments,\n fieldModifications: [\n ...this.fieldModifications,\n ...[params.addFieldModification],\n ],\n onRun: this.onRun,\n })\n }\n\n run(options?: WixDataAsyncByFilterOptions): Promise<WixDataAsyncJob> {\n return this.onRun(\n arguments,\n {\n collectionName: this.collectionName,\n filter: this.filter,\n invalidArguments: this.ownInvalidArguments,\n fieldModifications: this.fieldModifications,\n },\n options\n )\n }\n}\n\nclass PatchValidator extends AggregatingValidator {\n constructor(public operatorName: string, previousInvalidArguments: string[]) {\n super(previousInvalidArguments)\n this.operatorName = operatorName\n }\n\n isNumber(specifier: string, operand: any) {\n return this.addValidation(\n () => isNumber(operand),\n () =>\n messages.queryValidations.isNumber(\n this.operatorName,\n specifier,\n operand\n )\n )\n }\n}\n"],"mappings":";;;;;;AAOA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AA+CA,MAAeE,gBAAgB,CAAO;EAKpCC,WAAWA,CAACC,MAIX,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IACD,IAAI,CAACC,mBAAmB,GAAGH,MAAM,CAACI,gBAAgB,IAAI,EAAE;IACxD,IAAI,CAACC,kBAAkB,GAAGL,MAAM,CAACK,kBAAkB,IAAI,EAAE;IACzD,IAAI,CAACC,cAAc,GAAGN,MAAM,CAACM,cAAc;EAC7C;EAOAC,cAAcA,CAACC,SAAiB,EAAEC,EAAU,EAAQ;IAClD,MAAM,CAACL,gBAAgB,CAAC,GAAG,IAAI,CAACM,cAAc,CAAC,iBAAiB,CAAC,CAC9DC,UAAU,CAACC,SAAS,CAAC,CACrBC,QAAQ,CAAC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,CAACY,YAAY,EACjBe,SAAS,EACTC,OACF,CACJ,CAAC;EACH;AACF","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.stages = exports.pipelineBuilder = exports.expressions = exports.WixDataUpdateOptions = exports.WixDataSearchRequest = exports.WixDataSearch = exports.WixDataSaveOptions = exports.WixDataResult = exports.WixDataRemoveOptions = exports.WixDataReference = exports.WixDataReadWithProjectionOptions = exports.WixDataReadOptions = exports.WixDataQuerySpec = exports.WixDataQueryRequest = exports.WixDataQueryReferencedOptions = exports.WixDataQueryOptions = exports.WixDataQueryBuilder = exports.WixDataQuery = exports.WixDataPatchOptions = exports.WixDataPatch = exports.WixDataOptions = exports.WixDataItem = exports.WixDataInsertOptions = exports.WixDataGetOptions = exports.WixDataFilter = exports.WixDataDistinctOptions = exports.WixDataDirectSearchOptions = exports.WixDataDirectQueryOptions = exports.WixDataCountOptions = exports.WixDataBulkUpdateOptions = exports.WixDataBulkSaveOptions = exports.WixDataBulkResult = exports.WixDataBulkRemoveOptions = exports.WixDataBulkPatchOptions = exports.WixDataBulkPatch = exports.WixDataBulkInsertOptions = exports.WixDataBulkError = exports.WixDataApi = exports.WixDataAggregatePipelineStages = exports.WixDataAggregatePipelineExpressions = exports.WixDataAggregateOptions = exports.WixDataAggregate = exports.WithIncludeFieldGroupsOption = exports.UnwindStage = exports.ToUpperExpression = exports.ToLowerExpression = exports.TextExpression = exports.SumExpression = exports.SubtractExpression = exports.SubstringExpression = exports.StringifyExpression = exports.SortStage = exports.Sort = exports.SkipStage = exports.SearchParams = exports.SearchBuilder = exports.QueryValidator = exports.QueryBuilder = exports.QueryBase = exports.ProjectStage = exports.PipelineStage = exports.PipelineBuilder = exports.ObjectToArrayStage = exports.NumericExpression = exports.MultiplyExpression = exports.ModExpression = exports.LimitStage = exports.LengthExpression = exports.GroupStage = exports.FloorExpression = exports.FilterStage = exports.Filter = exports.FieldExpression = exports.DivideExpression = exports.ConcatExpression = exports.CeilExpression = exports.AddExpression = exports.AbsExpression = void 0;
4
+ exports.stages = exports.pipelineBuilder = exports.expressions = exports.WixDataUpdateOptions = exports.WixDataSearchRequest = exports.WixDataSearch = exports.WixDataSaveOptions = exports.WixDataResult = exports.WixDataRemoveOptions = exports.WixDataReference = exports.WixDataReadWithProjectionOptions = exports.WixDataReadOptions = exports.WixDataQuerySpec = exports.WixDataQueryRequest = exports.WixDataQueryReferencedOptions = exports.WixDataQueryOptions = exports.WixDataQueryBuilder = exports.WixDataQuery = exports.WixDataPatchOptions = exports.WixDataPatchByFilter = exports.WixDataPatch = exports.WixDataOptions = exports.WixDataItem = exports.WixDataInsertOptions = exports.WixDataGetOptions = exports.WixDataFilterInput = exports.WixDataFilter = exports.WixDataDistinctOptions = exports.WixDataDirectSearchOptions = exports.WixDataDirectQueryOptions = exports.WixDataCountOptions = exports.WixDataBulkUpdateOptions = exports.WixDataBulkSaveOptions = exports.WixDataBulkResult = exports.WixDataBulkRemoveOptions = exports.WixDataBulkPatchOptions = exports.WixDataBulkPatch = exports.WixDataBulkInsertOptions = exports.WixDataBulkError = exports.WixDataAsyncJobStatusValue = exports.WixDataAsyncJobStatus = exports.WixDataAsyncJob = exports.WixDataAsyncByFilterOptions = exports.WixDataApi = exports.WixDataAggregatePipelineStages = exports.WixDataAggregatePipelineExpressions = exports.WixDataAggregateOptions = exports.WixDataAggregate = exports.WithIncludeFieldGroupsOption = exports.UnwindStage = exports.ToUpperExpression = exports.ToLowerExpression = exports.TextExpression = exports.SumExpression = exports.SubtractExpression = exports.SubstringExpression = exports.StringifyExpression = exports.SortStage = exports.Sort = exports.SkipStage = exports.SearchParams = exports.SearchBuilder = exports.QueryValidator = exports.QueryBuilder = exports.QueryBase = exports.ProjectStage = exports.PipelineStage = exports.PipelineBuilder = exports.ObjectToArrayStage = exports.NumericExpression = exports.MultiplyExpression = exports.ModExpression = exports.LimitStage = exports.LengthExpression = exports.GroupStage = exports.FloorExpression = exports.FilterStage = exports.Filter = exports.FieldExpression = exports.DivideExpression = exports.ConcatExpression = exports.CeilExpression = exports.AddExpression = exports.AbsExpression = void 0;
5
5
  var _WixDataQuery = require("./WixDataQuery");
6
6
  exports.WixDataQuery = _WixDataQuery.WixDataQuery;
7
7
  var _WixDataSearch = require("./WixDataSearch");
@@ -19,6 +19,7 @@ exports.QueryBase = _QueryBase.QueryBase;
19
19
  var _WixDataPatch = require("./WixDataPatch");
20
20
  exports.WixDataPatch = _WixDataPatch.WixDataPatch;
21
21
  exports.WixDataBulkPatch = _WixDataPatch.WixDataBulkPatch;
22
+ exports.WixDataPatchByFilter = _WixDataPatch.WixDataPatchByFilter;
22
23
  var _WixDataFilter = require("./WixDataFilter");
23
24
  exports.WixDataFilter = _WixDataFilter.WixDataFilter;
24
25
  var _types = require("./types");
@@ -38,6 +39,11 @@ exports.WixDataReference = _types.WixDataReference;
38
39
  exports.WixDataBulkError = _types.WixDataBulkError;
39
40
  exports.WixDataSaveOptions = _types.WixDataSaveOptions;
40
41
  exports.WixDataBulkPatchOptions = _types.WixDataBulkPatchOptions;
42
+ exports.WixDataAsyncByFilterOptions = _types.WixDataAsyncByFilterOptions;
43
+ exports.WixDataAsyncJob = _types.WixDataAsyncJob;
44
+ exports.WixDataAsyncJobStatus = _types.WixDataAsyncJobStatus;
45
+ exports.WixDataAsyncJobStatusValue = _types.WixDataAsyncJobStatusValue;
46
+ exports.WixDataFilterInput = _types.WixDataFilterInput;
41
47
  exports.WixDataBulkUpdateOptions = _types.WixDataBulkUpdateOptions;
42
48
  exports.WixDataBulkRemoveOptions = _types.WixDataBulkRemoveOptions;
43
49
  exports.WixDataBulkInsertOptions = _types.WixDataBulkInsertOptions;
@@ -1 +1 @@
1
- {"version":3,"names":["_WixDataQuery","require","exports","WixDataQuery","_WixDataSearch","WixDataSearch","_WixDataApi","WixDataApi","_WixDataResult","WixDataResult","_QueryValidator","QueryValidator","_WixDataAggregate","WixDataAggregate","_QueryBase","QueryBase","_WixDataPatch","WixDataPatch","WixDataBulkPatch","_WixDataFilter","WixDataFilter","_types","WixDataOptions","WixDataReadOptions","WixDataReadWithProjectionOptions","WithIncludeFieldGroupsOption","WixDataGetOptions","WixDataUpdateOptions","WixDataPatchOptions","WixDataQueryOptions","WixDataDirectQueryOptions","WixDataQueryRequest","WixDataQuerySpec","WixDataItem","WixDataReference","WixDataBulkError","WixDataSaveOptions","WixDataBulkPatchOptions","WixDataBulkUpdateOptions","WixDataBulkRemoveOptions","WixDataBulkInsertOptions","WixDataBulkSaveOptions","WixDataInsertOptions","WixDataBulkResult","WixDataQueryReferencedOptions","WixDataAggregateOptions","WixDataRemoveOptions","WixDataDistinctOptions","WixDataCountOptions","WixDataSearchRequest","WixDataDirectSearchOptions","_stages","stages","PipelineStage","WixDataAggregatePipelineStages","_FilterStage","FilterStage","_ProjectStage","ProjectStage","_GroupStage","GroupStage","_UnwindStage","UnwindStage","_SortStage","SortStage","_LimitStage","LimitStage","_SkipStage","SkipStage","_ObjectToArrayStage","ObjectToArrayStage","_PipelineBuilder","PipelineBuilder","pipelineBuilder","_WixDataQueryBuilder","QueryBuilder","Sort","Filter","WixDataQueryBuilder","_WixDataSearchBuilder","SearchBuilder","SearchParams","_expressions","expressions","WixDataAggregatePipelineExpressions","_Expression","FieldExpression","TextExpression","NumericExpression","AddExpression","SubtractExpression","MultiplyExpression","DivideExpression","SumExpression","AbsExpression","ModExpression","FloorExpression","CeilExpression","ConcatExpression","StringifyExpression","ToLowerExpression","ToUpperExpression","SubstringExpression","LengthExpression"],"sources":["../../../src/api/index.ts"],"sourcesContent":["export { WixDataQuery } from './WixDataQuery'\nexport { WixDataSearch } from './WixDataSearch'\nexport { WixDataApi } from './WixDataApi'\nexport { WixDataResult } from './WixDataResult'\nexport { QueryValidator } from './QueryValidator'\nexport { WixDataAggregate } from './WixDataAggregate'\nexport { QueryBase } from './QueryBase'\nexport { WixDataPatch, WixDataBulkPatch } from './WixDataPatch'\nexport { WixDataFilter } from './WixDataFilter'\nexport {\n WixDataOptions,\n WixDataReadOptions,\n WixDataReadWithProjectionOptions,\n WithIncludeFieldGroupsOption,\n WixDataGetOptions,\n WixDataUpdateOptions,\n WixDataPatchOptions,\n WixDataQueryOptions,\n WixDataDirectQueryOptions,\n WixDataQueryRequest,\n WixDataQuerySpec,\n WixDataItem,\n WixDataReference,\n WixDataBulkError,\n WixDataSaveOptions,\n WixDataBulkPatchOptions,\n WixDataBulkUpdateOptions,\n WixDataBulkRemoveOptions,\n WixDataBulkInsertOptions,\n WixDataBulkSaveOptions,\n WixDataInsertOptions,\n WixDataBulkResult,\n WixDataQueryReferencedOptions,\n WixDataAggregateOptions,\n WixDataRemoveOptions,\n WixDataDistinctOptions,\n WixDataCountOptions,\n WixDataSearchRequest,\n WixDataDirectSearchOptions,\n} from './types'\nexport type { WixDataItemOrId } from './types'\nexport {\n stages,\n PipelineStage,\n WixDataAggregatePipelineStages,\n} from './stages/stages'\nexport { FilterStage } from './stages/FilterStage'\nexport { ProjectStage } from './stages/ProjectStage'\nexport { GroupStage } from './stages/GroupStage'\nexport { UnwindStage } from './stages/UnwindStage'\nexport { SortStage } from './stages/SortStage'\nexport { LimitStage } from './stages/LimitStage'\nexport { SkipStage } from './stages/SkipStage'\nexport { ObjectToArrayStage } from './stages/ObjectToArrayStage'\nexport { PipelineBuilder, pipelineBuilder } from './PipelineBuilder'\nexport {\n QueryBuilder,\n Sort,\n Filter,\n WixDataQueryBuilder,\n} from './WixDataQueryBuilder'\nexport { SearchBuilder, SearchParams } from './WixDataSearchBuilder'\nexport {\n expressions,\n WixDataAggregatePipelineExpressions,\n} from './expressions/expressions'\nexport {\n FieldExpression,\n TextExpression,\n NumericExpression,\n AddExpression,\n SubtractExpression,\n MultiplyExpression,\n DivideExpression,\n SumExpression,\n AbsExpression,\n ModExpression,\n FloorExpression,\n CeilExpression,\n ConcatExpression,\n StringifyExpression,\n ToLowerExpression,\n ToUpperExpression,\n SubstringExpression,\n LengthExpression,\n} from './expressions/Expression'\n"],"mappings":";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AA/F,OAAA,CAAAgG,gBAAA,GAAAb,WAAA,CAAAa,gBAAA;AAAAhG,OAAA,CAAAiG,mBAAA,GAAAd,WAAA,CAAAc,mBAAA;AAAAjG,OAAA,CAAAkG,iBAAA,GAAAf,WAAA,CAAAe,iBAAA;AAAAlG,OAAA,CAAAmG,iBAAA,GAAAhB,WAAA,CAAAgB,iBAAA;AAAAnG,OAAA,CAAAoG,mBAAA,GAAAjB,WAAA,CAAAiB,mBAAA;AAAApG,OAAA,CAAAqG,gBAAA,GAAAlB,WAAA,CAAAkB,gBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_WixDataQuery","require","exports","WixDataQuery","_WixDataSearch","WixDataSearch","_WixDataApi","WixDataApi","_WixDataResult","WixDataResult","_QueryValidator","QueryValidator","_WixDataAggregate","WixDataAggregate","_QueryBase","QueryBase","_WixDataPatch","WixDataPatch","WixDataBulkPatch","WixDataPatchByFilter","_WixDataFilter","WixDataFilter","_types","WixDataOptions","WixDataReadOptions","WixDataReadWithProjectionOptions","WithIncludeFieldGroupsOption","WixDataGetOptions","WixDataUpdateOptions","WixDataPatchOptions","WixDataQueryOptions","WixDataDirectQueryOptions","WixDataQueryRequest","WixDataQuerySpec","WixDataItem","WixDataReference","WixDataBulkError","WixDataSaveOptions","WixDataBulkPatchOptions","WixDataAsyncByFilterOptions","WixDataAsyncJob","WixDataAsyncJobStatus","WixDataAsyncJobStatusValue","WixDataFilterInput","WixDataBulkUpdateOptions","WixDataBulkRemoveOptions","WixDataBulkInsertOptions","WixDataBulkSaveOptions","WixDataInsertOptions","WixDataBulkResult","WixDataQueryReferencedOptions","WixDataAggregateOptions","WixDataRemoveOptions","WixDataDistinctOptions","WixDataCountOptions","WixDataSearchRequest","WixDataDirectSearchOptions","_stages","stages","PipelineStage","WixDataAggregatePipelineStages","_FilterStage","FilterStage","_ProjectStage","ProjectStage","_GroupStage","GroupStage","_UnwindStage","UnwindStage","_SortStage","SortStage","_LimitStage","LimitStage","_SkipStage","SkipStage","_ObjectToArrayStage","ObjectToArrayStage","_PipelineBuilder","PipelineBuilder","pipelineBuilder","_WixDataQueryBuilder","QueryBuilder","Sort","Filter","WixDataQueryBuilder","_WixDataSearchBuilder","SearchBuilder","SearchParams","_expressions","expressions","WixDataAggregatePipelineExpressions","_Expression","FieldExpression","TextExpression","NumericExpression","AddExpression","SubtractExpression","MultiplyExpression","DivideExpression","SumExpression","AbsExpression","ModExpression","FloorExpression","CeilExpression","ConcatExpression","StringifyExpression","ToLowerExpression","ToUpperExpression","SubstringExpression","LengthExpression"],"sources":["../../../src/api/index.ts"],"sourcesContent":["export { WixDataQuery } from './WixDataQuery'\nexport { WixDataSearch } from './WixDataSearch'\nexport { WixDataApi } from './WixDataApi'\nexport { WixDataResult } from './WixDataResult'\nexport { QueryValidator } from './QueryValidator'\nexport { WixDataAggregate } from './WixDataAggregate'\nexport { QueryBase } from './QueryBase'\nexport {\n WixDataPatch,\n WixDataBulkPatch,\n WixDataPatchByFilter,\n} from './WixDataPatch'\nexport { WixDataFilter } from './WixDataFilter'\nexport {\n WixDataOptions,\n WixDataReadOptions,\n WixDataReadWithProjectionOptions,\n WithIncludeFieldGroupsOption,\n WixDataGetOptions,\n WixDataUpdateOptions,\n WixDataPatchOptions,\n WixDataQueryOptions,\n WixDataDirectQueryOptions,\n WixDataQueryRequest,\n WixDataQuerySpec,\n WixDataItem,\n WixDataReference,\n WixDataBulkError,\n WixDataSaveOptions,\n WixDataBulkPatchOptions,\n WixDataAsyncByFilterOptions,\n WixDataAsyncJob,\n WixDataAsyncJobStatus,\n WixDataAsyncJobStatusValue,\n WixDataFilterInput,\n WixDataBulkUpdateOptions,\n WixDataBulkRemoveOptions,\n WixDataBulkInsertOptions,\n WixDataBulkSaveOptions,\n WixDataInsertOptions,\n WixDataBulkResult,\n WixDataQueryReferencedOptions,\n WixDataAggregateOptions,\n WixDataRemoveOptions,\n WixDataDistinctOptions,\n WixDataCountOptions,\n WixDataSearchRequest,\n WixDataDirectSearchOptions,\n} from './types'\nexport type { WixDataItemOrId } from './types'\nexport {\n stages,\n PipelineStage,\n WixDataAggregatePipelineStages,\n} from './stages/stages'\nexport { FilterStage } from './stages/FilterStage'\nexport { ProjectStage } from './stages/ProjectStage'\nexport { GroupStage } from './stages/GroupStage'\nexport { UnwindStage } from './stages/UnwindStage'\nexport { SortStage } from './stages/SortStage'\nexport { LimitStage } from './stages/LimitStage'\nexport { SkipStage } from './stages/SkipStage'\nexport { ObjectToArrayStage } from './stages/ObjectToArrayStage'\nexport { PipelineBuilder, pipelineBuilder } from './PipelineBuilder'\nexport {\n QueryBuilder,\n Sort,\n Filter,\n WixDataQueryBuilder,\n} from './WixDataQueryBuilder'\nexport { SearchBuilder, SearchParams } from './WixDataSearchBuilder'\nexport {\n expressions,\n WixDataAggregatePipelineExpressions,\n} from './expressions/expressions'\nexport {\n FieldExpression,\n TextExpression,\n NumericExpression,\n AddExpression,\n SubtractExpression,\n MultiplyExpression,\n DivideExpression,\n SumExpression,\n AbsExpression,\n ModExpression,\n FloorExpression,\n CeilExpression,\n ConcatExpression,\n StringifyExpression,\n ToLowerExpression,\n ToUpperExpression,\n SubstringExpression,\n LengthExpression,\n} from './expressions/Expression'\n"],"mappings":";;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAA6CC,OAAA,CAAAC,YAAA,GAAAH,aAAA,CAAAG,YAAA;AAC7C,IAAAC,cAAA,GAAAH,OAAA;AAA+CC,OAAA,CAAAG,aAAA,GAAAD,cAAA,CAAAC,aAAA;AAC/C,IAAAC,WAAA,GAAAL,OAAA;AAAyCC,OAAA,CAAAK,UAAA,GAAAD,WAAA,CAAAC,UAAA;AACzC,IAAAC,cAAA,GAAAP,OAAA;AAA+CC,OAAA,CAAAO,aAAA,GAAAD,cAAA,CAAAC,aAAA;AAC/C,IAAAC,eAAA,GAAAT,OAAA;AAAiDC,OAAA,CAAAS,cAAA,GAAAD,eAAA,CAAAC,cAAA;AACjD,IAAAC,iBAAA,GAAAX,OAAA;AAAqDC,O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AwG,iBAAA,GAAAf,WAAA,CAAAe,iBAAA;AAAAxG,OAAA,CAAAyG,iBAAA,GAAAhB,WAAA,CAAAgB,iBAAA;AAAAzG,OAAA,CAAA0G,mBAAA,GAAAjB,WAAA,CAAAiB,mBAAA;AAAA1G,OAAA,CAAA2G,gBAAA,GAAAlB,WAAA,CAAAkB,gBAAA","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/api/types.ts"],"sourcesContent":["import type { QueryRequest as SDKQueryRequest, QuerySpec } from '@wix/sdk-types'\nimport type { SortOrder } from '../types/data-item-types'\nimport { WixDataFilter } from './WixDataFilter'\n\nexport interface BaseOptions {\n /**\n * Prevents hooks from running for the operation. Can only be used in the [backend code of a Wix site](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/about-the-site-backend).\n *\n * Default: `false`.\n */\n suppressHooks?: boolean\n\n /**\n * When `true`, operations include draft items. Read operations include draft items in their response, and write operations modify draft items.\n *\n * Default: `false`.\n */\n showDrafts?: boolean\n}\n\nexport interface WithAppOptions {\n /**\n * Options for [querying Wix app collections](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections).\n */\n appOptions?: Record<string, any>\n}\n\n/**\n * Options for including referenced items in results.\n */\nexport interface IncludeReferencesOptions {\n /**\n * Reference fields to resolve in the results. When specified, the referenced items\n * are included in the response for the given fields.\n *\n * Each entry identifies a reference `field` by name and an optional `limit` that caps the number\n * of referenced items returned per queried item (relevant for multi-reference fields).\n */\n includeReferences?: { field: string; limit?: number }[]\n}\n\nexport interface WixDataRemoveOptions extends WixDataOptions {\n /**\n * If provided, item will be updated only if condition is met.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkPatchOptions extends WixDataOptions {\n /**\n * If provided, only items matching condition will be patched.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataOptions extends BaseOptions, WithAppOptions {}\n\nexport interface WixDataReadOptions extends WixDataOptions, WithAppOptions {\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * > **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string\n\n /**\n * When `true`, reads data from the primary database instance. This decreases performance but ensures data retrieved is\n * up-to-date even immediately after an update. Learn more about [Wix Data and eventual consistency](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency).\n */\n consistentRead?: boolean\n}\n\n/**\n * Options for standalone count queries.\n * @internal\n */\nexport interface WixDataCountOptions extends WixDataReadOptions {\n filter?: Record<string, any>\n}\n\nexport interface WixDataReadWithProjectionOptions\n extends WixDataReadOptions,\n ProjectionOptions,\n IncludeReferencesOptions {}\n\nexport interface WithIncludeFieldGroupsOption {\n /**\n * Requests conditional fields. Currently used in App Collections.\n * Please refer to app collection documentation for a list of valid values.\n */\n includeFieldGroups?: string[]\n}\n\nexport interface WixDataGetOptions\n extends WixDataReadWithProjectionOptions,\n WithIncludeFieldGroupsOption {}\n\nexport interface WixDataSaveOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n /** Whether to save references from the data item to other items in the collection. */\n saveReferences?: boolean\n}\n\nexport interface WixDataInsertOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n /** Whether to save references from the data item to other items in the collection. */\n saveReferences?: boolean\n}\n\nexport interface WixDataUpdateOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n /** Whether to save references from the data item to other items in the collection. */\n saveReferences?: boolean\n /**\n * If provided, item will be updated only if condition is met.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkUpdateOptions extends WixDataOptions {\n /** Whether to save references from the data items to other items in the collection. */\n saveReferences?: boolean\n /**\n * If provided, only items matching condition will be updated.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkInsertOptions extends WixDataOptions {\n /** Whether to save references from the data items to other items in the collection. */\n saveReferences?: boolean\n}\n\nexport interface WixDataBulkSaveOptions extends WixDataOptions {\n /** Whether to save references from the data items to other items in the collection. */\n saveReferences?: boolean\n}\n\nexport interface WixDataBulkRemoveOptions extends WixDataOptions {\n /**\n * If provided, only items matching condition will be removed.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataPatchOptions extends BaseOptions {\n /**\n * If provided, item will be patched only if condition is met.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataAggregateOptions extends WixDataQueryOptions {}\n\n/**\n * Options for standalone distinct field value queries.\n * @internal\n */\nexport interface WixDataDistinctOptions extends WixDataQueryOptions {\n filter?: Record<string, any>\n order?: SortOrder\n paging?: { limit?: number; offset?: number }\n cursorPaging?: { cursor?: string; limit?: number }\n}\n\n/**\n * WixData query specification.\n * Since WixData collections are dynamic, we allow any string field.\n * @internal\n */\nexport interface WixDataQuerySpec extends QuerySpec {\n wql: [\n {\n fields: string[]\n sort: 'BOTH'\n }\n ]\n paging: 'offset'\n}\n\n/**\n * Request object for direct query execution.\n * Extends the SDK's QueryRequest with WixData-specific fields.\n * Use this with `wixData.query(collectionName, queryRequest)` for one-shot queries.\n * @internal\n */\nexport interface WixDataQueryRequest\n extends Omit<SDKQueryRequest<WixDataItem, WixDataQuerySpec>, 'filter'> {\n /**\n * Filter object. Supports operators like `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`,\n * `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n *\n * Example:\n * ```js\n * { status: 'active', age: { $gt: 25 } }\n * ```\n */\n filter?: Record<string, any>\n\n /**\n * Cursor-based paging. Use this as an alternative to offset paging.\n *\n * Example:\n * ```js\n * { limit: 10, cursor: 'abc123' }\n * ```\n */\n cursorPaging?: {\n /** Maximum number of items to return. */\n limit?: number\n /** Cursor token pointing to a page of results. */\n cursor?: string\n }\n}\n\nexport interface WixDataQueryOptions extends WixDataReadOptions {\n /**\n * When `true`, the query results include a `totalCount` and `totalPages` properties containing the totals of items\n * matching query. Requesting total count slows down the query.\n *\n * Default: `false`\n */\n returnTotalCount?: boolean\n}\n\n/**\n * Options for direct query execution.\n * @internal\n */\nexport interface WixDataDirectQueryOptions\n extends WixDataQueryOptions,\n IncludeReferencesOptions {\n /**\n * Requests conditional fields. Currently used in App Collections.\n * Please refer to app collection documentation for a list of valid values.\n */\n includeFieldGroups?: string[]\n}\n\n/**\n * Request object for direct search execution.\n * Matches the shape produced by `SearchBuilder().build()` so it can be passed directly.\n * Use this with `wixData.search(collectionName, searchRequest)` for direct search execution.\n * @internal\n */\nexport interface WixDataSearchRequest {\n /** Search parameters. */\n search?: {\n /** Search text expression. */\n expression?: string | null\n /** Whether to enable fuzzy matching. */\n fuzzy?: boolean | null\n /** Search mode: 'OR' (any term) or 'AND' (all terms). */\n mode?: 'OR' | 'AND' | null\n }\n /** Filter object. */\n filter?: Record<string, any>\n /** Sort array. */\n sort?: { fieldName: string; order?: 'ASC' | 'DESC' }[]\n /** Fields to return in results. */\n fields?: string[]\n /** Paging options. */\n paging?: { limit?: number; offset?: number }\n /** Cursor-based paging. */\n cursorPaging?: { cursor?: string; limit?: number }\n}\n\n/**\n * Options for direct search execution.\n * @internal\n */\nexport interface WixDataDirectSearchOptions\n extends WixDataReadOptions,\n IncludeReferencesOptions {}\n\nexport interface WixDataQueryReferencedOptions\n extends WixDataQueryOptions,\n ProjectionOptions {\n /**\n * Order of the returned referenced items. Sorted by the date each item was referenced.\n *\n * Default: `asc`\n */\n order?: 'asc' | 'desc'\n\n /**\n * Number of items to skip in the current sort order.\n *\n * Default: `0`\n */\n skip?: number\n\n /**\n * Number of items to load.\n *\n * Default: `50`\n */\n limit?: number\n}\n\ninterface ProjectionOptions {\n /**\n * Lists of fields to return in a result.\n */\n fields?: string[]\n}\n\nexport interface WixDataItem {\n /**\n * Data item ID.\n */\n _id: string\n\n /**\n * Date and time the item was added to the collection.\n * @readonly\n */\n _createdDate?: Date\n\n /**\n * Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have\n * the same value.\n * @readonly\n */\n _updatedDate?: Date\n\n /**\n * ID of the user who created the item. Can be modified with site owner permissions.\n */\n _owner?: string\n\n /**\n * Data item contents.\n */\n [key: string]: any\n}\n\nexport type WixDataItemOrId = WixDataItem | string\nexport type Comparable = string | number | Date\n\nexport interface WixDataReference {\n relationshipName: string\n left: WixDataItemOrId\n right: WixDataItemOrId\n}\n\nexport interface Provider<T> {\n get(): T | Promise<T>\n}\n\nexport interface WixDataBulkError extends Error {\n /**\n * Description of the error.\n */\n message: string\n\n /**\n * Error code.\n */\n code: string\n\n /**\n * Index of the item within the request array. Allows for correlation between request and response items.\n */\n originalIndex: number\n\n /**\n * Failed item (or ID in case of `bulkRemove()`).\n */\n item: WixDataItem | string\n}\n\nexport interface WixDataBulkResult {\n /**\n * Number of inserted items.\n */\n inserted: number\n\n /**\n * Number of updated items.\n */\n updated: number\n\n /**\n * Number of removed items.\n */\n removed: number\n\n /**\n * Number of skipped items.\n */\n skipped: number\n\n /**\n * List of errors.\n */\n errors: WixDataBulkError[]\n\n /**\n * List of IDs of inserted items.\n */\n insertedItemIds: string[]\n\n /**\n * List of IDs of updated items.\n */\n updatedItemIds: string[]\n\n /**\n * List of IDs of removed items.\n */\n removedItemIds: string[]\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/api/types.ts"],"sourcesContent":["import type { QueryRequest as SDKQueryRequest, QuerySpec } from '@wix/sdk-types'\nimport type { SortOrder } from '../types/data-item-types'\nimport { WixDataFilter } from './WixDataFilter'\n\nexport interface BaseOptions {\n /**\n * Prevents hooks from running for the operation. Can only be used in the [backend code of a Wix site](https://dev.wix.com/docs/develop-websites/articles/coding-with-velo/backend-code/about-the-site-backend).\n *\n * Default: `false`.\n */\n suppressHooks?: boolean\n\n /**\n * When `true`, operations include draft items. Read operations include draft items in their response, and write operations modify draft items.\n *\n * Default: `false`.\n */\n showDrafts?: boolean\n}\n\nexport interface WithAppOptions {\n /**\n * Options for [querying Wix app collections](https://dev.wix.com/docs/develop-websites/articles/wix-apps/wix-app-collections/querying-wix-app-collections).\n */\n appOptions?: Record<string, any>\n}\n\n/**\n * Options for including referenced items in results.\n */\nexport interface IncludeReferencesOptions {\n /**\n * Reference fields to resolve in the results. When specified, the referenced items\n * are included in the response for the given fields.\n *\n * Each entry identifies a reference `field` by name and an optional `limit` that caps the number\n * of referenced items returned per queried item (relevant for multi-reference fields).\n */\n includeReferences?: { field: string; limit?: number }[]\n}\n\nexport interface WixDataRemoveOptions extends WixDataOptions {\n /**\n * If provided, item will be updated only if condition is met.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkPatchOptions extends WixDataOptions {\n /**\n * If provided, only items matching condition will be patched.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataOptions extends BaseOptions, WithAppOptions {}\n\nexport interface WixDataReadOptions extends WixDataOptions, WithAppOptions {\n /**\n * Language to translate result text into, in [IETF BCP 47 language tag](https://en.wikipedia.org/wiki/IETF_language_tag) format.\n * If provided, the result text is returned in the specified language. If not provided, the result text is not translated.\n *\n * > **Note:** Translation for the specified language must be enabled for the collection in [Wix Multilingual](https://www.wix.com/app-market/wix-multilingual).\n *\n */\n language?: string\n\n /**\n * When `true`, reads data from the primary database instance. This decreases performance but ensures data retrieved is\n * up-to-date even immediately after an update. Learn more about [Wix Data and eventual consistency](https://dev.wix.com/docs/sdk/backend-modules/data/eventual-consistency).\n */\n consistentRead?: boolean\n}\n\n/**\n * Options for standalone count queries.\n * @internal\n */\nexport interface WixDataCountOptions extends WixDataReadOptions {\n filter?: Record<string, any>\n}\n\nexport interface WixDataReadWithProjectionOptions\n extends WixDataReadOptions,\n ProjectionOptions,\n IncludeReferencesOptions {}\n\nexport interface WithIncludeFieldGroupsOption {\n /**\n * Requests conditional fields. Currently used in App Collections.\n * Please refer to app collection documentation for a list of valid values.\n */\n includeFieldGroups?: string[]\n}\n\nexport interface WixDataGetOptions\n extends WixDataReadWithProjectionOptions,\n WithIncludeFieldGroupsOption {}\n\nexport interface WixDataSaveOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n /** Whether to save references from the data item to other items in the collection. */\n saveReferences?: boolean\n}\n\nexport interface WixDataInsertOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n /** Whether to save references from the data item to other items in the collection. */\n saveReferences?: boolean\n}\n\nexport interface WixDataUpdateOptions extends WixDataOptions {\n /**\n * If true, referenced items are included.\n * @internal\n */\n includeReferences?: boolean\n /** Whether to save references from the data item to other items in the collection. */\n saveReferences?: boolean\n /**\n * If provided, item will be updated only if condition is met.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkUpdateOptions extends WixDataOptions {\n /** Whether to save references from the data items to other items in the collection. */\n saveReferences?: boolean\n /**\n * If provided, only items matching condition will be updated.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataBulkInsertOptions extends WixDataOptions {\n /** Whether to save references from the data items to other items in the collection. */\n saveReferences?: boolean\n}\n\nexport interface WixDataBulkSaveOptions extends WixDataOptions {\n /** Whether to save references from the data items to other items in the collection. */\n saveReferences?: boolean\n}\n\nexport interface WixDataBulkRemoveOptions extends WixDataOptions {\n /**\n * If provided, only items matching condition will be removed.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataAsyncByFilterOptions extends BaseOptions {}\n\nexport type WixDataFilterInput = WixDataFilter | Record<string, any>\n\nexport interface WixDataAsyncJob {\n /** Job ID for tracking the async operation. */\n jobId: string\n}\n\nexport type WixDataAsyncJobStatusValue =\n | 'UNKNOWN_STATUS'\n | 'INITIALIZED'\n | 'PROCESSING'\n | 'SUCCEEDED'\n | 'FAILED'\n\nexport interface WixDataAsyncJobStatus {\n /** Current status of the async operation. */\n status?: WixDataAsyncJobStatusValue\n /** Number of items successfully processed so far. */\n successCount?: number\n}\n\nexport interface WixDataPatchOptions extends BaseOptions {\n /**\n * If provided, item will be patched only if condition is met.\n */\n condition?: WixDataFilter\n}\n\nexport interface WixDataAggregateOptions extends WixDataQueryOptions {}\n\n/**\n * Options for standalone distinct field value queries.\n * @internal\n */\nexport interface WixDataDistinctOptions extends WixDataQueryOptions {\n filter?: Record<string, any>\n order?: SortOrder\n paging?: { limit?: number; offset?: number }\n cursorPaging?: { cursor?: string; limit?: number }\n}\n\n/**\n * WixData query specification.\n * Since WixData collections are dynamic, we allow any string field.\n * @internal\n */\nexport interface WixDataQuerySpec extends QuerySpec {\n wql: [\n {\n fields: string[]\n sort: 'BOTH'\n }\n ]\n paging: 'offset'\n}\n\n/**\n * Request object for direct query execution.\n * Extends the SDK's QueryRequest with WixData-specific fields.\n * Use this with `wixData.query(collectionName, queryRequest)` for one-shot queries.\n * @internal\n */\nexport interface WixDataQueryRequest\n extends Omit<SDKQueryRequest<WixDataItem, WixDataQuerySpec>, 'filter'> {\n /**\n * Filter object. Supports operators like `$eq`, `$ne`, `$lt`, `$lte`, `$gt`, `$gte`,\n * `$in`, `$hasSome`, `$hasAll`, `$startsWith`, `$contains`.\n *\n * Example:\n * ```js\n * { status: 'active', age: { $gt: 25 } }\n * ```\n */\n filter?: Record<string, any>\n\n /**\n * Cursor-based paging. Use this as an alternative to offset paging.\n *\n * Example:\n * ```js\n * { limit: 10, cursor: 'abc123' }\n * ```\n */\n cursorPaging?: {\n /** Maximum number of items to return. */\n limit?: number\n /** Cursor token pointing to a page of results. */\n cursor?: string\n }\n}\n\nexport interface WixDataQueryOptions extends WixDataReadOptions {\n /**\n * When `true`, the query results include a `totalCount` and `totalPages` properties containing the totals of items\n * matching query. Requesting total count slows down the query.\n *\n * Default: `false`\n */\n returnTotalCount?: boolean\n}\n\n/**\n * Options for direct query execution.\n * @internal\n */\nexport interface WixDataDirectQueryOptions\n extends WixDataQueryOptions,\n IncludeReferencesOptions {\n /**\n * Requests conditional fields. Currently used in App Collections.\n * Please refer to app collection documentation for a list of valid values.\n */\n includeFieldGroups?: string[]\n}\n\n/**\n * Request object for direct search execution.\n * Matches the shape produced by `SearchBuilder().build()` so it can be passed directly.\n * Use this with `wixData.search(collectionName, searchRequest)` for direct search execution.\n * @internal\n */\nexport interface WixDataSearchRequest {\n /** Search parameters. */\n search?: {\n /** Search text expression. */\n expression?: string | null\n /** Whether to enable fuzzy matching. */\n fuzzy?: boolean | null\n /** Search mode: 'OR' (any term) or 'AND' (all terms). */\n mode?: 'OR' | 'AND' | null\n }\n /** Filter object. */\n filter?: Record<string, any>\n /** Sort array. */\n sort?: { fieldName: string; order?: 'ASC' | 'DESC' }[]\n /** Fields to return in results. */\n fields?: string[]\n /** Paging options. */\n paging?: { limit?: number; offset?: number }\n /** Cursor-based paging. */\n cursorPaging?: { cursor?: string; limit?: number }\n}\n\n/**\n * Options for direct search execution.\n * @internal\n */\nexport interface WixDataDirectSearchOptions\n extends WixDataReadOptions,\n IncludeReferencesOptions {}\n\nexport interface WixDataQueryReferencedOptions\n extends WixDataQueryOptions,\n ProjectionOptions {\n /**\n * Order of the returned referenced items. Sorted by the date each item was referenced.\n *\n * Default: `asc`\n */\n order?: 'asc' | 'desc'\n\n /**\n * Number of items to skip in the current sort order.\n *\n * Default: `0`\n */\n skip?: number\n\n /**\n * Number of items to load.\n *\n * Default: `50`\n */\n limit?: number\n}\n\ninterface ProjectionOptions {\n /**\n * Lists of fields to return in a result.\n */\n fields?: string[]\n}\n\nexport interface WixDataItem {\n /**\n * Data item ID.\n */\n _id: string\n\n /**\n * Date and time the item was added to the collection.\n * @readonly\n */\n _createdDate?: Date\n\n /**\n * Date and time the item was last modified. When the item is first inserted, `_createdDate` and `_updatedDate` have\n * the same value.\n * @readonly\n */\n _updatedDate?: Date\n\n /**\n * ID of the user who created the item. Can be modified with site owner permissions.\n */\n _owner?: string\n\n /**\n * Data item contents.\n */\n [key: string]: any\n}\n\nexport type WixDataItemOrId = WixDataItem | string\nexport type Comparable = string | number | Date\n\nexport interface WixDataReference {\n relationshipName: string\n left: WixDataItemOrId\n right: WixDataItemOrId\n}\n\nexport interface Provider<T> {\n get(): T | Promise<T>\n}\n\nexport interface WixDataBulkError extends Error {\n /**\n * Description of the error.\n */\n message: string\n\n /**\n * Error code.\n */\n code: string\n\n /**\n * Index of the item within the request array. Allows for correlation between request and response items.\n */\n originalIndex: number\n\n /**\n * Failed item (or ID in case of `bulkRemove()`).\n */\n item: WixDataItem | string\n}\n\nexport interface WixDataBulkResult {\n /**\n * Number of inserted items.\n */\n inserted: number\n\n /**\n * Number of updated items.\n */\n updated: number\n\n /**\n * Number of removed items.\n */\n removed: number\n\n /**\n * Number of skipped items.\n */\n skipped: number\n\n /**\n * List of errors.\n */\n errors: WixDataBulkError[]\n\n /**\n * List of IDs of inserted items.\n */\n insertedItemIds: string[]\n\n /**\n * List of IDs of updated items.\n */\n updatedItemIds: string[]\n\n /**\n * List of IDs of removed items.\n */\n removedItemIds: string[]\n}\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/types/api.ts"],"sourcesContent":["import {\n AggregateDataItemsRequest,\n AggregateDataItemsResponse,\n AggregatePipelineDataItemsRequest,\n AggregatePipelineDataItemsResponse,\n BulkInsertDataItemReferencesRequest,\n BulkInsertDataItemReferencesResponse,\n BulkInsertDataItemsRequest,\n BulkInsertDataItemsResponse,\n BulkPatchDataItemsRequest,\n BulkPatchDataItemsResponse,\n BulkRemoveDataItemReferencesRequest,\n BulkRemoveDataItemReferencesResponse,\n BulkRemoveDataItemsRequest,\n BulkRemoveDataItemsResponse,\n BulkSaveDataItemsRequest,\n BulkSaveDataItemsResponse,\n BulkUpdateDataItemsRequest,\n BulkUpdateDataItemsResponse,\n CountDataItemsRequest,\n CountDataItemsResponse,\n GetDataItemRequest,\n GetDataItemResponse,\n InsertDataItemRequest,\n InsertDataItemResponse,\n IsReferencedDataItemRequest,\n IsReferencedDataItemResponse,\n PatchDataItemRequest,\n PatchDataItemResponse,\n QueryDataItemsRequest,\n QueryDataItemsResponse,\n QueryDistinctValuesRequest,\n QueryDistinctValuesResponse,\n QueryReferencedDataItemsRequest,\n QueryReferencedDataItemsResponse,\n RemoveDataItemRequest,\n RemoveDataItemResponse,\n ReplaceDataItemReferencesRequest,\n ReplaceDataItemReferencesResponse,\n SaveDataItemRequest,\n SaveDataItemResponse,\n SearchDataItemsRequest,\n SearchDataItemsResponse,\n TruncateDataItemsRequest,\n TruncateDataItemsResponse,\n UpdateDataItemRequest,\n UpdateDataItemResponse,\n} from './data-item-types'\n\nexport interface HttpApiClient {\n getDataItem(r: GetDataItemRequest): Promise<HttpResponse<GetDataItemResponse>>\n\n insertDataItem(\n r: InsertDataItemRequest\n ): Promise<HttpResponse<InsertDataItemResponse>>\n\n saveDataItem(\n r: SaveDataItemRequest\n ): Promise<HttpResponse<SaveDataItemResponse>>\n\n updateDataItem(\n r: UpdateDataItemRequest\n ): Promise<HttpResponse<UpdateDataItemResponse>>\n\n patchDataItem(\n r: PatchDataItemRequest\n ): Promise<HttpResponse<PatchDataItemResponse>>\n\n removeDataItem(\n r: RemoveDataItemRequest\n ): Promise<HttpResponse<RemoveDataItemResponse>>\n\n countDataItems(\n r: CountDataItemsRequest\n ): Promise<HttpResponse<CountDataItemsResponse>>\n\n queryDistinctValues(\n r: QueryDistinctValuesRequest\n ): Promise<HttpResponse<QueryDistinctValuesResponse>>\n\n queryDataItems(\n r: QueryDataItemsRequest\n ): Promise<HttpResponse<QueryDataItemsResponse>>\n\n aggregateDataItems(\n r: AggregateDataItemsRequest\n ): Promise<HttpResponse<AggregateDataItemsResponse>>\n\n aggregatePipelineDataItems(\n r: AggregatePipelineDataItemsRequest\n ): Promise<HttpResponse<AggregatePipelineDataItemsResponse>>\n\n bulkInsertDataItems(\n r: BulkInsertDataItemsRequest\n ): Promise<HttpResponse<BulkInsertDataItemsResponse>>\n\n bulkUpdateDataItems(\n r: BulkUpdateDataItemsRequest\n ): Promise<HttpResponse<BulkUpdateDataItemsResponse>>\n\n bulkPatchDataItems(\n r: BulkPatchDataItemsRequest\n ): Promise<HttpResponse<BulkPatchDataItemsResponse>>\n\n bulkSaveDataItems(\n r: BulkSaveDataItemsRequest\n ): Promise<HttpResponse<BulkSaveDataItemsResponse>>\n\n bulkRemoveDataItems(\n r: BulkRemoveDataItemsRequest\n ): Promise<HttpResponse<BulkRemoveDataItemsResponse>>\n\n queryReferencedDataItems(\n r: QueryReferencedDataItemsRequest\n ): Promise<HttpResponse<QueryReferencedDataItemsResponse>>\n\n bulkInsertDataItemReferences(\n r: BulkInsertDataItemReferencesRequest\n ): Promise<HttpResponse<BulkInsertDataItemReferencesResponse>>\n\n replaceDataItemReferences(\n r: ReplaceDataItemReferencesRequest\n ): Promise<HttpResponse<ReplaceDataItemReferencesResponse>>\n\n bulkRemoveDataItemReferences(\n r: BulkRemoveDataItemReferencesRequest\n ): Promise<HttpResponse<BulkRemoveDataItemReferencesResponse>>\n\n isReferencedDataItem(\n r: IsReferencedDataItemRequest\n ): Promise<HttpResponse<IsReferencedDataItemResponse>>\n\n truncateDataItems(\n r: TruncateDataItemsRequest\n ): Promise<HttpResponse<TruncateDataItemsResponse>>\n\n searchDataItems(\n r: SearchDataItemsRequest\n ): Promise<HttpResponse<SearchDataItemsResponse>>\n}\n\nexport interface HttpResponse<T> {\n data: T\n}\n\nexport interface Request {\n data?: any\n url?: string\n methodFqn?: string\n method?: string\n}\n\nexport type RequestInterceptor<R extends Request> = (req: R) => R\n\nexport type HttpApiClientFactory<R extends Request> = (\n requestInterceptor: RequestInterceptor<R>\n) => HttpApiClient\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/types/api.ts"],"sourcesContent":["import {\n AggregateDataItemsRequest,\n AggregateDataItemsResponse,\n AggregatePipelineDataItemsRequest,\n AggregatePipelineDataItemsResponse,\n AsyncPatchDataItemsByFilterRequest,\n AsyncPatchDataItemsByFilterResponse,\n AsyncRemoveDataItemsByFilterRequest,\n AsyncRemoveDataItemsByFilterResponse,\n BulkInsertDataItemReferencesRequest,\n BulkInsertDataItemReferencesResponse,\n BulkInsertDataItemsRequest,\n BulkInsertDataItemsResponse,\n BulkPatchDataItemsRequest,\n BulkPatchDataItemsResponse,\n BulkRemoveDataItemReferencesRequest,\n BulkRemoveDataItemReferencesResponse,\n BulkRemoveDataItemsRequest,\n BulkRemoveDataItemsResponse,\n BulkSaveDataItemsRequest,\n BulkSaveDataItemsResponse,\n BulkUpdateDataItemsRequest,\n BulkUpdateDataItemsResponse,\n CountDataItemsRequest,\n CountDataItemsResponse,\n GetAsyncJobStatusRequest,\n GetAsyncJobStatusResponse,\n GetDataItemRequest,\n GetDataItemResponse,\n InsertDataItemRequest,\n InsertDataItemResponse,\n IsReferencedDataItemRequest,\n IsReferencedDataItemResponse,\n PatchDataItemRequest,\n PatchDataItemResponse,\n QueryDataItemsRequest,\n QueryDataItemsResponse,\n QueryDistinctValuesRequest,\n QueryDistinctValuesResponse,\n QueryReferencedDataItemsRequest,\n QueryReferencedDataItemsResponse,\n RemoveDataItemRequest,\n RemoveDataItemResponse,\n ReplaceDataItemReferencesRequest,\n ReplaceDataItemReferencesResponse,\n SaveDataItemRequest,\n SaveDataItemResponse,\n SearchDataItemsRequest,\n SearchDataItemsResponse,\n TruncateDataItemsRequest,\n TruncateDataItemsResponse,\n UpdateDataItemRequest,\n UpdateDataItemResponse,\n} from './data-item-types'\n\nexport interface HttpApiClient {\n getDataItem(r: GetDataItemRequest): Promise<HttpResponse<GetDataItemResponse>>\n\n insertDataItem(\n r: InsertDataItemRequest\n ): Promise<HttpResponse<InsertDataItemResponse>>\n\n saveDataItem(\n r: SaveDataItemRequest\n ): Promise<HttpResponse<SaveDataItemResponse>>\n\n updateDataItem(\n r: UpdateDataItemRequest\n ): Promise<HttpResponse<UpdateDataItemResponse>>\n\n patchDataItem(\n r: PatchDataItemRequest\n ): Promise<HttpResponse<PatchDataItemResponse>>\n\n removeDataItem(\n r: RemoveDataItemRequest\n ): Promise<HttpResponse<RemoveDataItemResponse>>\n\n countDataItems(\n r: CountDataItemsRequest\n ): Promise<HttpResponse<CountDataItemsResponse>>\n\n queryDistinctValues(\n r: QueryDistinctValuesRequest\n ): Promise<HttpResponse<QueryDistinctValuesResponse>>\n\n queryDataItems(\n r: QueryDataItemsRequest\n ): Promise<HttpResponse<QueryDataItemsResponse>>\n\n aggregateDataItems(\n r: AggregateDataItemsRequest\n ): Promise<HttpResponse<AggregateDataItemsResponse>>\n\n aggregatePipelineDataItems(\n r: AggregatePipelineDataItemsRequest\n ): Promise<HttpResponse<AggregatePipelineDataItemsResponse>>\n\n bulkInsertDataItems(\n r: BulkInsertDataItemsRequest\n ): Promise<HttpResponse<BulkInsertDataItemsResponse>>\n\n bulkUpdateDataItems(\n r: BulkUpdateDataItemsRequest\n ): Promise<HttpResponse<BulkUpdateDataItemsResponse>>\n\n bulkPatchDataItems(\n r: BulkPatchDataItemsRequest\n ): Promise<HttpResponse<BulkPatchDataItemsResponse>>\n\n asyncPatchDataItemsByFilter(\n r: AsyncPatchDataItemsByFilterRequest\n ): Promise<HttpResponse<AsyncPatchDataItemsByFilterResponse>>\n\n bulkSaveDataItems(\n r: BulkSaveDataItemsRequest\n ): Promise<HttpResponse<BulkSaveDataItemsResponse>>\n\n bulkRemoveDataItems(\n r: BulkRemoveDataItemsRequest\n ): Promise<HttpResponse<BulkRemoveDataItemsResponse>>\n\n asyncRemoveDataItemsByFilter(\n r: AsyncRemoveDataItemsByFilterRequest\n ): Promise<HttpResponse<AsyncRemoveDataItemsByFilterResponse>>\n\n getAsyncJobStatus(\n r: GetAsyncJobStatusRequest\n ): Promise<HttpResponse<GetAsyncJobStatusResponse>>\n\n queryReferencedDataItems(\n r: QueryReferencedDataItemsRequest\n ): Promise<HttpResponse<QueryReferencedDataItemsResponse>>\n\n bulkInsertDataItemReferences(\n r: BulkInsertDataItemReferencesRequest\n ): Promise<HttpResponse<BulkInsertDataItemReferencesResponse>>\n\n replaceDataItemReferences(\n r: ReplaceDataItemReferencesRequest\n ): Promise<HttpResponse<ReplaceDataItemReferencesResponse>>\n\n bulkRemoveDataItemReferences(\n r: BulkRemoveDataItemReferencesRequest\n ): Promise<HttpResponse<BulkRemoveDataItemReferencesResponse>>\n\n isReferencedDataItem(\n r: IsReferencedDataItemRequest\n ): Promise<HttpResponse<IsReferencedDataItemResponse>>\n\n truncateDataItems(\n r: TruncateDataItemsRequest\n ): Promise<HttpResponse<TruncateDataItemsResponse>>\n\n searchDataItems(\n r: SearchDataItemsRequest\n ): Promise<HttpResponse<SearchDataItemsResponse>>\n}\n\nexport interface HttpResponse<T> {\n data: T\n}\n\nexport interface Request {\n data?: any\n url?: string\n methodFqn?: string\n method?: string\n}\n\nexport type RequestInterceptor<R extends Request> = (req: R) => R\n\nexport type HttpApiClientFactory<R extends Request> = (\n requestInterceptor: RequestInterceptor<R>\n) => HttpApiClient\n"],"mappings":"","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.SortOrder = exports.SortMode = exports.Mode = exports.Environment = exports.BulkActionType = exports.Action = exports.ACTION = void 0;
4
+ exports.SortOrder = exports.SortMode = exports.Mode = exports.Environment = exports.BulkActionType = exports.AsyncJobStatus = exports.Action = exports.ACTION = void 0;
5
5
  let Environment = exports.Environment = /*#__PURE__*/function (Environment) {
6
6
  Environment["LIVE"] = "LIVE";
7
7
  Environment["SANDBOX"] = "SANDBOX";
@@ -51,6 +51,14 @@ let SortMode = exports.SortMode = /*#__PURE__*/function (SortMode) {
51
51
  /** @oneof */
52
52
  /** @oneof */
53
53
  /** @oneof */
54
+ let AsyncJobStatus = exports.AsyncJobStatus = /*#__PURE__*/function (AsyncJobStatus) {
55
+ AsyncJobStatus["UNKNOWN_STATUS"] = "UNKNOWN_STATUS";
56
+ AsyncJobStatus["INITIALIZED"] = "INITIALIZED";
57
+ AsyncJobStatus["PROCESSING"] = "PROCESSING";
58
+ AsyncJobStatus["SUCCEEDED"] = "SUCCEEDED";
59
+ AsyncJobStatus["FAILED"] = "FAILED";
60
+ return AsyncJobStatus;
61
+ }({});
54
62
  /** @oneof */
55
63
  /** @oneof */
56
64
  /** @oneof */