@gpt-platform/client 0.8.3 → 0.8.5
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.d.mts +109 -20
- package/dist/index.d.ts +109 -20
- package/dist/index.js +133 -99
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +133 -99
- package/dist/index.mjs.map +1 -1
- package/llms.txt +1 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -606,9 +606,9 @@ declare class BrowserApiKeyError extends Error {
|
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
/** SDK version — updated automatically by mix update.sdks */
|
|
609
|
-
declare const SDK_VERSION = "0.8.
|
|
609
|
+
declare const SDK_VERSION = "0.8.5";
|
|
610
610
|
/** Default API version sent in every request — updated automatically by mix update.sdks */
|
|
611
|
-
declare const DEFAULT_API_VERSION = "2026-03-
|
|
611
|
+
declare const DEFAULT_API_VERSION = "2026-03-19";
|
|
612
612
|
|
|
613
613
|
/** Security configuration options */
|
|
614
614
|
interface SecurityConfig {
|
|
@@ -4590,6 +4590,12 @@ type ClinicalClientSupplement = {
|
|
|
4590
4590
|
* Field included by default.
|
|
4591
4591
|
*/
|
|
4592
4592
|
instructions?: string | null | unknown;
|
|
4593
|
+
/**
|
|
4594
|
+
* Field included by default.
|
|
4595
|
+
*/
|
|
4596
|
+
metadata: {
|
|
4597
|
+
[key: string]: unknown;
|
|
4598
|
+
};
|
|
4593
4599
|
/**
|
|
4594
4600
|
* Field included by default.
|
|
4595
4601
|
*/
|
|
@@ -6217,6 +6223,12 @@ type ClinicalMealPlan = {
|
|
|
6217
6223
|
* Field included by default.
|
|
6218
6224
|
*/
|
|
6219
6225
|
goal_calories?: number | null | unknown;
|
|
6226
|
+
/**
|
|
6227
|
+
* Field included by default.
|
|
6228
|
+
*/
|
|
6229
|
+
metadata: {
|
|
6230
|
+
[key: string]: unknown;
|
|
6231
|
+
};
|
|
6220
6232
|
/**
|
|
6221
6233
|
* Field included by default.
|
|
6222
6234
|
*/
|
|
@@ -6236,7 +6248,7 @@ type ClinicalMealPlan = {
|
|
|
6236
6248
|
/**
|
|
6237
6249
|
* Field included by default.
|
|
6238
6250
|
*/
|
|
6239
|
-
status: "draft" | "approved" | "archived";
|
|
6251
|
+
status: "draft" | "approved" | "archived" | "sent_to_client";
|
|
6240
6252
|
};
|
|
6241
6253
|
id: string;
|
|
6242
6254
|
/**
|
|
@@ -6798,7 +6810,7 @@ type AgentVersion = {
|
|
|
6798
6810
|
/**
|
|
6799
6811
|
* Field included by default.
|
|
6800
6812
|
*/
|
|
6801
|
-
version_number:
|
|
6813
|
+
version_number: number;
|
|
6802
6814
|
};
|
|
6803
6815
|
id: string;
|
|
6804
6816
|
/**
|
|
@@ -7304,6 +7316,14 @@ type ClinicalPracticeResource = {
|
|
|
7304
7316
|
* Field included by default.
|
|
7305
7317
|
*/
|
|
7306
7318
|
author?: string | null | unknown;
|
|
7319
|
+
/**
|
|
7320
|
+
* Field included by default.
|
|
7321
|
+
*/
|
|
7322
|
+
category?: string | null | unknown;
|
|
7323
|
+
/**
|
|
7324
|
+
* Field included by default.
|
|
7325
|
+
*/
|
|
7326
|
+
condition_tags: Array<string>;
|
|
7307
7327
|
/**
|
|
7308
7328
|
* Field included by default.
|
|
7309
7329
|
*/
|
|
@@ -7332,6 +7352,12 @@ type ClinicalPracticeResource = {
|
|
|
7332
7352
|
* Field included by default.
|
|
7333
7353
|
*/
|
|
7334
7354
|
license?: string | null | unknown;
|
|
7355
|
+
/**
|
|
7356
|
+
* Field included by default.
|
|
7357
|
+
*/
|
|
7358
|
+
metadata: {
|
|
7359
|
+
[key: string]: unknown;
|
|
7360
|
+
};
|
|
7335
7361
|
/**
|
|
7336
7362
|
* Field included by default.
|
|
7337
7363
|
*/
|
|
@@ -7347,7 +7373,7 @@ type ClinicalPracticeResource = {
|
|
|
7347
7373
|
/**
|
|
7348
7374
|
* Field included by default.
|
|
7349
7375
|
*/
|
|
7350
|
-
resource_type: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook";
|
|
7376
|
+
resource_type: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook" | "other";
|
|
7351
7377
|
/**
|
|
7352
7378
|
* Field included by default.
|
|
7353
7379
|
*/
|
|
@@ -20368,6 +20394,20 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
20368
20394
|
* console.log(agent.attributes.name);
|
|
20369
20395
|
*/
|
|
20370
20396
|
get: (id: string, options?: RequestOptions) => Promise<Agent>;
|
|
20397
|
+
/**
|
|
20398
|
+
* Look up an agent by its system_slug. Use this for ISV-provisioned agents
|
|
20399
|
+
* where the slug is a stable identifier that survives database resets.
|
|
20400
|
+
*
|
|
20401
|
+
* @param slug - The system_slug of the agent (e.g., "chartless-session-prep-briefing").
|
|
20402
|
+
* @param options - Optional request options.
|
|
20403
|
+
* @returns The Agent record.
|
|
20404
|
+
*
|
|
20405
|
+
* @example
|
|
20406
|
+
* ```ts
|
|
20407
|
+
* const agent = await client.agents.getBySlug("chartless-session-prep-briefing");
|
|
20408
|
+
* ```
|
|
20409
|
+
*/
|
|
20410
|
+
getBySlug: (slug: string, options?: RequestOptions) => Promise<Agent>;
|
|
20371
20411
|
/**
|
|
20372
20412
|
* Creates a new agent with a blank initial version (v1).
|
|
20373
20413
|
*
|
|
@@ -21268,16 +21308,16 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21268
21308
|
* @param agentId - The UUID of the agent to execute.
|
|
21269
21309
|
* @param input - Input data for the agent (task description, documents, etc.).
|
|
21270
21310
|
* @param opts - Additional execution options.
|
|
21311
|
+
* @param opts.workspace_id - The workspace to execute in. Required for `sk_app_` key auth.
|
|
21271
21312
|
* @param opts.model_id - Override model for this execution only (e.g., "anthropic/claude-sonnet-4").
|
|
21272
21313
|
* Highest priority in the model resolution chain.
|
|
21273
|
-
* @param reqOptions - Optional request options. Use `idempotencyKey` to prevent duplicate executions.
|
|
21274
21314
|
* @returns The created execution record with status `pending`.
|
|
21275
21315
|
*
|
|
21276
21316
|
* @example
|
|
21277
21317
|
* const exec = await client.agents.executions.start('agt_01...', {
|
|
21278
21318
|
* task: 'Extract invoice fields',
|
|
21279
21319
|
* document_id: 'doc_01...',
|
|
21280
|
-
* });
|
|
21320
|
+
* }, { workspace_id: 'ws_abc123' });
|
|
21281
21321
|
* console.log(exec.id, exec.status); // 'pending'
|
|
21282
21322
|
*
|
|
21283
21323
|
* @example
|
|
@@ -21285,10 +21325,11 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21285
21325
|
* const exec = await client.agents.executions.start(
|
|
21286
21326
|
* 'agt_01...',
|
|
21287
21327
|
* { task: 'Complex reasoning' },
|
|
21288
|
-
* { model_id: 'anthropic/claude-sonnet-4' },
|
|
21328
|
+
* { workspace_id: 'ws_abc123', model_id: 'anthropic/claude-sonnet-4' },
|
|
21289
21329
|
* );
|
|
21290
21330
|
*/
|
|
21291
21331
|
start: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
21332
|
+
workspace_id?: string;
|
|
21292
21333
|
model_id?: string;
|
|
21293
21334
|
} & RequestOptions) => Promise<Execution>;
|
|
21294
21335
|
/**
|
|
@@ -21300,16 +21341,19 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21300
21341
|
*
|
|
21301
21342
|
* @param agentId - The UUID of the agent.
|
|
21302
21343
|
* @param input - Input data (same format as {@link start}).
|
|
21303
|
-
* @param
|
|
21344
|
+
* @param opts - Additional options.
|
|
21345
|
+
* @param opts.workspace_id - The workspace to estimate for. Required for `sk_app_` key auth.
|
|
21304
21346
|
* @returns Cost estimate with min/max credit ranges.
|
|
21305
21347
|
*
|
|
21306
21348
|
* @example
|
|
21307
21349
|
* const estimate = await client.agents.executions.estimate('agt_01...', {
|
|
21308
21350
|
* task: 'Process batch',
|
|
21309
|
-
* });
|
|
21351
|
+
* }, { workspace_id: 'ws_abc123' });
|
|
21310
21352
|
* console.log(`Estimated cost: ${estimate.min_credits} - ${estimate.max_credits}`);
|
|
21311
21353
|
*/
|
|
21312
|
-
estimate: (agentId: string, input: Record<string, unknown>,
|
|
21354
|
+
estimate: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
21355
|
+
workspace_id?: string;
|
|
21356
|
+
} & RequestOptions) => Promise<ExecutionEstimateResponse>;
|
|
21313
21357
|
/**
|
|
21314
21358
|
* Fetches a single execution by ID.
|
|
21315
21359
|
*
|
|
@@ -21331,13 +21375,16 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21331
21375
|
* Returns only executions triggered by the authenticated user,
|
|
21332
21376
|
* ordered by creation time descending.
|
|
21333
21377
|
*
|
|
21334
|
-
* @param
|
|
21378
|
+
* @param opts - Optional filtering and request options.
|
|
21379
|
+
* @param opts.workspace_id - Filter to a specific workspace. Required for `sk_app_` key auth.
|
|
21335
21380
|
* @returns Array of execution records.
|
|
21336
21381
|
*
|
|
21337
21382
|
* @example
|
|
21338
|
-
* const executions = await client.agents.executions.list();
|
|
21383
|
+
* const executions = await client.agents.executions.list({ workspace_id: 'ws_abc123' });
|
|
21339
21384
|
*/
|
|
21340
|
-
list: (
|
|
21385
|
+
list: (opts?: {
|
|
21386
|
+
workspace_id?: string;
|
|
21387
|
+
} & RequestOptions) => Promise<Execution[]>;
|
|
21341
21388
|
/**
|
|
21342
21389
|
* Opens an SSE stream for real-time execution events.
|
|
21343
21390
|
*
|
|
@@ -21649,6 +21696,7 @@ interface CreateMealPlanAttributes {
|
|
|
21649
21696
|
plan_content?: string;
|
|
21650
21697
|
patient_notes?: string;
|
|
21651
21698
|
parent_plan_id?: string;
|
|
21699
|
+
metadata?: Record<string, unknown>;
|
|
21652
21700
|
}
|
|
21653
21701
|
interface UpdateMealPlanAttributes {
|
|
21654
21702
|
status?: string;
|
|
@@ -21657,6 +21705,7 @@ interface UpdateMealPlanAttributes {
|
|
|
21657
21705
|
macro_targets?: Record<string, unknown>;
|
|
21658
21706
|
plan_content?: string;
|
|
21659
21707
|
patient_notes?: string;
|
|
21708
|
+
metadata?: Record<string, unknown>;
|
|
21660
21709
|
}
|
|
21661
21710
|
interface CreateClientGoalAttributes {
|
|
21662
21711
|
workspace_id: string;
|
|
@@ -21722,6 +21771,7 @@ interface CreateClientSupplementAttributes {
|
|
|
21722
21771
|
fullscript_variant_id?: string;
|
|
21723
21772
|
prescribed_at?: string;
|
|
21724
21773
|
discontinued_at?: string;
|
|
21774
|
+
metadata?: Record<string, unknown>;
|
|
21725
21775
|
}
|
|
21726
21776
|
interface UpdateClientSupplementAttributes {
|
|
21727
21777
|
status?: string;
|
|
@@ -21735,6 +21785,7 @@ interface UpdateClientSupplementAttributes {
|
|
|
21735
21785
|
fullscript_variant_id?: string;
|
|
21736
21786
|
prescribed_at?: string;
|
|
21737
21787
|
discontinued_at?: string;
|
|
21788
|
+
metadata?: Record<string, unknown>;
|
|
21738
21789
|
}
|
|
21739
21790
|
interface CreateDeliveryAttributes {
|
|
21740
21791
|
workspace_id: string;
|
|
@@ -21757,7 +21808,7 @@ interface CreatePracticeResourceAttributes {
|
|
|
21757
21808
|
workspace_id: string;
|
|
21758
21809
|
title: string;
|
|
21759
21810
|
description?: string;
|
|
21760
|
-
resource_type?: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook";
|
|
21811
|
+
resource_type?: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook" | "other";
|
|
21761
21812
|
storage_key?: string;
|
|
21762
21813
|
url?: string;
|
|
21763
21814
|
tags?: string[];
|
|
@@ -21773,11 +21824,14 @@ interface CreatePracticeResourceAttributes {
|
|
|
21773
21824
|
applicable_conditions?: string[];
|
|
21774
21825
|
related_goal_types?: string[];
|
|
21775
21826
|
icon_url?: string;
|
|
21827
|
+
category?: string;
|
|
21828
|
+
condition_tags?: string[];
|
|
21829
|
+
metadata?: Record<string, unknown>;
|
|
21776
21830
|
}
|
|
21777
21831
|
interface UpdatePracticeResourceAttributes {
|
|
21778
21832
|
title?: string;
|
|
21779
21833
|
description?: string;
|
|
21780
|
-
resource_type?: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook";
|
|
21834
|
+
resource_type?: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook" | "other";
|
|
21781
21835
|
storage_key?: string;
|
|
21782
21836
|
url?: string;
|
|
21783
21837
|
tags?: string[];
|
|
@@ -21793,6 +21847,9 @@ interface UpdatePracticeResourceAttributes {
|
|
|
21793
21847
|
applicable_conditions?: string[];
|
|
21794
21848
|
related_goal_types?: string[];
|
|
21795
21849
|
icon_url?: string;
|
|
21850
|
+
category?: string;
|
|
21851
|
+
condition_tags?: string[];
|
|
21852
|
+
metadata?: Record<string, unknown>;
|
|
21796
21853
|
}
|
|
21797
21854
|
interface CreatePracticeToolAttributes {
|
|
21798
21855
|
workspace_id: string;
|
|
@@ -21889,6 +21946,15 @@ interface PatientAdherenceResponse {
|
|
|
21889
21946
|
goals: PatientAdherenceGoals;
|
|
21890
21947
|
health_metrics: PatientAdherenceHealthMetrics;
|
|
21891
21948
|
}
|
|
21949
|
+
/** Item in a batch reorder request. */
|
|
21950
|
+
interface ReorderGoalItem {
|
|
21951
|
+
id: string;
|
|
21952
|
+
position: number;
|
|
21953
|
+
}
|
|
21954
|
+
/** Server response from a batch reorder operation. */
|
|
21955
|
+
interface ReorderGoalsResponse {
|
|
21956
|
+
reordered: number;
|
|
21957
|
+
}
|
|
21892
21958
|
interface CreateGoalTemplateAttributes {
|
|
21893
21959
|
workspace_id: string;
|
|
21894
21960
|
goal_type: string;
|
|
@@ -22481,6 +22547,23 @@ declare function createClinicalNamespace(rb: RequestBuilder): {
|
|
|
22481
22547
|
* @returns `true` on successful deletion
|
|
22482
22548
|
*/
|
|
22483
22549
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
22550
|
+
/**
|
|
22551
|
+
* Batch reorder client goals by updating their positions.
|
|
22552
|
+
*
|
|
22553
|
+
* @param items - Array of `{ id, position }` pairs specifying new order
|
|
22554
|
+
* @param options - Request options
|
|
22555
|
+
* @returns `{ reordered: number }` — count of updated goals
|
|
22556
|
+
*
|
|
22557
|
+
* @example
|
|
22558
|
+
* ```typescript
|
|
22559
|
+
* await client.clinical.clientGoals.reorder([
|
|
22560
|
+
* { id: "goal-uuid-1", position: 0 },
|
|
22561
|
+
* { id: "goal-uuid-2", position: 1 },
|
|
22562
|
+
* { id: "goal-uuid-3", position: 2 },
|
|
22563
|
+
* ]);
|
|
22564
|
+
* ```
|
|
22565
|
+
*/
|
|
22566
|
+
reorder: (items: ReorderGoalItem[], options?: RequestOptions) => Promise<ReorderGoalsResponse>;
|
|
22484
22567
|
};
|
|
22485
22568
|
/**
|
|
22486
22569
|
* Manage supplement prescriptions for clinical patients.
|
|
@@ -23045,6 +23128,7 @@ declare class GptClient extends BaseClient {
|
|
|
23045
23128
|
listAll: (options?: RequestOptions) => Promise<Agent[]>;
|
|
23046
23129
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
23047
23130
|
get: (id: string, options?: RequestOptions) => Promise<Agent>;
|
|
23131
|
+
getBySlug: (slug: string, options?: RequestOptions) => Promise<Agent>;
|
|
23048
23132
|
create: (name: string, attributes?: CreateAgentAttributes, options?: RequestOptions) => Promise<Agent>;
|
|
23049
23133
|
update: (id: string, attributes: UpdateAgentAttributes, options?: RequestOptions) => Promise<Agent>;
|
|
23050
23134
|
test: (id: string, options?: RequestOptions) => Promise<Agent>;
|
|
@@ -23119,11 +23203,16 @@ declare class GptClient extends BaseClient {
|
|
|
23119
23203
|
};
|
|
23120
23204
|
executions: {
|
|
23121
23205
|
start: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
23206
|
+
workspace_id?: string;
|
|
23122
23207
|
model_id?: string;
|
|
23123
23208
|
} & RequestOptions) => Promise<Execution>;
|
|
23124
|
-
estimate: (agentId: string, input: Record<string, unknown>,
|
|
23209
|
+
estimate: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
23210
|
+
workspace_id?: string;
|
|
23211
|
+
} & RequestOptions) => Promise<ExecutionEstimateResponse>;
|
|
23125
23212
|
get: (id: string, options?: RequestOptions) => Promise<Execution>;
|
|
23126
|
-
list: (
|
|
23213
|
+
list: (opts?: {
|
|
23214
|
+
workspace_id?: string;
|
|
23215
|
+
} & RequestOptions) => Promise<Execution[]>;
|
|
23127
23216
|
stream: (id: string, options?: RequestOptions & StreamOptions) => Promise<AsyncIterableIterator<ExecutionEvent>>;
|
|
23128
23217
|
approve: (id: string, approvedData?: Record<string, unknown>, options?: RequestOptions) => Promise<Execution>;
|
|
23129
23218
|
deny: (id: string, reason: string, options?: RequestOptions) => Promise<Execution>;
|
|
@@ -23826,7 +23915,7 @@ declare class GptClient extends BaseClient {
|
|
|
23826
23915
|
text: string;
|
|
23827
23916
|
max_chars: number;
|
|
23828
23917
|
workspace_id: string;
|
|
23829
|
-
platform
|
|
23918
|
+
platform? /** Direct email composition, AI drafting, sender profiles, and tracking */: string;
|
|
23830
23919
|
}, options?: RequestOptions) => Promise<unknown>;
|
|
23831
23920
|
refine: (attributes: {
|
|
23832
23921
|
text: string;
|
|
@@ -23836,7 +23925,7 @@ declare class GptClient extends BaseClient {
|
|
|
23836
23925
|
suggestTopics: (attributes: {
|
|
23837
23926
|
workspace_id: string;
|
|
23838
23927
|
industry?: string;
|
|
23839
|
-
brand_identity_id
|
|
23928
|
+
brand_identity_id?: string;
|
|
23840
23929
|
count?: number;
|
|
23841
23930
|
}, options?: RequestOptions) => Promise<unknown>;
|
|
23842
23931
|
generateImagePrompt: (attributes: {
|
package/dist/index.d.ts
CHANGED
|
@@ -606,9 +606,9 @@ declare class BrowserApiKeyError extends Error {
|
|
|
606
606
|
}
|
|
607
607
|
|
|
608
608
|
/** SDK version — updated automatically by mix update.sdks */
|
|
609
|
-
declare const SDK_VERSION = "0.8.
|
|
609
|
+
declare const SDK_VERSION = "0.8.5";
|
|
610
610
|
/** Default API version sent in every request — updated automatically by mix update.sdks */
|
|
611
|
-
declare const DEFAULT_API_VERSION = "2026-03-
|
|
611
|
+
declare const DEFAULT_API_VERSION = "2026-03-19";
|
|
612
612
|
|
|
613
613
|
/** Security configuration options */
|
|
614
614
|
interface SecurityConfig {
|
|
@@ -4590,6 +4590,12 @@ type ClinicalClientSupplement = {
|
|
|
4590
4590
|
* Field included by default.
|
|
4591
4591
|
*/
|
|
4592
4592
|
instructions?: string | null | unknown;
|
|
4593
|
+
/**
|
|
4594
|
+
* Field included by default.
|
|
4595
|
+
*/
|
|
4596
|
+
metadata: {
|
|
4597
|
+
[key: string]: unknown;
|
|
4598
|
+
};
|
|
4593
4599
|
/**
|
|
4594
4600
|
* Field included by default.
|
|
4595
4601
|
*/
|
|
@@ -6217,6 +6223,12 @@ type ClinicalMealPlan = {
|
|
|
6217
6223
|
* Field included by default.
|
|
6218
6224
|
*/
|
|
6219
6225
|
goal_calories?: number | null | unknown;
|
|
6226
|
+
/**
|
|
6227
|
+
* Field included by default.
|
|
6228
|
+
*/
|
|
6229
|
+
metadata: {
|
|
6230
|
+
[key: string]: unknown;
|
|
6231
|
+
};
|
|
6220
6232
|
/**
|
|
6221
6233
|
* Field included by default.
|
|
6222
6234
|
*/
|
|
@@ -6236,7 +6248,7 @@ type ClinicalMealPlan = {
|
|
|
6236
6248
|
/**
|
|
6237
6249
|
* Field included by default.
|
|
6238
6250
|
*/
|
|
6239
|
-
status: "draft" | "approved" | "archived";
|
|
6251
|
+
status: "draft" | "approved" | "archived" | "sent_to_client";
|
|
6240
6252
|
};
|
|
6241
6253
|
id: string;
|
|
6242
6254
|
/**
|
|
@@ -6798,7 +6810,7 @@ type AgentVersion = {
|
|
|
6798
6810
|
/**
|
|
6799
6811
|
* Field included by default.
|
|
6800
6812
|
*/
|
|
6801
|
-
version_number:
|
|
6813
|
+
version_number: number;
|
|
6802
6814
|
};
|
|
6803
6815
|
id: string;
|
|
6804
6816
|
/**
|
|
@@ -7304,6 +7316,14 @@ type ClinicalPracticeResource = {
|
|
|
7304
7316
|
* Field included by default.
|
|
7305
7317
|
*/
|
|
7306
7318
|
author?: string | null | unknown;
|
|
7319
|
+
/**
|
|
7320
|
+
* Field included by default.
|
|
7321
|
+
*/
|
|
7322
|
+
category?: string | null | unknown;
|
|
7323
|
+
/**
|
|
7324
|
+
* Field included by default.
|
|
7325
|
+
*/
|
|
7326
|
+
condition_tags: Array<string>;
|
|
7307
7327
|
/**
|
|
7308
7328
|
* Field included by default.
|
|
7309
7329
|
*/
|
|
@@ -7332,6 +7352,12 @@ type ClinicalPracticeResource = {
|
|
|
7332
7352
|
* Field included by default.
|
|
7333
7353
|
*/
|
|
7334
7354
|
license?: string | null | unknown;
|
|
7355
|
+
/**
|
|
7356
|
+
* Field included by default.
|
|
7357
|
+
*/
|
|
7358
|
+
metadata: {
|
|
7359
|
+
[key: string]: unknown;
|
|
7360
|
+
};
|
|
7335
7361
|
/**
|
|
7336
7362
|
* Field included by default.
|
|
7337
7363
|
*/
|
|
@@ -7347,7 +7373,7 @@ type ClinicalPracticeResource = {
|
|
|
7347
7373
|
/**
|
|
7348
7374
|
* Field included by default.
|
|
7349
7375
|
*/
|
|
7350
|
-
resource_type: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook";
|
|
7376
|
+
resource_type: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook" | "other";
|
|
7351
7377
|
/**
|
|
7352
7378
|
* Field included by default.
|
|
7353
7379
|
*/
|
|
@@ -20368,6 +20394,20 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
20368
20394
|
* console.log(agent.attributes.name);
|
|
20369
20395
|
*/
|
|
20370
20396
|
get: (id: string, options?: RequestOptions) => Promise<Agent>;
|
|
20397
|
+
/**
|
|
20398
|
+
* Look up an agent by its system_slug. Use this for ISV-provisioned agents
|
|
20399
|
+
* where the slug is a stable identifier that survives database resets.
|
|
20400
|
+
*
|
|
20401
|
+
* @param slug - The system_slug of the agent (e.g., "chartless-session-prep-briefing").
|
|
20402
|
+
* @param options - Optional request options.
|
|
20403
|
+
* @returns The Agent record.
|
|
20404
|
+
*
|
|
20405
|
+
* @example
|
|
20406
|
+
* ```ts
|
|
20407
|
+
* const agent = await client.agents.getBySlug("chartless-session-prep-briefing");
|
|
20408
|
+
* ```
|
|
20409
|
+
*/
|
|
20410
|
+
getBySlug: (slug: string, options?: RequestOptions) => Promise<Agent>;
|
|
20371
20411
|
/**
|
|
20372
20412
|
* Creates a new agent with a blank initial version (v1).
|
|
20373
20413
|
*
|
|
@@ -21268,16 +21308,16 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21268
21308
|
* @param agentId - The UUID of the agent to execute.
|
|
21269
21309
|
* @param input - Input data for the agent (task description, documents, etc.).
|
|
21270
21310
|
* @param opts - Additional execution options.
|
|
21311
|
+
* @param opts.workspace_id - The workspace to execute in. Required for `sk_app_` key auth.
|
|
21271
21312
|
* @param opts.model_id - Override model for this execution only (e.g., "anthropic/claude-sonnet-4").
|
|
21272
21313
|
* Highest priority in the model resolution chain.
|
|
21273
|
-
* @param reqOptions - Optional request options. Use `idempotencyKey` to prevent duplicate executions.
|
|
21274
21314
|
* @returns The created execution record with status `pending`.
|
|
21275
21315
|
*
|
|
21276
21316
|
* @example
|
|
21277
21317
|
* const exec = await client.agents.executions.start('agt_01...', {
|
|
21278
21318
|
* task: 'Extract invoice fields',
|
|
21279
21319
|
* document_id: 'doc_01...',
|
|
21280
|
-
* });
|
|
21320
|
+
* }, { workspace_id: 'ws_abc123' });
|
|
21281
21321
|
* console.log(exec.id, exec.status); // 'pending'
|
|
21282
21322
|
*
|
|
21283
21323
|
* @example
|
|
@@ -21285,10 +21325,11 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21285
21325
|
* const exec = await client.agents.executions.start(
|
|
21286
21326
|
* 'agt_01...',
|
|
21287
21327
|
* { task: 'Complex reasoning' },
|
|
21288
|
-
* { model_id: 'anthropic/claude-sonnet-4' },
|
|
21328
|
+
* { workspace_id: 'ws_abc123', model_id: 'anthropic/claude-sonnet-4' },
|
|
21289
21329
|
* );
|
|
21290
21330
|
*/
|
|
21291
21331
|
start: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
21332
|
+
workspace_id?: string;
|
|
21292
21333
|
model_id?: string;
|
|
21293
21334
|
} & RequestOptions) => Promise<Execution>;
|
|
21294
21335
|
/**
|
|
@@ -21300,16 +21341,19 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21300
21341
|
*
|
|
21301
21342
|
* @param agentId - The UUID of the agent.
|
|
21302
21343
|
* @param input - Input data (same format as {@link start}).
|
|
21303
|
-
* @param
|
|
21344
|
+
* @param opts - Additional options.
|
|
21345
|
+
* @param opts.workspace_id - The workspace to estimate for. Required for `sk_app_` key auth.
|
|
21304
21346
|
* @returns Cost estimate with min/max credit ranges.
|
|
21305
21347
|
*
|
|
21306
21348
|
* @example
|
|
21307
21349
|
* const estimate = await client.agents.executions.estimate('agt_01...', {
|
|
21308
21350
|
* task: 'Process batch',
|
|
21309
|
-
* });
|
|
21351
|
+
* }, { workspace_id: 'ws_abc123' });
|
|
21310
21352
|
* console.log(`Estimated cost: ${estimate.min_credits} - ${estimate.max_credits}`);
|
|
21311
21353
|
*/
|
|
21312
|
-
estimate: (agentId: string, input: Record<string, unknown>,
|
|
21354
|
+
estimate: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
21355
|
+
workspace_id?: string;
|
|
21356
|
+
} & RequestOptions) => Promise<ExecutionEstimateResponse>;
|
|
21313
21357
|
/**
|
|
21314
21358
|
* Fetches a single execution by ID.
|
|
21315
21359
|
*
|
|
@@ -21331,13 +21375,16 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21331
21375
|
* Returns only executions triggered by the authenticated user,
|
|
21332
21376
|
* ordered by creation time descending.
|
|
21333
21377
|
*
|
|
21334
|
-
* @param
|
|
21378
|
+
* @param opts - Optional filtering and request options.
|
|
21379
|
+
* @param opts.workspace_id - Filter to a specific workspace. Required for `sk_app_` key auth.
|
|
21335
21380
|
* @returns Array of execution records.
|
|
21336
21381
|
*
|
|
21337
21382
|
* @example
|
|
21338
|
-
* const executions = await client.agents.executions.list();
|
|
21383
|
+
* const executions = await client.agents.executions.list({ workspace_id: 'ws_abc123' });
|
|
21339
21384
|
*/
|
|
21340
|
-
list: (
|
|
21385
|
+
list: (opts?: {
|
|
21386
|
+
workspace_id?: string;
|
|
21387
|
+
} & RequestOptions) => Promise<Execution[]>;
|
|
21341
21388
|
/**
|
|
21342
21389
|
* Opens an SSE stream for real-time execution events.
|
|
21343
21390
|
*
|
|
@@ -21649,6 +21696,7 @@ interface CreateMealPlanAttributes {
|
|
|
21649
21696
|
plan_content?: string;
|
|
21650
21697
|
patient_notes?: string;
|
|
21651
21698
|
parent_plan_id?: string;
|
|
21699
|
+
metadata?: Record<string, unknown>;
|
|
21652
21700
|
}
|
|
21653
21701
|
interface UpdateMealPlanAttributes {
|
|
21654
21702
|
status?: string;
|
|
@@ -21657,6 +21705,7 @@ interface UpdateMealPlanAttributes {
|
|
|
21657
21705
|
macro_targets?: Record<string, unknown>;
|
|
21658
21706
|
plan_content?: string;
|
|
21659
21707
|
patient_notes?: string;
|
|
21708
|
+
metadata?: Record<string, unknown>;
|
|
21660
21709
|
}
|
|
21661
21710
|
interface CreateClientGoalAttributes {
|
|
21662
21711
|
workspace_id: string;
|
|
@@ -21722,6 +21771,7 @@ interface CreateClientSupplementAttributes {
|
|
|
21722
21771
|
fullscript_variant_id?: string;
|
|
21723
21772
|
prescribed_at?: string;
|
|
21724
21773
|
discontinued_at?: string;
|
|
21774
|
+
metadata?: Record<string, unknown>;
|
|
21725
21775
|
}
|
|
21726
21776
|
interface UpdateClientSupplementAttributes {
|
|
21727
21777
|
status?: string;
|
|
@@ -21735,6 +21785,7 @@ interface UpdateClientSupplementAttributes {
|
|
|
21735
21785
|
fullscript_variant_id?: string;
|
|
21736
21786
|
prescribed_at?: string;
|
|
21737
21787
|
discontinued_at?: string;
|
|
21788
|
+
metadata?: Record<string, unknown>;
|
|
21738
21789
|
}
|
|
21739
21790
|
interface CreateDeliveryAttributes {
|
|
21740
21791
|
workspace_id: string;
|
|
@@ -21757,7 +21808,7 @@ interface CreatePracticeResourceAttributes {
|
|
|
21757
21808
|
workspace_id: string;
|
|
21758
21809
|
title: string;
|
|
21759
21810
|
description?: string;
|
|
21760
|
-
resource_type?: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook";
|
|
21811
|
+
resource_type?: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook" | "other";
|
|
21761
21812
|
storage_key?: string;
|
|
21762
21813
|
url?: string;
|
|
21763
21814
|
tags?: string[];
|
|
@@ -21773,11 +21824,14 @@ interface CreatePracticeResourceAttributes {
|
|
|
21773
21824
|
applicable_conditions?: string[];
|
|
21774
21825
|
related_goal_types?: string[];
|
|
21775
21826
|
icon_url?: string;
|
|
21827
|
+
category?: string;
|
|
21828
|
+
condition_tags?: string[];
|
|
21829
|
+
metadata?: Record<string, unknown>;
|
|
21776
21830
|
}
|
|
21777
21831
|
interface UpdatePracticeResourceAttributes {
|
|
21778
21832
|
title?: string;
|
|
21779
21833
|
description?: string;
|
|
21780
|
-
resource_type?: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook";
|
|
21834
|
+
resource_type?: "article" | "video" | "handout" | "worksheet" | "tool_link" | "infographic" | "audio" | "recipe" | "checklist" | "protocol" | "assessment" | "exercise" | "template" | "presentation" | "ebook" | "other";
|
|
21781
21835
|
storage_key?: string;
|
|
21782
21836
|
url?: string;
|
|
21783
21837
|
tags?: string[];
|
|
@@ -21793,6 +21847,9 @@ interface UpdatePracticeResourceAttributes {
|
|
|
21793
21847
|
applicable_conditions?: string[];
|
|
21794
21848
|
related_goal_types?: string[];
|
|
21795
21849
|
icon_url?: string;
|
|
21850
|
+
category?: string;
|
|
21851
|
+
condition_tags?: string[];
|
|
21852
|
+
metadata?: Record<string, unknown>;
|
|
21796
21853
|
}
|
|
21797
21854
|
interface CreatePracticeToolAttributes {
|
|
21798
21855
|
workspace_id: string;
|
|
@@ -21889,6 +21946,15 @@ interface PatientAdherenceResponse {
|
|
|
21889
21946
|
goals: PatientAdherenceGoals;
|
|
21890
21947
|
health_metrics: PatientAdherenceHealthMetrics;
|
|
21891
21948
|
}
|
|
21949
|
+
/** Item in a batch reorder request. */
|
|
21950
|
+
interface ReorderGoalItem {
|
|
21951
|
+
id: string;
|
|
21952
|
+
position: number;
|
|
21953
|
+
}
|
|
21954
|
+
/** Server response from a batch reorder operation. */
|
|
21955
|
+
interface ReorderGoalsResponse {
|
|
21956
|
+
reordered: number;
|
|
21957
|
+
}
|
|
21892
21958
|
interface CreateGoalTemplateAttributes {
|
|
21893
21959
|
workspace_id: string;
|
|
21894
21960
|
goal_type: string;
|
|
@@ -22481,6 +22547,23 @@ declare function createClinicalNamespace(rb: RequestBuilder): {
|
|
|
22481
22547
|
* @returns `true` on successful deletion
|
|
22482
22548
|
*/
|
|
22483
22549
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
22550
|
+
/**
|
|
22551
|
+
* Batch reorder client goals by updating their positions.
|
|
22552
|
+
*
|
|
22553
|
+
* @param items - Array of `{ id, position }` pairs specifying new order
|
|
22554
|
+
* @param options - Request options
|
|
22555
|
+
* @returns `{ reordered: number }` — count of updated goals
|
|
22556
|
+
*
|
|
22557
|
+
* @example
|
|
22558
|
+
* ```typescript
|
|
22559
|
+
* await client.clinical.clientGoals.reorder([
|
|
22560
|
+
* { id: "goal-uuid-1", position: 0 },
|
|
22561
|
+
* { id: "goal-uuid-2", position: 1 },
|
|
22562
|
+
* { id: "goal-uuid-3", position: 2 },
|
|
22563
|
+
* ]);
|
|
22564
|
+
* ```
|
|
22565
|
+
*/
|
|
22566
|
+
reorder: (items: ReorderGoalItem[], options?: RequestOptions) => Promise<ReorderGoalsResponse>;
|
|
22484
22567
|
};
|
|
22485
22568
|
/**
|
|
22486
22569
|
* Manage supplement prescriptions for clinical patients.
|
|
@@ -23045,6 +23128,7 @@ declare class GptClient extends BaseClient {
|
|
|
23045
23128
|
listAll: (options?: RequestOptions) => Promise<Agent[]>;
|
|
23046
23129
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
23047
23130
|
get: (id: string, options?: RequestOptions) => Promise<Agent>;
|
|
23131
|
+
getBySlug: (slug: string, options?: RequestOptions) => Promise<Agent>;
|
|
23048
23132
|
create: (name: string, attributes?: CreateAgentAttributes, options?: RequestOptions) => Promise<Agent>;
|
|
23049
23133
|
update: (id: string, attributes: UpdateAgentAttributes, options?: RequestOptions) => Promise<Agent>;
|
|
23050
23134
|
test: (id: string, options?: RequestOptions) => Promise<Agent>;
|
|
@@ -23119,11 +23203,16 @@ declare class GptClient extends BaseClient {
|
|
|
23119
23203
|
};
|
|
23120
23204
|
executions: {
|
|
23121
23205
|
start: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
23206
|
+
workspace_id?: string;
|
|
23122
23207
|
model_id?: string;
|
|
23123
23208
|
} & RequestOptions) => Promise<Execution>;
|
|
23124
|
-
estimate: (agentId: string, input: Record<string, unknown>,
|
|
23209
|
+
estimate: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
23210
|
+
workspace_id?: string;
|
|
23211
|
+
} & RequestOptions) => Promise<ExecutionEstimateResponse>;
|
|
23125
23212
|
get: (id: string, options?: RequestOptions) => Promise<Execution>;
|
|
23126
|
-
list: (
|
|
23213
|
+
list: (opts?: {
|
|
23214
|
+
workspace_id?: string;
|
|
23215
|
+
} & RequestOptions) => Promise<Execution[]>;
|
|
23127
23216
|
stream: (id: string, options?: RequestOptions & StreamOptions) => Promise<AsyncIterableIterator<ExecutionEvent>>;
|
|
23128
23217
|
approve: (id: string, approvedData?: Record<string, unknown>, options?: RequestOptions) => Promise<Execution>;
|
|
23129
23218
|
deny: (id: string, reason: string, options?: RequestOptions) => Promise<Execution>;
|
|
@@ -23826,7 +23915,7 @@ declare class GptClient extends BaseClient {
|
|
|
23826
23915
|
text: string;
|
|
23827
23916
|
max_chars: number;
|
|
23828
23917
|
workspace_id: string;
|
|
23829
|
-
platform
|
|
23918
|
+
platform? /** Direct email composition, AI drafting, sender profiles, and tracking */: string;
|
|
23830
23919
|
}, options?: RequestOptions) => Promise<unknown>;
|
|
23831
23920
|
refine: (attributes: {
|
|
23832
23921
|
text: string;
|
|
@@ -23836,7 +23925,7 @@ declare class GptClient extends BaseClient {
|
|
|
23836
23925
|
suggestTopics: (attributes: {
|
|
23837
23926
|
workspace_id: string;
|
|
23838
23927
|
industry?: string;
|
|
23839
|
-
brand_identity_id
|
|
23928
|
+
brand_identity_id?: string;
|
|
23840
23929
|
count?: number;
|
|
23841
23930
|
}, options?: RequestOptions) => Promise<unknown>;
|
|
23842
23931
|
generateImagePrompt: (attributes: {
|