@acorex-platform/module-background-job-management-client 0.0.30 → 0.0.33

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 (47) hide show
  1. package/fesm2022/{acorex-platform-module-background-job-management-client-background-job-command-error.util-BzDLhWRP.mjs → acorex-platform-module-background-job-management-client-background-job-command-error.util-BHBmSbvw.mjs} +5 -1
  2. package/fesm2022/acorex-platform-module-background-job-management-client-background-job-command-error.util-BHBmSbvw.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-background-job-management-client-background-job-source-column.component-JzU8l_7q.mjs +83 -0
  4. package/fesm2022/acorex-platform-module-background-job-management-client-background-job-source-column.component-JzU8l_7q.mjs.map +1 -0
  5. package/fesm2022/{acorex-platform-module-background-job-management-client-cancel-background-job.command-OZPzjIow.mjs → acorex-platform-module-background-job-management-client-cancel-background-job.command-BHCWX1c1.mjs} +2 -2
  6. package/fesm2022/{acorex-platform-module-background-job-management-client-cancel-background-job.command-OZPzjIow.mjs.map → acorex-platform-module-background-job-management-client-cancel-background-job.command-BHCWX1c1.mjs.map} +1 -1
  7. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entities-background-job-attempt.mjs +262 -0
  8. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entities-background-job-attempt.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entities-background-job-schedule.mjs +539 -0
  10. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entities-background-job-schedule.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entities-background-job.mjs +500 -0
  12. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entities-background-job.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entity-catalog-acorex-platform-module-background-job-management-client-contracts-entity-catalog-BXFhpRfS.mjs +67 -0
  14. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entity-catalog-acorex-platform-module-background-job-management-client-contracts-entity-catalog-BXFhpRfS.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entity-catalog-background-job-attempt.entity-di_KkFZV.mjs +216 -0
  16. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entity-catalog-background-job-attempt.entity-di_KkFZV.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entity-catalog-background-job-schedule.entity-q8VKiWJf.mjs +493 -0
  18. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entity-catalog-background-job-schedule.entity-q8VKiWJf.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entity-catalog-background-job.entity-Bz33gUlR.mjs +454 -0
  20. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entity-catalog-background-job.entity-Bz33gUlR.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entity-catalog.mjs +2 -0
  22. package/fesm2022/acorex-platform-module-background-job-management-client-contracts-entity-catalog.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-background-job-management-client-contracts.mjs +6 -1
  24. package/fesm2022/acorex-platform-module-background-job-management-client-contracts.mjs.map +1 -1
  25. package/fesm2022/acorex-platform-module-background-job-management-client-local-entities.mjs +31 -0
  26. package/fesm2022/acorex-platform-module-background-job-management-client-local-entities.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-background-job-management-client-replay-dead-letter.command-BM4NYBxr.mjs +37 -0
  28. package/fesm2022/acorex-platform-module-background-job-management-client-replay-dead-letter.command-BM4NYBxr.mjs.map +1 -0
  29. package/fesm2022/{acorex-platform-module-background-job-management-client-retry-background-job.command-BdJ_PC_y.mjs → acorex-platform-module-background-job-management-client-retry-background-job.command-BBEAc_i7.mjs} +2 -2
  30. package/fesm2022/{acorex-platform-module-background-job-management-client-retry-background-job.command-BdJ_PC_y.mjs.map → acorex-platform-module-background-job-management-client-retry-background-job.command-BBEAc_i7.mjs.map} +1 -1
  31. package/fesm2022/{acorex-platform-module-background-job-management-client-run-schedule-now.command-orzJ7ZmD.mjs → acorex-platform-module-background-job-management-client-run-schedule-now.command-5RV6hAnH.mjs} +2 -2
  32. package/fesm2022/{acorex-platform-module-background-job-management-client-run-schedule-now.command-orzJ7ZmD.mjs.map → acorex-platform-module-background-job-management-client-run-schedule-now.command-5RV6hAnH.mjs.map} +1 -1
  33. package/fesm2022/acorex-platform-module-background-job-management-client-tray-execute-click.command-CEVhvrDQ.mjs +27 -0
  34. package/fesm2022/acorex-platform-module-background-job-management-client-tray-execute-click.command-CEVhvrDQ.mjs.map +1 -0
  35. package/fesm2022/acorex-platform-module-background-job-management-client-tray-run-action.command-B9SFMGxf.mjs +38 -0
  36. package/fesm2022/acorex-platform-module-background-job-management-client-tray-run-action.command-B9SFMGxf.mjs.map +1 -0
  37. package/fesm2022/acorex-platform-module-background-job-management-client.mjs +556 -17
  38. package/fesm2022/acorex-platform-module-background-job-management-client.mjs.map +1 -1
  39. package/package.json +21 -1
  40. package/types/acorex-platform-module-background-job-management-client-contracts-entities-background-job-attempt.d.ts +5 -0
  41. package/types/acorex-platform-module-background-job-management-client-contracts-entities-background-job-schedule.d.ts +5 -0
  42. package/types/acorex-platform-module-background-job-management-client-contracts-entities-background-job.d.ts +5 -0
  43. package/types/acorex-platform-module-background-job-management-client-contracts-entity-catalog.d.ts +10 -0
  44. package/types/acorex-platform-module-background-job-management-client-contracts.d.ts +6 -1
  45. package/types/acorex-platform-module-background-job-management-client-local-entities.d.ts +12 -0
  46. package/types/acorex-platform-module-background-job-management-client.d.ts +9 -2
  47. package/fesm2022/acorex-platform-module-background-job-management-client-background-job-command-error.util-BzDLhWRP.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-background-job-management-client-local-entities.mjs","sources":["../../../../libs/modules/background-job-management/client/src/lib/provide-local-entities.ts","../../../../libs/modules/background-job-management/client/src/lib/acorex-platform-module-background-job-management-client-local-entities.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { provideLocalEntityCatalog } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-background-job-management-client/contracts';\n\n//#endregion\n\n//#region ----- Provide local entities -----\n\n/**\n * Registers background-job-management layouts on the client from packaged factories.\n * Each `import()` targets a secondary entry so unused entities stay out of the\n * bundle. Do not add this to the demo app; demo continues to load layouts via\n * `Domain:GetEntityLayout`.\n */\nexport function provideBackgroundJobManagementLocalEntities() {\n return provideLocalEntityCatalog({\n moduleName: RootConfig.module.name,\n loaders: {\n [RootConfig.entities.backgroundJob.name]: () =>\n import('@acorex-platform/module-background-job-management-client/contracts/entities/background-job').then((m) => m.factoryBackgroundJob()),\n [RootConfig.entities.backgroundJobAttempt.name]: () =>\n import('@acorex-platform/module-background-job-management-client/contracts/entities/background-job-attempt').then((m) => m.factoryBackgroundJobAttempt()),\n [RootConfig.entities.backgroundJobSchedule.name]: () =>\n import('@acorex-platform/module-background-job-management-client/contracts/entities/background-job-schedule').then((m) => m.factoryBackgroundJobSchedule()),\n },\n });\n}\n\nexport { backgroundJobManagementLocalEntityCatalog } from '@acorex-platform/module-background-job-management-client/contracts/entity-catalog';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './provide-local-entities';\n"],"names":[],"mappings":";;;;AAAA;AAKA;AAEA;AAEA;;;;;AAKG;SACa,2CAA2C,GAAA;AACzD,IAAA,OAAO,yBAAyB,CAAC;AAC/B,QAAA,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAClC,QAAA,OAAO,EAAE;AACP,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,GAAG,MACxC,OAAO,4FAA4F,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,oBAAoB,EAAE,CAAC;AAC5I,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,oBAAoB,CAAC,IAAI,GAAG,MAC/C,OAAO,oGAAoG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,2BAA2B,EAAE,CAAC;AAC3J,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,qBAAqB,CAAC,IAAI,GAAG,MAChD,OAAO,qGAAqG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,4BAA4B,EAAE,CAAC;AAC9J,SAAA;AACF,KAAA,CAAC;AACJ;AAIA;;AC/BA;;AAEG;;;;"}
