@zthun/romulator-api 1.18.3 → 1.18.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.
package/dist/dir/dir.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export declare abstract class ZDir {
2
2
  static application(): string;
3
3
  static configs(): string;
4
+ static jobs(): string;
4
5
  }
@@ -0,0 +1,8 @@
1
+ import { IZDataRequestQuery } from '@zthun/helpful-query';
2
+ import { IZRomulatorJobsService } from './jobs-service.mjs';
3
+ export declare class ZRomulatorJobsController {
4
+ private readonly _jobs;
5
+ constructor(_jobs: IZRomulatorJobsService);
6
+ list(params: IZDataRequestQuery): Promise<import('@zthun/helpful-query').IZPage<import('@zthun/romulator-client').IZJob>>;
7
+ get(id: string): Promise<import('@zthun/romulator-client').IZJob>;
8
+ }
@@ -0,0 +1,6 @@
1
+ import { IZRomulatorJobsRepository } from './jobs-repository.mjs';
2
+ export declare class ZRomulatorJobsModule {
3
+ private _jobs;
4
+ constructor(_jobs: IZRomulatorJobsRepository);
5
+ onModuleInit(): Promise<void>;
6
+ }
@@ -0,0 +1,33 @@
1
+ import { IZJob } from '@zthun/romulator-client';
2
+ export declare const ZRomulatorJobsRepositoryToken: unique symbol;
3
+ /**
4
+ * Represents a repository for job data.
5
+ */
6
+ export interface IZRomulatorJobsRepository {
7
+ /**
8
+ * Initializes the repository.
9
+ *
10
+ * This will setup the watch of the jobs directory and
11
+ * will then cancel all in progress jobs that cannot
12
+ * be resumed.
13
+ */
14
+ init(): Promise<void>;
15
+ /**
16
+ * Gets all jobs in the repository.
17
+ *
18
+ * @returns
19
+ * All jobs that are in the jobs folder.
20
+ * See {@link ZDir.jobs} for the location
21
+ * of the jobs folder.
22
+ */
23
+ jobs(): Promise<IZJob[]>;
24
+ }
25
+ /**
26
+ * The implementation of the IZRomulatorJobsRepository.
27
+ */
28
+ export declare class ZRomulatorJobsRepository implements IZRomulatorJobsRepository {
29
+ private _files;
30
+ private _stream;
31
+ init(): Promise<void>;
32
+ jobs(): Promise<IZJob[]>;
33
+ }
@@ -0,0 +1,16 @@
1
+ import { IZDataRequest, IZPage } from '@zthun/helpful-query';
2
+ import { IZLogger } from '@zthun/lumberjacky-log';
3
+ import { IZJob } from '@zthun/romulator-client';
4
+ import { IZRestfulGet } from '@zthun/webigail-rest';
5
+ import { IZRomulatorJobsRepository } from './jobs-repository.mjs';
6
+ export declare const ZRomulatorJobsToken: unique symbol;
7
+ export interface IZRomulatorJobsService extends IZRestfulGet<IZJob> {
8
+ list(req: IZDataRequest): Promise<IZPage<IZJob>>;
9
+ }
10
+ export declare class ZRomulatorJobsService implements IZRomulatorJobsService {
11
+ private _files;
12
+ private _logger;
13
+ constructor(logger: IZLogger, _files: IZRomulatorJobsRepository);
14
+ list(req: IZDataRequest): Promise<IZPage<IZJob>>;
15
+ get(id: string): Promise<IZJob>;
16
+ }