@digital8/security-registers-backend-ts-sdk 0.0.493 → 0.0.495
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/README.md +2 -2
- package/dist/models/AssetResource.d.ts +1 -1
- package/dist/models/AssetResource.js +3 -1
- package/dist/models/IncidentFieldSchemaResource.d.ts +14 -0
- package/dist/models/IncidentFieldSchemaResource.js +12 -1
- package/dist/models/IncidentFieldSchemasShowRequest.d.ts +14 -0
- package/dist/models/IncidentFieldSchemasShowRequest.js +12 -1
- package/dist/models/IncidentImageResource.d.ts +1 -1
- package/dist/models/IncidentImageResource.js +3 -1
- package/dist/models/IncidentsExportCsvBulkRequest.d.ts +6 -0
- package/dist/models/IncidentsExportCsvBulkRequest.js +2 -0
- package/dist/models/IncidentsExportPdfBulkRequest.d.ts +6 -0
- package/dist/models/IncidentsExportPdfBulkRequest.js +2 -0
- package/dist/models/IncidentsListRequest.d.ts +6 -0
- package/dist/models/IncidentsListRequest.js +2 -0
- package/dist/models/IncidentsStoreRequest.d.ts +14 -0
- package/dist/models/IncidentsStoreRequest.js +12 -0
- package/dist/models/RegisterListResource.d.ts +2 -2
- package/dist/models/RegisterListResource.js +4 -4
- package/dist/models/RegisterResource.d.ts +1 -1
- package/dist/models/RegisterResource.js +1 -3
- package/dist/models/UserResource.d.ts +6 -0
- package/dist/models/UserResource.js +4 -0
- package/package.json +1 -1
- package/src/models/AssetResource.ts +3 -2
- package/src/models/IncidentFieldSchemaResource.ts +18 -0
- package/src/models/IncidentFieldSchemasShowRequest.ts +18 -0
- package/src/models/IncidentImageResource.ts +3 -2
- package/src/models/IncidentsExportCsvBulkRequest.ts +8 -0
- package/src/models/IncidentsExportPdfBulkRequest.ts +8 -0
- package/src/models/IncidentsListRequest.ts +8 -0
- package/src/models/IncidentsStoreRequest.ts +20 -0
- package/src/models/RegisterListResource.ts +5 -5
- package/src/models/RegisterResource.ts +2 -3
- package/src/models/UserResource.ts +9 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @digital8/security-registers-backend-ts-sdk@0.0.
|
|
1
|
+
## @digital8/security-registers-backend-ts-sdk@0.0.495
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @digital8/security-registers-backend-ts-sdk@0.0.
|
|
39
|
+
npm install @digital8/security-registers-backend-ts-sdk@0.0.495 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -30,6 +30,8 @@ function instanceOfAssetResource(value) {
|
|
|
30
30
|
return false;
|
|
31
31
|
if (!('mimeType' in value) || value['mimeType'] === undefined)
|
|
32
32
|
return false;
|
|
33
|
+
if (!('altText' in value) || value['altText'] === undefined)
|
|
34
|
+
return false;
|
|
33
35
|
if (!('index' in value) || value['index'] === undefined)
|
|
34
36
|
return false;
|
|
35
37
|
if (!('fileId' in value) || value['fileId'] === undefined)
|
|
@@ -50,7 +52,7 @@ function AssetResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
52
|
'filePath': json['filePath'],
|
|
51
53
|
'fileName': json['fileName'],
|
|
52
54
|
'mimeType': json['mimeType'],
|
|
53
|
-
'altText': json['altText']
|
|
55
|
+
'altText': json['altText'],
|
|
54
56
|
'index': json['index'],
|
|
55
57
|
'fileId': json['fileId'],
|
|
56
58
|
'isExternal': json['isExternal'],
|
|
@@ -27,6 +27,12 @@ export interface IncidentFieldSchemaResource {
|
|
|
27
27
|
* @memberof IncidentFieldSchemaResource
|
|
28
28
|
*/
|
|
29
29
|
state: IncidentFieldSchemaResourceStateEnum;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof IncidentFieldSchemaResource
|
|
34
|
+
*/
|
|
35
|
+
type: IncidentFieldSchemaResourceTypeEnum;
|
|
30
36
|
/**
|
|
31
37
|
*
|
|
32
38
|
* @type {object}
|
|
@@ -55,6 +61,14 @@ export declare const IncidentFieldSchemaResourceStateEnum: {
|
|
|
55
61
|
readonly Vic: "VIC";
|
|
56
62
|
};
|
|
57
63
|
export type IncidentFieldSchemaResourceStateEnum = typeof IncidentFieldSchemaResourceStateEnum[keyof typeof IncidentFieldSchemaResourceStateEnum];
|
|
64
|
+
/**
|
|
65
|
+
* @export
|
|
66
|
+
*/
|
|
67
|
+
export declare const IncidentFieldSchemaResourceTypeEnum: {
|
|
68
|
+
readonly Liquor: "Liquor";
|
|
69
|
+
readonly Gaming: "Gaming";
|
|
70
|
+
};
|
|
71
|
+
export type IncidentFieldSchemaResourceTypeEnum = typeof IncidentFieldSchemaResourceTypeEnum[keyof typeof IncidentFieldSchemaResourceTypeEnum];
|
|
58
72
|
/**
|
|
59
73
|
* Check if a given object implements the IncidentFieldSchemaResource interface.
|
|
60
74
|
*/
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.IncidentFieldSchemaResourceStateEnum = void 0;
|
|
16
|
+
exports.IncidentFieldSchemaResourceTypeEnum = exports.IncidentFieldSchemaResourceStateEnum = void 0;
|
|
17
17
|
exports.instanceOfIncidentFieldSchemaResource = instanceOfIncidentFieldSchemaResource;
|
|
18
18
|
exports.IncidentFieldSchemaResourceFromJSON = IncidentFieldSchemaResourceFromJSON;
|
|
19
19
|
exports.IncidentFieldSchemaResourceFromJSONTyped = IncidentFieldSchemaResourceFromJSONTyped;
|
|
@@ -27,12 +27,21 @@ exports.IncidentFieldSchemaResourceStateEnum = {
|
|
|
27
27
|
Nsw: 'NSW',
|
|
28
28
|
Vic: 'VIC'
|
|
29
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
exports.IncidentFieldSchemaResourceTypeEnum = {
|
|
34
|
+
Liquor: 'Liquor',
|
|
35
|
+
Gaming: 'Gaming'
|
|
36
|
+
};
|
|
30
37
|
/**
|
|
31
38
|
* Check if a given object implements the IncidentFieldSchemaResource interface.
|
|
32
39
|
*/
|
|
33
40
|
function instanceOfIncidentFieldSchemaResource(value) {
|
|
34
41
|
if (!('state' in value) || value['state'] === undefined)
|
|
35
42
|
return false;
|
|
43
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
44
|
+
return false;
|
|
36
45
|
if (!('jsonSchema' in value) || value['jsonSchema'] === undefined)
|
|
37
46
|
return false;
|
|
38
47
|
return true;
|
|
@@ -47,6 +56,7 @@ function IncidentFieldSchemaResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
47
56
|
return {
|
|
48
57
|
'id': json['id'] == null ? undefined : json['id'],
|
|
49
58
|
'state': json['state'],
|
|
59
|
+
'type': json['type'],
|
|
50
60
|
'jsonSchema': json['jsonSchema'],
|
|
51
61
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
52
62
|
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
@@ -64,6 +74,7 @@ function IncidentFieldSchemaResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
64
74
|
return {
|
|
65
75
|
'id': value['id'],
|
|
66
76
|
'state': value['state'],
|
|
77
|
+
'type': value['type'],
|
|
67
78
|
'jsonSchema': value['jsonSchema'],
|
|
68
79
|
'createdAt': value['createdAt'] === null ? null : ((_a = value['createdAt']) === null || _a === void 0 ? void 0 : _a.toISOString()),
|
|
69
80
|
'updatedAt': value['updatedAt'] === null ? null : ((_b = value['updatedAt']) === null || _b === void 0 ? void 0 : _b.toISOString()),
|
|
@@ -21,6 +21,12 @@ export interface IncidentFieldSchemasShowRequest {
|
|
|
21
21
|
* @memberof IncidentFieldSchemasShowRequest
|
|
22
22
|
*/
|
|
23
23
|
state: IncidentFieldSchemasShowRequestStateEnum;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof IncidentFieldSchemasShowRequest
|
|
28
|
+
*/
|
|
29
|
+
type: IncidentFieldSchemasShowRequestTypeEnum;
|
|
24
30
|
}
|
|
25
31
|
/**
|
|
26
32
|
* @export
|
|
@@ -31,6 +37,14 @@ export declare const IncidentFieldSchemasShowRequestStateEnum: {
|
|
|
31
37
|
readonly Vic: "VIC";
|
|
32
38
|
};
|
|
33
39
|
export type IncidentFieldSchemasShowRequestStateEnum = typeof IncidentFieldSchemasShowRequestStateEnum[keyof typeof IncidentFieldSchemasShowRequestStateEnum];
|
|
40
|
+
/**
|
|
41
|
+
* @export
|
|
42
|
+
*/
|
|
43
|
+
export declare const IncidentFieldSchemasShowRequestTypeEnum: {
|
|
44
|
+
readonly Liquor: "Liquor";
|
|
45
|
+
readonly Gaming: "Gaming";
|
|
46
|
+
};
|
|
47
|
+
export type IncidentFieldSchemasShowRequestTypeEnum = typeof IncidentFieldSchemasShowRequestTypeEnum[keyof typeof IncidentFieldSchemasShowRequestTypeEnum];
|
|
34
48
|
/**
|
|
35
49
|
* Check if a given object implements the IncidentFieldSchemasShowRequest interface.
|
|
36
50
|
*/
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.IncidentFieldSchemasShowRequestStateEnum = void 0;
|
|
16
|
+
exports.IncidentFieldSchemasShowRequestTypeEnum = exports.IncidentFieldSchemasShowRequestStateEnum = void 0;
|
|
17
17
|
exports.instanceOfIncidentFieldSchemasShowRequest = instanceOfIncidentFieldSchemasShowRequest;
|
|
18
18
|
exports.IncidentFieldSchemasShowRequestFromJSON = IncidentFieldSchemasShowRequestFromJSON;
|
|
19
19
|
exports.IncidentFieldSchemasShowRequestFromJSONTyped = IncidentFieldSchemasShowRequestFromJSONTyped;
|
|
@@ -27,12 +27,21 @@ exports.IncidentFieldSchemasShowRequestStateEnum = {
|
|
|
27
27
|
Nsw: 'NSW',
|
|
28
28
|
Vic: 'VIC'
|
|
29
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
exports.IncidentFieldSchemasShowRequestTypeEnum = {
|
|
34
|
+
Liquor: 'Liquor',
|
|
35
|
+
Gaming: 'Gaming'
|
|
36
|
+
};
|
|
30
37
|
/**
|
|
31
38
|
* Check if a given object implements the IncidentFieldSchemasShowRequest interface.
|
|
32
39
|
*/
|
|
33
40
|
function instanceOfIncidentFieldSchemasShowRequest(value) {
|
|
34
41
|
if (!('state' in value) || value['state'] === undefined)
|
|
35
42
|
return false;
|
|
43
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
44
|
+
return false;
|
|
36
45
|
return true;
|
|
37
46
|
}
|
|
38
47
|
function IncidentFieldSchemasShowRequestFromJSON(json) {
|
|
@@ -44,6 +53,7 @@ function IncidentFieldSchemasShowRequestFromJSONTyped(json, ignoreDiscriminator)
|
|
|
44
53
|
}
|
|
45
54
|
return {
|
|
46
55
|
'state': json['state'],
|
|
56
|
+
'type': json['type'],
|
|
47
57
|
};
|
|
48
58
|
}
|
|
49
59
|
function IncidentFieldSchemasShowRequestToJSON(json) {
|
|
@@ -56,5 +66,6 @@ function IncidentFieldSchemasShowRequestToJSONTyped(value, ignoreDiscriminator)
|
|
|
56
66
|
}
|
|
57
67
|
return {
|
|
58
68
|
'state': value['state'],
|
|
69
|
+
'type': value['type'],
|
|
59
70
|
};
|
|
60
71
|
}
|
|
@@ -26,6 +26,8 @@ function instanceOfIncidentImageResource(value) {
|
|
|
26
26
|
return false;
|
|
27
27
|
if (!('mimeType' in value) || value['mimeType'] === undefined)
|
|
28
28
|
return false;
|
|
29
|
+
if (!('altText' in value) || value['altText'] === undefined)
|
|
30
|
+
return false;
|
|
29
31
|
if (!('assetId' in value) || value['assetId'] === undefined)
|
|
30
32
|
return false;
|
|
31
33
|
if (!('url' in value) || value['url'] === undefined)
|
|
@@ -42,7 +44,7 @@ function IncidentImageResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
44
|
return {
|
|
43
45
|
'fileId': json['file_id'],
|
|
44
46
|
'mimeType': json['mime_type'],
|
|
45
|
-
'altText': json['alt_text']
|
|
47
|
+
'altText': json['alt_text'],
|
|
46
48
|
'assetId': json['asset_id'],
|
|
47
49
|
'url': json['url'],
|
|
48
50
|
};
|
|
@@ -51,6 +51,12 @@ export interface IncidentsExportCsvBulkRequest {
|
|
|
51
51
|
* @memberof IncidentsExportCsvBulkRequest
|
|
52
52
|
*/
|
|
53
53
|
submittedByGuard?: Array<string>;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Array<string>}
|
|
57
|
+
* @memberof IncidentsExportCsvBulkRequest
|
|
58
|
+
*/
|
|
59
|
+
schemaType?: Array<string>;
|
|
54
60
|
/**
|
|
55
61
|
*
|
|
56
62
|
* @type {Array<string>}
|
|
@@ -44,6 +44,7 @@ function IncidentsExportCsvBulkRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
44
|
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
|
45
45
|
'hasApprovedAt': json['has_approved_at'] == null ? undefined : json['has_approved_at'],
|
|
46
46
|
'submittedByGuard': json['submitted_by_guard'] == null ? undefined : json['submitted_by_guard'],
|
|
47
|
+
'schemaType': json['schema_type'] == null ? undefined : json['schema_type'],
|
|
47
48
|
'additionalEmails': json['additional_emails'] == null ? undefined : json['additional_emails'],
|
|
48
49
|
'venueId': json['venue_id'],
|
|
49
50
|
'search': json['search'] == null ? undefined : json['search'],
|
|
@@ -66,6 +67,7 @@ function IncidentsExportCsvBulkRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
66
67
|
'user_id': value['userId'],
|
|
67
68
|
'has_approved_at': value['hasApprovedAt'],
|
|
68
69
|
'submitted_by_guard': value['submittedByGuard'],
|
|
70
|
+
'schema_type': value['schemaType'],
|
|
69
71
|
'additional_emails': value['additionalEmails'],
|
|
70
72
|
'venue_id': value['venueId'],
|
|
71
73
|
'search': value['search'],
|
|
@@ -51,6 +51,12 @@ export interface IncidentsExportPdfBulkRequest {
|
|
|
51
51
|
* @memberof IncidentsExportPdfBulkRequest
|
|
52
52
|
*/
|
|
53
53
|
submittedByGuard?: Array<string>;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Array<string>}
|
|
57
|
+
* @memberof IncidentsExportPdfBulkRequest
|
|
58
|
+
*/
|
|
59
|
+
schemaType?: Array<string>;
|
|
54
60
|
/**
|
|
55
61
|
*
|
|
56
62
|
* @type {Array<string>}
|
|
@@ -44,6 +44,7 @@ function IncidentsExportPdfBulkRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
44
44
|
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
|
45
45
|
'hasApprovedAt': json['has_approved_at'] == null ? undefined : json['has_approved_at'],
|
|
46
46
|
'submittedByGuard': json['submitted_by_guard'] == null ? undefined : json['submitted_by_guard'],
|
|
47
|
+
'schemaType': json['schema_type'] == null ? undefined : json['schema_type'],
|
|
47
48
|
'additionalEmails': json['additional_emails'] == null ? undefined : json['additional_emails'],
|
|
48
49
|
'venueId': json['venue_id'],
|
|
49
50
|
'search': json['search'] == null ? undefined : json['search'],
|
|
@@ -66,6 +67,7 @@ function IncidentsExportPdfBulkRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
66
67
|
'user_id': value['userId'],
|
|
67
68
|
'has_approved_at': value['hasApprovedAt'],
|
|
68
69
|
'submitted_by_guard': value['submittedByGuard'],
|
|
70
|
+
'schema_type': value['schemaType'],
|
|
69
71
|
'additional_emails': value['additionalEmails'],
|
|
70
72
|
'venue_id': value['venueId'],
|
|
71
73
|
'search': value['search'],
|
|
@@ -87,6 +87,12 @@ export interface IncidentsListRequest {
|
|
|
87
87
|
* @memberof IncidentsListRequest
|
|
88
88
|
*/
|
|
89
89
|
submittedByGuard?: Array<string>;
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @type {Array<string>}
|
|
93
|
+
* @memberof IncidentsListRequest
|
|
94
|
+
*/
|
|
95
|
+
schemaType?: Array<string>;
|
|
90
96
|
/**
|
|
91
97
|
*
|
|
92
98
|
* @type {Date}
|
|
@@ -60,6 +60,7 @@ function IncidentsListRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
60
60
|
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
|
61
61
|
'hasApprovedAt': json['has_approved_at'] == null ? undefined : json['has_approved_at'],
|
|
62
62
|
'submittedByGuard': json['submitted_by_guard'] == null ? undefined : json['submitted_by_guard'],
|
|
63
|
+
'schemaType': json['schema_type'] == null ? undefined : json['schema_type'],
|
|
63
64
|
'beforeApprovedAt': json['before_approved_at'] == null ? undefined : (new Date(json['before_approved_at'])),
|
|
64
65
|
'afterApprovedAt': json['after_approved_at'] == null ? undefined : (new Date(json['after_approved_at'])),
|
|
65
66
|
'beforeCreatedAt': json['before_created_at'] == null ? undefined : (new Date(json['before_created_at'])),
|
|
@@ -90,6 +91,7 @@ function IncidentsListRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
90
91
|
'user_id': value['userId'],
|
|
91
92
|
'has_approved_at': value['hasApprovedAt'],
|
|
92
93
|
'submitted_by_guard': value['submittedByGuard'],
|
|
94
|
+
'schema_type': value['schemaType'],
|
|
93
95
|
'before_approved_at': value['beforeApprovedAt'] == null ? undefined : ((value['beforeApprovedAt']).toISOString()),
|
|
94
96
|
'after_approved_at': value['afterApprovedAt'] == null ? undefined : ((value['afterApprovedAt']).toISOString()),
|
|
95
97
|
'before_created_at': value['beforeCreatedAt'] == null ? undefined : ((value['beforeCreatedAt']).toISOString()),
|
|
@@ -21,6 +21,12 @@ export interface IncidentsStoreRequest {
|
|
|
21
21
|
* @memberof IncidentsStoreRequest
|
|
22
22
|
*/
|
|
23
23
|
venueId: number;
|
|
24
|
+
/**
|
|
25
|
+
* The schema type the incident is being recorded against. Must match an existing schema for the venue's state.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof IncidentsStoreRequest
|
|
28
|
+
*/
|
|
29
|
+
type: IncidentsStoreRequestTypeEnum;
|
|
24
30
|
/**
|
|
25
31
|
* Dynamic fields keyed by section key. Each section is an object of field_key => value. Object fields with repeatable=true are submitted as `{ items: [ { ...subfields } ] }` (no id on create — server assigns one). Shape is driven by the venue state's IncidentFieldSchema.
|
|
26
32
|
* @type {object}
|
|
@@ -28,6 +34,14 @@ export interface IncidentsStoreRequest {
|
|
|
28
34
|
*/
|
|
29
35
|
fields: object;
|
|
30
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @export
|
|
39
|
+
*/
|
|
40
|
+
export declare const IncidentsStoreRequestTypeEnum: {
|
|
41
|
+
readonly Liquor: "Liquor";
|
|
42
|
+
readonly Gaming: "Gaming";
|
|
43
|
+
};
|
|
44
|
+
export type IncidentsStoreRequestTypeEnum = typeof IncidentsStoreRequestTypeEnum[keyof typeof IncidentsStoreRequestTypeEnum];
|
|
31
45
|
/**
|
|
32
46
|
* Check if a given object implements the IncidentsStoreRequest interface.
|
|
33
47
|
*/
|
|
@@ -13,17 +13,27 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.IncidentsStoreRequestTypeEnum = void 0;
|
|
16
17
|
exports.instanceOfIncidentsStoreRequest = instanceOfIncidentsStoreRequest;
|
|
17
18
|
exports.IncidentsStoreRequestFromJSON = IncidentsStoreRequestFromJSON;
|
|
18
19
|
exports.IncidentsStoreRequestFromJSONTyped = IncidentsStoreRequestFromJSONTyped;
|
|
19
20
|
exports.IncidentsStoreRequestToJSON = IncidentsStoreRequestToJSON;
|
|
20
21
|
exports.IncidentsStoreRequestToJSONTyped = IncidentsStoreRequestToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
* @export
|
|
24
|
+
*/
|
|
25
|
+
exports.IncidentsStoreRequestTypeEnum = {
|
|
26
|
+
Liquor: 'Liquor',
|
|
27
|
+
Gaming: 'Gaming'
|
|
28
|
+
};
|
|
21
29
|
/**
|
|
22
30
|
* Check if a given object implements the IncidentsStoreRequest interface.
|
|
23
31
|
*/
|
|
24
32
|
function instanceOfIncidentsStoreRequest(value) {
|
|
25
33
|
if (!('venueId' in value) || value['venueId'] === undefined)
|
|
26
34
|
return false;
|
|
35
|
+
if (!('type' in value) || value['type'] === undefined)
|
|
36
|
+
return false;
|
|
27
37
|
if (!('fields' in value) || value['fields'] === undefined)
|
|
28
38
|
return false;
|
|
29
39
|
return true;
|
|
@@ -37,6 +47,7 @@ function IncidentsStoreRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
47
|
}
|
|
38
48
|
return {
|
|
39
49
|
'venueId': json['venue_id'],
|
|
50
|
+
'type': json['type'],
|
|
40
51
|
'fields': json['fields'],
|
|
41
52
|
};
|
|
42
53
|
}
|
|
@@ -50,6 +61,7 @@ function IncidentsStoreRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
50
61
|
}
|
|
51
62
|
return {
|
|
52
63
|
'venue_id': value['venueId'],
|
|
64
|
+
'type': value['type'],
|
|
53
65
|
'fields': value['fields'],
|
|
54
66
|
};
|
|
55
67
|
}
|
|
@@ -64,7 +64,7 @@ export interface RegisterListResource {
|
|
|
64
64
|
* @type {string}
|
|
65
65
|
* @memberof RegisterListResource
|
|
66
66
|
*/
|
|
67
|
-
badgeNumber
|
|
67
|
+
badgeNumber?: string | null;
|
|
68
68
|
/**
|
|
69
69
|
*
|
|
70
70
|
* @type {Date}
|
|
@@ -154,7 +154,7 @@ export interface RegisterListResource {
|
|
|
154
154
|
* @type {number}
|
|
155
155
|
* @memberof RegisterListResource
|
|
156
156
|
*/
|
|
157
|
-
signOffLong
|
|
157
|
+
signOffLong: number;
|
|
158
158
|
/**
|
|
159
159
|
*
|
|
160
160
|
* @type {boolean}
|
|
@@ -43,8 +43,6 @@ function instanceOfRegisterListResource(value) {
|
|
|
43
43
|
return false;
|
|
44
44
|
if (!('signOffStatus' in value) || value['signOffStatus'] === undefined)
|
|
45
45
|
return false;
|
|
46
|
-
if (!('badgeNumber' in value) || value['badgeNumber'] === undefined)
|
|
47
|
-
return false;
|
|
48
46
|
if (!('licenceNumber' in value) || value['licenceNumber'] === undefined)
|
|
49
47
|
return false;
|
|
50
48
|
if (!('licenceFirstName' in value) || value['licenceFirstName'] === undefined)
|
|
@@ -69,6 +67,8 @@ function instanceOfRegisterListResource(value) {
|
|
|
69
67
|
return false;
|
|
70
68
|
if (!('signOnLong' in value) || value['signOnLong'] === undefined)
|
|
71
69
|
return false;
|
|
70
|
+
if (!('signOffLong' in value) || value['signOffLong'] === undefined)
|
|
71
|
+
return false;
|
|
72
72
|
if (!('hasIncidents' in value) || value['hasIncidents'] === undefined)
|
|
73
73
|
return false;
|
|
74
74
|
return true;
|
|
@@ -88,7 +88,7 @@ function RegisterListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
88
88
|
'finishDateTime': json['finishDateTime'] == null ? undefined : (new Date(json['finishDateTime'])),
|
|
89
89
|
'shiftLength': json['shiftLength'],
|
|
90
90
|
'signOffStatus': json['signOffStatus'],
|
|
91
|
-
'badgeNumber': json['badgeNumber'],
|
|
91
|
+
'badgeNumber': json['badgeNumber'] == null ? undefined : json['badgeNumber'],
|
|
92
92
|
'rampReadAt': json['rampReadAt'] == null ? undefined : (new Date(json['rampReadAt'])),
|
|
93
93
|
'licenceNumber': json['licenceNumber'],
|
|
94
94
|
'licenceFirstName': json['licenceFirstName'],
|
|
@@ -103,7 +103,7 @@ function RegisterListResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
103
103
|
'signOnLat': json['signOnLat'],
|
|
104
104
|
'signOnLong': json['signOnLong'],
|
|
105
105
|
'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
|
|
106
|
-
'signOffLong': json['signOffLong']
|
|
106
|
+
'signOffLong': json['signOffLong'],
|
|
107
107
|
'hasIncidents': json['hasIncidents'],
|
|
108
108
|
};
|
|
109
109
|
}
|
|
@@ -57,8 +57,6 @@ function instanceOfRegisterResource(value) {
|
|
|
57
57
|
return false;
|
|
58
58
|
if (!('signOnLong' in value) || value['signOnLong'] === undefined)
|
|
59
59
|
return false;
|
|
60
|
-
if (!('signOffLong' in value) || value['signOffLong'] === undefined)
|
|
61
|
-
return false;
|
|
62
60
|
if (!('licenceNumber' in value) || value['licenceNumber'] === undefined)
|
|
63
61
|
return false;
|
|
64
62
|
if (!('licenceExpiry' in value) || value['licenceExpiry'] === undefined)
|
|
@@ -92,7 +90,7 @@ function RegisterResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
92
90
|
'signOnLat': json['signOnLat'],
|
|
93
91
|
'signOnLong': json['signOnLong'],
|
|
94
92
|
'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
|
|
95
|
-
'signOffLong': json['signOffLong'],
|
|
93
|
+
'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
|
|
96
94
|
'licenceNumber': json['licenceNumber'],
|
|
97
95
|
'licenceExpiry': json['licenceExpiry'],
|
|
98
96
|
'licenceFirstName': json['licenceFirstName'],
|
|
@@ -67,6 +67,12 @@ export interface UserResource {
|
|
|
67
67
|
* @memberof UserResource
|
|
68
68
|
*/
|
|
69
69
|
hasVenues: boolean;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {Array<string>}
|
|
73
|
+
* @memberof UserResource
|
|
74
|
+
*/
|
|
75
|
+
availableSchemaTypes: Array<string>;
|
|
70
76
|
/**
|
|
71
77
|
*
|
|
72
78
|
* @type {Array<AssetLiteResource>}
|
|
@@ -42,6 +42,8 @@ function instanceOfUserResource(value) {
|
|
|
42
42
|
return false;
|
|
43
43
|
if (!('hasVenues' in value) || value['hasVenues'] === undefined)
|
|
44
44
|
return false;
|
|
45
|
+
if (!('availableSchemaTypes' in value) || value['availableSchemaTypes'] === undefined)
|
|
46
|
+
return false;
|
|
45
47
|
if (!('assets' in value) || value['assets'] === undefined)
|
|
46
48
|
return false;
|
|
47
49
|
if (!('signatureAsset' in value) || value['signatureAsset'] === undefined)
|
|
@@ -70,6 +72,7 @@ function UserResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
70
72
|
'mobile': json['mobile'],
|
|
71
73
|
'roles': json['roles'],
|
|
72
74
|
'hasVenues': json['hasVenues'],
|
|
75
|
+
'availableSchemaTypes': json['availableSchemaTypes'],
|
|
73
76
|
'assets': (json['assets'] == null ? null : json['assets'].map(AssetLiteResource_1.AssetLiteResourceFromJSON)),
|
|
74
77
|
'signatureAsset': (0, AssetResource_1.AssetResourceFromJSON)(json['signatureAsset']),
|
|
75
78
|
'profileImage': (0, AssetLiteResource_1.AssetLiteResourceFromJSON)(json['profileImage']),
|
|
@@ -97,6 +100,7 @@ function UserResourceToJSONTyped(value, ignoreDiscriminator) {
|
|
|
97
100
|
'mobile': value['mobile'],
|
|
98
101
|
'roles': value['roles'],
|
|
99
102
|
'hasVenues': value['hasVenues'],
|
|
103
|
+
'availableSchemaTypes': value['availableSchemaTypes'],
|
|
100
104
|
'assets': (value['assets'] == null ? null : value['assets'].map(AssetLiteResource_1.AssetLiteResourceToJSON)),
|
|
101
105
|
'signatureAsset': (0, AssetResource_1.AssetResourceToJSON)(value['signatureAsset']),
|
|
102
106
|
'profileImage': (0, AssetLiteResource_1.AssetLiteResourceToJSON)(value['profileImage']),
|
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ export interface AssetResource {
|
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof AssetResource
|
|
50
50
|
*/
|
|
51
|
-
altText
|
|
51
|
+
altText: string;
|
|
52
52
|
/**
|
|
53
53
|
*
|
|
54
54
|
* @type {number}
|
|
@@ -83,6 +83,7 @@ export function instanceOfAssetResource(value: object): value is AssetResource {
|
|
|
83
83
|
if (!('filePath' in value) || value['filePath'] === undefined) return false;
|
|
84
84
|
if (!('fileName' in value) || value['fileName'] === undefined) return false;
|
|
85
85
|
if (!('mimeType' in value) || value['mimeType'] === undefined) return false;
|
|
86
|
+
if (!('altText' in value) || value['altText'] === undefined) return false;
|
|
86
87
|
if (!('index' in value) || value['index'] === undefined) return false;
|
|
87
88
|
if (!('fileId' in value) || value['fileId'] === undefined) return false;
|
|
88
89
|
if (!('isExternal' in value) || value['isExternal'] === undefined) return false;
|
|
@@ -103,7 +104,7 @@ export function AssetResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
|
|
|
103
104
|
'filePath': json['filePath'],
|
|
104
105
|
'fileName': json['fileName'],
|
|
105
106
|
'mimeType': json['mimeType'],
|
|
106
|
-
'altText': json['altText']
|
|
107
|
+
'altText': json['altText'],
|
|
107
108
|
'index': json['index'],
|
|
108
109
|
'fileId': json['fileId'],
|
|
109
110
|
'isExternal': json['isExternal'],
|
|
@@ -31,6 +31,12 @@ export interface IncidentFieldSchemaResource {
|
|
|
31
31
|
* @memberof IncidentFieldSchemaResource
|
|
32
32
|
*/
|
|
33
33
|
state: IncidentFieldSchemaResourceStateEnum;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof IncidentFieldSchemaResource
|
|
38
|
+
*/
|
|
39
|
+
type: IncidentFieldSchemaResourceTypeEnum;
|
|
34
40
|
/**
|
|
35
41
|
*
|
|
36
42
|
* @type {object}
|
|
@@ -62,12 +68,22 @@ export const IncidentFieldSchemaResourceStateEnum = {
|
|
|
62
68
|
} as const;
|
|
63
69
|
export type IncidentFieldSchemaResourceStateEnum = typeof IncidentFieldSchemaResourceStateEnum[keyof typeof IncidentFieldSchemaResourceStateEnum];
|
|
64
70
|
|
|
71
|
+
/**
|
|
72
|
+
* @export
|
|
73
|
+
*/
|
|
74
|
+
export const IncidentFieldSchemaResourceTypeEnum = {
|
|
75
|
+
Liquor: 'Liquor',
|
|
76
|
+
Gaming: 'Gaming'
|
|
77
|
+
} as const;
|
|
78
|
+
export type IncidentFieldSchemaResourceTypeEnum = typeof IncidentFieldSchemaResourceTypeEnum[keyof typeof IncidentFieldSchemaResourceTypeEnum];
|
|
79
|
+
|
|
65
80
|
|
|
66
81
|
/**
|
|
67
82
|
* Check if a given object implements the IncidentFieldSchemaResource interface.
|
|
68
83
|
*/
|
|
69
84
|
export function instanceOfIncidentFieldSchemaResource(value: object): value is IncidentFieldSchemaResource {
|
|
70
85
|
if (!('state' in value) || value['state'] === undefined) return false;
|
|
86
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
71
87
|
if (!('jsonSchema' in value) || value['jsonSchema'] === undefined) return false;
|
|
72
88
|
return true;
|
|
73
89
|
}
|
|
@@ -84,6 +100,7 @@ export function IncidentFieldSchemaResourceFromJSONTyped(json: any, ignoreDiscri
|
|
|
84
100
|
|
|
85
101
|
'id': json['id'] == null ? undefined : json['id'],
|
|
86
102
|
'state': json['state'],
|
|
103
|
+
'type': json['type'],
|
|
87
104
|
'jsonSchema': json['jsonSchema'],
|
|
88
105
|
'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
|
|
89
106
|
'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
|
|
@@ -103,6 +120,7 @@ export function IncidentFieldSchemaResourceToJSONTyped(value?: IncidentFieldSche
|
|
|
103
120
|
|
|
104
121
|
'id': value['id'],
|
|
105
122
|
'state': value['state'],
|
|
123
|
+
'type': value['type'],
|
|
106
124
|
'jsonSchema': value['jsonSchema'],
|
|
107
125
|
'createdAt': value['createdAt'] === null ? null : ((value['createdAt'] as any)?.toISOString()),
|
|
108
126
|
'updatedAt': value['updatedAt'] === null ? null : ((value['updatedAt'] as any)?.toISOString()),
|
|
@@ -25,6 +25,12 @@ export interface IncidentFieldSchemasShowRequest {
|
|
|
25
25
|
* @memberof IncidentFieldSchemasShowRequest
|
|
26
26
|
*/
|
|
27
27
|
state: IncidentFieldSchemasShowRequestStateEnum;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof IncidentFieldSchemasShowRequest
|
|
32
|
+
*/
|
|
33
|
+
type: IncidentFieldSchemasShowRequestTypeEnum;
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
|
|
@@ -38,12 +44,22 @@ export const IncidentFieldSchemasShowRequestStateEnum = {
|
|
|
38
44
|
} as const;
|
|
39
45
|
export type IncidentFieldSchemasShowRequestStateEnum = typeof IncidentFieldSchemasShowRequestStateEnum[keyof typeof IncidentFieldSchemasShowRequestStateEnum];
|
|
40
46
|
|
|
47
|
+
/**
|
|
48
|
+
* @export
|
|
49
|
+
*/
|
|
50
|
+
export const IncidentFieldSchemasShowRequestTypeEnum = {
|
|
51
|
+
Liquor: 'Liquor',
|
|
52
|
+
Gaming: 'Gaming'
|
|
53
|
+
} as const;
|
|
54
|
+
export type IncidentFieldSchemasShowRequestTypeEnum = typeof IncidentFieldSchemasShowRequestTypeEnum[keyof typeof IncidentFieldSchemasShowRequestTypeEnum];
|
|
55
|
+
|
|
41
56
|
|
|
42
57
|
/**
|
|
43
58
|
* Check if a given object implements the IncidentFieldSchemasShowRequest interface.
|
|
44
59
|
*/
|
|
45
60
|
export function instanceOfIncidentFieldSchemasShowRequest(value: object): value is IncidentFieldSchemasShowRequest {
|
|
46
61
|
if (!('state' in value) || value['state'] === undefined) return false;
|
|
62
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
47
63
|
return true;
|
|
48
64
|
}
|
|
49
65
|
|
|
@@ -58,6 +74,7 @@ export function IncidentFieldSchemasShowRequestFromJSONTyped(json: any, ignoreDi
|
|
|
58
74
|
return {
|
|
59
75
|
|
|
60
76
|
'state': json['state'],
|
|
77
|
+
'type': json['type'],
|
|
61
78
|
};
|
|
62
79
|
}
|
|
63
80
|
|
|
@@ -73,6 +90,7 @@ export function IncidentFieldSchemasShowRequestToJSONTyped(value?: IncidentField
|
|
|
73
90
|
return {
|
|
74
91
|
|
|
75
92
|
'state': value['state'],
|
|
93
|
+
'type': value['type'],
|
|
76
94
|
};
|
|
77
95
|
}
|
|
78
96
|
|
|
@@ -36,7 +36,7 @@ export interface IncidentImageResource {
|
|
|
36
36
|
* @type {string}
|
|
37
37
|
* @memberof IncidentImageResource
|
|
38
38
|
*/
|
|
39
|
-
altText
|
|
39
|
+
altText: string;
|
|
40
40
|
/**
|
|
41
41
|
*
|
|
42
42
|
* @type {number}
|
|
@@ -57,6 +57,7 @@ export interface IncidentImageResource {
|
|
|
57
57
|
export function instanceOfIncidentImageResource(value: object): value is IncidentImageResource {
|
|
58
58
|
if (!('fileId' in value) || value['fileId'] === undefined) return false;
|
|
59
59
|
if (!('mimeType' in value) || value['mimeType'] === undefined) return false;
|
|
60
|
+
if (!('altText' in value) || value['altText'] === undefined) return false;
|
|
60
61
|
if (!('assetId' in value) || value['assetId'] === undefined) return false;
|
|
61
62
|
if (!('url' in value) || value['url'] === undefined) return false;
|
|
62
63
|
return true;
|
|
@@ -74,7 +75,7 @@ export function IncidentImageResourceFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
74
75
|
|
|
75
76
|
'fileId': json['file_id'],
|
|
76
77
|
'mimeType': json['mime_type'],
|
|
77
|
-
'altText': json['alt_text']
|
|
78
|
+
'altText': json['alt_text'],
|
|
78
79
|
'assetId': json['asset_id'],
|
|
79
80
|
'url': json['url'],
|
|
80
81
|
};
|
|
@@ -55,6 +55,12 @@ export interface IncidentsExportCsvBulkRequest {
|
|
|
55
55
|
* @memberof IncidentsExportCsvBulkRequest
|
|
56
56
|
*/
|
|
57
57
|
submittedByGuard?: Array<string>;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<string>}
|
|
61
|
+
* @memberof IncidentsExportCsvBulkRequest
|
|
62
|
+
*/
|
|
63
|
+
schemaType?: Array<string>;
|
|
58
64
|
/**
|
|
59
65
|
*
|
|
60
66
|
* @type {Array<string>}
|
|
@@ -113,6 +119,7 @@ export function IncidentsExportCsvBulkRequestFromJSONTyped(json: any, ignoreDisc
|
|
|
113
119
|
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
|
114
120
|
'hasApprovedAt': json['has_approved_at'] == null ? undefined : json['has_approved_at'],
|
|
115
121
|
'submittedByGuard': json['submitted_by_guard'] == null ? undefined : json['submitted_by_guard'],
|
|
122
|
+
'schemaType': json['schema_type'] == null ? undefined : json['schema_type'],
|
|
116
123
|
'additionalEmails': json['additional_emails'] == null ? undefined : json['additional_emails'],
|
|
117
124
|
'venueId': json['venue_id'],
|
|
118
125
|
'search': json['search'] == null ? undefined : json['search'],
|
|
@@ -138,6 +145,7 @@ export function IncidentsExportCsvBulkRequestToJSONTyped(value?: IncidentsExport
|
|
|
138
145
|
'user_id': value['userId'],
|
|
139
146
|
'has_approved_at': value['hasApprovedAt'],
|
|
140
147
|
'submitted_by_guard': value['submittedByGuard'],
|
|
148
|
+
'schema_type': value['schemaType'],
|
|
141
149
|
'additional_emails': value['additionalEmails'],
|
|
142
150
|
'venue_id': value['venueId'],
|
|
143
151
|
'search': value['search'],
|
|
@@ -55,6 +55,12 @@ export interface IncidentsExportPdfBulkRequest {
|
|
|
55
55
|
* @memberof IncidentsExportPdfBulkRequest
|
|
56
56
|
*/
|
|
57
57
|
submittedByGuard?: Array<string>;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<string>}
|
|
61
|
+
* @memberof IncidentsExportPdfBulkRequest
|
|
62
|
+
*/
|
|
63
|
+
schemaType?: Array<string>;
|
|
58
64
|
/**
|
|
59
65
|
*
|
|
60
66
|
* @type {Array<string>}
|
|
@@ -113,6 +119,7 @@ export function IncidentsExportPdfBulkRequestFromJSONTyped(json: any, ignoreDisc
|
|
|
113
119
|
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
|
114
120
|
'hasApprovedAt': json['has_approved_at'] == null ? undefined : json['has_approved_at'],
|
|
115
121
|
'submittedByGuard': json['submitted_by_guard'] == null ? undefined : json['submitted_by_guard'],
|
|
122
|
+
'schemaType': json['schema_type'] == null ? undefined : json['schema_type'],
|
|
116
123
|
'additionalEmails': json['additional_emails'] == null ? undefined : json['additional_emails'],
|
|
117
124
|
'venueId': json['venue_id'],
|
|
118
125
|
'search': json['search'] == null ? undefined : json['search'],
|
|
@@ -138,6 +145,7 @@ export function IncidentsExportPdfBulkRequestToJSONTyped(value?: IncidentsExport
|
|
|
138
145
|
'user_id': value['userId'],
|
|
139
146
|
'has_approved_at': value['hasApprovedAt'],
|
|
140
147
|
'submitted_by_guard': value['submittedByGuard'],
|
|
148
|
+
'schema_type': value['schemaType'],
|
|
141
149
|
'additional_emails': value['additionalEmails'],
|
|
142
150
|
'venue_id': value['venueId'],
|
|
143
151
|
'search': value['search'],
|
|
@@ -91,6 +91,12 @@ export interface IncidentsListRequest {
|
|
|
91
91
|
* @memberof IncidentsListRequest
|
|
92
92
|
*/
|
|
93
93
|
submittedByGuard?: Array<string>;
|
|
94
|
+
/**
|
|
95
|
+
*
|
|
96
|
+
* @type {Array<string>}
|
|
97
|
+
* @memberof IncidentsListRequest
|
|
98
|
+
*/
|
|
99
|
+
schemaType?: Array<string>;
|
|
94
100
|
/**
|
|
95
101
|
*
|
|
96
102
|
* @type {Date}
|
|
@@ -185,6 +191,7 @@ export function IncidentsListRequestFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
185
191
|
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
|
186
192
|
'hasApprovedAt': json['has_approved_at'] == null ? undefined : json['has_approved_at'],
|
|
187
193
|
'submittedByGuard': json['submitted_by_guard'] == null ? undefined : json['submitted_by_guard'],
|
|
194
|
+
'schemaType': json['schema_type'] == null ? undefined : json['schema_type'],
|
|
188
195
|
'beforeApprovedAt': json['before_approved_at'] == null ? undefined : (new Date(json['before_approved_at'])),
|
|
189
196
|
'afterApprovedAt': json['after_approved_at'] == null ? undefined : (new Date(json['after_approved_at'])),
|
|
190
197
|
'beforeCreatedAt': json['before_created_at'] == null ? undefined : (new Date(json['before_created_at'])),
|
|
@@ -218,6 +225,7 @@ export function IncidentsListRequestToJSONTyped(value?: IncidentsListRequest | n
|
|
|
218
225
|
'user_id': value['userId'],
|
|
219
226
|
'has_approved_at': value['hasApprovedAt'],
|
|
220
227
|
'submitted_by_guard': value['submittedByGuard'],
|
|
228
|
+
'schema_type': value['schemaType'],
|
|
221
229
|
'before_approved_at': value['beforeApprovedAt'] == null ? undefined : ((value['beforeApprovedAt']).toISOString()),
|
|
222
230
|
'after_approved_at': value['afterApprovedAt'] == null ? undefined : ((value['afterApprovedAt']).toISOString()),
|
|
223
231
|
'before_created_at': value['beforeCreatedAt'] == null ? undefined : ((value['beforeCreatedAt']).toISOString()),
|
|
@@ -25,6 +25,12 @@ export interface IncidentsStoreRequest {
|
|
|
25
25
|
* @memberof IncidentsStoreRequest
|
|
26
26
|
*/
|
|
27
27
|
venueId: number;
|
|
28
|
+
/**
|
|
29
|
+
* The schema type the incident is being recorded against. Must match an existing schema for the venue's state.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof IncidentsStoreRequest
|
|
32
|
+
*/
|
|
33
|
+
type: IncidentsStoreRequestTypeEnum;
|
|
28
34
|
/**
|
|
29
35
|
* Dynamic fields keyed by section key. Each section is an object of field_key => value. Object fields with repeatable=true are submitted as `{ items: [ { ...subfields } ] }` (no id on create — server assigns one). Shape is driven by the venue state's IncidentFieldSchema.
|
|
30
36
|
* @type {object}
|
|
@@ -33,11 +39,23 @@ export interface IncidentsStoreRequest {
|
|
|
33
39
|
fields: object;
|
|
34
40
|
}
|
|
35
41
|
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
export const IncidentsStoreRequestTypeEnum = {
|
|
47
|
+
Liquor: 'Liquor',
|
|
48
|
+
Gaming: 'Gaming'
|
|
49
|
+
} as const;
|
|
50
|
+
export type IncidentsStoreRequestTypeEnum = typeof IncidentsStoreRequestTypeEnum[keyof typeof IncidentsStoreRequestTypeEnum];
|
|
51
|
+
|
|
52
|
+
|
|
36
53
|
/**
|
|
37
54
|
* Check if a given object implements the IncidentsStoreRequest interface.
|
|
38
55
|
*/
|
|
39
56
|
export function instanceOfIncidentsStoreRequest(value: object): value is IncidentsStoreRequest {
|
|
40
57
|
if (!('venueId' in value) || value['venueId'] === undefined) return false;
|
|
58
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
41
59
|
if (!('fields' in value) || value['fields'] === undefined) return false;
|
|
42
60
|
return true;
|
|
43
61
|
}
|
|
@@ -53,6 +71,7 @@ export function IncidentsStoreRequestFromJSONTyped(json: any, ignoreDiscriminato
|
|
|
53
71
|
return {
|
|
54
72
|
|
|
55
73
|
'venueId': json['venue_id'],
|
|
74
|
+
'type': json['type'],
|
|
56
75
|
'fields': json['fields'],
|
|
57
76
|
};
|
|
58
77
|
}
|
|
@@ -69,6 +88,7 @@ export function IncidentsStoreRequestToJSONTyped(value?: IncidentsStoreRequest |
|
|
|
69
88
|
return {
|
|
70
89
|
|
|
71
90
|
'venue_id': value['venueId'],
|
|
91
|
+
'type': value['type'],
|
|
72
92
|
'fields': value['fields'],
|
|
73
93
|
};
|
|
74
94
|
}
|
|
@@ -81,7 +81,7 @@ export interface RegisterListResource {
|
|
|
81
81
|
* @type {string}
|
|
82
82
|
* @memberof RegisterListResource
|
|
83
83
|
*/
|
|
84
|
-
badgeNumber
|
|
84
|
+
badgeNumber?: string | null;
|
|
85
85
|
/**
|
|
86
86
|
*
|
|
87
87
|
* @type {Date}
|
|
@@ -171,7 +171,7 @@ export interface RegisterListResource {
|
|
|
171
171
|
* @type {number}
|
|
172
172
|
* @memberof RegisterListResource
|
|
173
173
|
*/
|
|
174
|
-
signOffLong
|
|
174
|
+
signOffLong: number;
|
|
175
175
|
/**
|
|
176
176
|
*
|
|
177
177
|
* @type {boolean}
|
|
@@ -201,7 +201,6 @@ export function instanceOfRegisterListResource(value: object): value is Register
|
|
|
201
201
|
if (!('startDateTime' in value) || value['startDateTime'] === undefined) return false;
|
|
202
202
|
if (!('shiftLength' in value) || value['shiftLength'] === undefined) return false;
|
|
203
203
|
if (!('signOffStatus' in value) || value['signOffStatus'] === undefined) return false;
|
|
204
|
-
if (!('badgeNumber' in value) || value['badgeNumber'] === undefined) return false;
|
|
205
204
|
if (!('licenceNumber' in value) || value['licenceNumber'] === undefined) return false;
|
|
206
205
|
if (!('licenceFirstName' in value) || value['licenceFirstName'] === undefined) return false;
|
|
207
206
|
if (!('licenceLastName' in value) || value['licenceLastName'] === undefined) return false;
|
|
@@ -214,6 +213,7 @@ export function instanceOfRegisterListResource(value: object): value is Register
|
|
|
214
213
|
if (!('firstAid' in value) || value['firstAid'] === undefined) return false;
|
|
215
214
|
if (!('signOnLat' in value) || value['signOnLat'] === undefined) return false;
|
|
216
215
|
if (!('signOnLong' in value) || value['signOnLong'] === undefined) return false;
|
|
216
|
+
if (!('signOffLong' in value) || value['signOffLong'] === undefined) return false;
|
|
217
217
|
if (!('hasIncidents' in value) || value['hasIncidents'] === undefined) return false;
|
|
218
218
|
return true;
|
|
219
219
|
}
|
|
@@ -235,7 +235,7 @@ export function RegisterListResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
235
235
|
'finishDateTime': json['finishDateTime'] == null ? undefined : (new Date(json['finishDateTime'])),
|
|
236
236
|
'shiftLength': json['shiftLength'],
|
|
237
237
|
'signOffStatus': json['signOffStatus'],
|
|
238
|
-
'badgeNumber': json['badgeNumber'],
|
|
238
|
+
'badgeNumber': json['badgeNumber'] == null ? undefined : json['badgeNumber'],
|
|
239
239
|
'rampReadAt': json['rampReadAt'] == null ? undefined : (new Date(json['rampReadAt'])),
|
|
240
240
|
'licenceNumber': json['licenceNumber'],
|
|
241
241
|
'licenceFirstName': json['licenceFirstName'],
|
|
@@ -250,7 +250,7 @@ export function RegisterListResourceFromJSONTyped(json: any, ignoreDiscriminator
|
|
|
250
250
|
'signOnLat': json['signOnLat'],
|
|
251
251
|
'signOnLong': json['signOnLong'],
|
|
252
252
|
'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
|
|
253
|
-
'signOffLong': json['signOffLong']
|
|
253
|
+
'signOffLong': json['signOffLong'],
|
|
254
254
|
'hasIncidents': json['hasIncidents'],
|
|
255
255
|
};
|
|
256
256
|
}
|
|
@@ -129,7 +129,7 @@ export interface RegisterResource {
|
|
|
129
129
|
* @type {number}
|
|
130
130
|
* @memberof RegisterResource
|
|
131
131
|
*/
|
|
132
|
-
signOffLong
|
|
132
|
+
signOffLong?: number | null;
|
|
133
133
|
/**
|
|
134
134
|
*
|
|
135
135
|
* @type {string}
|
|
@@ -208,7 +208,6 @@ export function instanceOfRegisterResource(value: object): value is RegisterReso
|
|
|
208
208
|
if (!('firstAidImage' in value) || value['firstAidImage'] === undefined) return false;
|
|
209
209
|
if (!('signOnLat' in value) || value['signOnLat'] === undefined) return false;
|
|
210
210
|
if (!('signOnLong' in value) || value['signOnLong'] === undefined) return false;
|
|
211
|
-
if (!('signOffLong' in value) || value['signOffLong'] === undefined) return false;
|
|
212
211
|
if (!('licenceNumber' in value) || value['licenceNumber'] === undefined) return false;
|
|
213
212
|
if (!('licenceExpiry' in value) || value['licenceExpiry'] === undefined) return false;
|
|
214
213
|
if (!('licenceFirstName' in value) || value['licenceFirstName'] === undefined) return false;
|
|
@@ -241,7 +240,7 @@ export function RegisterResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
241
240
|
'signOnLat': json['signOnLat'],
|
|
242
241
|
'signOnLong': json['signOnLong'],
|
|
243
242
|
'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
|
|
244
|
-
'signOffLong': json['signOffLong'],
|
|
243
|
+
'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
|
|
245
244
|
'licenceNumber': json['licenceNumber'],
|
|
246
245
|
'licenceExpiry': json['licenceExpiry'],
|
|
247
246
|
'licenceFirstName': json['licenceFirstName'],
|
|
@@ -96,6 +96,12 @@ export interface UserResource {
|
|
|
96
96
|
* @memberof UserResource
|
|
97
97
|
*/
|
|
98
98
|
hasVenues: boolean;
|
|
99
|
+
/**
|
|
100
|
+
*
|
|
101
|
+
* @type {Array<string>}
|
|
102
|
+
* @memberof UserResource
|
|
103
|
+
*/
|
|
104
|
+
availableSchemaTypes: Array<string>;
|
|
99
105
|
/**
|
|
100
106
|
*
|
|
101
107
|
* @type {Array<AssetLiteResource>}
|
|
@@ -152,6 +158,7 @@ export function instanceOfUserResource(value: object): value is UserResource {
|
|
|
152
158
|
if (!('mobile' in value) || value['mobile'] === undefined) return false;
|
|
153
159
|
if (!('roles' in value) || value['roles'] === undefined) return false;
|
|
154
160
|
if (!('hasVenues' in value) || value['hasVenues'] === undefined) return false;
|
|
161
|
+
if (!('availableSchemaTypes' in value) || value['availableSchemaTypes'] === undefined) return false;
|
|
155
162
|
if (!('assets' in value) || value['assets'] === undefined) return false;
|
|
156
163
|
if (!('signatureAsset' in value) || value['signatureAsset'] === undefined) return false;
|
|
157
164
|
if (!('profileImage' in value) || value['profileImage'] === undefined) return false;
|
|
@@ -178,6 +185,7 @@ export function UserResourceFromJSONTyped(json: any, ignoreDiscriminator: boolea
|
|
|
178
185
|
'mobile': json['mobile'],
|
|
179
186
|
'roles': json['roles'],
|
|
180
187
|
'hasVenues': json['hasVenues'],
|
|
188
|
+
'availableSchemaTypes': json['availableSchemaTypes'],
|
|
181
189
|
'assets': (json['assets'] == null ? null : (json['assets'] as Array<any>).map(AssetLiteResourceFromJSON)),
|
|
182
190
|
'signatureAsset': AssetResourceFromJSON(json['signatureAsset']),
|
|
183
191
|
'profileImage': AssetLiteResourceFromJSON(json['profileImage']),
|
|
@@ -207,6 +215,7 @@ export function UserResourceToJSONTyped(value?: UserResource | null, ignoreDiscr
|
|
|
207
215
|
'mobile': value['mobile'],
|
|
208
216
|
'roles': value['roles'],
|
|
209
217
|
'hasVenues': value['hasVenues'],
|
|
218
|
+
'availableSchemaTypes': value['availableSchemaTypes'],
|
|
210
219
|
'assets': (value['assets'] == null ? null : (value['assets'] as Array<any>).map(AssetLiteResourceToJSON)),
|
|
211
220
|
'signatureAsset': AssetResourceToJSON(value['signatureAsset']),
|
|
212
221
|
'profileImage': AssetLiteResourceToJSON(value['profileImage']),
|