@abliteration/sdk 0.1.0

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 (150) hide show
  1. package/README.md +67 -0
  2. package/dist/apis/AuthorsApi.d.ts +131 -0
  3. package/dist/apis/AuthorsApi.js +144 -0
  4. package/dist/apis/DatasetsApi.d.ts +151 -0
  5. package/dist/apis/DatasetsApi.js +155 -0
  6. package/dist/apis/IndicesApi.d.ts +111 -0
  7. package/dist/apis/IndicesApi.js +135 -0
  8. package/dist/apis/MethodsApi.d.ts +118 -0
  9. package/dist/apis/MethodsApi.js +142 -0
  10. package/dist/apis/ModelsApi.d.ts +181 -0
  11. package/dist/apis/ModelsApi.js +170 -0
  12. package/dist/apis/TimelineApi.d.ts +85 -0
  13. package/dist/apis/TimelineApi.js +89 -0
  14. package/dist/apis/index.d.ts +6 -0
  15. package/dist/apis/index.js +24 -0
  16. package/dist/esm/apis/AuthorsApi.d.ts +131 -0
  17. package/dist/esm/apis/AuthorsApi.js +140 -0
  18. package/dist/esm/apis/DatasetsApi.d.ts +151 -0
  19. package/dist/esm/apis/DatasetsApi.js +151 -0
  20. package/dist/esm/apis/IndicesApi.d.ts +111 -0
  21. package/dist/esm/apis/IndicesApi.js +131 -0
  22. package/dist/esm/apis/MethodsApi.d.ts +118 -0
  23. package/dist/esm/apis/MethodsApi.js +138 -0
  24. package/dist/esm/apis/ModelsApi.d.ts +181 -0
  25. package/dist/esm/apis/ModelsApi.js +166 -0
  26. package/dist/esm/apis/TimelineApi.d.ts +85 -0
  27. package/dist/esm/apis/TimelineApi.js +85 -0
  28. package/dist/esm/apis/index.d.ts +6 -0
  29. package/dist/esm/apis/index.js +8 -0
  30. package/dist/esm/index.d.ts +3 -0
  31. package/dist/esm/index.js +5 -0
  32. package/dist/esm/models/Author.d.ts +46 -0
  33. package/dist/esm/models/Author.js +49 -0
  34. package/dist/esm/models/AuthorDetail.d.ts +51 -0
  35. package/dist/esm/models/AuthorDetail.js +52 -0
  36. package/dist/esm/models/DaiPoint.d.ts +38 -0
  37. package/dist/esm/models/DaiPoint.js +45 -0
  38. package/dist/esm/models/Dataset.d.ts +70 -0
  39. package/dist/esm/models/Dataset.js +61 -0
  40. package/dist/esm/models/DatasetDetail.d.ts +40 -0
  41. package/dist/esm/models/DatasetDetail.js +38 -0
  42. package/dist/esm/models/Envelope.d.ts +66 -0
  43. package/dist/esm/models/Envelope.js +78 -0
  44. package/dist/esm/models/Event.d.ts +54 -0
  45. package/dist/esm/models/Event.js +53 -0
  46. package/dist/esm/models/GetAuthor200Response.d.ts +67 -0
  47. package/dist/esm/models/GetAuthor200Response.js +79 -0
  48. package/dist/esm/models/GetDataset200Response.d.ts +67 -0
  49. package/dist/esm/models/GetDataset200Response.js +79 -0
  50. package/dist/esm/models/GetIndex200Response.d.ts +67 -0
  51. package/dist/esm/models/GetIndex200Response.js +79 -0
  52. package/dist/esm/models/GetMethod200Response.d.ts +67 -0
  53. package/dist/esm/models/GetMethod200Response.js +79 -0
  54. package/dist/esm/models/GetModel200Response.d.ts +67 -0
  55. package/dist/esm/models/GetModel200Response.js +79 -0
  56. package/dist/esm/models/IndexDetail.d.ts +89 -0
  57. package/dist/esm/models/IndexDetail.js +78 -0
  58. package/dist/esm/models/ListAuthors200Response.d.ts +67 -0
  59. package/dist/esm/models/ListAuthors200Response.js +79 -0
  60. package/dist/esm/models/ListDatasets200Response.d.ts +67 -0
  61. package/dist/esm/models/ListDatasets200Response.js +79 -0
  62. package/dist/esm/models/ListIndices200Response.d.ts +67 -0
  63. package/dist/esm/models/ListIndices200Response.js +79 -0
  64. package/dist/esm/models/ListMethods200Response.d.ts +67 -0
  65. package/dist/esm/models/ListMethods200Response.js +79 -0
  66. package/dist/esm/models/ListModels200Response.d.ts +67 -0
  67. package/dist/esm/models/ListModels200Response.js +79 -0
  68. package/dist/esm/models/ListTimeline200Response.d.ts +67 -0
  69. package/dist/esm/models/ListTimeline200Response.js +79 -0
  70. package/dist/esm/models/Method.d.ts +60 -0
  71. package/dist/esm/models/Method.js +60 -0
  72. package/dist/esm/models/MethodDetail.d.ts +74 -0
  73. package/dist/esm/models/MethodDetail.js +68 -0
  74. package/dist/esm/models/MethodDetailAllOfTopAuthors.d.ts +34 -0
  75. package/dist/esm/models/MethodDetailAllOfTopAuthors.js +43 -0
  76. package/dist/esm/models/ModelDetail.d.ts +52 -0
  77. package/dist/esm/models/ModelDetail.js +38 -0
  78. package/dist/esm/models/ModelError.d.ts +46 -0
  79. package/dist/esm/models/ModelError.js +53 -0
  80. package/dist/esm/models/ModelIndex.d.ts +85 -0
  81. package/dist/esm/models/ModelIndex.js +76 -0
  82. package/dist/esm/models/ModelSummary.d.ts +78 -0
  83. package/dist/esm/models/ModelSummary.js +65 -0
  84. package/dist/esm/models/Passport.d.ts +38 -0
  85. package/dist/esm/models/Passport.js +45 -0
  86. package/dist/esm/models/index.d.ts +27 -0
  87. package/dist/esm/models/index.js +29 -0
  88. package/dist/esm/runtime.d.ts +196 -0
  89. package/dist/esm/runtime.js +400 -0
  90. package/dist/index.d.ts +3 -0
  91. package/dist/index.js +21 -0
  92. package/dist/models/Author.d.ts +46 -0
  93. package/dist/models/Author.js +56 -0
  94. package/dist/models/AuthorDetail.d.ts +51 -0
  95. package/dist/models/AuthorDetail.js +59 -0
  96. package/dist/models/DaiPoint.d.ts +38 -0
  97. package/dist/models/DaiPoint.js +52 -0
  98. package/dist/models/Dataset.d.ts +70 -0
  99. package/dist/models/Dataset.js +68 -0
  100. package/dist/models/DatasetDetail.d.ts +40 -0
  101. package/dist/models/DatasetDetail.js +45 -0
  102. package/dist/models/Envelope.d.ts +66 -0
  103. package/dist/models/Envelope.js +86 -0
  104. package/dist/models/Event.d.ts +54 -0
  105. package/dist/models/Event.js +60 -0
  106. package/dist/models/GetAuthor200Response.d.ts +67 -0
  107. package/dist/models/GetAuthor200Response.js +87 -0
  108. package/dist/models/GetDataset200Response.d.ts +67 -0
  109. package/dist/models/GetDataset200Response.js +87 -0
  110. package/dist/models/GetIndex200Response.d.ts +67 -0
  111. package/dist/models/GetIndex200Response.js +87 -0
  112. package/dist/models/GetMethod200Response.d.ts +67 -0
  113. package/dist/models/GetMethod200Response.js +87 -0
  114. package/dist/models/GetModel200Response.d.ts +67 -0
  115. package/dist/models/GetModel200Response.js +87 -0
  116. package/dist/models/IndexDetail.d.ts +89 -0
  117. package/dist/models/IndexDetail.js +86 -0
  118. package/dist/models/ListAuthors200Response.d.ts +67 -0
  119. package/dist/models/ListAuthors200Response.js +87 -0
  120. package/dist/models/ListDatasets200Response.d.ts +67 -0
  121. package/dist/models/ListDatasets200Response.js +87 -0
  122. package/dist/models/ListIndices200Response.d.ts +67 -0
  123. package/dist/models/ListIndices200Response.js +87 -0
  124. package/dist/models/ListMethods200Response.d.ts +67 -0
  125. package/dist/models/ListMethods200Response.js +87 -0
  126. package/dist/models/ListModels200Response.d.ts +67 -0
  127. package/dist/models/ListModels200Response.js +87 -0
  128. package/dist/models/ListTimeline200Response.d.ts +67 -0
  129. package/dist/models/ListTimeline200Response.js +87 -0
  130. package/dist/models/Method.d.ts +60 -0
  131. package/dist/models/Method.js +68 -0
  132. package/dist/models/MethodDetail.d.ts +74 -0
  133. package/dist/models/MethodDetail.js +76 -0
  134. package/dist/models/MethodDetailAllOfTopAuthors.d.ts +34 -0
  135. package/dist/models/MethodDetailAllOfTopAuthors.js +50 -0
  136. package/dist/models/ModelDetail.d.ts +52 -0
  137. package/dist/models/ModelDetail.js +45 -0
  138. package/dist/models/ModelError.d.ts +46 -0
  139. package/dist/models/ModelError.js +60 -0
  140. package/dist/models/ModelIndex.d.ts +85 -0
  141. package/dist/models/ModelIndex.js +84 -0
  142. package/dist/models/ModelSummary.d.ts +78 -0
  143. package/dist/models/ModelSummary.js +72 -0
  144. package/dist/models/Passport.d.ts +38 -0
  145. package/dist/models/Passport.js +52 -0
  146. package/dist/models/index.d.ts +27 -0
  147. package/dist/models/index.js +45 -0
  148. package/dist/runtime.d.ts +196 -0
  149. package/dist/runtime.js +421 -0
  150. package/package.json +31 -0
