@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.
Files changed (81) hide show
  1. package/.openapi-generator/FILES +29 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +156 -0
  5. package/dist/apis/PetApi.d.ts +354 -0
  6. package/dist/apis/PetApi.js +423 -0
  7. package/dist/apis/StoreApi.d.ts +181 -0
  8. package/dist/apis/StoreApi.js +193 -0
  9. package/dist/apis/UserApi.d.ts +293 -0
  10. package/dist/apis/UserApi.js +318 -0
  11. package/dist/apis/index.d.ts +3 -0
  12. package/dist/apis/index.js +21 -0
  13. package/dist/esm/apis/PetApi.d.ts +354 -0
  14. package/dist/esm/apis/PetApi.js +419 -0
  15. package/dist/esm/apis/StoreApi.d.ts +181 -0
  16. package/dist/esm/apis/StoreApi.js +189 -0
  17. package/dist/esm/apis/UserApi.d.ts +293 -0
  18. package/dist/esm/apis/UserApi.js +314 -0
  19. package/dist/esm/apis/index.d.ts +3 -0
  20. package/dist/esm/apis/index.js +5 -0
  21. package/dist/esm/index.d.ts +3 -0
  22. package/dist/esm/index.js +5 -0
  23. package/dist/esm/models/Category.d.ts +38 -0
  24. package/dist/esm/models/Category.js +43 -0
  25. package/dist/esm/models/ModelApiResponse.d.ts +44 -0
  26. package/dist/esm/models/ModelApiResponse.js +45 -0
  27. package/dist/esm/models/Order.d.ts +71 -0
  28. package/dist/esm/models/Order.js +59 -0
  29. package/dist/esm/models/Pet.d.ts +73 -0
  30. package/dist/esm/models/Pet.js +65 -0
  31. package/dist/esm/models/Tag.d.ts +38 -0
  32. package/dist/esm/models/Tag.js +43 -0
  33. package/dist/esm/models/User.d.ts +74 -0
  34. package/dist/esm/models/User.js +55 -0
  35. package/dist/esm/models/index.d.ts +6 -0
  36. package/dist/esm/models/index.js +8 -0
  37. package/dist/esm/runtime.d.ts +184 -0
  38. package/dist/esm/runtime.js +334 -0
  39. package/dist/index.d.ts +3 -0
  40. package/dist/index.js +21 -0
  41. package/dist/models/Category.d.ts +38 -0
  42. package/dist/models/Category.js +50 -0
  43. package/dist/models/ModelApiResponse.d.ts +44 -0
  44. package/dist/models/ModelApiResponse.js +52 -0
  45. package/dist/models/Order.d.ts +71 -0
  46. package/dist/models/Order.js +67 -0
  47. package/dist/models/Pet.d.ts +73 -0
  48. package/dist/models/Pet.js +73 -0
  49. package/dist/models/Tag.d.ts +38 -0
  50. package/dist/models/Tag.js +50 -0
  51. package/dist/models/User.d.ts +74 -0
  52. package/dist/models/User.js +62 -0
  53. package/dist/models/index.d.ts +6 -0
  54. package/dist/models/index.js +24 -0
  55. package/dist/runtime.d.ts +184 -0
  56. package/dist/runtime.js +350 -0
  57. package/docs/Category.md +36 -0
  58. package/docs/ModelApiResponse.md +38 -0
  59. package/docs/Order.md +44 -0
  60. package/docs/Pet.md +44 -0
  61. package/docs/PetApi.md +622 -0
  62. package/docs/StoreApi.md +286 -0
  63. package/docs/Tag.md +36 -0
  64. package/docs/User.md +48 -0
  65. package/docs/UserApi.md +496 -0
  66. package/package.json +21 -0
  67. package/src/apis/PetApi.ts +739 -0
  68. package/src/apis/StoreApi.ts +323 -0
  69. package/src/apis/UserApi.ts +550 -0
  70. package/src/apis/index.ts +5 -0
  71. package/src/index.ts +5 -0
  72. package/src/models/Category.ts +73 -0
  73. package/src/models/ModelApiResponse.ts +81 -0
  74. package/src/models/Order.ts +117 -0
  75. package/src/models/Pet.ts +134 -0
  76. package/src/models/Tag.ts +73 -0
  77. package/src/models/User.ts +121 -0
  78. package/src/models/index.ts +8 -0
  79. package/src/runtime.ts +432 -0
  80. package/tsconfig.esm.json +7 -0
  81. package/tsconfig.json +16 -0