@@ -0,0 +1,37 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Injectable } from '@angular/core';
3
+ import { AXTranslationService } from '@acorex/core/translation';
4
+ import { AXPBackgroundJobManagementClient } from './acorex-platform-module-background-job-management-client.mjs';
5
+ import { B as BackgroundJobCommandI18n, r as resolveBackgroundJobCommandError } from './acorex-platform-module-background-job-management-client-background-job-command-error.util-BHBmSbvw.mjs';
6
+
7
+ class ReplayDeadLetterBackgroundJobCommand {
8
+ constructor() {
9
+ this.client = inject(AXPBackgroundJobManagementClient);
10
+ this.translationService = inject(AXTranslationService);
11
+ }
12
+ async execute(raw) {
13
+ const wrapped = raw;
14
+ const input = (wrapped?.options ?? raw);
15
+ try {
16
+ const result = await this.client.replayDeadLetter(input.jobId);
17
+ return {
18
+ success: true,
19
+ kind: 'object',
20
+ data: { jobId: result.jobId },
21
+ message: { text: BackgroundJobCommandI18n.replayDeadLetter.success },
22
+ };
23
+ }
24
+ catch (error) {
25
+ const { messageKeyOrText } = await resolveBackgroundJobCommandError(this.translationService, error, BackgroundJobCommandI18n.replayDeadLetter.failed);
26
+ return { success: false, message: { text: messageKeyOrText } };
27
+ }
28
+ }
29
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ReplayDeadLetterBackgroundJobCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
30
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ReplayDeadLetterBackgroundJobCommand }); }
31
+ }
32
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: ReplayDeadLetterBackgroundJobCommand, decorators: [{
33
+ type: Injectable
34
+ }] });
35
+
36
+ export { ReplayDeadLetterBackgroundJobCommand };
37
+ //# sourceMappingURL=acorex-platform-module-background-job-management-client-replay-dead-letter.command-BM4NYBxr.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-background-job-management-client-replay-dead-letter.command-BM4NYBxr.mjs","sources":["../../../../libs/modules/background-job-management/client/src/lib/commands/replay-dead-letter.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport { Injectable, inject } from '@angular/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPBackgroundJobManagementClient } from '../background-job-management-client.port';\nimport { resolveBackgroundJobCommandError } from './background-job-command-error.util';\nimport { BackgroundJobCommandI18n } from './background-job-command.i18n';\n\nexport interface ReplayDeadLetterBackgroundJobInput {\n jobId: string;\n}\n\n@Injectable()\nexport class ReplayDeadLetterBackgroundJobCommand\n implements AXPCommand<ReplayDeadLetterBackgroundJobInput, { jobId: string }>\n{\n private readonly client = inject(AXPBackgroundJobManagementClient);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(raw: unknown): AXPCommandExecuteResultPromise<{ jobId: string }> {\n const wrapped = raw as { options?: ReplayDeadLetterBackgroundJobInput } & Record<string, unknown>;\n const input = (wrapped?.options ?? raw) as ReplayDeadLetterBackgroundJobInput;\n\n try {\n const result = await this.client.replayDeadLetter(input.jobId);\n return {\n success: true,\n kind: 'object',\n data: { jobId: result.jobId },\n message: { text: BackgroundJobCommandI18n.replayDeadLetter.success },\n };\n } catch (error) {\n const { messageKeyOrText } = await resolveBackgroundJobCommandError(\n this.translationService,\n error,\n BackgroundJobCommandI18n.replayDeadLetter.failed,\n );\n return { success: false, message: { text: messageKeyOrText } };\n }\n }\n}\n"],"names":[],"mappings":";;;;;;MAaa,oCAAoC,CAAA;AADjD,IAAA,WAAA,GAAA;AAImB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACjD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAuBnE,IAAA;IArBC,MAAM,OAAO,CAAC,GAAY,EAAA;QACxB,MAAM,OAAO,GAAG,GAAiF;QACjG,MAAM,KAAK,IAAI,OAAO,EAAE,OAAO,IAAI,GAAG,CAAuC;AAE7E,QAAA,IAAI;AACF,YAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC;YAC9D,OAAO;AACL,gBAAA,OAAO,EAAE,IAAI;AACb,gBAAA,IAAI,EAAE,QAAQ;AACd,gBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE;gBAC7B,OAAO,EAAE,EAAE,IAAI,EAAE,wBAAwB,CAAC,gBAAgB,CAAC,OAAO,EAAE;aACrE;QACH;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,gCAAgC,CACjE,IAAI,CAAC,kBAAkB,EACvB,KAAK,EACL,wBAAwB,CAAC,gBAAgB,CAAC,MAAM,CACjD;AACD,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE;QAChE;IACF;8GA1BW,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAApC,oCAAoC,EAAA,CAAA,CAAA;;2FAApC,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBADhD;;;;;"}
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { inject, Injectable } from '@angular/core';
3
3
  import { AXTranslationService } from '@acorex/core/translation';
