@abliteration/sdk 0.1.7 → 0.1.9

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 (62) hide show
  1. package/.openapi-generator/FILES +10 -0
  2. package/README.md +7 -0
  3. package/dist/apis/IndicesApi.d.ts +8 -8
  4. package/dist/apis/IndicesApi.js +4 -4
  5. package/dist/apis/ModelsApi.d.ts +122 -0
  6. package/dist/apis/ModelsApi.js +120 -1
  7. package/dist/esm/apis/IndicesApi.d.ts +8 -8
  8. package/dist/esm/apis/IndicesApi.js +4 -4
  9. package/dist/esm/apis/ModelsApi.d.ts +122 -0
  10. package/dist/esm/apis/ModelsApi.js +119 -0
  11. package/dist/esm/models/DownloadAnomaly.d.ts +66 -0
  12. package/dist/esm/models/DownloadAnomaly.js +62 -0
  13. package/dist/esm/models/DownloadPoint.d.ts +34 -0
  14. package/dist/esm/models/DownloadPoint.js +43 -0
  15. package/dist/esm/models/FreedomVelocityDailyPoint.d.ts +42 -0
  16. package/dist/esm/models/FreedomVelocityDailyPoint.js +47 -0
  17. package/dist/esm/models/GetModelDownloadHistory200Response.d.ts +67 -0
  18. package/dist/esm/models/GetModelDownloadHistory200Response.js +79 -0
  19. package/dist/esm/models/IndexDetail.d.ts +14 -1
  20. package/dist/esm/models/IndexDetail.js +7 -0
  21. package/dist/esm/models/ListAnomalies200Response.d.ts +67 -0
  22. package/dist/esm/models/ListAnomalies200Response.js +79 -0
  23. package/dist/esm/models/ModelIndex.d.ts +9 -1
  24. package/dist/esm/models/ModelIndex.js +4 -0
  25. package/dist/esm/models/index.d.ts +5 -0
  26. package/dist/esm/models/index.js +5 -0
  27. package/dist/models/DownloadAnomaly.d.ts +66 -0
  28. package/dist/models/DownloadAnomaly.js +70 -0
  29. package/dist/models/DownloadPoint.d.ts +34 -0
  30. package/dist/models/DownloadPoint.js +50 -0
  31. package/dist/models/FreedomVelocityDailyPoint.d.ts +42 -0
  32. package/dist/models/FreedomVelocityDailyPoint.js +54 -0
  33. package/dist/models/GetModelDownloadHistory200Response.d.ts +67 -0
  34. package/dist/models/GetModelDownloadHistory200Response.js +87 -0
  35. package/dist/models/IndexDetail.d.ts +14 -1
  36. package/dist/models/IndexDetail.js +7 -0
  37. package/dist/models/ListAnomalies200Response.d.ts +67 -0
  38. package/dist/models/ListAnomalies200Response.js +87 -0
  39. package/dist/models/ModelIndex.d.ts +9 -1
  40. package/dist/models/ModelIndex.js +4 -0
  41. package/dist/models/index.d.ts +5 -0
  42. package/dist/models/index.js +5 -0
  43. package/docs/DownloadAnomaly.md +49 -0
  44. package/docs/DownloadPoint.md +37 -0
  45. package/docs/FreedomVelocityDailyPoint.md +41 -0
  46. package/docs/GetModelDownloadHistory200Response.md +48 -0
  47. package/docs/IndexDetail.md +6 -0
  48. package/docs/IndicesApi.md +2 -2
  49. package/docs/ListAnomalies200Response.md +48 -0
  50. package/docs/ModelIndex.md +4 -0
  51. package/docs/ModelsApi.md +167 -0
  52. package/package.json +3 -2
  53. package/src/apis/IndicesApi.ts +8 -8
  54. package/src/apis/ModelsApi.ts +236 -0
  55. package/src/models/DownloadAnomaly.ts +116 -0
  56. package/src/models/DownloadPoint.ts +69 -0
  57. package/src/models/FreedomVelocityDailyPoint.ts +81 -0
  58. package/src/models/GetModelDownloadHistory200Response.ts +132 -0
  59. package/src/models/IndexDetail.ts +26 -1
  60. package/src/models/ListAnomalies200Response.ts +132 -0
  61. package/src/models/ModelIndex.ts +13 -1
  62. package/src/models/index.ts +5 -0
