@tryvira/sdk 0.1.8 → 0.1.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/dist/index.js CHANGED
@@ -115,6 +115,10 @@ var ViraClient = class {
115
115
  listAISystems() {
116
116
  return this.request({ method: "GET", path: "/v1/ai-systems" });
117
117
  }
118
+ deleteAISystem(systemId, options = {}) {
119
+ required(systemId, "SDK_SYSTEM_ID_REQUIRED");
120
+ return this.request({ method: "DELETE", path: `/v1/ai-systems/${encodeURIComponent(systemId)}`, body: { confirm: options.confirm === true } }, { idempotencyKey: options.idempotencyKey ?? `sdk:delete:ai-system:${systemId}` });
121
+ }
118
122
  getAISystem(systemId) {
119
123
  required(systemId, "SDK_SYSTEM_ID_REQUIRED");
120
124
  return this.request({ method: "GET", path: `/v1/ai-systems/${encodeURIComponent(systemId)}` });
@@ -398,6 +402,10 @@ var ViraClient = class {
398
402
  path: "/v1/behavior-strategies"
399
403
  });
400
404
  }
405
+ deleteBehaviorStrategy(strategyId, options = {}) {
406
+ required(strategyId, "SDK_STRATEGY_ID_REQUIRED");
407
+ return this.request({ method: "DELETE", path: `/v1/behavior-strategies/${encodeURIComponent(strategyId)}`, body: { confirm: options.confirm === true } }, { idempotencyKey: options.idempotencyKey ?? `sdk:delete:strategy:${strategyId}` });
408
+ }
401
409
  getBehaviorStrategy(strategyId) {
402
410
  required(strategyId, "SDK_STRATEGY_ID_REQUIRED");
403
411
  return this.request({
@@ -416,6 +424,10 @@ var ViraClient = class {
416
424
  listSemanticTasks() {
417
425
  return this.request({ method: "GET", path: "/v1/semantic-tasks" });
418
426
  }
427
+ deleteSemanticTask(taskId, options = {}) {
428
+ required(taskId, "SDK_SEMANTIC_TASK_ID_REQUIRED");
429
+ return this.request({ method: "DELETE", path: `/v1/semantic-tasks/${encodeURIComponent(taskId)}`, body: { confirm: options.confirm === true } }, { idempotencyKey: options.idempotencyKey ?? `sdk:delete:semantic-task:${taskId}` });
430
+ }
419
431
  createSemanticTask(task, options = {}) {
420
432
  required(task?.taskKey, "SDK_SEMANTIC_TASK_KEY_REQUIRED");
421
433
  return this.request({ method: "POST", path: "/v1/semantic-tasks", body: { ...task, ...options.id ? { id: options.id } : {} } }, { idempotencyKey: options.idempotencyKey ?? `sdk:semantic-task:${task.taskKey}` });
@@ -423,6 +435,10 @@ var ViraClient = class {
423
435
  listBehaviorPoints() {
424
436
  return this.request({ method: "GET", path: "/v1/behavior-points" });
425
437
  }
438
+ deleteBehaviorPoint(pointId, options = {}) {
439
+ required(pointId, "SDK_BEHAVIOR_POINT_ID_REQUIRED");
440
+ return this.request({ method: "DELETE", path: `/v1/behavior-points/${encodeURIComponent(pointId)}`, body: { confirm: options.confirm === true } }, { idempotencyKey: options.idempotencyKey ?? `sdk:delete:behavior-point:${pointId}` });
441
+ }
426
442
  createBehaviorPoint(point, options = {}) {
427
443
  required(point?.key, "SDK_BEHAVIOR_POINT_KEY_REQUIRED");
428
444
  if (!point.taskId && !point.taskIds?.length) throw new Error("SDK_BEHAVIOR_POINT_TASK_REQUIRED");
@@ -8,7 +8,7 @@ export interface RuntimeRequest {
8
8
  expiresAt: number;
9
9
  }
10
10
  export interface SdkRequest {
11
- method: "GET" | "POST";
11
+ method: "GET" | "POST" | "DELETE";
12
12
  path: string;
13
13
  query?: Readonly<Record<string, string>>;
14
14
  body?: Readonly<Record<string, unknown>>;
@@ -74,6 +74,10 @@ export declare class ViraClient {
74
74
  system: ClientBody;
75
75
  }> | null>;
76
76
  listAISystems(): Promise<ViraResponse<ClientBody> | null>;
77
+ deleteAISystem(systemId: string, options?: {
78
+ confirm?: boolean;
79
+ idempotencyKey?: string;
80
+ }): Promise<ViraResponse<ClientBody> | null>;
77
81
  getAISystem(systemId: string): Promise<ViraResponse<ClientBody> | null>;
78
82
  connectAdapter(systemId: string, input: {
79
83
  adapterType: string;
@@ -215,9 +219,17 @@ export declare class ViraClient {
215
219
  runtime: ViraResponse<ClientBody> | null;
216
220
  } | null>;
217
221
  listBehaviorStrategies(): Promise<ViraResponse<ClientBody> | null>;
222
+ deleteBehaviorStrategy(strategyId: string, options?: {
223
+ confirm?: boolean;
224
+ idempotencyKey?: string;
225
+ }): Promise<ViraResponse<ClientBody> | null>;
218
226
  getBehaviorStrategy(strategyId: string): Promise<ViraResponse<ClientBody> | null>;
219
227
  createBehaviorStrategy(definition: Record<string, unknown>, id?: string): Promise<ViraResponse<ClientBody> | null>;
220
228
  listSemanticTasks(): Promise<ViraResponse<ClientBody> | null>;
229
+ deleteSemanticTask(taskId: string, options?: {
230
+ confirm?: boolean;
231
+ idempotencyKey?: string;
232
+ }): Promise<ViraResponse<ClientBody> | null>;
221
233
  createSemanticTask(task: {
222
234
  taskKey: string;
223
235
  description?: string;
@@ -230,6 +242,10 @@ export declare class ViraClient {
230
242
  idempotencyKey?: string;
231
243
  }): Promise<ViraResponse<ClientBody> | null>;
232
244
  listBehaviorPoints(): Promise<ViraResponse<ClientBody> | null>;
245
+ deleteBehaviorPoint(pointId: string, options?: {
246
+ confirm?: boolean;
247
+ idempotencyKey?: string;
248
+ }): Promise<ViraResponse<ClientBody> | null>;
233
249
  createBehaviorPoint(point: {
234
250
  key: string;
235
251
  taskId?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tryvira/sdk",
3
- "version": "0.1.8",
3
+ "version": "0.1.11",
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"},