@digital8/security-registers-backend-ts-sdk 0.0.3 → 0.0.5

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.
@@ -0,0 +1,33 @@
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
+ import type { SecurityCompanyResource } from './SecurityCompanyResource';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface SecurityCompanyResourceArrayResponse
17
+ */
18
+ export interface SecurityCompanyResourceArrayResponse {
19
+ /**
20
+ *
21
+ * @type {Array<SecurityCompanyResource>}
22
+ * @memberof SecurityCompanyResourceArrayResponse
23
+ */
24
+ data?: Array<SecurityCompanyResource>;
25
+ }
26
+ /**
27
+ * Check if a given object implements the SecurityCompanyResourceArrayResponse interface.
28
+ */
29
+ export declare function instanceOfSecurityCompanyResourceArrayResponse(value: object): value is SecurityCompanyResourceArrayResponse;
30
+ export declare function SecurityCompanyResourceArrayResponseFromJSON(json: any): SecurityCompanyResourceArrayResponse;
31
+ export declare function SecurityCompanyResourceArrayResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecurityCompanyResourceArrayResponse;
32
+ export declare function SecurityCompanyResourceArrayResponseToJSON(json: any): SecurityCompanyResourceArrayResponse;
33
+ export declare function SecurityCompanyResourceArrayResponseToJSONTyped(value?: SecurityCompanyResourceArrayResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,50 @@
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.instanceOfSecurityCompanyResourceArrayResponse = instanceOfSecurityCompanyResourceArrayResponse;
17
+ exports.SecurityCompanyResourceArrayResponseFromJSON = SecurityCompanyResourceArrayResponseFromJSON;
18
+ exports.SecurityCompanyResourceArrayResponseFromJSONTyped = SecurityCompanyResourceArrayResponseFromJSONTyped;
19
+ exports.SecurityCompanyResourceArrayResponseToJSON = SecurityCompanyResourceArrayResponseToJSON;
20
+ exports.SecurityCompanyResourceArrayResponseToJSONTyped = SecurityCompanyResourceArrayResponseToJSONTyped;
21
+ var SecurityCompanyResource_1 = require("./SecurityCompanyResource");
22
+ /**
23
+ * Check if a given object implements the SecurityCompanyResourceArrayResponse interface.
24
+ */
25
+ function instanceOfSecurityCompanyResourceArrayResponse(value) {
26
+ return true;
27
+ }
28
+ function SecurityCompanyResourceArrayResponseFromJSON(json) {
29
+ return SecurityCompanyResourceArrayResponseFromJSONTyped(json, false);
30
+ }
31
+ function SecurityCompanyResourceArrayResponseFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'data': json['data'] == null ? undefined : (json['data'].map(SecurityCompanyResource_1.SecurityCompanyResourceFromJSON)),
37
+ };
38
+ }
39
+ function SecurityCompanyResourceArrayResponseToJSON(json) {
40
+ return SecurityCompanyResourceArrayResponseToJSONTyped(json, false);
41
+ }
42
+ function SecurityCompanyResourceArrayResponseToJSONTyped(value, ignoreDiscriminator) {
43
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
44
+ if (value == null) {
45
+ return value;
46
+ }
47
+ return {
48
+ 'data': value['data'] == null ? undefined : (value['data'].map(SecurityCompanyResource_1.SecurityCompanyResourceToJSON)),
49
+ };
50
+ }
@@ -1,6 +1,5 @@
1
1
  export * from './AddressResource';
2
2
  export * from './AddressResourceArrayResponse';
3
- export * from './AdminRegisterRequest';
4
3
  export * from './AssetFileForUploadResource';
5
4
  export * from './AssetFileForUploadResourceArrayResponse';
6
5
  export * from './AssetLiteResource';
@@ -10,9 +9,13 @@ export * from './AssetResourceArrayResponse';
10
9
  export * from './GenericResponse';
11
10
  export * from './IndexUserRequest';
12
11
  export * from './LoginAuthRequest';
12
+ export * from './PaginatedSecurityCompanyResourceResponse';
13
13
  export * from './PaginatedUserResourceResponse';
14
14
  export * from './PagingMetadata';
15
15
  export * from './ResetPasswordAuthRequest';
