@zthun/romulator-client 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/index.cjs +173 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.js +172 -14
- package/dist/index.js.map +1 -1
- package/dist/job/job-type.d.mts +36 -0
- package/dist/job/job.d.mts +114 -0
- package/package.json +8 -8
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ZJobType } from './job-type.mjs';
|
|
2
|
+
/**
|
|
3
|
+
* Represents a job in the romulator system.
|
|
4
|
+
*/
|
|
5
|
+
export interface IZJob {
|
|
6
|
+
/**
|
|
7
|
+
* The id of the job.
|
|
8
|
+
*/
|
|
9
|
+
id?: string;
|
|
10
|
+
/**
|
|
11
|
+
* The job type.
|
|
12
|
+
*/
|
|
13
|
+
type: ZJobType;
|
|
14
|
+
/**
|
|
15
|
+
* The parameters for the job.
|
|
16
|
+
*/
|
|
17
|
+
context?: any;
|
|
18
|
+
/**
|
|
19
|
+
* The creation date of the job.
|
|
20
|
+
*/
|
|
21
|
+
createdAt?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A builder that constructs IZJob instances.
|
|
25
|
+
*/
|
|
26
|
+
export declare class ZJobBuilder {
|
|
27
|
+
private _job;
|
|
28
|
+
/**
|
|
29
|
+
* Sets the unique identifier for the job.
|
|
30
|
+
*
|
|
31
|
+
* @param val -
|
|
32
|
+
* Job id. If this is falsy, then the id
|
|
33
|
+
* is cleared.
|
|
34
|
+
* @returns
|
|
35
|
+
* This builder.
|
|
36
|
+
*/
|
|
37
|
+
id(val?: string): this;
|
|
38
|
+
/**
|
|
39
|
+
* Sets the id to a new generated guid if the id is not set.
|
|
40
|
+
*
|
|
41
|
+
* @returns
|
|
42
|
+
* This object.
|
|
43
|
+
*/
|
|
44
|
+
guid(): this;
|
|
45
|
+
/**
|
|
46
|
+
* Sets the job type.
|
|
47
|
+
*
|
|
48
|
+
* @param val -
|
|
49
|
+
* The job type.
|
|
50
|
+
* @returns
|
|
51
|
+
* This builder.
|
|
52
|
+
*/
|
|
53
|
+
type(val: ZJobType): this;
|
|
54
|
+
/**
|
|
55
|
+
* Sets the job type to ping.
|
|
56
|
+
*
|
|
57
|
+
* @returns
|
|
58
|
+
* This object.
|
|
59
|
+
*/
|
|
60
|
+
ping: () => this;
|
|
61
|
+
/**
|
|
62
|
+
* Sets the job type to scrape.
|
|
63
|
+
*
|
|
64
|
+
* @returns
|
|
65
|
+
* This object.
|
|
66
|
+
*/
|
|
67
|
+
scrape: () => this;
|
|
68
|
+
/**
|
|
69
|
+
* Sets the job context or parameters.
|
|
70
|
+
*
|
|
71
|
+
* @param val -
|
|
72
|
+
* Context to attach to the job.
|
|
73
|
+
* @returns
|
|
74
|
+
* This builder.
|
|
75
|
+
*/
|
|
76
|
+
context(val: any): this;
|
|
77
|
+
/**
|
|
78
|
+
* Sets the date and time when the job was created.
|
|
79
|
+
*
|
|
80
|
+
* @param val -
|
|
81
|
+
* The iso string representation of the job creation date.
|
|
82
|
+
*
|
|
83
|
+
* @returns
|
|
84
|
+
* This object.
|
|
85
|
+
*/
|
|
86
|
+
createdAt(val?: string): this;
|
|
87
|
+
/**
|
|
88
|
+
* Removes information about the job that does not need to be written
|
|
89
|
+
* to a job file.
|
|
90
|
+
*
|
|
91
|
+
* This removes any created and updated date as the file's audit
|
|
92
|
+
* information is source of truth for these.
|
|
93
|
+
*
|
|
94
|
+
* @returns
|
|
95
|
+
* This object.
|
|
96
|
+
*/
|
|
97
|
+
redact(): this;
|
|
98
|
+
/**
|
|
99
|
+
* Copies the values from another job into this builder.
|
|
100
|
+
*
|
|
101
|
+
* @param other -
|
|
102
|
+
* The job to duplicate.
|
|
103
|
+
* @returns
|
|
104
|
+
* This builder.
|
|
105
|
+
*/
|
|
106
|
+
copy(other: IZJob): this;
|
|
107
|
+
/**
|
|
108
|
+
* Builds a clean IZJob instance with undefined values removed.
|
|
109
|
+
*
|
|
110
|
+
* @returns
|
|
111
|
+
* The constructed job.
|
|
112
|
+
*/
|
|
113
|
+
build(): IZJob;
|
|
114
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zthun/romulator-client",
|
|
3
|
-
"version": "1.18.
|
|
3
|
+
"version": "1.18.5",
|
|
4
4
|
"description": "A client for declaring models and invoking the romulator api",
|
|
5
5
|
"author": "Anthony Bonta",
|
|
6
6
|
"license": "MIT",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@zthun/helpful-fn": "^9.11.
|
|
29
|
-
"@zthun/helpful-query": "^9.11.
|
|
30
|
-
"lodash-es": "^4.17.
|
|
28
|
+
"@zthun/helpful-fn": "^9.11.5",
|
|
29
|
+
"@zthun/helpful-query": "^9.11.5",
|
|
30
|
+
"lodash-es": "^4.17.23"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/lodash-es": "^4.17.12",
|
|
34
|
-
"@zthun/janitor-build-config": "^19.5.
|
|
34
|
+
"@zthun/janitor-build-config": "^19.5.6",
|
|
35
35
|
"@zthun/janitor-ts-config": "^19.5.3",
|
|
36
36
|
"tsx": "^4.21.0",
|
|
37
37
|
"typescript": "^5.9.3",
|
|
38
|
-
"vite": "^7.3.
|
|
39
|
-
"vitest": "^4.0.
|
|
38
|
+
"vite": "^7.3.1",
|
|
39
|
+
"vitest": "^4.0.18"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
42
|
"dist"
|
|
43
43
|
],
|
|
44
44
|
"sideEffects": false,
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "4dc5c512318120bb4a9e03f76d2634d91126bcd2"
|
|
46
46
|
}
|