@tryvira/sdk 0.1.73 → 0.1.75
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 +14 -0
- package/dist/js-client.d.ts +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -394,6 +394,13 @@ var ViraClient = class {
|
|
|
394
394
|
query: { ...options.reviewState ? { reviewState: options.reviewState } : {}, ...listQuery(options) }
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
|
+
async reviewDiscoveryCandidate(kind, key, input, options = {}) {
|
|
398
|
+
required(kind, "SDK_DISCOVERY_CANDIDATE_KIND_REQUIRED");
|
|
399
|
+
required(key, "SDK_DISCOVERY_CANDIDATE_KEY_REQUIRED");
|
|
400
|
+
required(typeof input?.decision === "string" ? input.decision : "", "SDK_DISCOVERY_CANDIDATE_DECISION_REQUIRED");
|
|
401
|
+
const path = `/v1/discovery/candidates/${encodeURIComponent(kind)}/${encodeURIComponent(key)}/review`;
|
|
402
|
+
return this.request({ method: "POST", path, body: input }, { idempotencyKey: options.idempotencyKey ?? await contentIdempotencyKey(`sdk:discovery-review:${kind}:${key}`, input) });
|
|
403
|
+
}
|
|
397
404
|
async createSignalDiscoveryProposal(input, options = {}) {
|
|
398
405
|
return this.request({ method: "POST", path: "/v1/signals/discovery-proposals", body: input }, { idempotencyKey: options.idempotencyKey ?? await contentIdempotencyKey("sdk:signal-discovery-proposal", input) });
|
|
399
406
|
}
|
|
@@ -455,6 +462,10 @@ var ViraClient = class {
|
|
|
455
462
|
query: listQuery(options)
|
|
456
463
|
});
|
|
457
464
|
}
|
|
465
|
+
getPack(packId) {
|
|
466
|
+
required(packId, "SDK_PACK_ID_REQUIRED");
|
|
467
|
+
return this.request({ method: "GET", path: `/v1/packs/${encodeURIComponent(packId)}` });
|
|
468
|
+
}
|
|
458
469
|
async deletePack(packId, options = {}) {
|
|
459
470
|
required(packId, "SDK_PACK_ID_REQUIRED");
|
|
460
471
|
const path = `/v1/packs/${encodeURIComponent(packId)}`;
|
|
@@ -1053,6 +1064,9 @@ var ViraClient = class {
|
|
|
1053
1064
|
path: `/v1/evaluations/${encodeURIComponent(evaluationId)}`
|
|
1054
1065
|
});
|
|
1055
1066
|
}
|
|
1067
|
+
listEvaluations(input = {}) {
|
|
1068
|
+
return this.request({ method: "GET", path: "/v1/evaluations", query: { ...input.limit === void 0 ? {} : { limit: String(input.limit) }, ...input.cursor ? { cursor: input.cursor } : {}, ...input.status ? { status: input.status } : {} } });
|
|
1069
|
+
}
|
|
1056
1070
|
getEvaluationComparison(evaluationId) {
|
|
1057
1071
|
required(evaluationId, "SDK_EVALUATION_ID_REQUIRED");
|
|
1058
1072
|
return this.request({
|
package/dist/js-client.d.ts
CHANGED
|
@@ -331,6 +331,9 @@ export declare class ViraClient {
|
|
|
331
331
|
}): Promise<ViraResponse<{
|
|
332
332
|
candidates: readonly ClientBody[];
|
|
333
333
|
}> | null>;
|
|
334
|
+
reviewDiscoveryCandidate(kind: string, key: string, input: ClientBody, options?: {
|
|
335
|
+
idempotencyKey?: string;
|
|
336
|
+
}): Promise<ViraResponse<ClientBody> | null>;
|
|
334
337
|
createSignalDiscoveryProposal(input: ClientBody, options?: {
|
|
335
338
|
idempotencyKey?: string;
|
|
336
339
|
}): Promise<ViraResponse<ClientBody> | null>;
|
|
@@ -354,6 +357,7 @@ export declare class ViraClient {
|
|
|
354
357
|
listPacks(options?: ScopedListOptions): Promise<ViraResponse<{
|
|
355
358
|
packs: readonly ClientBody[];
|
|
356
359
|
}> | null>;
|
|
360
|
+
getPack(packId: string): Promise<ViraResponse<ClientBody> | null>;
|
|
357
361
|
deletePack(packId: string, options?: {
|
|
358
362
|
confirm?: boolean;
|
|
359
363
|
idempotencyKey?: string;
|
|
@@ -661,6 +665,11 @@ export declare class ViraClient {
|
|
|
661
665
|
idempotencyKey?: string;
|
|
662
666
|
}): Promise<ViraResponse<ClientBody> | null>;
|
|
663
667
|
getEvaluation(evaluationId: string): Promise<ViraResponse<ClientBody> | null>;
|
|
668
|
+
listEvaluations(input?: {
|
|
669
|
+
limit?: number;
|
|
670
|
+
cursor?: string;
|
|
671
|
+
status?: string;
|
|
672
|
+
}): Promise<ViraResponse<ClientBody> | null>;
|
|
664
673
|
getEvaluationComparison(evaluationId: string): Promise<ViraResponse<ClientBody> | null>;
|
|
665
674
|
reviewComparativeFinding(evaluationId: string, findingId: string, input: {
|
|
666
675
|
decision: 'ACCEPT' | 'REJECT' | 'EDIT' | 'MORE_EVIDENCE';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvira/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.75",
|
|
4
4
|
"description": "Typed Vira SDK for connect-once, observation and governed runtime execution.",
|
|
5
5
|
"keywords": ["vira", "ai-governance", "ai-runtime", "semantic-routing"],
|
|
6
6
|
"engines": {"node": ">=20"},
|