@@ -23,11 +23,21 @@ import {
23
23
  GetModel200ResponseFromJSON,
24
24
  GetModel200ResponseToJSON,
25
25
  } from '../models/GetModel200Response';
26
+ import {
27
+ type GetModelDownloadHistory200Response,
28
+ GetModelDownloadHistory200ResponseFromJSON,
29
+ GetModelDownloadHistory200ResponseToJSON,
30
+ } from '../models/GetModelDownloadHistory200Response';
26
31
  import {
27
32
  type GetModelReadmeAt200Response,
28
33
  GetModelReadmeAt200ResponseFromJSON,
29
34
  GetModelReadmeAt200ResponseToJSON,
30
35
  } from '../models/GetModelReadmeAt200Response';
36
+ import {
37
+ type ListAnomalies200Response,
38
+ ListAnomalies200ResponseFromJSON,
39
+ ListAnomalies200ResponseToJSON,
40
+ } from '../models/ListAnomalies200Response';
31
41
  import {
32
42
  type ListDelistedModels200Response,
33
43
  ListDelistedModels200ResponseFromJSON,
@@ -56,6 +66,17 @@ export interface GetModelRequest {
56
66
  id: string;
57
67
  }
58
68
 
69
+ export interface GetModelDownloadHistoryRequest {
70
+ /**
71
+ *
72
+ */
73
+ id: string;
74
+ /**
75
+ * Window in days (max 365). Pass 0 for full history.
76
+ */
77
+ days?: number;
78
+ }
79
+
59
80
  export interface GetModelReadmeAtRequest {
60
81
  /**
61
82
  *
@@ -67,6 +88,29 @@ export interface GetModelReadmeAtRequest {
67
88
  commit: string;
68
89
  }
69
90
 
91
+ export interface ListAnomaliesRequest {
92
+ /**
93
+ * Baseline distance in days. Default 7, min 1, max 365.
94
+ */
95
+ windowDays?: number;
96
+ /**
97
+ * Only rows where baseline downloads >= this. Filters `0→10` noise. Default 1000.
98
+ */
99
+ minBaseline?: number;
100
+ /**
101
+ * Filter to one class. Omit for both.
102
+ */
103
+ kind?: ListAnomaliesKindEnum;
104
+ /**
105
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
106
+ */
107
+ limit?: number;
108
+ /**
109
+ * Rows to skip. Negative and non-numeric values are treated as 0.
110
+ */
111
+ offset?: number;
112
+ }
113
+
70
114
  export interface ListDelistedModelsRequest {
71
115
  /**
72
116
  * 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.
@@ -232,6 +276,32 @@ export interface ModelsApiInterface {
232
276
  */
233
277
  getModel(requestParameters: GetModelRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModel200Response>;
234
278
 
279
+ /**
280
+ * Creates request options for getModelDownloadHistory without sending the request
281
+ * @param {string} id
282
+ * @param {number} [days] Window in days (max 365). Pass 0 for full history.
283
+ * @throws {RequiredError}
284
+ * @memberof ModelsApiInterface
285
+ */
286
+ getModelDownloadHistoryRequestOpts(requestParameters: GetModelDownloadHistoryRequest): Promise<runtime.RequestOpts>;
287
+
288
+ /**
289
+ * Cost: 5 credits, flat. Raw signal that /market/anomalies scans over. Callers with a chart or their own anomaly detector pull it once per model.
290
+ * @summary Per-model download timeline
291
+ * @param {string} id
292
+ * @param {number} [days] Window in days (max 365). Pass 0 for full history.
293
+ * @param {*} [options] Override http request option.
294
+ * @throws {RequiredError}
295
+ * @memberof ModelsApiInterface
296
+ */
297
+ getModelDownloadHistoryRaw(requestParameters: GetModelDownloadHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelDownloadHistory200Response>>;
298
+
299
+ /**
300
+ * Cost: 5 credits, flat. Raw signal that /market/anomalies scans over. Callers with a chart or their own anomaly detector pull it once per model.
301
+ * Per-model download timeline
302
+ */
303
+ getModelDownloadHistory(requestParameters: GetModelDownloadHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelDownloadHistory200Response>;
304
+
235
305
  /**
236
306
  * Creates request options for getModelReadmeAt without sending the request
237
307
  * @param {string} id
@@ -258,6 +328,38 @@ export interface ModelsApiInterface {
258
328
  */
259
329
  getModelReadmeAt(requestParameters: GetModelReadmeAtRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelReadmeAt200Response>;
260
330
 
331
+ /**
332
+ * Creates request options for listAnomalies without sending the request
333
+ * @param {number} [windowDays] Baseline distance in days. Default 7, min 1, max 365.
334
+ * @param {number} [minBaseline] Only rows where baseline downloads &gt;&#x3D; this. Filters &#x60;0→10&#x60; noise. Default 1000.
335
+ * @param {'spike' | 'drop'} [kind] Filter to one class. Omit for both.
336
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
337
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
338
+ * @throws {RequiredError}
339
+ * @memberof ModelsApiInterface
340
+ */
341
+ listAnomaliesRequestOpts(requestParameters: ListAnomaliesRequest): Promise<runtime.RequestOpts>;
342
+
343
+ /**
344
+ * Cost: 15 credits, flat. Every row is a model whose downloads-per-window has crossed a threshold: 2× jump = `spike`, 0.5× fall = `drop`. Sorted by absolute delta so biggest movers surface first. Consumers get \"what is happening in the field right now\" without re-implementing the ETL over `download_history`.
345
+ * @summary Anomalies in the download counter (change stream)
346
+ * @param {number} [windowDays] Baseline distance in days. Default 7, min 1, max 365.
347
+ * @param {number} [minBaseline] Only rows where baseline downloads &gt;&#x3D; this. Filters &#x60;0→10&#x60; noise. Default 1000.
348
+ * @param {'spike' | 'drop'} [kind] Filter to one class. Omit for both.
349
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
350
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
351
+ * @param {*} [options] Override http request option.
352
+ * @throws {RequiredError}
353
+ * @memberof ModelsApiInterface
354
+ */
355
+ listAnomaliesRaw(requestParameters: ListAnomaliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAnomalies200Response>>;
356
+
357
+ /**
358
+ * Cost: 15 credits, flat. Every row is a model whose downloads-per-window has crossed a threshold: 2× jump = `spike`, 0.5× fall = `drop`. Sorted by absolute delta so biggest movers surface first. Consumers get \"what is happening in the field right now\" without re-implementing the ETL over `download_history`.
359
+ * Anomalies in the download counter (change stream)
360
+ */
361
+ listAnomalies(requestParameters: ListAnomaliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAnomalies200Response>;
362
+
261
363
  /**
262
364
  * Creates request options for listDelistedModels without sending the request
263
365
  * @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.
@@ -505,6 +607,65 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
505
607
  return await response.value();
506
608
  }
507
609
 
610
+ /**
611
+ * Creates request options for getModelDownloadHistory without sending the request
612
+ */
613
+ async getModelDownloadHistoryRequestOpts(requestParameters: GetModelDownloadHistoryRequest): Promise<runtime.RequestOpts> {
614
+ if (requestParameters['id'] == null) {
615
+ throw new runtime.RequiredError(
616
+ 'id',
617
+ 'Required parameter "id" was null or undefined when calling getModelDownloadHistory().'
618
+ );
619
+ }
620
+
621
+ const queryParameters: any = {};
622
+
623
+ if (requestParameters['days'] != null) {
624
+ queryParameters['days'] = requestParameters['days'];
625
+ }
626
+
627
+ const headerParameters: runtime.HTTPHeaders = {};
628
+
629
+ if (this.configuration && this.configuration.accessToken) {
630
+ const token = this.configuration.accessToken;
631
+ const tokenString = await token("bearerAuth", []);
632
+
633
+ if (tokenString) {
634
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
635
+ }
636
+ }
637
+
638
+ let urlPath = `/api/v1/models/{id}/download-history`;
639
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
640
+
641
+ return {
642
+ path: urlPath,
643
+ method: 'GET',
644
+ headers: headerParameters,
645
+ query: queryParameters,
646
+ };
647
+ }
648
+
649
+ /**
650
+ * Cost: 5 credits, flat. Raw signal that /market/anomalies scans over. Callers with a chart or their own anomaly detector pull it once per model.
651
+ * Per-model download timeline
652
+ */
653
+ async getModelDownloadHistoryRaw(requestParameters: GetModelDownloadHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetModelDownloadHistory200Response>> {
654
+ const requestOptions = await this.getModelDownloadHistoryRequestOpts(requestParameters);
655
+ const response = await this.request(requestOptions, initOverrides);
656
+
657
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetModelDownloadHistory200ResponseFromJSON(jsonValue));
658
+ }
659
+
660
+ /**
661
+ * Cost: 5 credits, flat. Raw signal that /market/anomalies scans over. Callers with a chart or their own anomaly detector pull it once per model.
662
+ * Per-model download timeline
663
+ */
664
+ async getModelDownloadHistory(requestParameters: GetModelDownloadHistoryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetModelDownloadHistory200Response> {
665
+ const response = await this.getModelDownloadHistoryRaw(requestParameters, initOverrides);
666
+ return await response.value();
667
+ }
668
+
508
669
  /**
509
670
  * Creates request options for getModelReadmeAt without sending the request
510
671
  */
@@ -568,6 +729,73 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
568
729
  return await response.value();
569
730
  }
570
731
 
732
+ /**
733
+ * Creates request options for listAnomalies without sending the request
734
+ */
735
+ async listAnomaliesRequestOpts(requestParameters: ListAnomaliesRequest): Promise<runtime.RequestOpts> {
736
+ const queryParameters: any = {};
737
+
738
+ if (requestParameters['windowDays'] != null) {
739
+ queryParameters['window_days'] = requestParameters['windowDays'];
740
+ }
741
+
742
+ if (requestParameters['minBaseline'] != null) {
743
+ queryParameters['min_baseline'] = requestParameters['minBaseline'];
744
+ }
745
+
746
+ if (requestParameters['kind'] != null) {
747
+ queryParameters['kind'] = requestParameters['kind'];
748
+ }
749
+
750
+ if (requestParameters['limit'] != null) {
751
+ queryParameters['limit'] = requestParameters['limit'];
752
+ }
753
+
754
+ if (requestParameters['offset'] != null) {
755
+ queryParameters['offset'] = requestParameters['offset'];
756
+ }
757
+
758
+ const headerParameters: runtime.HTTPHeaders = {};
759
+
760
+ if (this.configuration && this.configuration.accessToken) {
761
+ const token = this.configuration.accessToken;
762
+ const tokenString = await token("bearerAuth", []);
763
+
764
+ if (tokenString) {
765
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
766
+ }
767
+ }
768
+
769
+ let urlPath = `/api/v1/market/anomalies`;
770
+
771
+ return {
772
+ path: urlPath,
773
+ method: 'GET',
774
+ headers: headerParameters,
775
+ query: queryParameters,
776
+ };
777
+ }
778
+
779
+ /**
780
+ * Cost: 15 credits, flat. Every row is a model whose downloads-per-window has crossed a threshold: 2× jump = `spike`, 0.5× fall = `drop`. Sorted by absolute delta so biggest movers surface first. Consumers get \"what is happening in the field right now\" without re-implementing the ETL over `download_history`.
781
+ * Anomalies in the download counter (change stream)
782
+ */
783
+ async listAnomaliesRaw(requestParameters: ListAnomaliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAnomalies200Response>> {
784
+ const requestOptions = await this.listAnomaliesRequestOpts(requestParameters);
785
+ const response = await this.request(requestOptions, initOverrides);
786
+
787
+ return new runtime.JSONApiResponse(response, (jsonValue) => ListAnomalies200ResponseFromJSON(jsonValue));
788
+ }
789
+
790
+ /**
791
+ * Cost: 15 credits, flat. Every row is a model whose downloads-per-window has crossed a threshold: 2× jump = `spike`, 0.5× fall = `drop`. Sorted by absolute delta so biggest movers surface first. Consumers get \"what is happening in the field right now\" without re-implementing the ETL over `download_history`.
792
+ * Anomalies in the download counter (change stream)
793
+ */
794
+ async listAnomalies(requestParameters: ListAnomaliesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAnomalies200Response> {
795
+ const response = await this.listAnomaliesRaw(requestParameters, initOverrides);
796
+ return await response.value();
797
+ }
798
+
571
799
  /**
572
800
  * Creates request options for listDelistedModels without sending the request
573
801
  */
@@ -862,6 +1090,14 @@ export class ModelsApi extends runtime.BaseAPI implements ModelsApiInterface {
862
1090
 
863
1091
  }
864
1092
 
1093
+ /**
1094
+ * @export
1095
+ */
1096
+ export const ListAnomaliesKindEnum = {
1097
+ Spike: 'spike',
1098
+ Drop: 'drop',
1099
+ } as const;
1100
+ export type ListAnomaliesKindEnum = typeof ListAnomaliesKindEnum[keyof typeof ListAnomaliesKindEnum];
865
1101
  /**
866
1102
  * @export
867
1103
  */
@@ -0,0 +1,116 @@
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
+ * One model whose downloads-per-window crossed a threshold.
18
+ * @export
19
+ * @interface DownloadAnomaly
20
+ */
21
+ export interface DownloadAnomaly {
22
+ /**
23
+ *
24
+ */
25
+ model_id?: string;
26
+ /**
27
+ * ISO-8601 timestamp of the current snapshot.
28
+ */
29
+ current_at?: string;
30
+ /**
31
+ *
32
+ */
33
+ current_downloads?: number;
34
+ /**
35
+ * ISO-8601 timestamp of the baseline snapshot the delta is computed against.
36
+ */
37
+ baseline_at?: string;
38
+ /**
39
+ *
40
+ */
41
+ baseline_downloads?: number;
42
+ /**
43
+ * current_downloads / baseline_downloads.
44
+ */
45
+ ratio?: number;
46
+ /**
47
+ * current_downloads - baseline_downloads (signed).
48
+ */
49
+ delta?: number;
50
+ /**
51
+ * `spike` when ratio >= 2, `drop` when ratio <= 0.5.
52
+ */
53
+ kind?: DownloadAnomalyKindEnum;
54
+ }
55
+
56
+
57
+ /**
58
+ * @export
59
+ */
60
+ export const DownloadAnomalyKindEnum = {
61
+ Spike: 'spike',
62
+ Drop: 'drop',
63
+ } as const;
64
+ export type DownloadAnomalyKindEnum = typeof DownloadAnomalyKindEnum[keyof typeof DownloadAnomalyKindEnum];
65
+
66
+
67
+ /**
68
+ * Check if a given object implements the DownloadAnomaly interface.
69
+ */
70
+ export function instanceOfDownloadAnomaly(value: object): value is DownloadAnomaly {
71
+ return true;
72
+ }
73
+
74
+ export function DownloadAnomalyFromJSON(json: any): DownloadAnomaly {
75
+ return DownloadAnomalyFromJSONTyped(json, false);
76
+ }
77
+
78
+ export function DownloadAnomalyFromJSONTyped(json: any, ignoreDiscriminator: boolean): DownloadAnomaly {
79
+ if (json == null) {
80
+ return json;
81
+ }
82
+ return {
83
+
84
+ 'model_id': json['model_id'] == null ? undefined : json['model_id'],
85
+ 'current_at': json['current_at'] == null ? undefined : json['current_at'],
86
+ 'current_downloads': json['current_downloads'] == null ? undefined : json['current_downloads'],
87
+ 'baseline_at': json['baseline_at'] == null ? undefined : json['baseline_at'],
88
+ 'baseline_downloads': json['baseline_downloads'] == null ? undefined : json['baseline_downloads'],
89
+ 'ratio': json['ratio'] == null ? undefined : json['ratio'],
90
+ 'delta': json['delta'] == null ? undefined : json['delta'],
91
+ 'kind': json['kind'] == null ? undefined : json['kind'],
92
+ };
93
+ }
94
+
95
+ export function DownloadAnomalyToJSON(json: any): DownloadAnomaly {
96
+ return DownloadAnomalyToJSONTyped(json, false);
97
+ }
98
+
99
+ export function DownloadAnomalyToJSONTyped(value?: DownloadAnomaly | null, ignoreDiscriminator: boolean = false): any {
100
+ if (value == null) {
101
+ return value;
102
+ }
103
+
104
+ return {
105
+
106
+ 'model_id': value['model_id'],
107
+ 'current_at': value['current_at'],
108
+ 'current_downloads': value['current_downloads'],
109
+ 'baseline_at': value['baseline_at'],
110
+ 'baseline_downloads': value['baseline_downloads'],
111
+ 'ratio': value['ratio'],
112
+ 'delta': value['delta'],
113
+ 'kind': value['kind'],
114
+ };
115
+ }
116
+
@@ -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
+ * One snapshot in a per-model download timeline.
18
+ * @export
19
+ * @interface DownloadPoint
20
+ */
21
+ export interface DownloadPoint {
22
+ /**
23
+ * ISO-8601 timestamp of the observation.
24
+ */
25
+ date?: string;
26
+ /**
27
+ *
28
+ */
29
+ downloads?: number;
30
+ }
31
+
32
+ /**
33
+ * Check if a given object implements the DownloadPoint interface.
34
+ */
35
+ export function instanceOfDownloadPoint(value: object): value is DownloadPoint {
36
+ return true;
37
+ }
38
+
39
+ export function DownloadPointFromJSON(json: any): DownloadPoint {
40
+ return DownloadPointFromJSONTyped(json, false);
41
+ }
42
+
43
+ export function DownloadPointFromJSONTyped(json: any, ignoreDiscriminator: boolean): DownloadPoint {
44
+ if (json == null) {
45
+ return json;
46
+ }
47
+ return {
48
+
49
+ 'date': json['date'] == null ? undefined : json['date'],
50
+ 'downloads': json['downloads'] == null ? undefined : json['downloads'],
51
+ };
52
+ }
53
+
54
+ export function DownloadPointToJSON(json: any): DownloadPoint {
55
+ return DownloadPointToJSONTyped(json, false);
56
+ }
57
+
58
+ export function DownloadPointToJSONTyped(value?: DownloadPoint | null, ignoreDiscriminator: boolean = false): any {
59
+ if (value == null) {
60
+ return value;
61
+ }
62
+
63
+ return {
64
+
65
+ 'date': value['date'],
66
+ 'downloads': value['downloads'],
67
+ };
68
+ }
69
+
@@ -0,0 +1,81 @@
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
+ * One stored daily Freedom Velocity reading.
18
+ * @export
19
+ * @interface FreedomVelocityDailyPoint
20
+ */
21
+ export interface FreedomVelocityDailyPoint {
22
+ /**
23
+ * UTC date of the snapshot, YYYY-MM-DD.
24
+ */
25
+ date?: string;
26
+ /**
27
+ * Mean days from a base model release to the first derived catalog model, as stored that day.
28
+ */
29
+ value?: number;
30
+ /**
31
+ * Median of the per-base days that day; null when not recorded.
32
+ */
33
+ median?: number | null;
34
+ /**
35
+ * Number of base models in the average that day; null when not recorded.
36
+ */
37
+ bases_count?: number | null;
38
+ }
39
+
40
+ /**
41
+ * Check if a given object implements the FreedomVelocityDailyPoint interface.
42
+ */
43
+ export function instanceOfFreedomVelocityDailyPoint(value: object): value is FreedomVelocityDailyPoint {
44
+ return true;
45
+ }
46
+
47
+ export function FreedomVelocityDailyPointFromJSON(json: any): FreedomVelocityDailyPoint {
48
+ return FreedomVelocityDailyPointFromJSONTyped(json, false);
49
+ }
50
+
51
+ export function FreedomVelocityDailyPointFromJSONTyped(json: any, ignoreDiscriminator: boolean): FreedomVelocityDailyPoint {
52
+ if (json == null) {
53
+ return json;
54
+ }
55
+ return {
56
+
57
+ 'date': json['date'] == null ? undefined : json['date'],
58
+ 'value': json['value'] == null ? undefined : json['value'],
59
+ 'median': json['median'] === undefined ? undefined : json['median'] === null ? null : json['median'],
60
+ 'bases_count': json['bases_count'] === undefined ? undefined : json['bases_count'] === null ? null : json['bases_count'],
61
+ };
62
+ }
63
+
64
+ export function FreedomVelocityDailyPointToJSON(json: any): FreedomVelocityDailyPoint {
65
+ return FreedomVelocityDailyPointToJSONTyped(json, false);
66
+ }
67
+
68
+ export function FreedomVelocityDailyPointToJSONTyped(value?: FreedomVelocityDailyPoint | null, ignoreDiscriminator: boolean = false): any {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+
73
+ return {
74
+
75
+ 'date': value['date'],
76
+ 'value': value['value'],
77
+ 'median': value['median'],
78
+ 'bases_count': value['bases_count'],
79
+ };
80
+ }
81
+