@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,29 @@
|
|
|
1
|
+
.gitignore
|
|
2
|
+
.npmignore
|
|
3
|
+
.openapi-generator-ignore
|
|
4
|
+
README.md
|
|
5
|
+
docs/Category.md
|
|
6
|
+
docs/ModelApiResponse.md
|
|
7
|
+
docs/Order.md
|
|
8
|
+
docs/Pet.md
|
|
9
|
+
docs/PetApi.md
|
|
10
|
+
docs/StoreApi.md
|
|
11
|
+
docs/Tag.md
|
|
12
|
+
docs/User.md
|
|
13
|
+
docs/UserApi.md
|
|
14
|
+
package.json
|
|
15
|
+
src/apis/PetApi.ts
|
|
16
|
+
src/apis/StoreApi.ts
|
|
17
|
+
src/apis/UserApi.ts
|
|
18
|
+
src/apis/index.ts
|
|
19
|
+
src/index.ts
|
|
20
|
+
src/models/Category.ts
|
|
21
|
+
src/models/ModelApiResponse.ts
|
|
22
|
+
src/models/Order.ts
|
|
23
|
+
src/models/Pet.ts
|
|
24
|
+
src/models/Tag.ts
|
|
25
|
+
src/models/User.ts
|
|
26
|
+
src/models/index.ts
|
|
27
|
+
src/runtime.ts
|
|
28
|
+
tsconfig.esm.json
|
|
29
|
+
tsconfig.json
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
7.20.0-SNAPSHOT
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# OpenAPI Generator Ignore
|
|
2
|
+
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
|
3
|
+
|
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
|
6
|
+
|
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
|
8
|
+
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
|
9
|
+
#ApiClient.cs
|
|
10
|
+
|
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
|
12
|
+
#foo/*/qux
|
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
|
14
|
+
|
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
|
16
|
+
#foo/**/qux
|
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
|
18
|
+
|
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
|
21
|
+
#docs/*.md
|
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
|
23
|
+
#!docs/README.md
|
package/README.md
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# @redhat-ecosystem-engineering/petstore-client-test@0.0.1
|
|
2
|
+
|
|
3
|
+
A TypeScript SDK client for the petstore3.swagger.io API.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
First, install the SDK from npm.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @redhat-ecosystem-engineering/petstore-client-test --save
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Next, try it out.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
import {
|
|
18
|
+
Configuration,
|
|
19
|
+
PetApi,
|
|
20
|
+
} from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
21
|
+
import type { AddPetRequest } from '@redhat-ecosystem-engineering/petstore-client-test';
|
|
22
|
+
|
|
23
|
+
async function example() {
|
|
24
|
+
console.log("🚀 Testing @redhat-ecosystem-engineering/petstore-client-test SDK...");
|
|
25
|
+
const config = new Configuration({
|
|
26
|
+
// To configure OAuth2 access token for authorization: petstore_auth implicit
|
|
27
|
+
accessToken: "YOUR ACCESS TOKEN",
|
|
28
|
+
});
|
|
29
|
+
const api = new PetApi(config);
|
|
30
|
+
|
|
31
|
+
const body = {
|
|
32
|
+
// Pet | Create a new pet in the store
|
|
33
|
+
pet: ...,
|
|
34
|
+
} satisfies AddPetRequest;
|
|
35
|
+
|
|
36
|
+
try {
|
|
37
|
+
const data = await api.addPet(body);
|
|
38
|
+
console.log(data);
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.error(error);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Run the test
|
|
45
|
+
example().catch(console.error);
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## Documentation
|
|
50
|
+
|
|
51
|
+
### API Endpoints
|
|
52
|
+
|
|
53
|
+
All URIs are relative to *https://petstore3.swagger.io/api/v3*
|
|
54
|
+
|
|
55
|
+
| Class | Method | HTTP request | Description
|
|
56
|
+
| ----- | ------ | ------------ | -------------
|
|
57
|
+
*PetApi* | [**addPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store.
|
|
58
|
+
*PetApi* | [**deletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet.
|
|
59
|
+
*PetApi* | [**findPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status.
|
|
60
|
+
*PetApi* | [**findPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags.
|
|
61
|
+
*PetApi* | [**getPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID.
|
|
62
|
+
*PetApi* | [**updatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet.
|
|
63
|
+
*PetApi* | [**updatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data.
|
|
64
|
+
*PetApi* | [**uploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | Uploads an image.
|
|
65
|
+
*StoreApi* | [**deleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{orderId} | Delete purchase order by identifier.
|
|
66
|
+
*StoreApi* | [**getInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status.
|
|
67
|
+
*StoreApi* | [**getOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{orderId} | Find purchase order by ID.
|
|
68
|
+
*StoreApi* | [**placeOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet.
|
|
69
|
+
*UserApi* | [**createUser**](docs/UserApi.md#createuser) | **POST** /user | Create user.
|
|
70
|
+
*UserApi* | [**createUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array.
|
|
71
|
+
*UserApi* | [**deleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user resource.
|
|
72
|
+
*UserApi* | [**getUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name.
|
|
73
|
+
*UserApi* | [**loginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system.
|
|
74
|
+
*UserApi* | [**logoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session.
|
|
75
|
+
*UserApi* | [**updateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Update user resource.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### Models
|
|
79
|
+
|
|
80
|
+
- [Category](docs/Category.md)
|
|
81
|
+
- [ModelApiResponse](docs/ModelApiResponse.md)
|
|
82
|
+
- [Order](docs/Order.md)
|
|
83
|
+
- [Pet](docs/Pet.md)
|
|
84
|
+
- [Tag](docs/Tag.md)
|
|
85
|
+
- [User](docs/User.md)
|
|
86
|
+
|
|
87
|
+
### Authorization
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
Authentication schemes defined for the API:
|
|
91
|
+
<a id="petstore_auth-implicit"></a>
|
|
92
|
+
#### petstore_auth implicit
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
- **Type**: OAuth
|
|
96
|
+
- **Flow**: implicit
|
|
97
|
+
- **Authorization URL**: https://petstore3.swagger.io/oauth/authorize
|
|
98
|
+
- **Scopes**:
|
|
99
|
+
- `write:pets`: modify pets in your account
|
|
100
|
+
- `read:pets`: read your pets
|
|
101
|
+
<a id="api_key"></a>
|
|
102
|
+
#### api_key
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
- **Type**: API key
|
|
106
|
+
- **API key parameter name**: `api_key`
|
|
107
|
+
- **Location**: HTTP header
|
|
108
|
+
|
|
109
|
+
## About
|
|
110
|
+
|
|
111
|
+
This TypeScript SDK client supports the [Fetch API](https://fetch.spec.whatwg.org/)
|
|
112
|
+
and is automatically generated by the
|
|
113
|
+
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
114
|
+
|
|
115
|
+
- API version: `1.0.27`
|
|
116
|
+
- Package version: `0.0.1`
|
|
117
|
+
- Generator version: `7.20.0-SNAPSHOT`
|
|
118
|
+
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
119
|
+
|
|
120
|
+
The generated npm module supports the following:
|
|
121
|
+
|
|
122
|
+
- Environments
|
|
123
|
+
* Node.js
|
|
124
|
+
* Webpack
|
|
125
|
+
* Browserify
|
|
126
|
+
- Language levels
|
|
127
|
+
* ES5 - you must have a Promises/A+ library installed
|
|
128
|
+
* ES6
|
|
129
|
+
- Module systems
|
|
130
|
+
* CommonJS
|
|
131
|
+
* ES6 module system
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## Development
|
|
135
|
+
|
|
136
|
+
### Building
|
|
137
|
+
|
|
138
|
+
To build the TypeScript source code, you need to have Node.js and npm installed.
|
|
139
|
+
After cloning the repository, navigate to the project directory and run:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
npm install
|
|
143
|
+
npm run build
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Publishing
|
|
147
|
+
|
|
148
|
+
Once you've built the package, you can publish it to npm:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
npm publish
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
[Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0.html)
|
|
@@ -0,0 +1,354 @@
|
|
|
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
|
+
import * as runtime from '../runtime.js';
|
|
13
|
+
import type { ModelApiResponse, Pet } from '../models/index.js';
|
|
14
|
+
export interface AddPetRequest {
|
|
15
|
+
pet: Pet;
|
|
16
|
+
}
|
|
17
|
+
export interface DeletePetRequest {
|
|
18
|
+
petId: number;
|
|
19
|
+
apiKey?: string;
|
|
20
|
+
}
|
|
21
|
+
export interface FindPetsByStatusRequest {
|
|
22
|
+
status: FindPetsByStatusStatusEnum;
|
|
23
|
+
}
|
|
24
|
+
export interface FindPetsByTagsRequest {
|
|
25
|
+
tags: Array<string>;
|
|
26
|
+
}
|
|
27
|
+
export interface GetPetByIdRequest {
|
|
28
|
+
petId: number;
|
|
29
|
+
}
|
|
30
|
+
export interface UpdatePetRequest {
|
|
31
|
+
pet: Pet;
|
|
32
|
+
}
|
|
33
|
+
export interface UpdatePetWithFormRequest {
|
|
34
|
+
petId: number;
|
|
35
|
+
name?: string;
|
|
36
|
+
status?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface UploadFileRequest {
|
|
39
|
+
petId: number;
|
|
40
|
+
additionalMetadata?: string;
|
|
41
|
+
body?: Blob;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* PetApi - interface
|
|
45
|
+
*
|
|
46
|
+
* @export
|
|
47
|
+
* @interface PetApiInterface
|
|
48
|
+
*/
|
|
49
|
+
export interface PetApiInterface {
|
|
50
|
+
/**
|
|
51
|
+
* Creates request options for addPet without sending the request
|
|
52
|
+
* @param {Pet} pet Create a new pet in the store
|
|
53
|
+
* @throws {RequiredError}
|
|
54
|
+
* @memberof PetApiInterface
|
|
55
|
+
*/
|
|
56
|
+
addPetRequestOpts(requestParameters: AddPetRequest): Promise<runtime.RequestOpts>;
|
|
57
|
+
/**
|
|
58
|
+
* Add a new pet to the store.
|
|
59
|
+
* @summary Add a new pet to the store.
|
|
60
|
+
* @param {Pet} pet Create a new pet in the store
|
|
61
|
+
* @param {*} [options] Override http request option.
|
|
62
|
+
* @throws {RequiredError}
|
|
63
|
+
* @memberof PetApiInterface
|
|
64
|
+
*/
|
|
65
|
+
addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>>;
|
|
66
|
+
/**
|
|
67
|
+
* Add a new pet to the store.
|
|
68
|
+
* Add a new pet to the store.
|
|
69
|
+
*/
|
|
70
|
+
addPet(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Pet>;
|
|
71
|
+
/**
|
|
72
|
+
* Creates request options for deletePet without sending the request
|
|
73
|
+
* @param {number} petId Pet id to delete
|
|
74
|
+
* @param {string} [apiKey]
|
|
75
|
+
* @throws {RequiredError}
|
|
76
|
+
* @memberof PetApiInterface
|
|
77
|
+
*/
|
|
78
|
+
deletePetRequestOpts(requestParameters: DeletePetRequest): Promise<runtime.RequestOpts>;
|
|
79
|
+
/**
|
|
80
|
+
* Delete a pet.
|
|
81
|
+
* @summary Deletes a pet.
|
|
82
|
+
* @param {number} petId Pet id to delete
|
|
83
|
+
* @param {string} [apiKey]
|
|
84
|
+
* @param {*} [options] Override http request option.
|
|
85
|
+
* @throws {RequiredError}
|
|
86
|
+
* @memberof PetApiInterface
|
|
87
|
+
*/
|
|
88
|
+
deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
89
|
+
/**
|
|
90
|
+
* Delete a pet.
|
|
91
|
+
* Deletes a pet.
|
|
92
|
+
*/
|
|
93
|
+
deletePet(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* Creates request options for findPetsByStatus without sending the request
|
|
96
|
+
* @param {'available' | 'pending' | 'sold'} status Status values that need to be considered for filter
|
|
97
|
+
* @throws {RequiredError}
|
|
98
|
+
* @memberof PetApiInterface
|
|
99
|
+
*/
|
|
100
|
+
findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest): Promise<runtime.RequestOpts>;
|
|
101
|
+
/**
|
|
102
|
+
* Multiple status values can be provided with comma separated strings.
|
|
103
|
+
* @summary Finds Pets by status.
|
|
104
|
+
* @param {'available' | 'pending' | 'sold'} status Status values that need to be considered for filter
|
|
105
|
+
* @param {*} [options] Override http request option.
|
|
106
|
+
* @throws {RequiredError}
|
|
107
|
+
* @memberof PetApiInterface
|
|
108
|
+
*/
|
|
109
|
+
findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>>;
|
|
110
|
+
/**
|
|
111
|
+
* Multiple status values can be provided with comma separated strings.
|
|
112
|
+
* Finds Pets by status.
|
|
113
|
+
*/
|
|
114
|
+
findPetsByStatus(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>>;
|
|
115
|
+
/**
|
|
116
|
+
* Creates request options for findPetsByTags without sending the request
|
|
117
|
+
* @param {Array<string>} tags Tags to filter by
|
|
118
|
+
* @throws {RequiredError}
|
|
119
|
+
* @memberof PetApiInterface
|
|
120
|
+
*/
|
|
121
|
+
findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest): Promise<runtime.RequestOpts>;
|
|
122
|
+
/**
|
|
123
|
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
|
124
|
+
* @summary Finds Pets by tags.
|
|
125
|
+
* @param {Array<string>} tags Tags to filter by
|
|
126
|
+
* @param {*} [options] Override http request option.
|
|
127
|
+
* @throws {RequiredError}
|
|
128
|
+
* @memberof PetApiInterface
|
|
129
|
+
*/
|
|
130
|
+
findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>>;
|
|
131
|
+
/**
|
|
132
|
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
|
133
|
+
* Finds Pets by tags.
|
|
134
|
+
*/
|
|
135
|
+
findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>>;
|
|
136
|
+
/**
|
|
137
|
+
* Creates request options for getPetById without sending the request
|
|
138
|
+
* @param {number} petId ID of pet to return
|
|
139
|
+
* @throws {RequiredError}
|
|
140
|
+
* @memberof PetApiInterface
|
|
141
|
+
*/
|
|
142
|
+
getPetByIdRequestOpts(requestParameters: GetPetByIdRequest): Promise<runtime.RequestOpts>;
|
|
143
|
+
/**
|
|
144
|
+
* Returns a single pet.
|
|
145
|
+
* @summary Find pet by ID.
|
|
146
|
+
* @param {number} petId ID of pet to return
|
|
147
|
+
* @param {*} [options] Override http request option.
|
|
148
|
+
* @throws {RequiredError}
|
|
149
|
+
* @memberof PetApiInterface
|
|
150
|
+
*/
|
|
151
|
+
getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>>;
|
|
152
|
+
/**
|
|
153
|
+
* Returns a single pet.
|
|
154
|
+
* Find pet by ID.
|
|
155
|
+
*/
|
|
156
|
+
getPetById(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Pet>;
|
|
157
|
+
/**
|
|
158
|
+
* Creates request options for updatePet without sending the request
|
|
159
|
+
* @param {Pet} pet Update an existent pet in the store
|
|
160
|
+
* @throws {RequiredError}
|
|
161
|
+
* @memberof PetApiInterface
|
|
162
|
+
*/
|
|
163
|
+
updatePetRequestOpts(requestParameters: UpdatePetRequest): Promise<runtime.RequestOpts>;
|
|
164
|
+
/**
|
|
165
|
+
* Update an existing pet by Id.
|
|
166
|
+
* @summary Update an existing pet.
|
|
167
|
+
* @param {Pet} pet Update an existent pet in the store
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
* @memberof PetApiInterface
|
|
171
|
+
*/
|
|
172
|
+
updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>>;
|
|
173
|
+
/**
|
|
174
|
+
* Update an existing pet by Id.
|
|
175
|
+
* Update an existing pet.
|
|
176
|
+
*/
|
|
177
|
+
updatePet(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Pet>;
|
|
178
|
+
/**
|
|
179
|
+
* Creates request options for updatePetWithForm without sending the request
|
|
180
|
+
* @param {number} petId ID of pet that needs to be updated
|
|
181
|
+
* @param {string} [name] Name of pet that needs to be updated
|
|
182
|
+
* @param {string} [status] Status of pet that needs to be updated
|
|
183
|
+
* @throws {RequiredError}
|
|
184
|
+
* @memberof PetApiInterface
|
|
185
|
+
*/
|
|
186
|
+
updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest): Promise<runtime.RequestOpts>;
|
|
187
|
+
/**
|
|
188
|
+
* Updates a pet resource based on the form data.
|
|
189
|
+
* @summary Updates a pet in the store with form data.
|
|
190
|
+
* @param {number} petId ID of pet that needs to be updated
|
|
191
|
+
* @param {string} [name] Name of pet that needs to be updated
|
|
192
|
+
* @param {string} [status] Status of pet that needs to be updated
|
|
193
|
+
* @param {*} [options] Override http request option.
|
|
194
|
+
* @throws {RequiredError}
|
|
195
|
+
* @memberof PetApiInterface
|
|
196
|
+
*/
|
|
197
|
+
updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>>;
|
|
198
|
+
/**
|
|
199
|
+
* Updates a pet resource based on the form data.
|
|
200
|
+
* Updates a pet in the store with form data.
|
|
201
|
+
*/
|
|
202
|
+
updatePetWithForm(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Pet>;
|
|
203
|
+
/**
|
|
204
|
+
* Creates request options for uploadFile without sending the request
|
|
205
|
+
* @param {number} petId ID of pet to update
|
|
206
|
+
* @param {string} [additionalMetadata] Additional Metadata
|
|
207
|
+
* @param {Blob} [body]
|
|
208
|
+
* @throws {RequiredError}
|
|
209
|
+
* @memberof PetApiInterface
|
|
210
|
+
*/
|
|
211
|
+
uploadFileRequestOpts(requestParameters: UploadFileRequest): Promise<runtime.RequestOpts>;
|
|
212
|
+
/**
|
|
213
|
+
* Upload image of the pet.
|
|
214
|
+
* @summary Uploads an image.
|
|
215
|
+
* @param {number} petId ID of pet to update
|
|
216
|
+
* @param {string} [additionalMetadata] Additional Metadata
|
|
217
|
+
* @param {Blob} [body]
|
|
218
|
+
* @param {*} [options] Override http request option.
|
|
219
|
+
* @throws {RequiredError}
|
|
220
|
+
* @memberof PetApiInterface
|
|
221
|
+
*/
|
|
222
|
+
uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>>;
|
|
223
|
+
/**
|
|
224
|
+
* Upload image of the pet.
|
|
225
|
+
* Uploads an image.
|
|
226
|
+
*/
|
|
227
|
+
uploadFile(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelApiResponse>;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
*/
|
|
232
|
+
export declare class PetApi extends runtime.BaseAPI implements PetApiInterface {
|
|
233
|
+
/**
|
|
234
|
+
* Creates request options for addPet without sending the request
|
|
235
|
+
*/
|
|
236
|
+
addPetRequestOpts(requestParameters: AddPetRequest): Promise<runtime.RequestOpts>;
|
|
237
|
+
/**
|
|
238
|
+
* Add a new pet to the store.
|
|
239
|
+
* Add a new pet to the store.
|
|
240
|
+
*/
|
|
241
|
+
addPetRaw(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>>;
|
|
242
|
+
/**
|
|
243
|
+
* Add a new pet to the store.
|
|
244
|
+
* Add a new pet to the store.
|
|
245
|
+
*/
|
|
246
|
+
addPet(requestParameters: AddPetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Pet>;
|
|
247
|
+
/**
|
|
248
|
+
* Creates request options for deletePet without sending the request
|
|
249
|
+
*/
|
|
250
|
+
deletePetRequestOpts(requestParameters: DeletePetRequest): Promise<runtime.RequestOpts>;
|
|
251
|
+
/**
|
|
252
|
+
* Delete a pet.
|
|
253
|
+
* Deletes a pet.
|
|
254
|
+
*/
|
|
255
|
+
deletePetRaw(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
256
|
+
/**
|
|
257
|
+
* Delete a pet.
|
|
258
|
+
* Deletes a pet.
|
|
259
|
+
*/
|
|
260
|
+
deletePet(requestParameters: DeletePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
261
|
+
/**
|
|
262
|
+
* Creates request options for findPetsByStatus without sending the request
|
|
263
|
+
*/
|
|
264
|
+
findPetsByStatusRequestOpts(requestParameters: FindPetsByStatusRequest): Promise<runtime.RequestOpts>;
|
|
265
|
+
/**
|
|
266
|
+
* Multiple status values can be provided with comma separated strings.
|
|
267
|
+
* Finds Pets by status.
|
|
268
|
+
*/
|
|
269
|
+
findPetsByStatusRaw(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>>;
|
|
270
|
+
/**
|
|
271
|
+
* Multiple status values can be provided with comma separated strings.
|
|
272
|
+
* Finds Pets by status.
|
|
273
|
+
*/
|
|
274
|
+
findPetsByStatus(requestParameters: FindPetsByStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>>;
|
|
275
|
+
/**
|
|
276
|
+
* Creates request options for findPetsByTags without sending the request
|
|
277
|
+
*/
|
|
278
|
+
findPetsByTagsRequestOpts(requestParameters: FindPetsByTagsRequest): Promise<runtime.RequestOpts>;
|
|
279
|
+
/**
|
|
280
|
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
|
281
|
+
* Finds Pets by tags.
|
|
282
|
+
*/
|
|
283
|
+
findPetsByTagsRaw(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<Pet>>>;
|
|
284
|
+
/**
|
|
285
|
+
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
|
286
|
+
* Finds Pets by tags.
|
|
287
|
+
*/
|
|
288
|
+
findPetsByTags(requestParameters: FindPetsByTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<Pet>>;
|
|
289
|
+
/**
|
|
290
|
+
* Creates request options for getPetById without sending the request
|
|
291
|
+
*/
|
|
292
|
+
getPetByIdRequestOpts(requestParameters: GetPetByIdRequest): Promise<runtime.RequestOpts>;
|
|
293
|
+
/**
|
|
294
|
+
* Returns a single pet.
|
|
295
|
+
* Find pet by ID.
|
|
296
|
+
*/
|
|
297
|
+
getPetByIdRaw(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>>;
|
|
298
|
+
/**
|
|
299
|
+
* Returns a single pet.
|
|
300
|
+
* Find pet by ID.
|
|
301
|
+
*/
|
|
302
|
+
getPetById(requestParameters: GetPetByIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Pet>;
|
|
303
|
+
/**
|
|
304
|
+
* Creates request options for updatePet without sending the request
|
|
305
|
+
*/
|
|
306
|
+
updatePetRequestOpts(requestParameters: UpdatePetRequest): Promise<runtime.RequestOpts>;
|
|
307
|
+
/**
|
|
308
|
+
* Update an existing pet by Id.
|
|
309
|
+
* Update an existing pet.
|
|
310
|
+
*/
|
|
311
|
+
updatePetRaw(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>>;
|
|
312
|
+
/**
|
|
313
|
+
* Update an existing pet by Id.
|
|
314
|
+
* Update an existing pet.
|
|
315
|
+
*/
|
|
316
|
+
updatePet(requestParameters: UpdatePetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Pet>;
|
|
317
|
+
/**
|
|
318
|
+
* Creates request options for updatePetWithForm without sending the request
|
|
319
|
+
*/
|
|
320
|
+
updatePetWithFormRequestOpts(requestParameters: UpdatePetWithFormRequest): Promise<runtime.RequestOpts>;
|
|
321
|
+
/**
|
|
322
|
+
* Updates a pet resource based on the form data.
|
|
323
|
+
* Updates a pet in the store with form data.
|
|
324
|
+
*/
|
|
325
|
+
updatePetWithFormRaw(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Pet>>;
|
|
326
|
+
/**
|
|
327
|
+
* Updates a pet resource based on the form data.
|
|
328
|
+
* Updates a pet in the store with form data.
|
|
329
|
+
*/
|
|
330
|
+
updatePetWithForm(requestParameters: UpdatePetWithFormRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Pet>;
|
|
331
|
+
/**
|
|
332
|
+
* Creates request options for uploadFile without sending the request
|
|
333
|
+
*/
|
|
334
|
+
uploadFileRequestOpts(requestParameters: UploadFileRequest): Promise<runtime.RequestOpts>;
|
|
335
|
+
/**
|
|
336
|
+
* Upload image of the pet.
|
|
337
|
+
* Uploads an image.
|
|
338
|
+
*/
|
|
339
|
+
uploadFileRaw(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ModelApiResponse>>;
|
|
340
|
+
/**
|
|
341
|
+
* Upload image of the pet.
|
|
342
|
+
* Uploads an image.
|
|
343
|
+
*/
|
|
344
|
+
uploadFile(requestParameters: UploadFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ModelApiResponse>;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* @export
|
|
348
|
+
*/
|
|
349
|
+
export declare const FindPetsByStatusStatusEnum: {
|
|
350
|
+
readonly Available: "available";
|
|
351
|
+
readonly Pending: "pending";
|
|
352
|
+
readonly Sold: "sold";
|
|
353
|
+
};
|
|
354
|
+
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];
|