@abliteration/sdk 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/.openapi-generator/FILES +76 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +140 -49
  5. package/dist/apis/AuthorsApi.d.ts +11 -3
  6. package/dist/apis/AuthorsApi.js +8 -0
  7. package/dist/apis/DatasetsApi.d.ts +9 -3
  8. package/dist/apis/DatasetsApi.js +6 -0
  9. package/dist/apis/IndicesApi.d.ts +9 -3
  10. package/dist/apis/IndicesApi.js +6 -0
  11. package/dist/apis/ModelsApi.d.ts +9 -3
  12. package/dist/apis/ModelsApi.js +6 -0
  13. package/dist/esm/apis/AuthorsApi.d.ts +11 -3
  14. package/dist/esm/apis/AuthorsApi.js +8 -0
  15. package/dist/esm/apis/DatasetsApi.d.ts +9 -3
  16. package/dist/esm/apis/DatasetsApi.js +6 -0
  17. package/dist/esm/apis/IndicesApi.d.ts +9 -3
  18. package/dist/esm/apis/IndicesApi.js +6 -0
  19. package/dist/esm/apis/ModelsApi.d.ts +9 -3
  20. package/dist/esm/apis/ModelsApi.js +6 -0
  21. package/dist/esm/models/Author.d.ts +4 -0
  22. package/dist/esm/models/Author.js +2 -0
  23. package/dist/esm/models/AuthorDetail.d.ts +4 -0
  24. package/dist/esm/models/AuthorDetail.js +2 -0
  25. package/dist/models/Author.d.ts +4 -0
  26. package/dist/models/Author.js +2 -0
  27. package/dist/models/AuthorDetail.d.ts +4 -0
  28. package/dist/models/AuthorDetail.js +2 -0
  29. package/docs/Author.md +44 -0
  30. package/docs/AuthorDetail.md +46 -0
  31. package/docs/AuthorsApi.md +167 -0
  32. package/docs/DaiPoint.md +38 -0
  33. package/docs/Dataset.md +54 -0
  34. package/docs/DatasetDetail.md +39 -0
  35. package/docs/DatasetsApi.md +176 -0
  36. package/docs/Envelope.md +48 -0
  37. package/docs/Event.md +46 -0
  38. package/docs/GetAuthor200Response.md +48 -0
  39. package/docs/GetDataset200Response.md +48 -0
  40. package/docs/GetIndex200Response.md +48 -0
  41. package/docs/GetMethod200Response.md +48 -0
  42. package/docs/GetModel200Response.md +48 -0
  43. package/docs/IndexDetail.md +54 -0
  44. package/docs/IndicesApi.md +153 -0
  45. package/docs/ListAuthors200Response.md +48 -0
  46. package/docs/ListDatasets200Response.md +48 -0
  47. package/docs/ListIndices200Response.md +48 -0
  48. package/docs/ListMethods200Response.md +48 -0
  49. package/docs/ListModels200Response.md +48 -0
  50. package/docs/ListTimeline200Response.md +48 -0
  51. package/docs/Method.md +44 -0
  52. package/docs/MethodDetail.md +50 -0
  53. package/docs/MethodDetailAllOfTopAuthors.md +36 -0
  54. package/docs/MethodsApi.md +153 -0
  55. package/docs/ModelDetail.md +45 -0
  56. package/docs/ModelError.md +42 -0
  57. package/docs/ModelIndex.md +52 -0
  58. package/docs/ModelSummary.md +58 -0
  59. package/docs/ModelsApi.md +191 -0
  60. package/docs/Passport.md +38 -0
  61. package/docs/TimelineApi.md +93 -0
  62. package/openapi-generator-config.json +10 -0
  63. package/package.json +14 -16
  64. package/src/apis/AuthorsApi.ts +248 -0
  65. package/src/apis/DatasetsApi.ts +278 -0
  66. package/src/apis/IndicesApi.ts +213 -0
  67. package/src/apis/MethodsApi.ts +214 -0
  68. package/src/apis/ModelsApi.ts +328 -0
  69. package/src/apis/TimelineApi.ts +148 -0
  70. package/src/apis/index.ts +8 -0
  71. package/src/index.ts +5 -0
  72. package/src/models/Author.ts +93 -0
  73. package/src/models/AuthorDetail.ts +107 -0
  74. package/src/models/DaiPoint.ts +75 -0
  75. package/src/models/Dataset.ts +123 -0
  76. package/src/models/DatasetDetail.ts +86 -0
  77. package/src/models/Envelope.ts +124 -0
  78. package/src/models/Event.ts +99 -0
  79. package/src/models/GetAuthor200Response.ts +132 -0
  80. package/src/models/GetDataset200Response.ts +132 -0
  81. package/src/models/GetIndex200Response.ts +132 -0
  82. package/src/models/GetMethod200Response.ts +132 -0
  83. package/src/models/GetModel200Response.ts +132 -0
  84. package/src/models/IndexDetail.ts +153 -0
  85. package/src/models/ListAuthors200Response.ts +132 -0
  86. package/src/models/ListDatasets200Response.ts +132 -0
  87. package/src/models/ListIndices200Response.ts +132 -0
  88. package/src/models/ListMethods200Response.ts +132 -0
  89. package/src/models/ListModels200Response.ts +132 -0
  90. package/src/models/ListTimeline200Response.ts +132 -0
  91. package/src/models/Method.ts +106 -0
  92. package/src/models/MethodDetail.ts +139 -0
  93. package/src/models/MethodDetailAllOfTopAuthors.ts +69 -0
  94. package/src/models/ModelDetail.ts +104 -0
  95. package/src/models/ModelError.ts +89 -0
  96. package/src/models/ModelIndex.ts +147 -0
  97. package/src/models/ModelSummary.ts +135 -0
  98. package/src/models/Passport.ts +75 -0
  99. package/src/models/index.ts +29 -0
  100. package/src/runtime.ts +505 -0
  101. package/tsconfig.esm.json +7 -0
  102. package/tsconfig.json +16 -0
