@narrative.io/data-collaboration-sdk-ts 2.101.0 → 2.102.0
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/build/agents/index.d.ts +63 -0
- package/build/agents/index.js +92 -0
- package/build/agents/types.d.ts +188 -0
- package/build/agents/types.js +22 -0
- package/build/index.d.ts +3 -1
- package/build/index.js +3 -0
- package/build/nql/types.d.ts +5 -5
- package/build/nql/types.js +20 -5
- package/package.json +9 -9
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { BaseApi } from "../base-api";
|
|
2
|
+
import type { ConversationId, ConversationResponse, CreateConversationRequest, CreateRunRequest, ListMessagesResponse, RunId, RunResponse } from "./types";
|
|
3
|
+
export * from "./types";
|
|
4
|
+
/**
|
|
5
|
+
* @module AgentsApi
|
|
6
|
+
* @description Agent Conversations: long-lived conversations with pinned system
|
|
7
|
+
* prompt + defaults, asynchronous runs that may pause for caller-declared
|
|
8
|
+
* tool outputs, and a versioned delta-cursor message stream.
|
|
9
|
+
*
|
|
10
|
+
* @see https://docs.narrative.io/reference/architecture/agent-conversations
|
|
11
|
+
*
|
|
12
|
+
* @extends BaseApi
|
|
13
|
+
*/
|
|
14
|
+
export declare class AgentsApi extends BaseApi {
|
|
15
|
+
/**
|
|
16
|
+
* Create an agent conversation. `system_prompt` and `defaults.{tools,mcp_servers}`
|
|
17
|
+
* are pinned at creation; everything else in `defaults` is overridable per-run.
|
|
18
|
+
*/
|
|
19
|
+
createAgentConversation(request: CreateConversationRequest): Promise<ConversationResponse>;
|
|
20
|
+
/**
|
|
21
|
+
* Read a conversation's metadata + current `version`. Always re-read this
|
|
22
|
+
* immediately before starting a run — `version` is the compare-and-swap
|
|
23
|
+
* token for `expected_version` and a stale value yields 409.
|
|
24
|
+
*/
|
|
25
|
+
getAgentConversation(conversationId: ConversationId): Promise<ConversationResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Delta-read conversation messages with `sequence_no > since`. Use the
|
|
28
|
+
* returned `current_version` as the next call's `since` for gap-free reads.
|
|
29
|
+
*/
|
|
30
|
+
listAgentConversationMessages(conversationId: ConversationId, options?: {
|
|
31
|
+
since?: number;
|
|
32
|
+
}): Promise<ListMessagesResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Start a new run on the conversation. Returns immediately with
|
|
35
|
+
* `status: "pending"` — poll {@link getAgentRun} until terminal.
|
|
36
|
+
*
|
|
37
|
+
* - Generate a fresh UUID for `client_op_id` per logical request (it's the
|
|
38
|
+
* idempotency key; reusing one is only safe as a retry).
|
|
39
|
+
* - Set `expected_version` to the value just read from
|
|
40
|
+
* {@link getAgentConversation} — mismatches return 409.
|
|
41
|
+
*/
|
|
42
|
+
createAgentRun(conversationId: ConversationId, request: CreateRunRequest): Promise<RunResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Read a run's current state. Terminal states: `completed`,
|
|
45
|
+
* `requires_action`, `failed`. Stop polling on any of them.
|
|
46
|
+
*/
|
|
47
|
+
getAgentRun(runId: RunId): Promise<RunResponse>;
|
|
48
|
+
/**
|
|
49
|
+
* Convenience: poll {@link getAgentRun} until terminal. Caller is responsible
|
|
50
|
+
* for selecting a reasonable backoff; defaults to 1.5s fixed interval with a
|
|
51
|
+
* 2-minute ceiling.
|
|
52
|
+
*
|
|
53
|
+
* Returns the terminal run. Throws on `failed` only if `throwOnFailed` is
|
|
54
|
+
* true; otherwise the caller inspects `run.status === "failed"`.
|
|
55
|
+
*/
|
|
56
|
+
waitForAgentRun(runId: RunId, options?: {
|
|
57
|
+
intervalMs?: number;
|
|
58
|
+
timeoutMs?: number;
|
|
59
|
+
signal?: AbortSignal;
|
|
60
|
+
onTick?: (run: RunResponse) => void;
|
|
61
|
+
throwOnFailed?: boolean;
|
|
62
|
+
}): Promise<RunResponse>;
|
|
63
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { BaseApi } from "../base-api";
|
|
2
|
+
export * from "./types";
|
|
3
|
+
const conversationsResource = "agents/conversations";
|
|
4
|
+
const runsResource = "agents/runs";
|
|
5
|
+
/**
|
|
6
|
+
* @module AgentsApi
|
|
7
|
+
* @description Agent Conversations: long-lived conversations with pinned system
|
|
8
|
+
* prompt + defaults, asynchronous runs that may pause for caller-declared
|
|
9
|
+
* tool outputs, and a versioned delta-cursor message stream.
|
|
10
|
+
*
|
|
11
|
+
* @see https://docs.narrative.io/reference/architecture/agent-conversations
|
|
12
|
+
*
|
|
13
|
+
* @extends BaseApi
|
|
14
|
+
*/
|
|
15
|
+
export class AgentsApi extends BaseApi {
|
|
16
|
+
// -------------------- Conversations --------------------
|
|
17
|
+
/**
|
|
18
|
+
* Create an agent conversation. `system_prompt` and `defaults.{tools,mcp_servers}`
|
|
19
|
+
* are pinned at creation; everything else in `defaults` is overridable per-run.
|
|
20
|
+
*/
|
|
21
|
+
async createAgentConversation(request) {
|
|
22
|
+
return await this.post(conversationsResource, request);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Read a conversation's metadata + current `version`. Always re-read this
|
|
26
|
+
* immediately before starting a run — `version` is the compare-and-swap
|
|
27
|
+
* token for `expected_version` and a stale value yields 409.
|
|
28
|
+
*/
|
|
29
|
+
async getAgentConversation(conversationId) {
|
|
30
|
+
return await this.get(`${conversationsResource}/${conversationId}`);
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Delta-read conversation messages with `sequence_no > since`. Use the
|
|
34
|
+
* returned `current_version` as the next call's `since` for gap-free reads.
|
|
35
|
+
*/
|
|
36
|
+
async listAgentConversationMessages(conversationId, options) {
|
|
37
|
+
return await this.get(`${conversationsResource}/${conversationId}/messages`, options?.since !== undefined ? { since: options.since } : undefined);
|
|
38
|
+
}
|
|
39
|
+
// -------------------- Runs --------------------
|
|
40
|
+
/**
|
|
41
|
+
* Start a new run on the conversation. Returns immediately with
|
|
42
|
+
* `status: "pending"` — poll {@link getAgentRun} until terminal.
|
|
43
|
+
*
|
|
44
|
+
* - Generate a fresh UUID for `client_op_id` per logical request (it's the
|
|
45
|
+
* idempotency key; reusing one is only safe as a retry).
|
|
46
|
+
* - Set `expected_version` to the value just read from
|
|
47
|
+
* {@link getAgentConversation} — mismatches return 409.
|
|
48
|
+
*/
|
|
49
|
+
async createAgentRun(conversationId, request) {
|
|
50
|
+
return await this.post(`${conversationsResource}/${conversationId}/runs`, request);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Read a run's current state. Terminal states: `completed`,
|
|
54
|
+
* `requires_action`, `failed`. Stop polling on any of them.
|
|
55
|
+
*/
|
|
56
|
+
async getAgentRun(runId) {
|
|
57
|
+
return await this.get(`${runsResource}/${runId}`);
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Convenience: poll {@link getAgentRun} until terminal. Caller is responsible
|
|
61
|
+
* for selecting a reasonable backoff; defaults to 1.5s fixed interval with a
|
|
62
|
+
* 2-minute ceiling.
|
|
63
|
+
*
|
|
64
|
+
* Returns the terminal run. Throws on `failed` only if `throwOnFailed` is
|
|
65
|
+
* true; otherwise the caller inspects `run.status === "failed"`.
|
|
66
|
+
*/
|
|
67
|
+
async waitForAgentRun(runId, options = {}) {
|
|
68
|
+
const interval = options.intervalMs ?? 1500;
|
|
69
|
+
const timeout = options.timeoutMs ?? 120_000;
|
|
70
|
+
const deadline = Date.now() + timeout;
|
|
71
|
+
// terminal predicate kept local to avoid an extra import in consumers
|
|
72
|
+
const terminal = (s) => s === "completed" || s === "requires_action" || s === "failed";
|
|
73
|
+
// eslint-disable-next-line no-constant-condition
|
|
74
|
+
while (true) {
|
|
75
|
+
if (options.signal?.aborted) {
|
|
76
|
+
throw new Error("waitForAgentRun aborted");
|
|
77
|
+
}
|
|
78
|
+
const run = await this.getAgentRun(runId);
|
|
79
|
+
options.onTick?.(run);
|
|
80
|
+
if (terminal(run.status)) {
|
|
81
|
+
if (options.throwOnFailed && run.status === "failed") {
|
|
82
|
+
throw Object.assign(new Error(run.error?.message ?? "Agent run failed"), { run });
|
|
83
|
+
}
|
|
84
|
+
return run;
|
|
85
|
+
}
|
|
86
|
+
if (Date.now() >= deadline) {
|
|
87
|
+
throw new Error(`waitForAgentRun timed out after ${timeout}ms`);
|
|
88
|
+
}
|
|
89
|
+
await new Promise((r) => setTimeout(r, interval));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Conversations API — types.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `/agents/conversations` and `/agents/runs` on the Narrative Data
|
|
5
|
+
* Collaboration Platform (RFC 7807 errors; OpenAI-Assistants-shaped semantics).
|
|
6
|
+
*
|
|
7
|
+
* Two tool dimensions:
|
|
8
|
+
* - `mcp_servers[]` — server-side, resolved by the platform via MCP. Model sees
|
|
9
|
+
* each tool as `{alias}-{name}`.
|
|
10
|
+
* - `tools[]` — caller-declared. Dash-free names. When called, the run pauses
|
|
11
|
+
* at `requires_action`; resume by posting a follow-up run with
|
|
12
|
+
* `payload.kind: "tool_outputs"`.
|
|
13
|
+
*/
|
|
14
|
+
export type ConversationId = string;
|
|
15
|
+
export type RunId = string;
|
|
16
|
+
export type ClientOpId = string;
|
|
17
|
+
export type ConversationVersion = number;
|
|
18
|
+
export type ToolUseId = string;
|
|
19
|
+
export type AgentModel = "anthropic.claude-haiku-4.5" | "anthropic.claude-sonnet-4.5" | "anthropic.claude-sonnet-4.6" | "anthropic.claude-opus-4.5" | "anthropic.claude-opus-4.6" | "openai.gpt-oss-120b" | "openai.gpt-4.1" | "openai.o4-mini" | (string & {});
|
|
20
|
+
export type ExecutionCluster = "shared" | "dedicated";
|
|
21
|
+
/** Subset of JSON Schema Draft 2020-12 accepted by Bedrock structured output. */
|
|
22
|
+
export type JsonSchemaObject = Record<string, unknown>;
|
|
23
|
+
export interface McpServerConfig {
|
|
24
|
+
/** 1–8 char `[a-zA-Z][a-zA-Z0-9]{0,7}` — namespace prefix for the server's tools. */
|
|
25
|
+
alias: string;
|
|
26
|
+
url: string;
|
|
27
|
+
description?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface ToolSpec {
|
|
30
|
+
/** Caller-declared tools must NOT contain a dash. MCP tools' bare name. */
|
|
31
|
+
name: string;
|
|
32
|
+
description: string;
|
|
33
|
+
input_schema: JsonSchemaObject;
|
|
34
|
+
/** Defaults to true. Leave true in production. */
|
|
35
|
+
strict?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export interface ConversationDefaults {
|
|
38
|
+
model: AgentModel;
|
|
39
|
+
data_plane_id: string;
|
|
40
|
+
execution_cluster: ExecutionCluster;
|
|
41
|
+
compute_pool_id?: string;
|
|
42
|
+
max_iterations?: number;
|
|
43
|
+
max_tokens?: number;
|
|
44
|
+
temperature?: number;
|
|
45
|
+
output_format_schema?: JsonSchemaObject;
|
|
46
|
+
mcp_servers?: McpServerConfig[];
|
|
47
|
+
tools?: ToolSpec[];
|
|
48
|
+
}
|
|
49
|
+
export interface CreateConversationRequest {
|
|
50
|
+
name?: string;
|
|
51
|
+
system_prompt?: string;
|
|
52
|
+
defaults: ConversationDefaults;
|
|
53
|
+
}
|
|
54
|
+
export interface ConversationResponse {
|
|
55
|
+
id: ConversationId;
|
|
56
|
+
company_id: number;
|
|
57
|
+
user_id: number;
|
|
58
|
+
name: string | null;
|
|
59
|
+
system_prompt: string | null;
|
|
60
|
+
defaults: ConversationDefaults;
|
|
61
|
+
version: ConversationVersion;
|
|
62
|
+
created_at: string;
|
|
63
|
+
updated_at: string;
|
|
64
|
+
}
|
|
65
|
+
export type RunStatus = "pending" | "running" | "completed" | "requires_action" | "failed";
|
|
66
|
+
export interface UserMessagePayload {
|
|
67
|
+
kind: "user_message";
|
|
68
|
+
text: string;
|
|
69
|
+
}
|
|
70
|
+
export interface ToolOutput {
|
|
71
|
+
tool_use_id: ToolUseId;
|
|
72
|
+
/** Plain text. Serialize JSON results before sending. */
|
|
73
|
+
content: string;
|
|
74
|
+
is_error?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface ToolOutputsPayload {
|
|
77
|
+
kind: "tool_outputs";
|
|
78
|
+
outputs: ToolOutput[];
|
|
79
|
+
}
|
|
80
|
+
export type RunPayload = UserMessagePayload | ToolOutputsPayload;
|
|
81
|
+
export type ToolChoice = {
|
|
82
|
+
kind: "auto";
|
|
83
|
+
} | {
|
|
84
|
+
kind: "any";
|
|
85
|
+
} | {
|
|
86
|
+
kind: "specific_tool";
|
|
87
|
+
name: string;
|
|
88
|
+
/** Set when pinning an MCP-resolved tool; omit for caller-declared. */
|
|
89
|
+
mcp_alias?: string | null;
|
|
90
|
+
};
|
|
91
|
+
/** Sparse override applied per-run; lists replace wholesale. */
|
|
92
|
+
export interface RunConfigOverride {
|
|
93
|
+
model?: AgentModel;
|
|
94
|
+
data_plane_id?: string;
|
|
95
|
+
execution_cluster?: ExecutionCluster;
|
|
96
|
+
compute_pool_id?: string;
|
|
97
|
+
max_iterations?: number;
|
|
98
|
+
max_tokens?: number;
|
|
99
|
+
temperature?: number;
|
|
100
|
+
output_format_schema?: JsonSchemaObject;
|
|
101
|
+
mcp_servers?: McpServerConfig[];
|
|
102
|
+
tools?: ToolSpec[];
|
|
103
|
+
}
|
|
104
|
+
export interface CreateRunRequest {
|
|
105
|
+
client_op_id: ClientOpId;
|
|
106
|
+
expected_version: ConversationVersion;
|
|
107
|
+
payload: RunPayload;
|
|
108
|
+
tool_choice?: ToolChoice;
|
|
109
|
+
config_override?: RunConfigOverride;
|
|
110
|
+
}
|
|
111
|
+
export interface PendingToolCall {
|
|
112
|
+
tool_use_id: ToolUseId;
|
|
113
|
+
/** Wire-form name. For caller-declared tools, dash-free. */
|
|
114
|
+
name: string;
|
|
115
|
+
arguments: Record<string, unknown>;
|
|
116
|
+
}
|
|
117
|
+
export interface AgentInferenceUsage {
|
|
118
|
+
prompt_tokens: number;
|
|
119
|
+
completion_tokens: number;
|
|
120
|
+
total_tokens: number;
|
|
121
|
+
}
|
|
122
|
+
export interface RunError {
|
|
123
|
+
/** Stable incident code, e.g. "AgentLoopMaxIterationsExceeded". */
|
|
124
|
+
type: string;
|
|
125
|
+
message: string;
|
|
126
|
+
title?: string;
|
|
127
|
+
docs_url?: string;
|
|
128
|
+
}
|
|
129
|
+
export interface RunResponse {
|
|
130
|
+
id: RunId;
|
|
131
|
+
conversation_id: ConversationId;
|
|
132
|
+
company_id: number;
|
|
133
|
+
user_id: number;
|
|
134
|
+
client_op_id: ClientOpId;
|
|
135
|
+
status: RunStatus;
|
|
136
|
+
tool_choice?: ToolChoice;
|
|
137
|
+
effective_config: ConversationDefaults;
|
|
138
|
+
iterations_used?: number | null;
|
|
139
|
+
usage?: AgentInferenceUsage | null;
|
|
140
|
+
submitted_inference_job_ids: string[];
|
|
141
|
+
pending_tool_calls: PendingToolCall[];
|
|
142
|
+
final_text?: string | null;
|
|
143
|
+
error?: RunError | null;
|
|
144
|
+
started_at: string;
|
|
145
|
+
completed_at?: string | null;
|
|
146
|
+
}
|
|
147
|
+
export type AgentMessageRole = "user" | "assistant" | "tool";
|
|
148
|
+
export interface TextContentBlock {
|
|
149
|
+
type: "text";
|
|
150
|
+
text: string;
|
|
151
|
+
}
|
|
152
|
+
export interface ToolUseContentBlock {
|
|
153
|
+
type: "tool_use";
|
|
154
|
+
tool_use_id: ToolUseId;
|
|
155
|
+
/** Fully-aliased wire name (`{alias}-{tool_name}` for MCP, bare for caller-declared). */
|
|
156
|
+
name: string;
|
|
157
|
+
arguments: Record<string, unknown>;
|
|
158
|
+
}
|
|
159
|
+
export interface ToolResultContentBlock {
|
|
160
|
+
type: "tool_result";
|
|
161
|
+
tool_use_id: ToolUseId;
|
|
162
|
+
content: ContentBlock[];
|
|
163
|
+
is_error: boolean;
|
|
164
|
+
}
|
|
165
|
+
export type ContentBlock = TextContentBlock | ToolUseContentBlock | ToolResultContentBlock;
|
|
166
|
+
export interface MessageDto {
|
|
167
|
+
id: string;
|
|
168
|
+
sequence_no: number;
|
|
169
|
+
role: AgentMessageRole;
|
|
170
|
+
content_blocks: ContentBlock[];
|
|
171
|
+
run_id: RunId;
|
|
172
|
+
created_at: string;
|
|
173
|
+
}
|
|
174
|
+
export interface ListMessagesResponse {
|
|
175
|
+
current_version: ConversationVersion;
|
|
176
|
+
messages: MessageDto[];
|
|
177
|
+
}
|
|
178
|
+
export interface AgentRfcError {
|
|
179
|
+
type?: string | null;
|
|
180
|
+
title: string;
|
|
181
|
+
status: number;
|
|
182
|
+
detail?: string;
|
|
183
|
+
instance?: string;
|
|
184
|
+
log_id: string;
|
|
185
|
+
debug?: Record<string, unknown> | null;
|
|
186
|
+
}
|
|
187
|
+
export declare const TERMINAL_RUN_STATUSES: ReadonlyArray<RunStatus>;
|
|
188
|
+
export declare function isTerminalRunStatus(status: RunStatus): boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Agent Conversations API — types.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors `/agents/conversations` and `/agents/runs` on the Narrative Data
|
|
5
|
+
* Collaboration Platform (RFC 7807 errors; OpenAI-Assistants-shaped semantics).
|
|
6
|
+
*
|
|
7
|
+
* Two tool dimensions:
|
|
8
|
+
* - `mcp_servers[]` — server-side, resolved by the platform via MCP. Model sees
|
|
9
|
+
* each tool as `{alias}-{name}`.
|
|
10
|
+
* - `tools[]` — caller-declared. Dash-free names. When called, the run pauses
|
|
11
|
+
* at `requires_action`; resume by posting a follow-up run with
|
|
12
|
+
* `payload.kind: "tool_outputs"`.
|
|
13
|
+
*/
|
|
14
|
+
// Terminal states helper
|
|
15
|
+
export const TERMINAL_RUN_STATUSES = [
|
|
16
|
+
"completed",
|
|
17
|
+
"requires_action",
|
|
18
|
+
"failed",
|
|
19
|
+
];
|
|
20
|
+
export function isTerminalRunStatus(status) {
|
|
21
|
+
return TERMINAL_RUN_STATUSES.includes(status);
|
|
22
|
+
}
|
package/build/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./access-rules/";
|
|
2
2
|
export * from "./access-tokens";
|
|
3
3
|
export { resources } from "./access-tokens/types";
|
|
4
|
+
export * from "./agents";
|
|
4
5
|
export type { App } from "./apps";
|
|
5
6
|
export * from "./attributes";
|
|
6
7
|
export * from "./authentication";
|
|
@@ -55,6 +56,7 @@ export * from "./workflows";
|
|
|
55
56
|
export * from "./workflows/types";
|
|
56
57
|
import { AccessRulesApi } from "./access-rules/";
|
|
57
58
|
import { AccessTokensApi } from "./access-tokens";
|
|
59
|
+
import { AgentsApi } from "./agents";
|
|
58
60
|
import { AppsApi } from "./apps";
|
|
59
61
|
import { AttributeApi, AttributeApiV2 } from "./attributes";
|
|
60
62
|
import { AuthenticationApi } from "./authentication";
|
|
@@ -87,6 +89,6 @@ import { WhoAmIApi } from "./whoami";
|
|
|
87
89
|
import { WorkflowsApi } from "./workflows";
|
|
88
90
|
declare class NarrativeApi extends BaseApi {
|
|
89
91
|
}
|
|
90
|
-
interface NarrativeApi extends BaseApi, HealthCheckApi, AccessTokensApi, DataPlaneApi, DatasetApi, RosettaStoneApi, AttributeApi, AttributeApiV2, PingApi, CompanyInfoApi, InstallationsApi, ConnectionsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, MappingsApi, AccessRulesApi, AppsApi, SubscriptionsApi, JobsApi, QueriesApi, ViewsApi, ModelsApi, ModelTrainingApi, ModelInferenceApi, EncryptionMaterialApi, WhoAmIApi, WorkflowsApi, ComputePoolsApi {
|
|
92
|
+
interface NarrativeApi extends BaseApi, HealthCheckApi, AccessTokensApi, DataPlaneApi, DatasetApi, RosettaStoneApi, AttributeApi, AttributeApiV2, PingApi, CompanyInfoApi, InstallationsApi, ConnectionsApi, UploadsApi, ResourceApi, NqlApi, DataStreamsApi, ForecastApi, ContractsApi, AuthenticationApi, MappingsApi, AccessRulesApi, AppsApi, SubscriptionsApi, JobsApi, QueriesApi, ViewsApi, ModelsApi, ModelTrainingApi, ModelInferenceApi, EncryptionMaterialApi, WhoAmIApi, WorkflowsApi, ComputePoolsApi, AgentsApi {
|
|
91
93
|
}
|
|
92
94
|
export { NarrativeApi };
|
package/build/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export * from "./access-rules/";
|
|
3
3
|
export * from "./access-tokens";
|
|
4
4
|
export { resources } from "./access-tokens/types";
|
|
5
|
+
export * from "./agents";
|
|
5
6
|
export * from "./attributes";
|
|
6
7
|
export * from "./authentication";
|
|
7
8
|
export * from "./base-api";
|
|
@@ -55,6 +56,7 @@ export * from "./workflows";
|
|
|
55
56
|
export * from "./workflows/types";
|
|
56
57
|
import { AccessRulesApi } from "./access-rules/";
|
|
57
58
|
import { AccessTokensApi } from "./access-tokens";
|
|
59
|
+
import { AgentsApi } from "./agents";
|
|
58
60
|
import { AppsApi } from "./apps";
|
|
59
61
|
import { AttributeApi, AttributeApiV2 } from "./attributes";
|
|
60
62
|
import { AuthenticationApi } from "./authentication";
|
|
@@ -123,5 +125,6 @@ applyMixins(NarrativeApi, [
|
|
|
123
125
|
WhoAmIApi,
|
|
124
126
|
WorkflowsApi,
|
|
125
127
|
ComputePoolsApi,
|
|
128
|
+
AgentsApi,
|
|
126
129
|
]);
|
|
127
130
|
export { NarrativeApi };
|
package/build/nql/types.d.ts
CHANGED
|
@@ -287,11 +287,11 @@ export declare const NqlObj: z.ZodObject<{
|
|
|
287
287
|
CALENDAR_MONTH: "CALENDAR_MONTH";
|
|
288
288
|
}>;
|
|
289
289
|
}, z.core.$strip>;
|
|
290
|
-
sort: z.ZodUndefined
|
|
291
|
-
group: z.ZodUndefined
|
|
292
|
-
having: z.ZodUndefined
|
|
293
|
-
offset: z.ZodUndefined
|
|
294
|
-
join: z.ZodUndefined
|
|
290
|
+
sort: z.ZodOptional<z.ZodUndefined>;
|
|
291
|
+
group: z.ZodOptional<z.ZodUndefined>;
|
|
292
|
+
having: z.ZodOptional<z.ZodUndefined>;
|
|
293
|
+
offset: z.ZodOptional<z.ZodUndefined>;
|
|
294
|
+
join: z.ZodOptional<z.ZodUndefined>;
|
|
295
295
|
}, z.core.$strip>;
|
|
296
296
|
export type Nql = z.infer<typeof NqlObj>;
|
|
297
297
|
export interface RelatedJob {
|
package/build/nql/types.js
CHANGED
|
@@ -120,9 +120,24 @@ export const NqlObj = z.object({
|
|
|
120
120
|
from: NqlTableObject.array(),
|
|
121
121
|
where: NqlWhereObj,
|
|
122
122
|
limit: NqlBudgetObj,
|
|
123
|
-
sort: z
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
123
|
+
sort: z
|
|
124
|
+
.undefined()
|
|
125
|
+
.describe("Sort is not currently supported in NQL")
|
|
126
|
+
.optional(),
|
|
127
|
+
group: z
|
|
128
|
+
.undefined()
|
|
129
|
+
.describe("Group is not currently supported in NQL")
|
|
130
|
+
.optional(),
|
|
131
|
+
having: z
|
|
132
|
+
.undefined()
|
|
133
|
+
.describe("Having is not currently supported in NQL")
|
|
134
|
+
.optional(),
|
|
135
|
+
offset: z
|
|
136
|
+
.undefined()
|
|
137
|
+
.describe("Offset is not currently supported in NQL")
|
|
138
|
+
.optional(),
|
|
139
|
+
join: z
|
|
140
|
+
.undefined()
|
|
141
|
+
.describe("Join is not currently supported in NQL")
|
|
142
|
+
.optional(),
|
|
128
143
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@narrative.io/data-collaboration-sdk-ts",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.102.0",
|
|
4
4
|
"main": "build/index.js",
|
|
5
5
|
"repository": "github:narrative-io/data-collaboration-sdk-ts",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -26,21 +26,21 @@
|
|
|
26
26
|
"license": "ISC",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/core": "7.29.0",
|
|
29
|
-
"@babel/preset-env": "7.29.
|
|
29
|
+
"@babel/preset-env": "7.29.5",
|
|
30
30
|
"@babel/preset-typescript": "7.28.5",
|
|
31
|
-
"@biomejs/biome": "2.4.
|
|
32
|
-
"@commitlint/cli": "
|
|
33
|
-
"@commitlint/config-conventional": "
|
|
31
|
+
"@biomejs/biome": "2.4.15",
|
|
32
|
+
"@commitlint/cli": "21.0.1",
|
|
33
|
+
"@commitlint/config-conventional": "21.0.1",
|
|
34
34
|
"@types/jest": "30.0.0",
|
|
35
|
-
"babel-jest": "30.
|
|
36
|
-
"jest": "30.
|
|
35
|
+
"babel-jest": "30.4.1",
|
|
36
|
+
"jest": "30.4.2",
|
|
37
37
|
"lefthook": "2.1.6",
|
|
38
38
|
"ts-jest": "29.4.9"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"mande": "2.0.9",
|
|
42
|
-
"zod": "4.3
|
|
43
|
-
"bignumber.js": "11.
|
|
42
|
+
"zod": "4.4.3",
|
|
43
|
+
"bignumber.js": "11.1.1"
|
|
44
44
|
},
|
|
45
45
|
"overrides": {
|
|
46
46
|
"semver@<7.5.2": "7.5.2"
|