package/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # @abliteration/sdk
2
+
3
+ Auto-generated TypeScript SDK for the [abliteration.org](https://abliteration.org) catalog API. Covers every route on `/api/v1` with typed models.
4
+
5
+ Works in Node.js 18+ and modern browsers. Uses the standard `fetch` API — no runtime dependencies.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @abliteration/sdk
11
+ # or
12
+ pnpm add @abliteration/sdk
13
+ # or
14
+ yarn add @abliteration/sdk
15
+ ```
16
+
17
+ ## Get a key
18
+
19
+ Generate a Bearer token at <https://abliteration.org/shop/account#api-keys>.
20
+
21
+ ## Quick start
22
+
23
+ ```typescript
24
+ import { Configuration, ModelsApi } from '@abliteration/sdk';
25
+
26
+ const cfg = new Configuration({
27
+ accessToken: process.env.ABLITERATION_API_KEY,
28
+ });
29
+
30
+ const models = new ModelsApi(cfg);
31
+ const { data, cost, creditsRemaining } = await models.listModels({
32
+ method: 'M4',
33
+ limit: 5,
34
+ });
35
+
36
+ for (const m of data) {
37
+ console.log(`${m.id} - ${m.downloads}`);
38
+ }
39
+ console.log(`spent: ${cost}, wallet: ${creditsRemaining}`);
40
+ ```
41
+
42
+ Full API docs: <https://abliteration.org/api>
43
+
44
+ ## Available APIs
45
+
46
+ - `ModelsApi` - list and detail
47
+ - `MethodsApi` - M1-M9 taxonomy
48
+ - `IndicesApi` - DAI, Freedom Velocity, Weaponization, F2W Latency
49
+ - `AuthorsApi`, `DatasetsApi`, `TimelineApi`
50
+
51
+ Every response carries the envelope fields (`cost`, `creditsRemaining`, `rateLimitLimit`, `rateLimitRemaining`, `rateLimitReset`, `metering`, `requestId`) alongside the typed `data` payload.
52
+
53
+ ## Alternatives
54
+
55
+ - CLI: `npm install -g @abliteration/cli` (this SDK is the library, the CLI is the terminal tool)
56
+ - Python: `pip install abliteration`
57
+ - Ruby: `gem install abliteration`
58
+ - Rust: `cargo add abliteration`
59
+ - HTTP directly: `fetch` with `Authorization: Bearer` header
60
+
61
+ ## License
62
+
63
+ MIT.
64
+
65
+ ---
66
+
67
+ *This SDK is auto-generated from the OpenAPI spec at [/api/v1/openapi.json](https://abliteration.org/api/v1/openapi.json) using [openapi-generator](https://openapi-generator.tech).*
@@ -0,0 +1,131 @@
1
+ /**
2
+ * abliteration.org Public API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import { type GetAuthor200Response } from '../models/GetAuthor200Response';
14
+ import { type ListAuthors200Response } from '../models/ListAuthors200Response';
15
+ export interface GetAuthorRequest {
16
+ /**
17
+ *
18
+ */
19
+ id: string;
20
+ }
21
+ export interface ListAuthorsRequest {
22
+ /**
23
+ *
24
+ */
25
+ sort?: ListAuthorsSortEnum;
26
+ /**
27
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
28
+ */
29
+ limit?: number;
30
+ /**
31
+ * Rows to skip. Negative and non-numeric values are treated as 0.
32
+ */
33
+ offset?: number;
34
+ }
35
+ /**
36
+ * AuthorsApi - interface
37
+ *
38
+ * @export
39
+ * @interface AuthorsApiInterface
40
+ */
41
+ export interface AuthorsApiInterface {
42
+ /**
43
+ * Creates request options for getAuthor without sending the request
44
+ * @param {string} id
45
+ * @throws {RequiredError}
46
+ * @memberof AuthorsApiInterface
47
+ */
48
+ getAuthorRequestOpts(requestParameters: GetAuthorRequest): Promise<runtime.RequestOpts>;
49
+ /**
50
+ * Cost: 1 credit.
51
+ * @summary Get one author
52
+ * @param {string} id
53
+ * @param {*} [options] Override http request option.
54
+ * @throws {RequiredError}
55
+ * @memberof AuthorsApiInterface
56
+ */
57
+ getAuthorRaw(requestParameters: GetAuthorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAuthor200Response>>;
58
+ /**
59
+ * Cost: 1 credit.
60
+ * Get one author
61
+ */
62
+ getAuthor(requestParameters: GetAuthorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAuthor200Response>;
63
+ /**
64
+ * Creates request options for listAuthors without sending the request
65
+ * @param {'total_downloads' | '-total_downloads' | 'total_models' | '-total_models'} [sort]
66
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
67
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
68
+ * @throws {RequiredError}
69
+ * @memberof AuthorsApiInterface
70
+ */
71
+ listAuthorsRequestOpts(requestParameters: ListAuthorsRequest): Promise<runtime.RequestOpts>;
72
+ /**
73
+ * Cost: 5-15 credits, by rows returned.
74
+ * @summary List authors
75
+ * @param {'total_downloads' | '-total_downloads' | 'total_models' | '-total_models'} [sort]
76
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
77
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
78
+ * @param {*} [options] Override http request option.
79
+ * @throws {RequiredError}
80
+ * @memberof AuthorsApiInterface
81
+ */
82
+ listAuthorsRaw(requestParameters: ListAuthorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAuthors200Response>>;
83
+ /**
84
+ * Cost: 5-15 credits, by rows returned.
85
+ * List authors
86
+ */
87
+ listAuthors(requestParameters: ListAuthorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAuthors200Response>;
88
+ }
89
+ /**
90
+ *
91
+ */
92
+ export declare class AuthorsApi extends runtime.BaseAPI implements AuthorsApiInterface {
93
+ /**
94
+ * Creates request options for getAuthor without sending the request
95
+ */
96
+ getAuthorRequestOpts(requestParameters: GetAuthorRequest): Promise<runtime.RequestOpts>;
97
+ /**
98
+ * Cost: 1 credit.
99
+ * Get one author
100
+ */
101
+ getAuthorRaw(requestParameters: GetAuthorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAuthor200Response>>;
102
+ /**
103
+ * Cost: 1 credit.
104
+ * Get one author
105
+ */
106
+ getAuthor(requestParameters: GetAuthorRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAuthor200Response>;
107
+ /**
108
+ * Creates request options for listAuthors without sending the request
109
+ */
110
+ listAuthorsRequestOpts(requestParameters: ListAuthorsRequest): Promise<runtime.RequestOpts>;
111
+ /**
112
+ * Cost: 5-15 credits, by rows returned.
113
+ * List authors
114
+ */
115
+ listAuthorsRaw(requestParameters: ListAuthorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListAuthors200Response>>;
116
+ /**
117
+ * Cost: 5-15 credits, by rows returned.
118
+ * List authors
119
+ */
120
+ listAuthors(requestParameters?: ListAuthorsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListAuthors200Response>;
121
+ }
122
+ /**
123
+ * @export
124
+ */
125
+ export declare const ListAuthorsSortEnum: {
126
+ readonly TotalDownloads: "total_downloads";
127
+ readonly TotalDownloads2: "-total_downloads";
128
+ readonly TotalModels: "total_models";
129
+ readonly TotalModels2: "-total_models";
130
+ };
131
+ export type ListAuthorsSortEnum = typeof ListAuthorsSortEnum[keyof typeof ListAuthorsSortEnum];
@@ -0,0 +1,144 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * abliteration.org Public API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ListAuthorsSortEnum = exports.AuthorsApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const GetAuthor200Response_1 = require("../models/GetAuthor200Response");
28
+ const ListAuthors200Response_1 = require("../models/ListAuthors200Response");
29
+ /**
30
+ *
31
+ */
32
+ class AuthorsApi extends runtime.BaseAPI {
33
+ /**
34
+ * Creates request options for getAuthor without sending the request
35
+ */
36
+ getAuthorRequestOpts(requestParameters) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['id'] == null) {
39
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getAuthor().');
40
+ }
41
+ const queryParameters = {};
42
+ const headerParameters = {};
43
+ if (this.configuration && this.configuration.accessToken) {
44
+ const token = this.configuration.accessToken;
45
+ const tokenString = yield token("bearerAuth", []);
46
+ if (tokenString) {
47
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
48
+ }
49
+ }
50
+ let urlPath = `/api/v1/authors/{id}`;
51
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
52
+ return {
53
+ path: urlPath,
54
+ method: 'GET',
55
+ headers: headerParameters,
56
+ query: queryParameters,
57
+ };
58
+ });
59
+ }
60
+ /**
61
+ * Cost: 1 credit.
62
+ * Get one author
63
+ */
64
+ getAuthorRaw(requestParameters, initOverrides) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const requestOptions = yield this.getAuthorRequestOpts(requestParameters);
67
+ const response = yield this.request(requestOptions, initOverrides);
68
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetAuthor200Response_1.GetAuthor200ResponseFromJSON)(jsonValue));
69
+ });
70
+ }
71
+ /**
72
+ * Cost: 1 credit.
73
+ * Get one author
74
+ */
75
+ getAuthor(requestParameters, initOverrides) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ const response = yield this.getAuthorRaw(requestParameters, initOverrides);
78
+ return yield response.value();
79
+ });
80
+ }
81
+ /**
82
+ * Creates request options for listAuthors without sending the request
83
+ */
84
+ listAuthorsRequestOpts(requestParameters) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ const queryParameters = {};
87
+ if (requestParameters['sort'] != null) {
88
+ queryParameters['sort'] = requestParameters['sort'];
89
+ }
90
+ if (requestParameters['limit'] != null) {
91
+ queryParameters['limit'] = requestParameters['limit'];
92
+ }
93
+ if (requestParameters['offset'] != null) {
94
+ queryParameters['offset'] = requestParameters['offset'];
95
+ }
96
+ const headerParameters = {};
97
+ if (this.configuration && this.configuration.accessToken) {
98
+ const token = this.configuration.accessToken;
99
+ const tokenString = yield token("bearerAuth", []);
100
+ if (tokenString) {
101
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
102
+ }
103
+ }
104
+ let urlPath = `/api/v1/authors`;
105
+ return {
106
+ path: urlPath,
107
+ method: 'GET',
108
+ headers: headerParameters,
109
+ query: queryParameters,
110
+ };
111
+ });
112
+ }
113
+ /**
114
+ * Cost: 5-15 credits, by rows returned.
115
+ * List authors
116
+ */
117
+ listAuthorsRaw(requestParameters, initOverrides) {
118
+ return __awaiter(this, void 0, void 0, function* () {
119
+ const requestOptions = yield this.listAuthorsRequestOpts(requestParameters);
120
+ const response = yield this.request(requestOptions, initOverrides);
121
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListAuthors200Response_1.ListAuthors200ResponseFromJSON)(jsonValue));
122
+ });
123
+ }
124
+ /**
125
+ * Cost: 5-15 credits, by rows returned.
126
+ * List authors
127
+ */
128
+ listAuthors() {
129
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
130
+ const response = yield this.listAuthorsRaw(requestParameters, initOverrides);
131
+ return yield response.value();
132
+ });
133
+ }
134
+ }
135
+ exports.AuthorsApi = AuthorsApi;
136
+ /**
137
+ * @export
138
+ */
139
+ exports.ListAuthorsSortEnum = {
140
+ TotalDownloads: 'total_downloads',
141
+ TotalDownloads2: '-total_downloads',
142
+ TotalModels: 'total_models',
143
+ TotalModels2: '-total_models',
144
+ };
@@ -0,0 +1,151 @@
1
+ /**
2
+ * abliteration.org Public API
3
+ * 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.
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import * as runtime from '../runtime';
13
+ import { type GetDataset200Response } from '../models/GetDataset200Response';
14
+ import { type ListDatasets200Response } from '../models/ListDatasets200Response';
15
+ export interface GetDatasetRequest {
16
+ /**
17
+ *
18
+ */
19
+ id: string;
20
+ }
21
+ export interface ListDatasetsRequest {
22
+ /**
23
+ * Workflow stage, for example heal or extract.
24
+ */
25
+ category?: string;
26
+ /**
27
+ * Publisher handle, case-insensitive.
28
+ */
29
+ author?: string;
30
+ /**
31
+ * License string as published.
32
+ */
33
+ license?: string;
34
+ /**
35
+ *
36
+ */
37
+ sort?: ListDatasetsSortEnum;
38
+ /**
39
+ * Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
40
+ */
41
+ limit?: number;
42
+ /**
43
+ * Rows to skip. Negative and non-numeric values are treated as 0.
44
+ */
45
+ offset?: number;
46
+ }
47
+ /**
48
+ * DatasetsApi - interface
49
+ *
50
+ * @export
51
+ * @interface DatasetsApiInterface
52
+ */
53
+ export interface DatasetsApiInterface {
54
+ /**
55
+ * Creates request options for getDataset without sending the request
56
+ * @param {string} id
57
+ * @throws {RequiredError}
58
+ * @memberof DatasetsApiInterface
59
+ */
60
+ getDatasetRequestOpts(requestParameters: GetDatasetRequest): Promise<runtime.RequestOpts>;
61
+ /**
62
+ * Cost: 1 credit. The passport is null for datasets that do not have one yet.
63
+ * @summary Get one dataset
64
+ * @param {string} id
65
+ * @param {*} [options] Override http request option.
66
+ * @throws {RequiredError}
67
+ * @memberof DatasetsApiInterface
68
+ */
69
+ getDatasetRaw(requestParameters: GetDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDataset200Response>>;
70
+ /**
71
+ * Cost: 1 credit. The passport is null for datasets that do not have one yet.
72
+ * Get one dataset
73
+ */
74
+ getDataset(requestParameters: GetDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDataset200Response>;
75
+ /**
76
+ * Creates request options for listDatasets without sending the request
77
+ * @param {string} [category] Workflow stage, for example heal or extract.
78
+ * @param {string} [author] Publisher handle, case-insensitive.
79
+ * @param {string} [license] License string as published.
80
+ * @param {'downloads' | '-downloads' | 'created_at' | '-created_at' | 'first_seen_at' | '-first_seen_at'} [sort]
81
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
82
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
83
+ * @throws {RequiredError}
84
+ * @memberof DatasetsApiInterface
85
+ */
86
+ listDatasetsRequestOpts(requestParameters: ListDatasetsRequest): Promise<runtime.RequestOpts>;
87
+ /**
88
+ * Cost: 5-15 credits, by rows returned.
89
+ * @summary List datasets
90
+ * @param {string} [category] Workflow stage, for example heal or extract.
91
+ * @param {string} [author] Publisher handle, case-insensitive.
92
+ * @param {string} [license] License string as published.
93
+ * @param {'downloads' | '-downloads' | 'created_at' | '-created_at' | 'first_seen_at' | '-first_seen_at'} [sort]
94
+ * @param {number} [limit] Rows to return, 1 to 1000. Values outside the range are clamped, not rejected.
95
+ * @param {number} [offset] Rows to skip. Negative and non-numeric values are treated as 0.
96
+ * @param {*} [options] Override http request option.
97
+ * @throws {RequiredError}
98
+ * @memberof DatasetsApiInterface
99
+ */
100
+ listDatasetsRaw(requestParameters: ListDatasetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDatasets200Response>>;
101
+ /**
102
+ * Cost: 5-15 credits, by rows returned.
103
+ * List datasets
104
+ */
105
+ listDatasets(requestParameters: ListDatasetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDatasets200Response>;
106
+ }
107
+ /**
108
+ *
109
+ */
110
+ export declare class DatasetsApi extends runtime.BaseAPI implements DatasetsApiInterface {
111
+ /**
112
+ * Creates request options for getDataset without sending the request
113
+ */
114
+ getDatasetRequestOpts(requestParameters: GetDatasetRequest): Promise<runtime.RequestOpts>;
115
+ /**
116
+ * Cost: 1 credit. The passport is null for datasets that do not have one yet.
117
+ * Get one dataset
118
+ */
119
+ getDatasetRaw(requestParameters: GetDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetDataset200Response>>;
120
+ /**
121
+ * Cost: 1 credit. The passport is null for datasets that do not have one yet.
122
+ * Get one dataset
123
+ */
124
+ getDataset(requestParameters: GetDatasetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetDataset200Response>;
125
+ /**
126
+ * Creates request options for listDatasets without sending the request
127
+ */
128
+ listDatasetsRequestOpts(requestParameters: ListDatasetsRequest): Promise<runtime.RequestOpts>;
129
+ /**
130
+ * Cost: 5-15 credits, by rows returned.
131
+ * List datasets
132
+ */
133
+ listDatasetsRaw(requestParameters: ListDatasetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ListDatasets200Response>>;
134
+ /**
135
+ * Cost: 5-15 credits, by rows returned.
136
+ * List datasets
137
+ */
138
+ listDatasets(requestParameters?: ListDatasetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDatasets200Response>;
139
+ }
140
+ /**
141
+ * @export
142
+ */
143
+ export declare const ListDatasetsSortEnum: {
144
+ readonly Downloads: "downloads";
145
+ readonly Downloads2: "-downloads";
146
+ readonly CreatedAt: "created_at";
147
+ readonly CreatedAt2: "-created_at";
148
+ readonly FirstSeenAt: "first_seen_at";
149
+ readonly FirstSeenAt2: "-first_seen_at";
150
+ };
151
+ export type ListDatasetsSortEnum = typeof ListDatasetsSortEnum[keyof typeof ListDatasetsSortEnum];
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * abliteration.org Public API
6
+ * 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.
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ListDatasetsSortEnum = exports.DatasetsApi = void 0;
26
+ const runtime = require("../runtime");
27
+ const GetDataset200Response_1 = require("../models/GetDataset200Response");
28
+ const ListDatasets200Response_1 = require("../models/ListDatasets200Response");
29
+ /**
30
+ *
31
+ */
32
+ class DatasetsApi extends runtime.BaseAPI {
33
+ /**
34
+ * Creates request options for getDataset without sending the request
35
+ */
36
+ getDatasetRequestOpts(requestParameters) {
37
+ return __awaiter(this, void 0, void 0, function* () {
38
+ if (requestParameters['id'] == null) {
39
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling getDataset().');
40
+ }
41
+ const queryParameters = {};
42
+ const headerParameters = {};
43
+ if (this.configuration && this.configuration.accessToken) {
44
+ const token = this.configuration.accessToken;
45
+ const tokenString = yield token("bearerAuth", []);
46
+ if (tokenString) {
47
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
48
+ }
49
+ }
50
+ let urlPath = `/api/v1/datasets/{id}`;
51
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
52
+ return {
53
+ path: urlPath,
54
+ method: 'GET',
55
+ headers: headerParameters,
56
+ query: queryParameters,
57
+ };
58
+ });
59
+ }
60
+ /**
61
+ * Cost: 1 credit. The passport is null for datasets that do not have one yet.
62
+ * Get one dataset
63
+ */
64
+ getDatasetRaw(requestParameters, initOverrides) {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const requestOptions = yield this.getDatasetRequestOpts(requestParameters);
67
+ const response = yield this.request(requestOptions, initOverrides);
68
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetDataset200Response_1.GetDataset200ResponseFromJSON)(jsonValue));
69
+ });
70
+ }
71
+ /**
72
+ * Cost: 1 credit. The passport is null for datasets that do not have one yet.
73
+ * Get one dataset
74
+ */
75
+ getDataset(requestParameters, initOverrides) {
76
+ return __awaiter(this, void 0, void 0, function* () {
77
+ const response = yield this.getDatasetRaw(requestParameters, initOverrides);
78
+ return yield response.value();
79
+ });
80
+ }
81
+ /**
82
+ * Creates request options for listDatasets without sending the request
83
+ */
84
+ listDatasetsRequestOpts(requestParameters) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ const queryParameters = {};
87
+ if (requestParameters['category'] != null) {
88
+ queryParameters['category'] = requestParameters['category'];
89
+ }
90
+ if (requestParameters['author'] != null) {
91
+ queryParameters['author'] = requestParameters['author'];
92
+ }
93
+ if (requestParameters['license'] != null) {
94
+ queryParameters['license'] = requestParameters['license'];
95
+ }
96
+ if (requestParameters['sort'] != null) {
97
+ queryParameters['sort'] = requestParameters['sort'];
98
+ }
99
+ if (requestParameters['limit'] != null) {
100
+ queryParameters['limit'] = requestParameters['limit'];
101
+ }
102
+ if (requestParameters['offset'] != null) {
103
+ queryParameters['offset'] = requestParameters['offset'];
104
+ }
105
+ const headerParameters = {};
106
+ if (this.configuration && this.configuration.accessToken) {
107
+ const token = this.configuration.accessToken;
108
+ const tokenString = yield token("bearerAuth", []);
109
+ if (tokenString) {
110
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
111
+ }
112
+ }
113
+ let urlPath = `/api/v1/datasets`;
114
+ return {
115
+ path: urlPath,
116
+ method: 'GET',
117
+ headers: headerParameters,
118
+ query: queryParameters,
119
+ };
120
+ });
121
+ }
122
+ /**
123
+ * Cost: 5-15 credits, by rows returned.
124
+ * List datasets
125
+ */
126
+ listDatasetsRaw(requestParameters, initOverrides) {
127
+ return __awaiter(this, void 0, void 0, function* () {
128
+ const requestOptions = yield this.listDatasetsRequestOpts(requestParameters);
129
+ const response = yield this.request(requestOptions, initOverrides);
130
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, ListDatasets200Response_1.ListDatasets200ResponseFromJSON)(jsonValue));
131
+ });
132
+ }
133
+ /**
134
+ * Cost: 5-15 credits, by rows returned.
135
+ * List datasets
136
+ */
137
+ listDatasets() {
138
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
139
+ const response = yield this.listDatasetsRaw(requestParameters, initOverrides);
140
+ return yield response.value();
141
+ });
142
+ }
143
+ }
144
+ exports.DatasetsApi = DatasetsApi;
145
+ /**
146
+ * @export
147
+ */
148
+ exports.ListDatasetsSortEnum = {
149
+ Downloads: 'downloads',
150
+ Downloads2: '-downloads',
151
+ CreatedAt: 'created_at',
152
+ CreatedAt2: '-created_at',
153
+ FirstSeenAt: 'first_seen_at',
154
+ FirstSeenAt2: '-first_seen_at',
155
+ };