@ironcode/vas-lib 1.8.0-alpha.11 → 1.8.0-alpha.14
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/cjs/lib/entity/index.d.ts +1 -0
- package/cjs/lib/entity/index.d.ts.map +1 -1
- package/cjs/lib/entity/index.js +1 -0
- package/cjs/lib/entity/index.js.map +1 -1
- package/cjs/lib/entity/vas-field.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-field.model.js +4 -1
- package/cjs/lib/entity/vas-field.model.js.map +1 -1
- package/cjs/lib/entity/vas-form-config.dto.d.ts +2 -23
- package/cjs/lib/entity/vas-form-config.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-form-config.dto.js.map +1 -1
- package/cjs/lib/entity/vas-job-action.dto.d.ts +67 -0
- package/cjs/lib/entity/vas-job-action.dto.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-action.dto.js +20 -0
- package/cjs/lib/entity/vas-job-action.dto.js.map +1 -0
- package/cjs/lib/entity/vas-job.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.model.js +10 -4
- package/cjs/lib/entity/vas-job.model.js.map +1 -1
- package/fesm2022/ironcode-vas-lib.mjs +28 -6
- package/fesm2022/ironcode-vas-lib.mjs.map +1 -1
- package/lib/entity/index.d.ts +1 -0
- package/lib/entity/vas-form-config.dto.d.ts +2 -23
- package/lib/entity/vas-job-action.dto.d.ts +66 -0
- package/package.json +1 -1
package/lib/entity/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export * from './vas-job-email.dto';
|
|
|
40
40
|
export * from './vas-job-email.model';
|
|
41
41
|
export * from './vas-job.dto';
|
|
42
42
|
export * from './vas-job.model';
|
|
43
|
+
export * from './vas-job-action.dto';
|
|
43
44
|
export * from './vas-job-status.dto';
|
|
44
45
|
export * from './vas-job-type.dto';
|
|
45
46
|
export * from './vas-lookup.dto';
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Describes an action that can be performed on jobs created by this form
|
|
3
|
-
*/
|
|
4
|
-
export interface VasFormActionDto {
|
|
5
|
-
title: string;
|
|
6
|
-
instruction?: {
|
|
7
|
-
instructionProviderId: string;
|
|
8
|
-
linkControl: string;
|
|
9
|
-
};
|
|
10
|
-
updates?: {
|
|
11
|
-
promptNote: boolean;
|
|
12
|
-
changes: Array<{
|
|
13
|
-
controlName: string;
|
|
14
|
-
value: string | '$now';
|
|
15
|
-
}>;
|
|
16
|
-
};
|
|
17
|
-
automation?: {
|
|
18
|
-
promptNote: boolean;
|
|
19
|
-
url: string;
|
|
20
|
-
key: string;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
1
|
+
import { VasJobActionDto } from './vas-job-action.dto';
|
|
23
2
|
export interface VasFormConfigDto {
|
|
24
3
|
emailRecipients?: {
|
|
25
4
|
job: Array<{
|
|
@@ -27,5 +6,5 @@ export interface VasFormConfigDto {
|
|
|
27
6
|
}>;
|
|
28
7
|
static: Array<string>;
|
|
29
8
|
};
|
|
30
|
-
actions?: Array<
|
|
9
|
+
actions?: Array<VasJobActionDto>;
|
|
31
10
|
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export declare type VasJobActionStepStage = 'initializing' | 'running' | 'succeeded' | 'failed';
|
|
2
|
+
export interface VasJobActionStepDto {
|
|
3
|
+
id: string;
|
|
4
|
+
type: 'automation' | 'controls' | 'email-form' | 'instruction' | 'set-job-status';
|
|
5
|
+
stage: VasJobActionStepStage;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Describes an action that can be performed on a job
|
|
9
|
+
*/
|
|
10
|
+
export interface VasJobActionDto {
|
|
11
|
+
id: string;
|
|
12
|
+
title: string;
|
|
13
|
+
steps: Array<VasJobActionStepDto>;
|
|
14
|
+
succeededControl?: string;
|
|
15
|
+
jobStatuses?: Array<string>;
|
|
16
|
+
context: 'portal-instruction' | 'job-form';
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Automation steps allow us to send the job along with some configuration
|
|
20
|
+
* parameters to some backend automation
|
|
21
|
+
*/
|
|
22
|
+
export interface VasJobActionAutomationStepDto extends VasJobActionStepDto {
|
|
23
|
+
type: 'automation';
|
|
24
|
+
url: string;
|
|
25
|
+
params?: Record<string, any>;
|
|
26
|
+
}
|
|
27
|
+
export declare const isJobAutomationStep: (step: VasJobActionStepDto) => step is VasJobActionAutomationStepDto;
|
|
28
|
+
/**
|
|
29
|
+
* Controls step allow us to specify a number of controls to present to the user
|
|
30
|
+
*/
|
|
31
|
+
export interface VasJobActionControlsStepDto extends VasJobActionStepDto {
|
|
32
|
+
type: 'controls';
|
|
33
|
+
controlNames: Array<string>;
|
|
34
|
+
}
|
|
35
|
+
export declare const isJobControlsStep: (step: VasJobActionStepDto) => step is VasJobActionControlsStepDto;
|
|
36
|
+
/**
|
|
37
|
+
* Email form step allow us to present the email form with some values already
|
|
38
|
+
* set
|
|
39
|
+
*/
|
|
40
|
+
export interface VasJobActionEmailFormStepDto extends VasJobActionStepDto {
|
|
41
|
+
type: 'email-form';
|
|
42
|
+
params: {
|
|
43
|
+
$recipients: Array<string>;
|
|
44
|
+
$subject: string;
|
|
45
|
+
$body: Array<string>;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export declare const isJobEmailFormStep: (step: VasJobActionStepDto) => step is VasJobActionEmailFormStepDto;
|
|
49
|
+
/**
|
|
50
|
+
* This step is designed to allow us to add an action button that will be
|
|
51
|
+
* displayed on the instruction. If the user invokes the action, a form will be
|
|
52
|
+
* displayed. The form id is discovered by looking up the instruction provider.
|
|
53
|
+
*/
|
|
54
|
+
export interface VasJobActionInstructionStepDto extends VasJobActionStepDto {
|
|
55
|
+
type: 'instruction';
|
|
56
|
+
instructionProviderId: string;
|
|
57
|
+
linkControl: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* SetJobStatus step allow us set the job status to some value
|
|
61
|
+
*/
|
|
62
|
+
export interface VasJobActionSetJobStatusStepDto extends VasJobActionStepDto {
|
|
63
|
+
type: 'set-job-status';
|
|
64
|
+
value: string;
|
|
65
|
+
}
|
|
66
|
+
export declare const isJobSetJobStatusStep: (step: VasJobActionStepDto) => step is VasJobActionSetJobStatusStepDto;
|