@abliteration/sdk 0.1.5 → 0.1.7

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 (74) hide show
  1. package/.openapi-generator/FILES +20 -0
  2. package/README.md +14 -0
  3. package/dist/apis/ModelsApi.d.ts +217 -0
  4. package/dist/apis/ModelsApi.js +225 -1
  5. package/dist/esm/apis/ModelsApi.d.ts +217 -0
  6. package/dist/esm/apis/ModelsApi.js +224 -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/GetModelReadmeAt200Response.d.ts +67 -0
  16. package/dist/esm/models/GetModelReadmeAt200Response.js +79 -0
  17. package/dist/esm/models/HistoricalDeletion.d.ts +50 -0
  18. package/dist/esm/models/HistoricalDeletion.js +51 -0
  19. package/dist/esm/models/ListHistoricalDeletions200Response.d.ts +67 -0
  20. package/dist/esm/models/ListHistoricalDeletions200Response.js +79 -0
  21. package/dist/esm/models/ListModelReadmeDrifts200Response.d.ts +67 -0
  22. package/dist/esm/models/ListModelReadmeDrifts200Response.js +79 -0
  23. package/dist/esm/models/ReadmeAt.d.ts +38 -0
  24. package/dist/esm/models/ReadmeAt.js +45 -0
  25. package/dist/esm/models/ReadmeDrift.d.ts +46 -0
  26. package/dist/esm/models/ReadmeDrift.js +49 -0
  27. package/dist/esm/models/index.d.ts +10 -0
  28. package/dist/esm/models/index.js +10 -0
  29. package/dist/models/DeletionSummary.d.ts +52 -0
  30. package/dist/models/DeletionSummary.js +60 -0
  31. package/dist/models/DeletionSummaryTimelineInner.d.ts +34 -0
  32. package/dist/models/DeletionSummaryTimelineInner.js +50 -0
  33. package/dist/models/DeletionSummaryTopByDownloadsInner.d.ts +42 -0
  34. package/dist/models/DeletionSummaryTopByDownloadsInner.js +54 -0
  35. package/dist/models/GetHistoricalDeletionSummary200Response.d.ts +67 -0
  36. package/dist/models/GetHistoricalDeletionSummary200Response.js +87 -0
  37. package/dist/models/GetModelReadmeAt200Response.d.ts +67 -0
  38. package/dist/models/GetModelReadmeAt200Response.js +87 -0
  39. package/dist/models/HistoricalDeletion.d.ts +50 -0
  40. package/dist/models/HistoricalDeletion.js +58 -0
  41. package/dist/models/ListHistoricalDeletions200Response.d.ts +67 -0
  42. package/dist/models/ListHistoricalDeletions200Response.js +87 -0
  43. package/dist/models/ListModelReadmeDrifts200Response.d.ts +67 -0
  44. package/dist/models/ListModelReadmeDrifts200Response.js +87 -0
  45. package/dist/models/ReadmeAt.d.ts +38 -0
  46. package/dist/models/ReadmeAt.js +52 -0
  47. package/dist/models/ReadmeDrift.d.ts +46 -0
  48. package/dist/models/ReadmeDrift.js +56 -0
  49. package/dist/models/index.d.ts +10 -0
  50. package/dist/models/index.js +10 -0
  51. package/docs/DeletionSummary.md +45 -0
  52. package/docs/DeletionSummaryTimelineInner.md +36 -0
  53. package/docs/DeletionSummaryTopByDownloadsInner.md +40 -0
  54. package/docs/GetHistoricalDeletionSummary200Response.md +48 -0
  55. package/docs/GetModelReadmeAt200Response.md +48 -0
  56. package/docs/HistoricalDeletion.md +44 -0
  57. package/docs/ListHistoricalDeletions200Response.md +48 -0
  58. package/docs/ListModelReadmeDrifts200Response.md +48 -0
  59. package/docs/ModelsApi.md +321 -0
  60. package/docs/ReadmeAt.md +39 -0
  61. package/docs/ReadmeDrift.md +43 -0
  62. package/package.json +1 -1
  63. package/src/apis/ModelsApi.ts +436 -0
  64. package/src/models/DeletionSummary.ts +108 -0
  65. package/src/models/DeletionSummaryTimelineInner.ts +69 -0
  66. package/src/models/DeletionSummaryTopByDownloadsInner.ts +81 -0
  67. package/src/models/GetHistoricalDeletionSummary200Response.ts +132 -0
  68. package/src/models/GetModelReadmeAt200Response.ts +132 -0
  69. package/src/models/HistoricalDeletion.ts +93 -0
  70. package/src/models/ListHistoricalDeletions200Response.ts +132 -0
  71. package/src/models/ListModelReadmeDrifts200Response.ts +132 -0
  72. package/src/models/ReadmeAt.ts +75 -0
  73. package/src/models/ReadmeDrift.ts +87 -0
  74. package/src/models/index.ts +10 -0
