@redhat-ecosystem-engineering/petstore-client-test 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 +29 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +156 -0
- package/dist/apis/PetApi.d.ts +354 -0
- package/dist/apis/PetApi.js +423 -0
- package/dist/apis/StoreApi.d.ts +181 -0
- package/dist/apis/StoreApi.js +193 -0
- package/dist/apis/UserApi.d.ts +293 -0
- package/dist/apis/UserApi.js +318 -0
- package/dist/apis/index.d.ts +3 -0
- package/dist/apis/index.js +21 -0
- package/dist/esm/apis/PetApi.d.ts +354 -0
- package/dist/esm/apis/PetApi.js +419 -0
- package/dist/esm/apis/StoreApi.d.ts +181 -0
- package/dist/esm/apis/StoreApi.js +189 -0
- package/dist/esm/apis/UserApi.d.ts +293 -0
- package/dist/esm/apis/UserApi.js +314 -0
- package/dist/esm/apis/index.d.ts +3 -0
- package/dist/esm/apis/index.js +5 -0
- package/dist/esm/index.d.ts +3 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/models/Category.d.ts +38 -0
- package/dist/esm/models/Category.js +43 -0
- package/dist/esm/models/ModelApiResponse.d.ts +44 -0
- package/dist/esm/models/ModelApiResponse.js +45 -0
- package/dist/esm/models/Order.d.ts +71 -0
- package/dist/esm/models/Order.js +59 -0
- package/dist/esm/models/Pet.d.ts +73 -0
- package/dist/esm/models/Pet.js +65 -0
- package/dist/esm/models/Tag.d.ts +38 -0
- package/dist/esm/models/Tag.js +43 -0
- package/dist/esm/models/User.d.ts +74 -0
- package/dist/esm/models/User.js +55 -0
- package/dist/esm/models/index.d.ts +6 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/esm/runtime.d.ts +184 -0
- package/dist/esm/runtime.js +334 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21 -0
- package/dist/models/Category.d.ts +38 -0
- package/dist/models/Category.js +50 -0
- package/dist/models/ModelApiResponse.d.ts +44 -0
- package/dist/models/ModelApiResponse.js +52 -0
- package/dist/models/Order.d.ts +71 -0
- package/dist/models/Order.js +67 -0
- package/dist/models/Pet.d.ts +73 -0
- package/dist/models/Pet.js +73 -0
- package/dist/models/Tag.d.ts +38 -0
- package/dist/models/Tag.js +50 -0
- package/dist/models/User.d.ts +74 -0
- package/dist/models/User.js +62 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +24 -0
- package/dist/runtime.d.ts +184 -0
- package/dist/runtime.js +350 -0
- package/docs/Category.md +36 -0
- package/docs/ModelApiResponse.md +38 -0
- package/docs/Order.md +44 -0
- package/docs/Pet.md +44 -0
- package/docs/PetApi.md +622 -0
- package/docs/StoreApi.md +286 -0
- package/docs/Tag.md +36 -0
- package/docs/User.md +48 -0
- package/docs/UserApi.md +496 -0
- package/package.json +21 -0
- package/src/apis/PetApi.ts +739 -0
- package/src/apis/StoreApi.ts +323 -0
- package/src/apis/UserApi.ts +550 -0
- package/src/apis/index.ts +5 -0
- package/src/index.ts +5 -0
- package/src/models/Category.ts +73 -0
- package/src/models/ModelApiResponse.ts +81 -0
- package/src/models/Order.ts +117 -0
- package/src/models/Pet.ts +134 -0
- package/src/models/Tag.ts +73 -0
- package/src/models/User.ts +121 -0
- package/src/models/index.ts +8 -0
- package/src/runtime.ts +432 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Swagger Petstore - OpenAPI 3.0
|
|
5
|
+
* This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we\'ve switched to the design first approach! You can now help us improve the API whether it\'s by making changes to the definition itself or to the code. That way, with time, we can improve the API in general, and expose some of the new features in OAS3. Some useful links: - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore) - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.27
|
|
8
|
+
* Contact: apiteam@swagger.io
|
|
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.js';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface ModelApiResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface ModelApiResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof ModelApiResponse
|
|
26
|
+
*/
|
|
27
|
+
code?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof ModelApiResponse
|
|
32
|
+
*/
|
|
33
|
+
type?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof ModelApiResponse
|
|
38
|
+
*/
|
|
39
|
+
message?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Check if a given object implements the ModelApiResponse interface.
|
|
44
|
+
*/
|
|
45
|
+
export function instanceOfModelApiResponse(value: object): value is ModelApiResponse {
|
|
46
|
+
return true;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function ModelApiResponseFromJSON(json: any): ModelApiResponse {
|
|
50
|
+
return ModelApiResponseFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelApiResponse {
|
|
54
|
+
if (json == null) {
|
|
55
|
+
return json;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
|
|
59
|
+
'code': json['code'] == null ? undefined : json['code'],
|
|
60
|
+
'type': json['type'] == null ? undefined : json['type'],
|
|
61
|
+
'message': json['message'] == null ? undefined : json['message'],
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function ModelApiResponseToJSON(json: any): ModelApiResponse {
|
|
66
|
+
return ModelApiResponseToJSONTyped(json, false);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'code': value['code'],
|
|
77
|
+
'type': value['type'],
|
|
78
|
+
'message': value['message'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Swagger Petstore - OpenAPI 3.0
|
|
5
|
+
* This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we\'ve switched to the design first approach! You can now help us improve the API whether it\'s by making changes to the definition itself or to the code. That way, with time, we can improve the API in general, and expose some of the new features in OAS3. Some useful links: - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore) - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.27
|
|
8
|
+
* Contact: apiteam@swagger.io
|
|
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.js';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface Order
|
|
20
|
+
*/
|
|
21
|
+
export interface Order {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof Order
|
|
26
|
+
*/
|
|
27
|
+
id?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof Order
|
|
32
|
+
*/
|
|
33
|
+
petId?: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof Order
|
|
38
|
+
*/
|
|
39
|
+
quantity?: number;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {Date}
|
|
43
|
+
* @memberof Order
|
|
44
|
+
*/
|
|
45
|
+
shipDate?: Date;
|
|
46
|
+
/**
|
|
47
|
+
* Order Status
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof Order
|
|
50
|
+
*/
|
|
51
|
+
status?: OrderStatusEnum;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {boolean}
|
|
55
|
+
* @memberof Order
|
|
56
|
+
*/
|
|
57
|
+
complete?: boolean;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @export
|
|
63
|
+
*/
|
|
64
|
+
export const OrderStatusEnum = {
|
|
65
|
+
Placed: 'placed',
|
|
66
|
+
Approved: 'approved',
|
|
67
|
+
Delivered: 'delivered'
|
|
68
|
+
} as const;
|
|
69
|
+
export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Check if a given object implements the Order interface.
|
|
74
|
+
*/
|
|
75
|
+
export function instanceOfOrder(value: object): value is Order {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function OrderFromJSON(json: any): Order {
|
|
80
|
+
return OrderFromJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Order {
|
|
84
|
+
if (json == null) {
|
|
85
|
+
return json;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
90
|
+
'petId': json['petId'] == null ? undefined : json['petId'],
|
|
91
|
+
'quantity': json['quantity'] == null ? undefined : json['quantity'],
|
|
92
|
+
'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])),
|
|
93
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
94
|
+
'complete': json['complete'] == null ? undefined : json['complete'],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function OrderToJSON(json: any): Order {
|
|
99
|
+
return OrderToJSONTyped(json, false);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator: boolean = false): any {
|
|
103
|
+
if (value == null) {
|
|
104
|
+
return value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
|
|
109
|
+
'id': value['id'],
|
|
110
|
+
'petId': value['petId'],
|
|
111
|
+
'quantity': value['quantity'],
|
|
112
|
+
'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(),
|
|
113
|
+
'status': value['status'],
|
|
114
|
+
'complete': value['complete'],
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Swagger Petstore - OpenAPI 3.0
|
|
5
|
+
* This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we\'ve switched to the design first approach! You can now help us improve the API whether it\'s by making changes to the definition itself or to the code. That way, with time, we can improve the API in general, and expose some of the new features in OAS3. Some useful links: - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore) - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.27
|
|
8
|
+
* Contact: apiteam@swagger.io
|
|
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.js';
|
|
16
|
+
import type { Category } from './Category.js';
|
|
17
|
+
import {
|
|
18
|
+
CategoryFromJSON,
|
|
19
|
+
CategoryFromJSONTyped,
|
|
20
|
+
CategoryToJSON,
|
|
21
|
+
CategoryToJSONTyped,
|
|
22
|
+
} from './Category.js';
|
|
23
|
+
import type { Tag } from './Tag.js';
|
|
24
|
+
import {
|
|
25
|
+
TagFromJSON,
|
|
26
|
+
TagFromJSONTyped,
|
|
27
|
+
TagToJSON,
|
|
28
|
+
TagToJSONTyped,
|
|
29
|
+
} from './Tag.js';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @export
|
|
34
|
+
* @interface Pet
|
|
35
|
+
*/
|
|
36
|
+
export interface Pet {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {number}
|
|
40
|
+
* @memberof Pet
|
|
41
|
+
*/
|
|
42
|
+
id?: number;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof Pet
|
|
47
|
+
*/
|
|
48
|
+
name: string;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {Category}
|
|
52
|
+
* @memberof Pet
|
|
53
|
+
*/
|
|
54
|
+
category?: Category;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {Array<string>}
|
|
58
|
+
* @memberof Pet
|
|
59
|
+
*/
|
|
60
|
+
photoUrls: Array<string>;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {Array<Tag>}
|
|
64
|
+
* @memberof Pet
|
|
65
|
+
*/
|
|
66
|
+
tags?: Array<Tag>;
|
|
67
|
+
/**
|
|
68
|
+
* pet status in the store
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof Pet
|
|
71
|
+
*/
|
|
72
|
+
status?: PetStatusEnum;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* @export
|
|
78
|
+
*/
|
|
79
|
+
export const PetStatusEnum = {
|
|
80
|
+
Available: 'available',
|
|
81
|
+
Pending: 'pending',
|
|
82
|
+
Sold: 'sold'
|
|
83
|
+
} as const;
|
|
84
|
+
export type PetStatusEnum = typeof PetStatusEnum[keyof typeof PetStatusEnum];
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Check if a given object implements the Pet interface.
|
|
89
|
+
*/
|
|
90
|
+
export function instanceOfPet(value: object): value is Pet {
|
|
91
|
+
if (!('name' in value) || value['name'] === undefined) return false;
|
|
92
|
+
if (!('photoUrls' in value) || value['photoUrls'] === undefined) return false;
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function PetFromJSON(json: any): Pet {
|
|
97
|
+
return PetFromJSONTyped(json, false);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function PetFromJSONTyped(json: any, ignoreDiscriminator: boolean): Pet {
|
|
101
|
+
if (json == null) {
|
|
102
|
+
return json;
|
|
103
|
+
}
|
|
104
|
+
return {
|
|
105
|
+
|
|
106
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
107
|
+
'name': json['name'],
|
|
108
|
+
'category': json['category'] == null ? undefined : CategoryFromJSON(json['category']),
|
|
109
|
+
'photoUrls': json['photoUrls'],
|
|
110
|
+
'tags': json['tags'] == null ? undefined : ((json['tags'] as Array<any>).map(TagFromJSON)),
|
|
111
|
+
'status': json['status'] == null ? undefined : json['status'],
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function PetToJSON(json: any): Pet {
|
|
116
|
+
return PetToJSONTyped(json, false);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export function PetToJSONTyped(value?: Pet | null, ignoreDiscriminator: boolean = false): any {
|
|
120
|
+
if (value == null) {
|
|
121
|
+
return value;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return {
|
|
125
|
+
|
|
126
|
+
'id': value['id'],
|
|
127
|
+
'name': value['name'],
|
|
128
|
+
'category': CategoryToJSON(value['category']),
|
|
129
|
+
'photoUrls': value['photoUrls'],
|
|
130
|
+
'tags': value['tags'] == null ? undefined : ((value['tags'] as Array<any>).map(TagToJSON)),
|
|
131
|
+
'status': value['status'],
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Swagger Petstore - OpenAPI 3.0
|
|
5
|
+
* This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we\'ve switched to the design first approach! You can now help us improve the API whether it\'s by making changes to the definition itself or to the code. That way, with time, we can improve the API in general, and expose some of the new features in OAS3. Some useful links: - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore) - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.27
|
|
8
|
+
* Contact: apiteam@swagger.io
|
|
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.js';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface Tag
|
|
20
|
+
*/
|
|
21
|
+
export interface Tag {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof Tag
|
|
26
|
+
*/
|
|
27
|
+
id?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof Tag
|
|
32
|
+
*/
|
|
33
|
+
name?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the Tag interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfTag(value: object): value is Tag {
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function TagFromJSON(json: any): Tag {
|
|
44
|
+
return TagFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function TagFromJSONTyped(json: any, ignoreDiscriminator: boolean): Tag {
|
|
48
|
+
if (json == null) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
|
|
53
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
54
|
+
'name': json['name'] == null ? undefined : json['name'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export function TagToJSON(json: any): Tag {
|
|
59
|
+
return TagToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function TagToJSONTyped(value?: Tag | null, ignoreDiscriminator: boolean = false): any {
|
|
63
|
+
if (value == null) {
|
|
64
|
+
return value;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
return {
|
|
68
|
+
|
|
69
|
+
'id': value['id'],
|
|
70
|
+
'name': value['name'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Swagger Petstore - OpenAPI 3.0
|
|
5
|
+
* This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we\'ve switched to the design first approach! You can now help us improve the API whether it\'s by making changes to the definition itself or to the code. That way, with time, we can improve the API in general, and expose some of the new features in OAS3. Some useful links: - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore) - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.27
|
|
8
|
+
* Contact: apiteam@swagger.io
|
|
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.js';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface User
|
|
20
|
+
*/
|
|
21
|
+
export interface User {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {number}
|
|
25
|
+
* @memberof User
|
|
26
|
+
*/
|
|
27
|
+
id?: number;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof User
|
|
32
|
+
*/
|
|
33
|
+
username?: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof User
|
|
38
|
+
*/
|
|
39
|
+
firstName?: string;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof User
|
|
44
|
+
*/
|
|
45
|
+
lastName?: string;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof User
|
|
50
|
+
*/
|
|
51
|
+
email?: string;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof User
|
|
56
|
+
*/
|
|
57
|
+
password?: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @memberof User
|
|
62
|
+
*/
|
|
63
|
+
phone?: string;
|
|
64
|
+
/**
|
|
65
|
+
* User Status
|
|
66
|
+
* @type {number}
|
|
67
|
+
* @memberof User
|
|
68
|
+
*/
|
|
69
|
+
userStatus?: number;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Check if a given object implements the User interface.
|
|
74
|
+
*/
|
|
75
|
+
export function instanceOfUser(value: object): value is User {
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function UserFromJSON(json: any): User {
|
|
80
|
+
return UserFromJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): User {
|
|
84
|
+
if (json == null) {
|
|
85
|
+
return json;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'id': json['id'] == null ? undefined : json['id'],
|
|
90
|
+
'username': json['username'] == null ? undefined : json['username'],
|
|
91
|
+
'firstName': json['firstName'] == null ? undefined : json['firstName'],
|
|
92
|
+
'lastName': json['lastName'] == null ? undefined : json['lastName'],
|
|
93
|
+
'email': json['email'] == null ? undefined : json['email'],
|
|
94
|
+
'password': json['password'] == null ? undefined : json['password'],
|
|
95
|
+
'phone': json['phone'] == null ? undefined : json['phone'],
|
|
96
|
+
'userStatus': json['userStatus'] == null ? undefined : json['userStatus'],
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function UserToJSON(json: any): User {
|
|
101
|
+
return UserToJSONTyped(json, false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function UserToJSONTyped(value?: User | null, ignoreDiscriminator: boolean = false): any {
|
|
105
|
+
if (value == null) {
|
|
106
|
+
return value;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
return {
|
|
110
|
+
|
|
111
|
+
'id': value['id'],
|
|
112
|
+
'username': value['username'],
|
|
113
|
+
'firstName': value['firstName'],
|
|
114
|
+
'lastName': value['lastName'],
|
|
115
|
+
'email': value['email'],
|
|
116
|
+
'password': value['password'],
|
|
117
|
+
'phone': value['phone'],
|
|
118
|
+
'userStatus': value['userStatus'],
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|