@webiny/api-headless-cms-ddb 6.4.5-beta.0 → 6.6.0-alpha.0

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 (228) hide show
  1. package/abstractions/CmsDdbDataLoaders.d.ts +5 -0
  2. package/abstractions/CmsDdbDataLoaders.js +5 -0
  3. package/abstractions/CmsDdbDataLoaders.js.map +1 -0
  4. package/abstractions/CmsDdbEntryEntity.d.ts +5 -0
  5. package/abstractions/CmsDdbEntryEntity.js +5 -0
  6. package/abstractions/CmsDdbEntryEntity.js.map +1 -0
  7. package/abstractions/CmsDdbGroupEntity.d.ts +5 -0
  8. package/abstractions/CmsDdbGroupEntity.js +5 -0
  9. package/abstractions/CmsDdbGroupEntity.js.map +1 -0
  10. package/abstractions/CmsDdbModelEntity.d.ts +5 -0
  11. package/abstractions/CmsDdbModelEntity.js +5 -0
  12. package/abstractions/CmsDdbModelEntity.js.map +1 -0
  13. package/abstractions/CmsDdbTable.d.ts +5 -0
  14. package/abstractions/CmsDdbTable.js +5 -0
  15. package/abstractions/CmsDdbTable.js.map +1 -0
  16. package/index.d.ts +13 -2
  17. package/index.js +31 -71
  18. package/index.js.map +1 -1
  19. package/operations/entry/DdbCreateEntry.d.ts +16 -0
  20. package/operations/entry/DdbCreateEntry.js +77 -0
  21. package/operations/entry/DdbCreateEntry.js.map +1 -0
  22. package/operations/entry/DdbCreateEntryRevisionFrom.d.ts +16 -0
  23. package/operations/entry/DdbCreateEntryRevisionFrom.js +85 -0
  24. package/operations/entry/DdbCreateEntryRevisionFrom.js.map +1 -0
  25. package/operations/entry/DdbDeleteEntry.d.ts +16 -0
  26. package/operations/entry/DdbDeleteEntry.js +65 -0
  27. package/operations/entry/DdbDeleteEntry.js.map +1 -0
  28. package/operations/entry/DdbDeleteEntryRevision.d.ts +17 -0
  29. package/operations/entry/DdbDeleteEntryRevision.js +91 -0
  30. package/operations/entry/DdbDeleteEntryRevision.js.map +1 -0
  31. package/operations/entry/DdbDeleteMultipleEntries.d.ts +16 -0
  32. package/operations/entry/DdbDeleteMultipleEntries.js +56 -0
  33. package/operations/entry/DdbDeleteMultipleEntries.js.map +1 -0
  34. package/operations/entry/DdbGetEntriesByIds.d.ts +14 -0
  35. package/operations/entry/DdbGetEntriesByIds.js +31 -0
  36. package/operations/entry/DdbGetEntriesByIds.js.map +1 -0
  37. package/operations/entry/DdbGetEntry.d.ts +14 -0
  38. package/operations/entry/DdbGetEntry.js +27 -0
  39. package/operations/entry/DdbGetEntry.js.map +1 -0
  40. package/operations/entry/DdbGetLatestEntriesByIds.d.ts +14 -0
  41. package/operations/entry/DdbGetLatestEntriesByIds.js +31 -0
  42. package/operations/entry/DdbGetLatestEntriesByIds.js.map +1 -0
  43. package/operations/entry/DdbGetLatestRevisionByEntryId.d.ts +14 -0
  44. package/operations/entry/DdbGetLatestRevisionByEntryId.js +35 -0
  45. package/operations/entry/DdbGetLatestRevisionByEntryId.js.map +1 -0
  46. package/operations/entry/DdbGetPreviousRevision.d.ts +14 -0
  47. package/operations/entry/DdbGetPreviousRevision.js +53 -0
  48. package/operations/entry/DdbGetPreviousRevision.js.map +1 -0
  49. package/operations/entry/DdbGetPublishedEntriesByIds.d.ts +14 -0
  50. package/operations/entry/DdbGetPublishedEntriesByIds.js +31 -0
  51. package/operations/entry/DdbGetPublishedEntriesByIds.js.map +1 -0
  52. package/operations/entry/DdbGetPublishedRevisionByEntryId.d.ts +14 -0
  53. package/operations/entry/DdbGetPublishedRevisionByEntryId.js +35 -0
  54. package/operations/entry/DdbGetPublishedRevisionByEntryId.js.map +1 -0
  55. package/operations/entry/DdbGetRevisionById.d.ts +14 -0
  56. package/operations/entry/DdbGetRevisionById.js +34 -0
  57. package/operations/entry/DdbGetRevisionById.js.map +1 -0
  58. package/operations/entry/DdbGetRevisions.d.ts +14 -0
  59. package/operations/entry/DdbGetRevisions.js +33 -0
  60. package/operations/entry/DdbGetRevisions.js.map +1 -0
  61. package/operations/entry/DdbGetUniqueFieldValues.d.ts +12 -0
  62. package/operations/entry/DdbGetUniqueFieldValues.js +31 -0
  63. package/operations/entry/DdbGetUniqueFieldValues.js.map +1 -0
  64. package/operations/entry/DdbListEntries.d.ts +28 -0
  65. package/operations/entry/DdbListEntries.js +124 -0
  66. package/operations/entry/DdbListEntries.js.map +1 -0
  67. package/operations/entry/DdbMoveEntry.d.ts +14 -0
  68. package/operations/entry/DdbMoveEntry.js +57 -0
  69. package/operations/entry/DdbMoveEntry.js.map +1 -0
  70. package/operations/entry/DdbMoveToBin.d.ts +16 -0
  71. package/operations/entry/DdbMoveToBin.js +77 -0
  72. package/operations/entry/DdbMoveToBin.js.map +1 -0
  73. package/operations/entry/DdbPublishEntry.d.ts +18 -0
  74. package/operations/entry/DdbPublishEntry.js +161 -0
  75. package/operations/entry/DdbPublishEntry.js.map +1 -0
  76. package/operations/entry/DdbRestoreFromBin.d.ts +16 -0
  77. package/operations/entry/DdbRestoreFromBin.js +78 -0
  78. package/operations/entry/DdbRestoreFromBin.js.map +1 -0
  79. package/operations/entry/DdbUnpublishEntry.d.ts +17 -0
  80. package/operations/entry/DdbUnpublishEntry.js +112 -0
  81. package/operations/entry/DdbUnpublishEntry.js.map +1 -0
  82. package/operations/entry/DdbUpdateEntry.d.ts +17 -0
  83. package/operations/entry/DdbUpdateEntry.js +110 -0
  84. package/operations/entry/DdbUpdateEntry.js.map +1 -0
  85. package/operations/entry/dataLoaders.d.ts +7 -6
  86. package/operations/entry/dataLoaders.js +11 -3
  87. package/operations/entry/dataLoaders.js.map +1 -1
  88. package/operations/entry/feature.d.ts +4 -0
  89. package/operations/entry/feature.js +55 -0
  90. package/operations/entry/feature.js.map +1 -0
  91. package/operations/entry/storageEntryUtils.d.ts +8 -0
  92. package/operations/entry/storageEntryUtils.js +25 -0
  93. package/operations/entry/storageEntryUtils.js.map +1 -0
  94. package/operations/group/DdbCreateGroup.d.ts +12 -0
  95. package/operations/group/DdbCreateGroup.js +35 -0
  96. package/operations/group/DdbCreateGroup.js.map +1 -0
  97. package/operations/group/DdbDeleteGroup.d.ts +12 -0
  98. package/operations/group/DdbDeleteGroup.js +31 -0
  99. package/operations/group/DdbDeleteGroup.js.map +1 -0
  100. package/operations/group/DdbGetGroup.d.ts +12 -0
  101. package/operations/group/DdbGetGroup.js +31 -0
  102. package/operations/group/DdbGetGroup.js.map +1 -0
  103. package/operations/group/DdbListGroups.d.ts +14 -0
  104. package/operations/group/DdbListGroups.js +52 -0
  105. package/operations/group/DdbListGroups.js.map +1 -0
  106. package/operations/group/DdbUpdateGroup.d.ts +12 -0
  107. package/operations/group/DdbUpdateGroup.js +35 -0
  108. package/operations/group/DdbUpdateGroup.js.map +1 -0
  109. package/operations/group/feature.d.ts +4 -0
  110. package/operations/group/feature.js +19 -0
  111. package/operations/group/feature.js.map +1 -0
  112. package/operations/group/keys.d.ts +15 -0
  113. package/operations/group/keys.js +17 -0
  114. package/operations/group/keys.js.map +1 -0
  115. package/operations/model/DdbCreateModel.d.ts +12 -0
  116. package/operations/model/DdbCreateModel.js +37 -0
  117. package/operations/model/DdbCreateModel.js.map +1 -0
  118. package/operations/model/DdbDeleteModel.d.ts +12 -0
  119. package/operations/model/DdbDeleteModel.js +31 -0
  120. package/operations/model/DdbDeleteModel.js.map +1 -0
  121. package/operations/model/DdbGetModel.d.ts +12 -0
  122. package/operations/model/DdbGetModel.js +30 -0
  123. package/operations/model/DdbGetModel.js.map +1 -0
  124. package/operations/model/DdbListModels.d.ts +12 -0
  125. package/operations/model/DdbListModels.js +36 -0
  126. package/operations/model/DdbListModels.js.map +1 -0
  127. package/operations/model/DdbUpdateModel.d.ts +12 -0
  128. package/operations/model/DdbUpdateModel.js +36 -0
  129. package/operations/model/DdbUpdateModel.js.map +1 -0
  130. package/operations/model/feature.d.ts +4 -0
  131. package/operations/model/feature.js +19 -0
  132. package/operations/model/feature.js.map +1 -0
  133. package/operations/model/keys.d.ts +15 -0
  134. package/operations/model/keys.js +16 -0
  135. package/operations/model/keys.js.map +1 -0
  136. package/package.json +15 -17
  137. package/types.d.ts +9 -49
  138. package/types.js.map +1 -1
  139. package/dynamoDb/index.d.ts +0 -2
  140. package/dynamoDb/index.js +0 -11
  141. package/dynamoDb/index.js.map +0 -1
  142. package/dynamoDb/path/locationFolderId.d.ts +0 -2
  143. package/dynamoDb/path/locationFolderId.js +0 -21
  144. package/dynamoDb/path/locationFolderId.js.map +0 -1
  145. package/dynamoDb/path/plainObject.d.ts +0 -2
  146. package/dynamoDb/path/plainObject.js +0 -16
  147. package/dynamoDb/path/plainObject.js.map +0 -1
  148. package/dynamoDb/transformValue/datetime.d.ts +0 -5
  149. package/dynamoDb/transformValue/datetime.js +0 -29
  150. package/dynamoDb/transformValue/datetime.js.map +0 -1
  151. package/operations/entry/filtering/createExpressions.d.ts +0 -27
  152. package/operations/entry/filtering/createExpressions.js +0 -124
  153. package/operations/entry/filtering/createExpressions.js.map +0 -1
  154. package/operations/entry/filtering/createFields.d.ts +0 -16
  155. package/operations/entry/filtering/createFields.js +0 -93
  156. package/operations/entry/filtering/createFields.js.map +0 -1
  157. package/operations/entry/filtering/extractSort.d.ts +0 -17
  158. package/operations/entry/filtering/extractSort.js +0 -60
  159. package/operations/entry/filtering/extractSort.js.map +0 -1
  160. package/operations/entry/filtering/filter.d.ts +0 -16
  161. package/operations/entry/filtering/filter.js +0 -85
  162. package/operations/entry/filtering/filter.js.map +0 -1
  163. package/operations/entry/filtering/fullTextSearch.d.ts +0 -14
  164. package/operations/entry/filtering/fullTextSearch.js +0 -25
  165. package/operations/entry/filtering/fullTextSearch.js.map +0 -1
  166. package/operations/entry/filtering/getValue.d.ts +0 -5
  167. package/operations/entry/filtering/getValue.js +0 -37
  168. package/operations/entry/filtering/getValue.js.map +0 -1
  169. package/operations/entry/filtering/index.d.ts +0 -2
  170. package/operations/entry/filtering/index.js +0 -2
  171. package/operations/entry/filtering/mapPlugins.d.ts +0 -8
  172. package/operations/entry/filtering/mapPlugins.js +0 -18
  173. package/operations/entry/filtering/mapPlugins.js.map +0 -1
  174. package/operations/entry/filtering/plugins/defaultFilterCreate.d.ts +0 -2
  175. package/operations/entry/filtering/plugins/defaultFilterCreate.js +0 -33
  176. package/operations/entry/filtering/plugins/defaultFilterCreate.js.map +0 -1
  177. package/operations/entry/filtering/plugins/index.d.ts +0 -1
  178. package/operations/entry/filtering/plugins/index.js +0 -13
  179. package/operations/entry/filtering/plugins/index.js.map +0 -1
  180. package/operations/entry/filtering/plugins/objectFilterCreate.d.ts +0 -2
  181. package/operations/entry/filtering/plugins/objectFilterCreate.js +0 -68
  182. package/operations/entry/filtering/plugins/objectFilterCreate.js.map +0 -1
  183. package/operations/entry/filtering/plugins/refFilterCreate.d.ts +0 -3
  184. package/operations/entry/filtering/plugins/refFilterCreate.js +0 -63
  185. package/operations/entry/filtering/plugins/refFilterCreate.js.map +0 -1
  186. package/operations/entry/filtering/plugins/searchableJsonFilterCreate.d.ts +0 -2
  187. package/operations/entry/filtering/plugins/searchableJsonFilterCreate.js +0 -56
  188. package/operations/entry/filtering/plugins/searchableJsonFilterCreate.js.map +0 -1
  189. package/operations/entry/filtering/sort.d.ts +0 -12
  190. package/operations/entry/filtering/sort.js +0 -41
  191. package/operations/entry/filtering/sort.js.map +0 -1
  192. package/operations/entry/filtering/systemFields.d.ts +0 -2
  193. package/operations/entry/filtering/systemFields.js +0 -149
  194. package/operations/entry/filtering/systemFields.js.map +0 -1
  195. package/operations/entry/filtering/transform.d.ts +0 -6
  196. package/operations/entry/filtering/transform.js +0 -7
  197. package/operations/entry/filtering/transform.js.map +0 -1
  198. package/operations/entry/filtering/types.d.ts +0 -40
  199. package/operations/entry/filtering/types.js +0 -0
  200. package/operations/entry/filtering/values.d.ts +0 -2
  201. package/operations/entry/filtering/values.js +0 -15
  202. package/operations/entry/filtering/values.js.map +0 -1
  203. package/operations/entry/filtering/where.d.ts +0 -5
  204. package/operations/entry/filtering/where.js +0 -22
  205. package/operations/entry/filtering/where.js.map +0 -1
  206. package/operations/entry/index.d.ts +0 -9
  207. package/operations/entry/index.js +0 -943
  208. package/operations/entry/index.js.map +0 -1
  209. package/operations/group/index.d.ts +0 -8
  210. package/operations/group/index.js +0 -121
  211. package/operations/group/index.js.map +0 -1
  212. package/operations/model/index.d.ts +0 -7
  213. package/operations/model/index.js +0 -106
  214. package/operations/model/index.js.map +0 -1
  215. package/plugins/CmsEntryFieldFilterPathPlugin.d.ts +0 -23
  216. package/plugins/CmsEntryFieldFilterPathPlugin.js +0 -30
  217. package/plugins/CmsEntryFieldFilterPathPlugin.js.map +0 -1
  218. package/plugins/CmsEntryFieldFilterPlugin.d.ts +0 -43
  219. package/plugins/CmsEntryFieldFilterPlugin.js +0 -20
  220. package/plugins/CmsEntryFieldFilterPlugin.js.map +0 -1
  221. package/plugins/CmsEntryFieldSortingPlugin.d.ts +0 -42
  222. package/plugins/CmsEntryFieldSortingPlugin.js +0 -20
  223. package/plugins/CmsEntryFieldSortingPlugin.js.map +0 -1
  224. package/plugins/CmsFieldFilterValueTransformPlugin.d.ts +0 -11
  225. package/plugins/CmsFieldFilterValueTransformPlugin.js +0 -19
  226. package/plugins/CmsFieldFilterValueTransformPlugin.js.map +0 -1
  227. package/plugins/index.d.ts +0 -4
  228. package/plugins/index.js +0 -4
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations/entry/filtering/values.js","sources":["../../../../src/operations/entry/filtering/values.ts"],"sourcesContent":["import type { CmsEntryListWhere } from \"@webiny/api-headless-cms/types/index.js\";\nimport WebinyError from \"@webiny/error\";\n\nexport const getWhereValues = (value: unknown, condition: \"AND\" | \"OR\") => {\n const values = value as CmsEntryListWhere[] | undefined;\n if (!Array.isArray(values)) {\n throw new WebinyError(\n `Trying to run filtering with \"${condition}\", but the value sent is not an array.`,\n `MALFORMED_${condition}_CONDITION`,\n {\n value\n }\n );\n } else if (values.length === 0) {\n throw new WebinyError(\n `Trying to run filtering with \"${condition}\", but the value sent is empty array.`,\n `MALFORMED_${condition}_CONDITION`,\n {\n value\n }\n );\n }\n return values;\n};\n"],"names":["getWhereValues","value","condition","values","Array","WebinyError"],"mappings":";AAGO,MAAMA,iBAAiB,CAACC,OAAgBC;IAC3C,MAAMC,SAASF;IACf,IAAKG,MAAM,OAAO,CAACD,SAQZ;QAAA,IAAIA,AAAkB,MAAlBA,OAAO,MAAM,EACpB,MAAM,IAAIE,MACN,CAAC,8BAA8B,EAAEH,UAAU,qCAAqC,CAAC,EACjF,CAAC,UAAU,EAAEA,UAAU,UAAU,CAAC,EAClC;YACID;QACJ;IAER,OAfI,MAAM,IAAII,MACN,CAAC,8BAA8B,EAAEH,UAAU,sCAAsC,CAAC,EAClF,CAAC,UAAU,EAAEA,UAAU,UAAU,CAAC,EAClC;QACID;IACJ;IAWR,OAAOE;AACX"}
@@ -1,5 +0,0 @@
1
- export declare const extractWhereParams: (key: string) => {
2
- fieldId: string;
3
- operation: string;
4
- negate: boolean;
5
- } | null;
@@ -1,22 +0,0 @@
1
- const extractWhereParams = (key)=>{
2
- const isWbyAco = null !== key.match("wbyAco_");
3
- const result = key.replace("wbyAco_", "").split("_");
4
- const fieldId = result.shift();
5
- if (!fieldId) return null;
6
- const rawOp = 0 === result.length ? "eq" : result.join("_");
7
- if ("not" === rawOp) return {
8
- fieldId,
9
- operation: "eq",
10
- negate: true
11
- };
12
- const negate = null !== rawOp.match("not_");
13
- const operation = rawOp.replace("not_", "");
14
- return {
15
- fieldId: isWbyAco ? `wbyAco_${fieldId}` : fieldId,
16
- operation,
17
- negate
18
- };
19
- };
20
- export { extractWhereParams };
21
-
22
- //# sourceMappingURL=where.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"operations/entry/filtering/where.js","sources":["../../../../src/operations/entry/filtering/where.ts"],"sourcesContent":["export const extractWhereParams = (key: string) => {\n const isWbyAco = key.match(\"wbyAco_\") !== null;\n const result = key.replace(\"wbyAco_\", \"\").split(\"_\");\n const fieldId = result.shift();\n if (!fieldId) {\n return null;\n }\n const rawOp = result.length === 0 ? \"eq\" : result.join(\"_\");\n /**\n * When rawOp is not, it means it is equal negated so just return that.\n */\n if (rawOp === \"not\") {\n return {\n fieldId,\n operation: \"eq\",\n negate: true\n };\n }\n const negate = rawOp.match(\"not_\") !== null;\n const operation = rawOp.replace(\"not_\", \"\");\n return {\n fieldId: isWbyAco ? `wbyAco_${fieldId}` : fieldId,\n operation,\n negate\n };\n};\n"],"names":["extractWhereParams","key","isWbyAco","result","fieldId","rawOp","negate","operation"],"mappings":"AAAO,MAAMA,qBAAqB,CAACC;IAC/B,MAAMC,WAAWD,AAAyB,SAAzBA,IAAI,KAAK,CAAC;IAC3B,MAAME,SAASF,IAAI,OAAO,CAAC,WAAW,IAAI,KAAK,CAAC;IAChD,MAAMG,UAAUD,OAAO,KAAK;IAC5B,IAAI,CAACC,SACD,OAAO;IAEX,MAAMC,QAAQF,AAAkB,MAAlBA,OAAO,MAAM,GAAS,OAAOA,OAAO,IAAI,CAAC;IAIvD,IAAIE,AAAU,UAAVA,OACA,OAAO;QACHD;QACA,WAAW;QACX,QAAQ;IACZ;IAEJ,MAAME,SAASD,AAAwB,SAAxBA,MAAM,KAAK,CAAC;IAC3B,MAAME,YAAYF,MAAM,OAAO,CAAC,QAAQ;IACxC,OAAO;QACH,SAASH,WAAW,CAAC,OAAO,EAAEE,SAAS,GAAGA;QAC1CG;QACAD;IACJ;AACJ"}
@@ -1,9 +0,0 @@
1
- import type { CmsContext } from "@webiny/api-headless-cms/types/index.js";
2
- import type { PluginsContainer } from "@webiny/plugins";
3
- import type { CmsEntryStorageOperations, IEntryEntity } from "../../types.js";
4
- export interface CreateEntriesStorageOperationsParams {
5
- entity: IEntryEntity;
6
- container: CmsContext["container"];
7
- plugins: PluginsContainer;
8
- }
9
- export declare const createEntriesStorageOperations: (params: CreateEntriesStorageOperationsParams) => CmsEntryStorageOperations;