@abliteration/sdk 0.1.0 → 0.1.2

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