langsmith 0.7.9 → 0.7.11
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/README.md +46 -15
- package/dist/_openapi_client/client.cjs +0 -88
- package/dist/_openapi_client/client.d.ts +0 -33
- package/dist/_openapi_client/client.js +0 -88
- package/dist/_openapi_client/internal/headers.d.ts +13 -0
- package/dist/_openapi_client/internal/types.d.ts +1 -28
- package/dist/_openapi_client/resources/datasets/datasets.d.ts +52 -4
- package/dist/_openapi_client/resources/datasets/runs.d.ts +1 -2
- package/dist/_openapi_client/resources/index.cjs +1 -23
- package/dist/_openapi_client/resources/index.d.ts +0 -11
- package/dist/_openapi_client/resources/index.js +0 -11
- package/dist/anonymizer/index.cjs +142 -0
- package/dist/anonymizer/index.d.ts +45 -0
- package/dist/anonymizer/index.js +140 -0
- package/dist/client.cjs +26 -1
- package/dist/client.d.ts +4 -1
- package/dist/client.js +25 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/sandbox/client.cjs +5 -8
- package/dist/sandbox/client.js +5 -8
- package/dist/sandbox/index.cjs +2 -1
- package/dist/sandbox/index.d.ts +2 -2
- package/dist/sandbox/index.js +1 -1
- package/dist/sandbox/mounts.cjs +157 -18
- package/dist/sandbox/mounts.d.ts +10 -2
- package/dist/sandbox/mounts.js +155 -18
- package/dist/sandbox/proxy_config.cjs +19 -44
- package/dist/sandbox/proxy_config.d.ts +2 -4
- package/dist/sandbox/proxy_config.js +19 -43
- package/dist/sandbox/types.d.ts +56 -15
- package/dist/utils/constants.cjs +4 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +1 -0
- package/package.json +2 -2
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +0 -138
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +0 -367
- package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +0 -101
- package/dist/_openapi_client/resources/annotation-queues/runs.cjs +0 -46
- package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +0 -128
- package/dist/_openapi_client/resources/annotation-queues/runs.js +0 -42
- package/dist/_openapi_client/resources/commits.cjs +0 -44
- package/dist/_openapi_client/resources/commits.d.ts +0 -204
- package/dist/_openapi_client/resources/commits.js +0 -40
- package/dist/_openapi_client/resources/evaluators.cjs +0 -15
- package/dist/_openapi_client/resources/evaluators.d.ts +0 -125
- package/dist/_openapi_client/resources/evaluators.js +0 -11
- package/dist/_openapi_client/resources/examples/bulk.cjs +0 -24
- package/dist/_openapi_client/resources/examples/bulk.d.ts +0 -78
- package/dist/_openapi_client/resources/examples/bulk.js +0 -20
- package/dist/_openapi_client/resources/examples/examples.cjs +0 -124
- package/dist/_openapi_client/resources/examples/examples.d.ts +0 -182
- package/dist/_openapi_client/resources/examples/examples.js +0 -87
- package/dist/_openapi_client/resources/examples/validate.cjs +0 -21
- package/dist/_openapi_client/resources/examples/validate.d.ts +0 -38
- package/dist/_openapi_client/resources/examples/validate.js +0 -17
- package/dist/_openapi_client/resources/feedback/configs.cjs +0 -24
- package/dist/_openapi_client/resources/feedback/configs.d.ts +0 -18
- package/dist/_openapi_client/resources/feedback/configs.js +0 -20
- package/dist/_openapi_client/resources/feedback/feedback.cjs +0 -98
- package/dist/_openapi_client/resources/feedback/feedback.d.ts +0 -275
- package/dist/_openapi_client/resources/feedback/feedback.js +0 -61
- package/dist/_openapi_client/resources/feedback/tokens.cjs +0 -35
- package/dist/_openapi_client/resources/feedback/tokens.d.ts +0 -130
- package/dist/_openapi_client/resources/feedback/tokens.js +0 -31
- package/dist/_openapi_client/resources/public/datasets.cjs +0 -47
- package/dist/_openapi_client/resources/public/datasets.d.ts +0 -152
- package/dist/_openapi_client/resources/public/datasets.js +0 -43
- package/dist/_openapi_client/resources/public/public.cjs +0 -62
- package/dist/_openapi_client/resources/public/public.d.ts +0 -32
- package/dist/_openapi_client/resources/public/public.js +0 -25
- package/dist/_openapi_client/resources/repos/directories.cjs +0 -40
- package/dist/_openapi_client/resources/repos/directories.d.ts +0 -72
- package/dist/_openapi_client/resources/repos/directories.js +0 -36
- package/dist/_openapi_client/resources/repos/repos.cjs +0 -93
- package/dist/_openapi_client/resources/repos/repos.d.ts +0 -188
- package/dist/_openapi_client/resources/repos/repos.js +0 -56
- package/dist/_openapi_client/resources/runs/rules.cjs +0 -9
- package/dist/_openapi_client/resources/runs/rules.d.ts +0 -3
- package/dist/_openapi_client/resources/runs/rules.js +0 -5
- package/dist/_openapi_client/resources/runs/runs.cjs +0 -102
- package/dist/_openapi_client/resources/runs/runs.d.ts +0 -542
- package/dist/_openapi_client/resources/runs/runs.js +0 -65
- package/dist/_openapi_client/resources/sandboxes/boxes.cjs +0 -86
- package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +0 -1121
- package/dist/_openapi_client/resources/sandboxes/boxes.js +0 -82
- package/dist/_openapi_client/resources/sandboxes/sandboxes.cjs +0 -63
- package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +0 -13
- package/dist/_openapi_client/resources/sandboxes/sandboxes.js +0 -26
- package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +0 -39
- package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +0 -130
- package/dist/_openapi_client/resources/sandboxes/snapshots.js +0 -35
- package/dist/_openapi_client/resources/settings.cjs +0 -15
- package/dist/_openapi_client/resources/settings.d.ts +0 -18
- package/dist/_openapi_client/resources/settings.js +0 -11
- package/dist/_openapi_client/resources/workspaces.cjs +0 -35
- package/dist/_openapi_client/resources/workspaces.d.ts +0 -84
- package/dist/_openapi_client/resources/workspaces.js +0 -31
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
const DEFAULT_GCP_AUTH_MATCH_HOSTS = [
|
|
2
|
-
"storage.googleapis.com",
|
|
3
|
-
"www.googleapis.com",
|
|
4
|
-
];
|
|
5
|
-
const PROVIDER_RULE_TYPES = new Set(["aws", "gcp"]);
|
|
6
1
|
function requireNonEmptyString(value, field) {
|
|
7
2
|
if (typeof value !== "string" || value.trim() === "") {
|
|
8
3
|
throw new Error(`${field} must be a non-empty string`);
|
|
@@ -26,9 +21,20 @@ function requireProxyRules(rules) {
|
|
|
26
21
|
if (rule === null || typeof rule !== "object" || Array.isArray(rule)) {
|
|
27
22
|
throw new Error("rules must be an array of proxy rule objects");
|
|
28
23
|
}
|
|
24
|
+
validateProxyProviderRule(rule);
|
|
29
25
|
return rule;
|
|
30
26
|
});
|
|
31
27
|
}
|
|
28
|
+
function validateProxyProviderRule(rule) {
|
|
29
|
+
if (rule.type !== "gcp") {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const gcp = rule.gcp;
|
|
33
|
+
if (gcp === undefined || gcp.scopes === undefined) {
|
|
34
|
+
throw new Error("gcp proxy auth rules require scopes");
|
|
35
|
+
}
|
|
36
|
+
requireNonEmptyStringArray(gcp.scopes, "scopes");
|
|
37
|
+
}
|
|
32
38
|
/** Reference a LangSmith workspace secret in a sandbox proxy configuration. */
|
|
33
39
|
export function workspaceSecret(name) {
|
|
34
40
|
const normalized = requireNonEmptyString(name, "name");
|
|
@@ -65,38 +71,6 @@ export function proxyConfig({ rules, noProxy, accessControl, } = {}) {
|
|
|
65
71
|
}
|
|
66
72
|
return config;
|
|
67
73
|
}
|
|
68
|
-
function providerRuleTypes(config) {
|
|
69
|
-
const providers = new Set();
|
|
70
|
-
for (const rule of config.rules ?? []) {
|
|
71
|
-
if (rule === null || typeof rule !== "object" || Array.isArray(rule)) {
|
|
72
|
-
continue;
|
|
73
|
-
}
|
|
74
|
-
const ruleType = rule.type;
|
|
75
|
-
if (typeof ruleType === "string" && PROVIDER_RULE_TYPES.has(ruleType)) {
|
|
76
|
-
providers.add(ruleType);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
return providers;
|
|
80
|
-
}
|
|
81
|
-
export function mergeProxyConfigs(generatedConfig, explicitConfig) {
|
|
82
|
-
if (generatedConfig === undefined) {
|
|
83
|
-
return explicitConfig;
|
|
84
|
-
}
|
|
85
|
-
if (explicitConfig === undefined) {
|
|
86
|
-
return generatedConfig;
|
|
87
|
-
}
|
|
88
|
-
const generatedProviders = providerRuleTypes(generatedConfig);
|
|
89
|
-
for (const provider of providerRuleTypes(explicitConfig)) {
|
|
90
|
-
if (generatedProviders.has(provider)) {
|
|
91
|
-
throw new Error(`${provider} auth cannot be provided in both mountConfig and proxyConfig`);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return {
|
|
95
|
-
...generatedConfig,
|
|
96
|
-
...explicitConfig,
|
|
97
|
-
rules: [...(generatedConfig.rules ?? []), ...(explicitConfig.rules ?? [])],
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
74
|
/** Build a sandbox proxy rule that signs AWS HTTPS requests with SigV4. */
|
|
101
75
|
export function awsAuth({ accessKeyId, secretAccessKey, name = "aws", enabled = true, }) {
|
|
102
76
|
return {
|
|
@@ -110,15 +84,17 @@ export function awsAuth({ accessKeyId, secretAccessKey, name = "aws", enabled =
|
|
|
110
84
|
};
|
|
111
85
|
}
|
|
112
86
|
/** Build a sandbox proxy rule that injects GCP OAuth bearer auth. */
|
|
113
|
-
export function gcpAuth({ serviceAccountJson, scopes,
|
|
87
|
+
export function gcpAuth({ serviceAccountJson, scopes, name = "gcp", enabled = true, }) {
|
|
88
|
+
const gcp = {
|
|
89
|
+
service_account_json: serviceAccountJson,
|
|
90
|
+
};
|
|
91
|
+
if (scopes !== undefined) {
|
|
92
|
+
gcp.scopes = requireNonEmptyStringArray(scopes, "scopes");
|
|
93
|
+
}
|
|
114
94
|
return {
|
|
115
95
|
name: requireNonEmptyString(name, "name"),
|
|
116
96
|
type: "gcp",
|
|
117
97
|
enabled,
|
|
118
|
-
|
|
119
|
-
gcp: {
|
|
120
|
-
service_account_json: serviceAccountJson,
|
|
121
|
-
scopes: requireNonEmptyStringArray(scopes, "scopes"),
|
|
122
|
-
},
|
|
98
|
+
gcp,
|
|
123
99
|
};
|
|
124
100
|
}
|
package/dist/sandbox/types.d.ts
CHANGED
|
@@ -280,16 +280,14 @@ export interface SandboxAwsAuthRule {
|
|
|
280
280
|
export interface SandboxGcpAuthRule {
|
|
281
281
|
/** Rule name. */
|
|
282
282
|
name: string;
|
|
283
|
-
/** GCP auth rules
|
|
283
|
+
/** GCP auth rules use the sandbox proxy's built-in Google API host matcher. */
|
|
284
284
|
type: "gcp";
|
|
285
285
|
/** Whether the rule is enabled. */
|
|
286
286
|
enabled?: boolean;
|
|
287
|
-
/** Google API hosts covered by this rule, such as storage.googleapis.com. */
|
|
288
|
-
match_hosts: string[];
|
|
289
287
|
/** GCP service-account credential and OAuth scopes. */
|
|
290
288
|
gcp: {
|
|
291
289
|
service_account_json: SandboxProxySecret;
|
|
292
|
-
scopes
|
|
290
|
+
scopes?: string[];
|
|
293
291
|
};
|
|
294
292
|
}
|
|
295
293
|
/** Proxy rule accepted by the sandbox proxy config. */
|
|
@@ -307,14 +305,14 @@ export interface SandboxProxyConfig {
|
|
|
307
305
|
/** Allow/deny list enforced at the proxy sidecar. */
|
|
308
306
|
access_control?: SandboxAccessControl;
|
|
309
307
|
}
|
|
310
|
-
/** Optional per-mount cache configuration supported by
|
|
308
|
+
/** Optional per-mount cache configuration supported by bucket mounts. */
|
|
311
309
|
export interface MountCacheConfig {
|
|
312
310
|
/** Maximum VFS cache size in bytes. */
|
|
313
311
|
max_size_bytes?: number;
|
|
314
312
|
/** Seconds rclone waits before writing cached changes back. */
|
|
315
313
|
writeback_seconds?: number;
|
|
316
314
|
}
|
|
317
|
-
interface
|
|
315
|
+
interface SandboxBucketMountBase {
|
|
318
316
|
/** Stable mount identifier. */
|
|
319
317
|
id: string;
|
|
320
318
|
/** Absolute path inside the sandbox where the mount appears. */
|
|
@@ -341,7 +339,7 @@ export interface S3MountConfig {
|
|
|
341
339
|
path_style?: boolean;
|
|
342
340
|
}
|
|
343
341
|
/** S3-backed sandbox mount specification. */
|
|
344
|
-
export interface S3MountSpec extends
|
|
342
|
+
export interface S3MountSpec extends SandboxBucketMountBase {
|
|
345
343
|
/** Mount type. */
|
|
346
344
|
type: "s3";
|
|
347
345
|
/** S3 mount configuration. */
|
|
@@ -355,20 +353,63 @@ export interface GCSMountConfig {
|
|
|
355
353
|
prefix?: string;
|
|
356
354
|
}
|
|
357
355
|
/** GCS-backed sandbox mount specification. */
|
|
358
|
-
export interface GCSMountSpec extends
|
|
356
|
+
export interface GCSMountSpec extends SandboxBucketMountBase {
|
|
359
357
|
/** Mount type. */
|
|
360
358
|
type: "gcs";
|
|
361
359
|
/** GCS mount configuration. */
|
|
362
360
|
gcs: GCSMountConfig;
|
|
363
361
|
}
|
|
362
|
+
/** Git ref selected for a sandbox mount. */
|
|
363
|
+
export interface GitMountRefSpec {
|
|
364
|
+
/** Git ref type. */
|
|
365
|
+
type: "branch" | "tag";
|
|
366
|
+
/** Branch or tag name. */
|
|
367
|
+
name: string;
|
|
368
|
+
}
|
|
369
|
+
/** Git configuration for a sandbox mount. */
|
|
370
|
+
export interface GitMountConfig {
|
|
371
|
+
/** Public HTTPS Git remote URL. */
|
|
372
|
+
remote_url: string;
|
|
373
|
+
/** Optional branch or tag to mount. */
|
|
374
|
+
ref?: GitMountRefSpec;
|
|
375
|
+
/** Optional refresh interval for polling the remote. */
|
|
376
|
+
refresh_interval_seconds?: number;
|
|
377
|
+
}
|
|
378
|
+
/** Git-backed sandbox mount specification. */
|
|
379
|
+
export interface GitMountSpec {
|
|
380
|
+
/** Stable mount identifier. */
|
|
381
|
+
id: string;
|
|
382
|
+
/** Mount type. */
|
|
383
|
+
type: "git";
|
|
384
|
+
/** Absolute path inside the sandbox where the mount appears. */
|
|
385
|
+
mount_path: string;
|
|
386
|
+
/** Git mount configuration. */
|
|
387
|
+
git: GitMountConfig;
|
|
388
|
+
}
|
|
364
389
|
/** Sandbox mount specification. */
|
|
365
|
-
export type SandboxMount = S3MountSpec | GCSMountSpec;
|
|
366
|
-
/**
|
|
390
|
+
export type SandboxMount = S3MountSpec | GCSMountSpec | GitMountSpec;
|
|
391
|
+
/** AWS credentials used by the backend to authenticate S3 mounts. */
|
|
392
|
+
export interface SandboxAwsMountAuthConfig {
|
|
393
|
+
access_key_id: SandboxProxySecret;
|
|
394
|
+
secret_access_key: SandboxProxySecret;
|
|
395
|
+
}
|
|
396
|
+
/** GCP credentials used by the backend to authenticate GCS mounts. */
|
|
397
|
+
export interface SandboxGcpMountAuthConfig {
|
|
398
|
+
service_account_json: SandboxProxySecret;
|
|
399
|
+
}
|
|
400
|
+
/** Provider auth blocks for sandbox mounts. */
|
|
401
|
+
export interface SandboxMountAuthConfig {
|
|
402
|
+
aws?: SandboxAwsMountAuthConfig;
|
|
403
|
+
gcp?: SandboxGcpMountAuthConfig;
|
|
404
|
+
}
|
|
405
|
+
/** Provider auth helper output accepted by mountConfig. */
|
|
406
|
+
export type SandboxMountAuth = SandboxAwsAuthRule | SandboxGcpAuthRule;
|
|
407
|
+
/** Public mount config sent to the sandbox API. */
|
|
367
408
|
export interface SandboxMountConfig {
|
|
409
|
+
/** Provider auth blocks for bucket-backed mounts. */
|
|
410
|
+
auth: SandboxMountAuthConfig;
|
|
368
411
|
/** Mounts attached to the sandbox. */
|
|
369
412
|
mounts: SandboxMount[];
|
|
370
|
-
/** Proxy auth config required by the mounts. */
|
|
371
|
-
proxyConfig: SandboxProxyConfig;
|
|
372
413
|
}
|
|
373
414
|
/**
|
|
374
415
|
* Options for creating a sandbox.
|
|
@@ -417,9 +458,9 @@ export interface CreateSandboxOptions {
|
|
|
417
458
|
/** Root filesystem capacity in bytes. */
|
|
418
459
|
fsCapacityBytes?: number;
|
|
419
460
|
/**
|
|
420
|
-
*
|
|
421
|
-
*
|
|
422
|
-
*
|
|
461
|
+
* Mount configuration forwarded to the server as `mount_config`. The backend
|
|
462
|
+
* expands mount auth into runtime proxy rules. Explicit AWS/GCP proxy rules
|
|
463
|
+
* in `proxyConfig` conflict with mount auth for the same provider.
|
|
423
464
|
*/
|
|
424
465
|
mountConfig?: SandboxMountConfig;
|
|
425
466
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const _MIN_BACKEND_VERSION = "0.16.5rc1";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const _MIN_BACKEND_VERSION = "0.16.5rc1";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langsmith",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.11",
|
|
4
4
|
"description": "Client library to connect to the LangSmith Observability and Evaluation Platform.",
|
|
5
5
|
"packageManager": "pnpm@10.33.0",
|
|
6
6
|
"files": [
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"main": "./dist/index.js",
|
|
115
115
|
"types": "./dist/index.d.ts",
|
|
116
116
|
"scripts": {
|
|
117
|
-
"build": "pnpm clean && pnpm build:esm && pnpm build:cjs && node scripts/create-entrypoints.js",
|
|
117
|
+
"build": "pnpm clean && pnpm build:esm && pnpm build:cjs && node scripts/create-entrypoints.js && node scripts/fix-openapi-client-declarations.js",
|
|
118
118
|
"build:typedoc": "pnpm build && rm -rf ./_build/api_refs && npx typedoc",
|
|
119
119
|
"bump-version": "node scripts/bump-version.js",
|
|
120
120
|
"check-version": "node scripts/check-version.js",
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// @ts-nocheck
|
|
3
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
4
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
5
|
-
if (k2 === undefined) k2 = k;
|
|
6
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
7
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
8
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
9
|
-
}
|
|
10
|
-
Object.defineProperty(o, k2, desc);
|
|
11
|
-
}) : (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
o[k2] = m[k];
|
|
14
|
-
}));
|
|
15
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
16
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
17
|
-
}) : function(o, v) {
|
|
18
|
-
o["default"] = v;
|
|
19
|
-
});
|
|
20
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
21
|
-
var ownKeys = function(o) {
|
|
22
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
23
|
-
var ar = [];
|
|
24
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
25
|
-
return ar;
|
|
26
|
-
};
|
|
27
|
-
return ownKeys(o);
|
|
28
|
-
};
|
|
29
|
-
return function (mod) {
|
|
30
|
-
if (mod && mod.__esModule) return mod;
|
|
31
|
-
var result = {};
|
|
32
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
33
|
-
__setModuleDefault(result, mod);
|
|
34
|
-
return result;
|
|
35
|
-
};
|
|
36
|
-
})();
|
|
37
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
-
exports.AnnotationQueues = void 0;
|
|
39
|
-
const resource_js_1 = require("../../core/resource.cjs");
|
|
40
|
-
const RunsAPI = __importStar(require("./runs.cjs"));
|
|
41
|
-
const runs_js_1 = require("./runs.cjs");
|
|
42
|
-
const pagination_js_1 = require("../../core/pagination.cjs");
|
|
43
|
-
const path_js_1 = require("../../internal/utils/path.cjs");
|
|
44
|
-
class AnnotationQueues extends resource_js_1.APIResource {
|
|
45
|
-
constructor() {
|
|
46
|
-
super(...arguments);
|
|
47
|
-
Object.defineProperty(this, "runs", {
|
|
48
|
-
enumerable: true,
|
|
49
|
-
configurable: true,
|
|
50
|
-
writable: true,
|
|
51
|
-
value: new RunsAPI.Runs(this._client)
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Get Annotation Queue
|
|
56
|
-
*/
|
|
57
|
-
retrieve(queueID, options) {
|
|
58
|
-
return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}`, options);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Update Annotation Queue
|
|
62
|
-
*/
|
|
63
|
-
update(queueID, body, options) {
|
|
64
|
-
return this._client.patch((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}`, { body, ...options });
|
|
65
|
-
}
|
|
66
|
-
/**
|
|
67
|
-
* Delete Annotation Queue
|
|
68
|
-
*/
|
|
69
|
-
delete(queueID, options) {
|
|
70
|
-
return this._client.delete((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}`, options);
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Create Annotation Queue
|
|
74
|
-
*/
|
|
75
|
-
annotationQueues(body, options) {
|
|
76
|
-
return this._client.post('/api/v1/annotation-queues', { body, ...options });
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Create Identity Annotation Queue Run Status
|
|
80
|
-
*/
|
|
81
|
-
createRunStatus(annotationQueueRunID, body, options) {
|
|
82
|
-
return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/status/${annotationQueueRunID}`, {
|
|
83
|
-
body,
|
|
84
|
-
...options,
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Export Annotation Queue Archived Runs
|
|
89
|
-
*/
|
|
90
|
-
export(queueID, body, options) {
|
|
91
|
-
return this._client.post((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/export`, { body, ...options });
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Populate annotation queue with runs from an experiment.
|
|
95
|
-
*/
|
|
96
|
-
populate(body, options) {
|
|
97
|
-
return this._client.post('/api/v1/annotation-queues/populate', { body, ...options });
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Get Annotation Queues
|
|
101
|
-
*/
|
|
102
|
-
retrieveAnnotationQueues(query = {}, options) {
|
|
103
|
-
return this._client.getAPIList('/api/v1/annotation-queues', (pagination_js_1.OffsetPaginationTopLevelArray), { query, ...options });
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Get Annotation Queues For Run
|
|
107
|
-
*/
|
|
108
|
-
retrieveQueues(runID, options) {
|
|
109
|
-
return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${runID}/queues`, options);
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Get a run from an annotation queue
|
|
113
|
-
*/
|
|
114
|
-
retrieveRun(index, params, options) {
|
|
115
|
-
const { queue_id, ...query } = params;
|
|
116
|
-
return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queue_id}/run/${index}`, { query, ...options });
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* Get Size From Annotation Queue
|
|
120
|
-
*/
|
|
121
|
-
retrieveSize(queueID, query = {}, options) {
|
|
122
|
-
return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/size`, { query, ...options });
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Get Total Archived From Annotation Queue
|
|
126
|
-
*/
|
|
127
|
-
retrieveTotalArchived(queueID, query = {}, options) {
|
|
128
|
-
return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/total_archived`, { query, ...options });
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Get Total Size From Annotation Queue
|
|
132
|
-
*/
|
|
133
|
-
retrieveTotalSize(queueID, options) {
|
|
134
|
-
return this._client.get((0, path_js_1.path) `/api/v1/annotation-queues/${queueID}/total_size`, options);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
exports.AnnotationQueues = AnnotationQueues;
|
|
138
|
-
AnnotationQueues.Runs = runs_js_1.Runs;
|