@digital8/laravel-auth-template-ts-sdk 0.0.1
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/.openapi-generator/FILES +22 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +46 -0
- package/dist/apis/DefaultApi.d.ts +104 -0
- package/dist/apis/DefaultApi.js +441 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +19 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/GenericResponse.d.ts +32 -0
- package/dist/models/GenericResponse.js +49 -0
- package/dist/models/IndexUserRequest.d.ts +68 -0
- package/dist/models/IndexUserRequest.js +72 -0
- package/dist/models/LoginAuthRequest.d.ts +38 -0
- package/dist/models/LoginAuthRequest.js +55 -0
- package/dist/models/PaginatedUserResourceResponse.d.ts +40 -0
- package/dist/models/PaginatedUserResourceResponse.js +57 -0
- package/dist/models/PagingMetadata.d.ts +68 -0
- package/dist/models/PagingMetadata.js +75 -0
- package/dist/models/ResetPasswordAuthRequest.d.ts +44 -0
- package/dist/models/ResetPasswordAuthRequest.js +59 -0
- package/dist/models/SendForgotPasswordLinkAuthRequest.d.ts +32 -0
- package/dist/models/SendForgotPasswordLinkAuthRequest.js +51 -0
- package/dist/models/StoreUserRequest.d.ts +50 -0
- package/dist/models/StoreUserRequest.js +63 -0
- package/dist/models/UpdateUserRequest.d.ts +92 -0
- package/dist/models/UpdateUserRequest.js +79 -0
- package/dist/models/UserAuthTokenResource.d.ts +39 -0
- package/dist/models/UserAuthTokenResource.js +56 -0
- package/dist/models/UserResource.d.ts +74 -0
- package/dist/models/UserResource.js +76 -0
- package/dist/models/index.d.ts +11 -0
- package/dist/models/index.js +29 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +564 -0
- package/package.json +19 -0
- package/src/apis/DefaultApi.ts +352 -0
- package/src/apis/index.ts +3 -0
- package/src/index.ts +5 -0
- package/src/models/GenericResponse.ts +65 -0
- package/src/models/IndexUserRequest.ts +111 -0
- package/src/models/LoginAuthRequest.ts +75 -0
- package/src/models/PaginatedUserResourceResponse.ts +90 -0
- package/src/models/PagingMetadata.ts +120 -0
- package/src/models/ResetPasswordAuthRequest.ts +84 -0
- package/src/models/SendForgotPasswordLinkAuthRequest.ts +66 -0
- package/src/models/StoreUserRequest.ts +93 -0
- package/src/models/UpdateUserRequest.ts +145 -0
- package/src/models/UserAuthTokenResource.ts +83 -0
- package/src/models/UserResource.ts +127 -0
- package/src/models/index.ts +13 -0
- package/src/runtime.ts +432 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,120 @@
|
|
|
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 PagingMetadata
|
|
20
|
+
*/
|
|
21
|
+
export interface PagingMetadata {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof PagingMetadata
|
|
26
|
+
*/
|
|
27
|
+
currentPage: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof PagingMetadata
|
|
32
|
+
*/
|
|
33
|
+
from: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof PagingMetadata
|
|
38
|
+
*/
|
|
39
|
+
lastPage: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof PagingMetadata
|
|
44
|
+
*/
|
|
45
|
+
path: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {number}
|
|
49
|
+
* @memberof PagingMetadata
|
|
50
|
+
*/
|
|
51
|
+
perPage: number;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {number}
|
|
55
|
+
* @memberof PagingMetadata
|
|
56
|
+
*/
|
|
57
|
+
to: number;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof PagingMetadata
|
|
62
|
+
*/
|
|
63
|
+
total: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Check if a given object implements the PagingMetadata interface.
|
|
68
|
+
*/
|
|
69
|
+
export function instanceOfPagingMetadata(value: object): value is PagingMetadata {
|
|
70
|
+
if (!('currentPage' in value) || value['currentPage'] === undefined) return false;
|
|
71
|
+
if (!('from' in value) || value['from'] === undefined) return false;
|
|
72
|
+
if (!('lastPage' in value) || value['lastPage'] === undefined) return false;
|
|
73
|
+
if (!('path' in value) || value['path'] === undefined) return false;
|
|
74
|
+
if (!('perPage' in value) || value['perPage'] === undefined) return false;
|
|
75
|
+
if (!('to' in value) || value['to'] === undefined) return false;
|
|
76
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function PagingMetadataFromJSON(json: any): PagingMetadata {
|
|
81
|
+
return PagingMetadataFromJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function PagingMetadataFromJSONTyped(json: any, ignoreDiscriminator: boolean): PagingMetadata {
|
|
85
|
+
if (json == null) {
|
|
86
|
+
return json;
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
|
|
90
|
+
'currentPage': json['current_page'],
|
|
91
|
+
'from': json['from'],
|
|
92
|
+
'lastPage': json['last_page'],
|
|
93
|
+
'path': json['path'],
|
|
94
|
+
'perPage': json['per_page'],
|
|
95
|
+
'to': json['to'],
|
|
96
|
+
'total': json['total'],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function PagingMetadataToJSON(json: any): PagingMetadata {
|
|
101
|
+
return PagingMetadataToJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function PagingMetadataToJSONTyped(value?: PagingMetadata | null, ignoreDiscriminator: boolean = false): any {
|
|
105
|
+
if (value == null) {
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'current_page': value['currentPage'],
|
|
112
|
+
'from': value['from'],
|
|
113
|
+
'last_page': value['lastPage'],
|
|
114
|
+
'path': value['path'],
|
|
115
|
+
'per_page': value['perPage'],
|
|
116
|
+
'to': value['to'],
|
|
117
|
+
'total': value['total'],
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
|
|
@@ -0,0 +1,84 @@
|
|
|
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 ResetPasswordAuthRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface ResetPasswordAuthRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof ResetPasswordAuthRequest
|
|
26
|
+
*/
|
|
27
|
+
email: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ResetPasswordAuthRequest
|
|
32
|
+
*/
|
|
33
|
+
password: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ResetPasswordAuthRequest
|
|
38
|
+
*/
|
|
39
|
+
token: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the ResetPasswordAuthRequest interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfResetPasswordAuthRequest(value: object): value is ResetPasswordAuthRequest {
|
|
46
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
47
|
+
if (!('password' in value) || value['password'] === undefined) return false;
|
|
48
|
+
if (!('token' in value) || value['token'] === undefined) return false;
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function ResetPasswordAuthRequestFromJSON(json: any): ResetPasswordAuthRequest {
|
|
53
|
+
return ResetPasswordAuthRequestFromJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function ResetPasswordAuthRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): ResetPasswordAuthRequest {
|
|
57
|
+
if (json == null) {
|
|
58
|
+
return json;
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
|
|
62
|
+
'email': json['email'],
|
|
63
|
+
'password': json['password'],
|
|
64
|
+
'token': json['token'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function ResetPasswordAuthRequestToJSON(json: any): ResetPasswordAuthRequest {
|
|
69
|
+
return ResetPasswordAuthRequestToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function ResetPasswordAuthRequestToJSONTyped(value?: ResetPasswordAuthRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'email': value['email'],
|
|
80
|
+
'password': value['password'],
|
|
81
|
+
'token': value['token'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
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 SendForgotPasswordLinkAuthRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface SendForgotPasswordLinkAuthRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SendForgotPasswordLinkAuthRequest
|
|
26
|
+
*/
|
|
27
|
+
email: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the SendForgotPasswordLinkAuthRequest interface.
|
|
32
|
+
*/
|
|
33
|
+
export function instanceOfSendForgotPasswordLinkAuthRequest(value: object): value is SendForgotPasswordLinkAuthRequest {
|
|
34
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function SendForgotPasswordLinkAuthRequestFromJSON(json: any): SendForgotPasswordLinkAuthRequest {
|
|
39
|
+
return SendForgotPasswordLinkAuthRequestFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function SendForgotPasswordLinkAuthRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SendForgotPasswordLinkAuthRequest {
|
|
43
|
+
if (json == null) {
|
|
44
|
+
return json;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
|
|
48
|
+
'email': json['email'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function SendForgotPasswordLinkAuthRequestToJSON(json: any): SendForgotPasswordLinkAuthRequest {
|
|
53
|
+
return SendForgotPasswordLinkAuthRequestToJSONTyped(json, false);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function SendForgotPasswordLinkAuthRequestToJSONTyped(value?: SendForgotPasswordLinkAuthRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
57
|
+
if (value == null) {
|
|
58
|
+
return value;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'email': value['email'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
@@ -0,0 +1,93 @@
|
|
|
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 StoreUserRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface StoreUserRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof StoreUserRequest
|
|
26
|
+
*/
|
|
27
|
+
firstName: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof StoreUserRequest
|
|
32
|
+
*/
|
|
33
|
+
lastName: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof StoreUserRequest
|
|
38
|
+
*/
|
|
39
|
+
email: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof StoreUserRequest
|
|
44
|
+
*/
|
|
45
|
+
mobile: number;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the StoreUserRequest interface.
|
|
50
|
+
*/
|
|
51
|
+
export function instanceOfStoreUserRequest(value: object): value is StoreUserRequest {
|
|
52
|
+
if (!('firstName' in value) || value['firstName'] === undefined) return false;
|
|
53
|
+
if (!('lastName' in value) || value['lastName'] === undefined) return false;
|
|
54
|
+
if (!('email' in value) || value['email'] === undefined) return false;
|
|
55
|
+
if (!('mobile' in value) || value['mobile'] === undefined) return false;
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function StoreUserRequestFromJSON(json: any): StoreUserRequest {
|
|
60
|
+
return StoreUserRequestFromJSONTyped(json, false);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function StoreUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): StoreUserRequest {
|
|
64
|
+
if (json == null) {
|
|
65
|
+
return json;
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'firstName': json['first_name'],
|
|
70
|
+
'lastName': json['last_name'],
|
|
71
|
+
'email': json['email'],
|
|
72
|
+
'mobile': json['mobile'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function StoreUserRequestToJSON(json: any): StoreUserRequest {
|
|
77
|
+
return StoreUserRequestToJSONTyped(json, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function StoreUserRequestToJSONTyped(value?: StoreUserRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
81
|
+
if (value == null) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return {
|
|
86
|
+
|
|
87
|
+
'first_name': value['firstName'],
|
|
88
|
+
'last_name': value['lastName'],
|
|
89
|
+
'email': value['email'],
|
|
90
|
+
'mobile': value['mobile'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
@@ -0,0 +1,145 @@
|
|
|
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 UpdateUserRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface UpdateUserRequest {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof UpdateUserRequest
|
|
26
|
+
*/
|
|
27
|
+
firstName?: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof UpdateUserRequest
|
|
32
|
+
*/
|
|
33
|
+
lastName?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof UpdateUserRequest
|
|
38
|
+
*/
|
|
39
|
+
email?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof UpdateUserRequest
|
|
44
|
+
*/
|
|
45
|
+
mobile?: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof UpdateUserRequest
|
|
50
|
+
*/
|
|
51
|
+
password?: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof UpdateUserRequest
|
|
56
|
+
*/
|
|
57
|
+
role?: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Array<number>}
|
|
61
|
+
* @memberof UpdateUserRequest
|
|
62
|
+
*/
|
|
63
|
+
teamIds?: Array<number>;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {Array<number>}
|
|
67
|
+
* @memberof UpdateUserRequest
|
|
68
|
+
*/
|
|
69
|
+
businessUnitIds?: Array<number>;
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof UpdateUserRequest
|
|
74
|
+
*/
|
|
75
|
+
type: UpdateUserRequestTypeEnum;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* @export
|
|
81
|
+
*/
|
|
82
|
+
export const UpdateUserRequestTypeEnum = {
|
|
83
|
+
Owner: 'owner',
|
|
84
|
+
Admin: 'admin',
|
|
85
|
+
Manager: 'manager',
|
|
86
|
+
Estimator: 'estimator',
|
|
87
|
+
Supervisor: 'supervisor',
|
|
88
|
+
Tradesman: 'tradesman'
|
|
89
|
+
} as const;
|
|
90
|
+
export type UpdateUserRequestTypeEnum = typeof UpdateUserRequestTypeEnum[keyof typeof UpdateUserRequestTypeEnum];
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Check if a given object implements the UpdateUserRequest interface.
|
|
95
|
+
*/
|
|
96
|
+
export function instanceOfUpdateUserRequest(value: object): value is UpdateUserRequest {
|
|
97
|
+
if (!('type' in value) || value['type'] === undefined) return false;
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function UpdateUserRequestFromJSON(json: any): UpdateUserRequest {
|
|
102
|
+
return UpdateUserRequestFromJSONTyped(json, false);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function UpdateUserRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateUserRequest {
|
|
106
|
+
if (json == null) {
|
|
107
|
+
return json;
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'firstName': json['first_name'] == null ? undefined : json['first_name'],
|
|
112
|
+
'lastName': json['last_name'] == null ? undefined : json['last_name'],
|
|
113
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
114
|
+
'mobile': json['mobile'] == null ? undefined : json['mobile'],
|
|
115
|
+
'password': json['password'] == null ? undefined : json['password'],
|
|
116
|
+
'role': json['role'] == null ? undefined : json['role'],
|
|
117
|
+
'teamIds': json['team_ids'] == null ? undefined : json['team_ids'],
|
|
118
|
+
'businessUnitIds': json['business_unit_ids'] == null ? undefined : json['business_unit_ids'],
|
|
119
|
+
'type': json['type'],
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function UpdateUserRequestToJSON(json: any): UpdateUserRequest {
|
|
124
|
+
return UpdateUserRequestToJSONTyped(json, false);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function UpdateUserRequestToJSONTyped(value?: UpdateUserRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
128
|
+
if (value == null) {
|
|
129
|
+
return value;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
|
|
134
|
+
'first_name': value['firstName'],
|
|
135
|
+
'last_name': value['lastName'],
|
|
136
|
+
'email': value['email'],
|
|
137
|
+
'mobile': value['mobile'],
|
|
138
|
+
'password': value['password'],
|
|
139
|
+
'role': value['role'],
|
|
140
|
+
'team_ids': value['teamIds'],
|
|
141
|
+
'business_unit_ids': value['businessUnitIds'],
|
|
142
|
+
'type': value['type'],
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
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 { UserResource } from './UserResource';
|
|
17
|
+
import {
|
|
18
|
+
UserResourceFromJSON,
|
|
19
|
+
UserResourceFromJSONTyped,
|
|
20
|
+
UserResourceToJSON,
|
|
21
|
+
UserResourceToJSONTyped,
|
|
22
|
+
} from './UserResource';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface UserAuthTokenResource
|
|
28
|
+
*/
|
|
29
|
+
export interface UserAuthTokenResource {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {UserResource}
|
|
33
|
+
* @memberof UserAuthTokenResource
|
|
34
|
+
*/
|
|
35
|
+
user: UserResource | null;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof UserAuthTokenResource
|
|
40
|
+
*/
|
|
41
|
+
token: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the UserAuthTokenResource interface.
|
|
46
|
+
*/
|
|
47
|
+
export function instanceOfUserAuthTokenResource(value: object): value is UserAuthTokenResource {
|
|
48
|
+
if (!('user' in value) || value['user'] === undefined) return false;
|
|
49
|
+
if (!('token' in value) || value['token'] === undefined) return false;
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function UserAuthTokenResourceFromJSON(json: any): UserAuthTokenResource {
|
|
54
|
+
return UserAuthTokenResourceFromJSONTyped(json, false);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function UserAuthTokenResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserAuthTokenResource {
|
|
58
|
+
if (json == null) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
|
|
63
|
+
'user': UserResourceFromJSON(json['user']),
|
|
64
|
+
'token': json['token'],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function UserAuthTokenResourceToJSON(json: any): UserAuthTokenResource {
|
|
69
|
+
return UserAuthTokenResourceToJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function UserAuthTokenResourceToJSONTyped(value?: UserAuthTokenResource | null, ignoreDiscriminator: boolean = false): any {
|
|
73
|
+
if (value == null) {
|
|
74
|
+
return value;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'user': UserResourceToJSON(value['user']),
|
|
80
|
+
'token': value['token'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|