@webiny/api-aco 0.0.0-unstable.e622468070 → 0.0.0-unstable.e6f0dc8ca7

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 (165) hide show
  1. package/createAcoContext.js +2 -6
  2. package/createAcoContext.js.map +1 -1
  3. package/createAcoGraphQL.js +4 -4
  4. package/createAcoGraphQL.js.map +1 -1
  5. package/exports/api/aco/flp.d.ts +6 -0
  6. package/exports/api/aco/flp.js +8 -0
  7. package/exports/api/aco/flp.js.map +1 -0
  8. package/exports/api/aco/folder.d.ts +10 -0
  9. package/exports/api/aco/folder.js +12 -0
  10. package/exports/api/aco/folder.js.map +1 -0
  11. package/features/cms/feature.d.ts +4 -1
  12. package/features/flp/CreateFlp/abstractions.d.ts +1 -0
  13. package/features/flp/CreateFlp/abstractions.js +1 -0
  14. package/features/flp/CreateFlp/abstractions.js.map +1 -1
  15. package/features/flp/CreateFlp/feature.d.ts +5 -1
  16. package/features/flp/CreateFlpOnFolderCreated/CreateFlpOnFolderCreatedHandler.d.ts +3 -3
  17. package/features/flp/CreateFlpOnFolderCreated/CreateFlpOnFolderCreatedHandler.js +2 -2
  18. package/features/flp/CreateFlpOnFolderCreated/CreateFlpOnFolderCreatedHandler.js.map +1 -1
  19. package/features/flp/CreateFlpOnFolderCreated/feature.d.ts +4 -1
  20. package/features/flp/DeleteFlp/abstractions.d.ts +1 -0
  21. package/features/flp/DeleteFlp/abstractions.js +1 -0
  22. package/features/flp/DeleteFlp/abstractions.js.map +1 -1
  23. package/features/flp/DeleteFlp/feature.d.ts +5 -1
  24. package/features/flp/DeleteFlpOnFolderDeleted/DeleteFlpOnFolderDeletedHandler.d.ts +3 -3
  25. package/features/flp/DeleteFlpOnFolderDeleted/DeleteFlpOnFolderDeletedHandler.js +2 -2
  26. package/features/flp/DeleteFlpOnFolderDeleted/DeleteFlpOnFolderDeletedHandler.js.map +1 -1
  27. package/features/flp/DeleteFlpOnFolderDeleted/feature.d.ts +4 -1
  28. package/features/flp/FolderLevelPermissions/FolderLevelPermissions.d.ts +3 -3
  29. package/features/flp/FolderLevelPermissions/FolderLevelPermissions.js +3 -3
  30. package/features/flp/FolderLevelPermissions/FolderLevelPermissions.js.map +1 -1
  31. package/features/flp/FolderLevelPermissions/abstractions.d.ts +1 -0
  32. package/features/flp/FolderLevelPermissions/abstractions.js +1 -0
  33. package/features/flp/FolderLevelPermissions/abstractions.js.map +1 -1
  34. package/features/flp/FolderLevelPermissions/feature.d.ts +5 -1
  35. package/features/flp/FolderLevelPermissions/useCases/CanAccessFolder/CanAccessFolder.d.ts +1 -1
  36. package/features/flp/FolderLevelPermissions/useCases/CanAccessFolder/CanAccessFolder.js.map +1 -1
  37. package/features/flp/FolderLevelPermissions/useCases/CanAccessFolderContent/CanAccessFolderContent.d.ts +1 -1
  38. package/features/flp/FolderLevelPermissions/useCases/CanAccessFolderContent/CanAccessFolderContent.js.map +1 -1
  39. package/features/flp/FolderLevelPermissions/useCases/GetDefaultPermissions/GetDefaultPermissions.d.ts +1 -1
  40. package/features/flp/FolderLevelPermissions/useCases/GetDefaultPermissions/GetDefaultPermissions.js.map +1 -1
  41. package/features/flp/FolderLevelPermissions/useCases/GetDefaultPermissions/GetDefaultPermissionsWithTeams.d.ts +2 -2
  42. package/features/flp/FolderLevelPermissions/useCases/GetDefaultPermissions/GetDefaultPermissionsWithTeams.js +2 -2
  43. package/features/flp/FolderLevelPermissions/useCases/GetDefaultPermissions/GetDefaultPermissionsWithTeams.js.map +1 -1
  44. package/features/flp/GetFlp/abstractions.d.ts +1 -0
  45. package/features/flp/GetFlp/abstractions.js +1 -0
  46. package/features/flp/GetFlp/abstractions.js.map +1 -1
  47. package/features/flp/GetFlp/feature.d.ts +4 -1
  48. package/features/flp/GetFlp/feature.js.map +1 -1
  49. package/features/flp/ListFlps/abstractions.d.ts +1 -0
  50. package/features/flp/ListFlps/abstractions.js +1 -0
  51. package/features/flp/ListFlps/abstractions.js.map +1 -1
  52. package/features/flp/ListFlps/feature.d.ts +4 -1
  53. package/features/flp/ListFlps/feature.js.map +1 -1
  54. package/features/flp/UpdateFlp/abstractions.d.ts +1 -0
  55. package/features/flp/UpdateFlp/abstractions.js +1 -0
  56. package/features/flp/UpdateFlp/abstractions.js.map +1 -1
  57. package/features/flp/UpdateFlp/feature.d.ts +5 -1
  58. package/features/flp/UpdateFlpOnFolderUpdated/UpdateFlpOnFolderUpdatedHandler.d.ts +3 -3
  59. package/features/flp/UpdateFlpOnFolderUpdated/UpdateFlpOnFolderUpdatedHandler.js +2 -2
  60. package/features/flp/UpdateFlpOnFolderUpdated/UpdateFlpOnFolderUpdatedHandler.js.map +1 -1
  61. package/features/flp/UpdateFlpOnFolderUpdated/feature.d.ts +4 -1
  62. package/features/folder/CreateFolder/CreateFolderUseCase.d.ts +1 -1
  63. package/features/folder/CreateFolder/CreateFolderUseCase.js +1 -1
  64. package/features/folder/CreateFolder/CreateFolderUseCase.js.map +1 -1
  65. package/features/folder/CreateFolder/abstractions.d.ts +9 -5
  66. package/features/folder/CreateFolder/abstractions.js +6 -2
  67. package/features/folder/CreateFolder/abstractions.js.map +1 -1
  68. package/features/folder/CreateFolder/events.d.ts +3 -3
  69. package/features/folder/CreateFolder/events.js +4 -4
  70. package/features/folder/CreateFolder/events.js.map +1 -1
  71. package/features/folder/CreateFolder/feature.d.ts +5 -1
  72. package/features/folder/CreateFolder/index.d.ts +1 -1
  73. package/features/folder/CreateFolder/index.js +1 -1
  74. package/features/folder/CreateFolder/index.js.map +1 -1
  75. package/features/folder/DeleteFolder/DeleteFolderUseCase.d.ts +1 -1
  76. package/features/folder/DeleteFolder/DeleteFolderUseCase.js +1 -1
  77. package/features/folder/DeleteFolder/DeleteFolderUseCase.js.map +1 -1
  78. package/features/folder/DeleteFolder/abstractions.d.ts +9 -5
  79. package/features/folder/DeleteFolder/abstractions.js +6 -2
  80. package/features/folder/DeleteFolder/abstractions.js.map +1 -1
  81. package/features/folder/DeleteFolder/events.d.ts +3 -3
  82. package/features/folder/DeleteFolder/events.js +4 -4
  83. package/features/folder/DeleteFolder/events.js.map +1 -1
  84. package/features/folder/DeleteFolder/feature.d.ts +5 -1
  85. package/features/folder/DeleteFolder/index.d.ts +1 -1
  86. package/features/folder/DeleteFolder/index.js +1 -1
  87. package/features/folder/DeleteFolder/index.js.map +1 -1
  88. package/features/folder/EnsureFolderIsEmpty/abstractions.d.ts +1 -0
  89. package/features/folder/EnsureFolderIsEmpty/abstractions.js +1 -0
  90. package/features/folder/EnsureFolderIsEmpty/abstractions.js.map +1 -1
  91. package/features/folder/EnsureFolderIsEmpty/feature.d.ts +4 -1
  92. package/features/folder/EnsureFolderIsEmptyOnDelete/GenericFolderBeforeDeleteHandler.d.ts +3 -3
  93. package/features/folder/EnsureFolderIsEmptyOnDelete/GenericFolderBeforeDeleteHandler.js +2 -2
  94. package/features/folder/EnsureFolderIsEmptyOnDelete/GenericFolderBeforeDeleteHandler.js.map +1 -1
  95. package/features/folder/EnsureFolderIsEmptyOnDelete/feature.d.ts +4 -1
  96. package/features/folder/EnsureHcmsFolderIsEmptyOnDelete/ModelFolderBeforeDeleteHandler.d.ts +3 -3
  97. package/features/folder/EnsureHcmsFolderIsEmptyOnDelete/ModelFolderBeforeDeleteHandler.js +2 -2
  98. package/features/folder/EnsureHcmsFolderIsEmptyOnDelete/ModelFolderBeforeDeleteHandler.js.map +1 -1
  99. package/features/folder/EnsureHcmsFolderIsEmptyOnDelete/feature.d.ts +4 -1
  100. package/features/folder/GetAncestors/abstractions.d.ts +2 -0
  101. package/features/folder/GetAncestors/abstractions.js +2 -0
  102. package/features/folder/GetAncestors/abstractions.js.map +1 -1
  103. package/features/folder/GetAncestors/feature.d.ts +5 -1
  104. package/features/folder/GetFolder/abstractions.d.ts +8 -5
  105. package/features/folder/GetFolder/abstractions.js +5 -2
  106. package/features/folder/GetFolder/abstractions.js.map +1 -1
  107. package/features/folder/GetFolder/feature.d.ts +5 -1
  108. package/features/folder/GetFolder/index.d.ts +1 -1
  109. package/features/folder/GetFolder/index.js +1 -1
  110. package/features/folder/GetFolder/index.js.map +1 -1
  111. package/features/folder/GetFolderHierarchy/abstractions.d.ts +2 -0
  112. package/features/folder/GetFolderHierarchy/abstractions.js +2 -0
  113. package/features/folder/GetFolderHierarchy/abstractions.js.map +1 -1
  114. package/features/folder/GetFolderHierarchy/feature.d.ts +5 -1
  115. package/features/folder/ListFolderLevelPermissionsTargets/ListFolderLevelPermissionsTargetsUseCase.d.ts +2 -2
  116. package/features/folder/ListFolderLevelPermissionsTargets/ListFolderLevelPermissionsTargetsUseCase.js +3 -3
  117. package/features/folder/ListFolderLevelPermissionsTargets/ListFolderLevelPermissionsTargetsUseCase.js.map +1 -1
  118. package/features/folder/ListFolderLevelPermissionsTargets/abstractions.d.ts +1 -0
  119. package/features/folder/ListFolderLevelPermissionsTargets/abstractions.js +1 -0
  120. package/features/folder/ListFolderLevelPermissionsTargets/abstractions.js.map +1 -1
  121. package/features/folder/ListFolderLevelPermissionsTargets/feature.d.ts +4 -1
  122. package/features/folder/ListFolders/abstractions.d.ts +2 -0
  123. package/features/folder/ListFolders/abstractions.js +2 -0
  124. package/features/folder/ListFolders/abstractions.js.map +1 -1
  125. package/features/folder/ListFolders/feature.d.ts +5 -1
  126. package/features/folder/UpdateFolder/UpdateFolderUseCase.d.ts +1 -1
  127. package/features/folder/UpdateFolder/UpdateFolderUseCase.js +1 -1
  128. package/features/folder/UpdateFolder/UpdateFolderUseCase.js.map +1 -1
  129. package/features/folder/UpdateFolder/abstractions.d.ts +9 -5
  130. package/features/folder/UpdateFolder/abstractions.js +6 -2
  131. package/features/folder/UpdateFolder/abstractions.js.map +1 -1
  132. package/features/folder/UpdateFolder/events.d.ts +3 -3
  133. package/features/folder/UpdateFolder/events.js +4 -4
  134. package/features/folder/UpdateFolder/events.js.map +1 -1
  135. package/features/folder/UpdateFolder/feature.d.ts +5 -1
  136. package/features/folder/UpdateFolder/index.d.ts +1 -1
  137. package/features/folder/UpdateFolder/index.js +1 -1
  138. package/features/folder/UpdateFolder/index.js.map +1 -1
  139. package/features/folder/shared/abstractions.d.ts +1 -0
  140. package/features/folder/shared/abstractions.js +1 -0
  141. package/features/folder/shared/abstractions.js.map +1 -1
  142. package/flp/flp.so.js.map +1 -1
  143. package/flp/tasks/createFlp.task.d.ts +1 -0
  144. package/flp/tasks/createFlp.task.js +1 -0
  145. package/flp/tasks/createFlp.task.js.map +1 -1
  146. package/flp/tasks/deleteFlp.task.d.ts +1 -0
  147. package/flp/tasks/deleteFlp.task.js +1 -0
  148. package/flp/tasks/deleteFlp.task.js.map +1 -1
  149. package/flp/tasks/syncFlp.task.d.ts +1 -0
  150. package/flp/tasks/syncFlp.task.js +1 -0
  151. package/flp/tasks/syncFlp.task.js.map +1 -1
  152. package/flp/tasks/updateFlp.task.d.ts +1 -0
  153. package/flp/tasks/updateFlp.task.js +1 -0
  154. package/flp/tasks/updateFlp.task.js.map +1 -1
  155. package/folder/createFolderTypeDefs.d.ts +3 -2
  156. package/folder/createFolderTypeDefs.js +4 -4
  157. package/folder/createFolderTypeDefs.js.map +1 -1
  158. package/package.json +27 -38
  159. package/utils/compress.js +1 -1
  160. package/utils/compress.js.map +1 -1
  161. package/utils/ensureAuthentication.js +1 -1
  162. package/utils/ensureAuthentication.js.map +1 -1
  163. package/utils/acoRecordId.d.ts +0 -6
  164. package/utils/acoRecordId.js +0 -27
  165. package/utils/acoRecordId.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["renderFields","renderInputFields","removeFieldRequiredValidation","field","validation","filter","name","listValidation","v","createUpdateFields","fields","reduce","collection","push","createFolderTypeDefs","params","model","models","plugins","fieldTypePlugins","fieldTypes","type","inputCreateFields","inputUpdateFields","map","f","typeDefs","join"],"sources":["createFolderTypeDefs.ts"],"sourcesContent":["import type {\n CmsFieldTypePlugins,\n CmsModel,\n CmsModelField\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport { renderFields } from \"@webiny/api-headless-cms/utils/renderFields.js\";\nimport { renderInputFields } from \"@webiny/api-headless-cms/utils/renderInputFields.js\";\n\nexport interface CreateFolderTypeDefsParams {\n model: CmsModel;\n models: CmsModel[];\n plugins: CmsFieldTypePlugins;\n}\n\nconst removeFieldRequiredValidation = (field: CmsModelField) => {\n if (field.validation) {\n field.validation = field.validation.filter(validation => validation.name !== \"required\");\n }\n if (field.listValidation) {\n field.listValidation = field.listValidation.filter(v => v.name !== \"required\");\n }\n return field;\n};\n\nconst createUpdateFields = (fields: CmsModelField[]): CmsModelField[] => {\n return fields.reduce<CmsModelField[]>((collection, field) => {\n collection.push(removeFieldRequiredValidation({ ...field }));\n return collection;\n }, []);\n};\n\nexport const createFolderTypeDefs = (params: CreateFolderTypeDefsParams): string => {\n const { model, models, plugins: fieldTypePlugins } = params;\n const { fields } = model;\n\n const fieldTypes = renderFields({\n models,\n model,\n fields,\n type: \"manage\",\n fieldTypePlugins\n });\n const inputCreateFields = renderInputFields({\n models,\n model,\n fields,\n fieldTypePlugins\n });\n const inputUpdateFields = renderInputFields({\n models,\n model,\n fields: createUpdateFields(fields),\n fieldTypePlugins\n });\n\n return /* GraphQL */ `\n ${fieldTypes.map(f => f.typeDefs).join(\"\\n\")}\n \n type Folder {\n id: ID!\n # Tells us if the current user can manage folder structure.\n canManageStructure: Boolean\n\n # Tells us if the current user can manage folder permissions.\n canManagePermissions: Boolean\n\n # Tells us if the current user can manage folder content.\n canManageContent: Boolean\n\n # Tells us if the folder contains non-inherited permissions.\n hasNonInheritedPermissions: Boolean\n\n createdOn: DateTime\n modifiedOn: DateTime\n savedOn: DateTime\n createdBy: AcoUser\n modifiedBy: AcoUser\n savedBy: AcoUser\n \n ${fieldTypes.map(f => f.fields).join(\"\\n\")}\n }\n\n ${inputCreateFields.map(f => f.typeDefs).join(\"\\n\")}\n \n input FolderCreateInput {\n # Pass an ID if you want to create a folder with a specific ID.\n id: ID \n \n ${inputCreateFields.map(f => f.fields).join(\"\\n\")}\n }\n \n input FolderUpdateInput {\n ${inputUpdateFields.map(f => f.fields).join(\"\\n\")}\n }\n \n input FoldersListWhereInput {\n type: String!\n parentId: ID\n parentId_in: [ID]\n slug: String\n slug_not: String\n slug_contains: String\n slug_not_contains: String\n slug_in: [String]\n slug_not_in: [String]\n slug_startsWith: String\n slug_not_startsWith: String\n path: String\n path_not: String\n path_contains: String\n path_not_contains: String\n path_in: [String]\n path_not_in: [String]\n path_startsWith: String\n path_not_startsWith: String\n createdBy: ID\n }\n \n type FolderResponse {\n data: Folder\n error: AcoError\n }\n\n type FoldersListResponse {\n data: [Folder]\n error: AcoError\n meta: AcoMeta\n }\n\n type FoldersHierarchyData {\n parents: [Folder]\n siblings: [Folder]\n }\n\n type FoldersHierarchyResponse {\n data: FoldersHierarchyData\n error: AcoError\n }\n\n type FolderLevelPermissionsTarget {\n id: ID!\n type: String!\n target: ID!\n name: String!\n meta: JSON\n }\n\n type FolderLevelPermissionsTargetsListMeta {\n totalCount: Int!\n }\n\n type FolderLevelPermissionsTargetsListResponse {\n data: [FolderLevelPermissionsTarget]\n meta: FolderLevelPermissionsTargetsListMeta\n error: AcoError\n }\n \n type FolderModelResponse {\n data: JSON\n error: AcoError\n }\n\n extend type AcoQuery {\n getFolderModel: FolderModelResponse!\n getFolder(id: ID!): FolderResponse\n listFolders(\n where: FoldersListWhereInput!\n limit: Int\n after: String\n sort: AcoSort\n ): FoldersListResponse\n getFolderHierarchy(type: String!, id: ID!): FoldersHierarchyResponse\n listFolderLevelPermissionsTargets: FolderLevelPermissionsTargetsListResponse\n }\n\n extend type AcoMutation {\n createFolder(data: FolderCreateInput!): FolderResponse\n updateFolder(id: ID!, data: FolderUpdateInput!): FolderResponse\n deleteFolder(id: ID!): AcoBooleanResponse\n }\n \n # The base type is dynamically generated from a Folder model\n \n extend type AcoFolder_Permissions {\n inheritedFrom: ID\n }\n \n extend input AcoFolder_PermissionsInput {\n inheritedFrom: ID\n }\n `;\n};\n"],"mappings":"AAKA,SAASA,YAAY,QAAQ,gDAAgD;AAC7E,SAASC,iBAAiB,QAAQ,qDAAqD;AAQvF,MAAMC,6BAA6B,GAAIC,KAAoB,IAAK;EAC5D,IAAIA,KAAK,CAACC,UAAU,EAAE;IAClBD,KAAK,CAACC,UAAU,GAAGD,KAAK,CAACC,UAAU,CAACC,MAAM,CAACD,UAAU,IAAIA,UAAU,CAACE,IAAI,KAAK,UAAU,CAAC;EAC5F;EACA,IAAIH,KAAK,CAACI,cAAc,EAAE;IACtBJ,KAAK,CAACI,cAAc,GAAGJ,KAAK,CAACI,cAAc,CAACF,MAAM,CAACG,CAAC,IAAIA,CAAC,CAACF,IAAI,KAAK,UAAU,CAAC;EAClF;EACA,OAAOH,KAAK;AAChB,CAAC;AAED,MAAMM,kBAAkB,GAAIC,MAAuB,IAAsB;EACrE,OAAOA,MAAM,CAACC,MAAM,CAAkB,CAACC,UAAU,EAAET,KAAK,KAAK;IACzDS,UAAU,CAACC,IAAI,CAACX,6BAA6B,CAAC;MAAE,GAAGC;IAAM,CAAC,CAAC,CAAC;IAC5D,OAAOS,UAAU;EACrB,CAAC,EAAE,EAAE,CAAC;AACV,CAAC;AAED,OAAO,MAAME,oBAAoB,GAAIC,MAAkC,IAAa;EAChF,MAAM;IAAEC,KAAK;IAAEC,MAAM;IAAEC,OAAO,EAAEC;EAAiB,CAAC,GAAGJ,MAAM;EAC3D,MAAM;IAAEL;EAAO,CAAC,GAAGM,KAAK;EAExB,MAAMI,UAAU,GAAGpB,YAAY,CAAC;IAC5BiB,MAAM;IACND,KAAK;IACLN,MAAM;IACNW,IAAI,EAAE,QAAQ;IACdF;EACJ,CAAC,CAAC;EACF,MAAMG,iBAAiB,GAAGrB,iBAAiB,CAAC;IACxCgB,MAAM;IACND,KAAK;IACLN,MAAM;IACNS;EACJ,CAAC,CAAC;EACF,MAAMI,iBAAiB,GAAGtB,iBAAiB,CAAC;IACxCgB,MAAM;IACND,KAAK;IACLN,MAAM,EAAED,kBAAkB,CAACC,MAAM,CAAC;IAClCS;EACJ,CAAC,CAAC;EAEF,OAAO,aAAc;AACzB,UAAUC,UAAU,CAACI,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACC,QAAQ,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAcP,UAAU,CAACI,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACf,MAAM,CAAC,CAACiB,IAAI,CAAC,IAAI,CAAC;AACtD;AACA;AACA,UAAUL,iBAAiB,CAACE,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACC,QAAQ,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA,eAAeL,iBAAiB,CAACE,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACf,MAAM,CAAC,CAACiB,IAAI,CAAC,IAAI,CAAC;AAC9D;AACA;AACA;AACA,cAAcJ,iBAAiB,CAACC,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACf,MAAM,CAAC,CAACiB,IAAI,CAAC,IAAI,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["renderFields","renderInputFields","removeFieldRequiredValidation","field","validation","filter","name","listValidation","v","createUpdateFields","fields","reduce","collection","push","createFolderTypeDefs","params","model","models","fieldRegistry","fieldTypes","type","inputCreateFields","inputUpdateFields","map","f","typeDefs","join"],"sources":["createFolderTypeDefs.ts"],"sourcesContent":["import type { CmsModel, CmsModelField } from \"@webiny/api-headless-cms/types/index.js\";\nimport { renderFields } from \"@webiny/api-headless-cms/utils/renderFields.js\";\nimport { renderInputFields } from \"@webiny/api-headless-cms/utils/renderInputFields.js\";\nimport type { CmsModelFieldToGraphQLRegistry } from \"@webiny/api-headless-cms/exports/api/cms/graphql.js\";\n\nexport interface CreateFolderTypeDefsParams {\n model: CmsModel;\n models: CmsModel[];\n fieldRegistry: CmsModelFieldToGraphQLRegistry.Interface;\n}\n\nconst removeFieldRequiredValidation = (field: CmsModelField) => {\n if (field.validation) {\n field.validation = field.validation.filter(validation => validation.name !== \"required\");\n }\n if (field.listValidation) {\n field.listValidation = field.listValidation.filter(v => v.name !== \"required\");\n }\n return field;\n};\n\nconst createUpdateFields = (fields: CmsModelField[]): CmsModelField[] => {\n return fields.reduce<CmsModelField[]>((collection, field) => {\n collection.push(removeFieldRequiredValidation({ ...field }));\n return collection;\n }, []);\n};\n\nexport const createFolderTypeDefs = (params: CreateFolderTypeDefsParams): string => {\n const { model, models, fieldRegistry } = params;\n const { fields } = model;\n\n const fieldTypes = renderFields({\n models,\n model,\n fields,\n type: \"manage\",\n fieldRegistry\n });\n const inputCreateFields = renderInputFields({\n models,\n model,\n fields,\n fieldRegistry\n });\n const inputUpdateFields = renderInputFields({\n models,\n model,\n fields: createUpdateFields(fields),\n fieldRegistry\n });\n\n return /* GraphQL */ `\n ${fieldTypes.map(f => f.typeDefs).join(\"\\n\")}\n \n type Folder {\n id: ID!\n # Tells us if the current user can manage folder structure.\n canManageStructure: Boolean\n\n # Tells us if the current user can manage folder permissions.\n canManagePermissions: Boolean\n\n # Tells us if the current user can manage folder content.\n canManageContent: Boolean\n\n # Tells us if the folder contains non-inherited permissions.\n hasNonInheritedPermissions: Boolean\n\n createdOn: DateTime\n modifiedOn: DateTime\n savedOn: DateTime\n createdBy: AcoUser\n modifiedBy: AcoUser\n savedBy: AcoUser\n \n ${fieldTypes.map(f => f.fields).join(\"\\n\")}\n }\n\n ${inputCreateFields.map(f => f.typeDefs).join(\"\\n\")}\n \n input FolderCreateInput {\n # Pass an ID if you want to create a folder with a specific ID.\n id: ID \n \n ${inputCreateFields.map(f => f.fields).join(\"\\n\")}\n }\n \n input FolderUpdateInput {\n ${inputUpdateFields.map(f => f.fields).join(\"\\n\")}\n }\n \n input FoldersListWhereInput {\n type: String!\n parentId: ID\n parentId_in: [ID]\n slug: String\n slug_not: String\n slug_contains: String\n slug_not_contains: String\n slug_in: [String]\n slug_not_in: [String]\n slug_startsWith: String\n slug_not_startsWith: String\n path: String\n path_not: String\n path_contains: String\n path_not_contains: String\n path_in: [String]\n path_not_in: [String]\n path_startsWith: String\n path_not_startsWith: String\n createdBy: ID\n }\n \n type FolderResponse {\n data: Folder\n error: AcoError\n }\n\n type FoldersListResponse {\n data: [Folder]\n error: AcoError\n meta: AcoMeta\n }\n\n type FoldersHierarchyData {\n parents: [Folder]\n siblings: [Folder]\n }\n\n type FoldersHierarchyResponse {\n data: FoldersHierarchyData\n error: AcoError\n }\n\n type FolderLevelPermissionsTarget {\n id: ID!\n type: String!\n target: ID!\n name: String!\n meta: JSON\n }\n\n type FolderLevelPermissionsTargetsListMeta {\n totalCount: Int!\n }\n\n type FolderLevelPermissionsTargetsListResponse {\n data: [FolderLevelPermissionsTarget]\n meta: FolderLevelPermissionsTargetsListMeta\n error: AcoError\n }\n \n type FolderModelResponse {\n data: JSON\n error: AcoError\n }\n\n extend type AcoQuery {\n getFolderModel: FolderModelResponse!\n getFolder(id: ID!): FolderResponse\n listFolders(\n where: FoldersListWhereInput!\n limit: Int\n after: String\n sort: AcoSort\n ): FoldersListResponse\n getFolderHierarchy(type: String!, id: ID!): FoldersHierarchyResponse\n listFolderLevelPermissionsTargets: FolderLevelPermissionsTargetsListResponse\n }\n\n extend type AcoMutation {\n createFolder(data: FolderCreateInput!): FolderResponse\n updateFolder(id: ID!, data: FolderUpdateInput!): FolderResponse\n deleteFolder(id: ID!): AcoBooleanResponse\n }\n \n # The base type is dynamically generated from a Folder model\n \n extend type AcoFolder_Permissions {\n inheritedFrom: ID\n }\n \n extend input AcoFolder_PermissionsInput {\n inheritedFrom: ID\n }\n `;\n};\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,gDAAgD;AAC7E,SAASC,iBAAiB,QAAQ,qDAAqD;AASvF,MAAMC,6BAA6B,GAAIC,KAAoB,IAAK;EAC5D,IAAIA,KAAK,CAACC,UAAU,EAAE;IAClBD,KAAK,CAACC,UAAU,GAAGD,KAAK,CAACC,UAAU,CAACC,MAAM,CAACD,UAAU,IAAIA,UAAU,CAACE,IAAI,KAAK,UAAU,CAAC;EAC5F;EACA,IAAIH,KAAK,CAACI,cAAc,EAAE;IACtBJ,KAAK,CAACI,cAAc,GAAGJ,KAAK,CAACI,cAAc,CAACF,MAAM,CAACG,CAAC,IAAIA,CAAC,CAACF,IAAI,KAAK,UAAU,CAAC;EAClF;EACA,OAAOH,KAAK;AAChB,CAAC;AAED,MAAMM,kBAAkB,GAAIC,MAAuB,IAAsB;EACrE,OAAOA,MAAM,CAACC,MAAM,CAAkB,CAACC,UAAU,EAAET,KAAK,KAAK;IACzDS,UAAU,CAACC,IAAI,CAACX,6BAA6B,CAAC;MAAE,GAAGC;IAAM,CAAC,CAAC,CAAC;IAC5D,OAAOS,UAAU;EACrB,CAAC,EAAE,EAAE,CAAC;AACV,CAAC;AAED,OAAO,MAAME,oBAAoB,GAAIC,MAAkC,IAAa;EAChF,MAAM;IAAEC,KAAK;IAAEC,MAAM;IAAEC;EAAc,CAAC,GAAGH,MAAM;EAC/C,MAAM;IAAEL;EAAO,CAAC,GAAGM,KAAK;EAExB,MAAMG,UAAU,GAAGnB,YAAY,CAAC;IAC5BiB,MAAM;IACND,KAAK;IACLN,MAAM;IACNU,IAAI,EAAE,QAAQ;IACdF;EACJ,CAAC,CAAC;EACF,MAAMG,iBAAiB,GAAGpB,iBAAiB,CAAC;IACxCgB,MAAM;IACND,KAAK;IACLN,MAAM;IACNQ;EACJ,CAAC,CAAC;EACF,MAAMI,iBAAiB,GAAGrB,iBAAiB,CAAC;IACxCgB,MAAM;IACND,KAAK;IACLN,MAAM,EAAED,kBAAkB,CAACC,MAAM,CAAC;IAClCQ;EACJ,CAAC,CAAC;EAEF,OAAO,aAAc;AACzB,UAAUC,UAAU,CAACI,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACC,QAAQ,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,cAAcP,UAAU,CAACI,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACd,MAAM,CAAC,CAACgB,IAAI,CAAC,IAAI,CAAC;AACtD;AACA;AACA,UAAUL,iBAAiB,CAACE,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACC,QAAQ,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA,eAAeL,iBAAiB,CAACE,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACd,MAAM,CAAC,CAACgB,IAAI,CAAC,IAAI,CAAC;AAC9D;AACA;AACA;AACA,cAAcJ,iBAAiB,CAACC,GAAG,CAACC,CAAC,IAAIA,CAAC,CAACd,MAAM,CAAC,CAACgB,IAAI,CAAC,IAAI,CAAC;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@webiny/api-aco",