16
+ export * from './SecurityCompaniesStoreRequest';
17
+ export * from './SecurityCompanyResource';
18
+ export * from './SecurityCompanyResourceArrayResponse';
16
19
  export * from './SendForgotPasswordLinkAuthRequest';
17
20
  export * from './StoreAssetFileRequest';
18
21
  export * from './StoreUserRequest';
@@ -18,7 +18,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  /* eslint-disable */
19
19
  __exportStar(require("./AddressResource"), exports);
20
20
  __exportStar(require("./AddressResourceArrayResponse"), exports);
21
- __exportStar(require("./AdminRegisterRequest"), exports);
22
21
  __exportStar(require("./AssetFileForUploadResource"), exports);
23
22
  __exportStar(require("./AssetFileForUploadResourceArrayResponse"), exports);
24
23
  __exportStar(require("./AssetLiteResource"), exports);
@@ -28,9 +27,13 @@ __exportStar(require("./AssetResourceArrayResponse"), exports);
28
27
  __exportStar(require("./GenericResponse"), exports);
29
28
  __exportStar(require("./IndexUserRequest"), exports);
30
29
  __exportStar(require("./LoginAuthRequest"), exports);
30
+ __exportStar(require("./PaginatedSecurityCompanyResourceResponse"), exports);
31
31
  __exportStar(require("./PaginatedUserResourceResponse"), exports);
32
32
  __exportStar(require("./PagingMetadata"), exports);
33
33
  __exportStar(require("./ResetPasswordAuthRequest"), exports);
34
+ __exportStar(require("./SecurityCompaniesStoreRequest"), exports);
35
+ __exportStar(require("./SecurityCompanyResource"), exports);
36
+ __exportStar(require("./SecurityCompanyResourceArrayResponse"), exports);
34
37
  __exportStar(require("./SendForgotPasswordLinkAuthRequest"), exports);
35
38
  __exportStar(require("./StoreAssetFileRequest"), exports);
