@webiny/api-aco 6.4.0-beta.3 → 6.4.0-beta.5

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.
@@ -3,10 +3,11 @@ import { type ICreateFlpTaskInput } from "../../types.js";
3
3
  import { CreateFlpUseCase } from "../../features/flp/CreateFlp/index.js";
4
4
  declare class CreateFlpTaskImpl implements TaskDefinition.Interface<ICreateFlpTaskInput> {
5
5
  private createFlp;
6
- id: string;
7
- title: string;
8
- description: string;
9
- databaseLogs: boolean;
6
+ readonly id = "acoCreateFlp";
7
+ readonly title = "ACO - Create FLP record";
8
+ readonly description = "Synchronizes the FLP catalog by creating the FLP record based on the provided folder.";
9
+ readonly databaseLogs = false;
10
+ readonly isPrivate = true;
10
11
  readonly selfCleanup: ("onSuccess" | "onAbort")[];
11
12
  constructor(createFlp: CreateFlpUseCase.Interface);
12
13
  run({ input, controller }: TaskDefinition.RunParams<ICreateFlpTaskInput>): Promise<import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskResultError | import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskResultAborted | TaskDefinition.ResultContinue<ICreateFlpTaskInput> | TaskDefinition.ResultDone<import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskOutput>>;
@@ -8,6 +8,7 @@ class CreateFlpTaskImpl {
8
8
  this.title = "ACO - Create FLP record";
9
9
  this.description = "Synchronizes the FLP catalog by creating the FLP record based on the provided folder.";
10
10
  this.databaseLogs = false;
11
+ this.isPrivate = true;
11
12
  this.selfCleanup = [
12
13
  "onSuccess",
13
14
  "onAbort"
@@ -1 +1 @@
1
- {"version":3,"file":"flp/tasks/createFlp.task.js","sources":["../../../src/flp/tasks/createFlp.task.ts"],"sourcesContent":["import { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport { CREATE_FLP_TASK_ID } from \"~/flp/tasks/index.js\";\nimport { type ICreateFlpTaskInput } from \"~/types.js\";\nimport { CreateFlpUseCase } from \"~/features/flp/CreateFlp/index.js\";\n\nclass CreateFlpTaskImpl implements TaskDefinition.Interface<ICreateFlpTaskInput> {\n id = CREATE_FLP_TASK_ID;\n title = \"ACO - Create FLP record\";\n description =\n \"Synchronizes the FLP catalog by creating the FLP record based on the provided folder.\";\n databaseLogs = false;\n\n public readonly selfCleanup = [\"onSuccess\" as const, \"onAbort\" as const];\n\n constructor(private createFlp: CreateFlpUseCase.Interface) {}\n\n async run({ input, controller }: TaskDefinition.RunParams<ICreateFlpTaskInput>) {\n try {\n if (controller.runtime.isAborted()) {\n return controller.response.aborted();\n }\n\n if (controller.runtime.isCloseToTimeout()) {\n return controller.response.continue(input);\n }\n\n await this.createFlp.execute(input.folder);\n\n return controller.response.done(\"Task done: FLP record created.\");\n } catch (error) {\n return controller.response.error(error);\n }\n }\n}\n\nexport const CreateFlpTask = TaskDefinition.createImplementation({\n implementation: CreateFlpTaskImpl,\n dependencies: [CreateFlpUseCase]\n});\n"],"names":["CreateFlpTaskImpl","createFlp","CREATE_FLP_TASK_ID","input","controller","error","CreateFlpTask","TaskDefinition","CreateFlpUseCase"],"mappings":";;;AAKA,MAAMA;IASF,YAAoBC,SAAqC,CAAE;aAAvCA,SAAS,GAATA;aARpB,EAAE,GAAGC;aACL,KAAK,GAAG;aACR,WAAW,GACP;aACJ,YAAY,GAAG;aAEC,WAAW,GAAG;YAAC;YAAsB;SAAmB;IAEZ;IAE5D,MAAM,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAAiD,EAAE;QAC5E,IAAI;YACA,IAAIA,WAAW,OAAO,CAAC,SAAS,IAC5B,OAAOA,WAAW,QAAQ,CAAC,OAAO;YAGtC,IAAIA,WAAW,OAAO,CAAC,gBAAgB,IACnC,OAAOA,WAAW,QAAQ,CAAC,QAAQ,CAACD;YAGxC,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAACA,MAAM,MAAM;YAEzC,OAAOC,WAAW,QAAQ,CAAC,IAAI,CAAC;QACpC,EAAE,OAAOC,OAAO;YACZ,OAAOD,WAAW,QAAQ,CAAC,KAAK,CAACC;QACrC;IACJ;AACJ;AAEO,MAAMC,gBAAgBC,eAAe,oBAAoB,CAAC;IAC7D,gBAAgBP;IAChB,cAAc;QAACQ;KAAiB;AACpC"}
1
+ {"version":3,"file":"flp/tasks/createFlp.task.js","sources":["../../../src/flp/tasks/createFlp.task.ts"],"sourcesContent":["import { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport { CREATE_FLP_TASK_ID } from \"~/flp/tasks/index.js\";\nimport { type ICreateFlpTaskInput } from \"~/types.js\";\nimport { CreateFlpUseCase } from \"~/features/flp/CreateFlp/index.js\";\n\nclass CreateFlpTaskImpl implements TaskDefinition.Interface<ICreateFlpTaskInput> {\n public readonly id = CREATE_FLP_TASK_ID;\n public readonly title = \"ACO - Create FLP record\";\n public readonly description =\n \"Synchronizes the FLP catalog by creating the FLP record based on the provided folder.\";\n public readonly databaseLogs = false;\n public readonly isPrivate = true;\n public readonly selfCleanup = [\"onSuccess\" as const, \"onAbort\" as const];\n\n constructor(private createFlp: CreateFlpUseCase.Interface) {}\n\n async run({ input, controller }: TaskDefinition.RunParams<ICreateFlpTaskInput>) {\n try {\n if (controller.runtime.isAborted()) {\n return controller.response.aborted();\n }\n\n if (controller.runtime.isCloseToTimeout()) {\n return controller.response.continue(input);\n }\n\n await this.createFlp.execute(input.folder);\n\n return controller.response.done(\"Task done: FLP record created.\");\n } catch (error) {\n return controller.response.error(error);\n }\n }\n}\n\nexport const CreateFlpTask = TaskDefinition.createImplementation({\n implementation: CreateFlpTaskImpl,\n dependencies: [CreateFlpUseCase]\n});\n"],"names":["CreateFlpTaskImpl","createFlp","CREATE_FLP_TASK_ID","input","controller","error","CreateFlpTask","TaskDefinition","CreateFlpUseCase"],"mappings":";;;AAKA,MAAMA;IASF,YAAoBC,SAAqC,CAAE;aAAvCA,SAAS,GAATA;aARJ,EAAE,GAAGC;aACL,KAAK,GAAG;aACR,WAAW,GACvB;aACY,YAAY,GAAG;aACf,SAAS,GAAG;aACZ,WAAW,GAAG;YAAC;YAAsB;SAAmB;IAEZ;IAE5D,MAAM,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAAiD,EAAE;QAC5E,IAAI;YACA,IAAIA,WAAW,OAAO,CAAC,SAAS,IAC5B,OAAOA,WAAW,QAAQ,CAAC,OAAO;YAGtC,IAAIA,WAAW,OAAO,CAAC,gBAAgB,IACnC,OAAOA,WAAW,QAAQ,CAAC,QAAQ,CAACD;YAGxC,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAACA,MAAM,MAAM;YAEzC,OAAOC,WAAW,QAAQ,CAAC,IAAI,CAAC;QACpC,EAAE,OAAOC,OAAO;YACZ,OAAOD,WAAW,QAAQ,CAAC,KAAK,CAACC;QACrC;IACJ;AACJ;AAEO,MAAMC,gBAAgBC,eAAe,oBAAoB,CAAC;IAC7D,gBAAgBP;IAChB,cAAc;QAACQ;KAAiB;AACpC"}
@@ -3,10 +3,11 @@ import { type IDeleteFlpTaskInput } from "../../types.js";
3
3
  import { DeleteFlpUseCase } from "../../features/flp/DeleteFlp/index.js";
4
4
  declare class DeleteFlpTaskImpl implements TaskDefinition.Interface<IDeleteFlpTaskInput> {
5
5
  private deleteFlp;
6
- id: string;
7
- title: string;
8
- description: string;
9
- databaseLogs: boolean;
6
+ readonly id = "acoDeleteFlp";
7
+ readonly title = "ACO - Delete FLP record";
8
+ readonly description = "Synchronizes the FLP catalog by deleting the FLP record based on the provided folder.";
9
+ readonly databaseLogs = false;
10
+ readonly isPrivate = true;
10
11
  readonly selfCleanup: ("onSuccess" | "onAbort")[];
11
12
  constructor(deleteFlp: DeleteFlpUseCase.Interface);
12
13
  run({ input, controller }: TaskDefinition.RunParams<IDeleteFlpTaskInput>): Promise<import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskResultError | import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskResultAborted | TaskDefinition.ResultDone<import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskOutput> | TaskDefinition.ResultContinue<IDeleteFlpTaskInput>>;
@@ -8,6 +8,7 @@ class DeleteFlpTaskImpl {
8
8
  this.title = "ACO - Delete FLP record";
9
9
  this.description = "Synchronizes the FLP catalog by deleting the FLP record based on the provided folder.";
10
10
  this.databaseLogs = false;
11
+ this.isPrivate = true;
11
12
  this.selfCleanup = [
12
13
  "onSuccess",
13
14
  "onAbort"
@@ -1 +1 @@
1
- {"version":3,"file":"flp/tasks/deleteFlp.task.js","sources":["../../../src/flp/tasks/deleteFlp.task.ts"],"sourcesContent":["import { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport { DELETE_FLP_TASK_ID } from \"~/flp/tasks/index.js\";\nimport { type IDeleteFlpTaskInput } from \"~/types.js\";\nimport { DeleteFlpUseCase } from \"~/features/flp/DeleteFlp/index.js\";\n\nclass DeleteFlpTaskImpl implements TaskDefinition.Interface<IDeleteFlpTaskInput> {\n id = DELETE_FLP_TASK_ID;\n title = \"ACO - Delete FLP record\";\n description =\n \"Synchronizes the FLP catalog by deleting the FLP record based on the provided folder.\";\n databaseLogs = false;\n\n public readonly selfCleanup = [\"onSuccess\" as const, \"onAbort\" as const];\n\n constructor(private deleteFlp: DeleteFlpUseCase.Interface) {}\n\n async run({ input, controller }: TaskDefinition.RunParams<IDeleteFlpTaskInput>) {\n try {\n if (controller.runtime.isAborted()) {\n return controller.response.aborted();\n }\n\n if (controller.runtime.isCloseToTimeout()) {\n return controller.response.continue(input);\n }\n\n await this.deleteFlp.execute(input.folder);\n\n return controller.response.done(\"Task done: FLP record deleted.\");\n } catch (error) {\n return controller.response.error(error);\n }\n }\n}\n\nexport const DeleteFlpTask = TaskDefinition.createImplementation({\n implementation: DeleteFlpTaskImpl,\n dependencies: [DeleteFlpUseCase]\n});\n"],"names":["DeleteFlpTaskImpl","deleteFlp","DELETE_FLP_TASK_ID","input","controller","error","DeleteFlpTask","TaskDefinition","DeleteFlpUseCase"],"mappings":";;;AAKA,MAAMA;IASF,YAAoBC,SAAqC,CAAE;aAAvCA,SAAS,GAATA;aARpB,EAAE,GAAGC;aACL,KAAK,GAAG;aACR,WAAW,GACP;aACJ,YAAY,GAAG;aAEC,WAAW,GAAG;YAAC;YAAsB;SAAmB;IAEZ;IAE5D,MAAM,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAAiD,EAAE;QAC5E,IAAI;YACA,IAAIA,WAAW,OAAO,CAAC,SAAS,IAC5B,OAAOA,WAAW,QAAQ,CAAC,OAAO;YAGtC,IAAIA,WAAW,OAAO,CAAC,gBAAgB,IACnC,OAAOA,WAAW,QAAQ,CAAC,QAAQ,CAACD;YAGxC,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAACA,MAAM,MAAM;YAEzC,OAAOC,WAAW,QAAQ,CAAC,IAAI,CAAC;QACpC,EAAE,OAAOC,OAAO;YACZ,OAAOD,WAAW,QAAQ,CAAC,KAAK,CAACC;QACrC;IACJ;AACJ;AAEO,MAAMC,gBAAgBC,eAAe,oBAAoB,CAAC;IAC7D,gBAAgBP;IAChB,cAAc;QAACQ;KAAiB;AACpC"}
1
+ {"version":3,"file":"flp/tasks/deleteFlp.task.js","sources":["../../../src/flp/tasks/deleteFlp.task.ts"],"sourcesContent":["import { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport { DELETE_FLP_TASK_ID } from \"~/flp/tasks/index.js\";\nimport { type IDeleteFlpTaskInput } from \"~/types.js\";\nimport { DeleteFlpUseCase } from \"~/features/flp/DeleteFlp/index.js\";\n\nclass DeleteFlpTaskImpl implements TaskDefinition.Interface<IDeleteFlpTaskInput> {\n public readonly id = DELETE_FLP_TASK_ID;\n public readonly title = \"ACO - Delete FLP record\";\n public readonly description =\n \"Synchronizes the FLP catalog by deleting the FLP record based on the provided folder.\";\n public readonly databaseLogs = false;\n public readonly isPrivate = true;\n public readonly selfCleanup = [\"onSuccess\" as const, \"onAbort\" as const];\n\n constructor(private deleteFlp: DeleteFlpUseCase.Interface) {}\n\n async run({ input, controller }: TaskDefinition.RunParams<IDeleteFlpTaskInput>) {\n try {\n if (controller.runtime.isAborted()) {\n return controller.response.aborted();\n }\n\n if (controller.runtime.isCloseToTimeout()) {\n return controller.response.continue(input);\n }\n\n await this.deleteFlp.execute(input.folder);\n\n return controller.response.done(\"Task done: FLP record deleted.\");\n } catch (error) {\n return controller.response.error(error);\n }\n }\n}\n\nexport const DeleteFlpTask = TaskDefinition.createImplementation({\n implementation: DeleteFlpTaskImpl,\n dependencies: [DeleteFlpUseCase]\n});\n"],"names":["DeleteFlpTaskImpl","deleteFlp","DELETE_FLP_TASK_ID","input","controller","error","DeleteFlpTask","TaskDefinition","DeleteFlpUseCase"],"mappings":";;;AAKA,MAAMA;IASF,YAAoBC,SAAqC,CAAE;aAAvCA,SAAS,GAATA;aARJ,EAAE,GAAGC;aACL,KAAK,GAAG;aACR,WAAW,GACvB;aACY,YAAY,GAAG;aACf,SAAS,GAAG;aACZ,WAAW,GAAG;YAAC;YAAsB;SAAmB;IAEZ;IAE5D,MAAM,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAAiD,EAAE;QAC5E,IAAI;YACA,IAAIA,WAAW,OAAO,CAAC,SAAS,IAC5B,OAAOA,WAAW,QAAQ,CAAC,OAAO;YAGtC,IAAIA,WAAW,OAAO,CAAC,gBAAgB,IACnC,OAAOA,WAAW,QAAQ,CAAC,QAAQ,CAACD;YAGxC,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAACA,MAAM,MAAM;YAEzC,OAAOC,WAAW,QAAQ,CAAC,IAAI,CAAC;QACpC,EAAE,OAAOC,OAAO;YACZ,OAAOD,WAAW,QAAQ,CAAC,KAAK,CAACC;QACrC;IACJ;AACJ;AAEO,MAAMC,gBAAgBC,eAAe,oBAAoB,CAAC;IAC7D,gBAAgBP;IAChB,cAAc;QAACQ;KAAiB;AACpC"}
@@ -7,11 +7,12 @@ declare class SyncFlpTaskImpl implements TaskDefinition.Interface<ISyncFlpTaskIn
7
7
  private getFolder;
8
8
  private listFolders;
9
9
  private listModels;
10
- id: string;
11
- title: string;
12
- description: string;
13
- databaseLogs: boolean;
14
- selfCleanup: ("onSuccess" | "onAbort")[];
10
+ readonly id = "acoSyncFlp";
11
+ readonly title = "ACO - Sync FLP record";
12
+ readonly description = "Synchronizes the FLP catalog by updating the FLP record and its descendants.";
13
+ readonly databaseLogs = false;
14
+ readonly isPrivate = true;
15
+ readonly selfCleanup: ("onSuccess" | "onAbort")[];
15
16
  constructor(getFolder: GetFolderUseCase.Interface, listFolders: ListFoldersUseCase.Interface, listModels: ListModelsUseCase.Interface);
16
17
  run({ input, controller }: TaskDefinition.RunParams<ISyncFlpTaskInput>): Promise<import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskResultError | import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskResultAborted | TaskDefinition.ResultDone<import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskOutput>>;
17
18
  }
@@ -13,6 +13,7 @@ class SyncFlpTaskImpl {
13
13
  this.title = "ACO - Sync FLP record";
14
14
  this.description = "Synchronizes the FLP catalog by updating the FLP record and its descendants.";
15
15
  this.databaseLogs = false;
16
+ this.isPrivate = true;
16
17
  this.selfCleanup = [
17
18
  "onSuccess",
18
19
  "onAbort"
@@ -1 +1 @@
1
- {"version":3,"file":"flp/tasks/syncFlp.task.js","sources":["../../../src/flp/tasks/syncFlp.task.ts"],"sourcesContent":["import { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport { ListModelsUseCase } from \"@webiny/api-headless-cms/features/contentModel/ListModels/index.js\";\nimport { SYNC_FLP_TASK_ID, UPDATE_FLP_TASK_ID } from \"~/flp/tasks/index.js\";\nimport { type ISyncFlpTaskInput, type IUpdateFlpTaskInput } from \"~/types.js\";\nimport { FM_FILE_TYPE } from \"~/constants.js\";\nimport { GetFolderUseCase } from \"~/features/folder/GetFolder/index.js\";\nimport { ListFoldersUseCase } from \"~/features/folder/ListFolders/index.js\";\n\nclass SyncFlpTaskImpl implements TaskDefinition.Interface<ISyncFlpTaskInput> {\n id = SYNC_FLP_TASK_ID;\n title = \"ACO - Sync FLP record\";\n description = \"Synchronizes the FLP catalog by updating the FLP record and its descendants.\";\n databaseLogs = false;\n\n selfCleanup = [\"onSuccess\" as const, \"onAbort\" as const];\n\n constructor(\n private getFolder: GetFolderUseCase.Interface,\n private listFolders: ListFoldersUseCase.Interface,\n private listModels: ListModelsUseCase.Interface\n ) {}\n\n async run({ input, controller }: TaskDefinition.RunParams<ISyncFlpTaskInput>) {\n try {\n if (controller.runtime.isAborted()) {\n return controller.response.aborted();\n }\n\n /**\n * `folderId` provided in the task input. We need to:\n *\n * - update the FLP records for the found folder and all its descendants.\n */\n if (input.folderId) {\n const result = await this.getFolder.execute(input.folderId!);\n const folder = result.value;\n\n await controller.task.trigger<IUpdateFlpTaskInput>({\n definition: UPDATE_FLP_TASK_ID,\n input: {\n folder\n }\n });\n\n return controller.response.done(\n `Task completed successfully: all FLP records for folderId \"${input.folderId}\" and its children have been queued to be synchronized.`\n );\n }\n\n /**\n * Full update required. We need to:\n *\n * - list cms models to collect their types, together with the default ones [FM_FILE_TYPE]\n * - list all root folders\n * - update the FLP records for the found folders and all its descendants.\n */\n if (input.type && input.type === \"*\") {\n // Some folder types are fixed: pages and files.\n const folderTypes = [FM_FILE_TYPE];\n\n // List all non-private models\n const modelsResult = await this.listModels.execute();\n if (modelsResult.isOk()) {\n const models = modelsResult.value;\n for (const model of models) {\n folderTypes.push(`cms:${model.modelId}`);\n }\n }\n\n for (const folderType of folderTypes) {\n const result = await this.listFolders.execute({\n where: {\n type: folderType,\n parentId: null\n }\n });\n\n const { folders } = result.value;\n\n for (const folder of folders) {\n await controller.task.trigger<IUpdateFlpTaskInput>({\n definition: UPDATE_FLP_TASK_ID,\n input: {\n folder\n }\n });\n }\n\n await controller.logger.info({\n message: `FLP Update task triggered for type ${folderType}`,\n data: {\n type: folderType\n }\n });\n }\n\n return controller.response.done(\n `Task completed successfully: all FLP records have been queued to be synchronized.`\n );\n }\n\n /**\n * `type` provided in the task input. We need to:\n *\n * - list all root folders for the provided type\n * - update the FLP records for the found folders and all its descendants.\n */\n if (input.type) {\n const result = await this.listFolders.execute({\n where: {\n type: input.type!,\n parentId: null\n }\n });\n\n const { folders } = result.value;\n\n for (const folder of folders) {\n await controller.task.trigger<IUpdateFlpTaskInput>({\n definition: UPDATE_FLP_TASK_ID,\n input: {\n folder\n }\n });\n }\n\n return controller.response.done(\n `Task completed successfully: all FLP records for type \"${input.type}\" have been queued to be synchronized.`\n );\n }\n\n return controller.response.error(\n \"Invalid input: please provide either `type` or `folderId`.\"\n );\n } catch (error) {\n return controller.response.error(error);\n }\n }\n}\n\nexport const SyncFlpTask = TaskDefinition.createImplementation({\n implementation: SyncFlpTaskImpl,\n dependencies: [GetFolderUseCase, ListFoldersUseCase, ListModelsUseCase]\n});\n"],"names":["SyncFlpTaskImpl","getFolder","listFolders","listModels","SYNC_FLP_TASK_ID","input","controller","result","folder","UPDATE_FLP_TASK_ID","folderTypes","FM_FILE_TYPE","modelsResult","models","model","folderType","folders","error","SyncFlpTask","TaskDefinition","GetFolderUseCase","ListFoldersUseCase","ListModelsUseCase"],"mappings":";;;;;;AAQA,MAAMA;IAQF,YACYC,SAAqC,EACrCC,WAAyC,EACzCC,UAAuC,CACjD;aAHUF,SAAS,GAATA;aACAC,WAAW,GAAXA;aACAC,UAAU,GAAVA;aAVZ,EAAE,GAAGC;aACL,KAAK,GAAG;aACR,WAAW,GAAG;aACd,YAAY,GAAG;aAEf,WAAW,GAAG;YAAC;YAAsB;SAAmB;IAMrD;IAEH,MAAM,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAA+C,EAAE;QAC1E,IAAI;YACA,IAAIA,WAAW,OAAO,CAAC,SAAS,IAC5B,OAAOA,WAAW,QAAQ,CAAC,OAAO;YAQtC,IAAID,MAAM,QAAQ,EAAE;gBAChB,MAAME,SAAS,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAACF,MAAM,QAAQ;gBAC1D,MAAMG,SAASD,OAAO,KAAK;gBAE3B,MAAMD,WAAW,IAAI,CAAC,OAAO,CAAsB;oBAC/C,YAAYG;oBACZ,OAAO;wBACHD;oBACJ;gBACJ;gBAEA,OAAOF,WAAW,QAAQ,CAAC,IAAI,CAC3B,CAAC,2DAA2D,EAAED,MAAM,QAAQ,CAAC,uDAAuD,CAAC;YAE7I;YASA,IAAIA,MAAM,IAAI,IAAIA,AAAe,QAAfA,MAAM,IAAI,EAAU;gBAElC,MAAMK,cAAc;oBAACC;iBAAa;gBAGlC,MAAMC,eAAe,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO;gBAClD,IAAIA,aAAa,IAAI,IAAI;oBACrB,MAAMC,SAASD,aAAa,KAAK;oBACjC,KAAK,MAAME,SAASD,OAChBH,YAAY,IAAI,CAAC,CAAC,IAAI,EAAEI,MAAM,OAAO,EAAE;gBAE/C;gBAEA,KAAK,MAAMC,cAAcL,YAAa;oBAClC,MAAMH,SAAS,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;wBAC1C,OAAO;4BACH,MAAMQ;4BACN,UAAU;wBACd;oBACJ;oBAEA,MAAM,EAAEC,OAAO,EAAE,GAAGT,OAAO,KAAK;oBAEhC,KAAK,MAAMC,UAAUQ,QACjB,MAAMV,WAAW,IAAI,CAAC,OAAO,CAAsB;wBAC/C,YAAYG;wBACZ,OAAO;4BACHD;wBACJ;oBACJ;oBAGJ,MAAMF,WAAW,MAAM,CAAC,IAAI,CAAC;wBACzB,SAAS,CAAC,mCAAmC,EAAES,YAAY;wBAC3D,MAAM;4BACF,MAAMA;wBACV;oBACJ;gBACJ;gBAEA,OAAOT,WAAW,QAAQ,CAAC,IAAI,CAC3B;YAER;YAQA,IAAID,MAAM,IAAI,EAAE;gBACZ,MAAME,SAAS,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;oBAC1C,OAAO;wBACH,MAAMF,MAAM,IAAI;wBAChB,UAAU;oBACd;gBACJ;gBAEA,MAAM,EAAEW,OAAO,EAAE,GAAGT,OAAO,KAAK;gBAEhC,KAAK,MAAMC,UAAUQ,QACjB,MAAMV,WAAW,IAAI,CAAC,OAAO,CAAsB;oBAC/C,YAAYG;oBACZ,OAAO;wBACHD;oBACJ;gBACJ;gBAGJ,OAAOF,WAAW,QAAQ,CAAC,IAAI,CAC3B,CAAC,uDAAuD,EAAED,MAAM,IAAI,CAAC,sCAAsC,CAAC;YAEpH;YAEA,OAAOC,WAAW,QAAQ,CAAC,KAAK,CAC5B;QAER,EAAE,OAAOW,OAAO;YACZ,OAAOX,WAAW,QAAQ,CAAC,KAAK,CAACW;QACrC;IACJ;AACJ;AAEO,MAAMC,cAAcC,eAAe,oBAAoB,CAAC;IAC3D,gBAAgBnB;IAChB,cAAc;QAACoB;QAAkBC;QAAoBC;KAAkB;AAC3E"}
1
+ {"version":3,"file":"flp/tasks/syncFlp.task.js","sources":["../../../src/flp/tasks/syncFlp.task.ts"],"sourcesContent":["import { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport { ListModelsUseCase } from \"@webiny/api-headless-cms/features/contentModel/ListModels/index.js\";\nimport { SYNC_FLP_TASK_ID, UPDATE_FLP_TASK_ID } from \"~/flp/tasks/index.js\";\nimport { type ISyncFlpTaskInput, type IUpdateFlpTaskInput } from \"~/types.js\";\nimport { FM_FILE_TYPE } from \"~/constants.js\";\nimport { GetFolderUseCase } from \"~/features/folder/GetFolder/index.js\";\nimport { ListFoldersUseCase } from \"~/features/folder/ListFolders/index.js\";\n\nclass SyncFlpTaskImpl implements TaskDefinition.Interface<ISyncFlpTaskInput> {\n public readonly id = SYNC_FLP_TASK_ID;\n public readonly title = \"ACO - Sync FLP record\";\n public readonly description =\n \"Synchronizes the FLP catalog by updating the FLP record and its descendants.\";\n public readonly databaseLogs = false;\n public readonly isPrivate = true;\n public readonly selfCleanup = [\"onSuccess\" as const, \"onAbort\" as const];\n\n public constructor(\n private getFolder: GetFolderUseCase.Interface,\n private listFolders: ListFoldersUseCase.Interface,\n private listModels: ListModelsUseCase.Interface\n ) {}\n\n async run({ input, controller }: TaskDefinition.RunParams<ISyncFlpTaskInput>) {\n try {\n if (controller.runtime.isAborted()) {\n return controller.response.aborted();\n }\n\n /**\n * `folderId` provided in the task input. We need to:\n *\n * - update the FLP records for the found folder and all its descendants.\n */\n if (input.folderId) {\n const result = await this.getFolder.execute(input.folderId!);\n const folder = result.value;\n\n await controller.task.trigger<IUpdateFlpTaskInput>({\n definition: UPDATE_FLP_TASK_ID,\n input: {\n folder\n }\n });\n\n return controller.response.done(\n `Task completed successfully: all FLP records for folderId \"${input.folderId}\" and its children have been queued to be synchronized.`\n );\n }\n\n /**\n * Full update required. We need to:\n *\n * - list cms models to collect their types, together with the default ones [FM_FILE_TYPE]\n * - list all root folders\n * - update the FLP records for the found folders and all its descendants.\n */\n if (input.type && input.type === \"*\") {\n // Some folder types are fixed: pages and files.\n const folderTypes = [FM_FILE_TYPE];\n\n // List all non-private models\n const modelsResult = await this.listModels.execute();\n if (modelsResult.isOk()) {\n const models = modelsResult.value;\n for (const model of models) {\n folderTypes.push(`cms:${model.modelId}`);\n }\n }\n\n for (const folderType of folderTypes) {\n const result = await this.listFolders.execute({\n where: {\n type: folderType,\n parentId: null\n }\n });\n\n const { folders } = result.value;\n\n for (const folder of folders) {\n await controller.task.trigger<IUpdateFlpTaskInput>({\n definition: UPDATE_FLP_TASK_ID,\n input: {\n folder\n }\n });\n }\n\n await controller.logger.info({\n message: `FLP Update task triggered for type ${folderType}`,\n data: {\n type: folderType\n }\n });\n }\n\n return controller.response.done(\n `Task completed successfully: all FLP records have been queued to be synchronized.`\n );\n }\n\n /**\n * `type` provided in the task input. We need to:\n *\n * - list all root folders for the provided type\n * - update the FLP records for the found folders and all its descendants.\n */\n if (input.type) {\n const result = await this.listFolders.execute({\n where: {\n type: input.type!,\n parentId: null\n }\n });\n\n const { folders } = result.value;\n\n for (const folder of folders) {\n await controller.task.trigger<IUpdateFlpTaskInput>({\n definition: UPDATE_FLP_TASK_ID,\n input: {\n folder\n }\n });\n }\n\n return controller.response.done(\n `Task completed successfully: all FLP records for type \"${input.type}\" have been queued to be synchronized.`\n );\n }\n\n return controller.response.error(\n \"Invalid input: please provide either `type` or `folderId`.\"\n );\n } catch (error) {\n return controller.response.error(error);\n }\n }\n}\n\nexport const SyncFlpTask = TaskDefinition.createImplementation({\n implementation: SyncFlpTaskImpl,\n dependencies: [GetFolderUseCase, ListFoldersUseCase, ListModelsUseCase]\n});\n"],"names":["SyncFlpTaskImpl","getFolder","listFolders","listModels","SYNC_FLP_TASK_ID","input","controller","result","folder","UPDATE_FLP_TASK_ID","folderTypes","FM_FILE_TYPE","modelsResult","models","model","folderType","folders","error","SyncFlpTask","TaskDefinition","GetFolderUseCase","ListFoldersUseCase","ListModelsUseCase"],"mappings":";;;;;;AAQA,MAAMA;IASF,YACYC,SAAqC,EACrCC,WAAyC,EACzCC,UAAuC,CACjD;aAHUF,SAAS,GAATA;aACAC,WAAW,GAAXA;aACAC,UAAU,GAAVA;aAXI,EAAE,GAAGC;aACL,KAAK,GAAG;aACR,WAAW,GACvB;aACY,YAAY,GAAG;aACf,SAAS,GAAG;aACZ,WAAW,GAAG;YAAC;YAAsB;SAAmB;IAMrE;IAEH,MAAM,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAA+C,EAAE;QAC1E,IAAI;YACA,IAAIA,WAAW,OAAO,CAAC,SAAS,IAC5B,OAAOA,WAAW,QAAQ,CAAC,OAAO;YAQtC,IAAID,MAAM,QAAQ,EAAE;gBAChB,MAAME,SAAS,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAACF,MAAM,QAAQ;gBAC1D,MAAMG,SAASD,OAAO,KAAK;gBAE3B,MAAMD,WAAW,IAAI,CAAC,OAAO,CAAsB;oBAC/C,YAAYG;oBACZ,OAAO;wBACHD;oBACJ;gBACJ;gBAEA,OAAOF,WAAW,QAAQ,CAAC,IAAI,CAC3B,CAAC,2DAA2D,EAAED,MAAM,QAAQ,CAAC,uDAAuD,CAAC;YAE7I;YASA,IAAIA,MAAM,IAAI,IAAIA,AAAe,QAAfA,MAAM,IAAI,EAAU;gBAElC,MAAMK,cAAc;oBAACC;iBAAa;gBAGlC,MAAMC,eAAe,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO;gBAClD,IAAIA,aAAa,IAAI,IAAI;oBACrB,MAAMC,SAASD,aAAa,KAAK;oBACjC,KAAK,MAAME,SAASD,OAChBH,YAAY,IAAI,CAAC,CAAC,IAAI,EAAEI,MAAM,OAAO,EAAE;gBAE/C;gBAEA,KAAK,MAAMC,cAAcL,YAAa;oBAClC,MAAMH,SAAS,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;wBAC1C,OAAO;4BACH,MAAMQ;4BACN,UAAU;wBACd;oBACJ;oBAEA,MAAM,EAAEC,OAAO,EAAE,GAAGT,OAAO,KAAK;oBAEhC,KAAK,MAAMC,UAAUQ,QACjB,MAAMV,WAAW,IAAI,CAAC,OAAO,CAAsB;wBAC/C,YAAYG;wBACZ,OAAO;4BACHD;wBACJ;oBACJ;oBAGJ,MAAMF,WAAW,MAAM,CAAC,IAAI,CAAC;wBACzB,SAAS,CAAC,mCAAmC,EAAES,YAAY;wBAC3D,MAAM;4BACF,MAAMA;wBACV;oBACJ;gBACJ;gBAEA,OAAOT,WAAW,QAAQ,CAAC,IAAI,CAC3B;YAER;YAQA,IAAID,MAAM,IAAI,EAAE;gBACZ,MAAME,SAAS,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;oBAC1C,OAAO;wBACH,MAAMF,MAAM,IAAI;wBAChB,UAAU;oBACd;gBACJ;gBAEA,MAAM,EAAEW,OAAO,EAAE,GAAGT,OAAO,KAAK;gBAEhC,KAAK,MAAMC,UAAUQ,QACjB,MAAMV,WAAW,IAAI,CAAC,OAAO,CAAsB;oBAC/C,YAAYG;oBACZ,OAAO;wBACHD;oBACJ;gBACJ;gBAGJ,OAAOF,WAAW,QAAQ,CAAC,IAAI,CAC3B,CAAC,uDAAuD,EAAED,MAAM,IAAI,CAAC,sCAAsC,CAAC;YAEpH;YAEA,OAAOC,WAAW,QAAQ,CAAC,KAAK,CAC5B;QAER,EAAE,OAAOW,OAAO;YACZ,OAAOX,WAAW,QAAQ,CAAC,KAAK,CAACW;QACrC;IACJ;AACJ;AAEO,MAAMC,cAAcC,eAAe,oBAAoB,CAAC;IAC3D,gBAAgBnB;IAChB,cAAc;QAACoB;QAAkBC;QAAoBC;KAAkB;AAC3E"}
@@ -3,11 +3,12 @@ import { type IUpdateFlpTaskInput } from "../../types.js";
3
3
  import { UpdateFlpUseCase } from "../../features/flp/UpdateFlp/index.js";
4
4
  declare class UpdateFlpTaskImpl implements TaskDefinition.Interface<IUpdateFlpTaskInput> {
5
5
  private updateFlp;
6
- id: string;
7
- title: string;
8
- description: string;
9
- databaseLogs: boolean;
10
- selfCleanup: ("onSuccess" | "onAbort")[];
6
+ readonly id = "acoUpdateFlp";
7
+ readonly title = "ACO - Update FLP record";
8
+ readonly description = "Synchronizes the FLP catalog by updating the FLP record and its descendants based on the provided folder.";
9
+ readonly databaseLogs = false;
10
+ readonly isPrivate = true;
11
+ readonly selfCleanup: ("onSuccess" | "onAbort")[];
11
12
  constructor(updateFlp: UpdateFlpUseCase.Interface);
12
13
  run({ input, controller }: TaskDefinition.RunParams<IUpdateFlpTaskInput>): Promise<import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskResultError | import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskResultAborted | TaskDefinition.ResultDone<import("@webiny/api-core/features/task/TaskDefinition/abstractions").ITaskOutput>>;
13
14
  }
@@ -8,6 +8,7 @@ class UpdateFlpTaskImpl {
8
8
  this.title = "ACO - Update FLP record";
9
9
  this.description = "Synchronizes the FLP catalog by updating the FLP record and its descendants based on the provided folder.";
10
10
  this.databaseLogs = false;
11
+ this.isPrivate = true;
11
12
  this.selfCleanup = [
12
13
  "onSuccess",
13
14
  "onAbort"
@@ -1 +1 @@
1
- {"version":3,"file":"flp/tasks/updateFlp.task.js","sources":["../../../src/flp/tasks/updateFlp.task.ts"],"sourcesContent":["import { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport { UPDATE_FLP_TASK_ID } from \"~/flp/tasks/index.js\";\nimport { type IUpdateFlpTaskInput } from \"~/types.js\";\nimport { UpdateFlpUseCase } from \"~/features/flp/UpdateFlp/index.js\";\n\nclass UpdateFlpTaskImpl implements TaskDefinition.Interface<IUpdateFlpTaskInput> {\n id = UPDATE_FLP_TASK_ID;\n title = \"ACO - Update FLP record\";\n description =\n \"Synchronizes the FLP catalog by updating the FLP record and its descendants based on the provided folder.\";\n databaseLogs = false;\n\n selfCleanup = [\"onSuccess\" as const, \"onAbort\" as const];\n\n constructor(private updateFlp: UpdateFlpUseCase.Interface) {}\n\n async run({ input, controller }: TaskDefinition.RunParams<IUpdateFlpTaskInput>) {\n try {\n if (controller.runtime.isAborted()) {\n return controller.response.aborted();\n }\n\n await this.updateFlp.execute({\n folder: input.folder,\n queued: input.queued,\n isCloseToTimeout: controller.runtime.isCloseToTimeout,\n handleTimeout: queued => controller.response.continue({ ...input, queued })\n });\n\n return controller.response.done(\"Task done: FLP record updated.\");\n } catch (error) {\n return controller.response.error(error);\n }\n }\n}\n\nexport const UpdateFlpTask = TaskDefinition.createImplementation({\n implementation: UpdateFlpTaskImpl,\n dependencies: [UpdateFlpUseCase]\n});\n"],"names":["UpdateFlpTaskImpl","updateFlp","UPDATE_FLP_TASK_ID","input","controller","queued","error","UpdateFlpTask","TaskDefinition","UpdateFlpUseCase"],"mappings":";;;AAKA,MAAMA;IASF,YAAoBC,SAAqC,CAAE;aAAvCA,SAAS,GAATA;aARpB,EAAE,GAAGC;aACL,KAAK,GAAG;aACR,WAAW,GACP;aACJ,YAAY,GAAG;aAEf,WAAW,GAAG;YAAC;YAAsB;SAAmB;IAEI;IAE5D,MAAM,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAAiD,EAAE;QAC5E,IAAI;YACA,IAAIA,WAAW,OAAO,CAAC,SAAS,IAC5B,OAAOA,WAAW,QAAQ,CAAC,OAAO;YAGtC,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;gBACzB,QAAQD,MAAM,MAAM;gBACpB,QAAQA,MAAM,MAAM;gBACpB,kBAAkBC,WAAW,OAAO,CAAC,gBAAgB;gBACrD,eAAeC,CAAAA,SAAUD,WAAW,QAAQ,CAAC,QAAQ,CAAC;wBAAE,GAAGD,KAAK;wBAAEE;oBAAO;YAC7E;YAEA,OAAOD,WAAW,QAAQ,CAAC,IAAI,CAAC;QACpC,EAAE,OAAOE,OAAO;YACZ,OAAOF,WAAW,QAAQ,CAAC,KAAK,CAACE;QACrC;IACJ;AACJ;AAEO,MAAMC,gBAAgBC,eAAe,oBAAoB,CAAC;IAC7D,gBAAgBR;IAChB,cAAc;QAACS;KAAiB;AACpC"}
1
+ {"version":3,"file":"flp/tasks/updateFlp.task.js","sources":["../../../src/flp/tasks/updateFlp.task.ts"],"sourcesContent":["import { TaskDefinition } from \"@webiny/api-core/features/task/TaskDefinition/index.js\";\nimport { UPDATE_FLP_TASK_ID } from \"~/flp/tasks/index.js\";\nimport { type IUpdateFlpTaskInput } from \"~/types.js\";\nimport { UpdateFlpUseCase } from \"~/features/flp/UpdateFlp/index.js\";\n\nclass UpdateFlpTaskImpl implements TaskDefinition.Interface<IUpdateFlpTaskInput> {\n public readonly id = UPDATE_FLP_TASK_ID;\n public readonly title = \"ACO - Update FLP record\";\n public readonly description =\n \"Synchronizes the FLP catalog by updating the FLP record and its descendants based on the provided folder.\";\n public readonly databaseLogs = false;\n public readonly isPrivate = true;\n public readonly selfCleanup = [\"onSuccess\" as const, \"onAbort\" as const];\n\n public constructor(private updateFlp: UpdateFlpUseCase.Interface) {}\n\n async run({ input, controller }: TaskDefinition.RunParams<IUpdateFlpTaskInput>) {\n try {\n if (controller.runtime.isAborted()) {\n return controller.response.aborted();\n }\n\n await this.updateFlp.execute({\n folder: input.folder,\n queued: input.queued,\n isCloseToTimeout: controller.runtime.isCloseToTimeout,\n handleTimeout: queued => controller.response.continue({ ...input, queued })\n });\n\n return controller.response.done(\"Task done: FLP record updated.\");\n } catch (error) {\n return controller.response.error(error);\n }\n }\n}\n\nexport const UpdateFlpTask = TaskDefinition.createImplementation({\n implementation: UpdateFlpTaskImpl,\n dependencies: [UpdateFlpUseCase]\n});\n"],"names":["UpdateFlpTaskImpl","updateFlp","UPDATE_FLP_TASK_ID","input","controller","queued","error","UpdateFlpTask","TaskDefinition","UpdateFlpUseCase"],"mappings":";;;AAKA,MAAMA;IASF,YAA2BC,SAAqC,CAAE;aAAvCA,SAAS,GAATA;aARX,EAAE,GAAGC;aACL,KAAK,GAAG;aACR,WAAW,GACvB;aACY,YAAY,GAAG;aACf,SAAS,GAAG;aACZ,WAAW,GAAG;YAAC;YAAsB;SAAmB;IAEL;IAEnE,MAAM,IAAI,EAAEC,KAAK,EAAEC,UAAU,EAAiD,EAAE;QAC5E,IAAI;YACA,IAAIA,WAAW,OAAO,CAAC,SAAS,IAC5B,OAAOA,WAAW,QAAQ,CAAC,OAAO;YAGtC,MAAM,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;gBACzB,QAAQD,MAAM,MAAM;gBACpB,QAAQA,MAAM,MAAM;gBACpB,kBAAkBC,WAAW,OAAO,CAAC,gBAAgB;gBACrD,eAAeC,CAAAA,SAAUD,WAAW,QAAQ,CAAC,QAAQ,CAAC;wBAAE,GAAGD,KAAK;wBAAEE;oBAAO;YAC7E;YAEA,OAAOD,WAAW,QAAQ,CAAC,IAAI,CAAC;QACpC,EAAE,OAAOE,OAAO;YACZ,OAAOF,WAAW,QAAQ,CAAC,KAAK,CAACE;QACrC;IACJ;AACJ;AAEO,MAAMC,gBAAgBC,eAAe,oBAAoB,CAAC;IAC7D,gBAAgBR;IAChB,cAAc;QAACS;KAAiB;AACpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-aco",
3
- "version": "6.4.0-beta.3",
3
+ "version": "6.4.0-beta.5",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "aco:base"
@@ -14,42 +14,43 @@
14
14
  "author": "Webiny Ltd.",
15
15
  "license": "MIT",
16
16
  "publishConfig": {
17
- "access": "public",
18
- "directory": "dist"
17
+ "access": "public"
19
18
  },
20
19
  "exports": {
21
20
  "./*": "./*",
22
21
  ".": "./index.js"
23
22
  },
24
23
  "dependencies": {
25
- "@webiny/api": "6.4.0-beta.3",
26
- "@webiny/api-core": "6.4.0-beta.3",
27
- "@webiny/api-headless-cms": "6.4.0-beta.3",
28
- "@webiny/aws-sdk": "6.4.0-beta.3",
29
- "@webiny/db-dynamodb": "6.4.0-beta.3",
24
+ "@webiny/api": "6.4.0-beta.5",
25
+ "@webiny/api-core": "6.4.0-beta.5",
26
+ "@webiny/api-headless-cms": "6.4.0-beta.5",
27
+ "@webiny/aws-sdk": "6.4.0-beta.5",
28
+ "@webiny/background-tasks": "6.4.0-beta.5",
29
+ "@webiny/db-dynamodb": "6.4.0-beta.5",
30
30
  "@webiny/di": "1.0.1",
31
- "@webiny/error": "6.4.0-beta.3",
32
- "@webiny/feature": "6.4.0-beta.3",
33
- "@webiny/handler": "6.4.0-beta.3",
34
- "@webiny/handler-graphql": "6.4.0-beta.3",
35
- "@webiny/shared-aco": "6.4.0-beta.3",
36
- "@webiny/tasks": "6.4.0-beta.3",
37
- "@webiny/utils": "6.4.0-beta.3",
38
- "@webiny/validation": "6.4.0-beta.3",
31
+ "@webiny/error": "6.4.0-beta.5",
32
+ "@webiny/feature": "6.4.0-beta.5",
33
+ "@webiny/handler": "6.4.0-beta.5",
34
+ "@webiny/handler-graphql": "6.4.0-beta.5",
35
+ "@webiny/shared-aco": "6.4.0-beta.5",
36
+ "@webiny/utils": "6.4.0-beta.5",
37
+ "@webiny/validation": "6.4.0-beta.5",
39
38
  "lodash": "4.18.1"
40
39
  },
41
40
  "devDependencies": {
42
- "@webiny/api-core-ddb": "6.4.0-beta.3",
43
- "@webiny/api-file-manager": "6.4.0-beta.3",
44
- "@webiny/build-tools": "6.4.0-beta.3",
45
- "@webiny/handler-aws": "6.4.0-beta.3",
46
- "@webiny/plugins": "6.4.0-beta.3",
47
- "@webiny/project-utils": "6.4.0-beta.3",
48
- "@webiny/wcp": "6.4.0-beta.3",
41
+ "@webiny/api-core-ddb": "6.4.0-beta.5",
42
+ "@webiny/api-file-manager": "6.4.0-beta.5",
43
+ "@webiny/build-tools": "6.4.0-beta.5",
44
+ "@webiny/handler-aws": "6.4.0-beta.5",
45
+ "@webiny/plugins": "6.4.0-beta.5",
46
+ "@webiny/project-utils": "6.4.0-beta.5",
47
+ "@webiny/wcp": "6.4.0-beta.5",
49
48
  "graphql": "16.14.0",
50
49
  "rimraf": "6.1.3",
51
50
  "typescript": "6.0.3",
52
- "vitest": "4.1.6"
51
+ "vitest": "4.1.7"
53
52
  },
54
- "gitHead": "2e58681d4344024bfb60e6180338e2f154ec87f0"
53
+ "webiny": {
54
+ "publishFrom": "dist"
55
+ }
55
56
  }
package/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Context as BaseContext } from "@webiny/handler/types.js";
2
- import type { Context as TasksContext } from "@webiny/tasks/types.js";
2
+ import type { Context as TasksContext } from "@webiny/background-tasks/api/types.js";
3
3
  import type { CmsContext } from "@webiny/api-headless-cms/types/index.js";
4
4
  import type { AcoFilterCrud, AcoFilterStorageOperations } from "./filter/filter.types.js";
5
5
  import type { AcoFolderLevelPermissionsCrud, AcoFolderLevelPermissionsStorageOperations } from "./flp/flp.types.js";
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import type { Context as BaseContext } from \"@webiny/handler/types.js\";\nimport type { Context as TasksContext } from \"@webiny/tasks/types.js\";\nimport type { CmsContext } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { AcoFilterCrud, AcoFilterStorageOperations } from \"~/filter/filter.types.js\";\nimport type {\n AcoFolderLevelPermissionsCrud,\n AcoFolderLevelPermissionsStorageOperations\n} from \"~/flp/flp.types.js\";\nimport type { Container } from \"@webiny/di\";\nimport { FolderLevelPermissions } from \"./features/flp/FolderLevelPermissions/index.js\";\nimport type { ApiCoreContext } from \"@webiny/api-core/types/core.js\";\nimport type { Tenant } from \"@webiny/api-core/types/tenancy.js\";\n\nexport * from \"./filter/filter.types.js\";\nexport type * from \"./folder/folder.types.js\";\nexport type * from \"./flp/flp.types.js\";\n\nexport interface User {\n id: string;\n type: string;\n displayName: string;\n}\n\nexport interface ListMeta {\n cursor: string | null;\n totalCount: number;\n hasMoreItems: boolean;\n}\n\nexport enum ListSortDirection {\n ASC,\n DESC\n}\n\nexport type ListSort = Record<string, ListSortDirection>;\n\nexport interface AcoBaseFields {\n id: string;\n entryId: string;\n createdOn: string;\n modifiedOn: string | null;\n savedOn: string;\n createdBy: User;\n modifiedBy: User | null;\n savedBy: User;\n}\n\nexport interface AdvancedContentOrganisation {\n filter: AcoFilterCrud;\n flp: AcoFolderLevelPermissionsCrud;\n}\n\nexport interface CreateAcoParams {\n getTenant: () => Tenant;\n storageOperations: AcoStorageOperations;\n folderLevelPermissions: FolderLevelPermissions.Interface;\n container: Container;\n}\n\nexport interface AcoStorageOperations {\n filter: AcoFilterStorageOperations;\n flp: AcoFolderLevelPermissionsStorageOperations;\n}\n\nexport interface AcoContext extends BaseContext, ApiCoreContext, CmsContext, TasksContext {\n aco: AdvancedContentOrganisation;\n}\n"],"names":["ListSortDirection"],"mappings":";AA6BO,IAAKA,0BAAiBA,WAAAA,GAAAA,SAAjBA,iBAAiB;;;WAAjBA"}
1
+ {"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import type { Context as BaseContext } from \"@webiny/handler/types.js\";\nimport type { Context as TasksContext } from \"@webiny/background-tasks/api/types.js\";\nimport type { CmsContext } from \"@webiny/api-headless-cms/types/index.js\";\nimport type { AcoFilterCrud, AcoFilterStorageOperations } from \"~/filter/filter.types.js\";\nimport type {\n AcoFolderLevelPermissionsCrud,\n AcoFolderLevelPermissionsStorageOperations\n} from \"~/flp/flp.types.js\";\nimport type { Container } from \"@webiny/di\";\nimport { FolderLevelPermissions } from \"./features/flp/FolderLevelPermissions/index.js\";\nimport type { ApiCoreContext } from \"@webiny/api-core/types/core.js\";\nimport type { Tenant } from \"@webiny/api-core/types/tenancy.js\";\n\nexport * from \"./filter/filter.types.js\";\nexport type * from \"./folder/folder.types.js\";\nexport type * from \"./flp/flp.types.js\";\n\nexport interface User {\n id: string;\n type: string;\n displayName: string;\n}\n\nexport interface ListMeta {\n cursor: string | null;\n totalCount: number;\n hasMoreItems: boolean;\n}\n\nexport enum ListSortDirection {\n ASC,\n DESC\n}\n\nexport type ListSort = Record<string, ListSortDirection>;\n\nexport interface AcoBaseFields {\n id: string;\n entryId: string;\n createdOn: string;\n modifiedOn: string | null;\n savedOn: string;\n createdBy: User;\n modifiedBy: User | null;\n savedBy: User;\n}\n\nexport interface AdvancedContentOrganisation {\n filter: AcoFilterCrud;\n flp: AcoFolderLevelPermissionsCrud;\n}\n\nexport interface CreateAcoParams {\n getTenant: () => Tenant;\n storageOperations: AcoStorageOperations;\n folderLevelPermissions: FolderLevelPermissions.Interface;\n container: Container;\n}\n\nexport interface AcoStorageOperations {\n filter: AcoFilterStorageOperations;\n flp: AcoFolderLevelPermissionsStorageOperations;\n}\n\nexport interface AcoContext extends BaseContext, ApiCoreContext, CmsContext, TasksContext {\n aco: AdvancedContentOrganisation;\n}\n"],"names":["ListSortDirection"],"mappings":";AA6BO,IAAKA,0BAAiBA,WAAAA,GAAAA,SAAjBA,iBAAiB;;;WAAjBA"}