@digital8/security-registers-backend-ts-sdk 0.0.458 → 0.0.460

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.
@@ -16,6 +16,7 @@ src/models/AssetResource.ts
16
16
  src/models/AssetResourceArrayResponse.ts
17
17
  src/models/AuthChangePasswordRequest.ts
18
18
  src/models/AuthProfileUpdateRequest.ts
19
+ src/models/AuthRegisterGuardFileRequest.ts
19
20
  src/models/AuthRegisterGuardRequest.ts
20
21
  src/models/AuthRegisterGuardRequestLicencesInner.ts
21
22
  src/models/AuthRegisterGuardRequestProfileSignature.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @digital8/security-registers-backend-ts-sdk@0.0.458
1
+ ## @digital8/security-registers-backend-ts-sdk@0.0.460
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.458 --save
39
+ npm install @digital8/security-registers-backend-ts-sdk@0.0.460 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AssetFileForUploadResource, AuthChangePasswordRequest, AuthProfileUpdateRequest, AuthRegisterGuardRequest, DevicesRegisterRequest, ExportQueuedResource, GenericResponse, IncidentFieldSchemaResource, IncidentFieldSchemasShowRequest, IncidentResource, IncidentVersionResource, IncidentVersionResourceArrayResponse, IncidentVideoResource, IncidentVideoResourceArrayResponse, IncidentVideoSignedUrlResource, IncidentVideoUploadTokenResource, IncidentsApproveRequest, IncidentsExportCsvBulkRequest, IncidentsExportPdfBulkRequest, IncidentsListRequest, IncidentsStoreRequest, IncidentsUpdateRequest, IncidentsVideosStoreRequest, IncidentsVideosUploadTokenRequest, IndexMinimalUserRequest, IndexUserRequest, LicenceLiteResourceArrayResponse, LicenceResource, LicenceVerificationFallbackSettingResourceArrayResponse, LicencesCheckLogsListRequest, LicencesListAllRequest, LicencesListRequest, LicencesStoreRequest, LicencesUpdateRequest, LicencesVerifyRequest, LoginAuthRequest, MobileAppConfigRequest, MobileAppConfigResource, MobileDeviceResource, MobileInitResource, NotificationPreferenceResource, NotificationPreferenceResourceArrayResponse, NotificationPreferencesBulkRequest, NotificationPreferencesStoreRequest, NotificationTypeResourceArrayResponse, PaginatedIncidentListResourceResponse, PaginatedLicenceCheckLogResourceResponse, PaginatedLicenceListResourceResponse, PaginatedRegisterGroupedByRosterResourceResponse, PaginatedRosterListResourceResponse, PaginatedRosterWithRegistersResourceResponse, PaginatedSecurityCompanyResourceResponse, PaginatedUserResourceResponse, PaginatedVenueResourceResponse, PdfExportResource, RegisterLiteResourceArrayResponse, RegisterResource, RegistersCreateRequest, RegistersListAllRequest, RegistersListRequest, RegistersSignOffRequest, RegistersSignOnRequest, RegistersUpdateRequest, ResetPasswordAuthRequest, RosterLiteResourceArrayResponse, RosterResource, RostersExportPdfRequest, RostersListAllRequest, RostersListRequest, RostersListWithRegistersRequest, RostersUpdateRequest, SecurityCompaniesAttachUsersRequest, SecurityCompaniesListAllRequest, SecurityCompaniesListRequest, SecurityCompaniesStoreRequest, SecurityCompaniesUpdateRequest, SecurityCompanyLiteResourceArrayResponse, SecurityCompanyResource, SendForgotPasswordLinkAuthRequest, SettingsLicenceVerificationFallbackUpdateRequest, StoreAssetFileRequest, StoreUserRequest, UpdateUserRequest, UserAuthTokenResource, UserLiteResourceArrayResponse, UserResource, UserVenueResourceArrayResponse, UsersAttachSecurityCompaniesRequest, UsersAttachVenuesRequest, UsersCreateWithRoleRequest, UsersDetachVenuesRequest, UsersRegisterVenueManagerRequest, VenueGuardScheduleResourceArrayResponse, VenueLiteResourceArrayResponse, VenueResource, VenuesAttachUsersRequest, VenuesGuardScheduleUpdateRequest, VenuesListAllRequest, VenuesListForUserRequest, VenuesListRequest, VenuesNearbyRequest, VenuesPublicStoreRequest, VenuesUpdateRequest, VerifyLicenceResource } from '../models/index';
13
+ import type { AssetFileForUploadResource, AuthChangePasswordRequest, AuthProfileUpdateRequest, AuthRegisterGuardFileRequest, AuthRegisterGuardRequest, DevicesRegisterRequest, ExportQueuedResource, GenericResponse, IncidentFieldSchemaResource, IncidentFieldSchemasShowRequest, IncidentResource, IncidentVersionResource, IncidentVersionResourceArrayResponse, IncidentVideoResource, IncidentVideoResourceArrayResponse, IncidentVideoSignedUrlResource, IncidentVideoUploadTokenResource, IncidentsApproveRequest, IncidentsExportCsvBulkRequest, IncidentsExportPdfBulkRequest, IncidentsListRequest, IncidentsStoreRequest, IncidentsUpdateRequest, IncidentsVideosStoreRequest, IncidentsVideosUploadTokenRequest, IndexMinimalUserRequest, IndexUserRequest, LicenceLiteResourceArrayResponse, LicenceResource, LicenceVerificationFallbackSettingResourceArrayResponse, LicencesCheckLogsListRequest, LicencesListAllRequest, LicencesListRequest, LicencesStoreRequest, LicencesUpdateRequest, LicencesVerifyRequest, LoginAuthRequest, MobileAppConfigRequest, MobileAppConfigResource, MobileDeviceResource, MobileInitResource, NotificationPreferenceResource, NotificationPreferenceResourceArrayResponse, NotificationPreferencesBulkRequest, NotificationPreferencesStoreRequest, NotificationTypeResourceArrayResponse, PaginatedIncidentListResourceResponse, PaginatedLicenceCheckLogResourceResponse, PaginatedLicenceListResourceResponse, PaginatedRegisterGroupedByRosterResourceResponse, PaginatedRosterListResourceResponse, PaginatedRosterWithRegistersResourceResponse, PaginatedSecurityCompanyResourceResponse, PaginatedUserResourceResponse, PaginatedVenueResourceResponse, PdfExportResource, RegisterLiteResourceArrayResponse, RegisterResource, RegistersCreateRequest, RegistersListAllRequest, RegistersListRequest, RegistersSignOffRequest, RegistersSignOnRequest, RegistersUpdateRequest, ResetPasswordAuthRequest, RosterLiteResourceArrayResponse, RosterResource, RostersExportPdfRequest, RostersListAllRequest, RostersListRequest, RostersListWithRegistersRequest, RostersUpdateRequest, SecurityCompaniesAttachUsersRequest, SecurityCompaniesListAllRequest, SecurityCompaniesListRequest, SecurityCompaniesStoreRequest, SecurityCompaniesUpdateRequest, SecurityCompanyLiteResourceArrayResponse, SecurityCompanyResource, SendForgotPasswordLinkAuthRequest, SettingsLicenceVerificationFallbackUpdateRequest, StoreAssetFileRequest, StoreUserRequest, UpdateUserRequest, UserAuthTokenResource, UserLiteResourceArrayResponse, UserResource, UserVenueResourceArrayResponse, UsersAttachSecurityCompaniesRequest, UsersAttachVenuesRequest, UsersCreateWithRoleRequest, UsersDetachVenuesRequest, UsersRegisterVenueManagerRequest, VenueGuardScheduleResourceArrayResponse, VenueLiteResourceArrayResponse, VenueResource, VenuesAttachUsersRequest, VenuesGuardScheduleUpdateRequest, VenuesListAllRequest, VenuesListForUserRequest, VenuesListRequest, VenuesNearbyRequest, VenuesPublicStoreRequest, VenuesUpdateRequest, VerifyLicenceResource } from '../models/index';
14
14
  export interface AuthChangePasswordOperationRequest {
15
15
  authChangePasswordRequest?: AuthChangePasswordRequest;
16
16
  }