3
- "version": "0.0.0-unstable.e622468070",
3
+ "version": "0.0.0-unstable.e6f0dc8ca7",
4
4
  "type": "module",
5
- "main": "index.js",
6
5
  "keywords": [
7
6
  "aco:base"
8
7
  ],
@@ -19,48 +18,38 @@
19
18
  "directory": "dist"
20
19
  },
21
20
  "exports": {
22
- "./features/flp/FolderLevelPermissions": "./features/flp/FolderLevelPermissions/index.js",
23
- "./features/folder/CreateFolder": "./features/folder/CreateFolder/index.js",
24
- "./features/folder/UpdateFolder": "./features/folder/UpdateFolder/index.js",
25
- "./features/folder/DeleteFolder": "./features/folder/DeleteFolder/index.js",
26
- "./features/folder/GetAncestors": "./features/folder/GetAncestors/index.js",
27
- "./features/folder/GetFolder": "./features/folder/GetFolder/index.js",
28
- "./features/folder/GetFolderHierarchy": "./features/folder/GetFolderHierarchy/index.js",
29
- "./features/folder/ListFolders": "./features/folder/ListFolders/index.js",
30
- "./features/folder/EnsureFolderIsEmpty": "./features/folder/EnsureFolderIsEmpty/index.js",
31
21
  "./*": "./*",
32
22
  ".": "./index.js"
33
23
  },
