arcane-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.
package/dist/index.js ADDED
@@ -0,0 +1,377 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ Arcan: () => Arcan,
34
+ ArcanApiError: () => ArcanApiError,
35
+ ArcanNotFoundError: () => ArcanNotFoundError,
36
+ ArcanUnauthorizedError: () => ArcanUnauthorizedError,
37
+ ArcaneClient: () => ArcaneClient
38
+ });
39
+ module.exports = __toCommonJS(index_exports);
40
+
41
+ // src/client.ts
42
+ var import_axios = __toESM(require("axios"));
43
+ var import_axios_retry = __toESM(require("axios-retry"));
44
+
45
+ // src/errors.ts
46
+ var ArcanApiError = class _ArcanApiError extends Error {
47
+ constructor(message, statusCode, requestId, cause) {
48
+ super(message);
49
+ this.statusCode = statusCode;
50
+ this.requestId = requestId;
51
+ this.cause = cause;
52
+ this.name = "ArcanApiError";
53
+ Object.setPrototypeOf(this, _ArcanApiError.prototype);
54
+ }
55
+ static fromAxiosError(err) {
56
+ const status = err.response?.status;
57
+ const message = err.response?.data?.message ?? err.message ?? err.response?.statusText ?? "Unknown API error";
58
+ const requestId = err.response?.headers?.["x-request-id"];
59
+ return new _ArcanApiError(message, status, requestId, err);
60
+ }
61
+ };
62
+ var ArcanNotFoundError = class extends ArcanApiError {
63
+ constructor(message, requestId) {
64
+ super(message, 404, requestId);
65
+ this.name = "ArcanNotFoundError";
66
+ }
67
+ };
68
+ var ArcanUnauthorizedError = class extends ArcanApiError {
69
+ constructor(message, requestId) {
70
+ super(message, 401, requestId);
71
+ this.name = "ArcanUnauthorizedError";
72
+ }
73
+ };
74
+
75
+ // src/client.ts
76
+ var ArcaneClient = class {
77
+ http;
78
+ constructor(config) {
79
+ const { baseUrl, apiKey, maxRetries = 3, timeout = 3e4 } = config;
80
+ const base = baseUrl.replace(/\/$/, "");
81
+ this.http = import_axios.default.create({
82
+ baseURL: base,
83
+ timeout,
84
+ auth: {
85
+ username: "api-key",
86
+ password: apiKey
87
+ },
88
+ headers: {
89
+ "Content-Type": "application/json"
90
+ }
91
+ });
92
+ (0, import_axios_retry.default)(this.http, {
93
+ retries: maxRetries,
94
+ retryCondition: (err) => {
95
+ const status = err.response?.status;
96
+ if (status && status >= 500 && status < 600) return true;
97
+ if (err.code === "ECONNRESET" || err.code === "ETIMEDOUT") return true;
98
+ return false;
99
+ },
100
+ retryDelay: import_axios_retry.default.exponentialDelay
101
+ });
102
+ }
103
+ getHttp() {
104
+ return this.http;
105
+ }
106
+ async get(path, params) {
107
+ const res = await this.http.get(path, { params });
108
+ return res.data;
109
+ }
110
+ async post(path, body) {
111
+ const res = await this.http.post(path, body);
112
+ return res.data;
113
+ }
114
+ handleError(err) {
115
+ if (import_axios.default.isAxiosError(err)) {
116
+ throw ArcanApiError.fromAxiosError(err);
117
+ }
118
+ throw err;
119
+ }
120
+ };
121
+
122
+ // src/resources/prompts.ts
123
+ var PromptsResource = class {
124
+ constructor(client) {
125
+ this.client = client;
126
+ }
127
+ async list() {
128
+ const res = await this.client.get("/api/public/prompts");
129
+ return res.data;
130
+ }
131
+ async get(promptIdentifier) {
132
+ const res = await this.client.get(
133
+ `/api/public/prompts/${encodeURIComponent(promptIdentifier)}`
134
+ );
135
+ return res.data;
136
+ }
137
+ async listVersions(promptIdentifier) {
138
+ const res = await this.client.get(
139
+ `/api/public/prompts/${encodeURIComponent(promptIdentifier)}/versions`
140
+ );
141
+ return res.data;
142
+ }
143
+ async getLatestVersion(promptIdentifier) {
144
+ const res = await this.client.get(
145
+ `/api/public/prompts/${encodeURIComponent(promptIdentifier)}/latest`
146
+ );
147
+ return res.data;
148
+ }
149
+ };
150
+
151
+ // src/resources/datasources.ts
152
+ var DatasourcesResource = class {
153
+ constructor(client) {
154
+ this.client = client;
155
+ }
156
+ async list() {
157
+ return this.client.get("/api/public/datasources");
158
+ }
159
+ };
160
+
161
+ // src/resources/traces.ts
162
+ var TracesResource = class {
163
+ constructor(client) {
164
+ this.client = client;
165
+ }
166
+ async search(datasourceId, params) {
167
+ return this.client.post(
168
+ `/api/public/datasources/${datasourceId}/traces/search`,
169
+ params ?? {}
170
+ );
171
+ }
172
+ async get(datasourceId, traceId) {
173
+ return this.client.get(
174
+ `/api/public/datasources/${datasourceId}/traces/${encodeURIComponent(traceId)}`
175
+ );
176
+ }
177
+ async getAttributeNames(datasourceId) {
178
+ return this.client.get(
179
+ `/api/public/datasources/${datasourceId}/traces/attributes`
180
+ );
181
+ }
182
+ async getAttributeValues(datasourceId, attributeName) {
183
+ return this.client.get(
184
+ `/api/public/datasources/${datasourceId}/traces/attributes/${encodeURIComponent(attributeName)}/values`
185
+ );
186
+ }
187
+ };
188
+
189
+ // src/resources/datasets.ts
190
+ var DatasetsResource = class {
191
+ constructor(client) {
192
+ this.client = client;
193
+ }
194
+ async list() {
195
+ return this.client.get("/api/public/datasets");
196
+ }
197
+ async get(datasetId, params) {
198
+ const query = {};
199
+ if (params?.page) query.page = params.page;
200
+ if (params?.limit) query.limit = params.limit;
201
+ if (params?.search) query.search = params.search;
202
+ if (params?.sortBy) query.sortBy = params.sortBy;
203
+ if (params?.sortOrder) query.sortOrder = params.sortOrder;
204
+ return this.client.get(
205
+ `/api/public/datasets/${datasetId}`,
206
+ Object.keys(query).length > 0 ? query : void 0
207
+ );
208
+ }
209
+ async *listRowsPaginated(datasetId, options) {
210
+ const pageSize = options?.pageSize ?? 20;
211
+ let page = 1;
212
+ let hasNext = true;
213
+ while (hasNext) {
214
+ const res = await this.get(datasetId, { page, limit: pageSize });
215
+ for (const row of res.data) {
216
+ yield row;
217
+ }
218
+ hasNext = res.pagination.hasNextPage;
219
+ page++;
220
+ }
221
+ }
222
+ async addRow(datasetId, params) {
223
+ return this.client.post(
224
+ `/api/public/datasets/${datasetId}/rows`,
225
+ params
226
+ );
227
+ }
228
+ };
229
+
230
+ // src/resources/entities.ts
231
+ var EntitiesResource = class {
232
+ constructor(client) {
233
+ this.client = client;
234
+ }
235
+ async list() {
236
+ return this.client.get("/api/public/entities");
237
+ }
238
+ async get(entityId) {
239
+ return this.client.get(`/api/public/entities/${entityId}`);
240
+ }
241
+ };
242
+
243
+ // src/resources/evaluations.ts
244
+ var EvaluationsResource = class {
245
+ constructor(client) {
246
+ this.client = client;
247
+ }
248
+ async list() {
249
+ return this.client.get("/api/public/evaluations");
250
+ }
251
+ async get(evaluationId) {
252
+ return this.client.get(`/api/public/evaluations/${evaluationId}`);
253
+ }
254
+ async getExperimentScores(evaluationId, experimentId) {
255
+ return this.client.get(
256
+ `/api/public/evaluations/${evaluationId}/experiments/${experimentId}/scores`
257
+ );
258
+ }
259
+ async create(params) {
260
+ return this.client.post("/api/public/evaluations", params);
261
+ }
262
+ async createResult(evaluationId, params) {
263
+ return this.client.post(
264
+ `/api/public/evaluations/${evaluationId}/results`,
265
+ params
266
+ );
267
+ }
268
+ async listPendingScoreResults(evaluationId, scoreId, options = {}) {
269
+ const params = {};
270
+ if (options.experimentId) params.experimentId = options.experimentId;
271
+ if (options.page != null) params.page = options.page;
272
+ if (options.limit != null) params.limit = options.limit;
273
+ return this.client.get(
274
+ `/api/public/evaluations/${evaluationId}/scores/${scoreId}/pending-results`,
275
+ params
276
+ );
277
+ }
278
+ async *listPendingScoreResultsIterator(evaluationId, scoreId, options = {}) {
279
+ const limit = options.limit ?? 100;
280
+ let page = 1;
281
+ let hasNext = true;
282
+ while (hasNext) {
283
+ const res = await this.listPendingScoreResults(evaluationId, scoreId, {
284
+ ...options,
285
+ page,
286
+ limit
287
+ });
288
+ for (const item of res.data) {
289
+ yield item;
290
+ }
291
+ hasNext = res.pagination.hasNextPage;
292
+ page++;
293
+ }
294
+ }
295
+ async importScoreResults(evaluationId, scoreId, results) {
296
+ return this.client.post(
297
+ `/api/public/evaluations/${evaluationId}/scores/${scoreId}/import-results`,
298
+ { results }
299
+ );
300
+ }
301
+ };
302
+
303
+ // src/resources/experiments.ts
304
+ var ExperimentsResource = class {
305
+ constructor(client) {
306
+ this.client = client;
307
+ }
308
+ async list() {
309
+ return this.client.get("/api/public/experiments");
310
+ }
311
+ async get(experimentId) {
312
+ return this.client.get(`/api/public/experiments/${experimentId}`);
313
+ }
314
+ async listResults(experimentId, params) {
315
+ const query = {};
316
+ if (params?.page) query.page = params.page;
317
+ if (params?.limit) query.limit = params.limit;
318
+ if (params?.search) query.search = params.search;
319
+ if (params?.sortBy) query.sortBy = params.sortBy;
320
+ if (params?.sortOrder) query.sortOrder = params.sortOrder;
321
+ return this.client.get(
322
+ `/api/public/experiments/${experimentId}/results`,
323
+ Object.keys(query).length > 0 ? query : void 0
324
+ );
325
+ }
326
+ async *listResultsPaginated(experimentId, options) {
327
+ const pageSize = options?.pageSize ?? 20;
328
+ let page = 1;
329
+ let hasNext = true;
330
+ while (hasNext) {
331
+ const res = await this.listResults(experimentId, { page, limit: pageSize });
332
+ for (const item of res.data) {
333
+ yield item;
334
+ }
335
+ hasNext = res.pagination.hasNextPage;
336
+ page++;
337
+ }
338
+ }
339
+ async create(params) {
340
+ return this.client.post("/api/public/experiments", params);
341
+ }
342
+ async createResult(experimentId, params) {
343
+ return this.client.post(
344
+ `/api/public/experiments/${experimentId}/results`,
345
+ params
346
+ );
347
+ }
348
+ };
349
+
350
+ // src/index.ts
351
+ var Arcan = class extends ArcaneClient {
352
+ prompts;
353
+ datasources;
354
+ traces;
355
+ datasets;
356
+ entities;
357
+ evaluations;
358
+ experiments;
359
+ constructor(config) {
360
+ super(config);
361
+ this.prompts = new PromptsResource(this);
362
+ this.datasources = new DatasourcesResource(this);
363
+ this.traces = new TracesResource(this);
364
+ this.datasets = new DatasetsResource(this);
365
+ this.entities = new EntitiesResource(this);
366
+ this.evaluations = new EvaluationsResource(this);
367
+ this.experiments = new ExperimentsResource(this);
368
+ }
369
+ };
370
+ // Annotate the CommonJS export names for ESM import in node:
371
+ 0 && (module.exports = {
372
+ Arcan,
373
+ ArcanApiError,
374
+ ArcanNotFoundError,
375
+ ArcanUnauthorizedError,
376
+ ArcaneClient
377
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,336 @@
1
+ // src/client.ts
2
+ import axios from "axios";
3
+ import axiosRetry from "axios-retry";
4
+
5
+ // src/errors.ts
6
+ var ArcanApiError = class _ArcanApiError extends Error {
7
+ constructor(message, statusCode, requestId, cause) {
8
+ super(message);
9
+ this.statusCode = statusCode;
10
+ this.requestId = requestId;
11
+ this.cause = cause;
12
+ this.name = "ArcanApiError";
13
+ Object.setPrototypeOf(this, _ArcanApiError.prototype);
14
+ }
15
+ static fromAxiosError(err) {
16
+ const status = err.response?.status;
17
+ const message = err.response?.data?.message ?? err.message ?? err.response?.statusText ?? "Unknown API error";
18
+ const requestId = err.response?.headers?.["x-request-id"];
19
+ return new _ArcanApiError(message, status, requestId, err);
20
+ }
21
+ };
22
+ var ArcanNotFoundError = class extends ArcanApiError {
23
+ constructor(message, requestId) {
24
+ super(message, 404, requestId);
25
+ this.name = "ArcanNotFoundError";
26
+ }
27
+ };
28
+ var ArcanUnauthorizedError = class extends ArcanApiError {
29
+ constructor(message, requestId) {
30
+ super(message, 401, requestId);
31
+ this.name = "ArcanUnauthorizedError";
32
+ }
33
+ };
34
+
35
+ // src/client.ts
36
+ var ArcaneClient = class {
37
+ http;
38
+ constructor(config) {
39
+ const { baseUrl, apiKey, maxRetries = 3, timeout = 3e4 } = config;
40
+ const base = baseUrl.replace(/\/$/, "");
41
+ this.http = axios.create({
42
+ baseURL: base,
43
+ timeout,
44
+ auth: {
45
+ username: "api-key",
46
+ password: apiKey
47
+ },
48
+ headers: {
49
+ "Content-Type": "application/json"
50
+ }
51
+ });
52
+ axiosRetry(this.http, {
53
+ retries: maxRetries,
54
+ retryCondition: (err) => {
55
+ const status = err.response?.status;
56
+ if (status && status >= 500 && status < 600) return true;
57
+ if (err.code === "ECONNRESET" || err.code === "ETIMEDOUT") return true;
58
+ return false;
59
+ },
60
+ retryDelay: axiosRetry.exponentialDelay
61
+ });
62
+ }
63
+ getHttp() {
64
+ return this.http;
65
+ }
66
+ async get(path, params) {
67
+ const res = await this.http.get(path, { params });
68
+ return res.data;
69
+ }
70
+ async post(path, body) {
71
+ const res = await this.http.post(path, body);
72
+ return res.data;
73
+ }
74
+ handleError(err) {
75
+ if (axios.isAxiosError(err)) {
76
+ throw ArcanApiError.fromAxiosError(err);
77
+ }
78
+ throw err;
79
+ }
80
+ };
81
+
82
+ // src/resources/prompts.ts
83
+ var PromptsResource = class {
84
+ constructor(client) {
85
+ this.client = client;
86
+ }
87
+ async list() {
88
+ const res = await this.client.get("/api/public/prompts");
89
+ return res.data;
90
+ }
91
+ async get(promptIdentifier) {
92
+ const res = await this.client.get(
93
+ `/api/public/prompts/${encodeURIComponent(promptIdentifier)}`
94
+ );
95
+ return res.data;
96
+ }
97
+ async listVersions(promptIdentifier) {
98
+ const res = await this.client.get(
99
+ `/api/public/prompts/${encodeURIComponent(promptIdentifier)}/versions`
100
+ );
101
+ return res.data;
102
+ }
103
+ async getLatestVersion(promptIdentifier) {
104
+ const res = await this.client.get(
105
+ `/api/public/prompts/${encodeURIComponent(promptIdentifier)}/latest`
106
+ );
107
+ return res.data;
108
+ }
109
+ };
110
+
111
+ // src/resources/datasources.ts
112
+ var DatasourcesResource = class {
113
+ constructor(client) {
114
+ this.client = client;
115
+ }
116
+ async list() {
117
+ return this.client.get("/api/public/datasources");
118
+ }
119
+ };
120
+
121
+ // src/resources/traces.ts
122
+ var TracesResource = class {
123
+ constructor(client) {
124
+ this.client = client;
125
+ }
126
+ async search(datasourceId, params) {
127
+ return this.client.post(
128
+ `/api/public/datasources/${datasourceId}/traces/search`,
129
+ params ?? {}
130
+ );
131
+ }
132
+ async get(datasourceId, traceId) {
133
+ return this.client.get(
134
+ `/api/public/datasources/${datasourceId}/traces/${encodeURIComponent(traceId)}`
135
+ );
136
+ }
137
+ async getAttributeNames(datasourceId) {
138
+ return this.client.get(
139
+ `/api/public/datasources/${datasourceId}/traces/attributes`
140
+ );
141
+ }
142
+ async getAttributeValues(datasourceId, attributeName) {
143
+ return this.client.get(
144
+ `/api/public/datasources/${datasourceId}/traces/attributes/${encodeURIComponent(attributeName)}/values`
145
+ );
146
+ }
147
+ };
148
+
149
+ // src/resources/datasets.ts
150
+ var DatasetsResource = class {
151
+ constructor(client) {
152
+ this.client = client;
153
+ }
154
+ async list() {
155
+ return this.client.get("/api/public/datasets");
156
+ }
157
+ async get(datasetId, params) {
158
+ const query = {};
159
+ if (params?.page) query.page = params.page;
160
+ if (params?.limit) query.limit = params.limit;
161
+ if (params?.search) query.search = params.search;
162
+ if (params?.sortBy) query.sortBy = params.sortBy;
163
+ if (params?.sortOrder) query.sortOrder = params.sortOrder;
164
+ return this.client.get(
165
+ `/api/public/datasets/${datasetId}`,
166
+ Object.keys(query).length > 0 ? query : void 0
167
+ );
168
+ }
169
+ async *listRowsPaginated(datasetId, options) {
170
+ const pageSize = options?.pageSize ?? 20;
171
+ let page = 1;
172
+ let hasNext = true;
173
+ while (hasNext) {
174
+ const res = await this.get(datasetId, { page, limit: pageSize });
175
+ for (const row of res.data) {
176
+ yield row;
177
+ }
178
+ hasNext = res.pagination.hasNextPage;
179
+ page++;
180
+ }
181
+ }
182
+ async addRow(datasetId, params) {
183
+ return this.client.post(
184
+ `/api/public/datasets/${datasetId}/rows`,
185
+ params
186
+ );
187
+ }
188
+ };
189
+
190
+ // src/resources/entities.ts
191
+ var EntitiesResource = class {
192
+ constructor(client) {
193
+ this.client = client;
194
+ }
195
+ async list() {
196
+ return this.client.get("/api/public/entities");
197
+ }
198
+ async get(entityId) {
199
+ return this.client.get(`/api/public/entities/${entityId}`);
200
+ }
201
+ };
202
+
203
+ // src/resources/evaluations.ts
204
+ var EvaluationsResource = class {
205
+ constructor(client) {
206
+ this.client = client;
207
+ }
208
+ async list() {
209
+ return this.client.get("/api/public/evaluations");
210
+ }
211
+ async get(evaluationId) {
212
+ return this.client.get(`/api/public/evaluations/${evaluationId}`);
213
+ }
214
+ async getExperimentScores(evaluationId, experimentId) {
215
+ return this.client.get(
216
+ `/api/public/evaluations/${evaluationId}/experiments/${experimentId}/scores`
217
+ );
218
+ }
219
+ async create(params) {
220
+ return this.client.post("/api/public/evaluations", params);
221
+ }
222
+ async createResult(evaluationId, params) {
223
+ return this.client.post(
224
+ `/api/public/evaluations/${evaluationId}/results`,
225
+ params
226
+ );
227
+ }
228
+ async listPendingScoreResults(evaluationId, scoreId, options = {}) {
229
+ const params = {};
230
+ if (options.experimentId) params.experimentId = options.experimentId;
231
+ if (options.page != null) params.page = options.page;
232
+ if (options.limit != null) params.limit = options.limit;
233
+ return this.client.get(
234
+ `/api/public/evaluations/${evaluationId}/scores/${scoreId}/pending-results`,
235
+ params
236
+ );
237
+ }
238
+ async *listPendingScoreResultsIterator(evaluationId, scoreId, options = {}) {
239
+ const limit = options.limit ?? 100;
240
+ let page = 1;
241
+ let hasNext = true;
242
+ while (hasNext) {
243
+ const res = await this.listPendingScoreResults(evaluationId, scoreId, {
244
+ ...options,
245
+ page,
246
+ limit
247
+ });
248
+ for (const item of res.data) {
249
+ yield item;
250
+ }
251
+ hasNext = res.pagination.hasNextPage;
252
+ page++;
253
+ }
254
+ }
255
+ async importScoreResults(evaluationId, scoreId, results) {
256
+ return this.client.post(
257
+ `/api/public/evaluations/${evaluationId}/scores/${scoreId}/import-results`,
258
+ { results }
259
+ );
260
+ }
261
+ };
262
+
263
+ // src/resources/experiments.ts
264
+ var ExperimentsResource = class {
265
+ constructor(client) {
266
+ this.client = client;
267
+ }
268
+ async list() {
269
+ return this.client.get("/api/public/experiments");
270
+ }
271
+ async get(experimentId) {
272
+ return this.client.get(`/api/public/experiments/${experimentId}`);
273
+ }
274
+ async listResults(experimentId, params) {
275
+ const query = {};
276
+ if (params?.page) query.page = params.page;
277
+ if (params?.limit) query.limit = params.limit;
278
+ if (params?.search) query.search = params.search;
279
+ if (params?.sortBy) query.sortBy = params.sortBy;
280
+ if (params?.sortOrder) query.sortOrder = params.sortOrder;
281
+ return this.client.get(
282
+ `/api/public/experiments/${experimentId}/results`,
283
+ Object.keys(query).length > 0 ? query : void 0
284
+ );
285
+ }
286
+ async *listResultsPaginated(experimentId, options) {
287
+ const pageSize = options?.pageSize ?? 20;
288
+ let page = 1;
289
+ let hasNext = true;
290
+ while (hasNext) {
291
+ const res = await this.listResults(experimentId, { page, limit: pageSize });
292
+ for (const item of res.data) {
293
+ yield item;
294
+ }
295
+ hasNext = res.pagination.hasNextPage;
296
+ page++;
297
+ }
298
+ }
299
+ async create(params) {
300
+ return this.client.post("/api/public/experiments", params);
301
+ }
302
+ async createResult(experimentId, params) {
303
+ return this.client.post(
304
+ `/api/public/experiments/${experimentId}/results`,
305
+ params
306
+ );
307
+ }
308
+ };
309
+
310
+ // src/index.ts
311
+ var Arcan = class extends ArcaneClient {
312
+ prompts;
313
+ datasources;
314
+ traces;
315
+ datasets;
316
+ entities;
317
+ evaluations;
318
+ experiments;
319
+ constructor(config) {
320
+ super(config);
321
+ this.prompts = new PromptsResource(this);
322
+ this.datasources = new DatasourcesResource(this);
323
+ this.traces = new TracesResource(this);
324
+ this.datasets = new DatasetsResource(this);
325
+ this.entities = new EntitiesResource(this);
326
+ this.evaluations = new EvaluationsResource(this);
327
+ this.experiments = new ExperimentsResource(this);
328
+ }
329
+ };
330
+ export {
331
+ Arcan,
332
+ ArcanApiError,
333
+ ArcanNotFoundError,
334
+ ArcanUnauthorizedError,
335
+ ArcaneClient
336
+ };