@@ -23,6 +23,9 @@ export interface AuthProfileUpdateOperationRequest {
23
23
  export interface AuthRegisterGuardOperationRequest {
24
24
  authRegisterGuardRequest?: AuthRegisterGuardRequest;
25
25
  }
26
+ export interface AuthRegisterGuardFileOperationRequest {
27
+ authRegisterGuardFileRequest?: AuthRegisterGuardFileRequest;
28
+ }
26
29
  export interface DestroyUserRequest {
27
30
  user: number;
28
31
  }
@@ -372,6 +375,14 @@ export declare class GeneralApi extends runtime.BaseAPI {
372
375
  * Auto-generated: auth.registerGuard
373
376
  */
374
377
  authRegisterGuard(requestParameters?: AuthRegisterGuardOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserAuthTokenResource>;
378
+ /**
379
+ * Auto-generated: auth.registerGuard.file
380
+ */
381
+ authRegisterGuardFileRaw(requestParameters: AuthRegisterGuardFileOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssetFileForUploadResource>>;
382
+ /**
383
+ * Auto-generated: auth.registerGuard.file
384
+ */
385
+ authRegisterGuardFile(requestParameters?: AuthRegisterGuardFileOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssetFileForUploadResource>;
375
386
  /**
376
387
  * Auto-generated: destroyUser
377
388
  */
@@ -296,6 +296,61 @@ var GeneralApi = /** @class */ (function (_super) {
296
296
  });
297
297
  });
298
298
  };
299
+ /**
300
+ * Auto-generated: auth.registerGuard.file
301
+ */
302
+ GeneralApi.prototype.authRegisterGuardFileRaw = function (requestParameters, initOverrides) {
303
+ return __awaiter(this, void 0, void 0, function () {
304
+ var queryParameters, headerParameters, token, tokenString, urlPath, response;
305
+ return __generator(this, function (_a) {
306
+ switch (_a.label) {
307
+ case 0:
308
+ queryParameters = {};
309
+ headerParameters = {};
310
+ headerParameters['Content-Type'] = 'application/json';
311
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
312
+ token = this.configuration.accessToken;
313
+ return [4 /*yield*/, token("bearerAuth", [])];
314
+ case 1:
315
+ tokenString = _a.sent();
316
+ if (tokenString) {
317
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
318
+ }
319
+ _a.label = 2;
320
+ case 2:
321
+ urlPath = "/api/auth/register-guard/file";
322
+ return [4 /*yield*/, this.request({
323
+ path: urlPath,
324
+ method: 'POST',
325
+ headers: headerParameters,
326
+ query: queryParameters,
327
+ body: (0, index_1.AuthRegisterGuardFileRequestToJSON)(requestParameters['authRegisterGuardFileRequest']),
328
+ }, initOverrides)];
329
+ case 3:
330
+ response = _a.sent();
331
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AssetFileForUploadResourceFromJSON)(jsonValue); })];
332
+ }
333
+ });
334
+ });
335
+ };
336
+ /**
337
+ * Auto-generated: auth.registerGuard.file
338
+ */
339
+ GeneralApi.prototype.authRegisterGuardFile = function () {
340
+ return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
341
+ var response;
342
+ if (requestParameters === void 0) { requestParameters = {}; }
343
+ return __generator(this, function (_a) {
344
+ switch (_a.label) {
345
+ case 0: return [4 /*yield*/, this.authRegisterGuardFileRaw(requestParameters, initOverrides)];
346
+ case 1:
347
+ response = _a.sent();
348
+ return [4 /*yield*/, response.value()];
349
+ case 2: return [2 /*return*/, _a.sent()];
350
+ }
351
+ });
352
+ });
353
+ };
299
354
  /**
300
355
  * Auto-generated: destroyUser
301
356
  */