4
4
  import { AXPBackgroundJobManagementClient } from './acorex-platform-module-background-job-management-client.mjs';
5
- import { B as BackgroundJobCommandI18n, r as resolveBackgroundJobCommandError } from './acorex-platform-module-background-job-management-client-background-job-command-error.util-BzDLhWRP.mjs';
5
+ import { B as BackgroundJobCommandI18n, r as resolveBackgroundJobCommandError } from './acorex-platform-module-background-job-management-client-background-job-command-error.util-BHBmSbvw.mjs';
6
6
 
7
7
  class RetryBackgroundJobCommand {
8
8
  constructor() {
@@ -29,4 +29,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
29
29
  }] });
30
30
 
31
31
  export { RetryBackgroundJobCommand };
32
- //# sourceMappingURL=acorex-platform-module-background-job-management-client-retry-background-job.command-BdJ_PC_y.mjs.map
32
+ //# sourceMappingURL=acorex-platform-module-background-job-management-client-retry-background-job.command-BBEAc_i7.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-background-job-management-client-retry-background-job.command-BdJ_PC_y.mjs","sources":["../../../../libs/modules/background-job-management/client/src/lib/commands/retry-background-job.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport { Injectable, inject } from '@angular/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPBackgroundJobManagementClient } from '../background-job-management-client.port';\nimport { resolveBackgroundJobCommandError } from './background-job-command-error.util';\nimport { BackgroundJobCommandI18n } from './background-job-command.i18n';\n\nexport interface RetryBackgroundJobInput {\n jobId: string;\n}\n\n@Injectable()\nexport class RetryBackgroundJobCommand implements AXPCommand<RetryBackgroundJobInput, { jobId: string }> {\n private readonly client = inject(AXPBackgroundJobManagementClient);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(raw: unknown): AXPCommandExecuteResultPromise<{ jobId: string }> {\n const wrapped = raw as { options?: RetryBackgroundJobInput } & Record<string, unknown>;\n const input = (wrapped?.options ?? raw) as RetryBackgroundJobInput;\n\n try {\n const result = await this.client.retryJob(input.jobId);\n return { success: true, kind: 'object', data: { jobId: result.jobId }, message: { text: BackgroundJobCommandI18n.retry.success } };\n } catch (error) {\n const { messageKeyOrText } = await resolveBackgroundJobCommandError(\n this.translationService,\n error,\n BackgroundJobCommandI18n.retry.failed,\n );\n return { success: false, message: { text: messageKeyOrText } };\n }\n }\n}\n"],"names":[],"mappings":";;;;;;MAaa,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACjD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAkBnE,IAAA;IAhBC,MAAM,OAAO,CAAC,GAAY,EAAA;QACxB,MAAM,OAAO,GAAG,GAAsE;QACtF,MAAM,KAAK,IAAI,OAAO,EAAE,OAAO,IAAI,GAAG,CAA4B;AAElE,QAAA,IAAI;AACF,YAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;AACtD,YAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,wBAAwB,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE;QACpI;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,gCAAgC,CACjE,IAAI,CAAC,kBAAkB,EACvB,KAAK,EACL,wBAAwB,CAAC,KAAK,CAAC,MAAM,CACtC;AACD,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE;QAChE;IACF;8GAnBW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAzB,yBAAyB,EAAA,CAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-background-job-management-client-retry-background-job.command-BBEAc_i7.mjs","sources":["../../../../libs/modules/background-job-management/client/src/lib/commands/retry-background-job.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport { Injectable, inject } from '@angular/core';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { AXPBackgroundJobManagementClient } from '../background-job-management-client.port';\nimport { resolveBackgroundJobCommandError } from './background-job-command-error.util';\nimport { BackgroundJobCommandI18n } from './background-job-command.i18n';\n\nexport interface RetryBackgroundJobInput {\n jobId: string;\n}\n\n@Injectable()\nexport class RetryBackgroundJobCommand implements AXPCommand<RetryBackgroundJobInput, { jobId: string }> {\n private readonly client = inject(AXPBackgroundJobManagementClient);\n private readonly translationService = inject(AXTranslationService);\n\n async execute(raw: unknown): AXPCommandExecuteResultPromise<{ jobId: string }> {\n const wrapped = raw as { options?: RetryBackgroundJobInput } & Record<string, unknown>;\n const input = (wrapped?.options ?? raw) as RetryBackgroundJobInput;\n\n try {\n const result = await this.client.retryJob(input.jobId);\n return { success: true, kind: 'object', data: { jobId: result.jobId }, message: { text: BackgroundJobCommandI18n.retry.success } };\n } catch (error) {\n const { messageKeyOrText } = await resolveBackgroundJobCommandError(\n this.translationService,\n error,\n BackgroundJobCommandI18n.retry.failed,\n );\n return { success: false, message: { text: messageKeyOrText } };\n }\n }\n}\n"],"names":[],"mappings":";;;;;;MAaa,yBAAyB,CAAA;AADtC,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACjD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AAkBnE,IAAA;IAhBC,MAAM,OAAO,CAAC,GAAY,EAAA;QACxB,MAAM,OAAO,GAAG,GAAsE;QACtF,MAAM,KAAK,IAAI,OAAO,EAAE,OAAO,IAAI,GAAG,CAA4B;AAElE,QAAA,IAAI;AACF,YAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC;AACtD,YAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,wBAAwB,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE;QACpI;QAAE,OAAO,KAAK,EAAE;AACd,YAAA,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,gCAAgC,CACjE,IAAI,CAAC,kBAAkB,EACvB,KAAK,EACL,wBAAwB,CAAC,KAAK,CAAC,MAAM,CACtC;AACD,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE;QAChE;IACF;8GAnBW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAzB,yBAAyB,EAAA,CAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBADrC;;;;;"}
@@ -6,7 +6,7 @@ import { AXToastService } from '@acorex/components/toast';
6
6
  import { AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';
7
7
  import { RootConfig } from '@acorex-platform/module-background-job-management-client/contracts';
8
8
  import { AXPBackgroundJobManagementClient } from './acorex-platform-module-background-job-management-client.mjs';
9
- import { B as BackgroundJobCommandI18n, r as resolveBackgroundJobCommandError } from './acorex-platform-module-background-job-management-client-background-job-command-error.util-BzDLhWRP.mjs';
9
+ import { B as BackgroundJobCommandI18n, r as resolveBackgroundJobCommandError } from './acorex-platform-module-background-job-management-client-background-job-command-error.util-BHBmSbvw.mjs';
10
10
 
11
11
  //#endregion
12
12
  //#region ----- Command -----
@@ -95,4 +95,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
95
95
  }] });
