@abliteration/sdk 0.1.5 → 0.1.6

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 (50) hide show
  1. package/.openapi-generator/FILES +12 -0
  2. package/README.md +8 -0
  3. package/dist/apis/ModelsApi.d.ts +109 -0
  4. package/dist/apis/ModelsApi.js +114 -1
  5. package/dist/esm/apis/ModelsApi.d.ts +109 -0
  6. package/dist/esm/apis/ModelsApi.js +113 -0
  7. package/dist/esm/models/DeletionSummary.d.ts +52 -0
  8. package/dist/esm/models/DeletionSummary.js +53 -0
  9. package/dist/esm/models/DeletionSummaryTimelineInner.d.ts +34 -0
  10. package/dist/esm/models/DeletionSummaryTimelineInner.js +43 -0
  11. package/dist/esm/models/DeletionSummaryTopByDownloadsInner.d.ts +42 -0
  12. package/dist/esm/models/DeletionSummaryTopByDownloadsInner.js +47 -0
  13. package/dist/esm/models/GetHistoricalDeletionSummary200Response.d.ts +67 -0
  14. package/dist/esm/models/GetHistoricalDeletionSummary200Response.js +79 -0
  15. package/dist/esm/models/HistoricalDeletion.d.ts +50 -0
  16. package/dist/esm/models/HistoricalDeletion.js +51 -0
  17. package/dist/esm/models/ListHistoricalDeletions200Response.d.ts +67 -0
  18. package/dist/esm/models/ListHistoricalDeletions200Response.js +79 -0
  19. package/dist/esm/models/index.d.ts +6 -0
  20. package/dist/esm/models/index.js +6 -0
  21. package/dist/models/DeletionSummary.d.ts +52 -0
  22. package/dist/models/DeletionSummary.js +60 -0
  23. package/dist/models/DeletionSummaryTimelineInner.d.ts +34 -0
  24. package/dist/models/DeletionSummaryTimelineInner.js +50 -0
  25. package/dist/models/DeletionSummaryTopByDownloadsInner.d.ts +42 -0
  26. package/dist/models/DeletionSummaryTopByDownloadsInner.js +54 -0
  27. package/dist/models/GetHistoricalDeletionSummary200Response.d.ts +67 -0
  28. package/dist/models/GetHistoricalDeletionSummary200Response.js +87 -0
  29. package/dist/models/HistoricalDeletion.d.ts +50 -0
  30. package/dist/models/HistoricalDeletion.js +58 -0
  31. package/dist/models/ListHistoricalDeletions200Response.d.ts +67 -0
  32. package/dist/models/ListHistoricalDeletions200Response.js +87 -0
  33. package/dist/models/index.d.ts +6 -0
  34. package/dist/models/index.js +6 -0
  35. package/docs/DeletionSummary.md +45 -0
  36. package/docs/DeletionSummaryTimelineInner.md +36 -0
  37. package/docs/DeletionSummaryTopByDownloadsInner.md +40 -0
  38. package/docs/GetHistoricalDeletionSummary200Response.md +48 -0
  39. package/docs/HistoricalDeletion.md +44 -0
  40. package/docs/ListHistoricalDeletions200Response.md +48 -0
  41. package/docs/ModelsApi.md +156 -0
  42. package/package.json +1 -1
  43. package/src/apis/ModelsApi.ts +210 -0
  44. package/src/models/DeletionSummary.ts +108 -0
  45. package/src/models/DeletionSummaryTimelineInner.ts +69 -0
  46. package/src/models/DeletionSummaryTopByDownloadsInner.ts +81 -0
  47. package/src/models/GetHistoricalDeletionSummary200Response.ts +132 -0
  48. package/src/models/HistoricalDeletion.ts +93 -0
  49. package/src/models/ListHistoricalDeletions200Response.ts +132 -0
  50. package/src/models/index.ts +6 -0
