@abliteration/sdk 0.1.0 → 0.1.2
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 +76 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +140 -49
- package/dist/apis/AuthorsApi.d.ts +11 -3
- package/dist/apis/AuthorsApi.js +8 -0
- package/dist/apis/DatasetsApi.d.ts +9 -3
- package/dist/apis/DatasetsApi.js +6 -0
- package/dist/apis/IndicesApi.d.ts +9 -3
- package/dist/apis/IndicesApi.js +6 -0
- package/dist/apis/ModelsApi.d.ts +9 -3
- package/dist/apis/ModelsApi.js +6 -0
- package/dist/esm/apis/AuthorsApi.d.ts +11 -3
- package/dist/esm/apis/AuthorsApi.js +8 -0
- package/dist/esm/apis/DatasetsApi.d.ts +9 -3
- package/dist/esm/apis/DatasetsApi.js +6 -0
- package/dist/esm/apis/IndicesApi.d.ts +9 -3
- package/dist/esm/apis/IndicesApi.js +6 -0
- package/dist/esm/apis/ModelsApi.d.ts +9 -3
- package/dist/esm/apis/ModelsApi.js +6 -0
- package/dist/esm/models/Author.d.ts +4 -0
- package/dist/esm/models/Author.js +2 -0
- package/dist/esm/models/AuthorDetail.d.ts +4 -0
- package/dist/esm/models/AuthorDetail.js +2 -0
- package/dist/esm/models/Dataset.d.ts +45 -1
- package/dist/esm/models/Dataset.js +22 -0
- package/dist/esm/models/DatasetDetail.d.ts +85 -2
- package/dist/esm/models/DatasetDetail.js +52 -2
- package/dist/esm/models/ModelDetail.d.ts +173 -1
- package/dist/esm/models/ModelDetail.js +2 -2
- package/dist/models/Author.d.ts +4 -0
- package/dist/models/Author.js +2 -0
- package/dist/models/AuthorDetail.d.ts +4 -0
- package/dist/models/AuthorDetail.js +2 -0
- package/dist/models/Dataset.d.ts +45 -1
- package/dist/models/Dataset.js +22 -0
- package/dist/models/DatasetDetail.d.ts +85 -2
- package/dist/models/DatasetDetail.js +52 -2
- package/dist/models/ModelDetail.d.ts +173 -1
- package/dist/models/ModelDetail.js +2 -2
- package/docs/Author.md +44 -0
- package/docs/AuthorDetail.md +46 -0
- package/docs/AuthorsApi.md +167 -0
- package/docs/DaiPoint.md +38 -0
- package/docs/Dataset.md +76 -0
- package/docs/DatasetDetail.md +80 -0
- package/docs/DatasetsApi.md +176 -0
- package/docs/Envelope.md +48 -0
- package/docs/Event.md +46 -0
- package/docs/GetAuthor200Response.md +48 -0
- package/docs/GetDataset200Response.md +48 -0
- package/docs/GetIndex200Response.md +48 -0
- package/docs/GetMethod200Response.md +48 -0
- package/docs/GetModel200Response.md +48 -0
- package/docs/IndexDetail.md +54 -0
- package/docs/IndicesApi.md +153 -0
- package/docs/ListAuthors200Response.md +48 -0
- package/docs/ListDatasets200Response.md +48 -0
- package/docs/ListIndices200Response.md +48 -0
- package/docs/ListMethods200Response.md +48 -0
- package/docs/ListModels200Response.md +48 -0
- package/docs/ListTimeline200Response.md +48 -0
- package/docs/Method.md +44 -0
- package/docs/MethodDetail.md +50 -0
- package/docs/MethodDetailAllOfTopAuthors.md +36 -0
- package/docs/MethodsApi.md +153 -0
- package/docs/ModelDetail.md +131 -0
- package/docs/ModelError.md +42 -0
- package/docs/ModelIndex.md +52 -0
- package/docs/ModelSummary.md +58 -0
- package/docs/ModelsApi.md +191 -0
- package/docs/Passport.md +38 -0
- package/docs/TimelineApi.md +93 -0
- package/openapi-generator-config.json +10 -0
- package/package.json +14 -16
- package/src/apis/AuthorsApi.ts +248 -0
- package/src/apis/DatasetsApi.ts +278 -0
- package/src/apis/IndicesApi.ts +213 -0
- package/src/apis/MethodsApi.ts +214 -0
- package/src/apis/ModelsApi.ts +328 -0
- package/src/apis/TimelineApi.ts +148 -0
- package/src/apis/index.ts +8 -0
- package/src/index.ts +5 -0
- package/src/models/Author.ts +93 -0
- package/src/models/AuthorDetail.ts +107 -0
- package/src/models/DaiPoint.ts +75 -0
- package/src/models/Dataset.ts +189 -0
- package/src/models/DatasetDetail.ts +209 -0
- package/src/models/Envelope.ts +124 -0
- package/src/models/Event.ts +99 -0
- package/src/models/GetAuthor200Response.ts +132 -0
- package/src/models/GetDataset200Response.ts +132 -0
- package/src/models/GetIndex200Response.ts +132 -0
- package/src/models/GetMethod200Response.ts +132 -0
- package/src/models/GetModel200Response.ts +132 -0
- package/src/models/IndexDetail.ts +153 -0
- package/src/models/ListAuthors200Response.ts +132 -0
- package/src/models/ListDatasets200Response.ts +132 -0
- package/src/models/ListIndices200Response.ts +132 -0
- package/src/models/ListMethods200Response.ts +132 -0
- package/src/models/ListModels200Response.ts +132 -0
- package/src/models/ListTimeline200Response.ts +132 -0
- package/src/models/Method.ts +106 -0
- package/src/models/MethodDetail.ts +139 -0
- package/src/models/MethodDetailAllOfTopAuthors.ts +69 -0
- package/src/models/ModelDetail.ts +362 -0
- package/src/models/ModelError.ts +89 -0
- package/src/models/ModelIndex.ts +147 -0
- package/src/models/ModelSummary.ts +135 -0
- package/src/models/Passport.ts +75 -0
- package/src/models/index.ts +29 -0
- package/src/runtime.ts +505 -0
- package/tsconfig.esm.json +7 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* abliteration.org Public API
|
|
5
|
+
* Read access to the abliteration.org catalog: models and their method classification, alignment datasets and their passports, the M-code taxonomy, the four flagship indices and the curated field timeline. Every call is authenticated with a bearer key and metered in credits against the same wallet the Research Agent spends from. There is no free tier for machine traffic and no separate billing. Responses report `cost` and `credits_remaining` on every success. While `metering` reads `preview`, the cost shown is what the call will bill once metering is enabled and nothing is actually deducted; when it reads `billed`, it was.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type GetDataset200Response,
|
|
18
|
+
GetDataset200ResponseFromJSON,
|
|
19
|
+
GetDataset200ResponseToJSON,
|
|
20
|
+
} from '../models/GetDataset200Response';
|
|
21
|
+
import {
|
|
22
|
+
type ListDatasets200Response,
|
|
23
|
+
ListDatasets200ResponseFromJSON,
|
|
24
|
+
ListDatasets200ResponseToJSON,
|
|
25
|
+
} from '../models/ListDatasets200Response';
|
|
26
|
+
|
|
27
|
+
export interface GetDatasetRequest {
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
id: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ListDatasetsRequest {
|
|
35
|
+
/**
|
|
36
|
+
* Workflow stage, for example heal or extract.
|
|
37
|
+
*/
|
|
38
|
+
category?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Publisher handle, case-insensitive.
|
|
41
|
+
*/
|
|
42
|
+
author?: string;
|
|
43
|
+
/**
|
|
44
|
+
* License string as published.
|
|
45
|
+
*/
|
|
46
|
+
license?: string;
|
|
47
|
+
/**
|
|
48
|
+
* Bare key is the natural direction (downloads/likes = most first, dates = newest first). A leading `-` flips it. `created` and `first_seen` are aliases for the full column names.
|
|
49
|
+
*/
|
|
50
|
+
sort?: ListDatasetsSortEnum;
|
|
51
|
+
/**
|
|
52
|
+
* Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
53
|
+
*/
|
|
54
|
+
limit?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Rows to skip. Negative and non-numeric values are treated as 0.
|
|
57
|
+
*/
|
|
58
|
+
offset?: number;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* DatasetsApi - interface
|
|
63
|
+
*
|
|
64
|
+
* @export
|
|
65
|
+
* @interface DatasetsApiInterface
|
|
66
|
+
*/
|
|
67
|
+
export interface DatasetsApiInterface {
|
|
68
|
+
/**
|
|
69
|
+
* Creates request options for getDataset without sending the request
|
|
70
|
+
* @param {string} id
|
|
71
|
+
* @throws {RequiredError}
|
|
72
|
+
* @memberof DatasetsApiInterface
|
|
73
|
+
*/
|
|
74
|
+
getDatasetRequestOpts(requestParameters: GetDatasetRequest): Promise<runtime.RequestOpts>;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Cost: 1 credit. The passport is null for datasets that do not have one yet.
|
|
78
|
+
* @summary Get one dataset
|
|
79
|
+
* @param {string} id
|
|
80
|
+
* @param {*} [options] Override http request option.
|
|
81
|
+
* @throws {RequiredError}
|
|
82
|
+
* @memberof DatasetsApiInterface
|
|
83
|
+
*/
|
|
84
|
+
getDatasetRaw(requestParameters: GetDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDataset200Response>>;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Cost: 1 credit. The passport is null for datasets that do not have one yet.
|
|
88
|
+
* Get one dataset
|
|
89
|
+
*/
|
|
90
|
+
getDataset(requestParameters: GetDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDataset200Response>;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Creates request options for listDatasets without sending the request
|
|
94
|
+
* @param {string} [category] Workflow stage, for example heal or extract.
|
|
95
|
+
* @param {string} [author] Publisher handle, case-insensitive.
|
|
96
|
+
* @param {string} [license] License string as published.
|
|
97
|
+
* @param {'downloads' | '-downloads' | 'likes' | '-likes' | 'created' | '-created' | 'created_at' | '-created_at' | 'first_seen' | '-first_seen' | 'first_seen_at' | '-first_seen_at'} [sort] Bare key is the natural direction (downloads/likes = most first, dates = newest first). A leading `-` flips it. `created` and `first_seen` are aliases for the full column names.
|
|
98
|
+
* @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
99
|
+
* @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
|
|
100
|
+
* @throws {RequiredError}
|
|
101
|
+
* @memberof DatasetsApiInterface
|
|
102
|
+
*/
|
|
103
|
+
listDatasetsRequestOpts(requestParameters: ListDatasetsRequest): Promise<runtime.RequestOpts>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Cost: 5-15 credits, by rows returned.
|
|
107
|
+
* @summary List datasets
|
|
108
|
+
* @param {string} [category] Workflow stage, for example heal or extract.
|
|
109
|
+
* @param {string} [author] Publisher handle, case-insensitive.
|
|
110
|
+
* @param {string} [license] License string as published.
|
|
111
|
+
* @param {'downloads' | '-downloads' | 'likes' | '-likes' | 'created' | '-created' | 'created_at' | '-created_at' | 'first_seen' | '-first_seen' | 'first_seen_at' | '-first_seen_at'} [sort] Bare key is the natural direction (downloads/likes = most first, dates = newest first). A leading `-` flips it. `created` and `first_seen` are aliases for the full column names.
|
|
112
|
+
* @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
113
|
+
* @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
|
|
114
|
+
* @param {*} [options] Override http request option.
|
|
115
|
+
* @throws {RequiredError}
|
|
116
|
+
* @memberof DatasetsApiInterface
|
|
117
|
+
*/
|
|
118
|
+
listDatasetsRaw(requestParameters: ListDatasetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDatasets200Response>>;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Cost: 5-15 credits, by rows returned.
|
|
122
|
+
* List datasets
|
|
123
|
+
*/
|
|
124
|
+
listDatasets(requestParameters: ListDatasetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDatasets200Response>;
|
|
125
|
+
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
*
|
|
130
|
+
*/
|
|
131
|
+
export class DatasetsApi extends runtime.BaseAPI implements DatasetsApiInterface {
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Creates request options for getDataset without sending the request
|
|
135
|
+
*/
|
|
136
|
+
async getDatasetRequestOpts(requestParameters: GetDatasetRequest): Promise<runtime.RequestOpts> {
|
|
137
|
+
if (requestParameters['id'] == null) {
|
|
138
|
+
throw new runtime.RequiredError(
|
|
139
|
+
'id',
|
|
140
|
+
'Required parameter "id" was null or undefined when calling getDataset().'
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const queryParameters: any = {};
|
|
145
|
+
|
|
146
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
147
|
+
|
|
148
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
149
|
+
const token = this.configuration.accessToken;
|
|
150
|
+
const tokenString = await token("bearerAuth", []);
|
|
151
|
+
|
|
152
|
+
if (tokenString) {
|
|
153
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
let urlPath = `/api/v1/datasets/{id}`;
|
|
158
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
159
|
+
|
|
160
|
+
return {
|
|
161
|
+
path: urlPath,
|
|
162
|
+
method: 'GET',
|
|
163
|
+
headers: headerParameters,
|
|
164
|
+
query: queryParameters,
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Cost: 1 credit. The passport is null for datasets that do not have one yet.
|
|
170
|
+
* Get one dataset
|
|
171
|
+
*/
|
|
172
|
+
async getDatasetRaw(requestParameters: GetDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDataset200Response>> {
|
|
173
|
+
const requestOptions = await this.getDatasetRequestOpts(requestParameters);
|
|
174
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
175
|
+
|
|
176
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetDataset200ResponseFromJSON(jsonValue));
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Cost: 1 credit. The passport is null for datasets that do not have one yet.
|
|
181
|
+
* Get one dataset
|
|
182
|
+
*/
|
|
183
|
+
async getDataset(requestParameters: GetDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDataset200Response> {
|
|
184
|
+
const response = await this.getDatasetRaw(requestParameters, initOverrides);
|
|
185
|
+
return await response.value();
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Creates request options for listDatasets without sending the request
|
|
190
|
+
*/
|
|
191
|
+
async listDatasetsRequestOpts(requestParameters: ListDatasetsRequest): Promise<runtime.RequestOpts> {
|
|
192
|
+
const queryParameters: any = {};
|
|
193
|
+
|
|
194
|
+
if (requestParameters['category'] != null) {
|
|
195
|
+
queryParameters['category'] = requestParameters['category'];
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
if (requestParameters['author'] != null) {
|
|
199
|
+
queryParameters['author'] = requestParameters['author'];
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
if (requestParameters['license'] != null) {
|
|
203
|
+
queryParameters['license'] = requestParameters['license'];
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
if (requestParameters['sort'] != null) {
|
|
207
|
+
queryParameters['sort'] = requestParameters['sort'];
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (requestParameters['limit'] != null) {
|
|
211
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
if (requestParameters['offset'] != null) {
|
|
215
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
219
|
+
|
|
220
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
221
|
+
const token = this.configuration.accessToken;
|
|
222
|
+
const tokenString = await token("bearerAuth", []);
|
|
223
|
+
|
|
224
|
+
if (tokenString) {
|
|
225
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
let urlPath = `/api/v1/datasets`;
|
|
230
|
+
|
|
231
|
+
return {
|
|
232
|
+
path: urlPath,
|
|
233
|
+
method: 'GET',
|
|
234
|
+
headers: headerParameters,
|
|
235
|
+
query: queryParameters,
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
* Cost: 5-15 credits, by rows returned.
|
|
241
|
+
* List datasets
|
|
242
|
+
*/
|
|
243
|
+
async listDatasetsRaw(requestParameters: ListDatasetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDatasets200Response>> {
|
|
244
|
+
const requestOptions = await this.listDatasetsRequestOpts(requestParameters);
|
|
245
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
246
|
+
|
|
247
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListDatasets200ResponseFromJSON(jsonValue));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* Cost: 5-15 credits, by rows returned.
|
|
252
|
+
* List datasets
|
|
253
|
+
*/
|
|
254
|
+
async listDatasets(requestParameters: ListDatasetsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDatasets200Response> {
|
|
255
|
+
const response = await this.listDatasetsRaw(requestParameters, initOverrides);
|
|
256
|
+
return await response.value();
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @export
|
|
263
|
+
*/
|
|
264
|
+
export const ListDatasetsSortEnum = {
|
|
265
|
+
Downloads: 'downloads',
|
|
266
|
+
Downloads2: '-downloads',
|
|
267
|
+
Likes: 'likes',
|
|
268
|
+
Likes2: '-likes',
|
|
269
|
+
Created: 'created',
|
|
270
|
+
Created2: '-created',
|
|
271
|
+
CreatedAt: 'created_at',
|
|
272
|
+
CreatedAt2: '-created_at',
|
|
273
|
+
FirstSeen: 'first_seen',
|
|
274
|
+
FirstSeen2: '-first_seen',
|
|
275
|
+
FirstSeenAt: 'first_seen_at',
|
|
276
|
+
FirstSeenAt2: '-first_seen_at',
|
|
277
|
+
} as const;
|
|
278
|
+
export type ListDatasetsSortEnum = typeof ListDatasetsSortEnum[keyof typeof ListDatasetsSortEnum];
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* abliteration.org Public API
|
|
5
|
+
* Read access to the abliteration.org catalog: models and their method classification, alignment datasets and their passports, the M-code taxonomy, the four flagship indices and the curated field timeline. Every call is authenticated with a bearer key and metered in credits against the same wallet the Research Agent spends from. There is no free tier for machine traffic and no separate billing. Responses report `cost` and `credits_remaining` on every success. While `metering` reads `preview`, the cost shown is what the call will bill once metering is enabled and nothing is actually deducted; when it reads `billed`, it was.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type GetIndex200Response,
|
|
18
|
+
GetIndex200ResponseFromJSON,
|
|
19
|
+
GetIndex200ResponseToJSON,
|
|
20
|
+
} from '../models/GetIndex200Response';
|
|
21
|
+
import {
|
|
22
|
+
type ListIndices200Response,
|
|
23
|
+
ListIndices200ResponseFromJSON,
|
|
24
|
+
ListIndices200ResponseToJSON,
|
|
25
|
+
} from '../models/ListIndices200Response';
|
|
26
|
+
|
|
27
|
+
export interface GetIndexRequest {
|
|
28
|
+
/**
|
|
29
|
+
* Canonical id or one of the short aliases (DAI, FV, WEAP, F2W). Case-insensitive.
|
|
30
|
+
*/
|
|
31
|
+
id: GetIndexIdEnum;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* IndicesApi - interface
|
|
36
|
+
*
|
|
37
|
+
* @export
|
|
38
|
+
* @interface IndicesApiInterface
|
|
39
|
+
*/
|
|
40
|
+
export interface IndicesApiInterface {
|
|
41
|
+
/**
|
|
42
|
+
* Creates request options for getIndex without sending the request
|
|
43
|
+
* @param {'dai' | 'DAI' | 'freedom-velocity' | 'FV' | 'freedom_velocity' | 'weaponization' | 'WEAP' | 'f2w-latency' | 'F2W' | 'f2w_latency'} id Canonical id or one of the short aliases (DAI, FV, WEAP, F2W). Case-insensitive.
|
|
44
|
+
* @throws {RequiredError}
|
|
45
|
+
* @memberof IndicesApiInterface
|
|
46
|
+
*/
|
|
47
|
+
getIndexRequestOpts(requestParameters: GetIndexRequest): Promise<runtime.RequestOpts>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Cost: 10 credits. Only dai has a history series; the others return an empty array with history_available false.
|
|
51
|
+
* @summary One index with history
|
|
52
|
+
* @param {'dai' | 'DAI' | 'freedom-velocity' | 'FV' | 'freedom_velocity' | 'weaponization' | 'WEAP' | 'f2w-latency' | 'F2W' | 'f2w_latency'} id Canonical id or one of the short aliases (DAI, FV, WEAP, F2W). Case-insensitive.
|
|
53
|
+
* @param {*} [options] Override http request option.
|
|
54
|
+
* @throws {RequiredError}
|
|
55
|
+
* @memberof IndicesApiInterface
|
|
56
|
+
*/
|
|
57
|
+
getIndexRaw(requestParameters: GetIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetIndex200Response>>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Cost: 10 credits. Only dai has a history series; the others return an empty array with history_available false.
|
|
61
|
+
* One index with history
|
|
62
|
+
*/
|
|
63
|
+
getIndex(requestParameters: GetIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetIndex200Response>;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Creates request options for listIndices without sending the request
|
|
67
|
+
* @throws {RequiredError}
|
|
68
|
+
* @memberof IndicesApiInterface
|
|
69
|
+
*/
|
|
70
|
+
listIndicesRequestOpts(): Promise<runtime.RequestOpts>;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Cost: 20 credits. Check the measured flag before treating a value as a finding.
|
|
74
|
+
* @summary All four indices
|
|
75
|
+
* @param {*} [options] Override http request option.
|
|
76
|
+
* @throws {RequiredError}
|
|
77
|
+
* @memberof IndicesApiInterface
|
|
78
|
+
*/
|
|
79
|
+
listIndicesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListIndices200Response>>;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Cost: 20 credits. Check the measured flag before treating a value as a finding.
|
|
83
|
+
* All four indices
|
|
84
|
+
*/
|
|
85
|
+
listIndices(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListIndices200Response>;
|
|
86
|
+
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
*/
|
|
92
|
+
export class IndicesApi extends runtime.BaseAPI implements IndicesApiInterface {
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Creates request options for getIndex without sending the request
|
|
96
|
+
*/
|
|
97
|
+
async getIndexRequestOpts(requestParameters: GetIndexRequest): Promise<runtime.RequestOpts> {
|
|
98
|
+
if (requestParameters['id'] == null) {
|
|
99
|
+
throw new runtime.RequiredError(
|
|
100
|
+
'id',
|
|
101
|
+
'Required parameter "id" was null or undefined when calling getIndex().'
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const queryParameters: any = {};
|
|
106
|
+
|
|
107
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
108
|
+
|
|
109
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
110
|
+
const token = this.configuration.accessToken;
|
|
111
|
+
const tokenString = await token("bearerAuth", []);
|
|
112
|
+
|
|
113
|
+
if (tokenString) {
|
|
114
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
let urlPath = `/api/v1/indices/{id}`;
|
|
119
|
+
urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
|
|
120
|
+
|
|
121
|
+
return {
|
|
122
|
+
path: urlPath,
|
|
123
|
+
method: 'GET',
|
|
124
|
+
headers: headerParameters,
|
|
125
|
+
query: queryParameters,
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Cost: 10 credits. Only dai has a history series; the others return an empty array with history_available false.
|
|
131
|
+
* One index with history
|
|
132
|
+
*/
|
|
133
|
+
async getIndexRaw(requestParameters: GetIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetIndex200Response>> {
|
|
134
|
+
const requestOptions = await this.getIndexRequestOpts(requestParameters);
|
|
135
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
136
|
+
|
|
137
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetIndex200ResponseFromJSON(jsonValue));
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Cost: 10 credits. Only dai has a history series; the others return an empty array with history_available false.
|
|
142
|
+
* One index with history
|
|
143
|
+
*/
|
|
144
|
+
async getIndex(requestParameters: GetIndexRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetIndex200Response> {
|
|
145
|
+
const response = await this.getIndexRaw(requestParameters, initOverrides);
|
|
146
|
+
return await response.value();
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Creates request options for listIndices without sending the request
|
|
151
|
+
*/
|
|
152
|
+
async listIndicesRequestOpts(): Promise<runtime.RequestOpts> {
|
|
153
|
+
const queryParameters: any = {};
|
|
154
|
+
|
|
155
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
156
|
+
|
|
157
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
158
|
+
const token = this.configuration.accessToken;
|
|
159
|
+
const tokenString = await token("bearerAuth", []);
|
|
160
|
+
|
|
161
|
+
if (tokenString) {
|
|
162
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
let urlPath = `/api/v1/indices`;
|
|
167
|
+
|
|
168
|
+
return {
|
|
169
|
+
path: urlPath,
|
|
170
|
+
method: 'GET',
|
|
171
|
+
headers: headerParameters,
|
|
172
|
+
query: queryParameters,
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Cost: 20 credits. Check the measured flag before treating a value as a finding.
|
|
178
|
+
* All four indices
|
|
179
|
+
*/
|
|
180
|
+
async listIndicesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListIndices200Response>> {
|
|
181
|
+
const requestOptions = await this.listIndicesRequestOpts();
|
|
182
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
183
|
+
|
|
184
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListIndices200ResponseFromJSON(jsonValue));
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Cost: 20 credits. Check the measured flag before treating a value as a finding.
|
|
189
|
+
* All four indices
|
|
190
|
+
*/
|
|
191
|
+
async listIndices(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListIndices200Response> {
|
|
192
|
+
const response = await this.listIndicesRaw(initOverrides);
|
|
193
|
+
return await response.value();
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @export
|
|
200
|
+
*/
|
|
201
|
+
export const GetIndexIdEnum = {
|
|
202
|
+
Dai: 'dai',
|
|
203
|
+
Dai2: 'DAI',
|
|
204
|
+
FreedomVelocity: 'freedom-velocity',
|
|
205
|
+
Fv: 'FV',
|
|
206
|
+
FreedomVelocity2: 'freedom_velocity',
|
|
207
|
+
Weaponization: 'weaponization',
|
|
208
|
+
Weap: 'WEAP',
|
|
209
|
+
F2wLatency: 'f2w-latency',
|
|
210
|
+
F2W: 'F2W',
|
|
211
|
+
F2wLatency2: 'f2w_latency',
|
|
212
|
+
} as const;
|
|
213
|
+
export type GetIndexIdEnum = typeof GetIndexIdEnum[keyof typeof GetIndexIdEnum];
|