@@ -22,15 +22,63 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.ListModelsSortEnum = exports.ListModelsDelistedEnum = exports.ListDelistedModelsSortEnum = exports.ModelsApi = void 0;
25
+ exports.ListModelsSortEnum = exports.ListModelsDelistedEnum = exports.ListHistoricalDeletionsSortEnum = exports.ListDelistedModelsSortEnum = exports.ModelsApi = void 0;
26
26
  const runtime = require("../runtime");
27
+ const GetHistoricalDeletionSummary200Response_1 = require("../models/GetHistoricalDeletionSummary200Response");
27
28
  const GetModel200Response_1 = require("../models/GetModel200Response");
29
+ const GetModelReadmeAt200Response_1 = require("../models/GetModelReadmeAt200Response");
28
30
  const ListDelistedModels200Response_1 = require("../models/ListDelistedModels200Response");
31
+ const ListHistoricalDeletions200Response_1 = require("../models/ListHistoricalDeletions200Response");
32
+ const ListModelReadmeDrifts200Response_1 = require("../models/ListModelReadmeDrifts200Response");
29
33
  const ListModels200Response_1 = require("../models/ListModels200Response");
30
34
  /**
31
35
  *
32
36
  */
33
37
  class ModelsApi extends runtime.BaseAPI {
38
+ /**
39
+ * Creates request options for getHistoricalDeletionSummary without sending the request
40
+ */
41
+ getHistoricalDeletionSummaryRequestOpts() {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ const queryParameters = {};
44
+ const headerParameters = {};
45
+ if (this.configuration && this.configuration.accessToken) {
46
+ const token = this.configuration.accessToken;
47
+ const tokenString = yield token("bearerAuth", []);
48
+ if (tokenString) {
49
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
50
+ }
51
+ }
52
+ let urlPath = `/api/v1/models/historical-deletions/summary`;
53
+ return {
54
+ path: urlPath,
55
+ method: 'GET',
56
+ headers: headerParameters,
57
+ query: queryParameters,
58
+ };
59
+ });
60
+ }
61
+ /**
62
+ * 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.
63
+ * Historical deletions — aggregate summary
64
+ */
65
+ getHistoricalDeletionSummaryRaw(initOverrides) {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const requestOptions = yield this.getHistoricalDeletionSummaryRequestOpts();
68
+ const response = yield this.request(requestOptions, initOverrides);
69
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetHistoricalDeletionSummary200Response_1.GetHistoricalDeletionSummary200ResponseFromJSON)(jsonValue));
70
+ });
71
+ }
72
+ /**
73
+ * 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.
74
+ * Historical deletions — aggregate summary
75
+ */
76
+ getHistoricalDeletionSummary(initOverrides) {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ const response = yield this.getHistoricalDeletionSummaryRaw(initOverrides);
79
+ return yield response.value();
80
+ });
81
+ }
34
82
  /**
35
83
  * Creates request options for getModel without sending the request
36
84
  */
@@ -79,6 +127,58 @@ class ModelsApi extends runtime.BaseAPI {
79
127
  return yield response.value();
80
128
  });
81
129
  }
