@digital8/laravel-auth-template-ts-sdk 0.0.26 → 0.0.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/apis/GeneralApi.d.ts +8 -0
- package/dist/apis/GeneralApi.js +42 -0
- package/dist/models/AssetResource.d.ts +1 -1
- package/dist/models/AssetResource.js +1 -3
- package/dist/models/UpdateUserRequest.d.ts +0 -36
- package/dist/models/UpdateUserRequest.js +0 -22
- package/package.json +1 -1
- package/src/apis/GeneralApi.ts +29 -0
- package/src/models/AssetResource.ts +2 -3
- package/src/models/UpdateUserRequest.ts +0 -48
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @digital8/laravel-auth-template-ts-sdk@0.0.
|
|
1
|
+
## @digital8/laravel-auth-template-ts-sdk@0.0.28
|
|
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/laravel-auth-template-ts-sdk@0.0.
|
|
39
|
+
npm install @digital8/laravel-auth-template-ts-sdk@0.0.28 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -48,6 +48,14 @@ export declare class GeneralApi extends runtime.BaseAPI {
|
|
|
48
48
|
* Auto-generated: destroyUser
|
|
49
49
|
*/
|
|
50
50
|
destroyUser(requestParameters: DestroyUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GenericResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* Auto-generated: fetchProfileAuth
|
|
53
|
+
*/
|
|
54
|
+
fetchProfileAuthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResource>>;
|
|
55
|
+
/**
|
|
56
|
+
* Auto-generated: fetchProfileAuth
|
|
57
|
+
*/
|
|
58
|
+
fetchProfileAuth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResource>;
|
|
51
59
|
/**
|
|
52
60
|
* Auto-generated: indexUser
|
|
53
61
|
*/
|
package/dist/apis/GeneralApi.js
CHANGED
|
@@ -121,6 +121,48 @@ var GeneralApi = /** @class */ (function (_super) {
|
|
|
121
121
|
});
|
|
122
122
|
});
|
|
123
123
|
};
|
|
124
|
+
/**
|
|
125
|
+
* Auto-generated: fetchProfileAuth
|
|
126
|
+
*/
|
|
127
|
+
GeneralApi.prototype.fetchProfileAuthRaw = function (initOverrides) {
|
|
128
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
129
|
+
var queryParameters, headerParameters, urlPath, response;
|
|
130
|
+
return __generator(this, function (_a) {
|
|
131
|
+
switch (_a.label) {
|
|
132
|
+
case 0:
|
|
133
|
+
queryParameters = {};
|
|
134
|
+
headerParameters = {};
|
|
135
|
+
urlPath = "/api/auth/profile";
|
|
136
|
+
return [4 /*yield*/, this.request({
|
|
137
|
+
path: urlPath,
|
|
138
|
+
method: 'POST',
|
|
139
|
+
headers: headerParameters,
|
|
140
|
+
query: queryParameters,
|
|
141
|
+
}, initOverrides)];
|
|
142
|
+
case 1:
|
|
143
|
+
response = _a.sent();
|
|
144
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.UserResourceFromJSON)(jsonValue); })];
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Auto-generated: fetchProfileAuth
|
|
151
|
+
*/
|
|
152
|
+
GeneralApi.prototype.fetchProfileAuth = function (initOverrides) {
|
|
153
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
154
|
+
var response;
|
|
155
|
+
return __generator(this, function (_a) {
|
|
156
|
+
switch (_a.label) {
|
|
157
|
+
case 0: return [4 /*yield*/, this.fetchProfileAuthRaw(initOverrides)];
|
|
158
|
+
case 1:
|
|
159
|
+
response = _a.sent();
|
|
160
|
+
return [4 /*yield*/, response.value()];
|
|
161
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
};
|
|
124
166
|
/**
|
|
125
167
|
* Auto-generated: indexUser
|
|
126
168
|
*/
|
|
@@ -30,8 +30,6 @@ 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;
|
|
35
33
|
if (!('index' in value) || value['index'] === undefined)
|
|
36
34
|
return false;
|
|
37
35
|
if (!('fileId' in value) || value['fileId'] === undefined)
|
|
@@ -50,7 +48,7 @@ function AssetResourceFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
48
|
'filePath': json['filePath'],
|
|
51
49
|
'fileName': json['fileName'],
|
|
52
50
|
'mimeType': json['mimeType'],
|
|
53
|
-
'altText': json['altText'],
|
|
51
|
+
'altText': json['altText'] == null ? undefined : json['altText'],
|
|
54
52
|
'index': json['index'],
|
|
55
53
|
'fileId': json['fileId'],
|
|
56
54
|
};
|
|
@@ -45,43 +45,7 @@ export interface UpdateUserRequest {
|
|
|
45
45
|
* @memberof UpdateUserRequest
|
|
46
46
|
*/
|
|
47
47
|
password?: string;
|
|
48
|
-
/**
|
|
49
|
-
*
|
|
50
|
-
* @type {string}
|
|
51
|
-
* @memberof UpdateUserRequest
|
|
52
|
-
*/
|
|
53
|
-
role?: string;
|
|
54
|
-
/**
|
|
55
|
-
*
|
|
56
|
-
* @type {Array<number>}
|
|
57
|
-
* @memberof UpdateUserRequest
|
|
58
|
-
*/
|
|
59
|
-
teamIds?: Array<number>;
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
* @type {Array<number>}
|
|
63
|
-
* @memberof UpdateUserRequest
|
|
64
|
-
*/
|
|
65
|
-
businessUnitIds?: Array<number>;
|
|
66
|
-
/**
|
|
67
|
-
*
|
|
68
|
-
* @type {string}
|
|
69
|
-
* @memberof UpdateUserRequest
|
|
70
|
-
*/
|
|
71
|
-
type: UpdateUserRequestTypeEnum;
|
|
72
48
|
}
|
|
73
|
-
/**
|
|
74
|
-
* @export
|
|
75
|
-
*/
|
|
76
|
-
export declare const UpdateUserRequestTypeEnum: {
|
|
77
|
-
readonly Owner: "OWNER";
|
|
78
|
-
readonly Admin: "ADMIN";
|
|
79
|
-
readonly Manager: "MANAGER";
|
|
80
|
-
readonly Estimator: "ESTIMATOR";
|
|
81
|
-
readonly Supervisor: "SUPERVISOR";
|
|
82
|
-
readonly Tradesman: "TRADESMAN";
|
|
83
|
-
};
|
|
84
|
-
export type UpdateUserRequestTypeEnum = typeof UpdateUserRequestTypeEnum[keyof typeof UpdateUserRequestTypeEnum];
|
|
85
49
|
/**
|
|
86
50
|
* Check if a given object implements the UpdateUserRequest interface.
|
|
87
51
|
*/
|
|
@@ -13,29 +13,15 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.UpdateUserRequestTypeEnum = void 0;
|
|
17
16
|
exports.instanceOfUpdateUserRequest = instanceOfUpdateUserRequest;
|
|
18
17
|
exports.UpdateUserRequestFromJSON = UpdateUserRequestFromJSON;
|
|
19
18
|
exports.UpdateUserRequestFromJSONTyped = UpdateUserRequestFromJSONTyped;
|
|
20
19
|
exports.UpdateUserRequestToJSON = UpdateUserRequestToJSON;
|
|
21
20
|
exports.UpdateUserRequestToJSONTyped = UpdateUserRequestToJSONTyped;
|
|
22
|
-
/**
|
|
23
|
-
* @export
|
|
24
|
-
*/
|
|
25
|
-
exports.UpdateUserRequestTypeEnum = {
|
|
26
|
-
Owner: 'OWNER',
|
|
27
|
-
Admin: 'ADMIN',
|
|
28
|
-
Manager: 'MANAGER',
|
|
29
|
-
Estimator: 'ESTIMATOR',
|
|
30
|
-
Supervisor: 'SUPERVISOR',
|
|
31
|
-
Tradesman: 'TRADESMAN'
|
|
32
|
-
};
|
|
33
21
|
/**
|
|
34
22
|
* Check if a given object implements the UpdateUserRequest interface.
|
|
35
23
|
*/
|
|
36
24
|
function instanceOfUpdateUserRequest(value) {
|
|
37
|
-
if (!('type' in value) || value['type'] === undefined)
|
|
38
|
-
return false;
|
|
39
25
|
return true;
|
|
40
26
|
}
|
|
41
27
|
function UpdateUserRequestFromJSON(json) {
|
|
@@ -51,10 +37,6 @@ function UpdateUserRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
37
|
'email': json['email'] == null ? undefined : json['email'],
|
|
52
38
|
'mobile': json['mobile'] == null ? undefined : json['mobile'],
|
|
53
39
|
'password': json['password'] == null ? undefined : json['password'],
|
|
54
|
-
'role': json['role'] == null ? undefined : json['role'],
|
|
55
|
-
'teamIds': json['team_ids'] == null ? undefined : json['team_ids'],
|
|
56
|
-
'businessUnitIds': json['business_unit_ids'] == null ? undefined : json['business_unit_ids'],
|
|
57
|
-
'type': json['type'],
|
|
58
40
|
};
|
|
59
41
|
}
|
|
60
42
|
function UpdateUserRequestToJSON(json) {
|
|
@@ -71,9 +53,5 @@ function UpdateUserRequestToJSONTyped(value, ignoreDiscriminator) {
|
|
|
71
53
|
'email': value['email'],
|
|
72
54
|
'mobile': value['mobile'],
|
|
73
55
|
'password': value['password'],
|
|
74
|
-
'role': value['role'],
|
|
75
|
-
'team_ids': value['teamIds'],
|
|
76
|
-
'business_unit_ids': value['businessUnitIds'],
|
|
77
|
-
'type': value['type'],
|
|
78
56
|
};
|
|
79
57
|
}
|
package/package.json
CHANGED
package/src/apis/GeneralApi.ts
CHANGED
|
@@ -130,6 +130,35 @@ export class GeneralApi extends runtime.BaseAPI {
|
|
|
130
130
|
return await response.value();
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
+
/**
|
|
134
|
+
* Auto-generated: fetchProfileAuth
|
|
135
|
+
*/
|
|
136
|
+
async fetchProfileAuthRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResource>> {
|
|
137
|
+
const queryParameters: any = {};
|
|
138
|
+
|
|
139
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
let urlPath = `/api/auth/profile`;
|
|
143
|
+
|
|
144
|
+
const response = await this.request({
|
|
145
|
+
path: urlPath,
|
|
146
|
+
method: 'POST',
|
|
147
|
+
headers: headerParameters,
|
|
148
|
+
query: queryParameters,
|
|
149
|
+
}, initOverrides);
|
|
150
|
+
|
|
151
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserResourceFromJSON(jsonValue));
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Auto-generated: fetchProfileAuth
|
|
156
|
+
*/
|
|
157
|
+
async fetchProfileAuth(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResource> {
|
|
158
|
+
const response = await this.fetchProfileAuthRaw(initOverrides);
|
|
159
|
+
return await response.value();
|
|
160
|
+
}
|
|
161
|
+
|
|
133
162
|
/**
|
|
134
163
|
* Auto-generated: indexUser
|
|
135
164
|
*/
|
|
@@ -48,7 +48,7 @@ export interface AssetResource {
|
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof AssetResource
|
|
50
50
|
*/
|
|
51
|
-
altText
|
|
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
|
};
|
|
@@ -49,52 +49,12 @@ export interface UpdateUserRequest {
|
|
|
49
49
|
* @memberof UpdateUserRequest
|
|
50
50
|
*/
|
|
51
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
52
|
}
|
|
77
53
|
|
|
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
54
|
/**
|
|
94
55
|
* Check if a given object implements the UpdateUserRequest interface.
|
|
95
56
|
*/
|
|
96
57
|
export function instanceOfUpdateUserRequest(value: object): value is UpdateUserRequest {
|
|
97
|
-
if (!('type' in value) || value['type'] === undefined) return false;
|
|
98
58
|
return true;
|
|
99
59
|
}
|
|
100
60
|
|
|
@@ -113,10 +73,6 @@ export function UpdateUserRequestFromJSONTyped(json: any, ignoreDiscriminator: b
|
|
|
113
73
|
'email': json['email'] == null ? undefined : json['email'],
|
|
114
74
|
'mobile': json['mobile'] == null ? undefined : json['mobile'],
|
|
115
75
|
'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
76
|
};
|
|
121
77
|
}
|
|
122
78
|
|
|
@@ -136,10 +92,6 @@ export function UpdateUserRequestToJSONTyped(value?: UpdateUserRequest | null, i
|
|
|
136
92
|
'email': value['email'],
|
|
137
93
|
'mobile': value['mobile'],
|
|
138
94
|
'password': value['password'],
|
|
139
|
-
'role': value['role'],
|
|
140
|
-
'team_ids': value['teamIds'],
|
|
141
|
-
'business_unit_ids': value['businessUnitIds'],
|
|
142
|
-
'type': value['type'],
|
|
143
95
|
};
|
|
144
96
|
}
|
|
145
97
|
|