package/docs/ModelsApi.md CHANGED
@@ -4,12 +4,81 @@ All URIs are relative to *https://abliteration.org*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
+ | [**getHistoricalDeletionSummary**](ModelsApi.md#gethistoricaldeletionsummary) | **GET** /api/v1/models/historical-deletions/summary | Historical deletions — aggregate summary |
7
8
  | [**getModel**](ModelsApi.md#getmodel) | **GET** /api/v1/models/{id} | Get one model |
8
9
  | [**listDelistedModels**](ModelsApi.md#listdelistedmodels) | **GET** /api/v1/models/delisted | List delisted models (change stream) |
10
+ | [**listHistoricalDeletions**](ModelsApi.md#listhistoricaldeletions) | **GET** /api/v1/models/historical-deletions/list | Historical deletions — paged list |
9
11
  | [**listModels**](ModelsApi.md#listmodels) | **GET** /api/v1/models | List models |
10
12
 
11
13
 
12
14
 
15
+ ## getHistoricalDeletionSummary
16
+
17
+ > GetHistoricalDeletionSummary200Response getHistoricalDeletionSummary()
18
+
19
+ Historical deletions — aggregate summary
20
+
21
+ Cost: 20 credits, flat. Aggregates from the 24-month HF snapshot analysis: total ever seen, total deleted, deletion rate, average months alive, monthly timeline of losses, top-10 by peak downloads. One call replaces half a dozen separate queries.
22
+
23
+ ### Example
24
+
25
+ ```ts
26
+ import {
27
+ Configuration,
28
+ ModelsApi,
29
+ } from '@abliteration/sdk';
30
+ import type { GetHistoricalDeletionSummaryRequest } from '@abliteration/sdk';
31
+
32
+ async function example() {
33
+ console.log("🚀 Testing @abliteration/sdk SDK...");
34
+ const config = new Configuration({
35
+ // Configure HTTP bearer authorization: bearerAuth
36
+ accessToken: "YOUR BEARER TOKEN",
37
+ });
38
+ const api = new ModelsApi(config);
39
+
40
+ try {
41
+ const data = await api.getHistoricalDeletionSummary();
42
+ console.log(data);
43
+ } catch (error) {
44
+ console.error(error);
45
+ }
46
+ }
47
+
48
+ // Run the test
49
+ example().catch(console.error);
50
+ ```
51
+
52
+ ### Parameters
53
+
54
+ This endpoint does not need any parameter.
55
+
56
+ ### Return type
57
+
58
+ [**GetHistoricalDeletionSummary200Response**](GetHistoricalDeletionSummary200Response.md)
59
+
60
+ ### Authorization
61
+
62
+ [bearerAuth](../README.md#bearerAuth)
63
+
64
+ ### HTTP request headers
65
+
66
+ - **Content-Type**: Not defined
67
+ - **Accept**: `application/json`
68
+
69
+
70
+ ### HTTP response details
71
+ | Status code | Description | Response headers |
72
+ |-------------|-------------|------------------|
73
+ | **200** | Deletion summary. | - |
74
+ | **401** | Missing, unknown or revoked key. | - |
75
+ | **402** | Not enough credits. Only possible while metering is enabled. | - |
76
+ | **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
77
+ | **503** | Catalog temporarily unreadable. Nothing was charged. | - |
78
+
79
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
80
+
81
+
13
82
  ## getModel
14
83
 
15
84
  > GetModel200Response getModel(id)
@@ -170,6 +239,93 @@ example().catch(console.error);
170
239
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
171
240
 
172
241
 
242
+ ## listHistoricalDeletions
243
+
244
+ > ListHistoricalDeletions200Response listHistoricalDeletions(sinceMonth, minPeakDownloads, sort, limit, offset)
245
+
246
+ Historical deletions — paged list
247
+
248
+ Cost: 5 credits, flat. Paged/filterable window on the 24-month deletion backlog. Rows are frozen at the moment the model was last seen on the Hub — peak_downloads and total_months_alive never change after death. Sort by size (`downloads`, default), recency (`recent`, newest deaths first) or lifespan (`lifespan`, longest-lived first — surprising deaths).
249
+
250
+ ### Example
251
+
252
+ ```ts
253
+ import {
254
+ Configuration,
255
+ ModelsApi,
256
+ } from '@abliteration/sdk';
257
+ import type { ListHistoricalDeletionsRequest } from '@abliteration/sdk';
258
+
259
+ async function example() {
260
+ console.log("🚀 Testing @abliteration/sdk SDK...");
261
+ const config = new Configuration({
262
+ // Configure HTTP bearer authorization: bearerAuth
263
+ accessToken: "YOUR BEARER TOKEN",
264
+ });
265
+ const api = new ModelsApi(config);
266
+
267
+ const body = {
268
+ // string | ISO YYYY-MM. Rows with last_seen_month >= it only. (optional)
269
+ sinceMonth: sinceMonth_example,
270
+ // number | Only rows whose peak downloads >= this. `casualties over N` queries. (optional)
271
+ minPeakDownloads: 56,
272
+ // 'downloads' | 'recent' | 'lifespan' | `downloads` (default, biggest first), `recent` (newest last_seen_month first), `lifespan` (longest-lived first). (optional)
273
+ sort: sort_example,
274
+ // number | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. (optional)
275
+ limit: 56,
276
+ // number | Rows to skip. Negative and non-numeric values are treated as 0. (optional)
277
+ offset: 56,
278
+ } satisfies ListHistoricalDeletionsRequest;
279
+
280
+ try {
281
+ const data = await api.listHistoricalDeletions(body);
282
+ console.log(data);
283
+ } catch (error) {
284
+ console.error(error);
285
+ }
286
+ }
287
+
288
+ // Run the test
289
+ example().catch(console.error);
290
+ ```
291
+
292
+ ### Parameters
293
+
294
+
295
+ | Name | Type | Description | Notes |
296
+ |------------- | ------------- | ------------- | -------------|
297
+ | **sinceMonth** | `string` | ISO YYYY-MM. Rows with last_seen_month >= it only. | [Optional] [Defaults to `undefined`] |
298
+ | **minPeakDownloads** | `number` | Only rows whose peak downloads >= this. `casualties over N` queries. | [Optional] [Defaults to `undefined`] |
299
+ | **sort** | `downloads`, `recent`, `lifespan` | `downloads` (default, biggest first), `recent` (newest last_seen_month first), `lifespan` (longest-lived first). | [Optional] [Defaults to `'downloads'`] [Enum: downloads, recent, lifespan] |
300
+ | **limit** | `number` | Rows to return, 1 to 1000. Values outside the range are clamped, not rejected. | [Optional] [Defaults to `50`] |
301
+ | **offset** | `number` | Rows to skip. Negative and non-numeric values are treated as 0. | [Optional] [Defaults to `0`] |
302
+
303
+ ### Return type
304
+
305
+ [**ListHistoricalDeletions200Response**](ListHistoricalDeletions200Response.md)
306
+
307
+ ### Authorization
308
+
309
+ [bearerAuth](../README.md#bearerAuth)
310
+
311
+ ### HTTP request headers
312
+
313
+ - **Content-Type**: Not defined
314
+ - **Accept**: `application/json`
315
+
316
+
317
+ ### HTTP response details
318
+ | Status code | Description | Response headers |
319
+ |-------------|-------------|------------------|
320
+ | **200** | Historical deletions. | - |
321
+ | **401** | Missing, unknown or revoked key. | - |
322
+ | **402** | Not enough credits. Only possible while metering is enabled. | - |
323
+ | **429** | Per-key rate limit exceeded. Retry-After header is set. | - |
324
+ | **503** | Catalog temporarily unreadable. Nothing was charged. | - |
325
+
326
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
327
+
328
+
173
329
  ## listModels
174
330
 
175
331
  > ListModels200Response listModels(method, family, author, license, downloadsGte, downloadsLte, createdAfter, createdBefore, delisted, sort, limit, offset)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abliteration/sdk",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "OpenAPI client for @abliteration/sdk",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -13,6 +13,11 @@
13
13
  */
14
14
 
15
15
  import * as runtime from '../runtime';
16
+ import {
17
+ type GetHistoricalDeletionSummary200Response,
18
+ GetHistoricalDeletionSummary200ResponseFromJSON,
19
+ GetHistoricalDeletionSummary200ResponseToJSON,
20
+ } from '../models/GetHistoricalDeletionSummary200Response';
16
21
  import {
17
22
  type GetModel200Response,
18
23
  GetModel200ResponseFromJSON,
@@ -23,6 +28,11 @@ import {
23
28
  ListDelistedModels200ResponseFromJSON,
24
29
  ListDelistedModels200ResponseToJSON,
25
30
  } from '../models/ListDelistedModels200Response';
31
+ import {
32
+ type ListHistoricalDeletions200Response,
33
+ ListHistoricalDeletions200ResponseFromJSON,
34
+ ListHistoricalDeletions200ResponseToJSON,
35
+ } from '../models/ListHistoricalDeletions200Response';
26
36
  import {
27
37
  type ListModels200Response,
28
38
  ListModels200ResponseFromJSON,
@@ -55,6 +65,29 @@ export interface ListDelistedModelsRequest {
55
65
  offset?: number;
56
66
  }
57
67
 
68
+ export interface ListHistoricalDeletionsRequest {
69
+ /**
70
+ * ISO YYYY-MM. Rows with last_seen_month >= it only.
71
+ */
72
+ sinceMonth?: string;
73
+ /**
74
+ * Only rows whose peak downloads >= this. `casualties over N` queries.
75
+ */
76
+ minPeakDownloads?: number;
77
+ /**
78
+ * `downloads` (default, biggest first), `recent` (newest last_seen_month first), `lifespan` (longest-lived first).
79
+ */
80
+ sort?: ListHistoricalDeletionsSortEnum;
81
+ /**
82
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
83
+ */
84
+ limit?: number;
85
+ /**
86
+ * Rows to skip. Negative and non-numeric values are treated as 0.
87
+ */
88
+ offset?: number;
89
+ }
90
+
58
91
  export interface ListModelsRequest {
59
92
  /**
60
93
  * M-code, case-insensitive. See GET /api/v1/methods.
@@ -113,6 +146,28 @@ export interface ListModelsRequest {
113
146
  * @interface ModelsApiInterface
114
147
  */
115
148
  export interface ModelsApiInterface {
149
+ /**
150
+ * Creates request options for getHistoricalDeletionSummary without sending the request
151
+ * @throws {RequiredError}
152
+ * @memberof ModelsApiInterface
153
+ */
154
+ getHistoricalDeletionSummaryRequestOpts(): Promise<runtime.RequestOpts>;
155
+
156
+ /**
157
+ * Cost: 20 credits, flat. Aggregates from the 24-month HF snapshot analysis: total ever seen, total deleted, deletion rate, average months alive, monthly timeline of losses, top-10 by peak downloads. One call replaces half a dozen separate queries.
158
+ * @summary Historical deletions — aggregate summary
159
+ * @param {*} [options] Override http request option.
160
+ * @throws {RequiredError}
161
+ * @memberof ModelsApiInterface
162
+ */
163
+ getHistoricalDeletionSummaryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHistoricalDeletionSummary200Response>>;
164
+
165
+ /**
166
+ * Cost: 20 credits, flat. Aggregates from the 24-month HF snapshot analysis: total ever seen, total deleted, deletion rate, average months alive, monthly timeline of losses, top-10 by peak downloads. One call replaces half a dozen separate queries.
167
+ * Historical deletions — aggregate summary
168
+ */
169
+ getHistoricalDeletionSummary(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetHistoricalDeletionSummary200Response>;
170
+
116
171
  /**
117
172
  * Creates request options for getModel without sending the request
118
173
  * @param {string} id
@@ -167,6 +222,38 @@ export interface ModelsApiInterface {
167
222
  */
168
223
  listDelistedModels(requestParameters: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDelistedModels200Response>;
169
224
 
225
+ /**
226
+ * Creates request options for listHistoricalDeletions without sending the request
227
+ * @param {string} [sinceMonth] ISO YYYY-MM. Rows with last_seen_month &gt;&#x3D; it only.
228
+ * @param {number} [minPeakDownloads] Only rows whose peak downloads &gt;&#x3D; this. &#x60;casualties over N&#x60; queries.
229
+ * @param {'downloads' | 'recent' | 'lifespan'} [sort] &#x60;downloads&#x60; (default, biggest first), &#x60;recent&#x60; (newest last_seen_month first), &#x60;lifespan&#x60; (longest-lived first).
230
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
231
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
232
+ * @throws {RequiredError}
233
+ * @memberof ModelsApiInterface
234
+ */
235
+ listHistoricalDeletionsRequestOpts(requestParameters: ListHistoricalDeletionsRequest): Promise<runtime.RequestOpts>;
236
+
237
+ /**
238
+ * Cost: 5 credits, flat. Paged/filterable window on the 24-month deletion backlog. Rows are frozen at the moment the model was last seen on the Hub — peak_downloads and total_months_alive never change after death. Sort by size (`downloads`, default), recency (`recent`, newest deaths first) or lifespan (`lifespan`, longest-lived first — surprising deaths).
239
+ * @summary Historical deletions — paged list
240
+ * @param {string} [sinceMonth] ISO YYYY-MM. Rows with last_seen_month &gt;&#x3D; it only.
241
+ * @param {number} [minPeakDownloads] Only rows whose peak downloads &gt;&#x3D; this. &#x60;casualties over N&#x60; queries.
242
+ * @param {'downloads' | 'recent' | 'lifespan'} [sort] &#x60;downloads&#x60; (default, biggest first), &#x60;recent&#x60; (newest last_seen_month first), &#x60;lifespan&#x60; (longest-lived first).
243
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
244
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ * @memberof ModelsApiInterface
248
+ */
249
+ listHistoricalDeletionsRaw(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListHistoricalDeletions200Response>>;
250
+
251
+ /**
252
+ * Cost: 5 credits, flat. Paged/filterable window on the 24-month deletion backlog. Rows are frozen at the moment the model was last seen on the Hub — peak_downloads and total_months_alive never change after death. Sort by size (`downloads`, default), recency (`recent`, newest deaths first) or lifespan (`lifespan`, longest-lived first — surprising deaths).
253
+ * Historical deletions — paged list
254
+ */
255
+ listHistoricalDeletions(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
256
+
170
257
  /**
171
258
  * Creates request options for listModels without sending the request
172
259
  * @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
@@ -220,6 +307,53 @@ export interface ModelsApiInterface {
220
307
  */
221
308
  export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
222
309
 
310
+ /**
311
+ * Creates request options for getHistoricalDeletionSummary without sending the request
312
+ */
313
+ async getHistoricalDeletionSummaryRequestOpts(): Promise<runtime.RequestOpts> {
314
+ const queryParameters: any = {};
315
+
316
+ const headerParameters: runtime.HTTPHeaders = {};
317
+
318
+ if (this.configuration && this.configuration.accessToken) {
319
+ const token = this.configuration.accessToken;
320
+ const tokenString = await token("bearerAuth", []);
321
+
322
+ if (tokenString) {
323
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
324
+ }
325
+ }
326
+
327
+ let urlPath = `/api/v1/models/historical-deletions/summary`;
328
+
329
+ return {
330
+ path: urlPath,
331
+ method: 'GET',
332
+ headers: headerParameters,
333
+ query: queryParameters,
334
+ };
335
+ }
336
+
337
+ /**
338
+ * Cost: 20 credits, flat. Aggregates from the 24-month HF snapshot analysis: total ever seen, total deleted, deletion rate, average months alive, monthly timeline of losses, top-10 by peak downloads. One call replaces half a dozen separate queries.
339
+ * Historical deletions — aggregate summary
340
+ */
341
+ async getHistoricalDeletionSummaryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHistoricalDeletionSummary200Response>> {
342
+ const requestOptions = await this.getHistoricalDeletionSummaryRequestOpts();
343
+ const response = await this.request(requestOptions, initOverrides);
344
+
345
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetHistoricalDeletionSummary200ResponseFromJSON(jsonValue));
346
+ }
347
+
348
+ /**
349
+ * Cost: 20 credits, flat. Aggregates from the 24-month HF snapshot analysis: total ever seen, total deleted, deletion rate, average months alive, monthly timeline of losses, top-10 by peak downloads. One call replaces half a dozen separate queries.
350
+ * Historical deletions — aggregate summary
351
+ */
352
+ async getHistoricalDeletionSummary(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetHistoricalDeletionSummary200Response> {
353
+ const response = await this.getHistoricalDeletionSummaryRaw(initOverrides);
354
+ return await response.value();
355
+ }
356
+
223
357
  /**
224
358
  * Creates request options for getModel without sending the request
225
359
  */
@@ -338,6 +472,73 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
338
472
  return await response.value();
339
473
  }
340
474
 
475
+ /**
476
+ * Creates request options for listHistoricalDeletions without sending the request
477
+ */
478
+ async listHistoricalDeletionsRequestOpts(requestParameters: ListHistoricalDeletionsRequest): Promise<runtime.RequestOpts> {
479
+ const queryParameters: any = {};
480
+
481
+ if (requestParameters['sinceMonth'] != null) {
482
+ queryParameters['since_month'] = requestParameters['sinceMonth'];
483
+ }
484
+
485
+ if (requestParameters['minPeakDownloads'] != null) {
486
+ queryParameters['min_peak_downloads'] = requestParameters['minPeakDownloads'];
487
+ }
488
+
489
+ if (requestParameters['sort'] != null) {
490
+ queryParameters['sort'] = requestParameters['sort'];
491
+ }
492
+
493
+ if (requestParameters['limit'] != null) {
494
+ queryParameters['limit'] = requestParameters['limit'];
495
+ }
496
+
497
+ if (requestParameters['offset'] != null) {
498
+ queryParameters['offset'] = requestParameters['offset'];
499
+ }
500
+
501
+ const headerParameters: runtime.HTTPHeaders = {};
502
+
503
+ if (this.configuration && this.configuration.accessToken) {
504
+ const token = this.configuration.accessToken;
505
+ const tokenString = await token("bearerAuth", []);
506
+
507
+ if (tokenString) {
508
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
509
+ }
510
+ }
511
+
512
+ let urlPath = `/api/v1/models/historical-deletions/list`;
513
+
514
+ return {
515
+ path: urlPath,
516
+ method: 'GET',
517
+ headers: headerParameters,
518
+ query: queryParameters,
519
+ };
520
+ }
521
+
522
+ /**
523
+ * Cost: 5 credits, flat. Paged/filterable window on the 24-month deletion backlog. Rows are frozen at the moment the model was last seen on the Hub — peak_downloads and total_months_alive never change after death. Sort by size (`downloads`, default), recency (`recent`, newest deaths first) or lifespan (`lifespan`, longest-lived first — surprising deaths).
524
+ * Historical deletions — paged list
525
+ */
526
+ async listHistoricalDeletionsRaw(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListHistoricalDeletions200Response>> {
527
+ const requestOptions = await this.listHistoricalDeletionsRequestOpts(requestParameters);
528
+ const response = await this.request(requestOptions, initOverrides);
529
+
530
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListHistoricalDeletions200ResponseFromJSON(jsonValue));
531
+ }
532
+
533
+ /**
534
+ * Cost: 5 credits, flat. Paged/filterable window on the 24-month deletion backlog. Rows are frozen at the moment the model was last seen on the Hub — peak_downloads and total_months_alive never change after death. Sort by size (`downloads`, default), recency (`recent`, newest deaths first) or lifespan (`lifespan`, longest-lived first — surprising deaths).
535
+ * Historical deletions — paged list
536
+ */
537
+ async listHistoricalDeletions(requestParameters: ListHistoricalDeletionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response> {
538
+ const response = await this.listHistoricalDeletionsRaw(requestParameters, initOverrides);
539
+ return await response.value();
540
+ }
541
+
341
542
  /**
342
543
  * Creates request options for listModels without sending the request
343
544
  */
@@ -443,6 +644,15 @@ export const ListDelistedModelsSortEnum = {
443
644
  Downloads: 'downloads',
444
645
  } as const;
445
646
  export type ListDelistedModelsSortEnum = typeof ListDelistedModelsSortEnum[keyof typeof ListDelistedModelsSortEnum];
647
+ /**
648
+ * @export
649
+ */
650
+ export const ListHistoricalDeletionsSortEnum = {
651
+ Downloads: 'downloads',
652
+ Recent: 'recent',
653
+ Lifespan: 'lifespan',
654
+ } as const;
655
+ export type ListHistoricalDeletionsSortEnum = typeof ListHistoricalDeletionsSortEnum[keyof typeof ListHistoricalDeletionsSortEnum];
446
656
  /**
447
657
  * @export
448
658
  */
@@ -0,0 +1,108 @@
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 { DeletionSummaryTopByDownloadsInner } from './DeletionSummaryTopByDownloadsInner';
17
+ import {
18
+ DeletionSummaryTopByDownloadsInnerFromJSON,
19
+ DeletionSummaryTopByDownloadsInnerFromJSONTyped,
20
+ DeletionSummaryTopByDownloadsInnerToJSON,
21
+ DeletionSummaryTopByDownloadsInnerToJSONTyped,
22
+ } from './DeletionSummaryTopByDownloadsInner';
23
+ import type { DeletionSummaryTimelineInner } from './DeletionSummaryTimelineInner';
24
+ import {
25
+ DeletionSummaryTimelineInnerFromJSON,
26
+ DeletionSummaryTimelineInnerFromJSONTyped,
27
+ DeletionSummaryTimelineInnerToJSON,
28
+ DeletionSummaryTimelineInnerToJSONTyped,
29
+ } from './DeletionSummaryTimelineInner';
30
+
31
+ /**
32
+ * Aggregate rollup of the 24-month HF deletion analysis.
33
+ * @export
34
+ * @interface DeletionSummary
35
+ */
36
+ export interface DeletionSummary {
37
+ /**
38
+ * Live catalog size plus historical deletions.
39
+ */
40
+ total_ever_seen?: number;
41
+ /**
42
+ *
43
+ */
44
+ total_deleted?: number;
45
+ /**
46
+ * Percentage of ever-seen models that are now gone.
47
+ */
48
+ deletion_rate_pct?: number;
49
+ /**
50
+ * Average lifespan of deleted models, in months.
51
+ */
52
+ avg_months_alive?: number;
53
+ /**
54
+ * Deletions grouped by last_seen_month, ascending.
55
+ */
56
+ timeline?: Array<DeletionSummaryTimelineInner>;
57
+ /**
58
+ * Top-10 biggest casualties by peak downloads.
59
+ */
60
+ top_by_downloads?: Array<DeletionSummaryTopByDownloadsInner>;
61
+ }
62
+
63
+ /**
64
+ * Check if a given object implements the DeletionSummary interface.
65
+ */
66
+ export function instanceOfDeletionSummary(value: object): value is DeletionSummary {
67
+ return true;
68
+ }
69
+
70
+ export function DeletionSummaryFromJSON(json: any): DeletionSummary {
71
+ return DeletionSummaryFromJSONTyped(json, false);
72
+ }
73
+
74
+ export function DeletionSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeletionSummary {
75
+ if (json == null) {
76
+ return json;
77
+ }
78
+ return {
79
+
80
+ 'total_ever_seen': json['total_ever_seen'] == null ? undefined : json['total_ever_seen'],
81
+ 'total_deleted': json['total_deleted'] == null ? undefined : json['total_deleted'],
82
+ 'deletion_rate_pct': json['deletion_rate_pct'] == null ? undefined : json['deletion_rate_pct'],
83
+ 'avg_months_alive': json['avg_months_alive'] == null ? undefined : json['avg_months_alive'],
84
+ 'timeline': json['timeline'] == null ? undefined : ((json['timeline'] as Array<any>).map(DeletionSummaryTimelineInnerFromJSON)),
85
+ 'top_by_downloads': json['top_by_downloads'] == null ? undefined : ((json['top_by_downloads'] as Array<any>).map(DeletionSummaryTopByDownloadsInnerFromJSON)),
86
+ };
87
+ }
88
+
89
+ export function DeletionSummaryToJSON(json: any): DeletionSummary {
90
+ return DeletionSummaryToJSONTyped(json, false);
91
+ }
92
+
93
+ export function DeletionSummaryToJSONTyped(value?: DeletionSummary | null, ignoreDiscriminator: boolean = false): any {
94
+ if (value == null) {
95
+ return value;
96
+ }
97
+
98
+ return {
99
+
100
+ 'total_ever_seen': value['total_ever_seen'],
101
+ 'total_deleted': value['total_deleted'],
102
+ 'deletion_rate_pct': value['deletion_rate_pct'],
103
+ 'avg_months_alive': value['avg_months_alive'],
104
+ 'timeline': value['timeline'] == null ? undefined : ((value['timeline'] as Array<any>).map(DeletionSummaryTimelineInnerToJSON)),
105
+ 'top_by_downloads': value['top_by_downloads'] == null ? undefined : ((value['top_by_downloads'] as Array<any>).map(DeletionSummaryTopByDownloadsInnerToJSON)),
106
+ };
107
+ }
108
+
@@ -0,0 +1,69 @@
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 DeletionSummaryTimelineInner
20
+ */
21
+ export interface DeletionSummaryTimelineInner {
22
+ /**
23
+ *
24
+ */
25
+ month?: string;
26
+ /**
27
+ *
28
+ */
29
+ count?: number;
30
+ }
31
+
32
+ /**
33
+ * Check if a given object implements the DeletionSummaryTimelineInner interface.
34
+ */
35
+ export function instanceOfDeletionSummaryTimelineInner(value: object): value is DeletionSummaryTimelineInner {
36
+ return true;
37
+ }
38
+
39
+ export function DeletionSummaryTimelineInnerFromJSON(json: any): DeletionSummaryTimelineInner {
40
+ return DeletionSummaryTimelineInnerFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function DeletionSummaryTimelineInnerFromJSONTyped(json: any, ignoreDiscriminator: boolean): DeletionSummaryTimelineInner {
44
+ if (json == null) {
45
+ return json;
46
+ }
47
+ return {
48
+
49
+ 'month': json['month'] == null ? undefined : json['month'],
50
+ 'count': json['count'] == null ? undefined : json['count'],
51
+ };
52
+ }
53
+
54
+ export function DeletionSummaryTimelineInnerToJSON(json: any): DeletionSummaryTimelineInner {
55
+ return DeletionSummaryTimelineInnerToJSONTyped(json, false);
56
+ }
57
+
58
+ export function DeletionSummaryTimelineInnerToJSONTyped(value?: DeletionSummaryTimelineInner | null, ignoreDiscriminator: boolean = false): any {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+
63
+ return {
64
+
65
+ 'month': value['month'],
66
+ 'count': value['count'],
67
+ };
68
+ }
69
+