130
+ /**
131
+ * Creates request options for getModelReadmeAt without sending the request
132
+ */
133
+ getModelReadmeAtRequestOpts(requestParameters) {
134
+ return __awaiter(this, void 0, void 0, function* () {
135
+ if (requestParameters['id'] == null) {
136
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getModelReadmeAt().');
137
+ }
138
+ if (requestParameters['commit'] == null) {
139
+ throw new runtime.RequiredError('commit', 'Required parameter "commit" was null or undefined when calling getModelReadmeAt().');
140
+ }
141
+ const queryParameters = {};
142
+ const headerParameters = {};
143
+ if (this.configuration && this.configuration.accessToken) {
144
+ const token = this.configuration.accessToken;
145
+ const tokenString = yield token("bearerAuth", []);
146
+ if (tokenString) {
147
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
148
+ }
149
+ }
150
+ let urlPath = `/api/v1/models/{id}/readme-at/{commit}`;
151
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
152
+ urlPath = urlPath.replace('{commit}', encodeURIComponent(String(requestParameters['commit'])));
153
+ return {
154
+ path: urlPath,
155
+ method: 'GET',
156
+ headers: headerParameters,
157
+ query: queryParameters,
158
+ };
159
+ });
160
+ }
161
+ /**
162
+ * Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
163
+ * README content at one commit (wayback)
164
+ */
165
+ getModelReadmeAtRaw(requestParameters, initOverrides) {
166
+ return __awaiter(this, void 0, void 0, function* () {
167
+ const requestOptions = yield this.getModelReadmeAtRequestOpts(requestParameters);
168
+ const response = yield this.request(requestOptions, initOverrides);
169
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetModelReadmeAt200Response_1.GetModelReadmeAt200ResponseFromJSON)(jsonValue));
170
+ });
171
+ }
172
+ /**
173
+ * Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
174
+ * README content at one commit (wayback)
175
+ */
176
+ getModelReadmeAt(requestParameters, initOverrides) {
177
+ return __awaiter(this, void 0, void 0, function* () {
178
+ const response = yield this.getModelReadmeAtRaw(requestParameters, initOverrides);
179
+ return yield response.value();
180
+ });
181
+ }
82
182
  /**
83
183
  * Creates request options for listDelistedModels without sending the request
84
184
  */
@@ -135,6 +235,122 @@ class ModelsApi extends runtime.BaseAPI {
135
235
  return yield response.value();
136
236
  });
137
237
  }
