@tryvira/sdk 0.1.39 → 0.1.40
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 +12 -0
- package/dist/js-client.d.ts +10 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -683,6 +683,18 @@ var ViraClient = class {
|
|
|
683
683
|
{ idempotencyKey: options.idempotencyKey }
|
|
684
684
|
);
|
|
685
685
|
}
|
|
686
|
+
listConversationArchive(input = {}) {
|
|
687
|
+
return this.request({ method: "GET", path: "/v1/teach/conversations", query: { ...input.limit === void 0 ? {} : { limit: String(input.limit) }, ...input.cursor ? { cursor: input.cursor } : {} } });
|
|
688
|
+
}
|
|
689
|
+
importConversationArchive(conversations, options = {}) {
|
|
690
|
+
if (!Array.isArray(conversations) || !conversations.length) throw new Error("SDK_CONVERSATION_IMPORT_REQUIRED");
|
|
691
|
+
return this.request({ method: "POST", path: "/v1/teach/conversations/import", body: { conversations: [...conversations] } }, { idempotencyKey: options.idempotencyKey });
|
|
692
|
+
}
|
|
693
|
+
revokeConversation(evidenceId, reason, options = {}) {
|
|
694
|
+
required(evidenceId, "SDK_CONVERSATION_ID_REQUIRED");
|
|
695
|
+
required(reason, "SDK_CONVERSATION_REVOCATION_REASON_REQUIRED");
|
|
696
|
+
return this.request({ method: "POST", path: `/v1/teach/conversations/${encodeURIComponent(evidenceId)}/revoke`, body: { reason } }, { idempotencyKey: options.idempotencyKey });
|
|
697
|
+
}
|
|
686
698
|
createTeachAnalysis(evidenceIds, options = {}) {
|
|
687
699
|
if (!Array.isArray(evidenceIds) || evidenceIds.length < 1) throw new Error("SDK_TEACH_ANALYSIS_EVIDENCE_REQUIRED");
|
|
688
700
|
const body = { evidenceIds: [...evidenceIds] };
|
package/dist/js-client.d.ts
CHANGED
|
@@ -408,6 +408,16 @@ export declare class ViraClient {
|
|
|
408
408
|
submitTeachEvidence(evidence: ClientBody, options?: {
|
|
409
409
|
idempotencyKey?: string;
|
|
410
410
|
}): Promise<ViraResponse<ClientBody> | null>;
|
|
411
|
+
listConversationArchive(input?: {
|
|
412
|
+
limit?: number;
|
|
413
|
+
cursor?: string;
|
|
414
|
+
}): Promise<ViraResponse<ClientBody> | null>;
|
|
415
|
+
importConversationArchive(conversations: readonly ClientBody[], options?: {
|
|
416
|
+
idempotencyKey?: string;
|
|
417
|
+
}): Promise<ViraResponse<ClientBody> | null>;
|
|
418
|
+
revokeConversation(evidenceId: string, reason: string, options?: {
|
|
419
|
+
idempotencyKey?: string;
|
|
420
|
+
}): Promise<ViraResponse<ClientBody> | null>;
|
|
411
421
|
createTeachAnalysis(evidenceIds: readonly string[], options?: {
|
|
412
422
|
idempotencyKey?: string;
|
|
413
423
|
analysisId?: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvira/sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.40",
|
|
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"},
|