@digital8/security-registers-backend-ts-sdk 0.0.511 → 0.0.512

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 CHANGED
@@ -1,4 +1,4 @@
1
- ## @digital8/security-registers-backend-ts-sdk@0.0.511
1
+ ## @digital8/security-registers-backend-ts-sdk@0.0.512
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.511 --save
39
+ npm install @digital8/security-registers-backend-ts-sdk@0.0.512 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -32,7 +32,7 @@ export interface AddressResource {
32
32
  * @type {string}
33
33
  * @memberof AddressResource
34
34
  */
35
- addressLine2: string;
35
+ addressLine2?: string | null;
36
36
  /**
37
37
  *
38
38
  * @type {string}
@@ -24,8 +24,6 @@ exports.AddressResourceToJSONTyped = AddressResourceToJSONTyped;
24
24
  function instanceOfAddressResource(value) {
25
25
  if (!('addressLine1' in value) || value['addressLine1'] === undefined)
26
26
  return false;
27
- if (!('addressLine2' in value) || value['addressLine2'] === undefined)
28
- return false;
29
27
  if (!('suburb' in value) || value['suburb'] === undefined)
30
28
  return false;
31
29
  if (!('city' in value) || value['city'] === undefined)
@@ -50,7 +48,7 @@ function AddressResourceFromJSONTyped(json, ignoreDiscriminator) {
50
48
  return {
51
49
  'id': json['id'] == null ? undefined : json['id'],
52
50
  'addressLine1': json['addressLine1'],
53
- 'addressLine2': json['addressLine2'],
51
+ 'addressLine2': json['addressLine2'] == null ? undefined : json['addressLine2'],
54
52
  'suburb': json['suburb'],
55
53
  'city': json['city'],
56
54
  'state': json['state'],
@@ -32,7 +32,7 @@ export interface IncidentImageResource {
32
32
  * @type {string}
33
33
  * @memberof IncidentImageResource
34
34
  */
35
- altText?: string | null;
35
+ altText: string;
36
36
  /**
37
37
  *
38
38
  * @type {number}
@@ -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'] == null ? undefined : json['alt_text'],
47
+ 'altText': json['alt_text'],
46
48
  'assetId': json['asset_id'],
47
49
  'url': json['url'],
48
50
  };
@@ -27,6 +27,12 @@ export interface IncidentsStoreRequest {
27
27
  * @memberof IncidentsStoreRequest
28
28
  */
29
29
  type: IncidentsStoreRequestTypeEnum;
30
+ /**
31
+ * The id of the user this incident will belong to. Required when the caller is an admin or super-admin (they can never own incidents themselves); ignored otherwise. Must reference a venue manager, venue staff, or venue guard who has access to the nominated venue.
32
+ * @type {number}
33
+ * @memberof IncidentsStoreRequest
34
+ */
35
+ userId?: number;
30
36
  /**
31
37
  * 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.
32
38
  * @type {object}
@@ -48,6 +48,7 @@ function IncidentsStoreRequestFromJSONTyped(json, ignoreDiscriminator) {
48
48
  return {
49
49
  'venueId': json['venue_id'],
50
50
  'type': json['type'],
51
+ 'userId': json['user_id'] == null ? undefined : json['user_id'],
51
52
  'fields': json['fields'],
52
53
  };
53
54
  }
@@ -62,6 +63,7 @@ function IncidentsStoreRequestToJSONTyped(value, ignoreDiscriminator) {
62
63
  return {
63
64
  'venue_id': value['venueId'],
64
65
  'type': value['type'],
66
+ 'user_id': value['userId'],
65
67
  'fields': value['fields'],
66
68
  };
67
69
  }
@@ -63,7 +63,6 @@ export declare const NotificationPreferenceResourceNotificationTypeEnum: {
63
63
  readonly NonSignOn: "non_sign_on";
64
64
  readonly SignOnRejected: "sign_on_rejected";
65
65
  readonly LicenceUpdated: "licence_updated";
66
- readonly LicenceExpiringSoon: "licence_expiring_soon";
67
66
  readonly ExportReady: "export_ready";
68
67
  readonly ExportFailed: "export_failed";
69
68
  };
@@ -30,7 +30,6 @@ exports.NotificationPreferenceResourceNotificationTypeEnum = {
30
30
  NonSignOn: 'non_sign_on',
31
31
  SignOnRejected: 'sign_on_rejected',
32
32
  LicenceUpdated: 'licence_updated',
33
- LicenceExpiringSoon: 'licence_expiring_soon',
34
33
  ExportReady: 'export_ready',
35
34
  ExportFailed: 'export_failed'
36
35
  };
@@ -44,7 +44,6 @@ export declare const NotificationPreferencesBulkRequestPreferencesInnerNotificat
44
44
  readonly NonSignOn: "non_sign_on";
45
45
  readonly SignOnRejected: "sign_on_rejected";
46
46
  readonly LicenceUpdated: "licence_updated";
47
- readonly LicenceExpiringSoon: "licence_expiring_soon";
48
47
  readonly ExportReady: "export_ready";
49
48
  readonly ExportFailed: "export_failed";
50
49
  };
@@ -29,7 +29,6 @@ exports.NotificationPreferencesBulkRequestPreferencesInnerNotificationTypeEnum =
29
29
  NonSignOn: 'non_sign_on',
30
30
  SignOnRejected: 'sign_on_rejected',
31
31
  LicenceUpdated: 'licence_updated',
32
- LicenceExpiringSoon: 'licence_expiring_soon',
33
32
  ExportReady: 'export_ready',
34
33
  ExportFailed: 'export_failed'
35
34
  };
@@ -44,7 +44,6 @@ export declare const NotificationPreferencesStoreRequestNotificationTypeEnum: {
44
44
  readonly NonSignOn: "non_sign_on";
45
45
  readonly SignOnRejected: "sign_on_rejected";
46
46
  readonly LicenceUpdated: "licence_updated";
47
- readonly LicenceExpiringSoon: "licence_expiring_soon";
48
47
  readonly ExportReady: "export_ready";
49
48
  readonly ExportFailed: "export_failed";
50
49
  };
@@ -29,7 +29,6 @@ exports.NotificationPreferencesStoreRequestNotificationTypeEnum = {
29
29
  NonSignOn: 'non_sign_on',
30
30
  SignOnRejected: 'sign_on_rejected',
31
31
  LicenceUpdated: 'licence_updated',
32
- LicenceExpiringSoon: 'licence_expiring_soon',
33
32
  ExportReady: 'export_ready',
34
33
  ExportFailed: 'export_failed'
35
34
  };
@@ -148,13 +148,13 @@ export interface RegisterListResource {
148
148
  * @type {number}
149
149
  * @memberof RegisterListResource
150
150
  */
151
- signOffLat: number;
151
+ signOffLat?: number | null;
152
152
  /**
153
153
  *
154
154
  * @type {number}
155
155
  * @memberof RegisterListResource
156
156
  */
157
- signOffLong?: number | null;
157
+ signOffLong: number;
158
158
  /**
159
159
  *
160
160
  * @type {boolean}
@@ -67,7 +67,7 @@ function instanceOfRegisterListResource(value) {
67
67
  return false;
68
68
  if (!('signOnLong' in value) || value['signOnLong'] === undefined)
69
69
  return false;
70
- if (!('signOffLat' in value) || value['signOffLat'] === undefined)
70
+ if (!('signOffLong' in value) || value['signOffLong'] === undefined)
71
71
  return false;
72
72
  if (!('hasIncidents' in value) || value['hasIncidents'] === undefined)
73
73
  return false;
@@ -102,8 +102,8 @@ function RegisterListResourceFromJSONTyped(json, ignoreDiscriminator) {
102
102
  'firstAid': json['firstAid'],
103
103
  'signOnLat': json['signOnLat'],
104
104
  'signOnLong': json['signOnLong'],
105
- 'signOffLat': json['signOffLat'],
106
- 'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
105
+ 'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
106
+ 'signOffLong': json['signOffLong'],
107
107
  'hasIncidents': json['hasIncidents'],
108
108
  };
109
109
  }
@@ -106,7 +106,7 @@ export interface RegisterResource {
106
106
  * @type {number}
107
107
  * @memberof RegisterResource
108
108
  */
109
- signOffLat?: number | null;
109
+ signOffLat: number;
110
110
  /**
111
111
  *
112
112
  * @type {number}
@@ -57,6 +57,8 @@ function instanceOfRegisterResource(value) {
57
57
  return false;
58
58
  if (!('signOnLong' in value) || value['signOnLong'] === undefined)
59
59
  return false;
60
+ if (!('signOffLat' in value) || value['signOffLat'] === undefined)
61
+ return false;
60
62
  if (!('signOffLong' in value) || value['signOffLong'] === undefined)
61
63
  return false;
62
64
  if (!('licenceNumber' in value) || value['licenceNumber'] === undefined)
@@ -91,7 +93,7 @@ function RegisterResourceFromJSONTyped(json, ignoreDiscriminator) {
91
93
  'firstAidImage': json['firstAidImage'],
92
94
  'signOnLat': json['signOnLat'],
93
95
  'signOnLong': json['signOnLong'],
94
- 'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
96
+ 'signOffLat': json['signOffLat'],
95
97
  'signOffLong': json['signOffLong'],
96
98
  'licenceNumber': json['licenceNumber'],
97
99
  'licenceExpiry': json['licenceExpiry'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/security-registers-backend-ts-sdk",
3
- "version": "0.0.511",
3
+ "version": "0.0.512",
4
4
  "description": "OpenAPI client for @digital8/security-registers-backend-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -36,7 +36,7 @@ export interface AddressResource {
36
36
  * @type {string}
37
37
  * @memberof AddressResource
38
38
  */
39
- addressLine2: string;
39
+ addressLine2?: string | null;
40
40
  /**
41
41
  *
42
42
  * @type {string}
@@ -80,7 +80,6 @@ export interface AddressResource {
80
80
  */
81
81
  export function instanceOfAddressResource(value: object): value is AddressResource {
82
82
  if (!('addressLine1' in value) || value['addressLine1'] === undefined) return false;
83
- if (!('addressLine2' in value) || value['addressLine2'] === undefined) return false;
84
83
  if (!('suburb' in value) || value['suburb'] === undefined) return false;
85
84
  if (!('city' in value) || value['city'] === undefined) return false;
86
85
  if (!('state' in value) || value['state'] === undefined) return false;
@@ -102,7 +101,7 @@ export function AddressResourceFromJSONTyped(json: any, ignoreDiscriminator: boo
102
101
 
103
102
  'id': json['id'] == null ? undefined : json['id'],
104
103
  'addressLine1': json['addressLine1'],
105
- 'addressLine2': json['addressLine2'],
104
+ 'addressLine2': json['addressLine2'] == null ? undefined : json['addressLine2'],
106
105
  'suburb': json['suburb'],
107
106
  'city': json['city'],
108
107
  'state': json['state'],
@@ -36,7 +36,7 @@ export interface IncidentImageResource {
36
36
  * @type {string}
37
37
  * @memberof IncidentImageResource
38
38
  */
39
- altText?: string | null;
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'] == null ? undefined : json['alt_text'],
78
+ 'altText': json['alt_text'],
78
79
  'assetId': json['asset_id'],
79
80
  'url': json['url'],
80
81
  };
@@ -31,6 +31,12 @@ export interface IncidentsStoreRequest {
31
31
  * @memberof IncidentsStoreRequest
32
32
  */
33
33
  type: IncidentsStoreRequestTypeEnum;
34
+ /**
35
+ * The id of the user this incident will belong to. Required when the caller is an admin or super-admin (they can never own incidents themselves); ignored otherwise. Must reference a venue manager, venue staff, or venue guard who has access to the nominated venue.
36
+ * @type {number}
37
+ * @memberof IncidentsStoreRequest
38
+ */
39
+ userId?: number;
34
40
  /**
35
41
  * 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.
36
42
  * @type {object}
@@ -72,6 +78,7 @@ export function IncidentsStoreRequestFromJSONTyped(json: any, ignoreDiscriminato
72
78
 
73
79
  'venueId': json['venue_id'],
74
80
  'type': json['type'],
81
+ 'userId': json['user_id'] == null ? undefined : json['user_id'],
75
82
  'fields': json['fields'],
76
83
  };
77
84
  }
@@ -89,6 +96,7 @@ export function IncidentsStoreRequestToJSONTyped(value?: IncidentsStoreRequest |
89
96
 
90
97
  'venue_id': value['venueId'],
91
98
  'type': value['type'],
99
+ 'user_id': value['userId'],
92
100
  'fields': value['fields'],
93
101
  };
94
102
  }
@@ -76,7 +76,6 @@ export const NotificationPreferenceResourceNotificationTypeEnum = {
76
76
  NonSignOn: 'non_sign_on',
77
77
  SignOnRejected: 'sign_on_rejected',
78
78
  LicenceUpdated: 'licence_updated',
79
- LicenceExpiringSoon: 'licence_expiring_soon',
80
79
  ExportReady: 'export_ready',
81
80
  ExportFailed: 'export_failed'
82
81
  } as const;
@@ -50,7 +50,6 @@ export const NotificationPreferencesBulkRequestPreferencesInnerNotificationTypeE
50
50
  NonSignOn: 'non_sign_on',
51
51
  SignOnRejected: 'sign_on_rejected',
52
52
  LicenceUpdated: 'licence_updated',
53
- LicenceExpiringSoon: 'licence_expiring_soon',
54
53
  ExportReady: 'export_ready',
55
54
  ExportFailed: 'export_failed'
56
55
  } as const;
@@ -50,7 +50,6 @@ export const NotificationPreferencesStoreRequestNotificationTypeEnum = {
50
50
  NonSignOn: 'non_sign_on',
51
51
  SignOnRejected: 'sign_on_rejected',
52
52
  LicenceUpdated: 'licence_updated',
53
- LicenceExpiringSoon: 'licence_expiring_soon',
54
53
  ExportReady: 'export_ready',
55
54
  ExportFailed: 'export_failed'
56
55
  } as const;
@@ -165,13 +165,13 @@ export interface RegisterListResource {
165
165
  * @type {number}
166
166
  * @memberof RegisterListResource
167
167
  */
168
- signOffLat: number;
168
+ signOffLat?: number | null;
169
169
  /**
170
170
  *
171
171
  * @type {number}
172
172
  * @memberof RegisterListResource
173
173
  */
174
- signOffLong?: number | null;
174
+ signOffLong: number;
175
175
  /**
176
176
  *
177
177
  * @type {boolean}
@@ -213,7 +213,7 @@ export function instanceOfRegisterListResource(value: object): value is Register
213
213
  if (!('firstAid' in value) || value['firstAid'] === undefined) return false;
214
214
  if (!('signOnLat' in value) || value['signOnLat'] === undefined) return false;
215
215
  if (!('signOnLong' in value) || value['signOnLong'] === undefined) return false;
216
- if (!('signOffLat' in value) || value['signOffLat'] === 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
  }
@@ -249,8 +249,8 @@ export function RegisterListResourceFromJSONTyped(json: any, ignoreDiscriminator
249
249
  'firstAid': json['firstAid'],
250
250
  'signOnLat': json['signOnLat'],
251
251
  'signOnLong': json['signOnLong'],
252
- 'signOffLat': json['signOffLat'],
253
- 'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
252
+ 'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
253
+ 'signOffLong': json['signOffLong'],
254
254
  'hasIncidents': json['hasIncidents'],
255
255
  };
256
256
  }
@@ -123,7 +123,7 @@ export interface RegisterResource {
123
123
  * @type {number}
124
124
  * @memberof RegisterResource
125
125
  */
126
- signOffLat?: number | null;
126
+ signOffLat: number;
127
127
  /**
128
128
  *
129
129
  * @type {number}
@@ -208,6 +208,7 @@ 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 (!('signOffLat' in value) || value['signOffLat'] === undefined) return false;
211
212
  if (!('signOffLong' in value) || value['signOffLong'] === undefined) return false;
212
213
  if (!('licenceNumber' in value) || value['licenceNumber'] === undefined) return false;
213
214
  if (!('licenceExpiry' in value) || value['licenceExpiry'] === undefined) return false;
@@ -240,7 +241,7 @@ export function RegisterResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
240
241
  'firstAidImage': json['firstAidImage'],
241
242
  'signOnLat': json['signOnLat'],
242
243
  'signOnLong': json['signOnLong'],
243
- 'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
244
+ 'signOffLat': json['signOffLat'],
244
245
  'signOffLong': json['signOffLong'],
245
246
  'licenceNumber': json['licenceNumber'],
246
247
  'licenceExpiry': json['licenceExpiry'],