34
24
  "dependencies": {
35
- "@webiny/api": "0.0.0-unstable.e622468070",
36
- "@webiny/api-core": "0.0.0-unstable.e622468070",
37
- "@webiny/api-headless-cms": "0.0.0-unstable.e622468070",
38
- "@webiny/aws-sdk": "0.0.0-unstable.e622468070",
39
- "@webiny/db-dynamodb": "0.0.0-unstable.e622468070",
25
+ "@webiny/api": "0.0.0-unstable.e6f0dc8ca7",
26
+ "@webiny/api-core": "0.0.0-unstable.e6f0dc8ca7",
27
+ "@webiny/api-headless-cms": "0.0.0-unstable.e6f0dc8ca7",
28
+ "@webiny/aws-sdk": "0.0.0-unstable.e6f0dc8ca7",
29
+ "@webiny/db-dynamodb": "0.0.0-unstable.e6f0dc8ca7",
40
30
  "@webiny/di": "0.2.3",
41
- "@webiny/error": "0.0.0-unstable.e622468070",
42
- "@webiny/feature": "0.0.0-unstable.e622468070",
43
- "@webiny/handler": "0.0.0-unstable.e622468070",
44
- "@webiny/handler-graphql": "0.0.0-unstable.e622468070",
45
- "@webiny/shared-aco": "0.0.0-unstable.e622468070",
46
- "@webiny/tasks": "0.0.0-unstable.e622468070",
47
- "@webiny/utils": "0.0.0-unstable.e622468070",
48
- "@webiny/validation": "0.0.0-unstable.e622468070",
49
- "lodash": "4.17.23"
31
+ "@webiny/error": "0.0.0-unstable.e6f0dc8ca7",
32
+ "@webiny/feature": "0.0.0-unstable.e6f0dc8ca7",
33
+ "@webiny/handler": "0.0.0-unstable.e6f0dc8ca7",
34
+ "@webiny/handler-graphql": "0.0.0-unstable.e6f0dc8ca7",
35
+ "@webiny/shared-aco": "0.0.0-unstable.e6f0dc8ca7",
36
+ "@webiny/tasks": "0.0.0-unstable.e6f0dc8ca7",
37
+ "@webiny/utils": "0.0.0-unstable.e6f0dc8ca7",
38
+ "@webiny/validation": "0.0.0-unstable.e6f0dc8ca7",
39
+ "lodash": "4.18.1"
50
40
  },
