@devlearning/swagger-generator 1.0.11 → 1.0.12
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.
|
@@ -22,7 +22,7 @@ export abstract class ApiAutogeneratedService {
|
|
|
22
22
|
protected abstract _handleError(error: any, obs: any): Observable<never>;
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
public
|
|
25
|
+
public catalogProductRead(idProduct?: number): Observable<Models.Product> {
|
|
26
26
|
let idProductParam: string = idProduct != null && idProduct != undefined ? encodeURIComponent('' + idProduct) : '';
|
|
27
27
|
return this._http.get<Models.Product>(`${this._baseUrl}/catalog/Product/Read?idProduct=${idProductParam}`, httpOptions)
|
|
28
28
|
.pipe(
|
|
@@ -31,7 +31,7 @@ export abstract class ApiAutogeneratedService {
|
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
public
|
|
34
|
+
public catalogProductList(): Observable<Models.Product[]> {
|
|
35
35
|
return this._http.get<Models.Product[]>(`${this._baseUrl}/catalog/Product/List`, httpOptions)
|
|
36
36
|
.pipe(
|
|
37
37
|
map(x => this._handleResponse(x)),
|
|
@@ -39,52 +39,52 @@ export abstract class ApiAutogeneratedService {
|
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
public
|
|
42
|
+
public identityToken(request: Models.AuthTokenCommand): Observable<Models.AuthenticationToken> {
|
|
43
43
|
let wrappedRequest = this._handleRequest(request);
|
|
44
|
-
return this._http.post<Models.AuthenticationToken>(`${this._baseUrl}/
|
|
44
|
+
return this._http.post<Models.AuthenticationToken>(`${this._baseUrl}/identity/token`, wrappedRequest, httpOptions)
|
|
45
45
|
.pipe(
|
|
46
46
|
map(x => this._handleResponse(x)),
|
|
47
47
|
catchError((err, obs) => this._handleError(err, <Observable<any>>obs))
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
public
|
|
51
|
+
public identityRefreshToken(request: Models.AuthRefreshTokenCommand): Observable<Models.AuthenticationToken> {
|
|
52
52
|
let wrappedRequest = this._handleRequest(request);
|
|
53
|
-
return this._http.post<Models.AuthenticationToken>(`${this._baseUrl}/
|
|
53
|
+
return this._http.post<Models.AuthenticationToken>(`${this._baseUrl}/identity/refreshToken`, wrappedRequest, httpOptions)
|
|
54
54
|
.pipe(
|
|
55
55
|
map(x => this._handleResponse(x)),
|
|
56
56
|
catchError((err, obs) => this._handleError(err, <Observable<any>>obs))
|
|
57
57
|
);
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
public
|
|
60
|
+
public identityGenerateResetPasswordCode(request: Models.AuthGenerateResetPasswordCodeCommand): Observable<Models.Result> {
|
|
61
61
|
let wrappedRequest = this._handleRequest(request);
|
|
62
|
-
return this._http.post<Models.Result>(`${this._baseUrl}/
|
|
62
|
+
return this._http.post<Models.Result>(`${this._baseUrl}/identity/generateResetPasswordCode`, wrappedRequest, httpOptions)
|
|
63
63
|
.pipe(
|
|
64
64
|
map(x => this._handleResponse(x)),
|
|
65
65
|
catchError((err, obs) => this._handleError(err, <Observable<any>>obs))
|
|
66
66
|
);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
public
|
|
69
|
+
public identityResetPassword(request: Models.AuthResetPasswordCommand): Observable<Models.Result> {
|
|
70
70
|
let wrappedRequest = this._handleRequest(request);
|
|
71
|
-
return this._http.post<Models.Result>(`${this._baseUrl}/
|
|
71
|
+
return this._http.post<Models.Result>(`${this._baseUrl}/identity/resetPassword`, wrappedRequest, httpOptions)
|
|
72
72
|
.pipe(
|
|
73
73
|
map(x => this._handleResponse(x)),
|
|
74
74
|
catchError((err, obs) => this._handleError(err, <Observable<any>>obs))
|
|
75
75
|
);
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
-
public
|
|
78
|
+
public identityVerifyResetPasswordCode(request: Models.AuthVerifyResetPasswordCodeCommand): Observable<Models.Result> {
|
|
79
79
|
let wrappedRequest = this._handleRequest(request);
|
|
80
|
-
return this._http.post<Models.Result>(`${this._baseUrl}/
|
|
80
|
+
return this._http.post<Models.Result>(`${this._baseUrl}/identity/verifyResetPasswordCode`, wrappedRequest, httpOptions)
|
|
81
81
|
.pipe(
|
|
82
82
|
map(x => this._handleResponse(x)),
|
|
83
83
|
catchError((err, obs) => this._handleError(err, <Observable<any>>obs))
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
public
|
|
87
|
+
public tenantTenant(): Observable<string> {
|
|
88
88
|
return this._http.get<string>(`${this._baseUrl}/tenant/Tenant`, httpOptions)
|
|
89
89
|
.pipe(
|
|
90
90
|
map(x => this._handleResponse(x)),
|
|
@@ -38,10 +38,10 @@ export class AuthVerifyResetPasswordCodeCommand {
|
|
|
38
38
|
|
|
39
39
|
export class AuthenticationToken {
|
|
40
40
|
idAuthUser: string;
|
|
41
|
-
username
|
|
42
|
-
accessToken
|
|
41
|
+
username: string;
|
|
42
|
+
accessToken: string;
|
|
43
43
|
expiresIn: number;
|
|
44
|
-
refreshToken
|
|
44
|
+
refreshToken: string;
|
|
45
45
|
refreshTokenExpiresIn: number;
|
|
46
46
|
}
|
|
47
47
|
|
|
@@ -4,7 +4,10 @@ export class Utils {
|
|
|
4
4
|
if (normalizedApiName.charAt(0) == '_') {
|
|
5
5
|
normalizedApiName = normalizedApiName.slice(1);
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
normalizedApiName = this.toCamelCase(normalizedApiName);
|
|
8
|
+
normalizedApiName = this.toFirstLetterLowercase(normalizedApiName);
|
|
9
|
+
normalizedApiName = normalizedApiName.replaceAll('_', '');
|
|
10
|
+
return normalizedApiName;
|
|
8
11
|
}
|
|
9
12
|
static toFirstLetterLowercase(value) {
|
|
10
13
|
return value.charAt(0).toLowerCase() + value.slice(1);
|
package/package.json
CHANGED
|
@@ -8,7 +8,14 @@ export class Utils {
|
|
|
8
8
|
if (normalizedApiName.charAt(0) == '_') {
|
|
9
9
|
normalizedApiName = normalizedApiName.slice(1);
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
normalizedApiName = this.toCamelCase(normalizedApiName);
|
|
13
|
+
|
|
14
|
+
normalizedApiName = this.toFirstLetterLowercase(normalizedApiName);
|
|
15
|
+
|
|
16
|
+
normalizedApiName = normalizedApiName.replaceAll('_', '');
|
|
17
|
+
|
|
18
|
+
return normalizedApiName;
|
|
12
19
|
}
|
|
13
20
|
|
|
14
21
|
public static toFirstLetterLowercase(value: string) {
|