36
39
  __exportStar(require("./StoreUserRequest"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital8/security-registers-backend-ts-sdk",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "OpenAPI client for @digital8/security-registers-backend-ts-sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -15,13 +15,14 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
- AdminRegisterRequest,
19
18
  AssetFileForUploadResource,
20
19
  GenericResponse,
21
20
  IndexUserRequest,
22
21
  LoginAuthRequest,
23
22
  PaginatedUserResourceResponse,
24
23
  ResetPasswordAuthRequest,
24
+ SecurityCompaniesStoreRequest,
25
+ SecurityCompanyResource,
25
26
  SendForgotPasswordLinkAuthRequest,
26
27
  StoreAssetFileRequest,
27
28
  StoreUserRequest,
@@ -30,8 +31,6 @@ import type {
30
31
  UserResource,
31
32
  } from '../models/index';
32
33
  import {
33
- AdminRegisterRequestFromJSON,
34
- AdminRegisterRequestToJSON,
35
34
  AssetFileForUploadResourceFromJSON,
36
35
  AssetFileForUploadResourceToJSON,
37
36
  GenericResponseFromJSON,
@@ -44,6 +43,10 @@ import {
44
43
  PaginatedUserResourceResponseToJSON,
45
44
  ResetPasswordAuthRequestFromJSON,
46
45
  ResetPasswordAuthRequestToJSON,
46
+ SecurityCompaniesStoreRequestFromJSON,
47
+ SecurityCompaniesStoreRequestToJSON,
48
+ SecurityCompanyResourceFromJSON,
49
+ SecurityCompanyResourceToJSON,
47
50
  SendForgotPasswordLinkAuthRequestFromJSON,
48
51
  SendForgotPasswordLinkAuthRequestToJSON,
49
52
  StoreAssetFileRequestFromJSON,
@@ -58,10 +61,6 @@ import {
58
61
  UserResourceToJSON,
59
62
  } from '../models/index';
60
63
 
61
- export interface AdminRegisterOperationRequest {
62
- adminRegisterRequest?: AdminRegisterRequest;
63
- }
64
-
65
64
  export interface DestroyUserRequest {
66
65
  user: number;
67
66
  }
@@ -78,6 +77,10 @@ export interface ResetPasswordAuthOperationRequest {
78
77
  resetPasswordAuthRequest?: ResetPasswordAuthRequest;
79
78
  }
80
79
 
80
+ export interface SecurityCompaniesStoreOperationRequest {
81
+ securityCompaniesStoreRequest?: SecurityCompaniesStoreRequest;
82
+ }
83
+
81
84
  export interface SendForgotPasswordLinkAuthOperationRequest {
82
85
  sendForgotPasswordLinkAuthRequest?: SendForgotPasswordLinkAuthRequest;
83
86
  }
@@ -100,38 +103,6 @@ export interface UpdateUserOperationRequest {
100
103
  */
101
104
  export class GeneralApi extends runtime.BaseAPI {
102
105
 
103
- /**
104
- * Auto-generated: admin.register
105
- */
106
- async adminRegisterRaw(requestParameters: AdminRegisterOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResource>> {
107
- const queryParameters: any = {};
108
-
109
- const headerParameters: runtime.HTTPHeaders = {};
110
-
111
- headerParameters['Content-Type'] = 'application/json';
112
-
113
-
114
- let urlPath = `/api/users/register-admin-user`;
115
-
116
- const response = await this.request({
117
- path: urlPath,
118
- method: 'POST',
119
- headers: headerParameters,
120
- query: queryParameters,
121
- body: AdminRegisterRequestToJSON(requestParameters['adminRegisterRequest']),
122
- }, initOverrides);
123
-
124
- return new runtime.JSONApiResponse(response, (jsonValue) => UserResourceFromJSON(jsonValue));
125
- }
126
-
127
- /**
128
- * Auto-generated: admin.register
129
- */
130
- async adminRegister(requestParameters: AdminRegisterOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResource> {
131
- const response = await this.adminRegisterRaw(requestParameters, initOverrides);
132
- return await response.value();
133
- }
134
-
135
106
  /**
136
107
  * Auto-generated: destroyUser
137
108
  */
@@ -323,6 +294,38 @@ export class GeneralApi extends runtime.BaseAPI {
323
294
  return await response.value();
324
295
  }
325
296
 
297
+ /**
298
+ * Auto-generated: securityCompanies.store
299
+ */
300
+ async securityCompaniesStoreRaw(requestParameters: SecurityCompaniesStoreOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SecurityCompanyResource>> {
301
+ const queryParameters: any = {};
302
+
303
+ const headerParameters: runtime.HTTPHeaders = {};
304
+
305
+ headerParameters['Content-Type'] = 'application/json';
306
+
307
+
308
+ let urlPath = `/api/security-companies`;
309
+
310
+ const response = await this.request({
311
+ path: urlPath,
312
+ method: 'POST',
313
+ headers: headerParameters,
314
+ query: queryParameters,
315
+ body: SecurityCompaniesStoreRequestToJSON(requestParameters['securityCompaniesStoreRequest']),
316
+ }, initOverrides);
317
+
318
+ return new runtime.JSONApiResponse(response, (jsonValue) => SecurityCompanyResourceFromJSON(jsonValue));
319
+ }
320
+
321
+ /**
322
+ * Auto-generated: securityCompanies.store
323
+ */
324
+ async securityCompaniesStore(requestParameters: SecurityCompaniesStoreOperationRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SecurityCompanyResource> {
325
+ const response = await this.securityCompaniesStoreRaw(requestParameters, initOverrides);
326
+ return await response.value();
327
+ }
328
+
326
329
  /**
327
330
  * Auto-generated: sendForgotPasswordLinkAuth
328
331
  */
@@ -48,7 +48,7 @@ export interface AssetResource {
48
48
  * @type {string}
49
49
  * @memberof AssetResource
50
50
  */
51
- altText: string;
51
+ altText?: string | null;
52
52
  /**
53
53
  *
54
54
  * @type {number}
@@ -71,7 +71,6 @@ export function instanceOfAssetResource(value: object): value is AssetResource {
71
71
  if (!('filePath' in value) || value['filePath'] === undefined) return false;
72
72
  if (!('fileName' in value) || value['fileName'] === undefined) return false;
73
73
  if (!('mimeType' in value) || value['mimeType'] === undefined) return false;
74
- if (!('altText' in value) || value['altText'] === undefined) return false;
75
74
  if (!('index' in value) || value['index'] === undefined) return false;
76
75
  if (!('fileId' in value) || value['fileId'] === undefined) return false;
77
76
  return true;
@@ -91,7 +90,7 @@ export function AssetResourceFromJSONTyped(json: any, ignoreDiscriminator: boole
91
90
  'filePath': json['filePath'],
92
91
  'fileName': json['fileName'],
93
92
  'mimeType': json['mimeType'],
94
- 'altText': json['altText'],
93
+ 'altText': json['altText'] == null ? undefined : json['altText'],
95
94
  'index': json['index'],
96
95
  'fileId': json['fileId'],
97
96
  };
@@ -0,0 +1,90 @@
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
+ import type { PagingMetadata } from './PagingMetadata';
17
+ import {
18
+ PagingMetadataFromJSON,
19
+ PagingMetadataFromJSONTyped,
20
+ PagingMetadataToJSON,
21
+ PagingMetadataToJSONTyped,
22
+ } from './PagingMetadata';
23
+ import type { SecurityCompanyResource } from './SecurityCompanyResource';
24
+ import {
25
+ SecurityCompanyResourceFromJSON,
26
+ SecurityCompanyResourceFromJSONTyped,
27
+ SecurityCompanyResourceToJSON,
28
+ SecurityCompanyResourceToJSONTyped,
29
+ } from './SecurityCompanyResource';
30
+
31
+ /**
32
+ *
33
+ * @export
34
+ * @interface PaginatedSecurityCompanyResourceResponse
35
+ */
36
+ export interface PaginatedSecurityCompanyResourceResponse {
37
+ /**
38
+ *
39
+ * @type {Array<SecurityCompanyResource>}
40
+ * @memberof PaginatedSecurityCompanyResourceResponse
41
+ */
42
+ data: Array<SecurityCompanyResource>;
43
+ /**
44
+ *
45
+ * @type {PagingMetadata}
46
+ * @memberof PaginatedSecurityCompanyResourceResponse
47
+ */
48
+ meta: PagingMetadata;
49
+ }
50
+
51
+ /**
52
+ * Check if a given object implements the PaginatedSecurityCompanyResourceResponse interface.
53
+ */
54
+ export function instanceOfPaginatedSecurityCompanyResourceResponse(value: object): value is PaginatedSecurityCompanyResourceResponse {
55
+ if (!('data' in value) || value['data'] === undefined) return false;
56
+ if (!('meta' in value) || value['meta'] === undefined) return false;
57
+ return true;
58
+ }
59
+
60
+ export function PaginatedSecurityCompanyResourceResponseFromJSON(json: any): PaginatedSecurityCompanyResourceResponse {
61
+ return PaginatedSecurityCompanyResourceResponseFromJSONTyped(json, false);
62
+ }
63
+
64
+ export function PaginatedSecurityCompanyResourceResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedSecurityCompanyResourceResponse {
65
+ if (json == null) {
66
+ return json;
67
+ }
68
+ return {
69
+
70
+ 'data': ((json['data'] as Array<any>).map(SecurityCompanyResourceFromJSON)),
71
+ 'meta': PagingMetadataFromJSON(json['meta']),
72
+ };
73
+ }
74
+
75
+ export function PaginatedSecurityCompanyResourceResponseToJSON(json: any): PaginatedSecurityCompanyResourceResponse {
76
+ return PaginatedSecurityCompanyResourceResponseToJSONTyped(json, false);
77
+ }
78
+
79
+ export function PaginatedSecurityCompanyResourceResponseToJSONTyped(value?: PaginatedSecurityCompanyResourceResponse | null, ignoreDiscriminator: boolean = false): any {
80
+ if (value == null) {
81
+ return value;
82
+ }
83
+
84
+ return {
85
+
86
+ 'data': ((value['data'] as Array<any>).map(SecurityCompanyResourceToJSON)),
87
+ 'meta': PagingMetadataToJSON(value['meta']),
88
+ };
89
+ }
90
+
@@ -0,0 +1,167 @@
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 SecurityCompaniesStoreRequest
20
+ */
21
+ export interface SecurityCompaniesStoreRequest {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof SecurityCompaniesStoreRequest
26
+ */
27
+ name: string;
28
+ /**
29
+ *
30
+ * @type {boolean}
31
+ * @memberof SecurityCompaniesStoreRequest
32
+ */
33
+ isEnabled?: boolean;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof SecurityCompaniesStoreRequest
38
+ */
39
+ email: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof SecurityCompaniesStoreRequest
44
+ */
45
+ licenseNumber: string;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof SecurityCompaniesStoreRequest
50
+ */
51
+ addressLine1: string;
52
+ /**
53
+ *
54
+ * @type {string}
55
+ * @memberof SecurityCompaniesStoreRequest
56
+ */
57
+ addressLine2?: string;
58
+ /**
59
+ *
60
+ * @type {string}
61
+ * @memberof SecurityCompaniesStoreRequest
62
+ */
63
+ suburb?: string;
64
+ /**
65
+ *
66
+ * @type {string}
67
+ * @memberof SecurityCompaniesStoreRequest
68
+ */
69
+ city?: string;
70
+ /**
71
+ *
72
+ * @type {string}
73
+ * @memberof SecurityCompaniesStoreRequest
74
+ */
75
+ state: SecurityCompaniesStoreRequestStateEnum;
76
+ /**
77
+ *
78
+ * @type {string}
79
+ * @memberof SecurityCompaniesStoreRequest
80
+ */
81
+ postCode?: string;
82
+ /**
83
+ *
84
+ * @type {string}
85
+ * @memberof SecurityCompaniesStoreRequest
86
+ */
87
+ country?: string;
88
+ }
89
+
90
+
91
+ /**
92
+ * @export
93
+ */
94
+ export const SecurityCompaniesStoreRequestStateEnum = {
95
+ Qld: 'QLD',
96
+ Nsw: 'NSW',
97
+ Act: 'ACT',
98
+ Vic: 'VIC',
99
+ Tas: 'TAS',
100
+ Sa: 'SA',
101
+ Wa: 'WA',
102
+ Nt: 'NT'
103
+ } as const;
104
+ export type SecurityCompaniesStoreRequestStateEnum = typeof SecurityCompaniesStoreRequestStateEnum[keyof typeof SecurityCompaniesStoreRequestStateEnum];
105
+
106
+
107
+ /**
108
+ * Check if a given object implements the SecurityCompaniesStoreRequest interface.
109
+ */
110
+ export function instanceOfSecurityCompaniesStoreRequest(value: object): value is SecurityCompaniesStoreRequest {
111
+ if (!('name' in value) || value['name'] === undefined) return false;
112
+ if (!('email' in value) || value['email'] === undefined) return false;
113
+ if (!('licenseNumber' in value) || value['licenseNumber'] === undefined) return false;
114
+ if (!('addressLine1' in value) || value['addressLine1'] === undefined) return false;
115
+ if (!('state' in value) || value['state'] === undefined) return false;
116
+ return true;
117
+ }
118
+
119
+ export function SecurityCompaniesStoreRequestFromJSON(json: any): SecurityCompaniesStoreRequest {
120
+ return SecurityCompaniesStoreRequestFromJSONTyped(json, false);
121
+ }
122
+
123
+ export function SecurityCompaniesStoreRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecurityCompaniesStoreRequest {
124
+ if (json == null) {
125
+ return json;
126
+ }
127
+ return {
128
+
129
+ 'name': json['name'],
130
+ 'isEnabled': json['is_enabled'] == null ? undefined : json['is_enabled'],
131
+ 'email': json['email'],
132
+ 'licenseNumber': json['license_number'],
133
+ 'addressLine1': json['address_line_1'],
134
+ 'addressLine2': json['address_line_2'] == null ? undefined : json['address_line_2'],
135
+ 'suburb': json['suburb'] == null ? undefined : json['suburb'],
136
+ 'city': json['city'] == null ? undefined : json['city'],
137
+ 'state': json['state'],
138
+ 'postCode': json['post_code'] == null ? undefined : json['post_code'],
139
+ 'country': json['country'] == null ? undefined : json['country'],
140
+ };
141
+ }
142
+
143
+ export function SecurityCompaniesStoreRequestToJSON(json: any): SecurityCompaniesStoreRequest {
144
+ return SecurityCompaniesStoreRequestToJSONTyped(json, false);
145
+ }
146
+
147
+ export function SecurityCompaniesStoreRequestToJSONTyped(value?: SecurityCompaniesStoreRequest | null, ignoreDiscriminator: boolean = false): any {
148
+ if (value == null) {
149
+ return value;
150
+ }
151
+
152
+ return {
153
+
154
+ 'name': value['name'],
155
+ 'is_enabled': value['isEnabled'],
156
+ 'email': value['email'],
157
+ 'license_number': value['licenseNumber'],
158
+ 'address_line_1': value['addressLine1'],
159
+ 'address_line_2': value['addressLine2'],
160
+ 'suburb': value['suburb'],
161
+ 'city': value['city'],
162
+ 'state': value['state'],
163
+ 'post_code': value['postCode'],
164
+ 'country': value['country'],
165
+ };
166
+ }
167
+
@@ -0,0 +1,134 @@
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
+ import type { AddressResource } from './AddressResource';
17
+ import {
18
+ AddressResourceFromJSON,
19
+ AddressResourceFromJSONTyped,
20
+ AddressResourceToJSON,
21
+ AddressResourceToJSONTyped,
22
+ } from './AddressResource';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface SecurityCompanyResource
28
+ */
29
+ export interface SecurityCompanyResource {
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof SecurityCompanyResource
34
+ */
35
+ id?: number | null;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof SecurityCompanyResource
40
+ */
41
+ name: string;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof SecurityCompanyResource
46
+ */
47
+ email: string;
48
+ /**
49
+ *
50
+ * @type {boolean}
51
+ * @memberof SecurityCompanyResource
52
+ */
53
+ isEnabled: boolean;
54
+ /**
55
+ *
56
+ * @type {AddressResource}
57
+ * @memberof SecurityCompanyResource
58
+ */
59
+ address: AddressResource | null;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof SecurityCompanyResource
64
+ */
65
+ licenseNumber: string;
66
+ /**
67
+ *
68
+ * @type {Date}
69
+ * @memberof SecurityCompanyResource
70
+ */
71
+ createdAt?: Date | null;
72
+ /**
73
+ *
74
+ * @type {Date}
75
+ * @memberof SecurityCompanyResource
76
+ */
77
+ updatedAt?: Date | null;
78
+ }
79
+
80
+ /**
81
+ * Check if a given object implements the SecurityCompanyResource interface.
82
+ */
83
+ export function instanceOfSecurityCompanyResource(value: object): value is SecurityCompanyResource {
84
+ if (!('name' in value) || value['name'] === undefined) return false;
85
+ if (!('email' in value) || value['email'] === undefined) return false;
86
+ if (!('isEnabled' in value) || value['isEnabled'] === undefined) return false;
87
+ if (!('address' in value) || value['address'] === undefined) return false;
88
+ if (!('licenseNumber' in value) || value['licenseNumber'] === undefined) return false;
89
+ return true;
90
+ }
91
+
92
+ export function SecurityCompanyResourceFromJSON(json: any): SecurityCompanyResource {
93
+ return SecurityCompanyResourceFromJSONTyped(json, false);
94
+ }
95
+
96
+ export function SecurityCompanyResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SecurityCompanyResource {
97
+ if (json == null) {
98
+ return json;
99
+ }
100
+ return {
101
+
102
+ 'id': json['id'] == null ? undefined : json['id'],
103
+ 'name': json['name'],
104
+ 'email': json['email'],
105
+ 'isEnabled': json['isEnabled'],
106
+ 'address': AddressResourceFromJSON(json['address']),
107
+ 'licenseNumber': json['license_number'],
108
+ 'createdAt': json['createdAt'] == null ? undefined : (new Date(json['createdAt'])),
109
+ 'updatedAt': json['updatedAt'] == null ? undefined : (new Date(json['updatedAt'])),
110
+ };
111
+ }
112
+
113
+ export function SecurityCompanyResourceToJSON(json: any): SecurityCompanyResource {
114
+ return SecurityCompanyResourceToJSONTyped(json, false);
115
+ }
116
+
117
+ export function SecurityCompanyResourceToJSONTyped(value?: SecurityCompanyResource | null, ignoreDiscriminator: boolean = false): any {
118
+ if (value == null) {
119
+ return value;
120
+ }
121
+
122
+ return {
123
+
124
+ 'id': value['id'],
125
+ 'name': value['name'],
126
+ 'email': value['email'],
127
+ 'isEnabled': value['isEnabled'],
128
+ 'address': AddressResourceToJSON(value['address']),
129
+ 'license_number': value['licenseNumber'],
130
+ 'createdAt': value['createdAt'] === null ? null : ((value['createdAt'] as any)?.toISOString()),
131
+ 'updatedAt': value['updatedAt'] === null ? null : ((value['updatedAt'] as any)?.toISOString()),
132
+ };
133
+ }
134
+