@@ -44,7 +44,7 @@ export interface AssetResource {
44
44
  * @type {string}
45
45
  * @memberof AssetResource
46
46
  */
47
- altText?: string | null;
47
+ altText: string;
48
48
  /**
49
49
  *
50
50
  * @type {number}
@@ -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'] == null ? undefined : json['altText'],
55
+ 'altText': json['altText'],
54
56
  'index': json['index'],
55
57
  'fileId': json['fileId'],
56
58
  'isExternal': json['isExternal'],
@@ -0,0 +1,49 @@
1
+ /**
2
+ * My API
3
+ * API documentation for my Laravel app
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface AuthRegisterGuardFileRequest
16
+ */
17
+ export interface AuthRegisterGuardFileRequest {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof AuthRegisterGuardFileRequest
22
+ */
23
+ fileName: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof AuthRegisterGuardFileRequest
28
+ */
29
+ fileType: AuthRegisterGuardFileRequestFileTypeEnum;
30
+ }
31
+ /**
32
+ * @export
33
+ */
34
+ export declare const AuthRegisterGuardFileRequestFileTypeEnum: {
35
+ readonly ImageJpeg: "image/jpeg";
36
+ readonly ImagePng: "image/png";
37
+ readonly ImageWebp: "image/webp";
38
+ readonly ImageHeic: "image/heic";
39
+ readonly ImageHeif: "image/heif";
40
+ };
41
+ export type AuthRegisterGuardFileRequestFileTypeEnum = typeof AuthRegisterGuardFileRequestFileTypeEnum[keyof typeof AuthRegisterGuardFileRequestFileTypeEnum];
42
+ /**
43
+ * Check if a given object implements the AuthRegisterGuardFileRequest interface.
44
+ */
45
+ export declare function instanceOfAuthRegisterGuardFileRequest(value: object): value is AuthRegisterGuardFileRequest;
46
+ export declare function AuthRegisterGuardFileRequestFromJSON(json: any): AuthRegisterGuardFileRequest;
47
+ export declare function AuthRegisterGuardFileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthRegisterGuardFileRequest;
48
+ export declare function AuthRegisterGuardFileRequestToJSON(json: any): AuthRegisterGuardFileRequest;
49
+ export declare function AuthRegisterGuardFileRequestToJSONTyped(value?: AuthRegisterGuardFileRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * My API
6
+ * API documentation for my Laravel app
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.AuthRegisterGuardFileRequestFileTypeEnum = void 0;
17
+ exports.instanceOfAuthRegisterGuardFileRequest = instanceOfAuthRegisterGuardFileRequest;
18
+ exports.AuthRegisterGuardFileRequestFromJSON = AuthRegisterGuardFileRequestFromJSON;
19
+ exports.AuthRegisterGuardFileRequestFromJSONTyped = AuthRegisterGuardFileRequestFromJSONTyped;
20
+ exports.AuthRegisterGuardFileRequestToJSON = AuthRegisterGuardFileRequestToJSON;
21
+ exports.AuthRegisterGuardFileRequestToJSONTyped = AuthRegisterGuardFileRequestToJSONTyped;
22
+ /**
23
+ * @export
24
+ */
25
+ exports.AuthRegisterGuardFileRequestFileTypeEnum = {
26
+ ImageJpeg: 'image/jpeg',
27
+ ImagePng: 'image/png',
28
+ ImageWebp: 'image/webp',
29
+ ImageHeic: 'image/heic',
30
+ ImageHeif: 'image/heif'
31
+ };
32
+ /**
33
+ * Check if a given object implements the AuthRegisterGuardFileRequest interface.
34
+ */
35
+ function instanceOfAuthRegisterGuardFileRequest(value) {
36
+ if (!('fileName' in value) || value['fileName'] === undefined)
37
+ return false;
38
+ if (!('fileType' in value) || value['fileType'] === undefined)
39
+ return false;
40
+ return true;
41
+ }
42
+ function AuthRegisterGuardFileRequestFromJSON(json) {
43
+ return AuthRegisterGuardFileRequestFromJSONTyped(json, false);
44
+ }
45
+ function AuthRegisterGuardFileRequestFromJSONTyped(json, ignoreDiscriminator) {
46
+ if (json == null) {
47
+ return json;
48
+ }
49
+ return {
50
+ 'fileName': json['file_name'],
51
+ 'fileType': json['file_type'],
52
+ };
53
+ }
54
+ function AuthRegisterGuardFileRequestToJSON(json) {
55
+ return AuthRegisterGuardFileRequestToJSONTyped(json, false);
56
+ }
57
+ function AuthRegisterGuardFileRequestToJSONTyped(value, ignoreDiscriminator) {
58
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+ return {
63
+ 'file_name': value['fileName'],
64
+ 'file_type': value['fileType'],
65
+ };
66
+ }
@@ -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
  };
@@ -148,7 +148,7 @@ 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}
@@ -67,8 +67,6 @@ 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)
71
- return false;
72
70
  if (!('signOffLong' in value) || value['signOffLong'] === undefined)