51
41
  "devDependencies": {
52
- "@webiny/api-core-ddb": "0.0.0-unstable.e622468070",
53
- "@webiny/api-file-manager": "0.0.0-unstable.e622468070",
54
- "@webiny/build-tools": "0.0.0-unstable.e622468070",
55
- "@webiny/handler-aws": "0.0.0-unstable.e622468070",
56
- "@webiny/plugins": "0.0.0-unstable.e622468070",
57
- "@webiny/project-utils": "0.0.0-unstable.e622468070",
58
- "@webiny/wcp": "0.0.0-unstable.e622468070",
59
- "graphql": "16.12.0",
60
- "prettier": "3.6.2",
61
- "rimraf": "6.1.2",
62
- "typescript": "5.9.3",
63
- "vitest": "3.2.4"
42
+ "@webiny/api-core-ddb": "0.0.0-unstable.e6f0dc8ca7",
43
+ "@webiny/api-file-manager": "0.0.0-unstable.e6f0dc8ca7",
44
+ "@webiny/build-tools": "0.0.0-unstable.e6f0dc8ca7",
45
+ "@webiny/handler-aws": "0.0.0-unstable.e6f0dc8ca7",
46
+ "@webiny/plugins": "0.0.0-unstable.e6f0dc8ca7",
47
+ "@webiny/project-utils": "0.0.0-unstable.e6f0dc8ca7",
48
+ "@webiny/wcp": "0.0.0-unstable.e6f0dc8ca7",
49
+ "graphql": "16.14.0",
50
+ "rimraf": "6.1.3",
51
+ "typescript": "6.0.3",
52
+ "vitest": "4.1.5"
64
53
  },
