@ironcode/vas-lib 1.15.0 → 1.17.0
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/control-value/vas-camera-control-value.model.js +1 -2
- package/cjs/lib/control-value/vas-camera-control-value.model.js.map +1 -1
- package/cjs/lib/controls-config/vas-control-config-direction.enum.js +1 -1
- package/cjs/lib/controls-config/vas-control-config-direction.enum.js.map +1 -1
- package/cjs/lib/entity/index.d.ts +11 -1
- package/cjs/lib/entity/index.d.ts.map +1 -1
- package/cjs/lib/entity/index.js +11 -1
- package/cjs/lib/entity/index.js.map +1 -1
- package/cjs/lib/entity/step-model.factory.d.ts +11 -0
- package/cjs/lib/entity/step-model.factory.d.ts.map +1 -0
- package/cjs/lib/entity/step-model.factory.js +41 -0
- package/cjs/lib/entity/step-model.factory.js.map +1 -0
- package/cjs/lib/entity/vas-account.dto.d.ts +1 -1
- package/cjs/lib/entity/vas-account.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-account.dto.js +1 -1
- package/cjs/lib/entity/vas-account.dto.js.map +1 -1
- package/cjs/lib/entity/vas-control.model.js.map +1 -1
- package/cjs/lib/entity/vas-field.model.js.map +1 -1
- package/cjs/lib/entity/vas-file.dto.js +1 -2
- package/cjs/lib/entity/vas-file.dto.js.map +1 -1
- package/cjs/lib/entity/vas-file.model.js.map +1 -1
- package/cjs/lib/entity/vas-fire-user.model.d.ts +1 -1
- package/cjs/lib/entity/vas-fire-user.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-fire-user.model.js.map +1 -1
- package/cjs/lib/entity/vas-form-config.model.d.ts +3 -13
- package/cjs/lib/entity/vas-form-config.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-form-config.model.js.map +1 -1
- package/cjs/lib/entity/vas-form.model.js.map +1 -1
- package/cjs/lib/entity/vas-group.model.js.map +1 -1
- package/cjs/lib/entity/vas-invitation.d.ts +1 -1
- package/cjs/lib/entity/vas-invitation.d.ts.map +1 -1
- package/cjs/lib/entity/vas-invitation.js +1 -1
- package/cjs/lib/entity/vas-invitation.js.map +1 -1
- package/cjs/lib/entity/vas-job-action-controls-step.model.d.ts +34 -0
- package/cjs/lib/entity/vas-job-action-controls-step.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-action-controls-step.model.js +58 -0
- package/cjs/lib/entity/vas-job-action-controls-step.model.js.map +1 -0
- package/cjs/lib/entity/vas-job-action-email-form-step.model.d.ts +42 -0
- package/cjs/lib/entity/vas-job-action-email-form-step.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-action-email-form-step.model.js +66 -0
- package/cjs/lib/entity/vas-job-action-email-form-step.model.js.map +1 -0
- package/cjs/lib/entity/vas-job-action-instruction-step.model.d.ts +35 -0
- package/cjs/lib/entity/vas-job-action-instruction-step.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-action-instruction-step.model.js +60 -0
- package/cjs/lib/entity/vas-job-action-instruction-step.model.js.map +1 -0
- package/cjs/lib/entity/vas-job-action-note-prompt-step.model.d.ts +33 -0
- package/cjs/lib/entity/vas-job-action-note-prompt-step.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-action-note-prompt-step.model.js +56 -0
- package/cjs/lib/entity/vas-job-action-note-prompt-step.model.js.map +1 -0
- package/cjs/lib/entity/vas-job-action-set-datetime-step.model.d.ts +35 -0
- package/cjs/lib/entity/vas-job-action-set-datetime-step.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-action-set-datetime-step.model.js +60 -0
- package/cjs/lib/entity/vas-job-action-set-datetime-step.model.js.map +1 -0
- package/cjs/lib/entity/vas-job-action-set-job-status-step.model.d.ts +34 -0
- package/cjs/lib/entity/vas-job-action-set-job-status-step.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-action-set-job-status-step.model.js +58 -0
- package/cjs/lib/entity/vas-job-action-set-job-status-step.model.js.map +1 -0
- package/cjs/lib/entity/vas-job-action-set-value-step.model.d.ts +35 -0
- package/cjs/lib/entity/vas-job-action-set-value-step.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-action-set-value-step.model.js +60 -0
- package/cjs/lib/entity/vas-job-action-set-value-step.model.js.map +1 -0
- package/cjs/lib/entity/vas-job-action-step.model.d.ts +21 -0
- package/cjs/lib/entity/vas-job-action-step.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-action-step.model.js +25 -0
- package/cjs/lib/entity/vas-job-action-step.model.js.map +1 -0
- package/cjs/lib/entity/vas-job-action-webhook-step.model.d.ts +35 -0
- package/cjs/lib/entity/vas-job-action-webhook-step.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-action-webhook-step.model.js +60 -0
- package/cjs/lib/entity/vas-job-action-webhook-step.model.js.map +1 -0
- package/cjs/lib/entity/vas-job-action.dto.d.ts +31 -15
- package/cjs/lib/entity/vas-job-action.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job-action.dto.js +14 -1
- package/cjs/lib/entity/vas-job-action.dto.js.map +1 -1
- package/cjs/lib/entity/vas-job-action.model.d.ts +37 -0
- package/cjs/lib/entity/vas-job-action.model.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-action.model.js +63 -0
- package/cjs/lib/entity/vas-job-action.model.js.map +1 -0
- package/cjs/lib/entity/vas-job-status.d.ts +28 -0
- package/cjs/lib/entity/vas-job-status.d.ts.map +1 -0
- package/cjs/lib/entity/vas-job-status.js +46 -0
- package/cjs/lib/entity/vas-job-status.js.map +1 -0
- package/cjs/lib/entity/vas-job.model.js.map +1 -1
- package/cjs/lib/entity/vas-user.model.d.ts +1 -1
- package/cjs/lib/entity/vas-user.model.d.ts.map +1 -1
- package/cjs/lib/utils/find-form-control.js.map +1 -1
- package/cjs/lib/utils/get-value-by-path.d.ts.map +1 -1
- package/cjs/lib/utils/get-value-by-path.js.map +1 -1
- package/cjs/lib/utils/is-array-string.d.ts +1 -1
- package/cjs/lib/utils/is-array-string.d.ts.map +1 -1
- package/cjs/lib/utils/omit.d.ts.map +1 -1
- package/cjs/lib/utils/omit.js.map +1 -1
- package/cjs/lib/utils/only.d.ts.map +1 -1
- package/cjs/lib/utils/only.js.map +1 -1
- package/{fesm2020 → fesm2022}/ironcode-vas-lib.mjs +1261 -23
- package/fesm2022/ironcode-vas-lib.mjs.map +1 -0
- package/lib/entity/index.d.ts +11 -1
- package/lib/entity/step-model.factory.d.ts +10 -0
- package/lib/entity/vas-account.dto.d.ts +1 -1
- package/lib/entity/vas-fire-user.model.d.ts +1 -1
- package/lib/entity/vas-form-config.model.d.ts +3 -13
- package/lib/entity/vas-invitation.d.ts +1 -1
- package/lib/entity/vas-job-action-controls-step.model.d.ts +33 -0
- package/lib/entity/vas-job-action-email-form-step.model.d.ts +41 -0
- package/lib/entity/vas-job-action-instruction-step.model.d.ts +34 -0
- package/lib/entity/vas-job-action-note-prompt-step.model.d.ts +32 -0
- package/lib/entity/vas-job-action-set-datetime-step.model.d.ts +34 -0
- package/lib/entity/vas-job-action-set-job-status-step.model.d.ts +33 -0
- package/lib/entity/vas-job-action-set-value-step.model.d.ts +34 -0
- package/lib/entity/vas-job-action-step.model.d.ts +20 -0
- package/lib/entity/vas-job-action-webhook-step.model.d.ts +34 -0
- package/lib/entity/vas-job-action.dto.d.ts +31 -15
- package/lib/entity/vas-job-action.model.d.ts +36 -0
- package/lib/entity/vas-job-status.d.ts +27 -0
- package/lib/entity/vas-user.model.d.ts +1 -1
- package/lib/utils/is-array-string.d.ts +1 -1
- package/package.json +3 -11
- package/cjs/lib/entity/vas-job-status.dto.d.ts +0 -8
- package/cjs/lib/entity/vas-job-status.dto.d.ts.map +0 -1
- package/cjs/lib/entity/vas-job-status.dto.js +0 -3
- package/cjs/lib/entity/vas-job-status.dto.js.map +0 -1
- package/cjs/package.json +0 -5
- package/esm2020/ironcode-vas-lib.mjs +0 -5
- package/esm2020/lib/control-value/index.mjs +0 -3
- package/esm2020/lib/control-value/vas-camera-control-value.model.mjs +0 -8
- package/esm2020/lib/control-value/vas-function-control-value.dto.mjs +0 -2
- package/esm2020/lib/controls-config/index.mjs +0 -5
- package/esm2020/lib/controls-config/vas-control-config-direction.enum.mjs +0 -8
- package/esm2020/lib/controls-config/vas-control-config.model.mjs +0 -2
- package/esm2020/lib/controls-config/vas-function-control-config.dto.mjs +0 -2
- package/esm2020/lib/controls-config/vas-select-control-config.model.mjs +0 -2
- package/esm2020/lib/elastic/index.mjs +0 -2
- package/esm2020/lib/elastic/job.elastic-doc.mjs +0 -2
- package/esm2020/lib/entity/index.mjs +0 -70
- package/esm2020/lib/entity/vas-access-group.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-account-config.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-account-object.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-account-object.model.mjs +0 -24
- package/esm2020/lib/entity/vas-account.dto.mjs +0 -7
- package/esm2020/lib/entity/vas-base.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-base.model.mjs +0 -34
- package/esm2020/lib/entity/vas-branch.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-branch.model.mjs +0 -68
- package/esm2020/lib/entity/vas-contact-type.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-contact.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-contact.model.mjs +0 -101
- package/esm2020/lib/entity/vas-control-type.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-control-type.model.mjs +0 -52
- package/esm2020/lib/entity/vas-control.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-control.model.mjs +0 -191
- package/esm2020/lib/entity/vas-field.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-field.model.mjs +0 -112
- package/esm2020/lib/entity/vas-file.dto.mjs +0 -9
- package/esm2020/lib/entity/vas-file.model.mjs +0 -135
- package/esm2020/lib/entity/vas-fire-user.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-fire-user.model.mjs +0 -102
- package/esm2020/lib/entity/vas-form-config.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-form-config.model.mjs +0 -31
- package/esm2020/lib/entity/vas-form.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-form.model.mjs +0 -215
- package/esm2020/lib/entity/vas-group.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-group.model.mjs +0 -108
- package/esm2020/lib/entity/vas-instruction-job-field.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-instruction-job-field.model.mjs +0 -48
- package/esm2020/lib/entity/vas-instruction-job.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-instruction-job.model.mjs +0 -81
- package/esm2020/lib/entity/vas-instruction-provider.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-instruction-provider.model.mjs +0 -66
- package/esm2020/lib/entity/vas-instruction.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-instruction.model.mjs +0 -52
- package/esm2020/lib/entity/vas-invitation.mjs +0 -88
- package/esm2020/lib/entity/vas-job-action.dto.mjs +0 -22
- package/esm2020/lib/entity/vas-job-copy.mjs +0 -39
- package/esm2020/lib/entity/vas-job-data.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-job-data.model.mjs +0 -21
- package/esm2020/lib/entity/vas-job-email.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-job-email.model.mjs +0 -85
- package/esm2020/lib/entity/vas-job-status.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-job-type.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-job.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-job.model.mjs +0 -529
- package/esm2020/lib/entity/vas-lookup-type.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-lookup.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-lookup.model.mjs +0 -75
- package/esm2020/lib/entity/vas-membership.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-membership.model.mjs +0 -62
- package/esm2020/lib/entity/vas-note.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-note.model.mjs +0 -68
- package/esm2020/lib/entity/vas-report-layout.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-report-layout.model.mjs +0 -22
- package/esm2020/lib/entity/vas-report-request.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-report-request.model.mjs +0 -44
- package/esm2020/lib/entity/vas-report.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-report.model.mjs +0 -72
- package/esm2020/lib/entity/vas-restricted-account-object.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-restricted-account-object.model.mjs +0 -24
- package/esm2020/lib/entity/vas-task-type.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-task.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-task.model.mjs +0 -80
- package/esm2020/lib/entity/vas-user.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-user.model.mjs +0 -42
- package/esm2020/lib/entity/vas-vehicle.dto.mjs +0 -2
- package/esm2020/lib/entity/vas-vehicle.model.mjs +0 -69
- package/esm2020/lib/model/geo-location.mjs +0 -12
- package/esm2020/lib/model/index.mjs +0 -3
- package/esm2020/lib/model/vas-time-range.model.mjs +0 -2
- package/esm2020/lib/utils/get-value-by-path.mjs +0 -64
- package/esm2020/lib/utils/is-array-string.mjs +0 -4
- package/esm2020/lib/utils/only.mjs +0 -22
- package/esm2020/public-api.mjs +0 -6
- package/fesm2015/ironcode-vas-lib.mjs +0 -2736
- package/fesm2015/ironcode-vas-lib.mjs.map +0 -1
- package/fesm2020/ironcode-vas-lib.mjs.map +0 -1
- package/lib/entity/vas-job-status.dto.d.ts +0 -7
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
type: 'automation' | 'controls' | 'email-form' | 'instruction' | 'note-prompt' | 'set-datetime' | 'set-job-status' | 'set-value';
|
|
1
|
+
import { VasBaseDto } from './vas-base.dto';
|
|
2
|
+
export declare type VasJobActionStepStage = 'initializing' | 'running' | 'succeeded' | 'error';
|
|
3
|
+
export interface VasJobActionStepDto extends VasBaseDto {
|
|
4
|
+
type: 'automation' | 'controls' | 'email-form' | 'instruction' | 'note-prompt' | 'set-datetime' | 'set-job-status' | 'set-value' | 'webhook';
|
|
5
5
|
stage: VasJobActionStepStage;
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* Describes an action that can be performed on a job
|
|
9
9
|
*/
|
|
10
|
-
export interface VasJobActionDto {
|
|
11
|
-
id: string;
|
|
10
|
+
export interface VasJobActionDto extends VasBaseDto {
|
|
12
11
|
title: string;
|
|
13
12
|
steps: Array<VasJobActionStepDto>;
|
|
14
13
|
succeededControl?: string;
|
|
@@ -18,12 +17,18 @@ export interface VasJobActionDto {
|
|
|
18
17
|
/**
|
|
19
18
|
* Automation steps allow us to send the job along with some configuration
|
|
20
19
|
* parameters to some backend automation
|
|
20
|
+
* @deprecated use VasJobActionWebhookStepDto
|
|
21
21
|
*/
|
|
22
22
|
export interface VasJobActionAutomationStepDto extends VasJobActionStepDto {
|
|
23
23
|
type: 'automation';
|
|
24
24
|
url: string;
|
|
25
25
|
params?: Record<string, any>;
|
|
26
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @param step
|
|
30
|
+
* @deprecated use isJobWebhookStep
|
|
31
|
+
*/
|
|
27
32
|
export declare const isJobAutomationStep: (step: VasJobActionStepDto) => step is VasJobActionAutomationStepDto;
|
|
28
33
|
/**
|
|
29
34
|
* Controls step allow us to specify a number of controls to present to the user
|
|
@@ -32,7 +37,7 @@ export interface VasJobActionControlsStepDto extends VasJobActionStepDto {
|
|
|
32
37
|
type: 'controls';
|
|
33
38
|
controlNames: Array<string>;
|
|
34
39
|
}
|
|
35
|
-
export declare const isJobControlsStep: (step:
|
|
40
|
+
export declare const isJobControlsStep: (step: any) => step is VasJobActionControlsStepDto;
|
|
36
41
|
/**
|
|
37
42
|
* Email form step allow us to present the email form with some values already
|
|
38
43
|
* set
|
|
@@ -42,10 +47,10 @@ export interface VasJobActionEmailFormStepDto extends VasJobActionStepDto {
|
|
|
42
47
|
params: {
|
|
43
48
|
$recipients: Array<string>;
|
|
44
49
|
$subject: string;
|
|
45
|
-
$body: Array<string
|
|
50
|
+
$body: Array<string> | string;
|
|
46
51
|
};
|
|
47
52
|
}
|
|
48
|
-
export declare const isJobEmailFormStep: (step:
|
|
53
|
+
export declare const isJobEmailFormStep: (step: any) => step is VasJobActionEmailFormStepDto;
|
|
49
54
|
/**
|
|
50
55
|
* This step is designed to allow us to add an action button that will be
|
|
51
56
|
* displayed on the instruction. If the user invokes the action, a form will be
|
|
@@ -56,13 +61,14 @@ export interface VasJobActionInstructionStepDto extends VasJobActionStepDto {
|
|
|
56
61
|
instructionProviderId: string;
|
|
57
62
|
linkControl: string;
|
|
58
63
|
}
|
|
64
|
+
export declare const isJobInstructionStep: (step: any) => step is VasJobActionInstructionStepDto;
|
|
59
65
|
/**
|
|
60
66
|
* NotePrompt step allows us to prompt the user for a note
|
|
61
67
|
*/
|
|
62
68
|
export interface VasJobActionNotePromptStepDto extends VasJobActionStepDto {
|
|
63
69
|
type: 'note-prompt';
|
|
64
70
|
}
|
|
65
|
-
export declare const isJobNotePromptStep: (step:
|
|
71
|
+
export declare const isJobNotePromptStep: (step: any) => step is VasJobActionNotePromptStepDto;
|
|
66
72
|
/**
|
|
67
73
|
* SetDatetime step allow us set the value of a datetime control
|
|
68
74
|
*/
|
|
@@ -71,15 +77,15 @@ export interface VasJobActionSetDatetimeStepDto extends VasJobActionStepDto {
|
|
|
71
77
|
value: string;
|
|
72
78
|
controlName: string;
|
|
73
79
|
}
|
|
74
|
-
export declare const isJobSetDatetimeStep: (step:
|
|
80
|
+
export declare const isJobSetDatetimeStep: (step: any) => step is VasJobActionSetDatetimeStepDto;
|
|
75
81
|
/**
|
|
76
|
-
* SetJobStatus step allow us set the job status to some value
|
|
77
|
-
*/
|
|
82
|
+
* SetJobStatus step allow us set the job status to some value
|
|
83
|
+
*/
|
|
78
84
|
export interface VasJobActionSetJobStatusStepDto extends VasJobActionStepDto {
|
|
79
85
|
type: 'set-job-status';
|
|
80
86
|
value: string;
|
|
81
87
|
}
|
|
82
|
-
export declare const isJobSetJobStatusStep: (step:
|
|
88
|
+
export declare const isJobSetJobStatusStep: (step: any) => step is VasJobActionSetJobStatusStepDto;
|
|
83
89
|
/**
|
|
84
90
|
* SetValue step allow us set the value of any control with a hardcoded value
|
|
85
91
|
*/
|
|
@@ -88,5 +94,15 @@ export interface VasJobActionSetValueStepDto extends VasJobActionStepDto {
|
|
|
88
94
|
value: string;
|
|
89
95
|
controlName: string;
|
|
90
96
|
}
|
|
91
|
-
export declare const isJobSetValueStep: (step:
|
|
97
|
+
export declare const isJobSetValueStep: (step: any) => step is VasJobActionSetValueStepDto;
|
|
98
|
+
/**
|
|
99
|
+
* Webhook steps allow us to send the job along with some configuration
|
|
100
|
+
* parameters to some backend automation
|
|
101
|
+
*/
|
|
102
|
+
export interface VasJobActionWebhookStepDto extends VasJobActionStepDto {
|
|
103
|
+
type: 'webhook';
|
|
104
|
+
url: string;
|
|
105
|
+
params?: Record<string, any>;
|
|
106
|
+
}
|
|
107
|
+
export declare const isJobWebhookStep: (step: any) => step is VasJobActionWebhookStepDto;
|
|
92
108
|
//# sourceMappingURL=vas-job-action.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-job-action.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-action.dto.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,
|
|
1
|
+
{"version":3,"file":"vas-job-action.dto.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-action.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,CAAC,OAAO,MAAM,qBAAqB,GAAG,cAAc,GAAG,SAAS,GAAG,WAAW,GAAG,OAAO,CAAC;AAE/F,MAAM,WAAW,mB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9B;AAED,eAAO,MAAM,gBAAgB,SACrB,GAAG,KACR,IAAI,IAAI,0BAEV,CAAC"}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isJobSetValueStep = exports.isJobSetJobStatusStep = exports.isJobSetDatetimeStep = exports.isJobNotePromptStep = exports.isJobEmailFormStep = exports.isJobControlsStep = exports.isJobAutomationStep = void 0;
|
|
3
|
+
exports.isJobWebhookStep = exports.isJobSetValueStep = exports.isJobSetJobStatusStep = exports.isJobSetDatetimeStep = exports.isJobNotePromptStep = exports.isJobInstructionStep = exports.isJobEmailFormStep = exports.isJobControlsStep = exports.isJobAutomationStep = void 0;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param step
|
|
7
|
+
* @deprecated use isJobWebhookStep
|
|
8
|
+
*/
|
|
4
9
|
const isJobAutomationStep = (step) => {
|
|
5
10
|
return step && step.type === 'automation';
|
|
6
11
|
};
|
|
@@ -13,6 +18,10 @@ const isJobEmailFormStep = (step) => {
|
|
|
13
18
|
return step && step.type === 'email-form';
|
|
14
19
|
};
|
|
15
20
|
exports.isJobEmailFormStep = isJobEmailFormStep;
|
|
21
|
+
const isJobInstructionStep = (step) => {
|
|
22
|
+
return step && step.type === 'instruction';
|
|
23
|
+
};
|
|
24
|
+
exports.isJobInstructionStep = isJobInstructionStep;
|
|
16
25
|
const isJobNotePromptStep = (step) => {
|
|
17
26
|
return step && step.type === 'note-prompt';
|
|
18
27
|
};
|
|
@@ -29,4 +38,8 @@ const isJobSetValueStep = (step) => {
|
|
|
29
38
|
return step && step.type === 'set-value';
|
|
30
39
|
};
|
|
31
40
|
exports.isJobSetValueStep = isJobSetValueStep;
|
|
41
|
+
const isJobWebhookStep = (step) => {
|
|
42
|
+
return step && step.type === 'webhook';
|
|
43
|
+
};
|
|
44
|
+
exports.isJobWebhookStep = isJobWebhookStep;
|
|
32
45
|
//# sourceMappingURL=vas-job-action.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-job-action.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-action.dto.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"vas-job-action.dto.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-action.dto.ts"],"names":[],"mappings":";;;AAqDA;;;;GAIG;AACI,MAAM,mBAAmB,GAAG,CACjC,IAAyB,EACc,EAAE;IACzC,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC;AAC5C,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B;AAUK,MAAM,iBAAiB,GAAG,CAC/B,IAAS,EAC4B,EAAE;IACvC,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC;AAC1C,CAAC,CAAC;AAJW,QAAA,iBAAiB,qBAI5B;AAeK,MAAM,kBAAkB,GAAG,CAChC,IAAS,EAC6B,EAAE;IACxC,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,YAAY,CAAC;AAC5C,CAAC,CAAC;AAJW,QAAA,kBAAkB,sBAI7B;AAoBK,MAAM,oBAAoB,GAAG,CAClC,IAAS,EAC+B,EAAE;IAC1C,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC;AAC7C,CAAC,CAAC;AAJW,QAAA,oBAAoB,wBAI/B;AASK,MAAM,mBAAmB,GAAG,CACjC,IAAS,EAC8B,EAAE;IACzC,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC;AAC7C,CAAC,CAAC;AAJW,QAAA,mBAAmB,uBAI9B;AAYK,MAAM,oBAAoB,GAAG,CAClC,IAAS,EAC+B,EAAE;IAC1C,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC;AAC9C,CAAC,CAAC;AAJW,QAAA,oBAAoB,wBAI/B;AAUK,MAAM,qBAAqB,GAAG,CACnC,IAAS,EACgC,EAAE;IAC3C,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,gBAAgB,CAAC;AAChD,CAAC,CAAC;AAJW,QAAA,qBAAqB,yBAIhC;AAYK,MAAM,iBAAiB,GAAG,CAC/B,IAAS,EAC4B,EAAE;IACvC,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW,CAAC;AAC3C,CAAC,CAAC;AAJW,QAAA,iBAAiB,qBAI5B;AAcK,MAAM,gBAAgB,GAAG,CAC9B,IAAS,EAC2B,EAAE;IACtC,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,SAAS,CAAC;AACzC,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B","sourcesContent":["import { VasBaseDto } from './vas-base.dto';\n\nexport declare type VasJobActionStepStage = 'initializing' | 'running' | 'succeeded' | 'error';\n\nexport interface VasJobActionStepDto extends VasBaseDto {\n type: 'automation'\n | 'controls'\n | 'email-form'\n | 'instruction'\n | 'note-prompt'\n | 'set-datetime'\n | 'set-job-status'\n | 'set-value'\n | 'webhook';\n stage: VasJobActionStepStage;\n}\n\n/**\n * Describes an action that can be performed on a job\n */\nexport interface VasJobActionDto extends VasBaseDto {\n // The title of the action\n title: string;\n // a list of steps to be performed\n steps: Array<VasJobActionStepDto>;\n // a control name for which to check the presence of a value. If the value\n // is set, then the action is assumed to have succeeded. The field for the\n // control should be set by the last step in the action.\n succeededControl?: string;\n // a list of job status ids that this action will be valid for, if the array\n // is empty, then the action is valid for any job status.\n jobStatuses?: Array<string>;\n // the context where the action can be displayed\n context:\n // action can be displayed in the portal viewing an instruction\n 'portal-instruction'\n // action can be displayed when the job form is available\n | 'job-form';\n}\n\n/**\n * Automation steps allow us to send the job along with some configuration\n * parameters to some backend automation\n * @deprecated use VasJobActionWebhookStepDto\n */\nexport interface VasJobActionAutomationStepDto extends VasJobActionStepDto {\n type: 'automation';\n // url of the automation engine\n url: string;\n // an object of parameters that will be passed to the automation\n params?: Record<string, any>;\n}\n\n/**\n *\n * @param step\n * @deprecated use isJobWebhookStep\n */\nexport const isJobAutomationStep = (\n step: VasJobActionStepDto\n): step is VasJobActionAutomationStepDto => {\n return step && step.type === 'automation';\n};\n\n/**\n * Controls step allow us to specify a number of controls to present to the user\n */\nexport interface VasJobActionControlsStepDto extends VasJobActionStepDto {\n type: 'controls';\n controlNames: Array<string>;\n}\n\nexport const isJobControlsStep = (\n step: any\n): step is VasJobActionControlsStepDto => {\n return step && step.type === 'controls';\n};\n\n/**\n * Email form step allow us to present the email form with some values already\n * set\n */\nexport interface VasJobActionEmailFormStepDto extends VasJobActionStepDto {\n type: 'email-form';\n params: {\n $recipients: Array<string>,\n $subject: string;\n $body: Array<string> | string;\n };\n}\n\nexport const isJobEmailFormStep = (\n step: any\n): step is VasJobActionEmailFormStepDto => {\n return step && step.type === 'email-form';\n};\n\n\n/**\n * This step is designed to allow us to add an action button that will be\n * displayed on the instruction. If the user invokes the action, a form will be\n * displayed. The form id is discovered by looking up the instruction provider.\n */\nexport interface VasJobActionInstructionStepDto extends VasJobActionStepDto {\n type: 'instruction';\n // The id of an instruction provider, which will be opened in the portal\n // allowing the user to submit a form whose inputs are determined by the\n // instruction provider\n instructionProviderId: string;\n // Optional name of a control in the form referenced by the instruction\n // provider, the value of the control will be set to the job id from which\n // the action was triggered.\n linkControl: string;\n}\n\nexport const isJobInstructionStep = (\n step: any\n): step is VasJobActionInstructionStepDto => {\n return step && step.type === 'instruction';\n};\n\n/**\n * NotePrompt step allows us to prompt the user for a note\n */\nexport interface VasJobActionNotePromptStepDto extends VasJobActionStepDto {\n type: 'note-prompt';\n}\n\nexport const isJobNotePromptStep = (\n step: any\n): step is VasJobActionNotePromptStepDto => {\n return step && step.type === 'note-prompt';\n};\n\n\n/**\n * SetDatetime step allow us set the value of a datetime control\n */\nexport interface VasJobActionSetDatetimeStepDto extends VasJobActionStepDto {\n type: 'set-datetime';\n value: string;\n controlName: string;\n}\n\nexport const isJobSetDatetimeStep = (\n step: any\n): step is VasJobActionSetDatetimeStepDto => {\n return step && step.type === 'set-datetime';\n};\n\n/**\n * SetJobStatus step allow us set the job status to some value\n */\nexport interface VasJobActionSetJobStatusStepDto extends VasJobActionStepDto {\n type: 'set-job-status';\n value: string;\n}\n\nexport const isJobSetJobStatusStep = (\n step: any\n): step is VasJobActionSetJobStatusStepDto => {\n return step && step.type === 'set-job-status';\n};\n\n\n/**\n * SetValue step allow us set the value of any control with a hardcoded value\n */\nexport interface VasJobActionSetValueStepDto extends VasJobActionStepDto {\n type: 'set-value';\n value: string;\n controlName: string;\n}\n\nexport const isJobSetValueStep = (\n step: any\n): step is VasJobActionSetValueStepDto => {\n return step && step.type === 'set-value';\n};\n\n/**\n * Webhook steps allow us to send the job along with some configuration\n * parameters to some backend automation\n */\nexport interface VasJobActionWebhookStepDto extends VasJobActionStepDto {\n type: 'webhook';\n // url of the webhook\n url: string;\n // an object of parameters that will be passed to the webhook\n params?: Record<string, any>;\n}\n\nexport const isJobWebhookStep = (\n step: any\n): step is VasJobActionWebhookStepDto => {\n return step && step.type === 'webhook';\n};\n"]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { VasBaseModel } from './vas-base.model';
|
|
2
|
+
import { VasJobActionDto } from './vas-job-action.dto';
|
|
3
|
+
import { VasJobActionStepModel } from './vas-job-action-step.model';
|
|
4
|
+
/**
|
|
5
|
+
* VasJobActionModel
|
|
6
|
+
*/
|
|
7
|
+
export declare class VasJobActionModel extends VasBaseModel {
|
|
8
|
+
id: string;
|
|
9
|
+
created: string;
|
|
10
|
+
serverCreated: string;
|
|
11
|
+
createdBy: string;
|
|
12
|
+
modified: string;
|
|
13
|
+
serverModified: string;
|
|
14
|
+
modifiedBy: string;
|
|
15
|
+
createdByName: string;
|
|
16
|
+
modifiedByName: string;
|
|
17
|
+
title: string;
|
|
18
|
+
steps: Array<VasJobActionStepModel>;
|
|
19
|
+
succeededControl?: string | undefined;
|
|
20
|
+
jobStatuses?: Array<string> | undefined;
|
|
21
|
+
context: 'portal-instruction' | 'job-form';
|
|
22
|
+
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string, title: string, steps: Array<VasJobActionStepModel>, succeededControl?: string | undefined, jobStatuses?: Array<string> | undefined, context?: 'portal-instruction' | 'job-form');
|
|
23
|
+
/**
|
|
24
|
+
* @return {VasJobActionModel}
|
|
25
|
+
*/
|
|
26
|
+
static empty(): VasJobActionModel;
|
|
27
|
+
/**
|
|
28
|
+
* @param {VasJobActionDto} dto
|
|
29
|
+
* @return {VasJobActionModel}
|
|
30
|
+
*/
|
|
31
|
+
static fromDto(dto: Partial<VasJobActionDto>): VasJobActionModel;
|
|
32
|
+
/**
|
|
33
|
+
* @return {VasJobActionDto}
|
|
34
|
+
*/
|
|
35
|
+
toDto(): VasJobActionDto;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=vas-job-action.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job-action.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-action.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGpE;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,YAAY;IAG/B,EAAE,EAAE,MAAM;IACV,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,MAAM;IACrB,cAAc,EAAE,MAAM;IAC/B,KAAK,EAAE,MAAM;IACb,KAAK,EAAE,KAAK,CAAC,qBAAqB,CAAC;IACnC,gBAAgB,CAAC,EAAE,MAAM;IACzB,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC;IAC3B,OAAO,EAAE,oBAAoB,GAAG,UAAU;gBAbjC,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EAC/B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,KAAK,CAAC,qBAAqB,CAAC,EACnC,gBAAgB,CAAC,EAAE,MAAM,YAAA,EACzB,WAAW,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,YAAA,EAC3B,OAAO,GAAE,oBAAoB,GAAG,UAAuB;IAehE;;OAEG;IACH,MAAM,CAAC,KAAK,IAAI,iBAAiB;IAmBjC;;;OAGG;WACa,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,iBAAiB;IAmBzE;;OAEG;IACH,KAAK,IAAI,eAAe;CAkBzB"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VasJobActionModel = void 0;
|
|
4
|
+
const vas_base_model_1 = require("./vas-base.model");
|
|
5
|
+
const step_model_factory_1 = require("./step-model.factory");
|
|
6
|
+
/**
|
|
7
|
+
* VasJobActionModel
|
|
8
|
+
*/
|
|
9
|
+
class VasJobActionModel extends vas_base_model_1.VasBaseModel {
|
|
10
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, title, steps, succeededControl, jobStatuses, context = 'job-form') {
|
|
11
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName);
|
|
12
|
+
this.id = id;
|
|
13
|
+
this.created = created;
|
|
14
|
+
this.serverCreated = serverCreated;
|
|
15
|
+
this.createdBy = createdBy;
|
|
16
|
+
this.modified = modified;
|
|
17
|
+
this.serverModified = serverModified;
|
|
18
|
+
this.modifiedBy = modifiedBy;
|
|
19
|
+
this.createdByName = createdByName;
|
|
20
|
+
this.modifiedByName = modifiedByName;
|
|
21
|
+
this.title = title;
|
|
22
|
+
this.steps = steps;
|
|
23
|
+
this.succeededControl = succeededControl;
|
|
24
|
+
this.jobStatuses = jobStatuses;
|
|
25
|
+
this.context = context;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @return {VasJobActionModel}
|
|
29
|
+
*/
|
|
30
|
+
static empty() {
|
|
31
|
+
return new VasJobActionModel('', '', '', '', '', '', '', '', '', '', [], undefined, [], 'job-form');
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* @param {VasJobActionDto} dto
|
|
35
|
+
* @return {VasJobActionModel}
|
|
36
|
+
*/
|
|
37
|
+
static fromDto(dto) {
|
|
38
|
+
return new VasJobActionModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.title || '', (dto.steps || []).map(dto => (0, step_model_factory_1.stepModelFactory)(dto)), dto.succeededControl, dto.jobStatuses || [], dto.context || 'job-form');
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @return {VasJobActionDto}
|
|
42
|
+
*/
|
|
43
|
+
toDto() {
|
|
44
|
+
return {
|
|
45
|
+
id: this.id,
|
|
46
|
+
created: this.created,
|
|
47
|
+
serverCreated: this.serverCreated,
|
|
48
|
+
createdBy: this.createdBy,
|
|
49
|
+
modified: this.modified,
|
|
50
|
+
serverModified: this.serverModified,
|
|
51
|
+
modifiedBy: this.modifiedBy,
|
|
52
|
+
createdByName: this.createdByName,
|
|
53
|
+
modifiedByName: this.modifiedByName,
|
|
54
|
+
title: this.title,
|
|
55
|
+
steps: this.steps.map(m => m.toDto()),
|
|
56
|
+
succeededControl: this.succeededControl,
|
|
57
|
+
jobStatuses: this.jobStatuses,
|
|
58
|
+
context: this.context
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.VasJobActionModel = VasJobActionModel;
|
|
63
|
+
//# sourceMappingURL=vas-job-action.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job-action.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-action.model.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAGhD,6DAAwD;AAExD;;GAEG;AACH,MAAa,iBAAkB,SAAQ,6BAAY;IAEjD,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,cAAsB,EAC/B,KAAa,EACb,KAAmC,EACnC,gBAAyB,EACzB,WAA2B,EAC3B,UAA6C,UAAU;QAE9D,KAAK,CACH,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,aAAa,EACb,cAAc,CACf,CAAC;QAzBc,OAAE,GAAF,EAAE,CAAQ;QACV,YAAO,GAAP,OAAO,CAAQ;QACf,kBAAa,GAAb,aAAa,CAAQ;QACrB,cAAS,GAAT,SAAS,CAAQ;QACjB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,mBAAc,GAAd,cAAc,CAAQ;QACtB,eAAU,GAAV,UAAU,CAAQ;QAClB,kBAAa,GAAb,aAAa,CAAQ;QACrB,mBAAc,GAAd,cAAc,CAAQ;QAC/B,UAAK,GAAL,KAAK,CAAQ;QACb,UAAK,GAAL,KAAK,CAA8B;QACnC,qBAAgB,GAAhB,gBAAgB,CAAS;QACzB,gBAAW,GAAX,WAAW,CAAgB;QAC3B,YAAO,GAAP,OAA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AU;YAC3B,aAAa,EAAE,IAAI,CAAC,aAAa;YACjC,cAAc,EAAE,IAAI,CAAC,cAAc;YACnC,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;YACrC,gBAAgB,EAAE,IAAI,CAAC,gBAAgB;YACvC,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;IACJ,CAAC;CACF;AAjGD,8CAiGC","sourcesContent":["import { VasBaseModel } from './vas-base.model';\nimport { VasJobActionDto } from './vas-job-action.dto';\nimport { VasJobActionStepModel } from './vas-job-action-step.model';\nimport { stepModelFactory } from './step-model.factory';\n\n/**\n * VasJobActionModel\n */\nexport class VasJobActionModel extends VasBaseModel {\n\n constructor(\n public override id: string,\n public override created: string,\n public override serverCreated: string,\n public override createdBy: string,\n public override modified: string,\n public override serverModified: string,\n public override modifiedBy: string,\n public override createdByName: string,\n public override modifiedByName: string,\n public title: string,\n public steps: Array<VasJobActionStepModel>,\n public succeededControl?: string,\n public jobStatuses?: Array<string>,\n public context: 'portal-instruction' | 'job-form' = 'job-form'\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n createdByName,\n modifiedByName\n );\n }\n\n /**\n * @return {VasJobActionModel}\n */\n static empty(): VasJobActionModel {\n return new VasJobActionModel(\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n [],\n undefined,\n [],\n 'job-form'\n );\n }\n\n /**\n * @param {VasJobActionDto} dto\n * @return {VasJobActionModel}\n */\n static override fromDto(dto: Partial<VasJobActionDto>): VasJobActionModel {\n return new VasJobActionModel(\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.title || '',\n (dto.steps || []).map(dto => stepModelFactory(dto)),\n dto.succeededControl,\n dto.jobStatuses || [],\n dto.context || 'job-form'\n );\n }\n\n /**\n * @return {VasJobActionDto}\n */\n toDto(): VasJobActionDto {\n return {\n id: this.id,\n created: this.created,\n serverCreated: this.serverCreated,\n createdBy: this.createdBy,\n modified: this.modified,\n serverModified: this.serverModified,\n modifiedBy: this.modifiedBy,\n createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\n title: this.title,\n steps: this.steps.map(m => m.toDto()),\n succeededControl: this.succeededControl,\n jobStatuses: this.jobStatuses,\n context: this.context\n };\n }\n}\n"]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { VasAccountObjectDto } from './vas-account-object.dto';
|
|
2
|
+
import { VasAccountObjectModel } from './vas-account-object.model';
|
|
3
|
+
export interface VasJobStatusDto extends VasAccountObjectDto {
|
|
4
|
+
title: string;
|
|
5
|
+
sequence: number;
|
|
6
|
+
categoryGroups: Array<string>;
|
|
7
|
+
closed: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class VasJobStatusModel extends VasAccountObjectModel {
|
|
10
|
+
id: string;
|
|
11
|
+
created: string;
|
|
12
|
+
serverCreated: string;
|
|
13
|
+
createdBy: string;
|
|
14
|
+
modified: string;
|
|
15
|
+
serverModified: string;
|
|
16
|
+
modifiedBy: string;
|
|
17
|
+
createdByName: string;
|
|
18
|
+
modifiedByName: string;
|
|
19
|
+
account: string;
|
|
20
|
+
title: string;
|
|
21
|
+
sequence: number;
|
|
22
|
+
categoryGroups: Array<string>;
|
|
23
|
+
closed: boolean;
|
|
24
|
+
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string, account: string, title: string, sequence: number, categoryGroups: Array<string>, closed: boolean);
|
|
25
|
+
static fromDto(dto: Partial<VasJobStatusDto>): VasJobStatusModel;
|
|
26
|
+
toDto(): VasJobStatusDto;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=vas-job-status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job-status.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAEnE,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC9B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,iBAAkB,SAAQ,qBAAqB;IAGxC,EAAE,EAAE,MAAM;IACV,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,MAAM;IACrB,cAAc,EAAE,MAAM;IACtB,OAAO,EAAE,MAAM;IACxB,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC;IAC7B,MAAM,EAAE,OAAO;gBAbN,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,EACxB,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,EAC7B,MAAM,EAAE,OAAO;WAgBR,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,iBAAiB;IAmBzE,KAAK,IAAI,eAAe;CAkBzB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VasJobStatusModel = void 0;
|
|
4
|
+
const vas_account_object_model_1 = require("./vas-account-object.model");
|
|
5
|
+
class VasJobStatusModel extends vas_account_object_model_1.VasAccountObjectModel {
|
|
6
|
+
constructor(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account, title, sequence, categoryGroups, closed) {
|
|
7
|
+
super(id, created, serverCreated, createdBy, modified, serverModified, modifiedBy, createdByName, modifiedByName, account);
|
|
8
|
+
this.id = id;
|
|
9
|
+
this.created = created;
|
|
10
|
+
this.serverCreated = serverCreated;
|
|
11
|
+
this.createdBy = createdBy;
|
|
12
|
+
this.modified = modified;
|
|
13
|
+
this.serverModified = serverModified;
|
|
14
|
+
this.modifiedBy = modifiedBy;
|
|
15
|
+
this.createdByName = createdByName;
|
|
16
|
+
this.modifiedByName = modifiedByName;
|
|
17
|
+
this.account = account;
|
|
18
|
+
this.title = title;
|
|
19
|
+
this.sequence = sequence;
|
|
20
|
+
this.categoryGroups = categoryGroups;
|
|
21
|
+
this.closed = closed;
|
|
22
|
+
}
|
|
23
|
+
static fromDto(dto) {
|
|
24
|
+
return new VasJobStatusModel(dto.id || '', dto.created || '', dto.serverCreated || '', dto.createdBy || '', dto.modified || '', dto.serverModified || '', dto.modifiedBy || '', dto.createdByName || '', dto.modifiedByName || '', dto.account || '', dto.title || '', dto.sequence || 0, dto.categoryGroups || [], dto.closed || false);
|
|
25
|
+
}
|
|
26
|
+
toDto() {
|
|
27
|
+
return {
|
|
28
|
+
id: this.id,
|
|
29
|
+
created: this.created,
|
|
30
|
+
serverCreated: this.serverCreated,
|
|
31
|
+
createdBy: this.createdBy,
|
|
32
|
+
modified: this.modified,
|
|
33
|
+
serverModified: this.serverModified,
|
|
34
|
+
modifiedBy: this.modifiedBy,
|
|
35
|
+
createdByName: this.createdByName,
|
|
36
|
+
modifiedByName: this.modifiedByName,
|
|
37
|
+
account: this.account,
|
|
38
|
+
title: this.title,
|
|
39
|
+
sequence: this.sequence,
|
|
40
|
+
categoryGroups: this.categoryGroups,
|
|
41
|
+
closed: this.closed,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.VasJobStatusModel = VasJobStatusModel;
|
|
46
|
+
//# sourceMappingURL=vas-job-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vas-job-status.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job-status.ts"],"names":[],"mappings":";;;AACA,yEAAmE;AASnE,MAAa,iBAAkB,SAAQ,gDAAqB;IAE1D,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,cAAsB,EACtB,OAAe,EACxB,KAAa,EACb,QAAgB,EAChB,cAA6B,EAC7B,MAAe;QAEtB,KAAK,CACH,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,CACR,CAAC;QA1Bc,OAAE,GAAF,EAAE,CAAQ;QACV,YAAO,GAAP,OAAO,CAAQ;QACf,kBAAa,GAAb,aAAa,CAAQ;QACrB,cAAS,GAAT,SAAS,CAAQ;QACjB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,mBAAc,GAAd,cAAc,CAAQ;QACtB,eAAU,GAAV,UAAU,CAAQ;QAClB,kBAAa,GAAb,aAAa,CAAQ;QACrB,mBAAc,GAAd,cAAc,CAAQ;QACtB,YAAO,GAAP,OAAO,CAAQ;QACxB,UAAK,GAAL,KAAK,CAAQ;QACb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pB,CAAA;IACH,CAAC;CACF;AArED,8CAqEC","sourcesContent":["import { VasAccountObjectDto } from './vas-account-object.dto';\nimport { VasAccountObjectModel } from './vas-account-object.model';\n\nexport interface VasJobStatusDto extends VasAccountObjectDto {\n title: string;\n sequence: number;\n categoryGroups: Array<string>;\n closed: boolean;\n}\n\nexport class VasJobStatusModel extends VasAccountObjectModel {\n\n constructor(\n public override id: string,\n public override created: string,\n public override serverCreated: string,\n public override createdBy: string,\n public override modified: string,\n public override serverModified: string,\n public override modifiedBy: string,\n public override createdByName: string,\n public override modifiedByName: string,\n public override account: string,\n public title: string,\n public sequence: number,\n public categoryGroups: Array<string>,\n public closed: boolean,\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n createdByName,\n modifiedByName,\n account\n );\n }\n\n static override fromDto(dto: Partial<VasJobStatusDto>): VasJobStatusModel {\n return new VasJobStatusModel(\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.account || '',\n dto.title || '',\n dto.sequence || 0,\n dto.categoryGroups || [],\n dto.closed || false,\n );\n }\n\n toDto(): VasJobStatusDto {\n return {\n id: this.id,\n created: this.created,\n serverCreated: this.serverCreated,\n createdBy: this.createdBy,\n modified: this.modified,\n serverModified: this.serverModified,\n modifiedBy: this.modifiedBy,\n createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\n account: this.account,\n title: this.title,\n sequence: this.sequence,\n categoryGroups: this.categoryGroups,\n closed: this.closed,\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-job.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.ts"],"names":[],"mappings":";;;;AAAA,iDAAuD;AACvD,iDAAqC;AACrC,4DAA4B;AAC5B,kEAA4D;AAG5D,uDAAkD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aAAa,EAAE,IAAI,CAAC,aAAa,IAAI,CAAC,EACtC,QAAQ,EAAE,IAAI,CAAC,MAAM,IAAI,GAAG,IAC5B;IACJ,CAAC;IAEM,MAAM,CAAC,aAAa,CACzB,IAAwB;QAExB,OAAO,IAAA,WAAI,EACT,IAAI,EACJ;YACE,SAAS;YACT,UAAU;YACV,WAAW;YACX,SAAS;YACT,SAAS;YACT,aAAa;YACb,WAAW;YACX,YAAY;YACZ,gBAAgB;YAChB,eAAe;YACf,UAAU;SACX,CACF,CAAC;IACJ,CAAC;CACF;AApqBD,kCAoqBC","sourcesContent":["import { isFileDto, VasFileDto } from './vas-file.dto';\nimport { UUID } from 'angular2-uuid';\nimport moment from 'moment';\nimport { getValueByPath } from '../utils/get-value-by-path';\nimport { VasBaseDto } from './vas-base.dto';\nimport { VasFieldDto, VasFieldDtoValue } from './vas-field.dto';\nimport { VasFieldModel } from './vas-field.model';\nimport { VasFormModel } from './vas-form.model';\nimport { VasJobDto } from './vas-job.dto';\nimport { VasRestrictedAccountObjectModel } from './vas-restricted-account-object.model';\nimport { GeoLocation, getEmptyGeoLocation } from '../model';\nimport { isCameraControlValueV1, VasCameraControlValueModel } from '../control-value';\nimport { isArrayString } from '../utils/is-array-string';\nimport { VasFormDto } from './vas-form.dto';\nimport { only } from '../utils/only';\nimport { VasReportDto } from './vas-report.dto';\nimport { VasTaskDto } from './vas-task.dto';\nimport { VasNoteDto } from './vas-note.dto';\nimport { VasJobEmailDto } from './vas-job-email.dto';\nimport { VasInstructionDto } from './vas-instruction.dto';\n\nexport declare interface VasJobModelDynamicInterface {\n [s: string]: string | number | Record<string, VasFieldDtoValue>;\n}\n\nexport interface ParseSyntaxOptions {\n // This value will be used to adjust any datetime values that are referenced\n // in the syntax string. See\n // https://momentjscom.readthedocs.io/en/latest/moment/03-manipulating/09-utc-offset/\n // for more information about how `moment` will handle the value.\n timeZoneOffset: number,\n // this dictionary can be passed in to contain other objects to be referenced\n // in the syntax. For example if we have {job.foo} this will reference the\n // job's `foo` property, however if we have \"reportLayout.title\" this will\n // expect to find a property of `objects` called `reportLayout` which will\n // have a property called `title`\n objects?: Record<string, Partial<VasBaseDto> | Record<string, VasFieldDtoValue>>;\n}\n\n/**\n * JobModel\n */\nexport class VasJobModel extends VasRestrictedAccountObjectModel {\n\n constructor(\n public override id: string,\n public override created: string,\n public override serverCreated: string,\n public override createdBy: string,\n public override modified: string,\n public override serverModified: string,\n public override modifiedBy: string,\n public override createdByName: string,\n public override modifiedByName: string,\n public override account: string,\n public override accessGroup: string,\n public reference: string,\n public jobDate: string,\n public jobStatus: string,\n public jobType: string,\n public assigneeId: string,\n public formId: string,\n public timeZoneOffset: number,\n public pendingFields: number,\n public childModified: string,\n public version: number,\n public createdByDisplayName: string,\n public modifiedByDisplayName: string,\n public geoLocation: GeoLocation,\n public files: Array<VasFileDto>,\n public fields: Array<VasFieldDto>,\n public jobEmails: Array<VasJobEmailDto>,\n public notes: Array<VasNoteDto>,\n public reports: Array<VasReportDto>,\n public tasks: Array<VasTaskDto>,\n public instruction: VasInstructionDto | null\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n createdByName,\n modifiedByName,\n account,\n accessGroup\n );\n }\n\n /**\n * Returns this with the dynamic interface\n * @return {VasJobModelDynamicInterface}\n */\n get $this(): VasJobModelDynamicInterface {\n return this as any;\n }\n\n /**\n * Returns a list of Job dynamic properties i.e. those that are added by the\n * dynamic forms\n */\n get dynamicProperties(): Array<string> {\n const nativeProps = this.staticProperties;\n return Object\n .getOwnPropertyNames(this)\n .filter(prop => !nativeProps.includes(prop));\n }\n\n /**\n * Returns the list of properties of the Job type\n */\n get staticProperties(): Array<string> {\n return Object.getOwnPropertyNames(VasJobModel.empty());\n }\n\n /**\n * @return {VasJobModel}\n */\n static empty(): VasJobModel {\n return new VasJobModel(\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n moment().utcOffset(),\n 0,\n '',\n 0,\n '',\n '',\n getEmptyGeoLocation(),\n [],\n [],\n [],\n [],\n [],\n [],\n null\n );\n }\n\n static override fromDto(dto: Partial<VasJobDto>): VasJobModel {\n const model = new VasJobModel(\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.account || '',\n dto.accessGroup || '',\n dto.reference || '',\n dto.jobDate || '',\n dto.jobStatus || '',\n dto.jobType || '',\n dto.assigneeId || '',\n dto.formId || (dto as any).lastForm || '',\n dto.timeZoneOffset || moment().utcOffset(),\n dto.pendingFields || 0,\n dto.childModified || '',\n dto.version || 0,\n dto.createdByDisplayName || '',\n dto.modifiedByDisplayName || '',\n dto.geoLocation || getEmptyGeoLocation(),\n dto.files || [],\n dto.fields || [],\n dto.jobEmails || [],\n dto.notes || [],\n dto.reports || [],\n dto.tasks || [],\n dto.instruction || null\n );\n const emptyKeys = model.staticProperties;\n Object\n .keys(dto)\n .filter(key => emptyKeys.indexOf(key) === -1)\n .forEach((key: string) =>\n model.$this[key] = (dto as VasJobModelDynamicInterface)[key]\n );\n return model;\n }\n\n /**\n * This method will instantiate a new JobModel. The difference with this\n * method of instantiation is that we are coming from a relation frame i.e.\n * the job has a list of {@link VasFieldDto} instead of a Job document.\n *\n */\n static fromRelational(\n dto: Partial<VasJobDto>,\n form: VasFormDto\n ): VasJobModel {\n const model = new VasJobModel(\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.account || '',\n dto.accessGroup || '',\n dto.reference || '',\n dto.jobDate || '',\n dto.jobStatus || '',\n dto.jobType || '',\n dto.assigneeId || '',\n dto.formId || '',\n dto.timeZoneOffset || moment().utcOffset(),\n dto.pendingFields || 0,\n dto.childModified || '',\n dto.version || 0,\n dto.createdByDisplayName || '',\n dto.modifiedByDisplayName || '',\n dto.geoLocation || getEmptyGeoLocation(),\n dto.files || [],\n dto.fields || [],\n dto.jobEmails || [],\n dto.notes || [],\n dto.reports || [],\n dto.tasks || [],\n dto.instruction || null\n );\n\n form.groups\n .forEach(group => {\n group.controls\n .forEach(control => {\n const field = dto.fields?.find(f => f.control === control.id);\n if (!field) {\n return;\n }\n model.getGroup(group.name)[control.name] = field.value;\n });\n });\n return model;\n }\n\n /**\n * @param {VasFormModel} formModel\n * @return {Record<string, VasFieldDtoValue>}\n */\n getFields(formModel: VasFormModel): Record<string, VasFieldDtoValue> {\n const fields: { [key: string]: VasFieldDtoValue } = {};\n formModel.groups\n .forEach(group => {\n group.controls.forEach(control => {\n (fields)[control.reportTemplateName] =\n this.getValueByPath([group.name, control.name]) || null;\n });\n });\n return fields;\n }\n\n /**\n * Will return an object whose keys are the names of all fields in the job.\n * This method is similar to `getFields` except that this method will only\n * return values where a value was set, as opposed to `getFields` which will\n * return a value for every control even if no value was set, because it uses\n * the form to drive the logic. Note also this method will return values for\n * any Fields in the fields array.\n * @return {Record<string, VasFieldDtoValue>}\n */\n getFields2(): Record<string, VasFieldDtoValue> {\n let fields: { [key: string]: VasFieldDtoValue } = {};\n this.dynamicProperties\n .forEach((groupName) => {\n Object\n .keys(this.$this[groupName])\n .forEach(controlName => {\n fields[controlName] =\n this.getValueByPath([groupName, controlName]) || null;\n });\n }, {});\n this.fields.forEach(field => fields[field.controlName] = field.value);\n return fields;\n }\n\n /**\n * Returns an object describing how many attachments were added to this job\n * (camera controls and files), and how many have not been uploaded yet.\n *\n * @param formModel instance of {@link VasFormModel} that was used when the\n * job was created\n */\n getFilesUploadStatus(\n formModel: VasFormModel\n ): { pending: number; total: number } {\n\n const pathsWithValue: Array<Array<string>> = formModel\n .getCameraControlPaths()\n .map(path => {\n const value: VasFileDto | VasCameraControlValueModel =\n this.getValueByPath(path) as any;\n if (value && !!value.id) {\n return path;\n }\n return null;\n })\n .filter(path => path !== null ? path : null)\n .filter(isArrayString);\n\n let total = pathsWithValue.length;\n\n total += this.files.length;\n\n // calculate the number of camera images still to upload\n let pending = pathsWithValue\n .map(path => this.getValueByPath(path) as any)\n .map((value: VasFileDto | VasCameraControlValueModel) => {\n if (isFileDto(value)) {\n return value.id && value.status !== 'COMPLETE';\n } else if (isCameraControlValueV1(value)) {\n // if url is not set, it hasn't been uploaded\n return value.id && !value.url;\n }\n return false;\n })\n .filter(hasUploaded => hasUploaded)\n .length;\n\n // add total from files that are pending\n pending += this.files\n .filter(value => value.status !== 'COMPLETE')\n .length;\n\n return {\n pending,\n total\n };\n }\n\n /**\n * This method will return the dynamic property from the JobModel that\n * represent a group (from a form).\n *\n * @param name the name of the group\n * @param init if true (default) and group is not found, initialise an empty\n * group, otherwise throw an error\n */\n getGroup(name: string, init = true): Record<string, VasFieldDtoValue> {\n let prop;\n if (this.staticProperties.includes(name)) {\n throw Error(`invalid group name ${name}, not a dynamic property`);\n } else if (this.$this[name] === undefined) {\n if (init) {\n prop = this.$this[name] = {};\n } else {\n throw Error(`invalid group name ${name}, not found`);\n }\n } else {\n prop = this.$this[name];\n if (typeof prop !== 'object') {\n throw Error(`invalid group name ${name}, not an object`);\n }\n }\n return prop;\n }\n\n /**\n * @param path path segments\n */\n getValueByPath<T extends VasFieldDtoValue>(\n path: string[] = []\n ): T | undefined {\n return getValueByPath(path, this.$this);\n }\n\n /**\n * In order to understand why we need this method it is important to\n * understand that within the system, Jobs can be represented in one of two\n * ways, document and relational.\n *\n * The important distinction is how values submitted by a form are stored.\n *\n * Jobs stored as documents (JSON objects) will store user values, as dynamic\n * properties of the document.\n *\n * Whereas, Jobs stored as relational, will store user values in an array of\n * {@link VasFieldDto} objects.\n *\n * Depending on where we are in the system, either one of these approaches can\n * be more useful than the other.\n *\n * This method, assumes that the JobModel has been instantiated from a\n * document representation, and serves to hydrate the fields array. In order\n * to achieve this, knowledge of the {@link VasFormDto} that created the job\n * is required.\n *\n *\n * Job in document representation\n * {\n * id: <guid>,\n * reference: \"something\"\n * <other static job properties>...\n * foo: {\n * bar: \"value\"\n * }\n * }\n *\n * Job in relational representation\n * {\n * id: <guid>,\n * reference: \"something\"\n * <other static job properties>...\n * <will not have dynamic properties>...\n * fields: [\n * {\n * id: <guid>,\n * <other field properties>,\n * value: \"value\"\n * }\n * ]\n * }\n *\n *\n * @param formModel the VasFormModel that was used to create the job\n * @param controlFieldIdMap This is used to determine the id each field.\n * Either one will be found in the map, or a new one is generated.\n * @param controlNames if a value is provided, it will be used\n * to filter the fields that are returned.\n * @return {Array<VasFieldDto>}\n */\n hydrateFields(\n formModel: VasFormModel,\n controlFieldIdMap: Map<string, string> = new Map<string, string>(),\n controlNames?: Array<string>\n ): void {\n const fields: Array<VasFieldDto> = [];\n formModel.groups\n .forEach(group => {\n group.controls.forEach(control => {\n\n if (!control.name.startsWith('fields.')) {\n return;\n }\n\n if (controlNames && !controlNames.includes(control.name)) {\n return;\n }\n\n fields.push(VasFieldModel.fromDto({\n // if the controlId exists in the map, use the associated fieldId,\n // otherwise generate a new id for the field.\n id: controlFieldIdMap.get(control.id) || UUID.UUID(),\n account: this.account,\n job: this.id,\n createdBy: this.createdBy,\n created: this.created,\n modifiedBy: this.modifiedBy,\n modified: this.modified,\n control: control.id,\n value: this.getValueByPath(\n [group.name, control.name]\n )\n }));\n });\n });\n this.fields = fields;\n }\n\n /**\n * A very non sophisticated way to set values in the job via paths\n *\n * For example:\n *\n * setValueByPath('value', ['foo', 'bar']);\n *\n * will make results in job\n * {\n * foo: {\n * bar: 'value'\n * }\n * }\n *\n * @param value the value to set\n * @param path path segments\n */\n setValueByPath(value: VasFieldDtoValue, path: string[] = []): void {\n switch (path.length) {\n case 0: {\n return;\n }\n case 1: {\n (this as any)[path[0]] = value;\n return;\n }\n case 2: {\n // eslint-disable-next-line max-len\n (this.$this[path[0]] as Record<string, VasFieldDtoValue>)[path[1]] = value;\n return;\n }\n case 3: {\n // eslint-disable-next-line max-len\n ((this.$this[path[0]] as Record<string, VasFieldDtoValue>)[path[1]] as Record<string, VasFieldDtoValue>)[path[2]] = value;\n return;\n }\n default: {\n throw Error('path has too many segments');\n }\n }\n }\n\n /**\n * @param staticOnly if true, will only output values for the static\n * properties in the dto\n */\n public toDto(staticOnly = false): VasJobDto {\n\n if (staticOnly) {\n return {\n id: this.id,\n created: this.created,\n createdBy: this.createdBy,\n modified: this.modified,\n modifiedBy: this.modifiedBy,\n serverCreated: this.serverCreated,\n serverModified: this.serverModified,\n createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\n account: this.account,\n accessGroup: this.accessGroup,\n reference: this.reference,\n jobDate: this.jobDate,\n jobStatus: this.jobStatus,\n jobType: this.jobType,\n assigneeId: this.assigneeId,\n formId: this.formId,\n timeZoneOffset: this.timeZoneOffset,\n pendingFields: this.pendingFields,\n childModified: this.childModified,\n version: this.version,\n createdByDisplayName: this.createdByDisplayName,\n modifiedByDisplayName: this.modifiedByDisplayName,\n geoLocation: this.geoLocation,\n files: this.files,\n fields: this.fields,\n jobEmails: this.jobEmails,\n notes: this.notes,\n reports: this.reports,\n tasks: this.tasks,\n instruction: this.instruction\n };\n }\n\n const dto = {} as VasJobModelDynamicInterface;\n [...this.staticProperties, ...this.dynamicProperties]\n .forEach(prop => dto[prop] = this.$this[prop]);\n\n return dto as any;\n }\n\n /**\n * This method will parse a syntax that allows us to build strings from the\n * values of from the job model. For example if the job model was:\n *\n * {\n * foo: 'bar'\n * }\n *\n * and we pass \"i am foo {foo}\", the result would be:\n *\n * \"i am foo bar\"\n *\n * we can also use moment to parse dates, for example if the job model was:\n *\n * {\n * created: \"2022-01-01T00:00:00+0000\"\n * }\n *\n * and we pass \"{created|date:YY-MM-DD}\", the result would be:\n *\n * \"2022-01-01\"\n *\n * @param {string} value a string with the syntax\n * @param {ParseSyntaxOptions} options\n * @return the results of parsing the syntax on this job\n */\n parseSyntax(\n value: string,\n options: ParseSyntaxOptions = {\n timeZoneOffset: 0\n }\n ): string {\n\n if (!value || typeof value !== 'string') {\n return '';\n }\n const fields = this.getFields2();\n return value.replace(/({[^}]*})/g, (match: string, token: string) => {\n const syntax = token.substring(1, token.length - 1);\n\n let [key, filter] = syntax.split('|');\n key = (key || '').trim();\n filter = (filter || '').trim();\n\n let filterName, filterArg: string = '';\n if (filter) {\n const splitIndex = filter.indexOf(':');\n if (splitIndex !== -1) {\n filterName = filter.substring(0, splitIndex);\n filterArg = filter.substring(splitIndex + 1);\n } else {\n filterName = filter;\n filterArg = '';\n }\n filterName = (filterName || '').trim();\n filterArg = (filterArg || '').trim();\n }\n const path = key.split('.');\n const objectKey = path.shift() || '';\n let result = '';\n if (objectKey === 'job') {\n result = (this.getValueByPath(path) || '').toString();\n } else if (objectKey === 'fields') {\n result = (getValueByPath(['fields.' + path.shift(), ...path], fields) || '').toString();\n } else if (objectKey.length) {\n if (options.objects) {\n if (options.objects[objectKey] === undefined) {\n console.debug(\n `objectKey ${objectKey} is not present in options.object`\n );\n result = '';\n } else {\n result = (getValueByPath(path, options.objects[objectKey]) || '')\n .toString();\n }\n } else {\n console.debug(\n `objectKey ${objectKey} was used but options.object is not set`\n );\n return '';\n }\n } else {\n return '';\n }\n\n\n if (filterName && result) {\n switch (filterName) {\n case 'date': {\n if (!options.timeZoneOffset) {\n return moment(result).format(filterArg || '');\n } else {\n return moment(result)\n .utcOffset(options.timeZoneOffset)\n .format(filterArg || '');\n }\n }\n default: {\n console.warn('unknown filter %s', filterName);\n }\n }\n }\n\n return result;\n }).trim();\n };\n\n /**\n * @return {object}\n */\n override toApiDto(): Record<string, string | number | boolean> {\n return {\n ...super.toApiDto(),\n reference: this.reference || '~',\n jobDate: this.jobDate || '~',\n jobType: this.jobType || '~',\n accessGroup: this.accessGroup || '~',\n jobStatus: this.jobStatus || '~',\n assigneeId: this.assigneeId || '~',\n timeZoneOffset: this.timeZoneOffset || 0,\n pendingFields: this.pendingFields || 0,\n lastForm: this.formId || '~'\n };\n }\n\n public static toApiPatchDto(\n item: Partial<VasJobDto>\n ): Partial<VasJobDto> {\n return only(\n item,\n [\n 'created',\n 'modified',\n 'reference',\n 'jobDate',\n 'jobType',\n 'accessGroup',\n 'jobStatus',\n 'assigneeId',\n 'timeZoneOffset',\n 'pendingFields',\n 'lastForm'\n ]\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"vas-job.model.js","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-job.model.ts"],"names":[],"mappings":";;;;AAAA,iDAAuD;AACvD,iDAAqC;AACrC,4DAA4B;AAC5B,kEAA4D;AAG5D,uDAAkD;AAGlD,+FAAwF;AACxF,oCAA4D;AAC5D,oDAAsF;AACtF,8DAAyD;AAEzD,wCAAqC;AAyBrC;;GAEG;AACH,MAAa,WAAY,SAAQ,qEAA+B;IAE9D,YACkB,EAAU,EACV,OAAe,EACf,aAAqB,EACrB,SAAiB,EACjB,QAAgB,EAChB,cAAsB,EACtB,UAAkB,EAClB,aAAqB,EACrB,cAAsB,EACtB,OAAe,EACf,WAAmB,EAC5B,SAAiB,EACjB,OAAe,EACf,SAAiB,EACjB,OAAe,EACf,UAAkB,EAClB,MAAc,EACd,cAAsB,EACtB,aAAqB,EACrB,aAAqB,EACrB,OAAe,EACf,oBAA4B,EAC5B,qBAA6B,EAC7B,WAAwB,EACxB,KAAwB,EACxB,MAA0B,EAC1B,SAAgC,EAChC,KAAwB,EACxB,OAA4B,EAC5B,KAAwB,EACxB,WAAqC;QAE5C,KAAK,CACH,EAAE,EACF,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,cAAc,EACd,UAAU,EACV,aAAa,EACb,cAAc,EACd,OAAO,EACP,WAAW,CACZ,CAAC;QA5Cc,OAAE,GAAF,EAAE,CAAQ;QACV,YAAO,GAAP,OAAO,CAAQ;QACf,kBAAa,GAAb,aAAa,CAAQ;QACrB,cAAS,GAAT,SAAS,CAAQ;QACjB,aAAQ,GAAR,QAAQ,CAAQ;QAChB,mB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.dto';\nimport { UUID } from 'angular2-uuid';\nimport moment from 'moment';\nimport { getValueByPath } from '../utils/get-value-by-path';\nimport { VasBaseDto } from './vas-base.dto';\nimport { VasFieldDto, VasFieldDtoValue } from './vas-field.dto';\nimport { VasFieldModel } from './vas-field.model';\nimport { VasFormModel } from './vas-form.model';\nimport { VasJobDto } from './vas-job.dto';\nimport { VasRestrictedAccountObjectModel } from './vas-restricted-account-object.model';\nimport { GeoLocation, getEmptyGeoLocation } from '../model';\nimport { isCameraControlValueV1, VasCameraControlValueModel } from '../control-value';\nimport { isArrayString } from '../utils/is-array-string';\nimport { VasFormDto } from './vas-form.dto';\nimport { only } from '../utils/only';\nimport { VasReportDto } from './vas-report.dto';\nimport { VasTaskDto } from './vas-task.dto';\nimport { VasNoteDto } from './vas-note.dto';\nimport { VasJobEmailDto } from './vas-job-email.dto';\nimport { VasInstructionDto } from './vas-instruction.dto';\n\nexport declare interface VasJobModelDynamicInterface {\n [s: string]: string | number | Record<string, VasFieldDtoValue>;\n}\n\nexport interface ParseSyntaxOptions {\n // This value will be used to adjust any datetime values that are referenced\n // in the syntax string. See\n // https://momentjscom.readthedocs.io/en/latest/moment/03-manipulating/09-utc-offset/\n // for more information about how `moment` will handle the value.\n timeZoneOffset: number,\n // this dictionary can be passed in to contain other objects to be referenced\n // in the syntax. For example if we have {job.foo} this will reference the\n // job's `foo` property, however if we have \"reportLayout.title\" this will\n // expect to find a property of `objects` called `reportLayout` which will\n // have a property called `title`\n objects?: Record<string, Partial<VasBaseDto> | Record<string, VasFieldDtoValue>>;\n}\n\n/**\n * JobModel\n */\nexport class VasJobModel extends VasRestrictedAccountObjectModel {\n\n constructor(\n public override id: string,\n public override created: string,\n public override serverCreated: string,\n public override createdBy: string,\n public override modified: string,\n public override serverModified: string,\n public override modifiedBy: string,\n public override createdByName: string,\n public override modifiedByName: string,\n public override account: string,\n public override accessGroup: string,\n public reference: string,\n public jobDate: string,\n public jobStatus: string,\n public jobType: string,\n public assigneeId: string,\n public formId: string,\n public timeZoneOffset: number,\n public pendingFields: number,\n public childModified: string,\n public version: number,\n public createdByDisplayName: string,\n public modifiedByDisplayName: string,\n public geoLocation: GeoLocation,\n public files: Array<VasFileDto>,\n public fields: Array<VasFieldDto>,\n public jobEmails: Array<VasJobEmailDto>,\n public notes: Array<VasNoteDto>,\n public reports: Array<VasReportDto>,\n public tasks: Array<VasTaskDto>,\n public instruction: VasInstructionDto | null\n ) {\n super(\n id,\n created,\n serverCreated,\n createdBy,\n modified,\n serverModified,\n modifiedBy,\n createdByName,\n modifiedByName,\n account,\n accessGroup\n );\n }\n\n /**\n * Returns this with the dynamic interface\n * @return {VasJobModelDynamicInterface}\n */\n get $this(): VasJobModelDynamicInterface {\n return this as any;\n }\n\n /**\n * Returns a list of Job dynamic properties i.e. those that are added by the\n * dynamic forms\n */\n get dynamicProperties(): Array<string> {\n const nativeProps = this.staticProperties;\n return Object\n .getOwnPropertyNames(this)\n .filter(prop => !nativeProps.includes(prop));\n }\n\n /**\n * Returns the list of properties of the Job type\n */\n get staticProperties(): Array<string> {\n return Object.getOwnPropertyNames(VasJobModel.empty());\n }\n\n /**\n * @return {VasJobModel}\n */\n static empty(): VasJobModel {\n return new VasJobModel(\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n '',\n moment().utcOffset(),\n 0,\n '',\n 0,\n '',\n '',\n getEmptyGeoLocation(),\n [],\n [],\n [],\n [],\n [],\n [],\n null\n );\n }\n\n static override fromDto(dto: Partial<VasJobDto>): VasJobModel {\n const model = new VasJobModel(\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.account || '',\n dto.accessGroup || '',\n dto.reference || '',\n dto.jobDate || '',\n dto.jobStatus || '',\n dto.jobType || '',\n dto.assigneeId || '',\n dto.formId || (dto as any).lastForm || '',\n dto.timeZoneOffset || moment().utcOffset(),\n dto.pendingFields || 0,\n dto.childModified || '',\n dto.version || 0,\n dto.createdByDisplayName || '',\n dto.modifiedByDisplayName || '',\n dto.geoLocation || getEmptyGeoLocation(),\n dto.files || [],\n dto.fields || [],\n dto.jobEmails || [],\n dto.notes || [],\n dto.reports || [],\n dto.tasks || [],\n dto.instruction || null\n );\n const emptyKeys = model.staticProperties;\n Object\n .keys(dto)\n .filter(key => emptyKeys.indexOf(key) === -1)\n .forEach((key: string) =>\n model.$this[key] = (dto as VasJobModelDynamicInterface)[key]\n );\n return model;\n }\n\n /**\n * This method will instantiate a new JobModel. The difference with this\n * method of instantiation is that we are coming from a relation frame i.e.\n * the job has a list of {@link VasFieldDto} instead of a Job document.\n *\n */\n static fromRelational(\n dto: Partial<VasJobDto>,\n form: VasFormDto\n ): VasJobModel {\n const model = new VasJobModel(\n dto.id || '',\n dto.created || '',\n dto.serverCreated || '',\n dto.createdBy || '',\n dto.modified || '',\n dto.serverModified || '',\n dto.modifiedBy || '',\n dto.createdByName || '',\n dto.modifiedByName || '',\n dto.account || '',\n dto.accessGroup || '',\n dto.reference || '',\n dto.jobDate || '',\n dto.jobStatus || '',\n dto.jobType || '',\n dto.assigneeId || '',\n dto.formId || '',\n dto.timeZoneOffset || moment().utcOffset(),\n dto.pendingFields || 0,\n dto.childModified || '',\n dto.version || 0,\n dto.createdByDisplayName || '',\n dto.modifiedByDisplayName || '',\n dto.geoLocation || getEmptyGeoLocation(),\n dto.files || [],\n dto.fields || [],\n dto.jobEmails || [],\n dto.notes || [],\n dto.reports || [],\n dto.tasks || [],\n dto.instruction || null\n );\n\n form.groups\n .forEach(group => {\n group.controls\n .forEach(control => {\n const field = dto.fields?.find(f => f.control === control.id);\n if (!field) {\n return;\n }\n model.getGroup(group.name)[control.name] = field.value;\n });\n });\n return model;\n }\n\n /**\n * @param {VasFormModel} formModel\n * @return {Record<string, VasFieldDtoValue>}\n */\n getFields(formModel: VasFormModel): Record<string, VasFieldDtoValue> {\n const fields: { [key: string]: VasFieldDtoValue } = {};\n formModel.groups\n .forEach(group => {\n group.controls.forEach(control => {\n (fields)[control.reportTemplateName] =\n this.getValueByPath([group.name, control.name]) || null;\n });\n });\n return fields;\n }\n\n /**\n * Will return an object whose keys are the names of all fields in the job.\n * This method is similar to `getFields` except that this method will only\n * return values where a value was set, as opposed to `getFields` which will\n * return a value for every control even if no value was set, because it uses\n * the form to drive the logic. Note also this method will return values for\n * any Fields in the fields array.\n * @return {Record<string, VasFieldDtoValue>}\n */\n getFields2(): Record<string, VasFieldDtoValue> {\n let fields: { [key: string]: VasFieldDtoValue } = {};\n this.dynamicProperties\n .forEach((groupName) => {\n Object\n .keys(this.$this[groupName])\n .forEach(controlName => {\n fields[controlName] =\n this.getValueByPath([groupName, controlName]) || null;\n });\n }, {});\n this.fields.forEach(field => fields[field.controlName] = field.value);\n return fields;\n }\n\n /**\n * Returns an object describing how many attachments were added to this job\n * (camera controls and files), and how many have not been uploaded yet.\n *\n * @param formModel instance of {@link VasFormModel} that was used when the\n * job was created\n */\n getFilesUploadStatus(\n formModel: VasFormModel\n ): { pending: number; total: number } {\n\n const pathsWithValue: Array<Array<string>> = formModel\n .getCameraControlPaths()\n .map(path => {\n const value: VasFileDto | VasCameraControlValueModel =\n this.getValueByPath(path) as any;\n if (value && !!value.id) {\n return path;\n }\n return null;\n })\n .filter(path => path !== null ? path : null)\n .filter(isArrayString);\n\n let total = pathsWithValue.length;\n\n total += this.files.length;\n\n // calculate the number of camera images still to upload\n let pending = pathsWithValue\n .map(path => this.getValueByPath(path) as any)\n .map((value: VasFileDto | VasCameraControlValueModel) => {\n if (isFileDto(value)) {\n return value.id && value.status !== 'COMPLETE';\n } else if (isCameraControlValueV1(value)) {\n // if url is not set, it hasn't been uploaded\n return value.id && !value.url;\n }\n return false;\n })\n .filter(hasUploaded => hasUploaded)\n .length;\n\n // add total from files that are pending\n pending += this.files\n .filter(value => value.status !== 'COMPLETE')\n .length;\n\n return {\n pending,\n total\n };\n }\n\n /**\n * This method will return the dynamic property from the JobModel that\n * represent a group (from a form).\n *\n * @param name the name of the group\n * @param init if true (default) and group is not found, initialise an empty\n * group, otherwise throw an error\n */\n getGroup(name: string, init = true): Record<string, VasFieldDtoValue> {\n let prop;\n if (this.staticProperties.includes(name)) {\n throw Error(`invalid group name ${name}, not a dynamic property`);\n } else if (this.$this[name] === undefined) {\n if (init) {\n prop = this.$this[name] = {};\n } else {\n throw Error(`invalid group name ${name}, not found`);\n }\n } else {\n prop = this.$this[name];\n if (typeof prop !== 'object') {\n throw Error(`invalid group name ${name}, not an object`);\n }\n }\n return prop;\n }\n\n /**\n * @param path path segments\n */\n getValueByPath<T extends VasFieldDtoValue>(\n path: string[] = []\n ): T | undefined {\n return getValueByPath(path, this.$this);\n }\n\n /**\n * In order to understand why we need this method it is important to\n * understand that within the system, Jobs can be represented in one of two\n * ways, document and relational.\n *\n * The important distinction is how values submitted by a form are stored.\n *\n * Jobs stored as documents (JSON objects) will store user values, as dynamic\n * properties of the document.\n *\n * Whereas, Jobs stored as relational, will store user values in an array of\n * {@link VasFieldDto} objects.\n *\n * Depending on where we are in the system, either one of these approaches can\n * be more useful than the other.\n *\n * This method, assumes that the JobModel has been instantiated from a\n * document representation, and serves to hydrate the fields array. In order\n * to achieve this, knowledge of the {@link VasFormDto} that created the job\n * is required.\n *\n *\n * Job in document representation\n * {\n * id: <guid>,\n * reference: \"something\"\n * <other static job properties>...\n * foo: {\n * bar: \"value\"\n * }\n * }\n *\n * Job in relational representation\n * {\n * id: <guid>,\n * reference: \"something\"\n * <other static job properties>...\n * <will not have dynamic properties>...\n * fields: [\n * {\n * id: <guid>,\n * <other field properties>,\n * value: \"value\"\n * }\n * ]\n * }\n *\n *\n * @param formModel the VasFormModel that was used to create the job\n * @param controlFieldIdMap This is used to determine the id each field.\n * Either one will be found in the map, or a new one is generated.\n * @param controlNames if a value is provided, it will be used\n * to filter the fields that are returned.\n * @return {Array<VasFieldDto>}\n */\n hydrateFields(\n formModel: VasFormModel,\n controlFieldIdMap: Map<string, string> = new Map<string, string>(),\n controlNames?: Array<string>\n ): void {\n const fields: Array<VasFieldDto> = [];\n formModel.groups\n .forEach(group => {\n group.controls.forEach(control => {\n\n if (!control.name.startsWith('fields.')) {\n return;\n }\n\n if (controlNames && !controlNames.includes(control.name)) {\n return;\n }\n\n fields.push(VasFieldModel.fromDto({\n // if the controlId exists in the map, use the associated fieldId,\n // otherwise generate a new id for the field.\n id: controlFieldIdMap.get(control.id) || UUID.UUID(),\n account: this.account,\n job: this.id,\n createdBy: this.createdBy,\n created: this.created,\n modifiedBy: this.modifiedBy,\n modified: this.modified,\n control: control.id,\n value: this.getValueByPath(\n [group.name, control.name]\n )\n }));\n });\n });\n this.fields = fields;\n }\n\n /**\n * A very non sophisticated way to set values in the job via paths\n *\n * For example:\n *\n * setValueByPath('value', ['foo', 'bar']);\n *\n * will make results in job\n * {\n * foo: {\n * bar: 'value'\n * }\n * }\n *\n * @param value the value to set\n * @param path path segments\n */\n setValueByPath(value: VasFieldDtoValue, path: string[] = []): void {\n switch (path.length) {\n case 0: {\n return;\n }\n case 1: {\n (this as any)[path[0]] = value;\n return;\n }\n case 2: {\n // eslint-disable-next-line max-len\n (this.$this[path[0]] as Record<string, VasFieldDtoValue>)[path[1]] = value;\n return;\n }\n case 3: {\n // eslint-disable-next-line max-len\n ((this.$this[path[0]] as Record<string, VasFieldDtoValue>)[path[1]] as Record<string, VasFieldDtoValue>)[path[2]] = value;\n return;\n }\n default: {\n throw Error('path has too many segments');\n }\n }\n }\n\n /**\n * @param staticOnly if true, will only output values for the static\n * properties in the dto\n */\n public toDto(staticOnly = false): VasJobDto {\n\n if (staticOnly) {\n return {\n id: this.id,\n created: this.created,\n createdBy: this.createdBy,\n modified: this.modified,\n modifiedBy: this.modifiedBy,\n serverCreated: this.serverCreated,\n serverModified: this.serverModified,\n createdByName: this.createdByName,\n modifiedByName: this.modifiedByName,\n account: this.account,\n accessGroup: this.accessGroup,\n reference: this.reference,\n jobDate: this.jobDate,\n jobStatus: this.jobStatus,\n jobType: this.jobType,\n assigneeId: this.assigneeId,\n formId: this.formId,\n timeZoneOffset: this.timeZoneOffset,\n pendingFields: this.pendingFields,\n childModified: this.childModified,\n version: this.version,\n createdByDisplayName: this.createdByDisplayName,\n modifiedByDisplayName: this.modifiedByDisplayName,\n geoLocation: this.geoLocation,\n files: this.files,\n fields: this.fields,\n jobEmails: this.jobEmails,\n notes: this.notes,\n reports: this.reports,\n tasks: this.tasks,\n instruction: this.instruction\n };\n }\n\n const dto = {} as VasJobModelDynamicInterface;\n [...this.staticProperties, ...this.dynamicProperties]\n .forEach(prop => dto[prop] = this.$this[prop]);\n\n return dto as any;\n }\n\n /**\n * This method will parse a syntax that allows us to build strings from the\n * values of from the job model. For example if the job model was:\n *\n * {\n * foo: 'bar'\n * }\n *\n * and we pass \"i am foo {foo}\", the result would be:\n *\n * \"i am foo bar\"\n *\n * we can also use moment to parse dates, for example if the job model was:\n *\n * {\n * created: \"2022-01-01T00:00:00+0000\"\n * }\n *\n * and we pass \"{created|date:YY-MM-DD}\", the result would be:\n *\n * \"2022-01-01\"\n *\n * @param {string} value a string with the syntax\n * @param {ParseSyntaxOptions} options\n * @return the results of parsing the syntax on this job\n */\n parseSyntax(\n value: string,\n options: ParseSyntaxOptions = {\n timeZoneOffset: 0\n }\n ): string {\n\n if (!value || typeof value !== 'string') {\n return '';\n }\n const fields = this.getFields2();\n return value.replace(/({[^}]*})/g, (match: string, token: string) => {\n const syntax = token.substring(1, token.length - 1);\n\n let [key, filter] = syntax.split('|');\n key = (key || '').trim();\n filter = (filter || '').trim();\n\n let filterName, filterArg: string = '';\n if (filter) {\n const splitIndex = filter.indexOf(':');\n if (splitIndex !== -1) {\n filterName = filter.substring(0, splitIndex);\n filterArg = filter.substring(splitIndex + 1);\n } else {\n filterName = filter;\n filterArg = '';\n }\n filterName = (filterName || '').trim();\n filterArg = (filterArg || '').trim();\n }\n const path = key.split('.');\n const objectKey = path.shift() || '';\n let result = '';\n if (objectKey === 'job') {\n result = (this.getValueByPath(path) || '').toString();\n } else if (objectKey === 'fields') {\n result = (getValueByPath(['fields.' + path.shift(), ...path], fields) || '').toString();\n } else if (objectKey.length) {\n if (options.objects) {\n if (options.objects[objectKey] === undefined) {\n console.debug(\n `objectKey ${objectKey} is not present in options.object`\n );\n result = '';\n } else {\n result = (getValueByPath(path, options.objects[objectKey]) || '')\n .toString();\n }\n } else {\n console.debug(\n `objectKey ${objectKey} was used but options.object is not set`\n );\n return '';\n }\n } else {\n return '';\n }\n\n\n if (filterName && result) {\n switch (filterName) {\n case 'date': {\n if (!options.timeZoneOffset) {\n return moment(result).format(filterArg || '');\n } else {\n return moment(result)\n .utcOffset(options.timeZoneOffset)\n .format(filterArg || '');\n }\n }\n default: {\n console.warn('unknown filter %s', filterName);\n }\n }\n }\n\n return result;\n }).trim();\n };\n\n /**\n * @return {object}\n */\n override toApiDto(): Record<string, string | number | boolean> {\n return {\n ...super.toApiDto(),\n reference: this.reference || '~',\n jobDate: this.jobDate || '~',\n jobType: this.jobType || '~',\n accessGroup: this.accessGroup || '~',\n jobStatus: this.jobStatus || '~',\n assigneeId: this.assigneeId || '~',\n timeZoneOffset: this.timeZoneOffset || 0,\n pendingFields: this.pendingFields || 0,\n lastForm: this.formId || '~'\n };\n }\n\n public static toApiPatchDto(\n item: Partial<VasJobDto>\n ): Partial<VasJobDto> {\n return only(\n item,\n [\n 'created',\n 'modified',\n 'reference',\n 'jobDate',\n 'jobType',\n 'accessGroup',\n 'jobStatus',\n 'assigneeId',\n 'timeZoneOffset',\n 'pendingFields',\n 'lastForm'\n ]\n );\n }\n}\n"]}
|
|
@@ -15,7 +15,7 @@ export declare class VasUserModel extends VasBaseModel implements VasUserDto {
|
|
|
15
15
|
username: string;
|
|
16
16
|
memberships: Array<string>;
|
|
17
17
|
instructionProviders: Array<string>;
|
|
18
|
-
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string, email: string, name: string, username: string, memberships: Array<string>, instructionProviders: Array<string>);
|
|
18
|
+
constructor(id: string, created: string | undefined, serverCreated: string | undefined, createdBy: string | undefined, modified: string | undefined, serverModified: string | undefined, modifiedBy: string | undefined, createdByName: string, modifiedByName: string, email: string, name: string, username: string, memberships: Array<string>, instructionProviders: Array<string>);
|
|
19
19
|
static fromDto(dto: Partial<VasUserDto>): VasUserModel;
|
|
20
20
|
toDto(): VasUserDto;
|
|
21
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vas-user.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-user.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,qBAAa,YAAa,SAAQ,YAAa,YAAW,UAAU;IAGhD,EAAE,EAAE,MAAM;IACV,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,MAAM;IACrB,SAAS,EAAE,MAAM;IACjB,QAAQ,EAAE,MAAM;IAChB,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,MAAM;IAClB,aAAa,EAAE,MAAM;IACrB,cAAc,EAAE,MAAM;IAC/B,KAAK,EAAE,MAAM;IACb,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,MAAM;IAChB,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC;IAC1B,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC;gBAb1B,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"vas-user.model.d.ts","sourceRoot":"","sources":["../../../../../projects/vas-lib/src/lib/entity/vas-user.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;A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