@abliteration/sdk 0.1.4 → 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.
- package/.openapi-generator/FILES +16 -0
- package/README.md +11 -0
- package/dist/apis/ModelsApi.d.ts +200 -8
- package/dist/apis/ModelsApi.js +193 -5
- package/dist/esm/apis/ModelsApi.d.ts +200 -8
- package/dist/esm/apis/ModelsApi.js +192 -4
- package/dist/esm/models/DeletionSummary.d.ts +52 -0
- package/dist/esm/models/DeletionSummary.js +53 -0
- package/dist/esm/models/DeletionSummaryTimelineInner.d.ts +34 -0
- package/dist/esm/models/DeletionSummaryTimelineInner.js +43 -0
- package/dist/esm/models/DeletionSummaryTopByDownloadsInner.d.ts +42 -0
- package/dist/esm/models/DeletionSummaryTopByDownloadsInner.js +47 -0
- package/dist/esm/models/DelistedModel.d.ts +54 -0
- package/dist/esm/models/DelistedModel.js +53 -0
- package/dist/esm/models/GetHistoricalDeletionSummary200Response.d.ts +67 -0
- package/dist/esm/models/GetHistoricalDeletionSummary200Response.js +79 -0
- package/dist/esm/models/HistoricalDeletion.d.ts +50 -0
- package/dist/esm/models/HistoricalDeletion.js +51 -0
- package/dist/esm/models/ListDelistedModels200Response.d.ts +67 -0
- package/dist/esm/models/ListDelistedModels200Response.js +79 -0
- package/dist/esm/models/ListHistoricalDeletions200Response.d.ts +67 -0
- package/dist/esm/models/ListHistoricalDeletions200Response.js +79 -0
- package/dist/esm/models/ModelDetail.d.ts +8 -0
- package/dist/esm/models/ModelDetail.js +2 -2
- package/dist/esm/models/ModelSummary.d.ts +8 -0
- package/dist/esm/models/ModelSummary.js +4 -0
- package/dist/esm/models/index.d.ts +8 -0
- package/dist/esm/models/index.js +8 -0
- package/dist/models/DeletionSummary.d.ts +52 -0
- package/dist/models/DeletionSummary.js +60 -0
- package/dist/models/DeletionSummaryTimelineInner.d.ts +34 -0
- package/dist/models/DeletionSummaryTimelineInner.js +50 -0
- package/dist/models/DeletionSummaryTopByDownloadsInner.d.ts +42 -0
- package/dist/models/DeletionSummaryTopByDownloadsInner.js +54 -0
- package/dist/models/DelistedModel.d.ts +54 -0
- package/dist/models/DelistedModel.js +60 -0
- package/dist/models/GetHistoricalDeletionSummary200Response.d.ts +67 -0
- package/dist/models/GetHistoricalDeletionSummary200Response.js +87 -0
- package/dist/models/HistoricalDeletion.d.ts +50 -0
- package/dist/models/HistoricalDeletion.js +58 -0
- package/dist/models/ListDelistedModels200Response.d.ts +67 -0
- package/dist/models/ListDelistedModels200Response.js +87 -0
- package/dist/models/ListHistoricalDeletions200Response.d.ts +67 -0
- package/dist/models/ListHistoricalDeletions200Response.js +87 -0
- package/dist/models/ModelDetail.d.ts +8 -0
- package/dist/models/ModelDetail.js +2 -2
- package/dist/models/ModelSummary.d.ts +8 -0
- package/dist/models/ModelSummary.js +4 -0
- package/dist/models/index.d.ts +8 -0
- package/dist/models/index.js +8 -0
- package/docs/DeletionSummary.md +45 -0
- package/docs/DeletionSummaryTimelineInner.md +36 -0
- package/docs/DeletionSummaryTopByDownloadsInner.md +40 -0
- package/docs/DelistedModel.md +46 -0
- package/docs/GetHistoricalDeletionSummary200Response.md +48 -0
- package/docs/HistoricalDeletion.md +44 -0
- package/docs/ListDelistedModels200Response.md +48 -0
- package/docs/ListHistoricalDeletions200Response.md +48 -0
- package/docs/ModelDetail.md +4 -0
- package/docs/ModelSummary.md +4 -0
- package/docs/ModelsApi.md +247 -3
- package/package.json +1 -1
- package/src/apis/ModelsApi.ts +362 -8
- package/src/models/DeletionSummary.ts +108 -0
- package/src/models/DeletionSummaryTimelineInner.ts +69 -0
- package/src/models/DeletionSummaryTopByDownloadsInner.ts +81 -0
- package/src/models/DelistedModel.ts +99 -0
- package/src/models/GetHistoricalDeletionSummary200Response.ts +132 -0
- package/src/models/HistoricalDeletion.ts +93 -0
- package/src/models/ListDelistedModels200Response.ts +132 -0
- package/src/models/ListHistoricalDeletions200Response.ts +132 -0
- package/src/models/ModelDetail.ts +12 -0
- package/src/models/ModelSummary.ts +12 -0
- package/src/models/index.ts +8 -0
package/src/apis/ModelsApi.ts
CHANGED
|
@@ -13,11 +13,26 @@
|
|
|
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,
|
|
19
24
|
GetModel200ResponseToJSON,
|
|
20
25
|
} from '../models/GetModel200Response';
|
|
26
|
+
import {
|
|
27
|
+
type ListDelistedModels200Response,
|
|
28
|
+
ListDelistedModels200ResponseFromJSON,
|
|
29
|
+
ListDelistedModels200ResponseToJSON,
|
|
30
|
+
} from '../models/ListDelistedModels200Response';
|
|
31
|
+
import {
|
|
32
|
+
type ListHistoricalDeletions200Response,
|
|
33
|
+
ListHistoricalDeletions200ResponseFromJSON,
|
|
34
|
+
ListHistoricalDeletions200ResponseToJSON,
|
|
35
|
+
} from '../models/ListHistoricalDeletions200Response';
|
|
21
36
|
import {
|
|
22
37
|
type ListModels200Response,
|
|
23
38
|
ListModels200ResponseFromJSON,
|
|
@@ -31,6 +46,48 @@ export interface GetModelRequest {
|
|
|
31
46
|
id: string;
|
|
32
47
|
}
|
|
33
48
|
|
|
49
|
+
export interface ListDelistedModelsRequest {
|
|
50
|
+
/**
|
|
51
|
+
* 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.
|
|
52
|
+
*/
|
|
53
|
+
since?: string;
|
|
54
|
+
/**
|
|
55
|
+
* `recent` (default, newest disappearance first) or `downloads` (biggest casualties first — best for post-mortem coverage).
|
|
56
|
+
*/
|
|
57
|
+
sort?: ListDelistedModelsSortEnum;
|
|
58
|
+
/**
|
|
59
|
+
* Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
60
|
+
*/
|
|
61
|
+
limit?: number;
|
|
62
|
+
/**
|
|
63
|
+
* Rows to skip. Negative and non-numeric values are treated as 0.
|
|
64
|
+
*/
|
|
65
|
+
offset?: number;
|
|
66
|
+
}
|
|
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
|
+
|
|
34
91
|
export interface ListModelsRequest {
|
|
35
92
|
/**
|
|
36
93
|
* M-code, case-insensitive. See GET /api/v1/methods.
|
|
@@ -64,6 +121,10 @@ export interface ListModelsRequest {
|
|
|
64
121
|
* ISO-8601 date or timestamp, inclusive.
|
|
65
122
|
*/
|
|
66
123
|
createdBefore?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Tombstone filter. `live` (default): HF-visible models only. `dead`: delisted-only (same shape as this endpoint plus is_delisted=1 and last_seen_at). `all`: both, in one page. For a purpose-built change-stream feed, prefer GET /api/v1/models/delisted.
|
|
126
|
+
*/
|
|
127
|
+
delisted?: ListModelsDelistedEnum;
|
|
67
128
|
/**
|
|
68
129
|
* 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
130
|
*/
|
|
@@ -85,6 +146,28 @@ export interface ListModelsRequest {
|
|
|
85
146
|
* @interface ModelsApiInterface
|
|
86
147
|
*/
|
|
87
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
|
+
|
|
88
171
|
/**
|
|
89
172
|
* Creates request options for getModel without sending the request
|
|
90
173
|
* @param {string} id
|
|
@@ -94,7 +177,7 @@ export interface ModelsApiInterface {
|
|
|
94
177
|
getModelRequestOpts(requestParameters: GetModelRequest): Promise<runtime.RequestOpts>;
|
|
95
178
|
|
|
96
179
|
/**
|
|
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.
|
|
180
|
+
* 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. Delisted models are served here even though they are hidden from the default catalog list; the response then carries `is_delisted=1` and `days_since_gone`.
|
|
98
181
|
* @summary Get one model
|
|
99
182
|
* @param {string} id
|
|
100
183
|
* @param {*} [options] Override http request option.
|
|
@@ -104,11 +187,73 @@ export interface ModelsApiInterface {
|
|
|
104
187
|
getModelRaw(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModel200Response>>;
|
|
105
188
|
|
|
106
189
|
/**
|
|
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.
|
|
190
|
+
* 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. Delisted models are served here even though they are hidden from the default catalog list; the response then carries `is_delisted=1` and `days_since_gone`.
|
|
108
191
|
* Get one model
|
|
109
192
|
*/
|
|
110
193
|
getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
|
|
111
194
|
|
|
195
|
+
/**
|
|
196
|
+
* Creates request options for listDelistedModels without sending the request
|
|
197
|
+
* @param {string} [since] 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.
|
|
198
|
+
* @param {'recent' | 'downloads'} [sort] `recent` (default, newest disappearance first) or `downloads` (biggest casualties first — best for post-mortem coverage).
|
|
199
|
+
* @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
200
|
+
* @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
|
|
201
|
+
* @throws {RequiredError}
|
|
202
|
+
* @memberof ModelsApiInterface
|
|
203
|
+
*/
|
|
204
|
+
listDelistedModelsRequestOpts(requestParameters: ListDelistedModelsRequest): Promise<runtime.RequestOpts>;
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Cost: 5 credits, flat. Change-stream companion to /models: every row is a tombstone — a model that HF no longer serves, preserved here at its final state. Poll with `since=<last_seen_at of your previous run>` to fetch only new casualties; callers building compliance dashboards, safety-research corpora, or \"wayback\" tools live on this endpoint. See /api#change-stream.
|
|
208
|
+
* @summary List delisted models (change stream)
|
|
209
|
+
* @param {string} [since] 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.
|
|
210
|
+
* @param {'recent' | 'downloads'} [sort] `recent` (default, newest disappearance first) or `downloads` (biggest casualties first — best for post-mortem coverage).
|
|
211
|
+
* @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
212
|
+
* @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
|
|
213
|
+
* @param {*} [options] Override http request option.
|
|
214
|
+
* @throws {RequiredError}
|
|
215
|
+
* @memberof ModelsApiInterface
|
|
216
|
+
*/
|
|
217
|
+
listDelistedModelsRaw(requestParameters: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDelistedModels200Response>>;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Cost: 5 credits, flat. Change-stream companion to /models: every row is a tombstone — a model that HF no longer serves, preserved here at its final state. Poll with `since=<last_seen_at of your previous run>` to fetch only new casualties; callers building compliance dashboards, safety-research corpora, or \"wayback\" tools live on this endpoint. See /api#change-stream.
|
|
221
|
+
* List delisted models (change stream)
|
|
222
|
+
*/
|
|
223
|
+
listDelistedModels(requestParameters: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDelistedModels200Response>;
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Creates request options for listHistoricalDeletions without sending the request
|
|
227
|
+
* @param {string} [sinceMonth] ISO YYYY-MM. Rows with last_seen_month >= it only.
|
|
228
|
+
* @param {number} [minPeakDownloads] Only rows whose peak downloads >= this. `casualties over N` queries.
|
|
229
|
+
* @param {'downloads' | 'recent' | 'lifespan'} [sort] `downloads` (default, biggest first), `recent` (newest last_seen_month first), `lifespan` (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 >= it only.
|
|
241
|
+
* @param {number} [minPeakDownloads] Only rows whose peak downloads >= this. `casualties over N` queries.
|
|
242
|
+
* @param {'downloads' | 'recent' | 'lifespan'} [sort] `downloads` (default, biggest first), `recent` (newest last_seen_month first), `lifespan` (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
|
+
|
|
112
257
|
/**
|
|
113
258
|
* Creates request options for listModels without sending the request
|
|
114
259
|
* @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
|
|
@@ -119,6 +264,7 @@ export interface ModelsApiInterface {
|
|
|
119
264
|
* @param {number} [downloadsLte]
|
|
120
265
|
* @param {string} [createdAfter] ISO-8601 date or timestamp, inclusive.
|
|
121
266
|
* @param {string} [createdBefore] ISO-8601 date or timestamp, inclusive.
|
|
267
|
+
* @param {'live' | 'dead' | 'all'} [delisted] Tombstone filter. `live` (default): HF-visible models only. `dead`: delisted-only (same shape as this endpoint plus is_delisted=1 and last_seen_at). `all`: both, in one page. For a purpose-built change-stream feed, prefer GET /api/v1/models/delisted.
|
|
122
268
|
* @param {'downloads' | '-downloads' | 'likes' | '-likes' | 'created' | '-created' | 'created_at' | '-created_at' | 'first_seen' | '-first_seen' | 'first_seen_at' | '-first_seen_at'} [sort] Bare key is the natural direction (downloads/likes = most first, dates = newest first). A leading `-` flips it. `created` and `first_seen` are aliases for the full column names.
|
|
123
269
|
* @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
124
270
|
* @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
|
|
@@ -128,7 +274,7 @@ export interface ModelsApiInterface {
|
|
|
128
274
|
listModelsRequestOpts(requestParameters: ListModelsRequest): Promise<runtime.RequestOpts>;
|
|
129
275
|
|
|
130
276
|
/**
|
|
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
|
|
277
|
+
* 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 by default (`delisted=live`); pass `delisted=dead|all` to include tombstoned records. A dedicated change-stream endpoint is at GET /api/v1/models/delisted.
|
|
132
278
|
* @summary List models
|
|
133
279
|
* @param {string} [method] M-code, case-insensitive. See GET /api/v1/methods.
|
|
134
280
|
* @param {string} [family] Base family, for example qwen or llama.
|
|
@@ -138,6 +284,7 @@ export interface ModelsApiInterface {
|
|
|
138
284
|
* @param {number} [downloadsLte]
|
|
139
285
|
* @param {string} [createdAfter] ISO-8601 date or timestamp, inclusive.
|
|
140
286
|
* @param {string} [createdBefore] ISO-8601 date or timestamp, inclusive.
|
|
287
|
+
* @param {'live' | 'dead' | 'all'} [delisted] Tombstone filter. `live` (default): HF-visible models only. `dead`: delisted-only (same shape as this endpoint plus is_delisted=1 and last_seen_at). `all`: both, in one page. For a purpose-built change-stream feed, prefer GET /api/v1/models/delisted.
|
|
141
288
|
* @param {'downloads' | '-downloads' | 'likes' | '-likes' | 'created' | '-created' | 'created_at' | '-created_at' | 'first_seen' | '-first_seen' | 'first_seen_at' | '-first_seen_at'} [sort] Bare key is the natural direction (downloads/likes = most first, dates = newest first). A leading `-` flips it. `created` and `first_seen` are aliases for the full column names.
|
|
142
289
|
* @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
|
|
143
290
|
* @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
|
|
@@ -148,7 +295,7 @@ export interface ModelsApiInterface {
|
|
|
148
295
|
listModelsRaw(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModels200Response>>;
|
|
149
296
|
|
|
150
297
|
/**
|
|
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
|
|
298
|
+
* 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 by default (`delisted=live`); pass `delisted=dead|all` to include tombstoned records. A dedicated change-stream endpoint is at GET /api/v1/models/delisted.
|
|
152
299
|
* List models
|
|
153
300
|
*/
|
|
154
301
|
listModels(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModels200Response>;
|
|
@@ -160,6 +307,53 @@ export interface ModelsApiInterface {
|
|
|
160
307
|
*/
|
|
161
308
|
export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
|
|
162
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
|
+
|
|
163
357
|
/**
|
|
164
358
|
* Creates request options for getModel without sending the request
|
|
165
359
|
*/
|
|
@@ -196,7 +390,7 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
|
|
|
196
390
|
}
|
|
197
391
|
|
|
198
392
|
/**
|
|
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.
|
|
393
|
+
* 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. Delisted models are served here even though they are hidden from the default catalog list; the response then carries `is_delisted=1` and `days_since_gone`.
|
|
200
394
|
* Get one model
|
|
201
395
|
*/
|
|
202
396
|
async getModelRaw(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModel200Response>> {
|
|
@@ -207,7 +401,7 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
|
|
|
207
401
|
}
|
|
208
402
|
|
|
209
403
|
/**
|
|
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.
|
|
404
|
+
* 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. Delisted models are served here even though they are hidden from the default catalog list; the response then carries `is_delisted=1` and `days_since_gone`.
|
|
211
405
|
* Get one model
|
|
212
406
|
*/
|
|
213
407
|
async getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response> {
|
|
@@ -215,6 +409,136 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
|
|
|
215
409
|
return await response.value();
|
|
216
410
|
}
|
|
217
411
|
|
|
412
|
+
/**
|
|
413
|
+
* Creates request options for listDelistedModels without sending the request
|
|
414
|
+
*/
|
|
415
|
+
async listDelistedModelsRequestOpts(requestParameters: ListDelistedModelsRequest): Promise<runtime.RequestOpts> {
|
|
416
|
+
const queryParameters: any = {};
|
|
417
|
+
|
|
418
|
+
if (requestParameters['since'] != null) {
|
|
419
|
+
queryParameters['since'] = requestParameters['since'];
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
if (requestParameters['sort'] != null) {
|
|
423
|
+
queryParameters['sort'] = requestParameters['sort'];
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
if (requestParameters['limit'] != null) {
|
|
427
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
if (requestParameters['offset'] != null) {
|
|
431
|
+
queryParameters['offset'] = requestParameters['offset'];
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
435
|
+
|
|
436
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
437
|
+
const token = this.configuration.accessToken;
|
|
438
|
+
const tokenString = await token("bearerAuth", []);
|
|
439
|
+
|
|
440
|
+
if (tokenString) {
|
|
441
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
let urlPath = `/api/v1/models/delisted`;
|
|
446
|
+
|
|
447
|
+
return {
|
|
448
|
+
path: urlPath,
|
|
449
|
+
method: 'GET',
|
|
450
|
+
headers: headerParameters,
|
|
451
|
+
query: queryParameters,
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Cost: 5 credits, flat. Change-stream companion to /models: every row is a tombstone — a model that HF no longer serves, preserved here at its final state. Poll with `since=<last_seen_at of your previous run>` to fetch only new casualties; callers building compliance dashboards, safety-research corpora, or \"wayback\" tools live on this endpoint. See /api#change-stream.
|
|
457
|
+
* List delisted models (change stream)
|
|
458
|
+
*/
|
|
459
|
+
async listDelistedModelsRaw(requestParameters: ListDelistedModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDelistedModels200Response>> {
|
|
460
|
+
const requestOptions = await this.listDelistedModelsRequestOpts(requestParameters);
|
|
461
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
462
|
+
|
|
463
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ListDelistedModels200ResponseFromJSON(jsonValue));
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
/**
|
|
467
|
+
* Cost: 5 credits, flat. Change-stream companion to /models: every row is a tombstone — a model that HF no longer serves, preserved here at its final state. Poll with `since=<last_seen_at of your previous run>` to fetch only new casualties; callers building compliance dashboards, safety-research corpora, or \"wayback\" tools live on this endpoint. See /api#change-stream.
|
|
468
|
+
* List delisted models (change stream)
|
|
469
|
+
*/
|
|
470
|
+
async listDelistedModels(requestParameters: ListDelistedModelsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDelistedModels200Response> {
|
|
471
|
+
const response = await this.listDelistedModelsRaw(requestParameters, initOverrides);
|
|
472
|
+
return await response.value();
|
|
473
|
+
}
|
|
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
|
+
|
|
218
542
|
/**
|
|
219
543
|
* Creates request options for listModels without sending the request
|
|
220
544
|
*/
|
|
@@ -253,6 +577,10 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
|
|
|
253
577
|
queryParameters['created_before'] = requestParameters['createdBefore'];
|
|
254
578
|
}
|
|
255
579
|
|
|
580
|
+
if (requestParameters['delisted'] != null) {
|
|
581
|
+
queryParameters['delisted'] = requestParameters['delisted'];
|
|
582
|
+
}
|
|
583
|
+
|
|
256
584
|
if (requestParameters['sort'] != null) {
|
|
257
585
|
queryParameters['sort'] = requestParameters['sort'];
|
|
258
586
|
}
|
|
@@ -287,7 +615,7 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
|
|
|
287
615
|
}
|
|
288
616
|
|
|
289
617
|
/**
|
|
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
|
|
618
|
+
* 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 by default (`delisted=live`); pass `delisted=dead|all` to include tombstoned records. A dedicated change-stream endpoint is at GET /api/v1/models/delisted.
|
|
291
619
|
* List models
|
|
292
620
|
*/
|
|
293
621
|
async listModelsRaw(requestParameters: ListModelsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListModels200Response>> {
|
|
@@ -298,7 +626,7 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
|
|
|
298
626
|
}
|
|
299
627
|
|
|
300
628
|
/**
|
|
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
|
|
629
|
+
* 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 by default (`delisted=live`); pass `delisted=dead|all` to include tombstoned records. A dedicated change-stream endpoint is at GET /api/v1/models/delisted.
|
|
302
630
|
* List models
|
|
303
631
|
*/
|
|
304
632
|
async listModels(requestParameters: ListModelsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListModels200Response> {
|
|
@@ -308,6 +636,32 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
|
|
|
308
636
|
|
|
309
637
|
}
|
|
310
638
|
|
|
639
|
+
/**
|
|
640
|
+
* @export
|
|
641
|
+
*/
|
|
642
|
+
export const ListDelistedModelsSortEnum = {
|
|
643
|
+
Recent: 'recent',
|
|
644
|
+
Downloads: 'downloads',
|
|
645
|
+
} as const;
|
|
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];
|
|
656
|
+
/**
|
|
657
|
+
* @export
|
|
658
|
+
*/
|
|
659
|
+
export const ListModelsDelistedEnum = {
|
|
660
|
+
Live: 'live',
|
|
661
|
+
Dead: 'dead',
|
|
662
|
+
All: 'all',
|
|
663
|
+
} as const;
|
|
664
|
+
export type ListModelsDelistedEnum = typeof ListModelsDelistedEnum[keyof typeof ListModelsDelistedEnum];
|
|
311
665
|
/**
|
|
312
666
|
* @export
|
|
313
667
|
*/
|
|
@@ -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
|
+
|