@gpt-platform/client 0.10.5 → 0.11.1
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/_internal/client/client.gen.d.ts +3 -0
- package/dist/_internal/client/client.gen.d.ts.map +1 -0
- package/dist/_internal/client/index.d.ts +9 -0
- package/dist/_internal/client/index.d.ts.map +1 -0
- package/dist/_internal/client/types.gen.d.ts +118 -0
- package/dist/_internal/client/types.gen.d.ts.map +1 -0
- package/dist/_internal/client/utils.gen.d.ts +34 -0
- package/dist/_internal/client/utils.gen.d.ts.map +1 -0
- package/dist/_internal/client.gen.d.ts +13 -0
- package/dist/_internal/client.gen.d.ts.map +1 -0
- package/dist/_internal/core/auth.gen.d.ts +19 -0
- package/dist/_internal/core/auth.gen.d.ts.map +1 -0
- package/dist/_internal/core/bodySerializer.gen.d.ts +26 -0
- package/dist/_internal/core/bodySerializer.gen.d.ts.map +1 -0
- package/dist/_internal/core/params.gen.d.ts +44 -0
- package/dist/_internal/core/params.gen.d.ts.map +1 -0
- package/dist/_internal/core/pathSerializer.gen.d.ts +34 -0
- package/dist/_internal/core/pathSerializer.gen.d.ts.map +1 -0
- package/dist/_internal/core/queryKeySerializer.gen.d.ts +19 -0
- package/dist/_internal/core/queryKeySerializer.gen.d.ts.map +1 -0
- package/dist/_internal/core/serverSentEvents.gen.d.ts +72 -0
- package/dist/_internal/core/serverSentEvents.gen.d.ts.map +1 -0
- package/dist/_internal/core/types.gen.d.ts +79 -0
- package/dist/_internal/core/types.gen.d.ts.map +1 -0
- package/dist/_internal/core/utils.gen.d.ts +20 -0
- package/dist/_internal/core/utils.gen.d.ts.map +1 -0
- package/dist/_internal/index.d.ts +3 -0
- package/dist/_internal/index.d.ts.map +1 -0
- package/dist/_internal/sdk.gen.d.ts +7053 -0
- package/dist/_internal/sdk.gen.d.ts.map +1 -0
- package/dist/_internal/types.gen.d.ts +146633 -0
- package/dist/_internal/types.gen.d.ts.map +1 -0
- package/dist/base-client.d.ts +199 -0
- package/dist/base-client.d.ts.map +1 -0
- package/dist/errors/index.d.ts +128 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/events.d.ts +69 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/execution-events.d.ts +95 -0
- package/dist/execution-events.d.ts.map +1 -0
- package/dist/gpt-client.d.ts +2175 -0
- package/dist/gpt-client.d.ts.map +1 -0
- package/dist/index.d.ts +51 -30734
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +318 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +318 -9
- package/dist/index.mjs.map +1 -1
- package/dist/json-api.d.ts +26 -0
- package/dist/json-api.d.ts.map +1 -0
- package/dist/logging.d.ts +22 -0
- package/dist/logging.d.ts.map +1 -0
- package/dist/namespace-types.d.ts +79 -0
- package/dist/namespace-types.d.ts.map +1 -0
- package/dist/namespaces/access-grants.d.ts +71 -0
- package/dist/namespaces/access-grants.d.ts.map +1 -0
- package/dist/namespaces/agents.d.ts +1406 -0
- package/dist/namespaces/agents.d.ts.map +1 -0
- package/dist/namespaces/ai.d.ts +407 -0
- package/dist/namespaces/ai.d.ts.map +1 -0
- package/dist/namespaces/audit.d.ts +83 -0
- package/dist/namespaces/audit.d.ts.map +1 -0
- package/dist/namespaces/billing.d.ts +854 -0
- package/dist/namespaces/billing.d.ts.map +1 -0
- package/dist/namespaces/campaigns.d.ts +973 -0
- package/dist/namespaces/campaigns.d.ts.map +1 -0
- package/dist/namespaces/catalog.d.ts +964 -0
- package/dist/namespaces/catalog.d.ts.map +1 -0
- package/dist/namespaces/channels.d.ts +162 -0
- package/dist/namespaces/channels.d.ts.map +1 -0
- package/dist/namespaces/clinical.d.ts +2443 -0
- package/dist/namespaces/clinical.d.ts.map +1 -0
- package/dist/namespaces/communication.d.ts +439 -0
- package/dist/namespaces/communication.d.ts.map +1 -0
- package/dist/namespaces/compliance.d.ts +2310 -0
- package/dist/namespaces/compliance.d.ts.map +1 -0
- package/dist/namespaces/connectors.d.ts +1368 -0
- package/dist/namespaces/connectors.d.ts.map +1 -0
- package/dist/namespaces/content.d.ts +188 -0
- package/dist/namespaces/content.d.ts.map +1 -0
- package/dist/namespaces/crawler.d.ts +408 -0
- package/dist/namespaces/crawler.d.ts.map +1 -0
- package/dist/namespaces/crm-clusters.d.ts +31 -0
- package/dist/namespaces/crm-clusters.d.ts.map +1 -0
- package/dist/namespaces/crm.d.ts +1539 -0
- package/dist/namespaces/crm.d.ts.map +1 -0
- package/dist/namespaces/documents.d.ts +136 -0
- package/dist/namespaces/documents.d.ts.map +1 -0
- package/dist/namespaces/email.d.ts +550 -0
- package/dist/namespaces/email.d.ts.map +1 -0
- package/dist/namespaces/extraction.d.ts +1249 -0
- package/dist/namespaces/extraction.d.ts.map +1 -0
- package/dist/namespaces/identity.d.ts +411 -0
- package/dist/namespaces/identity.d.ts.map +1 -0
- package/dist/namespaces/imports.d.ts +177 -0
- package/dist/namespaces/imports.d.ts.map +1 -0
- package/dist/namespaces/index.d.ts +119 -0
- package/dist/namespaces/index.d.ts.map +1 -0
- package/dist/namespaces/memory.d.ts +105 -0
- package/dist/namespaces/memory.d.ts.map +1 -0
- package/dist/namespaces/models.d.ts +75 -0
- package/dist/namespaces/models.d.ts.map +1 -0
- package/dist/namespaces/permissions.d.ts +75 -0
- package/dist/namespaces/permissions.d.ts.map +1 -0
- package/dist/namespaces/pipeline-executions.d.ts +130 -0
- package/dist/namespaces/pipeline-executions.d.ts.map +1 -0
- package/dist/namespaces/pipelines.d.ts +120 -0
- package/dist/namespaces/pipelines.d.ts.map +1 -0
- package/dist/namespaces/platform.d.ts +1430 -0
- package/dist/namespaces/platform.d.ts.map +1 -0
- package/dist/namespaces/portal.d.ts +198 -0
- package/dist/namespaces/portal.d.ts.map +1 -0
- package/dist/namespaces/projects.d.ts +553 -0
- package/dist/namespaces/projects.d.ts.map +1 -0
- package/dist/namespaces/roles.d.ts +65 -0
- package/dist/namespaces/roles.d.ts.map +1 -0
- package/dist/namespaces/scheduling.d.ts +944 -0
- package/dist/namespaces/scheduling.d.ts.map +1 -0
- package/dist/namespaces/search.d.ts +224 -0
- package/dist/namespaces/search.d.ts.map +1 -0
- package/dist/namespaces/session-notes.d.ts +67 -0
- package/dist/namespaces/session-notes.d.ts.map +1 -0
- package/dist/namespaces/social.d.ts +330 -0
- package/dist/namespaces/social.d.ts.map +1 -0
- package/dist/namespaces/storage.d.ts +378 -0
- package/dist/namespaces/storage.d.ts.map +1 -0
- package/dist/namespaces/support.d.ts +427 -0
- package/dist/namespaces/support.d.ts.map +1 -0
- package/dist/namespaces/threads.d.ts +596 -0
- package/dist/namespaces/threads.d.ts.map +1 -0
- package/dist/namespaces/training.d.ts +358 -0
- package/dist/namespaces/training.d.ts.map +1 -0
- package/dist/namespaces/voice.d.ts +752 -0
- package/dist/namespaces/voice.d.ts.map +1 -0
- package/dist/namespaces/watcher.d.ts +425 -0
- package/dist/namespaces/watcher.d.ts.map +1 -0
- package/dist/namespaces/webhooks-ns.d.ts +3 -0
- package/dist/namespaces/webhooks-ns.d.ts.map +1 -0
- package/dist/pagination.d.ts +57 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/request-builder.d.ts +95 -0
- package/dist/request-builder.d.ts.map +1 -0
- package/dist/security.d.ts +32 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/streaming.d.ts +135 -0
- package/dist/streaming.d.ts.map +1 -0
- package/dist/utils/retry.d.ts +63 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/version.d.ts +5 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/webhook-signature.d.ts +109 -0
- package/dist/webhook-signature.d.ts.map +1 -0
- package/llms.txt +7 -1
- package/package.json +286 -36
- package/dist/index.d.mts +0 -30734
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agents.d.ts","sourceRoot":"","sources":["../../src/namespaces/agents.ts"],"names":[],"mappings":"AAiEA,OAAO,KAAK,EACV,KAAK,EACL,eAAe,EACf,UAAU,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BAAqB,CAAC;;IAUnC;;;OAGG;;QAED;;;;;;;;WAQG;yBACoB,cAAc,KAAG,OAAO,CAAC,eAAe,EAAE,CAAC;QAIlE;;;;;;;;;WASG;kBAEG,MAAM,YACA,cAAc,KACvB,OAAO,CAAC,eAAe,CAAC;;IAW7B;;;OAGG;;QAED;;;;;;;;WAQG;yBAES,cAAc,KACvB,OAAO,CAAC,oBAAoB,EAAE,CAAC;QAQlC;;;;;;;;;WASG;kBAEG,MAAM,YACA,cAAc,KACvB,OAAO,CAAC,oBAAoB,CAAC;QAQhC;;;;;;;;;;;;WAYG;qBAEG,MAAM,cACE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YACzB,cAAc,KACvB,OAAO,CAAC,oBAAoB,CAAC;;EAcrC"}
|
|
@@ -0,0 +1,407 @@
|
|
|
1
|
+
/** Response from a semantic search query. */
|
|
2
|
+
export interface AiSearchResponse {
|
|
3
|
+
hits?: Array<{
|
|
4
|
+
score?: number;
|
|
5
|
+
title?: string;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
}>;
|
|
8
|
+
total?: number;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
/** Response from text embedding. */
|
|
12
|
+
export interface AiEmbedResponse {
|
|
13
|
+
vector?: number[];
|
|
14
|
+
model?: string;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
}
|
|
17
|
+
/** Search parameters for advanced search. */
|
|
18
|
+
export type AiSearchAdvancedParams = {
|
|
19
|
+
top_k?: number;
|
|
20
|
+
min_score?: number;
|
|
21
|
+
filter?: Record<string, unknown>;
|
|
22
|
+
mode?: "vector" | "hybrid" | "fulltext";
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
/** An AI conversation record. */
|
|
26
|
+
export interface AiConversation {
|
|
27
|
+
id?: string;
|
|
28
|
+
model?: string;
|
|
29
|
+
system_prompt?: string;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
}
|
|
32
|
+
/** Attributes for creating an AI conversation. */
|
|
33
|
+
export type CreateAiConversationAttributes = {
|
|
34
|
+
model?: string;
|
|
35
|
+
system_prompt?: string;
|
|
36
|
+
temperature?: number;
|
|
37
|
+
max_tokens?: number;
|
|
38
|
+
[key: string]: unknown;
|
|
39
|
+
};
|
|
40
|
+
/** An AI message record. */
|
|
41
|
+
export interface AiMessage {
|
|
42
|
+
id?: string;
|
|
43
|
+
role?: string;
|
|
44
|
+
content?: string;
|
|
45
|
+
conversation_id?: string;
|
|
46
|
+
attributes?: Record<string, unknown>;
|
|
47
|
+
[key: string]: unknown;
|
|
48
|
+
}
|
|
49
|
+
/** Body for sending/streaming a message. */
|
|
50
|
+
export type AiMessageBody = {
|
|
51
|
+
content: string;
|
|
52
|
+
role?: string;
|
|
53
|
+
[key: string]: unknown;
|
|
54
|
+
};
|
|
55
|
+
/** A knowledge graph node. */
|
|
56
|
+
export interface GraphNode {
|
|
57
|
+
id?: string;
|
|
58
|
+
type?: string;
|
|
59
|
+
name?: string;
|
|
60
|
+
metadata?: Record<string, unknown>;
|
|
61
|
+
attributes?: Record<string, unknown>;
|
|
62
|
+
[key: string]: unknown;
|
|
63
|
+
}
|
|
64
|
+
/** Attributes for creating a knowledge graph node. */
|
|
65
|
+
export type CreateGraphNodeAttributes = {
|
|
66
|
+
type: string;
|
|
67
|
+
name: string;
|
|
68
|
+
metadata?: Record<string, unknown>;
|
|
69
|
+
source_document_id?: string;
|
|
70
|
+
embedding_text?: string;
|
|
71
|
+
[key: string]: unknown;
|
|
72
|
+
};
|
|
73
|
+
import type { RequestOptions } from "../base-client";
|
|
74
|
+
import { RequestBuilder } from "../request-builder";
|
|
75
|
+
/**
|
|
76
|
+
* Creates the `ai` namespace, providing methods for semantic search,
|
|
77
|
+
* text embedding, AI conversations, and knowledge graph management.
|
|
78
|
+
*
|
|
79
|
+
* This namespace surfaces the platform's AI-layer capabilities directly to
|
|
80
|
+
* client applications:
|
|
81
|
+
*
|
|
82
|
+
* - **Search** — Semantic (vector) search over the workspace's indexed documents
|
|
83
|
+
* and knowledge base using embedding similarity.
|
|
84
|
+
* - **Embed** — Generate float-vector embeddings for arbitrary text using the
|
|
85
|
+
* platform's default embedding model.
|
|
86
|
+
* - **Conversations / Messages** — Manage free-form AI conversation sessions
|
|
87
|
+
* outside of agent-driven threads, with support for real-time token streaming.
|
|
88
|
+
* - **Graph** — Manage knowledge graph nodes representing entities extracted
|
|
89
|
+
* from documents and conversations.
|
|
90
|
+
*
|
|
91
|
+
* @param rb - The `RequestBuilder` instance bound to the authenticated client.
|
|
92
|
+
* @returns An object containing all AI-related methods and sub-namespaces.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
96
|
+
*
|
|
97
|
+
* // Semantic search
|
|
98
|
+
* const results = await client.ai.search('unpaid invoices from Acme Corp');
|
|
99
|
+
* console.log(results);
|
|
100
|
+
*
|
|
101
|
+
* // Embed a string
|
|
102
|
+
* const embedding = await client.ai.embed('Hello world');
|
|
103
|
+
* console.log(`Vector dimensions: ${embedding.vector.length}`);
|
|
104
|
+
*/
|
|
105
|
+
export declare function createAiNamespace(rb: RequestBuilder): {
|
|
106
|
+
/**
|
|
107
|
+
* Performs semantic (vector) search over the workspace's indexed knowledge.
|
|
108
|
+
*
|
|
109
|
+
* The query is embedded using the platform's default embedding model and
|
|
110
|
+
* compared against the vector index of all ingested documents, extracted
|
|
111
|
+
* knowledge, and training content in the workspace. Results are ranked by
|
|
112
|
+
* cosine similarity and returned with relevance scores.
|
|
113
|
+
*
|
|
114
|
+
* For more control over filters, result count, or search strategy, use
|
|
115
|
+
* {@link searchAdvanced} instead.
|
|
116
|
+
*
|
|
117
|
+
* @param query - The natural-language search query string.
|
|
118
|
+
* @param options - Optional request options.
|
|
119
|
+
* @returns A promise that resolves to a map containing `results` (array of
|
|
120
|
+
* matching items with relevance scores) and associated metadata.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
124
|
+
*
|
|
125
|
+
* const results = await client.ai.search('payment terms in Q1 contracts');
|
|
126
|
+
* for (const hit of results.hits) {
|
|
127
|
+
* console.log(`[${hit.score.toFixed(3)}] ${hit.title}`);
|
|
128
|
+
* }
|
|
129
|
+
*/
|
|
130
|
+
search: (query: string, options?: RequestOptions) => Promise<AiSearchResponse>;
|
|
131
|
+
/**
|
|
132
|
+
* Performs semantic search with additional filter and configuration options.
|
|
133
|
+
*
|
|
134
|
+
* Extends the basic {@link search} with support for metadata filters
|
|
135
|
+
* (e.g. document type, date range, agent ID), result count limits, minimum
|
|
136
|
+
* similarity thresholds, hybrid search mode (combining vector and full-text),
|
|
137
|
+
* and re-ranking. All filter parameters are passed via `params`.
|
|
138
|
+
*
|
|
139
|
+
* @param query - The natural-language search query string.
|
|
140
|
+
* @param params - Optional search configuration and filters. Common fields
|
|
141
|
+
* include `top_k` (number of results), `min_score` (float, 0–1),
|
|
142
|
+
* `filter` (metadata filter expression), and `mode` (`'vector'` |
|
|
143
|
+
* `'hybrid'` | `'fulltext'`).
|
|
144
|
+
* @param options - Optional request options.
|
|
145
|
+
* @returns A promise that resolves to a map containing `results` with
|
|
146
|
+
* relevance scores and any applied filter metadata.
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
150
|
+
*
|
|
151
|
+
* const results = await client.ai.searchAdvanced(
|
|
152
|
+
* 'overdue payment terms',
|
|
153
|
+
* {
|
|
154
|
+
* top_k: 5,
|
|
155
|
+
* min_score: 0.75,
|
|
156
|
+
* filter: { document_type: 'invoice', status: 'overdue' },
|
|
157
|
+
* mode: 'hybrid',
|
|
158
|
+
* },
|
|
159
|
+
* );
|
|
160
|
+
* console.log(`Top result: ${results.hits[0]?.title}`);
|
|
161
|
+
*/
|
|
162
|
+
searchAdvanced: (query: string, params?: AiSearchAdvancedParams, options?: RequestOptions) => Promise<AiSearchResponse>;
|
|
163
|
+
/**
|
|
164
|
+
* Generates a float-vector embedding for the provided text using the
|
|
165
|
+
* platform's default embedding model.
|
|
166
|
+
*
|
|
167
|
+
* The returned vector can be used for custom similarity computations,
|
|
168
|
+
* nearest-neighbour lookups in an external vector database, clustering,
|
|
169
|
+
* or any other downstream task requiring a fixed-dimension text
|
|
170
|
+
* representation. The embedding dimensionality matches the platform's
|
|
171
|
+
* configured model (e.g. 1536 for `text-embedding-3-small`, 3072 for
|
|
172
|
+
* `text-embedding-3-large`).
|
|
173
|
+
*
|
|
174
|
+
* @param text - The input text to embed. Keep individual inputs under
|
|
175
|
+
* 8,192 tokens; longer inputs will be truncated.
|
|
176
|
+
* @param options - Optional request options.
|
|
177
|
+
* @returns A promise that resolves to an object containing `vector`
|
|
178
|
+
* (number[]) and `model` (string) metadata.
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
182
|
+
*
|
|
183
|
+
* const result = await client.ai.embed('Invoice total: $1,234.56');
|
|
184
|
+
* console.log(`Model: ${result.model}`);
|
|
185
|
+
* console.log(`Dimensions: ${result.vector.length}`);
|
|
186
|
+
*
|
|
187
|
+
* // Use vector for cosine similarity with another embedding
|
|
188
|
+
* // const similarity = cosineSimilarity(result.vector, otherVector);
|
|
189
|
+
*/
|
|
190
|
+
embed: (text: string, options?: RequestOptions) => Promise<AiEmbedResponse>;
|
|
191
|
+
/**
|
|
192
|
+
* Sub-namespace for managing free-form AI conversation sessions.
|
|
193
|
+
*
|
|
194
|
+
* Conversations are lightweight session containers for direct AI interactions
|
|
195
|
+
* that are not routed through a specific agent thread. They are useful for
|
|
196
|
+
* general-purpose chat interfaces, exploration sessions, or integrations where
|
|
197
|
+
* the caller manages context explicitly. Messages within a conversation can be
|
|
198
|
+
* sent synchronously via `messages.send` or streamed in real time via
|
|
199
|
+
* `messages.stream`.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
203
|
+
*
|
|
204
|
+
* const conversation = await client.ai.conversations.create({
|
|
205
|
+
* model: 'gpt-4o',
|
|
206
|
+
* system_prompt: 'You are a helpful financial analyst.',
|
|
207
|
+
* });
|
|
208
|
+
* console.log(`Conversation ID: ${conversation.id}`);
|
|
209
|
+
*/
|
|
210
|
+
conversations: {
|
|
211
|
+
/**
|
|
212
|
+
* Lists AI conversations in the workspace.
|
|
213
|
+
*
|
|
214
|
+
* Returns all conversations accessible to the authenticated key,
|
|
215
|
+
* ordered most-recent-first.
|
|
216
|
+
*
|
|
217
|
+
* @param options - Optional request options.
|
|
218
|
+
* @returns A promise that resolves to an array of conversation objects.
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
222
|
+
* const conversations = await client.ai.conversations.list();
|
|
223
|
+
* console.log(`Active conversations: ${conversations.length}`);
|
|
224
|
+
*/
|
|
225
|
+
list: (options?: RequestOptions) => Promise<AiConversation[]>;
|
|
226
|
+
/**
|
|
227
|
+
* Creates a new AI conversation session.
|
|
228
|
+
*
|
|
229
|
+
* An optional `attributes` map can configure the session's model,
|
|
230
|
+
* system prompt, temperature, and other inference parameters. These
|
|
231
|
+
* settings apply to all messages sent within the conversation unless
|
|
232
|
+
* overridden per-message.
|
|
233
|
+
*
|
|
234
|
+
* @param attributes - Optional conversation configuration. Common fields
|
|
235
|
+
* include `model` (string), `system_prompt` (string), `temperature`
|
|
236
|
+
* (number, 0–2), and `max_tokens` (number).
|
|
237
|
+
* @param options - Optional request options.
|
|
238
|
+
* @returns A promise that resolves to the newly created conversation object
|
|
239
|
+
* with its `id` and configured settings.
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
243
|
+
*
|
|
244
|
+
* const conversation = await client.ai.conversations.create({
|
|
245
|
+
* model: 'gpt-4o',
|
|
246
|
+
* system_prompt: 'You are a concise technical writer.',
|
|
247
|
+
* temperature: 0.3,
|
|
248
|
+
* });
|
|
249
|
+
* console.log(`Conversation started: ${conversation.id}`);
|
|
250
|
+
*/
|
|
251
|
+
create: (attributes?: CreateAiConversationAttributes, options?: RequestOptions) => Promise<AiConversation>;
|
|
252
|
+
};
|
|
253
|
+
/**
|
|
254
|
+
* Sub-namespace for sending messages to and reading messages from AI
|
|
255
|
+
* conversations.
|
|
256
|
+
*
|
|
257
|
+
* Supports both synchronous (request/response) and streaming (SSE)
|
|
258
|
+
* delivery modes. Use {@link send} when you need the full response before
|
|
259
|
+
* proceeding, and {@link stream} for real-time token-by-token delivery in
|
|
260
|
+
* chat interfaces or long-form generation tasks.
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
264
|
+
*
|
|
265
|
+
* // Streaming response
|
|
266
|
+
* const stream = await client.ai.messages.stream('conv_01HXYZ...', {
|
|
267
|
+
* content: 'Explain the key financial risks in this contract.',
|
|
268
|
+
* });
|
|
269
|
+
* for await (const chunk of stream) {
|
|
270
|
+
* process.stdout.write(chunk.delta ?? '');
|
|
271
|
+
* }
|
|
272
|
+
*/
|
|
273
|
+
messages: {
|
|
274
|
+
/**
|
|
275
|
+
* Lists messages in the workspace's AI conversations.
|
|
276
|
+
*
|
|
277
|
+
* Returns message records across all conversations accessible to the
|
|
278
|
+
* authenticated key. For messages within a specific conversation, use
|
|
279
|
+
* the `conversation_id` filter via request options.
|
|
280
|
+
*
|
|
281
|
+
* @param options - Optional request options.
|
|
282
|
+
* @returns A promise that resolves to an array of message objects.
|
|
283
|
+
*
|
|
284
|
+
* @example
|
|
285
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
286
|
+
* const messages = await client.ai.messages.list();
|
|
287
|
+
* messages.forEach(m => console.log(`${m.attributes.role}: ${m.attributes.content}`));
|
|
288
|
+
*/
|
|
289
|
+
list: (options?: RequestOptions) => Promise<AiMessage[]>;
|
|
290
|
+
/**
|
|
291
|
+
* Sends a message to an AI conversation and waits for the full response
|
|
292
|
+
* before returning (non-streaming).
|
|
293
|
+
*
|
|
294
|
+
* The platform routes the message through the conversation's configured
|
|
295
|
+
* model and returns the complete assistant reply once generation finishes.
|
|
296
|
+
* For long responses or latency-sensitive UIs, prefer {@link stream} which
|
|
297
|
+
* delivers tokens incrementally.
|
|
298
|
+
*
|
|
299
|
+
* @param conversationId - The UUID of the conversation to send the message to.
|
|
300
|
+
* @param body - The message payload. Must include `content` (string) and
|
|
301
|
+
* optionally `role`, `attachments`, or per-message inference overrides.
|
|
302
|
+
* @param options - Optional request options.
|
|
303
|
+
* @returns A promise that resolves to the created message object, including
|
|
304
|
+
* the full assistant reply in `attributes.content`.
|
|
305
|
+
*
|
|
306
|
+
* @example
|
|
307
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
308
|
+
*
|
|
309
|
+
* const reply = await client.ai.messages.send(
|
|
310
|
+
* 'conv_01HXYZ...',
|
|
311
|
+
* { content: 'What is the governing law clause in this contract?' },
|
|
312
|
+
* );
|
|
313
|
+
* console.log(`Assistant: ${reply.attributes.content}`);
|
|
314
|
+
*/
|
|
315
|
+
send: (conversationId: string, body: AiMessageBody, options?: RequestOptions) => Promise<AiMessage>;
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* Sub-namespace for managing knowledge graph nodes.
|
|
319
|
+
*
|
|
320
|
+
* The knowledge graph stores entities extracted from documents, conversations,
|
|
321
|
+
* and structured data sources. Nodes represent discrete entities (people,
|
|
322
|
+
* organizations, products, concepts) and are connected by typed edges that
|
|
323
|
+
* capture relationships between them. The graph powers entity-aware semantic
|
|
324
|
+
* search, relationship discovery, and context injection into agent prompts.
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
328
|
+
*
|
|
329
|
+
* // Create a company node
|
|
330
|
+
* const node = await client.ai.graph.createNode({
|
|
331
|
+
* type: 'organization',
|
|
332
|
+
* name: 'Acme Corp',
|
|
333
|
+
* metadata: { industry: 'manufacturing' },
|
|
334
|
+
* });
|
|
335
|
+
* console.log(`Node ID: ${node.id}`);
|
|
336
|
+
*/
|
|
337
|
+
graph: {
|
|
338
|
+
/**
|
|
339
|
+
* Lists all knowledge graph nodes in the workspace.
|
|
340
|
+
*
|
|
341
|
+
* Returns nodes representing entities that have been extracted from
|
|
342
|
+
* documents, created manually, or discovered through AI analysis. Each
|
|
343
|
+
* node includes its type, name, and associated metadata.
|
|
344
|
+
*
|
|
345
|
+
* @param options - Optional request options. Pass filter parameters via
|
|
346
|
+
* query options to narrow results by node type or metadata fields.
|
|
347
|
+
* @returns A promise that resolves to an array of knowledge graph node
|
|
348
|
+
* objects.
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
352
|
+
* const nodes = await client.ai.graph.listNodes();
|
|
353
|
+
* const orgs = nodes.filter(n => n.attributes.type === 'organization');
|
|
354
|
+
* console.log(`Organization nodes: ${orgs.length}`);
|
|
355
|
+
*/
|
|
356
|
+
listNodes: (options?: RequestOptions) => Promise<GraphNode[]>;
|
|
357
|
+
/**
|
|
358
|
+
* Creates a new knowledge graph node representing an entity.
|
|
359
|
+
*
|
|
360
|
+
* Nodes can be created automatically during document ingestion (via AI
|
|
361
|
+
* extraction) or manually via this method. Each node requires a `type`
|
|
362
|
+
* (e.g. `'person'`, `'organization'`, `'product'`, `'concept'`) and a
|
|
363
|
+
* `name`. Optional `metadata` fields provide additional context that
|
|
364
|
+
* enriches semantic search and relationship discovery.
|
|
365
|
+
*
|
|
366
|
+
* @param attributes - Node attributes. Must include at least `type`
|
|
367
|
+
* (string) and `name` (string). Optional fields include `metadata`
|
|
368
|
+
* (Record<string, unknown>), `source_document_id` (string), and
|
|
369
|
+
* `embedding_text` (string, used to generate the node's vector).
|
|
370
|
+
* @param options - Optional request options.
|
|
371
|
+
* @returns A promise that resolves to the newly created knowledge graph
|
|
372
|
+
* node object.
|
|
373
|
+
*
|
|
374
|
+
* @example
|
|
375
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
376
|
+
*
|
|
377
|
+
* const node = await client.ai.graph.createNode({
|
|
378
|
+
* type: 'person',
|
|
379
|
+
* name: 'Jane Smith',
|
|
380
|
+
* metadata: {
|
|
381
|
+
* role: 'CFO',
|
|
382
|
+
* organization: 'Acme Corp',
|
|
383
|
+
* },
|
|
384
|
+
* });
|
|
385
|
+
* console.log(`Created node: ${node.id} (${node.attributes.type})`);
|
|
386
|
+
*/
|
|
387
|
+
createNode: (attributes: CreateGraphNodeAttributes, options?: RequestOptions) => Promise<GraphNode>;
|
|
388
|
+
/**
|
|
389
|
+
* Permanently deletes a knowledge graph node by its ID.
|
|
390
|
+
*
|
|
391
|
+
* Deleting a node also removes all edges connected to it. This may affect
|
|
392
|
+
* relationship discovery and entity-aware search for documents that
|
|
393
|
+
* referenced this entity. The operation is irreversible.
|
|
394
|
+
*
|
|
395
|
+
* @param id - The UUID of the knowledge graph node to delete.
|
|
396
|
+
* @param options - Optional request options.
|
|
397
|
+
* @returns A promise that resolves to `true` on successful deletion.
|
|
398
|
+
*
|
|
399
|
+
* @example
|
|
400
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
401
|
+
* await client.ai.graph.deleteNode('gnd_01HXYZ...');
|
|
402
|
+
* console.log('Node and all its edges removed from the graph');
|
|
403
|
+
*/
|
|
404
|
+
deleteNode: (id: string, options?: RequestOptions) => Promise<true>;
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
//# sourceMappingURL=ai.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/namespaces/ai.ts"],"names":[],"mappings":"AAQA,6CAA6C;AAC7C,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,KAAK,CAAC;QAA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c;IAEhD;;;;;;;;;;;;;;;;;;;;;;;OAuBG;oBAEM,MAAM,YACH,cAAc,KACvB,OAAO,CAAC,gBAAgB,CAAC;IAQ5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;4BAEM,MAAM,WACJ,sBAAsB,YACrB,cAAc,KACvB,OAAO,CAAC,gBAAgB,CAAC;IAQ5B;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;kBAEK,MAAM,YACF,cAAc,KACvB,OAAO,CAAC,eAAe,CAAC;IAQ3B;;;;;;;;;;;;;;;;;;OAkBG;;QAED;;;;;;;;;;;;;WAaG;yBACoB,cAAc,KAAG,OAAO,CAAC,cAAc,EAAE,CAAC;QAIjE;;;;;;;;;;;;;;;;;;;;;;;;WAwBG;8BAEY,8BAA8B,YACjC,cAAc,KACvB,OAAO,CAAC,cAAc,CAAC;;IAgB5B;;;;;;;;;;;;;;;;;;;OAmBG;;QAED;;;;;;;;;;;;;;WAcG;yBACoB,cAAc,KAAG,OAAO,CAAC,SAAS,EAAE,CAAC;QAI5D;;;;;;;;;;;;;;;;;;;;;;;;WAwBG;+BAEe,MAAM,QAChB,aAAa,YACT,cAAc,KACvB,OAAO,CAAC,SAAS,CAAC;;IAiBvB;;;;;;;;;;;;;;;;;;;OAmBG;;QAED;;;;;;;;;;;;;;;;;WAiBG;8BACyB,cAAc,KAAG,OAAO,CAAC,SAAS,EAAE,CAAC;QAIjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA6BG;iCAEW,yBAAyB,YAC3B,cAAc,KACvB,OAAO,CAAC,SAAS,CAAC;QAYrB;;;;;;;;;;;;;;;WAeG;yBAEG,MAAM,YACA,cAAc,KACvB,OAAO,CAAC,IAAI,CAAC;;EASrB"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { RequestOptions } from "../base-client";
|
|
2
|
+
import { RequestBuilder } from "../request-builder";
|
|
3
|
+
/**
|
|
4
|
+
* Audit log entry returned by the client audit API.
|
|
5
|
+
*
|
|
6
|
+
* Note: `ip_address` and `user_agent` are intentionally excluded —
|
|
7
|
+
* those fields are internal-only (`public?: false`) and never exposed via API.
|
|
8
|
+
*/
|
|
9
|
+
export interface AuditLog {
|
|
10
|
+
id: string;
|
|
11
|
+
action: string;
|
|
12
|
+
resource_type: string;
|
|
13
|
+
resource_id: string;
|
|
14
|
+
changes: Record<string, unknown> | null;
|
|
15
|
+
target_type: string | null;
|
|
16
|
+
target_id: string | null;
|
|
17
|
+
target_name: string | null;
|
|
18
|
+
tenant_id: string | null;
|
|
19
|
+
workspace_id: string | null;
|
|
20
|
+
actor_id: string | null;
|
|
21
|
+
/** Human-readable actor name — "System" for automated actions. */
|
|
22
|
+
actor_display_name: string | null;
|
|
23
|
+
created_at: string;
|
|
24
|
+
}
|
|
25
|
+
/** Parameters for the tenant activity feed. */
|
|
26
|
+
export type ActivityFeedParams = {
|
|
27
|
+
/** Required. Tenant UUID to scope the feed. */
|
|
28
|
+
tenantId: string;
|
|
29
|
+
/** Optional workspace UUID to narrow results to a single workspace. */
|
|
30
|
+
workspaceId?: string;
|
|
31
|
+
/** Optional action type filter, e.g. `"document.analyzed"`. */
|
|
32
|
+
activityType?: string;
|
|
33
|
+
/** Optional actor UUID — returns only actions performed by this actor. */
|
|
34
|
+
actorId?: string;
|
|
35
|
+
/** ISO-8601 timestamp — return only entries after this datetime. */
|
|
36
|
+
fromDate?: string;
|
|
37
|
+
/** ISO-8601 timestamp — return only entries before this datetime. */
|
|
38
|
+
toDate?: string;
|
|
39
|
+
/** Max results to return. Default: 50. */
|
|
40
|
+
limit?: number;
|
|
41
|
+
/** Offset for offset-based pagination. */
|
|
42
|
+
offset?: number;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Audit namespace factory (client surface).
|
|
46
|
+
*
|
|
47
|
+
* Exposes a read-only activity feed scoped to the authenticated user's tenant.
|
|
48
|
+
* Use the admin SDK for full audit access (list, countByAction, requestExport).
|
|
49
|
+
*
|
|
50
|
+
* @param rb - The request builder used for API communication.
|
|
51
|
+
* @returns Audit namespace with `activityFeed`.
|
|
52
|
+
*/
|
|
53
|
+
export declare function createAuditNamespace(rb: RequestBuilder): {
|
|
54
|
+
/**
|
|
55
|
+
* Fetch a paginated, time-sorted activity feed scoped to a tenant.
|
|
56
|
+
*
|
|
57
|
+
* Optionally filter by workspace, action type, actor, or date range.
|
|
58
|
+
* Results are sorted by `created_at` descending (most recent first).
|
|
59
|
+
*
|
|
60
|
+
* @param params - Feed parameters. `tenantId` is required.
|
|
61
|
+
* @param options - Optional request options.
|
|
62
|
+
* @returns Array of AuditLog entries matching the filters.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```typescript
|
|
66
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
67
|
+
*
|
|
68
|
+
* // All recent activity for a tenant
|
|
69
|
+
* const feed = await client.audit.activityFeed({
|
|
70
|
+
* tenantId: 'tenant-uuid',
|
|
71
|
+
* });
|
|
72
|
+
*
|
|
73
|
+
* // Narrow to a specific workspace
|
|
74
|
+
* const focused = await client.audit.activityFeed({
|
|
75
|
+
* tenantId: 'tenant-uuid',
|
|
76
|
+
* workspaceId: 'ws-uuid',
|
|
77
|
+
* limit: 20,
|
|
78
|
+
* });
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
activityFeed(params: ActivityFeedParams, options?: RequestOptions): Promise<AuditLog[]>;
|
|
82
|
+
};
|
|
83
|
+
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/namespaces/audit.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAA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