@@ -0,0 +1,328 @@
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 GetModel200Response,
18
+ GetModel200ResponseFromJSON,
19
+ GetModel200ResponseToJSON,
20
+ } from '../models/GetModel200Response';
21
+ import {
22
+ type ListModels200Response,
23
+ ListModels200ResponseFromJSON,
24
+ ListModels200ResponseToJSON,
25
+ } from '../models/ListModels200Response';
26
+
27
+ export interface GetModelRequest {
28
+ /**
29
+ *
30
+ */
31
+ id: string;
32
+ }
33
+
34
+ export interface ListModelsRequest {
35
+ /**
36
+ * M-code, case-insensitive. See GET /api/v1/methods.
37
+ */
38
+ method?: string;
39
+ /**
40
+ * Base family, for example qwen or llama.
41
+ */
42
+ family?: string;
43
+ /**
44
+ * Publisher handle, case-insensitive.
45
+ */
46
+ author?: string;
47
+ /**
48
+ * SPDX-ish license string as published.
49
+ */
50
+ license?: string;
51
+ /**
52
+ *
53
+ */
54
+ downloadsGte?: number;
55
+ /**
56
+ *
57
+ */
58
+ downloadsLte?: number;
59
+ /**
60
+ * ISO-8601 date or timestamp, inclusive.
61
+ */
62
+ createdAfter?: string;
63
+ /**
64
+ * ISO-8601 date or timestamp, inclusive.
65
+ */
66
+ createdBefore?: string;
67
+ /**
68
+ * 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.
69
+ */
70
+ sort?: ListModelsSortEnum;
71
+ /**
72
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
73
+ */
74
+ limit?: number;
75
+ /**
76
+ * Rows to skip. Negative and non-numeric values are treated as 0.
77
+ */
78
+ offset?: number;
79
+ }
80
+
81
+ /**
82
+ * ModelsApi - interface
83
+ *
84
+ * @export
85
+ * @interface ModelsApiInterface
86
+ */
87
+ export interface ModelsApiInterface {
88
+ /**
89
+ * Creates request options for getModel without sending the request
90
+ * @param {string} id
91
+ * @throws {RequiredError}
92
+ * @memberof ModelsApiInterface
93
+ */
94
+ getModelRequestOpts(requestParameters: GetModelRequest): Promise<runtime.RequestOpts>;
95
+
96
+ /**
97
+ * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded.
98
+ * @summary Get one model
99
+ * @param {string} id
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ * @memberof ModelsApiInterface
103
+ */
104
+ getModelRaw(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModel200Response>>;
105
+
106
+ /**
107
+ * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded.
108
+ * Get one model
109
+ */
110
+ getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
111
+
112
+ /**
113
+ * Creates request options for listModels without sending the request
114
+ * @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
115
+ * @param {string} [family] Base family, for example qwen or llama.
116
+ * @param {string} [author] Publisher handle, case-insensitive.
117
+ * @param {string} [license] SPDX-ish license string as published.
118
+ * @param {number} [downloadsGte]
119
+ * @param {number} [downloadsLte]
120
+ * @param {string} [createdAfter] ISO-8601 date or timestamp, inclusive.
121
+ * @param {string} [createdBefore] ISO-8601 date or timestamp, inclusive.
122
+ * @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 &#x3D; most first, dates &#x3D; newest first). A leading &#x60;-&#x60; flips it. &#x60;created&#x60; and &#x60;first_seen&#x60; are aliases for the full column names.
123
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
124
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
125
+ * @throws {RequiredError}
126
+ * @memberof ModelsApiInterface
127
+ */
128
+ listModelsRequestOpts(requestParameters: ListModelsRequest): Promise<runtime.RequestOpts>;
129
+
130
+ /**
131
+ * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded here but remain reachable by id.
132
+ * @summary List models
133
+ * @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
134
+ * @param {string} [family] Base family, for example qwen or llama.
135
+ * @param {string} [author] Publisher handle, case-insensitive.
136
+ * @param {string} [license] SPDX-ish license string as published.
137
+ * @param {number} [downloadsGte]
138
+ * @param {number} [downloadsLte]
139
+ * @param {string} [createdAfter] ISO-8601 date or timestamp, inclusive.
140
+ * @param {string} [createdBefore] ISO-8601 date or timestamp, inclusive.
141
+ * @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 &#x3D; most first, dates &#x3D; newest first). A leading &#x60;-&#x60; flips it. &#x60;created&#x60; and &#x60;first_seen&#x60; are aliases for the full column names.
142
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
143
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
144
+ * @param {*} [options] Override http request option.
145
+ * @throws {RequiredError}
146
+ * @memberof ModelsApiInterface
147
+ */
148
+ listModelsRaw(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModels200Response>>;
149
+
150
+ /**
151
+ * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded here but remain reachable by id.
152
+ * List models
153
+ */
154
+ listModels(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModels200Response>;
155
+
156
+ }
157
+
158
+ /**
159
+ *
160
+ */
161
+ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
162
+
163
+ /**
164
+ * Creates request options for getModel without sending the request
165
+ */
166
+ async getModelRequestOpts(requestParameters: GetModelRequest): Promise<runtime.RequestOpts> {
167
+ if (requestParameters['id'] == null) {
168
+ throw new runtime.RequiredError(
169
+ 'id',
170
+ 'Required parameter "id" was null or undefined when calling getModel().'
171
+ );
172
+ }
173
+
174
+ const queryParameters: any = {};
175
+
176
+ const headerParameters: runtime.HTTPHeaders = {};
177
+
178
+ if (this.configuration && this.configuration.accessToken) {
179
+ const token = this.configuration.accessToken;
180
+ const tokenString = await token("bearerAuth", []);
181
+
182
+ if (tokenString) {
183
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
184
+ }
185
+ }
186
+
187
+ let urlPath = `/api/v1/models/{id}`;
188
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
189
+
190
+ return {
191
+ path: urlPath,
192
+ method: 'GET',
193
+ headers: headerParameters,
194
+ query: queryParameters,
195
+ };
196
+ }
197
+
198
+ /**
199
+ * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded.
200
+ * Get one model
201
+ */
202
+ async getModelRaw(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModel200Response>> {
203
+ const requestOptions = await this.getModelRequestOpts(requestParameters);
204
+ const response = await this.request(requestOptions, initOverrides);
205
+
206
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetModel200ResponseFromJSON(jsonValue));
207
+ }
208
+
209
+ /**
210
+ * Cost: 10 credits. Priced above /authors/[id], /methods/[id] and /datasets/[id] because iterating over model ids is functionally a slow dump. The id is author/name and must be percent-encoded.
211
+ * Get one model
212
+ */
213
+ async getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response> {
214
+ const response = await this.getModelRaw(requestParameters, initOverrides);
215
+ return await response.value();
216
+ }
217
+
218
+ /**
219
+ * Creates request options for listModels without sending the request
220
+ */
221
+ async listModelsRequestOpts(requestParameters: ListModelsRequest): Promise<runtime.RequestOpts> {
222
+ const queryParameters: any = {};
223
+
224
+ if (requestParameters['method'] != null) {
225
+ queryParameters['method'] = requestParameters['method'];
226
+ }
227
+
228
+ if (requestParameters['family'] != null) {
229
+ queryParameters['family'] = requestParameters['family'];
230
+ }
231
+
232
+ if (requestParameters['author'] != null) {
233
+ queryParameters['author'] = requestParameters['author'];
234
+ }
235
+
236
+ if (requestParameters['license'] != null) {
237
+ queryParameters['license'] = requestParameters['license'];
238
+ }
239
+
240
+ if (requestParameters['downloadsGte'] != null) {
241
+ queryParameters['downloads_gte'] = requestParameters['downloadsGte'];
242
+ }
243
+
244
+ if (requestParameters['downloadsLte'] != null) {
245
+ queryParameters['downloads_lte'] = requestParameters['downloadsLte'];
246
+ }
247
+
248
+ if (requestParameters['createdAfter'] != null) {
249
+ queryParameters['created_after'] = requestParameters['createdAfter'];
250
+ }
251
+
252
+ if (requestParameters['createdBefore'] != null) {
253
+ queryParameters['created_before'] = requestParameters['createdBefore'];
254
+ }
255
+
256
+ if (requestParameters['sort'] != null) {
257
+ queryParameters['sort'] = requestParameters['sort'];
258
+ }
259
+
260
+ if (requestParameters['limit'] != null) {
261
+ queryParameters['limit'] = requestParameters['limit'];
262
+ }
263
+
264
+ if (requestParameters['offset'] != null) {
265
+ queryParameters['offset'] = requestParameters['offset'];
266
+ }
267
+
268
+ const headerParameters: runtime.HTTPHeaders = {};
269
+
270
+ if (this.configuration && this.configuration.accessToken) {
271
+ const token = this.configuration.accessToken;
272
+ const tokenString = await token("bearerAuth", []);
273
+
274
+ if (tokenString) {
275
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
276
+ }
277
+ }
278
+
279
+ let urlPath = `/api/v1/models`;
280
+
281
+ return {
282
+ path: urlPath,
283
+ method: 'GET',
284
+ headers: headerParameters,
285
+ query: queryParameters,
286
+ };
287
+ }
288
+
289
+ /**
290
+ * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded here but remain reachable by id.
291
+ * List models
292
+ */
293
+ async listModelsRaw(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModels200Response>> {
294
+ const requestOptions = await this.listModelsRequestOpts(requestParameters);
295
+ const response = await this.request(requestOptions, initOverrides);
296
+
297
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListModels200ResponseFromJSON(jsonValue));
298
+ }
299
+
300
+ /**
301
+ * Cost: 5-300+ credits, stepped by returned rows and multiplied by `1 + (offset/2500)²`. A filtered lookup up to 200 rows costs 5; a 1000-row page on the first page costs 300; on offset=10000, 5100. Filter cheap, dump expensive. See /api#pricing. Delisted models are excluded here but remain reachable by id.
302
+ * List models
303
+ */
304
+ async listModels(requestParameters: ListModelsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModels200Response> {
305
+ const response = await this.listModelsRaw(requestParameters, initOverrides);
306
+ return await response.value();
307
+ }
308
+
309
+ }
310
+
311
+ /**
312
+ * @export
313
+ */
314
+ export const ListModelsSortEnum = {
315
+ Downloads: 'downloads',
316
+ Downloads2: '-downloads',
317
+ Likes: 'likes',
318
+ Likes2: '-likes',
319
+ Created: 'created',
320
+ Created2: '-created',
321
+ CreatedAt: 'created_at',
322
+ CreatedAt2: '-created_at',
323
+ FirstSeen: 'first_seen',
324
+ FirstSeen2: '-first_seen',
325
+ FirstSeenAt: 'first_seen_at',
326
+ FirstSeenAt2: '-first_seen_at',
327
+ } as const;
328
+ export type ListModelsSortEnum = typeof ListModelsSortEnum[keyof typeof ListModelsSortEnum];
@@ -0,0 +1,148 @@
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 ListTimeline200Response,
18
+ ListTimeline200ResponseFromJSON,
19
+ ListTimeline200ResponseToJSON,
20
+ } from '../models/ListTimeline200Response';
21
+
22
+ export interface ListTimelineRequest {
23
+ /**
24
+ * Inclusive lower bound on the event date, ISO-8601.
25
+ */
26
+ from?: string;
27
+ /**
28
+ * Inclusive upper bound on the event date, ISO-8601.
29
+ */
30
+ to?: string;
31
+ /**
32
+ * Event type, case-insensitive.
33
+ */
34
+ eventType?: string;
35
+ /**
36
+ *
37
+ */
38
+ limit?: number;
39
+ }
40
+
41
+ /**
42
+ * TimelineApi - interface
43
+ *
44
+ * @export
45
+ * @interface TimelineApiInterface
46
+ */
47
+ export interface TimelineApiInterface {
48
+ /**
49
+ * Creates request options for listTimeline without sending the request
50
+ * @param {string} [from] Inclusive lower bound on the event date, ISO-8601.
51
+ * @param {string} [to] Inclusive upper bound on the event date, ISO-8601.
52
+ * @param {string} [eventType] Event type, case-insensitive.
53
+ * @param {number} [limit]
54
+ * @throws {RequiredError}
55
+ * @memberof TimelineApiInterface
56
+ */
57
+ listTimelineRequestOpts(requestParameters: ListTimelineRequest): Promise<runtime.RequestOpts>;
58
+
59
+ /**
60
+ * Cost: 50 credits, flat.
61
+ * @summary Curated field events
62
+ * @param {string} [from] Inclusive lower bound on the event date, ISO-8601.
63
+ * @param {string} [to] Inclusive upper bound on the event date, ISO-8601.
64
+ * @param {string} [eventType] Event type, case-insensitive.
65
+ * @param {number} [limit]
66
+ * @param {*} [options] Override http request option.
67
+ * @throws {RequiredError}
68
+ * @memberof TimelineApiInterface
69
+ */
70
+ listTimelineRaw(requestParameters: ListTimelineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListTimeline200Response>>;
71
+
72
+ /**
73
+ * Cost: 50 credits, flat.
74
+ * Curated field events
75
+ */
76
+ listTimeline(requestParameters: ListTimelineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListTimeline200Response>;
77
+
78
+ }
79
+
80
+ /**
81
+ *
82
+ */
83
+ export class TimelineApi extends runtime.BaseAPI implements TimelineApiInterface {
84
+
85
+ /**
86
+ * Creates request options for listTimeline without sending the request
87
+ */
88
+ async listTimelineRequestOpts(requestParameters: ListTimelineRequest): Promise<runtime.RequestOpts> {
89
+ const queryParameters: any = {};
90
+
91
+ if (requestParameters['from'] != null) {
92
+ queryParameters['from'] = requestParameters['from'];
93
+ }
94
+
95
+ if (requestParameters['to'] != null) {
96
+ queryParameters['to'] = requestParameters['to'];
97
+ }
98
+
99
+ if (requestParameters['eventType'] != null) {
100
+ queryParameters['event_type'] = requestParameters['eventType'];
101
+ }
102
+
103
+ if (requestParameters['limit'] != null) {
104
+ queryParameters['limit'] = requestParameters['limit'];
105
+ }
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/timeline`;
119
+
120
+ return {
121
+ path: urlPath,
122
+ method: 'GET',
123
+ headers: headerParameters,
124
+ query: queryParameters,
125
+ };
126
+ }
127
+
128
+ /**
129
+ * Cost: 50 credits, flat.
130
+ * Curated field events
131
+ */
132
+ async listTimelineRaw(requestParameters: ListTimelineRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListTimeline200Response>> {
133
+ const requestOptions = await this.listTimelineRequestOpts(requestParameters);
134
+ const response = await this.request(requestOptions, initOverrides);
135
+
136
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListTimeline200ResponseFromJSON(jsonValue));
137
+ }
138
+
139
+ /**
140
+ * Cost: 50 credits, flat.
141
+ * Curated field events
142
+ */
143
+ async listTimeline(requestParameters: ListTimelineRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListTimeline200Response> {
144
+ const response = await this.listTimelineRaw(requestParameters, initOverrides);
145
+ return await response.value();
146
+ }
147
+
148
+ }
@@ -0,0 +1,8 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './AuthorsApi';
4
+ export * from './DatasetsApi';
5
+ export * from './IndicesApi';
6
+ export * from './MethodsApi';
7
+ export * from './ModelsApi';
8
+ export * from './TimelineApi';
package/src/index.ts ADDED
@@ -0,0 +1,5 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ export * from './runtime';
4
+ export * from './apis/index';
5
+ export * from './models/index';
@@ -0,0 +1,93 @@
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 { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface Author
20
+ */
21
+ export interface Author {
22
+ /**
23
+ * Same value as `author`; added for consistency with the other single-entity payloads.
24
+ */
25
+ id?: string;
26
+ /**
27
+ *
28
+ */
29
+ author?: string;
30
+ /**
31
+ *
32
+ */
33
+ total_models?: number;
34
+ /**
35
+ *
36
+ */
37
+ total_downloads?: number;
38
+ /**
39
+ *
40
+ */
41
+ total_likes?: number;
42
+ /**
43
+ *
44
+ */
45
+ first_seen_at?: string | null;
46
+ }
47
+
48
+ /**
49
+ * Check if a given object implements the Author interface.
50
+ */
51
+ export function instanceOfAuthor(value: object): value is Author {
52
+ return true;
53
+ }
54
+
55
+ export function AuthorFromJSON(json: any): Author {
56
+ return AuthorFromJSONTyped(json, false);
57
+ }
58
+
59
+ export function AuthorFromJSONTyped(json: any, ignoreDiscriminator: boolean): Author {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+
65
+ 'id': json['id'] == null ? undefined : json['id'],
66
+ 'author': json['author'] == null ? undefined : json['author'],
67
+ 'total_models': json['total_models'] == null ? undefined : json['total_models'],
68
+ 'total_downloads': json['total_downloads'] == null ? undefined : json['total_downloads'],
69
+ 'total_likes': json['total_likes'] == null ? undefined : json['total_likes'],
70
+ 'first_seen_at': json['first_seen_at'] === undefined ? undefined : json['first_seen_at'] === null ? null : json['first_seen_at'],
71
+ };
72
+ }
73
+
74
+ export function AuthorToJSON(json: any): Author {
75
+ return AuthorToJSONTyped(json, false);
76
+ }
77
+
78
+ export function AuthorToJSONTyped(value?: Author | null, ignoreDiscriminator: boolean = false): any {
79
+ if (value == null) {
80
+ return value;
81
+ }
82
+
83
+ return {
84
+
85
+ 'id': value['id'],
86
+ 'author': value['author'],
87
+ 'total_models': value['total_models'],
88
+ 'total_downloads': value['total_downloads'],
89
+ 'total_likes': value['total_likes'],
90
+ 'first_seen_at': value['first_seen_at'],
91
+ };
92
+ }
93
+
@@ -0,0 +1,107 @@
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 { mapValues } from '../runtime';
16
+ import type { ModelSummary } from './ModelSummary';
17
+ import {
18
+ ModelSummaryFromJSON,
19
+ ModelSummaryFromJSONTyped,
20
+ ModelSummaryToJSON,
21
+ ModelSummaryToJSONTyped,
22
+ } from './ModelSummary';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface AuthorDetail
28
+ */
29
+ export interface AuthorDetail {
30
+ /**
31
+ * Same value as `author`; added for consistency with the other single-entity payloads.
32
+ */
33
+ id?: string;
34
+ /**
35
+ *
36
+ */
37
+ author?: string;
38
+ /**
39
+ *
40
+ */
41
+ total_models?: number;
42
+ /**
43
+ *
44
+ */
45
+ total_downloads?: number;
46
+ /**
47
+ *
48
+ */
49
+ total_likes?: number;
50
+ /**
51
+ *
52
+ */
53
+ first_seen_at?: string;
54
+ /**
55
+ *
56
+ */
57
+ models?: Array<ModelSummary>;
58
+ }
59
+
60
+ /**
61
+ * Check if a given object implements the AuthorDetail interface.
62
+ */
63
+ export function instanceOfAuthorDetail(value: object): value is AuthorDetail {
64
+ return true;
65
+ }
66
+
67
+ export function AuthorDetailFromJSON(json: any): AuthorDetail {
68
+ return AuthorDetailFromJSONTyped(json, false);
69
+ }
70
+
71
+ export function AuthorDetailFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthorDetail {
72
+ if (json == null) {
73
+ return json;
74
+ }
75
+ return {
76
+
77
+ 'id': json['id'] == null ? undefined : json['id'],
78
+ 'author': json['author'] == null ? undefined : json['author'],
79
+ 'total_models': json['total_models'] == null ? undefined : json['total_models'],
80
+ 'total_downloads': json['total_downloads'] == null ? undefined : json['total_downloads'],
81
+ 'total_likes': json['total_likes'] == null ? undefined : json['total_likes'],
82
+ 'first_seen_at': json['first_seen_at'] == null ? undefined : json['first_seen_at'],
83
+ 'models': json['models'] == null ? undefined : ((json['models'] as Array<any>).map(ModelSummaryFromJSON)),
84
+ };
85
+ }
86
+
87
+ export function AuthorDetailToJSON(json: any): AuthorDetail {
88
+ return AuthorDetailToJSONTyped(json, false);
89
+ }
90
+
91
+ export function AuthorDetailToJSONTyped(value?: AuthorDetail | null, ignoreDiscriminator: boolean = false): any {
92
+ if (value == null) {
93
+ return value;
94
+ }
95
+
96
+ return {
97
+
98
+ 'id': value['id'],
99
+ 'author': value['author'],
100
+ 'total_models': value['total_models'],
101
+ 'total_downloads': value['total_downloads'],
102
+ 'total_likes': value['total_likes'],
103
+ 'first_seen_at': value['first_seen_at'],
104
+ 'models': value['models'] == null ? undefined : ((value['models'] as Array<any>).map(ModelSummaryToJSON)),
105
+ };
106
+ }
107
+