@api7/portal-sdk 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/LICENSE +201 -0
- package/README.md +53 -0
- package/dist/api_product.d.ts +26 -0
- package/dist/api_product.d.ts.map +1 -0
- package/dist/application.d.ts +55 -0
- package/dist/application.d.ts.map +1 -0
- package/dist/credential.d.ts +18 -0
- package/dist/credential.d.ts.map +1 -0
- package/dist/developer.d.ts +27 -0
- package/dist/developer.d.ts.map +1 -0
- package/dist/generated/client/client.gen.d.ts +3 -0
- package/dist/generated/client/client.gen.d.ts.map +1 -0
- package/dist/generated/client/index.d.ts +9 -0
- package/dist/generated/client/index.d.ts.map +1 -0
- package/dist/generated/client/types.gen.d.ts +89 -0
- package/dist/generated/client/types.gen.d.ts.map +1 -0
- package/dist/generated/client/utils.gen.d.ts +15 -0
- package/dist/generated/client/utils.gen.d.ts.map +1 -0
- package/dist/generated/client.gen.d.ts +13 -0
- package/dist/generated/client.gen.d.ts.map +1 -0
- package/dist/generated/core/auth.gen.d.ts +19 -0
- package/dist/generated/core/auth.gen.d.ts.map +1 -0
- package/dist/generated/core/bodySerializer.gen.d.ts +26 -0
- package/dist/generated/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/params.gen.d.ts +44 -0
- package/dist/generated/core/params.gen.d.ts.map +1 -0
- package/dist/generated/core/pathSerializer.gen.d.ts +34 -0
- package/dist/generated/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/generated/core/types.gen.d.ts +79 -0
- package/dist/generated/core/types.gen.d.ts.map +1 -0
- package/dist/generated/core/utils.gen.d.ts +20 -0
- package/dist/generated/core/utils.gen.d.ts.map +1 -0
- package/dist/generated/index.d.ts +3 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/sdk.gen.d.ts +124 -0
- package/dist/generated/sdk.gen.d.ts.map +1 -0
- package/dist/generated/transformers.gen.d.ts +16 -0
- package/dist/generated/transformers.gen.d.ts.map +1 -0
- package/dist/generated/types.gen.d.ts +2095 -0
- package/dist/generated/types.gen.d.ts.map +1 -0
- package/dist/index.cjs +7 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1025 -0
- package/dist/miscellaneous.d.ts +34 -0
- package/dist/miscellaneous.d.ts.map +1 -0
- package/dist/subscription.d.ts +27 -0
- package/dist/subscription.d.ts.map +1 -0
- package/dist/utils.d.ts +35 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# API7 Portal JavaScript SDK
|
|
2
|
+
|
|
3
|
+
## Install
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @api7/portal-sdk
|
|
7
|
+
# or
|
|
8
|
+
yarn add @api7/portal-sdk
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @api7/portal-sdk
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This package supports both ESM and CJS, and you can use it in browsers and Node.js.
|
|
14
|
+
|
|
15
|
+
## Configure
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { API7Portal } from '@api7/portal-sdk'
|
|
19
|
+
|
|
20
|
+
const client = new API7Portal(
|
|
21
|
+
'https://portal.example.com',
|
|
22
|
+
'a7prt-...' // Your API token here
|
|
23
|
+
);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
Access API by following way:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
const apps = await client.apiProduct.list();
|
|
32
|
+
console.log(apps);
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Error Handling
|
|
36
|
+
|
|
37
|
+
When you call an API, APIError is the only type of error expected to be thrown, whether it's an error on the REST API or a network error.
|
|
38
|
+
You can access the request and response there, and also access the underlying AxiosError when needed.
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { APIError } from '@api7/portal-sdk'
|
|
42
|
+
|
|
43
|
+
try {
|
|
44
|
+
const apps = await client.apiProduct.list();
|
|
45
|
+
} catch (error) {
|
|
46
|
+
if (APIError.isAPIError(error)) {
|
|
47
|
+
console.error('API Error:', error.message, 'Status Code:', error.statusCode);
|
|
48
|
+
console.error('Underlying Error:', error.rawError()); // Access the underlying AxiosError
|
|
49
|
+
} else {
|
|
50
|
+
console.error('Unexpected Error:', error);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Client } from './generated/client/types.gen.js';
|
|
2
|
+
import { ListApiProductsData, ListApiProductsResponses, ApiProduct } from './generated/index.js';
|
|
3
|
+
export declare class APIProductAPI {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: Client);
|
|
6
|
+
/**
|
|
7
|
+
* List all API products.
|
|
8
|
+
* @returns The list of API products.
|
|
9
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
10
|
+
*/
|
|
11
|
+
list(query?: ListApiProductsData['query']): Promise<ListApiProductsResponses['200']>;
|
|
12
|
+
/**
|
|
13
|
+
* Get an API product by ID.
|
|
14
|
+
* @param id The API product ID.
|
|
15
|
+
* @returns The API product.
|
|
16
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
17
|
+
*/
|
|
18
|
+
get(id: string): Promise<ApiProduct>;
|
|
19
|
+
/**
|
|
20
|
+
* Subscribe to an API product by ID.
|
|
21
|
+
* @param id The API product ID.
|
|
22
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
23
|
+
*/
|
|
24
|
+
subscribe(id: string): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=api_product.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api_product.d.ts","sourceRoot":"","sources":["../src/api_product.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,UAAU,EACX,MAAM,sBAAsB,CAAC;AAG9B,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE3C;;;;OAIG;IACU,IAAI,CACf,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,GACnC,OAAO,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAM3C;;;;;OAKG;IACU,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IASjD;;;;OAIG;IACU,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAQlD"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { CreateDeveloperApplicationReq, DeveloperApplication, ListDeveloperApplicationsData, ListDeveloperApplicationsResponses, GetApiCallsData, GetApiCallsResponses } from './generated/index.js';
|
|
2
|
+
import { ApplicationCredentialAPI } from './credential.js';
|
|
3
|
+
import { Client } from './generated/client/types.gen.js';
|
|
4
|
+
export declare class ApplicationAPI {
|
|
5
|
+
private readonly client;
|
|
6
|
+
readonly credential: ApplicationCredentialAPI;
|
|
7
|
+
constructor(client: Client);
|
|
8
|
+
/**
|
|
9
|
+
* Create a new developer application.
|
|
10
|
+
* @param developerId The developer ID.
|
|
11
|
+
* @param application The application data.
|
|
12
|
+
* @returns The created developer application.
|
|
13
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
14
|
+
*/
|
|
15
|
+
create(developerId: string, application: CreateDeveloperApplicationReq): Promise<DeveloperApplication>;
|
|
16
|
+
/**
|
|
17
|
+
* List all applications for a developer.
|
|
18
|
+
* @param developerId The developer ID.
|
|
19
|
+
* @returns The list of developer's applications.
|
|
20
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
21
|
+
*/
|
|
22
|
+
list(developerId: string, query?: ListDeveloperApplicationsData['query']): Promise<ListDeveloperApplicationsResponses['200']>;
|
|
23
|
+
/**
|
|
24
|
+
* Get a developer application by ID.
|
|
25
|
+
* @param developerId The developer ID.
|
|
26
|
+
* @param applicationId The application ID.
|
|
27
|
+
* @returns The developer application.
|
|
28
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
29
|
+
*/
|
|
30
|
+
get(developerId: string, applicationId: string): Promise<DeveloperApplication>;
|
|
31
|
+
/**
|
|
32
|
+
* Update a developer application.
|
|
33
|
+
* @param developerId The developer ID.
|
|
34
|
+
* @param applicationId The application ID.
|
|
35
|
+
* @param data The application data.
|
|
36
|
+
* @returns The updated developer application.
|
|
37
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
38
|
+
*/
|
|
39
|
+
update(developerId: string, applicationId: string, data: CreateDeveloperApplicationReq): Promise<DeveloperApplication>;
|
|
40
|
+
/**
|
|
41
|
+
* Delete a developer application.
|
|
42
|
+
* @param developerId The developer ID.
|
|
43
|
+
* @param applicationId The application ID.
|
|
44
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
45
|
+
*/
|
|
46
|
+
delete(developerId: string, applicationId: string): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Get API call metrics.
|
|
49
|
+
* @param query The query parameters.
|
|
50
|
+
* @returns The API call metrics.
|
|
51
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
52
|
+
*/
|
|
53
|
+
apiCall(query: GetApiCallsData['query']): Promise<GetApiCallsResponses['200']>;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=application.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../src/application.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,6BAA6B,EAE7B,oBAAoB,EAGpB,6BAA6B,EAC7B,kCAAkC,EAGlC,eAAe,EACf,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAGzD,qBAAa,cAAc;IAGb,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,SAAgB,UAAU,EAAE,wBAAwB,CAAC;gBAExB,MAAM,EAAE,MAAM;IAI3C;;;;;;OAMG;IACU,MAAM,CACjB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,6BAA6B,GACzC,OAAO,CAAC,oBAAoB,CAAC;IAUhC;;;;;OAKG;IACU,IAAI,CACf,WAAW,EAAE,MAAM,EACnB,KAAK,CAAC,EAAE,6BAA6B,CAAC,OAAO,CAAC,GAC7C,OAAO,CAAC,kCAAkC,CAAC,KAAK,CAAC,CAAC;IAUrD;;;;;;OAMG;IACU,GAAG,CACd,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,oBAAoB,CAAC;IAUhC;;;;;;;OAOG;IACU,MAAM,CACjB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,6BAA6B,GAClC,OAAO,CAAC,oBAAoB,CAAC;IAWhC;;;;;OAKG;IACU,MAAM,CACjB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,IAAI,CAAC;IAUhB;;;;;OAKG;IACU,OAAO,CAClB,KAAK,EAAE,eAAe,CAAC,OAAO,CAAC,GAC9B,OAAO,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;CAQxC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CreateApplicationCredentialReq, UpdateApplicationCredentialReq, RegenerateApplicationCredentialReq, ApplicationCredential, ListDeveloperCredentialsResponses, ListDeveloperCredentialsData, ListCredentialsResponses, ListCredentialsData } from './generated/index.js';
|
|
2
|
+
import { Client } from './generated/client/types.gen.js';
|
|
3
|
+
export declare class ApplicationCredentialAPI {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: Client);
|
|
6
|
+
create(applicationId: string, credential: CreateApplicationCredentialReq): Promise<ApplicationCredential>;
|
|
7
|
+
list(applicationId: string, query: ListDeveloperCredentialsData['query']): Promise<ListDeveloperCredentialsResponses['200']>;
|
|
8
|
+
get(applicationId: string, credentialId: string): Promise<ApplicationCredential>;
|
|
9
|
+
update(applicationId: string, credentialId: string, data: UpdateApplicationCredentialReq): Promise<ApplicationCredential>;
|
|
10
|
+
delete(applicationId: string, credentialId: string): Promise<void>;
|
|
11
|
+
regenerate(applicationId: string, credentialId: string, config: RegenerateApplicationCredentialReq): Promise<ApplicationCredential>;
|
|
12
|
+
}
|
|
13
|
+
export declare class CredentialAPI {
|
|
14
|
+
private readonly client;
|
|
15
|
+
constructor(client: Client);
|
|
16
|
+
list(query: ListCredentialsData['query']): Promise<ListCredentialsResponses['200']>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=credential.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"credential.d.ts","sourceRoot":"","sources":["../src/credential.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,8BAA8B,EAC9B,8BAA8B,EAC9B,kCAAkC,EAGlC,qBAAqB,EACrB,iCAAiC,EACjC,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAGzD,qBAAa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE9B,MAAM,CACjB,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,8BAA8B,GACzC,OAAO,CAAC,qBAAqB,CAAC;IAUpB,IAAI,CACf,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,4BAA4B,CAAC,OAAO,CAAC,GAC3C,OAAO,CAAC,iCAAiC,CAAC,KAAK,CAAC,CAAC;IAUvC,GAAG,CACd,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,qBAAqB,CAAC;IAYpB,MAAM,CACjB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,8BAA8B,GACnC,OAAO,CAAC,qBAAqB,CAAC;IAapB,MAAM,CACjB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,IAAI,CAAC;IAYH,UAAU,CACrB,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,kCAAkC,GACzC,OAAO,CAAC,qBAAqB,CAAC;CAYlC;AAED,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE9B,IAAI,CACf,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,GAClC,OAAO,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;CAQ5C"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CreateDeveloperReq, Developer, ListDevelopersData, ListDevelopersResponses } from './generated/index.js';
|
|
2
|
+
import { Client } from './generated/client/types.gen.js';
|
|
3
|
+
export declare class DeveloperAPI {
|
|
4
|
+
private readonly client;
|
|
5
|
+
constructor(client: Client);
|
|
6
|
+
/**
|
|
7
|
+
* Create a new developer.
|
|
8
|
+
* @param data The developer data.
|
|
9
|
+
* @returns The created developer.
|
|
10
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
11
|
+
*/
|
|
12
|
+
create(data: CreateDeveloperReq): Promise<Developer>;
|
|
13
|
+
/**
|
|
14
|
+
* List all developers.
|
|
15
|
+
* @param query Optional query parameters.
|
|
16
|
+
* @returns The list of developers.
|
|
17
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
18
|
+
*/
|
|
19
|
+
list(query?: ListDevelopersData['query']): Promise<ListDevelopersResponses['200']>;
|
|
20
|
+
/**
|
|
21
|
+
* Delete a developer by ID.
|
|
22
|
+
* @param id The developer ID.
|
|
23
|
+
* @throws {APIError} If the API request fails or network error occurs.
|
|
24
|
+
*/
|
|
25
|
+
delete(id: string): Promise<void>;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=developer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"developer.d.ts","sourceRoot":"","sources":["../src/developer.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,kBAAkB,EACvB,KAAK,SAAS,EACd,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAGzD,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,MAAM;IAE3C;;;;;OAKG;IACU,MAAM,CAAC,IAAI,EAAE,kBAAkB,GAAG,OAAO,CAAC,SAAS,CAAC;IAMjE;;;;;OAKG;IACU,IAAI,CACf,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,GAClC,OAAO,CAAC,uBAAuB,CAAC,KAAK,CAAC,CAAC;IAM1C;;;;OAIG;IACU,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAK/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.gen.d.ts","sourceRoot":"","sources":["../../../src/generated/client/client.gen.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAkB,MAAM,gBAAgB,CAAC;AASrE,eAAO,MAAM,YAAY,GAAI,SAAQ,MAAW,KAAG,MAiJlD,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { Auth } from '../core/auth.gen.js';
|
|
2
|
+
export type { QuerySerializerOptions } from '../core/bodySerializer.gen.js';
|
|
3
|
+
export { formDataBodySerializer, jsonBodySerializer, urlSearchParamsBodySerializer, } from '../core/bodySerializer.gen.js';
|
|
4
|
+
export { buildClientParams } from '../core/params.gen.js';
|
|
5
|
+
export { serializeQueryKeyValue } from '../core/queryKeySerializer.gen.js';
|
|
6
|
+
export { createClient } from './client.gen.js';
|
|
7
|
+
export type { Client, ClientOptions, Config, CreateClientConfig, Options, RequestOptions, RequestResult, TDataShape, } from './types.gen.js';
|
|
8
|
+
export { createConfig } from './utils.gen.js';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/client/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,YAAY,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,YAAY,EACV,MAAM,EACN,aAAa,EACb,MAAM,EACN,kBAAkB,EAClB,OAAO,EACP,cAAc,EACd,aAAa,EACb,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { AxiosError, AxiosInstance, AxiosRequestHeaders, AxiosResponse, AxiosStatic, CreateAxiosDefaults } from 'axios';
|
|
2
|
+
import { Auth } from '../core/auth.gen.js';
|
|
3
|
+
import { ServerSentEventsOptions, ServerSentEventsResult } from '../core/serverSentEvents.gen.js';
|
|
4
|
+
import { Client as CoreClient, Config as CoreConfig } from '../core/types.gen.js';
|
|
5
|
+
export interface Config<T extends ClientOptions = ClientOptions> extends Omit<CreateAxiosDefaults, 'auth' | 'baseURL' | 'headers' | 'method'>, CoreConfig {
|
|
6
|
+
/**
|
|
7
|
+
* Axios implementation. You can use this option to provide either an
|
|
8
|
+
* `AxiosStatic` or an `AxiosInstance`.
|
|
9
|
+
*
|
|
10
|
+
* @default axios
|
|
11
|
+
*/
|
|
12
|
+
axios?: AxiosStatic | AxiosInstance;
|
|
13
|
+
/**
|
|
14
|
+
* Base URL for all requests made by this client.
|
|
15
|
+
*/
|
|
16
|
+
baseURL?: T['baseURL'];
|
|
17
|
+
/**
|
|
18
|
+
* An object containing any HTTP headers that you want to pre-populate your
|
|
19
|
+
* `Headers` object with.
|
|
20
|
+
*
|
|
21
|
+
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
22
|
+
*/
|
|
23
|
+
headers?: AxiosRequestHeaders | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
24
|
+
/**
|
|
25
|
+
* Throw an error instead of returning it in the response?
|
|
26
|
+
*
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
throwOnError?: T['throwOnError'];
|
|
30
|
+
}
|
|
31
|
+
export interface RequestOptions<TData = unknown, ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
32
|
+
throwOnError: ThrowOnError;
|
|
33
|
+
}>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
34
|
+
/**
|
|
35
|
+
* Any body that you want to add to your request.
|
|
36
|
+
*
|
|
37
|
+
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
38
|
+
*/
|
|
39
|
+
body?: unknown;
|
|
40
|
+
path?: Record<string, unknown>;
|
|
41
|
+
query?: Record<string, unknown>;
|
|
42
|
+
/**
|
|
43
|
+
* Security mechanism(s) to use for the request.
|
|
44
|
+
*/
|
|
45
|
+
security?: ReadonlyArray<Auth>;
|
|
46
|
+
url: Url;
|
|
47
|
+
}
|
|
48
|
+
export interface ClientOptions {
|
|
49
|
+
baseURL?: string;
|
|
50
|
+
throwOnError?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean> = ThrowOnError extends true ? Promise<AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData>> : Promise<(AxiosResponse<TData extends Record<string, unknown> ? TData[keyof TData] : TData> & {
|
|
53
|
+
error: undefined;
|
|
54
|
+
}) | (AxiosError<TError extends Record<string, unknown> ? TError[keyof TError] : TError> & {
|
|
55
|
+
data: undefined;
|
|
56
|
+
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
57
|
+
})>;
|
|
58
|
+
type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError>;
|
|
59
|
+
type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<TData, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
|
|
60
|
+
type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false>(options: Omit<RequestOptions<TData, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError>;
|
|
61
|
+
type BuildUrlFn = <TData extends {
|
|
62
|
+
body?: unknown;
|
|
63
|
+
path?: Record<string, unknown>;
|
|
64
|
+
query?: Record<string, unknown>;
|
|
65
|
+
url: string;
|
|
66
|
+
}>(options: TData & Options<TData>) => string;
|
|
67
|
+
export type Client = CoreClient<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
|
|
68
|
+
instance: AxiosInstance;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* The `createClientConfig()` function will be called on client initialization
|
|
72
|
+
* and the returned object will become the client's initial configuration.
|
|
73
|
+
*
|
|
74
|
+
* You may want to initialize your client this way instead of calling
|
|
75
|
+
* `setConfig()`. This is useful for example if you're using Next.js
|
|
76
|
+
* to ensure your client always has the correct values.
|
|
77
|
+
*/
|
|
78
|
+
export type CreateClientConfig<T extends ClientOptions = ClientOptions> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
|
|
79
|
+
export interface TDataShape {
|
|
80
|
+
body?: unknown;
|
|
81
|
+
headers?: unknown;
|
|
82
|
+
path?: unknown;
|
|
83
|
+
query?: unknown;
|
|
84
|
+
url: string;
|
|
85
|
+
}
|
|
86
|
+
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
87
|
+
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = OmitKeys<RequestOptions<TResponse, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
88
|
+
export {};
|
|
89
|
+
//# sourceMappingURL=types.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.gen.d.ts","sourceRoot":"","sources":["../../../src/generated/client/types.gen.ts"],"names":[],"mappings":"AA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OG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,aAAa,IAAI,CACxE,QAAQ,CAAC,EAAE,MAAM,CAAC,aAAa,GAAG,CAAC,CAAC,KACjC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;AAEzC,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,KAAK,QAAQ,CAAC,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEnD,MAAM,MAAM,OAAO,CACjB,KAAK,SAAS,UAAU,GAAG,UAAU,EACrC,YAAY,SAAS,OAAO,GAAG,OAAO,EACtC,SAAS,GAAG,OAAO,IACjB,QAAQ,CACV,cAAc,CAAC,SAAS,EAAE,YAAY,CAAC,EACvC,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAClC,GACC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,OAAO,GAAG,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { QuerySerializerOptions } from '../core/bodySerializer.gen.js';
|
|
2
|
+
import { Client, ClientOptions, Config, RequestOptions } from './types.gen.js';
|
|
3
|
+
export declare const createQuerySerializer: <T = unknown>({ parameters, ...args }?: QuerySerializerOptions) => (queryParams: T) => string;
|
|
4
|
+
export declare const setAuthParams: ({ security, ...options }: Pick<Required<RequestOptions>, "security"> & Pick<RequestOptions, "auth" | "query"> & {
|
|
5
|
+
headers: Record<any, unknown>;
|
|
6
|
+
}) => Promise<void>;
|
|
7
|
+
export declare const buildUrl: Client['buildUrl'];
|
|
8
|
+
export declare const mergeConfigs: (a: Config, b: Config) => Config;
|
|
9
|
+
/**
|
|
10
|
+
* Special Axios headers keywords allowing to set headers by request method.
|
|
11
|
+
*/
|
|
12
|
+
export declare const axiosHeadersKeywords: readonly ["common", "delete", "get", "head", "patch", "post", "put"];
|
|
13
|
+
export declare const mergeHeaders: (...headers: Array<Required<Config>["headers"] | undefined>) => Record<any, unknown>;
|
|
14
|
+
export declare const createConfig: <T extends ClientOptions = ClientOptions>(override?: Config<Omit<ClientOptions, keyof T> & T>) => Config<Omit<ClientOptions, keyof T> & T>;
|
|
15
|
+
//# sourceMappingURL=utils.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.gen.d.ts","sourceRoot":"","sources":["../../../src/generated/client/utils.gen.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAO5E,OAAO,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEpF,eAAO,MAAM,qBAAqB,GAAI,CAAC,GAAG,OAAO,EAAE,0BAGhD,sBAA2B,mBACU,CAAC,WA6CxC,CAAC;AAwBF,eAAO,MAAM,aAAa,GAAU,0BAGjC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,GAC3C,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG;IACvC,OAAO,EAAE,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;CAC/B,kBAmCF,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,UAAU,CAmBvC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAInD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,sEAQvB,CAAC;AAEX,eAAO,MAAM,YAAY,GACvB,GAAG,SAAS,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,KACzD,MAAM,CAAC,GAAG,EAAE,OAAO,CAoCrB,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,aAAa,GAAG,aAAa,EAClE,WAAU,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAAM,KACtD,MAAM,CAAC,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,CAExC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ClientOptions, Config } from './client/index.js';
|
|
2
|
+
import { ClientOptions as ClientOptions2 } from './types.gen.js';
|
|
3
|
+
/**
|
|
4
|
+
* The `createClientConfig()` function will be called on client initialization
|
|
5
|
+
* and the returned object will become the client's initial configuration.
|
|
6
|
+
*
|
|
7
|
+
* You may want to initialize your client this way instead of calling
|
|
8
|
+
* `setConfig()`. This is useful for example if you're using Next.js
|
|
9
|
+
* to ensure your client always has the correct values.
|
|
10
|
+
*/
|
|
11
|
+
export type CreateClientConfig<T extends ClientOptions = ClientOptions2> = (override?: Config<ClientOptions & T>) => Config<Required<ClientOptions> & T>;
|
|
12
|
+
export declare const client: import('./client/types.gen.js').Client;
|
|
13
|
+
//# sourceMappingURL=client.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.gen.d.ts","sourceRoot":"","sources":["../../src/generated/client.gen.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,MAAM,EAA8B,MAAM,mBAAmB,CAAC;AAChG,OAAO,KAAK,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEtE;;;;;;;GAOG;AACH,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,aAAa,GAAG,cAAc,IAAI,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,aAAa,GAAG,CAAC,CAAC,KAAK,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;AAEzJ,eAAO,MAAM,MAAM,wCAA+C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type AuthToken = string | undefined;
|
|
2
|
+
export interface Auth {
|
|
3
|
+
/**
|
|
4
|
+
* Which part of the request do we use to send the auth?
|
|
5
|
+
*
|
|
6
|
+
* @default 'header'
|
|
7
|
+
*/
|
|
8
|
+
in?: 'header' | 'query' | 'cookie';
|
|
9
|
+
/**
|
|
10
|
+
* Header or query parameter name.
|
|
11
|
+
*
|
|
12
|
+
* @default 'Authorization'
|
|
13
|
+
*/
|
|
14
|
+
name?: string;
|
|
15
|
+
scheme?: 'basic' | 'bearer';
|
|
16
|
+
type: 'apiKey' | 'http';
|
|
17
|
+
}
|
|
18
|
+
export declare const getAuthToken: (auth: Auth, callback: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken) => Promise<string | undefined>;
|
|
19
|
+
//# sourceMappingURL=auth.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.gen.d.ts","sourceRoot":"","sources":["../../../src/generated/core/auth.gen.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3C,MAAM,WAAW,IAAI;IACnB;;;;OAIG;IACH,EAAE,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACnC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC5B,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,YAAY,GACvB,MAAM,IAAI,EACV,UAAU,CAAC,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC,GAAG,SAAS,KACrE,OAAO,CAAC,MAAM,GAAG,SAAS,CAiB5B,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ArrayStyle, ObjectStyle, SerializerOptions } from './pathSerializer.gen.js';
|
|
2
|
+
export type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
3
|
+
export type BodySerializer = (body: any) => any;
|
|
4
|
+
type QuerySerializerOptionsObject = {
|
|
5
|
+
allowReserved?: boolean;
|
|
6
|
+
array?: Partial<SerializerOptions<ArrayStyle>>;
|
|
7
|
+
object?: Partial<SerializerOptions<ObjectStyle>>;
|
|
8
|
+
};
|
|
9
|
+
export type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
10
|
+
/**
|
|
11
|
+
* Per-parameter serialization overrides. When provided, these settings
|
|
12
|
+
* override the global array/object settings for specific parameter names.
|
|
13
|
+
*/
|
|
14
|
+
parameters?: Record<string, QuerySerializerOptionsObject>;
|
|
15
|
+
};
|
|
16
|
+
export declare const formDataBodySerializer: {
|
|
17
|
+
bodySerializer: <T extends Record<string, any> | Array<Record<string, any>>>(body: T) => FormData;
|
|
18
|
+
};
|
|
19
|
+
export declare const jsonBodySerializer: {
|
|
20
|
+
bodySerializer: <T>(body: T) => string;
|
|
21
|
+
};
|
|
22
|
+
export declare const urlSearchParamsBodySerializer: {
|
|
23
|
+
bodySerializer: <T extends Record<string, any> | Array<Record<string, any>>>(body: T) => string;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=bodySerializer.gen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bodySerializer.gen.d.ts","sourceRoot":"","sources":["../../../src/generated/core/bodySerializer.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EACV,WAAW,EACX,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;AAEzE,MAAM,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;AAEhD,KAAK,4BAA4B,GAAG;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,UAAU,CAAC,CAAC,CAAC;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,4BAA4B,GAAG;IAClE;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;CAC3D,CAAC;AA4BF,eAAO,MAAM,sBAAsB;qBAChB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,QACnE,CAAC,KACN,QAAQ;CAgBZ,CAAC;AAEF,eAAO,MAAM,kBAAkB;qBACZ,CAAC,QAAQ,CAAC,KAAG,MAAM;CAIrC,CAAC;AAEF,eAAO,MAAM,6BAA6B;qBACvB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,QACnE,CAAC,KACN,MAAM;CAgBV,CAAC"}
|