73
71
  return false;
74
72
  if (!('hasIncidents' in value) || value['hasIncidents'] === undefined)
@@ -104,7 +102,7 @@ function RegisterListResourceFromJSONTyped(json, ignoreDiscriminator) {
104
102
  'firstAid': json['firstAid'],
105
103
  'signOnLat': json['signOnLat'],
106
104
  'signOnLong': json['signOnLong'],
107
- 'signOffLat': json['signOffLat'],
105
+ 'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
108
106
  'signOffLong': json['signOffLong'],
109
107
  'hasIncidents': json['hasIncidents'],
110
108
  };
@@ -112,7 +112,7 @@ export interface RegisterResource {
112
112
  * @type {number}
113
113
  * @memberof RegisterResource
114
114
  */
115
- signOffLong: number;
115
+ signOffLong?: number | null;
116
116
  /**
117
117
  *
118
118
  * @type {string}
@@ -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)
@@ -94,7 +92,7 @@ function RegisterResourceFromJSONTyped(json, ignoreDiscriminator) {
94
92
  'signOnLat': json['signOnLat'],
95
93
  'signOnLong': json['signOnLong'],
96
94
  'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
97
- 'signOffLong': json['signOffLong'],
95
+ 'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
98
96
  'licenceNumber': json['licenceNumber'],
99
97
  'licenceExpiry': json['licenceExpiry'],
100
98
  'licenceFirstName': json['licenceFirstName'],
@@ -8,6 +8,7 @@ export * from './AssetResource';
8
8
  export * from './AssetResourceArrayResponse';
9
9
  export * from './AuthChangePasswordRequest';
10
10
  export * from './AuthProfileUpdateRequest';
11
+ export * from './AuthRegisterGuardFileRequest';
11
12
  export * from './AuthRegisterGuardRequest';
12
13
  export * from './AuthRegisterGuardRequestLicencesInner';
13
14
  export * from './AuthRegisterGuardRequestProfileSignature';
@@ -26,6 +26,7 @@ __exportStar(require("./AssetResource"), exports);
26
26
  __exportStar(require("./AssetResourceArrayResponse"), exports);
27
27
  __exportStar(require("./AuthChangePasswordRequest"), exports);
28
28
  __exportStar(require("./AuthProfileUpdateRequest"), exports);
29
+ __exportStar(require("./AuthRegisterGuardFileRequest"), exports);
29
30
  __exportStar(require("./AuthRegisterGuardRequest"), exports);
30
31
  __exportStar(require("./AuthRegisterGuardRequestLicencesInner"), exports);
31
32
  __exportStar(require("./AuthRegisterGuardRequestProfileSignature"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/security-registers-backend-ts-sdk",
3
- "version": "0.0.458",
3
+ "version": "0.0.460",
4
4
  "description": "OpenAPI client for @digital8/security-registers-backend-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -18,6 +18,7 @@ import type {
18
18
  AssetFileForUploadResource,
19
19
  AuthChangePasswordRequest,
20
20
  AuthProfileUpdateRequest,
21
+ AuthRegisterGuardFileRequest,
21
22
  AuthRegisterGuardRequest,
22
23
  DevicesRegisterRequest,
23
24
  ExportQueuedResource,
@@ -127,6 +128,8 @@ import {
127
128
  AuthChangePasswordRequestToJSON,
128
129
  AuthProfileUpdateRequestFromJSON,
129
130
  AuthProfileUpdateRequestToJSON,
131
+ AuthRegisterGuardFileRequestFromJSON,
132
+ AuthRegisterGuardFileRequestToJSON,
130
133
  AuthRegisterGuardRequestFromJSON,
131
134
  AuthRegisterGuardRequestToJSON,
132
135
  DevicesRegisterRequestFromJSON,
@@ -347,6 +350,10 @@ export interface AuthRegisterGuardOperationRequest {
347
350
  authRegisterGuardRequest?: AuthRegisterGuardRequest;
348
351
  }
349
352
 
353
+ export interface AuthRegisterGuardFileOperationRequest {
354
+ authRegisterGuardFileRequest?: AuthRegisterGuardFileRequest;
355
+ }
356
+
350
357
  export interface DestroyUserRequest {
351
358
  user: number;
352
359
  }
@@ -926,6 +933,46 @@ export class GeneralApi extends runtime.BaseAPI {
926
933
  return await response.value();
927
934
  }
928
935
 
936
+ /**
937
+ * Auto-generated: auth.registerGuard.file
938
+ */
939
+ async authRegisterGuardFileRaw(requestParameters: AuthRegisterGuardFileOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AssetFileForUploadResource>> {
940
+ const queryParameters: any = {};
941
+
942
+ const headerParameters: runtime.HTTPHeaders = {};
943
+
944
+ headerParameters['Content-Type'] = 'application/json';
945
+
946
+ if (this.configuration && this.configuration.accessToken) {
947
+ const token = this.configuration.accessToken;
948
+ const tokenString = await token("bearerAuth", []);
949
+
950
+ if (tokenString) {
951
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
952
+ }
953
+ }
954
+
955
+ let urlPath = `/api/auth/register-guard/file`;
956
+
957
+ const response = await this.request({
958
+ path: urlPath,
959
+ method: 'POST',
960
+ headers: headerParameters,
961
+ query: queryParameters,
962
+ body: AuthRegisterGuardFileRequestToJSON(requestParameters['authRegisterGuardFileRequest']),
963
+ }, initOverrides);
964
+
965
+ return new runtime.JSONApiResponse(response, (jsonValue) => AssetFileForUploadResourceFromJSON(jsonValue));
966
+ }
967
+
968
+ /**
969
+ * Auto-generated: auth.registerGuard.file
970
+ */
971
+ async authRegisterGuardFile(requestParameters: AuthRegisterGuardFileOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AssetFileForUploadResource> {
972
+ const response = await this.authRegisterGuardFileRaw(requestParameters, initOverrides);
973
+ return await response.value();
974
+ }
975
+
929
976
  /**
930
977
  * Auto-generated: destroyUser
931
978
  */
@@ -48,7 +48,7 @@ export interface AssetResource {
48
48
  * @type {string}
49
49
  * @memberof AssetResource
50
50
  */
51
- altText?: string | null;
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'] == null ? undefined : json['altText'],
107
+ 'altText': json['altText'],
107
108
  'index': json['index'],
108
109
  'fileId': json['fileId'],
109
110
  'isExternal': json['isExternal'],
@@ -0,0 +1,89 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * My API
5
+ * API documentation for my Laravel app
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface AuthRegisterGuardFileRequest
20
+ */
21
+ export interface AuthRegisterGuardFileRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof AuthRegisterGuardFileRequest
26
+ */
27
+ fileName: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof AuthRegisterGuardFileRequest
32
+ */
33
+ fileType: AuthRegisterGuardFileRequestFileTypeEnum;
34
+ }
35
+
36
+
37
+ /**
38
+ * @export
39
+ */
40
+ export const AuthRegisterGuardFileRequestFileTypeEnum = {
41
+ ImageJpeg: 'image/jpeg',
42
+ ImagePng: 'image/png',
43
+ ImageWebp: 'image/webp',
44
+ ImageHeic: 'image/heic',
45
+ ImageHeif: 'image/heif'
46
+ } as const;
47
+ export type AuthRegisterGuardFileRequestFileTypeEnum = typeof AuthRegisterGuardFileRequestFileTypeEnum[keyof typeof AuthRegisterGuardFileRequestFileTypeEnum];
48
+
49
+
50
+ /**
51
+ * Check if a given object implements the AuthRegisterGuardFileRequest interface.
52
+ */
53
+ export function instanceOfAuthRegisterGuardFileRequest(value: object): value is AuthRegisterGuardFileRequest {
54
+ if (!('fileName' in value) || value['fileName'] === undefined) return false;
55
+ if (!('fileType' in value) || value['fileType'] === undefined) return false;
56
+ return true;
57
+ }
58
+
59
+ export function AuthRegisterGuardFileRequestFromJSON(json: any): AuthRegisterGuardFileRequest {
60
+ return AuthRegisterGuardFileRequestFromJSONTyped(json, false);
61
+ }
62
+
63
+ export function AuthRegisterGuardFileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthRegisterGuardFileRequest {
64
+ if (json == null) {
65
+ return json;
66
+ }
67
+ return {
68
+
69
+ 'fileName': json['file_name'],
70
+ 'fileType': json['file_type'],
71
+ };
72
+ }
73
+
74
+ export function AuthRegisterGuardFileRequestToJSON(json: any): AuthRegisterGuardFileRequest {
75
+ return AuthRegisterGuardFileRequestToJSONTyped(json, false);
76
+ }
77
+
78
+ export function AuthRegisterGuardFileRequestToJSONTyped(value?: AuthRegisterGuardFileRequest | null, ignoreDiscriminator: boolean = false): any {
79
+ if (value == null) {
80
+ return value;
81
+ }
82
+
83
+ return {
84
+
85
+ 'file_name': value['fileName'],
86
+ 'file_type': value['fileType'],
87
+ };
88
+ }
89
+
@@ -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
  };
@@ -165,7 +165,7 @@ 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}
@@ -213,7 +213,6 @@ 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;
217
216
  if (!('signOffLong' in value) || value['signOffLong'] === undefined) return false;
218
217
  if (!('hasIncidents' in value) || value['hasIncidents'] === undefined) return false;
219
218
  return true;
@@ -250,7 +249,7 @@ export function RegisterListResourceFromJSONTyped(json: any, ignoreDiscriminator
250
249
  'firstAid': json['firstAid'],
251
250
  'signOnLat': json['signOnLat'],
252
251
  'signOnLong': json['signOnLong'],
253
- 'signOffLat': json['signOffLat'],
252
+ 'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
254
253
  'signOffLong': json['signOffLong'],
255
254
  'hasIncidents': json['hasIncidents'],
256
255
  };
@@ -129,7 +129,7 @@ export interface RegisterResource {
129
129
  * @type {number}
130
130
  * @memberof RegisterResource
131
131
  */
132
- signOffLong: number;
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;
@@ -242,7 +241,7 @@ export function RegisterResourceFromJSONTyped(json: any, ignoreDiscriminator: bo
242
241
  'signOnLat': json['signOnLat'],
243
242
  'signOnLong': json['signOnLong'],
244
243
  'signOffLat': json['signOffLat'] == null ? undefined : json['signOffLat'],
245
- 'signOffLong': json['signOffLong'],
244
+ 'signOffLong': json['signOffLong'] == null ? undefined : json['signOffLong'],
246
245
  'licenceNumber': json['licenceNumber'],
247
246
  'licenceExpiry': json['licenceExpiry'],
248
247
  'licenceFirstName': json['licenceFirstName'],
@@ -10,6 +10,7 @@ export * from './AssetResource';
10
10
  export * from './AssetResourceArrayResponse';
11
11
  export * from './AuthChangePasswordRequest';
12
12
  export * from './AuthProfileUpdateRequest';
13
+ export * from './AuthRegisterGuardFileRequest';
13
14
  export * from './AuthRegisterGuardRequest';
14
15
  export * from './AuthRegisterGuardRequestLicencesInner';
15
16
  export * from './AuthRegisterGuardRequestProfileSignature';