🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@useatlas/types

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@useatlas/types - npm Package Compare versions

Comparing version
0.1.19
to
0.2.0
+19
-18
dist/approval.d.ts

@@ -20,9 +20,10 @@ /**

/**
* Surface scope for approval rules (#2072). `'any'` preserves pre-2072
* fires-for-every-request semantics; the others pin to a transport.
* Agent origin scope for approval rules (#2072; renamed from "surface" in
* ADR-0015). `'any'` preserves pre-2072 fires-for-every-request semantics;
* the others pin to a transport.
*
* Two derived enums share a single source of truth:
* - `APPROVAL_RULE_SURFACES` — values an admin can pin a rule to,
* - `APPROVAL_RULE_ORIGINS` — values an admin can pin a rule to,
* including the `'any'` wildcard.
* - `APPROVAL_REQUEST_SURFACES` — values stamped on a created approval
* - `APPROVAL_REQUEST_ORIGINS` — values stamped on a created approval
* request to record where it originated. Derived from the rule

@@ -33,3 +34,3 @@ * enum by filtering out `'any'` because a real request always has

* Both the runtime tuple (`.filter(...)`) and the type (`Exclude<>`)
* are derived so a new transport added to `APPROVAL_RULE_SURFACES`
* are derived so a new transport added to `APPROVAL_RULE_ORIGINS`
* automatically propagates to the request-side enum, the SQL CHECK,

@@ -39,6 +40,6 @@ * and every consumer. PR #2191 review surfaced an earlier shape where

*/
export declare const APPROVAL_RULE_SURFACES: readonly ["any", "chat", "mcp", "scheduler", "slack", "teams", "telegram", "discord", "whatsapp", "gchat", "webhook"];
export type ApprovalRuleSurface = (typeof APPROVAL_RULE_SURFACES)[number];
export type ApprovalRequestSurface = Exclude<ApprovalRuleSurface, "any">;
export declare const APPROVAL_REQUEST_SURFACES: ApprovalRequestSurface[];
export declare const APPROVAL_RULE_ORIGINS: readonly ["any", "chat", "mcp", "scheduler", "slack", "teams", "telegram", "discord", "whatsapp", "gchat", "webhook"];
export type ApprovalRuleOrigin = (typeof APPROVAL_RULE_ORIGINS)[number];
export type ApprovalRequestOrigin = Exclude<ApprovalRuleOrigin, "any">;
export declare const APPROVAL_REQUEST_ORIGINS: ApprovalRequestOrigin[];
/**

@@ -53,4 +54,4 @@ * Fields common to every approval rule. The `ruleType`-keyed variants below

enabled: boolean;
/** #2072 — origin surface this rule applies to. `'any'` (default) fires for every request. */
surface: ApprovalRuleSurface;
/** #2072 — agent origin this rule applies to. `'any'` (default) fires for every request. */
origin: ApprovalRuleOrigin;
createdAt: string;

@@ -110,7 +111,7 @@ updatedAt: string;

/**
* #2072 — origin surface of the request that produced this row. `null`
* for legacy rows or callers that didn't stamp surface on the
* #2072 — agent origin of the request that produced this row. `null`
* for legacy rows or callers that didn't stamp an origin on the
* RequestContext.
*/
surface: ApprovalRequestSurface | null;
origin: ApprovalRequestOrigin | null;
createdAt: string;

@@ -161,3 +162,3 @@ expiresAt: string;

enabled?: boolean;
surface?: ApprovalRuleSurface;
origin?: ApprovalRuleOrigin;
} | {

@@ -169,3 +170,3 @@ ruleType: "table";

enabled?: boolean;
surface?: ApprovalRuleSurface;
origin?: ApprovalRuleOrigin;
} | {

@@ -177,3 +178,3 @@ ruleType: "column";

enabled?: boolean;
surface?: ApprovalRuleSurface;
origin?: ApprovalRuleOrigin;
};

@@ -185,3 +186,3 @@ export interface UpdateApprovalRuleRequest {

enabled?: boolean;
surface?: ApprovalRuleSurface;
origin?: ApprovalRuleOrigin;
}

@@ -188,0 +189,0 @@ export interface ReviewApprovalRequest {

@@ -664,3 +664,3 @@ // src/auth.ts

var APPROVAL_STATUSES = ["pending", "approved", "denied", "expired"];
var APPROVAL_RULE_SURFACES = [
var APPROVAL_RULE_ORIGINS = [
"any",

@@ -678,3 +678,3 @@ "chat",

];
var APPROVAL_REQUEST_SURFACES = APPROVAL_RULE_SURFACES.filter((s) => s !== "any");
var APPROVAL_REQUEST_ORIGINS = APPROVAL_RULE_ORIGINS.filter((s) => s !== "any");
// src/platform.ts

@@ -899,4 +899,4 @@ var WORKSPACE_STATUSES = ["active", "suspended", "deleted"];

APPROVAL_RULE_TYPES,
APPROVAL_RULE_SURFACES,
APPROVAL_REQUEST_SURFACES,
APPROVAL_RULE_ORIGINS,
APPROVAL_REQUEST_ORIGINS,
AMENDMENT_TYPES,

@@ -903,0 +903,0 @@ ALL_STATUSES,

{
"name": "@useatlas/types",
"version": "0.1.19",
"version": "0.2.0",
"description": "Shared types for the Atlas text-to-SQL agent",

@@ -5,0 +5,0 @@ "type": "module",