65
- "gitHead": "e622468070839dc3f9552c85bf2bbac12d2ef88f"
54
+ "gitHead": "e6f0dc8ca741c1fcc3fec9a5b9e86fdd49544641"
66
55
  }
package/utils/compress.js CHANGED
@@ -1,4 +1,4 @@
1
- import { compress as gzip } from "@webiny/utils/compression/gzip.js";
1
+ import { compress as gzip } from "@webiny/utils/features/compression/legacy/gzip.js";
2
2
  const GZIP = "gzip";
3
3
  const TO_STORAGE_ENCODING = "base64";
4
4
  export const compress = async data => {
@@ -1 +1 @@
1
- {"version":3,"names":["compress","gzip","GZIP","TO_STORAGE_ENCODING","data","value","JSON","stringify","compression","toString"],"sources":["compress.ts"],"sourcesContent":["import { compress as gzip } from \"@webiny/utils/compression/gzip.js\";\n\nconst GZIP = \"gzip\";\nconst TO_STORAGE_ENCODING = \"base64\";\n\nexport const compress = async (data: any) => {\n const value = await gzip(JSON.stringify(data));\n\n return {\n compression: GZIP,\n value: value.toString(TO_STORAGE_ENCODING)\n };\n};\n"],"mappings":"AAAA,SAASA,QAAQ,IAAIC,IAAI,QAAQ,mCAAmC;AAEpE,MAAMC,IAAI,GAAG,MAAM;AACnB,MAAMC,mBAAmB,GAAG,QAAQ;AAEpC,OAAO,MAAMH,QAAQ,GAAG,MAAOI,IAAS,IAAK;EACzC,MAAMC,KAAK,GAAG,MAAMJ,IAAI,CAACK,IAAI,CAACC,SAAS,CAACH,IAAI,CAAC,CAAC;EAE9C,OAAO;IACHI,WAAW,EAAEN,IAAI;IACjBG,KAAK,EAAEA,KAAK,CAACI,QAAQ,CAACN,mBAAmB;EAC7C,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["compress","gzip","GZIP","TO_STORAGE_ENCODING","data","value","JSON","stringify","compression","toString"],"sources":["compress.ts"],"sourcesContent":["import { compress as gzip } from \"@webiny/utils/features/compression/legacy/gzip.js\";\n\nconst GZIP = \"gzip\";\nconst TO_STORAGE_ENCODING = \"base64\";\n\nexport const compress = async (data: any) => {\n const value = await gzip(JSON.stringify(data));\n\n return {\n compression: GZIP,\n value: value.toString(TO_STORAGE_ENCODING)\n };\n};\n"],"mappings":"AAAA,SAASA,QAAQ,IAAIC,IAAI,QAAQ,mDAAmD;AAEpF,MAAMC,IAAI,GAAG,MAAM;AACnB,MAAMC,mBAAmB,GAAG,QAAQ;AAEpC,OAAO,MAAMH,QAAQ,GAAG,MAAOI,IAAS,IAAK;EACzC,MAAMC,KAAK,GAAG,MAAMJ,IAAI,CAACK,IAAI,CAACC,SAAS,CAACH,IAAI,CAAC,CAAC;EAE9C,OAAO;IACHI,WAAW,EAAEN,IAAI;IACjBG,KAAK,EAAEA,KAAK,CAACI,QAAQ,CAACN,mBAAmB;EAC7C,CAAC;AACL,CAAC","ignoreList":[]}
@@ -3,7 +3,7 @@ import { IdentityContext } from "@webiny/api-core/features/security/IdentityCont
3
3
  export const ensureAuthentication = context => {
4
4
  const identityContext = context.container.resolve(IdentityContext);
5
5
  const identity = identityContext.getIdentity();
6
- if (identity.isAdmin()) {
6
+ if (!identity.isAnonymous()) {
7
7
  return;
8
8
  }
9
9
  throw new NotAuthorizedError();
@@ -1 +1 @@
1
- {"version":3,"names":["NotAuthorizedError","IdentityContext","ensureAuthentication","context","identityContext","container","resolve","identity","getIdentity","isAdmin"],"sources":["ensureAuthentication.ts"],"sourcesContent":["import { NotAuthorizedError } from \"@webiny/api-core/features/security/shared/errors.js\";\nimport type { ApiCoreContext } from \"@webiny/api-core/types/core.js\";\nimport { IdentityContext } from \"@webiny/api-core/features/security/IdentityContext/index.js\";\n\nexport const ensureAuthentication = (context: ApiCoreContext) => {\n const identityContext = context.container.resolve(IdentityContext);\n const identity = identityContext.getIdentity();\n\n if (identity.isAdmin()) {\n return;\n }\n throw new NotAuthorizedError();\n};\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,qDAAqD;AAExF,SAASC,eAAe,QAAQ,6DAA6D;AAE7F,OAAO,MAAMC,oBAAoB,GAAIC,OAAuB,IAAK;EAC7D,MAAMC,eAAe,GAAGD,OAAO,CAACE,SAAS,CAACC,OAAO,CAACL,eAAe,CAAC;EAClE,MAAMM,QAAQ,GAAGH,eAAe,CAACI,WAAW,CAAC,CAAC;EAE9C,IAAID,QAAQ,CAACE,OAAO,CAAC,CAAC,EAAE;IACpB;EACJ;EACA,MAAM,IAAIT,kBAAkB,CAAC,CAAC;AAClC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["NotAuthorizedError","IdentityContext","ensureAuthentication","context","identityContext","container","resolve","identity","getIdentity","isAnonymous"],"sources":["ensureAuthentication.ts"],"sourcesContent":["import { NotAuthorizedError } from \"@webiny/api-core/features/security/shared/errors.js\";\nimport type { ApiCoreContext } from \"@webiny/api-core/types/core.js\";\nimport { IdentityContext } from \"@webiny/api-core/features/security/IdentityContext/index.js\";\n\nexport const ensureAuthentication = (context: ApiCoreContext) => {\n const identityContext = context.container.resolve(IdentityContext);\n const identity = identityContext.getIdentity();\n\n if (!identity.isAnonymous()) {\n return;\n }\n throw new NotAuthorizedError();\n};\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,qDAAqD;AAExF,SAASC,eAAe,QAAQ,6DAA6D;AAE7F,OAAO,MAAMC,oBAAoB,GAAIC,OAAuB,IAAK;EAC7D,MAAMC,eAAe,GAAGD,OAAO,CAACE,SAAS,CAACC,OAAO,CAACL,eAAe,CAAC;EAClE,MAAMM,QAAQ,GAAGH,eAAe,CAACI,WAAW,CAAC,CAAC;EAE9C,IAAI,CAACD,QAAQ,CAACE,WAAW,CAAC,CAAC,EAAE;IACzB;EACJ;EACA,MAAM,IAAIT,kBAAkB,CAAC,CAAC;AAClC,CAAC","ignoreList":[]}
@@ -1,6 +0,0 @@
1
- /**
2
- * 006
3
- * PageDataMigration in ddb-es and ddb
4
- */
5
- export declare const attachAcoRecordPrefix: (id: string) => string;
6
- export declare const removeAcoRecordPrefix: (id: string) => string;
@@ -1,27 +0,0 @@
1
- /**
2
- * !!! DO NOT CHANGE THIS !!!
3
- * If this is changed, you will need to create new migration which changes the IDs for the users.
4
- *
5
- * packages/migrations/src/migrations/5.35.0/006/ddb/PageDataMigration.ts:236
6
- * packages/migrations/src/migrations/5.35.0/006/ddb-es/PageDataMigration.ts:419
7
- */
8
- const WBY_ACO_PREFIX = "wby-aco-";
9
- /**
10
- * 006
11
- * PageDataMigration in ddb-es and ddb
12
- */
13
-
14
- export const attachAcoRecordPrefix = id => {
15
- if (id.startsWith(WBY_ACO_PREFIX)) {
16
- return id;
17
- }
18
- return `${WBY_ACO_PREFIX}${id}`;
19
- };
20
- export const removeAcoRecordPrefix = id => {
21
- if (id.startsWith(WBY_ACO_PREFIX) === false) {
22
- return id;
23
- }
24
- return id.substring(WBY_ACO_PREFIX.length);
25
- };
26
-
27
- //# sourceMappingURL=acoRecordId.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["WBY_ACO_PREFIX","attachAcoRecordPrefix","id","startsWith","removeAcoRecordPrefix","substring","length"],"sources":["acoRecordId.ts"],"sourcesContent":["/**\n * !!! DO NOT CHANGE THIS !!!\n * If this is changed, you will need to create new migration which changes the IDs for the users.\n *\n * packages/migrations/src/migrations/5.35.0/006/ddb/PageDataMigration.ts:236\n * packages/migrations/src/migrations/5.35.0/006/ddb-es/PageDataMigration.ts:419\n */\nconst WBY_ACO_PREFIX = \"wby-aco-\";\n/**\n * 006\n * PageDataMigration in ddb-es and ddb\n */\n\nexport const attachAcoRecordPrefix = (id: string) => {\n if (id.startsWith(WBY_ACO_PREFIX)) {\n return id;\n }\n return `${WBY_ACO_PREFIX}${id}`;\n};\n\nexport const removeAcoRecordPrefix = (id: string) => {\n if (id.startsWith(WBY_ACO_PREFIX) === false) {\n return id;\n }\n return id.substring(WBY_ACO_PREFIX.length);\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,cAAc,GAAG,UAAU;AACjC;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,qBAAqB,GAAIC,EAAU,IAAK;EACjD,IAAIA,EAAE,CAACC,UAAU,CAACH,cAAc,CAAC,EAAE;IAC/B,OAAOE,EAAE;EACb;EACA,OAAO,GAAGF,cAAc,GAAGE,EAAE,EAAE;AACnC,CAAC;AAED,OAAO,MAAME,qBAAqB,GAAIF,EAAU,IAAK;EACjD,IAAIA,EAAE,CAACC,UAAU,CAACH,cAAc,CAAC,KAAK,KAAK,EAAE;IACzC,OAAOE,EAAE;EACb;EACA,OAAOA,EAAE,CAACG,SAAS,CAACL,cAAc,CAACM,MAAM,CAAC;AAC9C,CAAC","ignoreList":[]}