@ironcode/vas-lib 3.0.0-alpha.3 → 3.0.0-alpha.6
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/vas-base.model.d.ts +1 -1
- package/cjs/lib/entity/vas-base.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-base.model.js.map +1 -1
- package/cjs/lib/entity/vas-field.model.js +1 -1
- package/cjs/lib/entity/vas-field.model.js.map +1 -1
- package/cjs/lib/entity/vas-form.model.d.ts +1 -1
- package/cjs/lib/entity/vas-form.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-form.model.js.map +1 -1
- package/cjs/lib/entity/vas-job-copy.d.ts +12 -12
- package/cjs/lib/entity/vas-job-copy.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job-copy.js.map +1 -1
- package/cjs/lib/entity/vas-job.dto.d.ts +9 -3
- package/cjs/lib/entity/vas-job.dto.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.dto.js.map +1 -1
- package/cjs/lib/entity/vas-job.model.d.ts +25 -13
- package/cjs/lib/entity/vas-job.model.d.ts.map +1 -1
- package/cjs/lib/entity/vas-job.model.js +139 -90
- package/cjs/lib/entity/vas-job.model.js.map +1 -1
- package/cjs/lib/model/estimate-control/estimate.model.d.ts +1 -1
- package/cjs/lib/model/estimate-control/estimate.model.d.ts.map +1 -1
- package/cjs/lib/model/estimate-control/estimate.model.js +3 -0
- package/cjs/lib/model/estimate-control/estimate.model.js.map +1 -1
- package/cjs/lib/utils/get-value-by-path.d.ts +1 -1
- package/cjs/lib/utils/get-value-by-path.d.ts.map +1 -1
- package/cjs/lib/utils/get-value-by-path.js +4 -4
- package/cjs/lib/utils/get-value-by-path.js.map +1 -1
- package/fesm2022/ironcode-vas-lib.mjs +160 -109
- package/fesm2022/ironcode-vas-lib.mjs.map +1 -1
- package/lib/entity/vas-base.model.d.ts +1 -1
- package/lib/entity/vas-form.model.d.ts +1 -1
- package/lib/entity/vas-job-copy.d.ts +12 -12
- package/lib/entity/vas-job.dto.d.ts +9 -3
- package/lib/entity/vas-job.model.d.ts +25 -13
- package/lib/model/estimate-control/estimate.model.d.ts +1 -1
- package/lib/utils/get-value-by-path.d.ts +1 -1
- package/package.json +1 -1
|
@@ -18,7 +18,7 @@ export declare class VasBaseModel implements VasBaseDto {
|
|
|
18
18
|
modifiedByName: string;
|
|
19
19
|
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string);
|
|
20
20
|
static fromDto(dto: Partial<VasBaseDto>): VasBaseModel;
|
|
21
|
-
static create<T extends
|
|
21
|
+
static create<T extends VasBaseModel>(this: VasModelStatic<T>, user: {
|
|
22
22
|
id: string;
|
|
23
23
|
name: string;
|
|
24
24
|
}, values?: Partial<T>): T;
|
|
@@ -4,8 +4,8 @@ import { VasControlModel } from './vas-control.model';
|
|
|
4
4
|
import { FieldValueType } from './vas-field.dto';
|
|
5
5
|
import { VasFormDto } from './vas-form.dto';
|
|
6
6
|
import { VasGroupModel } from './vas-group.model';
|
|
7
|
-
import { VasJobModel } from './vas-job.model';
|
|
8
7
|
import { VasFormConfigModel } from './vas-form-config.model';
|
|
8
|
+
import { VasJobModel } from './vas-job.model';
|
|
9
9
|
/**
|
|
10
10
|
* VasFormModel
|
|
11
11
|
*/
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VasJobBaseDto } from './vas-job.dto';
|
|
2
2
|
export interface VasJobCopyDto {
|
|
3
|
-
accessGroup:
|
|
4
|
-
jobType:
|
|
5
|
-
jobStatus:
|
|
6
|
-
jobDate:
|
|
7
|
-
assigneeId:
|
|
3
|
+
accessGroup: VasJobBaseDto['accessGroup'];
|
|
4
|
+
jobType: VasJobBaseDto['jobType'];
|
|
5
|
+
jobStatus: VasJobBaseDto['jobStatus'];
|
|
6
|
+
jobDate: VasJobBaseDto['jobDate'];
|
|
7
|
+
assigneeId: VasJobBaseDto['assigneeId'];
|
|
8
8
|
fields: Array<string>;
|
|
9
9
|
files: Array<string>;
|
|
10
10
|
reports: Array<string>;
|
|
11
11
|
}
|
|
12
12
|
export declare class VasJobCopyModel {
|
|
13
|
-
accessGroup:
|
|
14
|
-
jobType:
|
|
15
|
-
jobStatus:
|
|
16
|
-
jobDate:
|
|
17
|
-
assigneeId:
|
|
13
|
+
accessGroup: VasJobBaseDto['accessGroup'];
|
|
14
|
+
jobType: VasJobBaseDto['jobType'];
|
|
15
|
+
jobStatus: VasJobBaseDto['jobStatus'];
|
|
16
|
+
jobDate: VasJobBaseDto['jobDate'];
|
|
17
|
+
assigneeId: VasJobBaseDto['assigneeId'];
|
|
18
18
|
fields: Array<string>;
|
|
19
19
|
files: Array<string>;
|
|
20
20
|
reports: Array<string>;
|
|
21
|
-
constructor(accessGroup:
|
|
21
|
+
constructor(accessGroup: VasJobBaseDto['accessGroup'], jobType: VasJobBaseDto['jobType'], jobStatus: VasJobBaseDto['jobStatus'], jobDate: VasJobBaseDto['jobDate'], assigneeId: VasJobBaseDto['assigneeId'], fields: Array<string>, files: Array<string>, reports: Array<string>);
|
|
22
22
|
static fromDto(dto: Partial<VasJobCopyDto>): VasJobCopyModel;
|
|
23
23
|
toDto(): VasJobCopyDto;
|
|
24
24
|
toApiDto(): Record<string, unknown>;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { VasFileDto } from './vas-file.dto';
|
|
2
2
|
import { VasRestrictedAccountObjectDto } from './vas-restricted-account-object.dto';
|
|
3
|
-
import { FieldValueType } from './vas-field.dto';
|
|
3
|
+
import { FieldValueType, VasFieldDto } from './vas-field.dto';
|
|
4
4
|
import { GeoLocation } from '../model';
|
|
5
5
|
import { VasReportDto } from './vas-report.dto';
|
|
6
6
|
import { VasTaskDto } from './vas-task.dto';
|
|
7
7
|
import { VasNoteDto } from './vas-note.dto';
|
|
8
8
|
import { VasJobEmailDto } from './vas-job-email.dto';
|
|
9
9
|
import { VasInstructionDto } from './vas-instruction.dto';
|
|
10
|
-
export interface
|
|
10
|
+
export interface VasJobBaseDto extends VasRestrictedAccountObjectDto {
|
|
11
11
|
reference: string;
|
|
12
12
|
jobDate: string;
|
|
13
13
|
jobStatus: string;
|
|
14
|
+
jobStatusLastUpdate: string;
|
|
14
15
|
jobType: string;
|
|
15
16
|
assigneeId: string;
|
|
16
17
|
formId: string;
|
|
@@ -20,10 +21,15 @@ export interface VasJobDto extends VasRestrictedAccountObjectDto {
|
|
|
20
21
|
version: number;
|
|
21
22
|
geoLocation: GeoLocation;
|
|
22
23
|
files: Array<VasFileDto>;
|
|
23
|
-
fields: Record<string, FieldValueType>;
|
|
24
24
|
jobEmails: Array<VasJobEmailDto>;
|
|
25
25
|
notes: Array<VasNoteDto>;
|
|
26
26
|
reports: Array<VasReportDto>;
|
|
27
27
|
tasks: Array<VasTaskDto>;
|
|
28
28
|
instruction: null | VasInstructionDto;
|
|
29
29
|
}
|
|
30
|
+
export interface VasJobRelationalDto extends VasJobBaseDto {
|
|
31
|
+
fields: Array<VasFieldDto>;
|
|
32
|
+
}
|
|
33
|
+
export interface VasJobDocumentDto extends VasJobBaseDto {
|
|
34
|
+
fields: Record<string, FieldValueType>;
|
|
35
|
+
}
|
|
@@ -2,7 +2,7 @@ import { VasFileDto } from './vas-file.dto';
|
|
|
2
2
|
import { VasBaseDto } from './vas-base.dto';
|
|
3
3
|
import { FieldValueType } from './vas-field.dto';
|
|
4
4
|
import { VasFormModel } from './vas-form.model';
|
|
5
|
-
import {
|
|
5
|
+
import { VasJobBaseDto, VasJobDocumentDto, VasJobRelationalDto } from './vas-job.dto';
|
|
6
6
|
import { VasRestrictedAccountObjectModel } from './vas-restricted-account-object.model';
|
|
7
7
|
import { GeoLocation } from '../model';
|
|
8
8
|
import { VasReportDto } from './vas-report.dto';
|
|
@@ -10,14 +10,15 @@ import { VasTaskDto } from './vas-task.dto';
|
|
|
10
10
|
import { VasNoteDto } from './vas-note.dto';
|
|
11
11
|
import { VasJobEmailDto } from './vas-job-email.dto';
|
|
12
12
|
import { VasInstructionDto } from './vas-instruction.dto';
|
|
13
|
+
import { VasFieldModel } from './vas-field.model';
|
|
13
14
|
export interface ParseSyntaxOptions {
|
|
14
15
|
timeZoneOffset: number;
|
|
15
16
|
objects?: Record<string, Partial<VasBaseDto> | Record<string, FieldValueType>>;
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
18
|
-
*
|
|
19
|
+
* VasJobBaseModel
|
|
19
20
|
*/
|
|
20
|
-
export declare class
|
|
21
|
+
export declare abstract class VasJobBaseModel<FType extends Record<string, FieldValueType> | Array<VasFieldModel>> extends VasRestrictedAccountObjectModel {
|
|
21
22
|
id: string;
|
|
22
23
|
created: string;
|
|
23
24
|
serverCreated: string;
|
|
@@ -32,6 +33,7 @@ export declare class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
32
33
|
reference: string;
|
|
33
34
|
jobDate: string;
|
|
34
35
|
jobStatus: string;
|
|
36
|
+
jobStatusLastUpdate: string;
|
|
35
37
|
jobType: string;
|
|
36
38
|
assigneeId: string;
|
|
37
39
|
formId: string;
|
|
@@ -41,24 +43,19 @@ export declare class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
41
43
|
version: number;
|
|
42
44
|
geoLocation: GeoLocation;
|
|
43
45
|
files: Array<VasFileDto>;
|
|
44
|
-
fields:
|
|
46
|
+
fields: FType;
|
|
45
47
|
jobEmails: Array<VasJobEmailDto>;
|
|
46
48
|
notes: Array<VasNoteDto>;
|
|
47
49
|
reports: Array<VasReportDto>;
|
|
48
50
|
tasks: Array<VasTaskDto>;
|
|
49
51
|
instruction: VasInstructionDto | null;
|
|
50
|
-
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string, account: string, accessGroup: string, reference: string, jobDate: string, jobStatus: string, jobType: string, assigneeId: string, formId: string, timeZoneOffset: number, pendingFields: number, childModified: string, version: number, geoLocation: GeoLocation, files: Array<VasFileDto>, fields:
|
|
52
|
+
constructor(id: string, created: string, serverCreated: string, createdBy: string, modified: string, serverModified: string, modifiedBy: string, createdByName: string, modifiedByName: string, account: string, accessGroup: string, reference: string, jobDate: string, jobStatus: string, jobStatusLastUpdate: string, jobType: string, assigneeId: string, formId: string, timeZoneOffset: number, pendingFields: number, childModified: string, version: number, geoLocation: GeoLocation, files: Array<VasFileDto>, fields: FType, jobEmails: Array<VasJobEmailDto>, notes: Array<VasNoteDto>, reports: Array<VasReportDto>, tasks: Array<VasTaskDto>, instruction: VasInstructionDto | null);
|
|
51
53
|
get createdByDisplayName(): string;
|
|
52
54
|
get modifiedByDisplayName(): string;
|
|
53
55
|
/**
|
|
54
56
|
* Return the list of Job properties
|
|
55
57
|
*/
|
|
56
58
|
get staticProperties(): Set<string>;
|
|
57
|
-
/**
|
|
58
|
-
* @return {VasJobModel}
|
|
59
|
-
*/
|
|
60
|
-
static empty(): VasJobModel;
|
|
61
|
-
static fromDto(dto: Partial<VasJobDto>): VasJobModel;
|
|
62
59
|
/**
|
|
63
60
|
* Returns an object describing how many attachments were added to this job
|
|
64
61
|
* (camera controls and files), and how many have not been uploaded yet.
|
|
@@ -73,8 +70,7 @@ export declare class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
73
70
|
/**
|
|
74
71
|
* @param path path segments
|
|
75
72
|
*/
|
|
76
|
-
getValueByPath<T>(path?: string | string[]): T | undefined;
|
|
77
|
-
toDto(): VasJobDto;
|
|
73
|
+
getValueByPath<T>(path?: string | string[]): T | null | undefined;
|
|
78
74
|
/**
|
|
79
75
|
* This method will parse a syntax that allows us to build strings from the
|
|
80
76
|
* values of from the job model. For example if the job model was:
|
|
@@ -106,5 +102,21 @@ export declare class VasJobModel extends VasRestrictedAccountObjectModel {
|
|
|
106
102
|
* @return {object}
|
|
107
103
|
*/
|
|
108
104
|
toApiDto(): Record<string, string | number | boolean>;
|
|
109
|
-
static toApiPatchDto(item: Partial<
|
|
105
|
+
static toApiPatchDto(item: Partial<VasJobBaseDto>): Partial<VasJobBaseDto>;
|
|
106
|
+
}
|
|
107
|
+
export declare class VasJobRelationalModel extends VasJobBaseModel<Array<VasFieldModel>> {
|
|
108
|
+
getValueByPath<T>(path?: string | string[]): T | null | undefined;
|
|
109
|
+
getFieldsMap(): Record<string, FieldValueType>;
|
|
110
|
+
getFieldValueByPath<T extends FieldValueType>(controlName: string, path: string[]): T | null | undefined;
|
|
111
|
+
static fromDto(dto: Partial<VasJobRelationalDto>): VasJobRelationalModel;
|
|
112
|
+
static empty(): VasJobRelationalModel;
|
|
113
|
+
toDto(): VasJobRelationalDto;
|
|
114
|
+
}
|
|
115
|
+
export declare class VasJobDocumentModel extends VasJobBaseModel<Record<string, FieldValueType>> {
|
|
116
|
+
static fromRelationalDto(dto: Partial<VasJobRelationalDto>): VasJobDocumentModel;
|
|
117
|
+
static fromDto(dto: Partial<VasJobDocumentDto>): VasJobDocumentModel;
|
|
118
|
+
static empty(): VasJobDocumentModel;
|
|
119
|
+
toDto(): VasJobDocumentDto;
|
|
110
120
|
}
|
|
121
|
+
/** @deprecated use either VasJobDocumentModel or VasJobRelationalModel **/
|
|
122
|
+
export type VasJobModel = VasJobDocumentModel | VasJobRelationalModel;
|
|
@@ -2,7 +2,7 @@ import { EstimateItemModel } from './estimate-item.model';
|
|
|
2
2
|
import { EstimateDto, EstimateSummaryDto } from './estimate.dto';
|
|
3
3
|
import { EstimateItemDto } from './estimate-item.dto';
|
|
4
4
|
export declare type EstimateSundryMethod = 'percentage' | 'percentage-with-max' | 'fixed';
|
|
5
|
-
export declare type EstimateSource = 'audatex' | 'glassmatix' | 'manual' | 'ibody';
|
|
5
|
+
export declare type EstimateSource = 'audatex' | 'glassmatix' | 'gtmotive' | 'manual' | 'ibody';
|
|
6
6
|
export declare class EstimateModel {
|
|
7
7
|
id: string;
|
|
8
8
|
source: EstimateSource;
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Path can be a string using dot notation, which can include square brackets to
|
|
6
6
|
* access array positions e.g. foo.bar[0].baz
|
|
7
7
|
*/
|
|
8
|
-
export declare function getValueByPath<T>(path: string | number | Array<string | number>, object: null | Record<string, any>): T | undefined;
|
|
8
|
+
export declare function getValueByPath<T>(path: string | number | Array<string | number>, object: null | Record<string, any>): T | null | undefined;
|