@@ -0,0 +1,314 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import * as runtime from '../runtime.js';
24
+ import { UserFromJSON, UserToJSON, } from '../models/index.js';
25
+ /**
26
+ *
27
+ */
28
+ export class UserApi extends runtime.BaseAPI {
29
+ /**
30
+ * Creates request options for createUser without sending the request
31
+ */
32
+ createUserRequestOpts(requestParameters) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const queryParameters = {};
35
+ const headerParameters = {};
36
+ headerParameters['Content-Type'] = 'application/json';
37
+ let urlPath = `/user`;
38
+ return {
39
+ path: urlPath,
40
+ method: 'POST',
41
+ headers: headerParameters,
42
+ query: queryParameters,
43
+ body: UserToJSON(requestParameters['user']),
44
+ };
45
+ });
46
+ }
47
+ /**
48
+ * This can only be done by the logged in user.
49
+ * Create user.
50
+ */
51
+ createUserRaw(requestParameters, initOverrides) {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ const requestOptions = yield this.createUserRequestOpts(requestParameters);
54
+ const response = yield this.request(requestOptions, initOverrides);
55
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
56
+ });
57
+ }
58
+ /**
59
+ * This can only be done by the logged in user.
60
+ * Create user.
61
+ */
62
+ createUser() {
63
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
64
+ const response = yield this.createUserRaw(requestParameters, initOverrides);
65
+ return yield response.value();
66
+ });
67
+ }
68
+ /**
69
+ * Creates request options for createUsersWithListInput without sending the request
70
+ */
71
+ createUsersWithListInputRequestOpts(requestParameters) {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ const queryParameters = {};
74
+ const headerParameters = {};
75
+ headerParameters['Content-Type'] = 'application/json';
76
+ let urlPath = `/user/createWithList`;
77
+ return {
78
+ path: urlPath,
79
+ method: 'POST',
80
+ headers: headerParameters,
81
+ query: queryParameters,
82
+ body: requestParameters['user'].map(UserToJSON),
83
+ };
84
+ });
85
+ }
86
+ /**
87
+ * Creates list of users with given input array.
88
+ * Creates list of users with given input array.
89
+ */
90
+ createUsersWithListInputRaw(requestParameters, initOverrides) {
91
+ return __awaiter(this, void 0, void 0, function* () {
92
+ const requestOptions = yield this.createUsersWithListInputRequestOpts(requestParameters);
93
+ const response = yield this.request(requestOptions, initOverrides);
94
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
95
+ });
96
+ }
97
+ /**
98
+ * Creates list of users with given input array.
99
+ * Creates list of users with given input array.
100
+ */
101
+ createUsersWithListInput() {
102
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
103
+ const response = yield this.createUsersWithListInputRaw(requestParameters, initOverrides);
104
+ return yield response.value();
105
+ });
106
+ }
107
+ /**
108
+ * Creates request options for deleteUser without sending the request
109
+ */
110
+ deleteUserRequestOpts(requestParameters) {
111
+ return __awaiter(this, void 0, void 0, function* () {
112
+ if (requestParameters['username'] == null) {
113
+ throw new runtime.RequiredError('username', 'Required parameter "username" was null or undefined when calling deleteUser().');
114
+ }
115
+ const queryParameters = {};
116
+ const headerParameters = {};
117
+ let urlPath = `/user/{username}`;
118
+ urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
119
+ return {
120
+ path: urlPath,
121
+ method: 'DELETE',
122
+ headers: headerParameters,
123
+ query: queryParameters,
124
+ };
125
+ });
126
+ }
127
+ /**
128
+ * This can only be done by the logged in user.
129
+ * Delete user resource.
130
+ */
131
+ deleteUserRaw(requestParameters, initOverrides) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ const requestOptions = yield this.deleteUserRequestOpts(requestParameters);
134
+ const response = yield this.request(requestOptions, initOverrides);
135
+ return new runtime.VoidApiResponse(response);
136
+ });
137
+ }
138
+ /**
139
+ * This can only be done by the logged in user.
140
+ * Delete user resource.
141
+ */
142
+ deleteUser(requestParameters, initOverrides) {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ yield this.deleteUserRaw(requestParameters, initOverrides);
145
+ });
146
+ }
147
+ /**
148
+ * Creates request options for getUserByName without sending the request
149
+ */
150
+ getUserByNameRequestOpts(requestParameters) {
151
+ return __awaiter(this, void 0, void 0, function* () {
152
+ if (requestParameters['username'] == null) {
153
+ throw new runtime.RequiredError('username', 'Required parameter "username" was null or undefined when calling getUserByName().');
154
+ }
155
+ const queryParameters = {};
156
+ const headerParameters = {};
157
+ let urlPath = `/user/{username}`;
158
+ urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
159
+ return {
160
+ path: urlPath,
161
+ method: 'GET',
162
+ headers: headerParameters,
163
+ query: queryParameters,
164
+ };
165
+ });
166
+ }
167
+ /**
168
+ * Get user detail based on username.
169
+ * Get user by user name.
170
+ */
171
+ getUserByNameRaw(requestParameters, initOverrides) {
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ const requestOptions = yield this.getUserByNameRequestOpts(requestParameters);
174
+ const response = yield this.request(requestOptions, initOverrides);
175
+ return new runtime.JSONApiResponse(response, (jsonValue) => UserFromJSON(jsonValue));
176
+ });
177
+ }
178
+ /**
179
+ * Get user detail based on username.
180
+ * Get user by user name.
181
+ */
182
+ getUserByName(requestParameters, initOverrides) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ const response = yield this.getUserByNameRaw(requestParameters, initOverrides);
185
+ return yield response.value();
186
+ });
187
+ }
188
+ /**
189
+ * Creates request options for loginUser without sending the request
190
+ */
191
+ loginUserRequestOpts(requestParameters) {
192
+ return __awaiter(this, void 0, void 0, function* () {
193
+ const queryParameters = {};
194
+ if (requestParameters['username'] != null) {
195
+ queryParameters['username'] = requestParameters['username'];
196
+ }
197
+ if (requestParameters['password'] != null) {
198
+ queryParameters['password'] = requestParameters['password'];
199
+ }
200
+ const headerParameters = {};
201
+ let urlPath = `/user/login`;
202
+ return {
203
+ path: urlPath,
204
+ method: 'GET',
205
+ headers: headerParameters,
206
+ query: queryParameters,
207
+ };
208
+ });
209
+ }
210
+ /**
211
+ * Log into the system.
212
+ * Logs user into the system.
213
+ */
214
+ loginUserRaw(requestParameters, initOverrides) {
215
+ return __awaiter(this, void 0, void 0, function* () {
216
+ const requestOptions = yield this.loginUserRequestOpts(requestParameters);
217
+ const response = yield this.request(requestOptions, initOverrides);
218
+ if (this.isJsonMime(response.headers.get('content-type'))) {
219
+ return new runtime.JSONApiResponse(response);
220
+ }
221
+ else {
222
+ return new runtime.TextApiResponse(response);
223
+ }
224
+ });
225
+ }
226
+ /**
227
+ * Log into the system.
228
+ * Logs user into the system.
229
+ */
230
+ loginUser() {
231
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
232
+ const response = yield this.loginUserRaw(requestParameters, initOverrides);
233
+ return yield response.value();
234
+ });
235
+ }
236
+ /**
237
+ * Creates request options for logoutUser without sending the request
238
+ */
239
+ logoutUserRequestOpts() {
240
+ return __awaiter(this, void 0, void 0, function* () {
241
+ const queryParameters = {};
242
+ const headerParameters = {};
243
+ let urlPath = `/user/logout`;
244
+ return {
245
+ path: urlPath,
246
+ method: 'GET',
247
+ headers: headerParameters,
248
+ query: queryParameters,
249
+ };
250
+ });
251
+ }
252
+ /**
253
+ * Log user out of the system.
254
+ * Logs out current logged in user session.
255
+ */
256
+ logoutUserRaw(initOverrides) {
257
+ return __awaiter(this, void 0, void 0, function* () {
258
+ const requestOptions = yield this.logoutUserRequestOpts();
259
+ const response = yield this.request(requestOptions, initOverrides);
260
+ return new runtime.VoidApiResponse(response);
261
+ });
262
+ }
263
+ /**
264
+ * Log user out of the system.
265
+ * Logs out current logged in user session.
266
+ */
267
+ logoutUser(initOverrides) {
268
+ return __awaiter(this, void 0, void 0, function* () {
269
+ yield this.logoutUserRaw(initOverrides);
270
+ });
271
+ }
272
+ /**
273
+ * Creates request options for updateUser without sending the request
274
+ */
275
+ updateUserRequestOpts(requestParameters) {
276
+ return __awaiter(this, void 0, void 0, function* () {
277
+ if (requestParameters['username'] == null) {
278
+ throw new runtime.RequiredError('username', 'Required parameter "username" was null or undefined when calling updateUser().');
279
+ }
280
+ const queryParameters = {};
281
+ const headerParameters = {};
282
+ headerParameters['Content-Type'] = 'application/json';
283
+ let urlPath = `/user/{username}`;
284
+ urlPath = urlPath.replace(`{${"username"}}`, encodeURIComponent(String(requestParameters['username'])));
285
+ return {
286
+ path: urlPath,
287
+ method: 'PUT',
288
+ headers: headerParameters,
289
+ query: queryParameters,
290
+ body: UserToJSON(requestParameters['user']),
291
+ };
292
+ });
293
+ }
294
+ /**
295
+ * This can only be done by the logged in user.
296
+ * Update user resource.
297
+ */
298
+ updateUserRaw(requestParameters, initOverrides) {
299
+ return __awaiter(this, void 0, void 0, function* () {
300
+ const requestOptions = yield this.updateUserRequestOpts(requestParameters);
301
+ const response = yield this.request(requestOptions, initOverrides);
302
+ return new runtime.VoidApiResponse(response);
303
+ });
304
+ }
305
+ /**
306
+ * This can only be done by the logged in user.
307
+ * Update user resource.
308
+ */
309
+ updateUser(requestParameters, initOverrides) {
310
+ return __awaiter(this, void 0, void 0, function* () {
311
+ yield this.updateUserRaw(requestParameters, initOverrides);
312
+ });
313
+ }
314
+ }
@@ -0,0 +1,3 @@
1
+ export * from './PetApi.js';
2
+ export * from './StoreApi.js';
3
+ export * from './UserApi.js';
@@ -0,0 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './PetApi.js';
4
+ export * from './StoreApi.js';
5
+ export * from './UserApi.js';
@@ -0,0 +1,3 @@
1
+ export * from './runtime.js';
2
+ export * from './apis/index.js';
3
+ export * from './models/index.js';
@@ -0,0 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime.js';
4
+ export * from './apis/index.js';
5
+ export * from './models/index.js';
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Swagger Petstore - OpenAPI 3.0
3
+ * 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)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.27
6
+ * Contact: apiteam@swagger.io
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface Category
16
+ */
17
+ export interface Category {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof Category
22
+ */
23
+ id?: number;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof Category
28
+ */
29
+ name?: string;
30
+ }
31
+ /**
32
+ * Check if a given object implements the Category interface.
33
+ */
34
+ export declare function instanceOfCategory(value: object): value is Category;
35
+ export declare function CategoryFromJSON(json: any): Category;
36
+ export declare function CategoryFromJSONTyped(json: any, ignoreDiscriminator: boolean): Category;
37
+ export declare function CategoryToJSON(json: any): Category;
38
+ export declare function CategoryToJSONTyped(value?: Category | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,43 @@
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
+ * Check if a given object implements the Category interface.
16
+ */
17
+ export function instanceOfCategory(value) {
18
+ return true;
19
+ }
20
+ export function CategoryFromJSON(json) {
21
+ return CategoryFromJSONTyped(json, false);
22
+ }
23
+ export function CategoryFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'id': json['id'] == null ? undefined : json['id'],
29
+ 'name': json['name'] == null ? undefined : json['name'],
30
+ };
31
+ }
32
+ export function CategoryToJSON(json) {
33
+ return CategoryToJSONTyped(json, false);
34
+ }
35
+ export function CategoryToJSONTyped(value, ignoreDiscriminator = false) {
36
+ if (value == null) {
37
+ return value;
38
+ }
39
+ return {
40
+ 'id': value['id'],
41
+ 'name': value['name'],
42
+ };
43
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Swagger Petstore - OpenAPI 3.0
3
+ * 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)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.27
6
+ * Contact: apiteam@swagger.io
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface ModelApiResponse
16
+ */
17
+ export interface ModelApiResponse {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof ModelApiResponse
22
+ */
23
+ code?: number;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ModelApiResponse
28
+ */
29
+ type?: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ModelApiResponse
34
+ */
35
+ message?: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the ModelApiResponse interface.
39
+ */
40
+ export declare function instanceOfModelApiResponse(value: object): value is ModelApiResponse;
41
+ export declare function ModelApiResponseFromJSON(json: any): ModelApiResponse;
42
+ export declare function ModelApiResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ModelApiResponse;
43
+ export declare function ModelApiResponseToJSON(json: any): ModelApiResponse;
44
+ export declare function ModelApiResponseToJSONTyped(value?: ModelApiResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,45 @@
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
+ * Check if a given object implements the ModelApiResponse interface.
16
+ */
17
+ export function instanceOfModelApiResponse(value) {
18
+ return true;
19
+ }
20
+ export function ModelApiResponseFromJSON(json) {
21
+ return ModelApiResponseFromJSONTyped(json, false);
22
+ }
23
+ export function ModelApiResponseFromJSONTyped(json, ignoreDiscriminator) {
24
+ if (json == null) {
25
+ return json;
26
+ }
27
+ return {
28
+ 'code': json['code'] == null ? undefined : json['code'],
29
+ 'type': json['type'] == null ? undefined : json['type'],
30
+ 'message': json['message'] == null ? undefined : json['message'],
31
+ };
32
+ }
33
+ export function ModelApiResponseToJSON(json) {
34
+ return ModelApiResponseToJSONTyped(json, false);
35
+ }
36
+ export function ModelApiResponseToJSONTyped(value, ignoreDiscriminator = false) {
37
+ if (value == null) {
38
+ return value;
39
+ }
40
+ return {
41
+ 'code': value['code'],
42
+ 'type': value['type'],
43
+ 'message': value['message'],
44
+ };
45
+ }
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Swagger Petstore - OpenAPI 3.0
3
+ * 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)
4
+ *
5
+ * The version of the OpenAPI document: 1.0.27
6
+ * Contact: apiteam@swagger.io
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
+ /**
13
+ *
14
+ * @export
15
+ * @interface Order
16
+ */
17
+ export interface Order {
18
+ /**
19
+ *
20
+ * @type {number}
21
+ * @memberof Order
22
+ */
23
+ id?: number;
24
+ /**
25
+ *
26
+ * @type {number}
27
+ * @memberof Order
28
+ */
29
+ petId?: number;
30
+ /**
31
+ *
32
+ * @type {number}
33
+ * @memberof Order
34
+ */
35
+ quantity?: number;
36
+ /**
37
+ *
38
+ * @type {Date}
39
+ * @memberof Order
40
+ */
41
+ shipDate?: Date;
42
+ /**
43
+ * Order Status
44
+ * @type {string}
45
+ * @memberof Order
46
+ */
47
+ status?: OrderStatusEnum;
48
+ /**
49
+ *
50
+ * @type {boolean}
51
+ * @memberof Order
52
+ */
53
+ complete?: boolean;
54
+ }
55
+ /**
56
+ * @export
57
+ */
58
+ export declare const OrderStatusEnum: {
59
+ readonly Placed: "placed";
60
+ readonly Approved: "approved";
61
+ readonly Delivered: "delivered";
62
+ };
63
+ export type OrderStatusEnum = typeof OrderStatusEnum[keyof typeof OrderStatusEnum];
64
+ /**
65
+ * Check if a given object implements the Order interface.
66
+ */
67
+ export declare function instanceOfOrder(value: object): value is Order;
68
+ export declare function OrderFromJSON(json: any): Order;
69
+ export declare function OrderFromJSONTyped(json: any, ignoreDiscriminator: boolean): Order;
70
+ export declare function OrderToJSON(json: any): Order;
71
+ export declare function OrderToJSONTyped(value?: Order | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
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
+ * @export
16
+ */
17
+ export const OrderStatusEnum = {
18
+ Placed: 'placed',
19
+ Approved: 'approved',
20
+ Delivered: 'delivered'
21
+ };
22
+ /**
23
+ * Check if a given object implements the Order interface.
24
+ */
25
+ export function instanceOfOrder(value) {
26
+ return true;
27
+ }
28
+ export function OrderFromJSON(json) {
29
+ return OrderFromJSONTyped(json, false);
30
+ }
31
+ export function OrderFromJSONTyped(json, ignoreDiscriminator) {
32
+ if (json == null) {
33
+ return json;
34
+ }
35
+ return {
36
+ 'id': json['id'] == null ? undefined : json['id'],
37
+ 'petId': json['petId'] == null ? undefined : json['petId'],
38
+ 'quantity': json['quantity'] == null ? undefined : json['quantity'],
39
+ 'shipDate': json['shipDate'] == null ? undefined : (new Date(json['shipDate'])),
40
+ 'status': json['status'] == null ? undefined : json['status'],
41
+ 'complete': json['complete'] == null ? undefined : json['complete'],
42
+ };
43
+ }
44
+ export function OrderToJSON(json) {
45
+ return OrderToJSONTyped(json, false);
46
+ }
47
+ export function OrderToJSONTyped(value, ignoreDiscriminator = false) {
48
+ if (value == null) {
49
+ return value;
50
+ }
51
+ return {
52
+ 'id': value['id'],
53
+ 'petId': value['petId'],
54
+ 'quantity': value['quantity'],
55
+ 'shipDate': value['shipDate'] == null ? value['shipDate'] : value['shipDate'].toISOString(),
56
+ 'status': value['status'],
57
+ 'complete': value['complete'],
58
+ };
59
+ }