238
+ /**
239
+ * Creates request options for listHistoricalDeletions without sending the request
240
+ */
241
+ listHistoricalDeletionsRequestOpts(requestParameters) {
242
+ return __awaiter(this, void 0, void 0, function* () {
243
+ const queryParameters = {};
244
+ if (requestParameters['sinceMonth'] != null) {
245
+ queryParameters['since_month'] = requestParameters['sinceMonth'];
246
+ }
247
+ if (requestParameters['minPeakDownloads'] != null) {
248
+ queryParameters['min_peak_downloads'] = requestParameters['minPeakDownloads'];
249
+ }
250
+ if (requestParameters['sort'] != null) {
251
+ queryParameters['sort'] = requestParameters['sort'];
252
+ }
253
+ if (requestParameters['limit'] != null) {
254
+ queryParameters['limit'] = requestParameters['limit'];
255
+ }
256
+ if (requestParameters['offset'] != null) {
257
+ queryParameters['offset'] = requestParameters['offset'];
258
+ }
259
+ const headerParameters = {};
260
+ if (this.configuration && this.configuration.accessToken) {
261
+ const token = this.configuration.accessToken;
262
+ const tokenString = yield token("bearerAuth", []);
263
+ if (tokenString) {
264
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
265
+ }
266
+ }
267
+ let urlPath = `/api/v1/models/historical-deletions/list`;
268
+ return {
269
+ path: urlPath,
270
+ method: 'GET',
271
+ headers: headerParameters,
272
+ query: queryParameters,
273
+ };
274
+ });
275
+ }
276
+ /**
277
+ * 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).
278
+ * Historical deletions — paged list
279
+ */
280
+ listHistoricalDeletionsRaw(requestParameters, initOverrides) {
281
+ return __awaiter(this, void 0, void 0, function* () {
282
+ const requestOptions = yield this.listHistoricalDeletionsRequestOpts(requestParameters);
283
+ const response = yield this.request(requestOptions, initOverrides);
284
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListHistoricalDeletions200Response_1.ListHistoricalDeletions200ResponseFromJSON)(jsonValue));
285
+ });
286
+ }
287
+ /**
288
+ * 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).
289
+ * Historical deletions — paged list
290
+ */
291
+ listHistoricalDeletions() {
292
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
293
+ const response = yield this.listHistoricalDeletionsRaw(requestParameters, initOverrides);
294
+ return yield response.value();
295
+ });
296
+ }
297
+ /**
298
+ * Creates request options for listModelReadmeDrifts without sending the request
299
+ */
300
+ listModelReadmeDriftsRequestOpts(requestParameters) {
301
+ return __awaiter(this, void 0, void 0, function* () {
302
+ if (requestParameters['id'] == null) {
303
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling listModelReadmeDrifts().');
304
+ }
305
+ const queryParameters = {};
306
+ if (requestParameters['sinceTs'] != null) {
307
+ queryParameters['since_ts'] = requestParameters['sinceTs'];
308
+ }
309
+ if (requestParameters['limit'] != null) {
310
+ queryParameters['limit'] = requestParameters['limit'];
311
+ }
312
+ if (requestParameters['offset'] != null) {
313
+ queryParameters['offset'] = requestParameters['offset'];
314
+ }
315
+ const headerParameters = {};
316
+ if (this.configuration && this.configuration.accessToken) {
317
+ const token = this.configuration.accessToken;
318
+ const tokenString = yield token("bearerAuth", []);
319
+ if (tokenString) {
320
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
321
+ }
322
+ }
323
+ let urlPath = `/api/v1/models/{id}/drifts`;
324
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
325
+ return {
326
+ path: urlPath,
327
+ method: 'GET',
328
+ headers: headerParameters,
329
+ query: queryParameters,
330
+ };
331
+ });
332
+ }
333
+ /**
334
+ * Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
335
+ * README drift stream for one model
336
+ */
337
+ listModelReadmeDriftsRaw(requestParameters, initOverrides) {
338
+ return __awaiter(this, void 0, void 0, function* () {
339
+ const requestOptions = yield this.listModelReadmeDriftsRequestOpts(requestParameters);
340
+ const response = yield this.request(requestOptions, initOverrides);
341
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListModelReadmeDrifts200Response_1.ListModelReadmeDrifts200ResponseFromJSON)(jsonValue));
342
+ });
343
+ }
344
+ /**
345
+ * Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
346
+ * README drift stream for one model
347
+ */
348
+ listModelReadmeDrifts(requestParameters, initOverrides) {
349
+ return __awaiter(this, void 0, void 0, function* () {
350
+ const response = yield this.listModelReadmeDriftsRaw(requestParameters, initOverrides);
351
+ return yield response.value();
352
+ });
353
+ }
138
354
  /**
139
355
  * Creates request options for listModels without sending the request
140
356
  */
@@ -224,6 +440,14 @@ exports.ListDelistedModelsSortEnum = {
224
440
  Recent: 'recent',
225
441
  Downloads: 'downloads',
226
442
  };
443
+ /**
444
+ * @export
445
+ */
446
+ exports.ListHistoricalDeletionsSortEnum = {
447
+ Downloads: 'downloads',
448
+ Recent: 'recent',
449
+ Lifespan: 'lifespan',
450
+ };
227
451
  /**
228
452
  * @export
229
453
  */
@@ -10,8 +10,12 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
+ import { type GetHistoricalDeletionSummary200Response } from '../models/GetHistoricalDeletionSummary200Response';
13
14
  import { type GetModel200Response } from '../models/GetModel200Response';
15
+ import { type GetModelReadmeAt200Response } from '../models/GetModelReadmeAt200Response';
14
16
  import { type ListDelistedModels200Response } from '../models/ListDelistedModels200Response';
17
+ import { type ListHistoricalDeletions200Response } from '../models/ListHistoricalDeletions200Response';
18
+ import { type ListModelReadmeDrifts200Response } from '../models/ListModelReadmeDrifts200Response';
15
19
  import { type ListModels200Response } from '../models/ListModels200Response';