96
96
 
97
97
  export { RunScheduleNowCommand };
98
- //# sourceMappingURL=acorex-platform-module-background-job-management-client-run-schedule-now.command-orzJ7ZmD.mjs.map
98
+ //# sourceMappingURL=acorex-platform-module-background-job-management-client-run-schedule-now.command-5RV6hAnH.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-platform-module-background-job-management-client-run-schedule-now.command-orzJ7ZmD.mjs","sources":["../../../../libs/modules/background-job-management/client/src/lib/commands/run-schedule-now.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport { AXPCommonSettings, AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';\nimport { Injectable, inject } from '@angular/core';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';\nimport { RootConfig } from '@acorex-platform/module-background-job-management-client/contracts';\nimport { AXPBackgroundJobManagementClient } from '../background-job-management-client.port';\nimport { resolveBackgroundJobCommandError } from './background-job-command-error.util';\nimport { BackgroundJobCommandI18n } from './background-job-command.i18n';\n\n//#region ----- Types -----\n\nexport interface RunScheduleNowInput {\n scheduleId: string;\n}\n\ntype RunScheduleNowRaw = {\n options?: RunScheduleNowInput;\n data?: Record<string, unknown>;\n};\n\n//#endregion\n\n//#region ----- Command -----\n\n@Injectable()\nexport class RunScheduleNowCommand implements AXPCommand<RunScheduleNowInput, { jobId: string }> {\n //#region ----- Services & Dependencies -----\n\n private readonly client = inject(AXPBackgroundJobManagementClient);\n private readonly entityEvents = inject(AXPEntityBroadcastService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n\n //#endregion\n\n //#region ----- Constants -----\n\n private readonly scheduleEntityRef = RootConfig.entities.backgroundJobSchedule.fullName;\n\n //#endregion\n\n //#region ----- Execute -----\n\n async execute(raw: unknown): AXPCommandExecuteResultPromise<{ jobId: string }> {\n const payload = raw as RunScheduleNowRaw;\n const input = (payload?.options ?? raw) as RunScheduleNowInput;\n const scheduleName = this.resolveScheduleName(payload?.data, input.scheduleId);\n\n try {\n const result = await this.client.runScheduleNow(input.scheduleId);\n this.entityEvents.publishLayoutRefresh(this.scheduleEntityRef);\n this.entityEvents.publishDataReload(this.scheduleEntityRef);\n await this.showToast('success', BackgroundJobCommandI18n.runNow.successTitle, BackgroundJobCommandI18n.runNow.successDescription, {\n name: scheduleName,\n });\n return { success: true, kind: 'object', data: { jobId: result.jobId } };\n } catch (error) {\n const { messageKeyOrText, displayText } = await resolveBackgroundJobCommandError(\n this.translationService,\n error,\n BackgroundJobCommandI18n.runNow.failedDescription,\n );\n const content =\n messageKeyOrText === BackgroundJobCommandI18n.runNow.failedDescription\n ? BackgroundJobCommandI18n.runNow.failedDescription\n : displayText;\n await this.showToast('danger', BackgroundJobCommandI18n.runNow.failedTitle, content, {\n name: scheduleName,\n });\n return { success: false };\n }\n }\n\n //#endregion\n\n //#region ----- Toast & Labels -----\n\n private resolveScheduleName(data: unknown, scheduleId: string): string {\n const row = data as { title?: unknown; command?: { key?: string } } | null | undefined;\n if (!row) {\n return scheduleId;\n }\n\n const title = row.title;\n if (typeof title === 'string' && title.trim()) {\n return title.trim();\n }\n if (title && typeof title === 'object') {\n const resolved = resolveMultiLanguageString(title as never, this.translationService.getActiveLang())?.trim();\n if (resolved) {\n return resolved;\n }\n }\n\n const commandKey = row.command?.key;\n if (typeof commandKey === 'string' && commandKey.trim()) {\n return commandKey.trim();\n }\n\n return scheduleId;\n }\n\n private async showToast(\n color: 'success' | 'danger',\n titleKey: string,\n contentKeyOrText: string,\n params: { name: string },\n ): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n\n const title = await this.translationService.translateAsync(titleKey);\n const content = contentKeyOrText.startsWith('@')\n ? await this.translationService.translateAsync(contentKeyOrText, { params })\n : contentKeyOrText;\n\n this.toastService.show({\n color,\n title,\n content,\n timeOut: color === 'success' ? 4000 : 5000,\n });\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;AAuBA;AAEA;MAGa,qBAAqB,CAAA;AADlC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAChD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;;;QAM5C,IAAA,CAAA,iBAAiB,GAAG,UAAU,CAAC,QAAQ,CAAC,qBAAqB,CAAC,QAAQ;AA0FxF,IAAA;;;IApFC,MAAM,OAAO,CAAC,GAAY,EAAA;QACxB,MAAM,OAAO,GAAG,GAAwB;QACxC,MAAM,KAAK,IAAI,OAAO,EAAE,OAAO,IAAI,GAAG,CAAwB;AAC9D,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,mBA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;YACP,OAAO,EAAE,KAAK,KAAK,SAAS,GAAG,IAAI,GAAG,IAAI;AAC3C,SAAA,CAAC;IACJ;8GApGW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAArB,qBAAqB,EAAA,CAAA,CAAA;;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC;;;;;"}
1
+ {"version":3,"file":"acorex-platform-module-background-job-management-client-run-schedule-now.command-5RV6hAnH.mjs","sources":["../../../../libs/modules/background-job-management/client/src/lib/commands/run-schedule-now.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPRuntimeCommandResult } from '@acorex-platform/framework-shared/core';\nimport { AXPCommonSettings, AXPSettingsService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityBroadcastService } from '@acorex-platform/framework-client/core';\nimport { Injectable, inject } from '@angular/core';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService, resolveMultiLanguageString } from '@acorex/core/translation';\nimport { RootConfig } from '@acorex-platform/module-background-job-management-client/contracts';\nimport { AXPBackgroundJobManagementClient } from '../background-job-management-client.port';\nimport { resolveBackgroundJobCommandError } from './background-job-command-error.util';\nimport { BackgroundJobCommandI18n } from './background-job-command.i18n';\n\n//#region ----- Types -----\n\nexport interface RunScheduleNowInput {\n scheduleId: string;\n}\n\ntype RunScheduleNowRaw = {\n options?: RunScheduleNowInput;\n data?: Record<string, unknown>;\n};\n\n//#endregion\n\n//#region ----- Command -----\n\n@Injectable()\nexport class RunScheduleNowCommand implements AXPCommand<RunScheduleNowInput, { jobId: string }> {\n //#region ----- Services & Dependencies -----\n\n private readonly client = inject(AXPBackgroundJobManagementClient);\n private readonly entityEvents = inject(AXPEntityBroadcastService);\n private readonly translationService = inject(AXTranslationService);\n private readonly toastService = inject(AXToastService);\n private readonly settingsService = inject(AXPSettingsService);\n\n //#endregion\n\n //#region ----- Constants -----\n\n private readonly scheduleEntityRef = RootConfig.entities.backgroundJobSchedule.fullName;\n\n //#endregion\n\n //#region ----- Execute -----\n\n async execute(raw: unknown): AXPCommandExecuteResultPromise<{ jobId: string }> {\n const payload = raw as RunScheduleNowRaw;\n const input = (payload?.options ?? raw) as RunScheduleNowInput;\n const scheduleName = this.resolveScheduleName(payload?.data, input.scheduleId);\n\n try {\n const result = await this.client.runScheduleNow(input.scheduleId);\n this.entityEvents.publishLayoutRefresh(this.scheduleEntityRef);\n this.entityEvents.publishDataReload(this.scheduleEntityRef);\n await this.showToast('success', BackgroundJobCommandI18n.runNow.successTitle, BackgroundJobCommandI18n.runNow.successDescription, {\n name: scheduleName,\n });\n return { success: true, kind: 'object', data: { jobId: result.jobId } };\n } catch (error) {\n const { messageKeyOrText, displayText } = await resolveBackgroundJobCommandError(\n this.translationService,\n error,\n BackgroundJobCommandI18n.runNow.failedDescription,\n );\n const content =\n messageKeyOrText === BackgroundJobCommandI18n.runNow.failedDescription\n ? BackgroundJobCommandI18n.runNow.failedDescription\n : displayText;\n await this.showToast('danger', BackgroundJobCommandI18n.runNow.failedTitle, content, {\n name: scheduleName,\n });\n return { success: false };\n }\n }\n\n //#endregion\n\n //#region ----- Toast & Labels -----\n\n private resolveScheduleName(data: unknown, scheduleId: string): string {\n const row = data as { title?: unknown; command?: { key?: string } } | null | undefined;\n if (!row) {\n return scheduleId;\n }\n\n const title = row.title;\n if (typeof title === 'string' && title.trim()) {\n return title.trim();\n }\n if (title && typeof title === 'object') {\n const resolved = resolveMultiLanguageString(title as never, this.translationService.getActiveLang())?.trim();\n if (resolved) {\n return resolved;\n }\n }\n\n const commandKey = row.command?.key;\n if (typeof commandKey === 'string' && commandKey.trim()) {\n return commandKey.trim();\n }\n\n return scheduleId;\n }\n\n private async showToast(\n color: 'success' | 'danger',\n titleKey: string,\n contentKeyOrText: string,\n params: { name: string },\n ): Promise<void> {\n const enabled = await this.settingsService.get<boolean>(AXPCommonSettings.EnableOperationToasts);\n if (!enabled) {\n return;\n }\n\n const title = await this.translationService.translateAsync(titleKey);\n const content = contentKeyOrText.startsWith('@')\n ? await this.translationService.translateAsync(contentKeyOrText, { params })\n : contentKeyOrText;\n\n this.toastService.show({\n color,\n title,\n content,\n timeOut: color === 'success' ? 4000 : 5000,\n });\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;;;;;;AAuBA;AAEA;MAGa,qBAAqB,CAAA;AADlC,IAAA,WAAA,GAAA;;AAImB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,gCAAgC,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAChD,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACjD,QAAA,IAAA,CAAA,YAAY,GAAG,MAAM,CAAC,cAAc,CAAC;AACrC,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,kBAAkB,CAAC;;;QAM5C,IAAA,CAAA,iBAAiB,GAAG,UAAU,CAAC,QAAQ,CAAC,qBAAqB,CAAC,QAAQ;AA0FxF,IAAA;;;IApFC,MAAM,OAAO,CAAC,GAAY,EAAA;QACxB,MAAM,OAAO,GAAG,GAAwB;QACxC,MAAM,KAAK,IAAI,OAAO,EAAE,OAAO,IAAI,GAAG,CAAwB;AAC9D,QAAA,MAAM,YAAY,GAAG,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,UAAU,CAAC;AAE9E,QAAA,IAAI;AACF,YAAA,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,UAAU,CAAC;YACjE,IAAI,CAAC,YAAY,CAAC,oBAAoB,CAAC,IAAI,CAAC,iBAAiB,CAAC;YAC9D,IAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,IAAI,CAAC,iBAAiB,C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BackgroundOperationService } from '@acorex-platform/framework-client/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, Injectable } from '@angular/core';
4
+
5
+ class BackgroundJobTrayExecuteClickCommand {
6
+ constructor() {
7
+ this.operations = inject(AXPBackgroundOperationService);
8
+ }
9
+ async execute(raw) {
10
+ const wrapped = raw;
11
+ const input = (wrapped?.options ?? raw);
12
+ const operationId = (input.operationId ?? input.jobId ?? input.id)?.trim();
13
+ if (!operationId) {
14
+ return { success: false, message: { text: 'operationId is required.' } };
15
+ }
16
+ await this.operations.executeClick(operationId);
17
+ return { success: true, kind: 'object', data: undefined };
18
+ }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BackgroundJobTrayExecuteClickCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
20
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BackgroundJobTrayExecuteClickCommand }); }
21
+ }
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BackgroundJobTrayExecuteClickCommand, decorators: [{
23
+ type: Injectable
24
+ }] });
25
+
26
+ export { BackgroundJobTrayExecuteClickCommand };
27
+ //# sourceMappingURL=acorex-platform-module-background-job-management-client-tray-execute-click.command-CEVhvrDQ.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-background-job-management-client-tray-execute-click.command-CEVhvrDQ.mjs","sources":["../../../../libs/modules/background-job-management/client/src/lib/commands/tray-execute-click.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport { AXPBackgroundOperationService } from '@acorex-platform/framework-client/common';\nimport { Injectable, inject } from '@angular/core';\n\nexport interface TrayExecuteClickInput {\n operationId?: string;\n jobId?: string;\n id?: string;\n}\n\n@Injectable()\nexport class BackgroundJobTrayExecuteClickCommand implements AXPCommand<TrayExecuteClickInput, void> {\n private readonly operations = inject(AXPBackgroundOperationService);\n\n async execute(raw: unknown): AXPCommandExecuteResultPromise<void> {\n const wrapped = raw as { options?: TrayExecuteClickInput } & Record<string, unknown>;\n const input = (wrapped?.options ?? raw) as TrayExecuteClickInput;\n const operationId = (input.operationId ?? input.jobId ?? input.id)?.trim();\n if (!operationId) {\n return { success: false, message: { text: 'operationId is required.' } };\n }\n\n await this.operations.executeClick(operationId);\n return { success: true, kind: 'object', data: undefined };\n }\n}\n"],"names":[],"mappings":";;;;MAWa,oCAAoC,CAAA;AADjD,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAapE,IAAA;IAXC,MAAM,OAAO,CAAC,GAAY,EAAA;QACxB,MAAM,OAAO,GAAG,GAAoE;QACpF,MAAM,KAAK,IAAI,OAAO,EAAE,OAAO,IAAI,GAAG,CAA0B;AAChE,QAAA,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,EAAE,GAAG,IAAI,EAAE;QAC1E,IAAI,CAAC,WAAW,EAAE;AAChB,YAAA,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,0BAA0B,EAAE,EAAE;QAC1E;QAEA,MAAM,IAAI,CAAC,UAAU,CAAC,YAAY,CAAC,WAAW,CAAC;AAC/C,QAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3D;8GAbW,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAApC,oCAAoC,EAAA,CAAA,CAAA;;2FAApC,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBADhD;;;;;"}
@@ -0,0 +1,38 @@
1
+ import { AXPBackgroundOperationService } from '@acorex-platform/framework-client/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, Injectable } from '@angular/core';
4
+
5
+ const TRAY_ACTIONS = new Set([
6
+ 'cancel',
7
+ 'pause',
8
+ 'resume',
9
+ 'retry',
10
+ 'dismiss',
11
+ ]);
12
+ class BackgroundJobTrayRunActionCommand {
13
+ constructor() {
14
+ this.operations = inject(AXPBackgroundOperationService);
15
+ }
16
+ async execute(raw) {
17
+ const wrapped = raw;
18
+ const input = (wrapped?.options ?? raw);
19
+ const operationId = (input.operationId ?? input.jobId ?? input.id)?.trim();
20
+ const action = input.action?.trim();
21
+ if (!operationId) {
22
+ return { success: false, message: { text: 'operationId is required.' } };
23
+ }
24
+ if (!action || !TRAY_ACTIONS.has(action)) {
25
+ return { success: false, message: { text: 'A valid tray action is required.' } };
26
+ }
27
+ await this.operations.runAction(operationId, action);
28
+ return { success: true, kind: 'object', data: undefined };
29
+ }
30
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BackgroundJobTrayRunActionCommand, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
31
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BackgroundJobTrayRunActionCommand }); }
32
+ }
33
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BackgroundJobTrayRunActionCommand, decorators: [{
34
+ type: Injectable
35
+ }] });
36
+
37
+ export { BackgroundJobTrayRunActionCommand };
38
+ //# sourceMappingURL=acorex-platform-module-background-job-management-client-tray-run-action.command-B9SFMGxf.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-background-job-management-client-tray-run-action.command-B9SFMGxf.mjs","sources":["../../../../libs/modules/background-job-management/client/src/lib/commands/tray-run-action.command.ts"],"sourcesContent":["import { AXPCommand, type AXPCommandExecuteResultPromise } from '@acorex-platform/framework-shared/runtime';\nimport {\n AXPBackgroundOperationService,\n type AXPBackgroundOperationActionKey,\n} from '@acorex-platform/framework-client/common';\nimport { Injectable, inject } from '@angular/core';\n\nconst TRAY_ACTIONS = new Set<AXPBackgroundOperationActionKey>([\n 'cancel',\n 'pause',\n 'resume',\n 'retry',\n 'dismiss',\n]);\n\nexport interface TrayRunActionInput {\n operationId?: string;\n jobId?: string;\n id?: string;\n action?: string;\n}\n\n@Injectable()\nexport class BackgroundJobTrayRunActionCommand implements AXPCommand<TrayRunActionInput, void> {\n private readonly operations = inject(AXPBackgroundOperationService);\n\n async execute(raw: unknown): AXPCommandExecuteResultPromise<void> {\n const wrapped = raw as { options?: TrayRunActionInput } & Record<string, unknown>;\n const input = (wrapped?.options ?? raw) as TrayRunActionInput;\n const operationId = (input.operationId ?? input.jobId ?? input.id)?.trim();\n const action = input.action?.trim() as AXPBackgroundOperationActionKey | undefined;\n if (!operationId) {\n return { success: false, message: { text: 'operationId is required.' } };\n }\n if (!action || !TRAY_ACTIONS.has(action)) {\n return { success: false, message: { text: 'A valid tray action is required.' } };\n }\n\n await this.operations.runAction(operationId, action);\n return { success: true, kind: 'object', data: undefined };\n }\n}\n"],"names":[],"mappings":";;;;AAOA,MAAM,YAAY,GAAG,IAAI,GAAG,CAAkC;IAC5D,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,OAAO;IACP,SAAS;AACV,CAAA,CAAC;MAUW,iCAAiC,CAAA;AAD9C,IAAA,WAAA,GAAA;AAEmB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,6BAA6B,CAAC;AAiBpE,IAAA;IAfC,MAAM,OAAO,CAAC,GAAY,EAAA;QACxB,MAAM,OAAO,GAAG,GAAiE;QACjF,MAAM,KAAK,IAAI,OAAO,EAAE,OAAO,IAAI,GAAG,CAAuB;AAC7D,QAAA,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,KAAK,IAA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