16
20
  export interface GetModelRequest {
17
21
  /**
@@ -19,6 +23,16 @@ export interface GetModelRequest {
19
23
  */
20
24
  id: string;
21
25
  }
26
+ export interface GetModelReadmeAtRequest {
27
+ /**
28
+ *
29
+ */
30
+ id: string;
31
+ /**
32
+ * HF commit sha for the README, from /drifts.
33
+ */
34
+ commit: string;
35
+ }
22
36
  export interface ListDelistedModelsRequest {
23
37
  /**
24
38
  * ISO-8601 date or timestamp. Rows with last_seen_at >= since only. Use your previous poll's newest last_seen_at to build an incremental feed.
@@ -37,6 +51,46 @@ export interface ListDelistedModelsRequest {
37
51
  */
38
52
  offset?: number;
39
53
  }
54
+ export interface ListHistoricalDeletionsRequest {
55
+ /**
56
+ * ISO YYYY-MM. Rows with last_seen_month >= it only.
57
+ */
58
+ sinceMonth?: string;
59
+ /**
60
+ * Only rows whose peak downloads >= this. `casualties over N` queries.
61
+ */
62
+ minPeakDownloads?: number;
63
+ /**
64
+ * `downloads` (default, biggest first), `recent` (newest last_seen_month first), `lifespan` (longest-lived first).
65
+ */
66
+ sort?: ListHistoricalDeletionsSortEnum;
67
+ /**
68
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
69
+ */
70
+ limit?: number;
71
+ /**
72
+ * Rows to skip. Negative and non-numeric values are treated as 0.
73
+ */
74
+ offset?: number;
75
+ }
76
+ export interface ListModelReadmeDriftsRequest {
77
+ /**
78
+ *
79
+ */
80
+ id: string;
81
+ /**
82
+ * Unix epoch seconds. Rows with commit_ts >= it only.
83
+ */
84
+ sinceTs?: number;
85
+ /**
86
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
87
+ */
88
+ limit?: number;
89
+ /**
90
+ * Rows to skip. Negative and non-numeric values are treated as 0.
91
+ */
92
+ offset?: number;
93
+ }
40
94
  export interface ListModelsRequest {
41
95
  /**
42
96
  * M-code, case-insensitive. See GET /api/v1/methods.
@@ -94,6 +148,25 @@ export interface ListModelsRequest {
94
148
  * @interface ModelsApiInterface
95
149
  */
96
150
  export interface ModelsApiInterface {
151
+ /**
152
+ * Creates request options for getHistoricalDeletionSummary without sending the request
153
+ * @throws {RequiredError}
154
+ * @memberof ModelsApiInterface
155
+ */
156
+ getHistoricalDeletionSummaryRequestOpts(): Promise<runtime.RequestOpts>;
157
+ /**
158
+ * 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.
159
+ * @summary Historical deletions — aggregate summary
160
+ * @param {*} [options] Override http request option.
161
+ * @throws {RequiredError}
162
+ * @memberof ModelsApiInterface
163
+ */
164
+ getHistoricalDeletionSummaryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHistoricalDeletionSummary200Response>>;
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>;
97
170
  /**
98
171
  * Creates request options for getModel without sending the request
99
172
  * @param {string} id
@@ -115,6 +188,29 @@ export interface ModelsApiInterface {
115
188
  * Get one model
116
189
  */
117
190
  getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
191
+ /**
192
+ * Creates request options for getModelReadmeAt without sending the request
193
+ * @param {string} id
194
+ * @param {string} commit HF commit sha for the README, from /drifts.
195
+ * @throws {RequiredError}
196
+ * @memberof ModelsApiInterface
197
+ */
198
+ getModelReadmeAtRequestOpts(requestParameters: GetModelReadmeAtRequest): Promise<runtime.RequestOpts>;
199
+ /**
200
+ * Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
201
+ * @summary README content at one commit (wayback)
202
+ * @param {string} id
203
+ * @param {string} commit HF commit sha for the README, from /drifts.
204
+ * @param {*} [options] Override http request option.
205
+ * @throws {RequiredError}
206
+ * @memberof ModelsApiInterface
207
+ */
208
+ getModelReadmeAtRaw(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelReadmeAt200Response>>;
209
+ /**
210
+ * Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
211
+ * README content at one commit (wayback)
212
+ */
213
+ getModelReadmeAt(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelReadmeAt200Response>;
118
214
  /**
119
215
  * Creates request options for listDelistedModels without sending the request
120
216
  * @param {string} [since] ISO-8601 date or timestamp. Rows with last_seen_at &gt;&#x3D; since only. Use your previous poll\&#39;s newest last_seen_at to build an incremental feed.
@@ -142,6 +238,62 @@ export interface ModelsApiInterface {
142
238
  * List delisted models (change stream)
143
239
  */
144
240
  listDelistedModels(requestParameters: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDelistedModels200Response>;
241
+ /**
242
+ * Creates request options for listHistoricalDeletions without sending the request
243
+ * @param {string} [sinceMonth] ISO YYYY-MM. Rows with last_seen_month &gt;&#x3D; it only.
244
+ * @param {number} [minPeakDownloads] Only rows whose peak downloads &gt;&#x3D; this. &#x60;casualties over N&#x60; queries.
245
+ * @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).
246
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
247
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
248
+ * @throws {RequiredError}
249
+ * @memberof ModelsApiInterface
250
+ */
251
+ listHistoricalDeletionsRequestOpts(requestParameters: ListHistoricalDeletionsRequest): Promise<runtime.RequestOpts>;
252
+ /**
253
+ * 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).
254
+ * @summary Historical deletions — paged list
255
+ * @param {string} [sinceMonth] ISO YYYY-MM. Rows with last_seen_month &gt;&#x3D; it only.
256
+ * @param {number} [minPeakDownloads] Only rows whose peak downloads &gt;&#x3D; this. &#x60;casualties over N&#x60; queries.
257
+ * @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).
258
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
259
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ * @memberof ModelsApiInterface
263
+ */
264
+ listHistoricalDeletionsRaw(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListHistoricalDeletions200Response>>;
265
+ /**
266
+ * 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).
267
+ * Historical deletions — paged list
268
+ */
269
+ listHistoricalDeletions(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
270
+ /**
271
+ * Creates request options for listModelReadmeDrifts without sending the request
272
+ * @param {string} id
273
+ * @param {number} [sinceTs] Unix epoch seconds. Rows with commit_ts &gt;&#x3D; it only.
274
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
275
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
276
+ * @throws {RequiredError}
277
+ * @memberof ModelsApiInterface
278
+ */
279
+ listModelReadmeDriftsRequestOpts(requestParameters: ListModelReadmeDriftsRequest): Promise<runtime.RequestOpts>;
280
+ /**
281
+ * Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
282
+ * @summary README drift stream for one model
283
+ * @param {string} id
284
+ * @param {number} [sinceTs] Unix epoch seconds. Rows with commit_ts &gt;&#x3D; it only.
285
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
286
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
287
+ * @param {*} [options] Override http request option.
288
+ * @throws {RequiredError}
289
+ * @memberof ModelsApiInterface
290
+ */
291
+ listModelReadmeDriftsRaw(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModelReadmeDrifts200Response>>;
292
+ /**
293
+ * Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
294
+ * README drift stream for one model
295
+ */
296
+ listModelReadmeDrifts(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModelReadmeDrifts200Response>;
145
297
  /**
146
298
  * Creates request options for listModels without sending the request
147
299
  * @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
@@ -190,6 +342,20 @@ export interface ModelsApiInterface {
190
342
  *
191
343
  */
192
344
  export declare class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
345
+ /**
346
+ * Creates request options for getHistoricalDeletionSummary without sending the request
347
+ */
348
+ getHistoricalDeletionSummaryRequestOpts(): Promise<runtime.RequestOpts>;
349
+ /**
350
+ * 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.
351
+ * Historical deletions — aggregate summary
352
+ */
353
+ getHistoricalDeletionSummaryRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetHistoricalDeletionSummary200Response>>;
354
+ /**
355
+ * 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.
356
+ * Historical deletions — aggregate summary
357
+ */
358
+ getHistoricalDeletionSummary(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetHistoricalDeletionSummary200Response>;
193
359
  /**
194
360
  * Creates request options for getModel without sending the request
195
361
  */
@@ -204,6 +370,20 @@ export declare class ModelsApi extends runtime.BaseAPI implements ModelsApiInter
204
370
  * Get one model
205
371
  */
206
372
  getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
373
+ /**
374
+ * Creates request options for getModelReadmeAt without sending the request
375
+ */
376
+ getModelReadmeAtRequestOpts(requestParameters: GetModelReadmeAtRequest): Promise<runtime.RequestOpts>;
377
+ /**
378
+ * Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
379
+ * README content at one commit (wayback)
380
+ */
381
+ getModelReadmeAtRaw(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelReadmeAt200Response>>;
382
+ /**
383
+ * Cost: 10 credits, flat. The wayback-machine leg of the change-stream. Returns the exact README content for one model at one commit sha — used after spotting a suspicious drift on GET /api/v1/models/{id}/drifts.
384
+ * README content at one commit (wayback)
385
+ */
386
+ getModelReadmeAt(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelReadmeAt200Response>;
207
387
  /**
208
388
  * Creates request options for listDelistedModels without sending the request
209
389
  */
@@ -218,6 +398,34 @@ export declare class ModelsApi extends runtime.BaseAPI implements ModelsApiInter
218
398
  * List delisted models (change stream)
219
399
  */
220
400
  listDelistedModels(requestParameters?: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDelistedModels200Response>;
401
+ /**
402
+ * Creates request options for listHistoricalDeletions without sending the request
403
+ */
404
+ listHistoricalDeletionsRequestOpts(requestParameters: ListHistoricalDeletionsRequest): Promise<runtime.RequestOpts>;
405
+ /**
406
+ * 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).
407
+ * Historical deletions — paged list
408
+ */
409
+ listHistoricalDeletionsRaw(requestParameters: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListHistoricalDeletions200Response>>;
410
+ /**
411
+ * 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).
412
+ * Historical deletions — paged list
413
+ */
414
+ listHistoricalDeletions(requestParameters?: ListHistoricalDeletionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListHistoricalDeletions200Response>;
415
+ /**
416
+ * Creates request options for listModelReadmeDrifts without sending the request
417
+ */
418
+ listModelReadmeDriftsRequestOpts(requestParameters: ListModelReadmeDriftsRequest): Promise<runtime.RequestOpts>;
419
+ /**
420
+ * Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
421
+ * README drift stream for one model
422
+ */
423
+ listModelReadmeDriftsRaw(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModelReadmeDrifts200Response>>;
424
+ /**
425
+ * Cost: 5 credits, flat. Every commit that changed the model\'s README on HF, with `size_delta` between commits so a consumer spots growth spurts and hard prunes without fetching each version. Poll with `since_ts=<max commit_ts of your previous run>` for an incremental drift feed.
426
+ * README drift stream for one model
427
+ */
428
+ listModelReadmeDrifts(requestParameters: ListModelReadmeDriftsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModelReadmeDrifts200Response>;
221
429
  /**
222
430
  * Creates request options for listModels without sending the request
223
431
  */
@@ -241,6 +449,15 @@ export declare const ListDelistedModelsSortEnum: {
241
449
  readonly Downloads: "downloads";
242
450
  };
243
451
  export type ListDelistedModelsSortEnum = typeof ListDelistedModelsSortEnum[keyof typeof ListDelistedModelsSortEnum];
452
+ /**
453
+ * @export
454
+ */
455
+ export declare const ListHistoricalDeletionsSortEnum: {
456
+ readonly Downloads: "downloads";
457
+ readonly Recent: "recent";
458
+ readonly Lifespan: "lifespan";
459
+ };
460
+ export type ListHistoricalDeletionsSortEnum = typeof ListHistoricalDeletionsSortEnum[keyof typeof ListHistoricalDeletionsSortEnum];
244
461
  /**
245
462
  * @export
246
463
  */