@gpt-platform/client 0.8.4 → 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 +94 -20
- package/dist/index.d.ts +94 -20
- package/dist/index.js +108 -99
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +108 -99
- package/dist/index.mjs.map +1 -1
- 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
|
*/
|
|
@@ -21282,16 +21308,16 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21282
21308
|
* @param agentId - The UUID of the agent to execute.
|
|
21283
21309
|
* @param input - Input data for the agent (task description, documents, etc.).
|
|
21284
21310
|
* @param opts - Additional execution options.
|
|
21311
|
+
* @param opts.workspace_id - The workspace to execute in. Required for `sk_app_` key auth.
|
|
21285
21312
|
* @param opts.model_id - Override model for this execution only (e.g., "anthropic/claude-sonnet-4").
|
|
21286
21313
|
* Highest priority in the model resolution chain.
|
|
21287
|
-
* @param reqOptions - Optional request options. Use `idempotencyKey` to prevent duplicate executions.
|
|
21288
21314
|
* @returns The created execution record with status `pending`.
|
|
21289
21315
|
*
|
|
21290
21316
|
* @example
|
|
21291
21317
|
* const exec = await client.agents.executions.start('agt_01...', {
|
|
21292
21318
|
* task: 'Extract invoice fields',
|
|
21293
21319
|
* document_id: 'doc_01...',
|
|
21294
|
-
* });
|
|
21320
|
+
* }, { workspace_id: 'ws_abc123' });
|
|
21295
21321
|
* console.log(exec.id, exec.status); // 'pending'
|
|
21296
21322
|
*
|
|
21297
21323
|
* @example
|
|
@@ -21299,10 +21325,11 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21299
21325
|
* const exec = await client.agents.executions.start(
|
|
21300
21326
|
* 'agt_01...',
|
|
21301
21327
|
* { task: 'Complex reasoning' },
|
|
21302
|
-
* { model_id: 'anthropic/claude-sonnet-4' },
|
|
21328
|
+
* { workspace_id: 'ws_abc123', model_id: 'anthropic/claude-sonnet-4' },
|
|
21303
21329
|
* );
|
|
21304
21330
|
*/
|
|
21305
21331
|
start: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
21332
|
+
workspace_id?: string;
|
|
21306
21333
|
model_id?: string;
|
|
21307
21334
|
} & RequestOptions) => Promise<Execution>;
|
|
21308
21335
|
/**
|
|
@@ -21314,16 +21341,19 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21314
21341
|
*
|
|
21315
21342
|
* @param agentId - The UUID of the agent.
|
|
21316
21343
|
* @param input - Input data (same format as {@link start}).
|
|
21317
|
-
* @param
|
|
21344
|
+
* @param opts - Additional options.
|
|
21345
|
+
* @param opts.workspace_id - The workspace to estimate for. Required for `sk_app_` key auth.
|
|
21318
21346
|
* @returns Cost estimate with min/max credit ranges.
|
|
21319
21347
|
*
|
|
21320
21348
|
* @example
|
|
21321
21349
|
* const estimate = await client.agents.executions.estimate('agt_01...', {
|
|
21322
21350
|
* task: 'Process batch',
|
|
21323
|
-
* });
|
|
21351
|
+
* }, { workspace_id: 'ws_abc123' });
|
|
21324
21352
|
* console.log(`Estimated cost: ${estimate.min_credits} - ${estimate.max_credits}`);
|
|
21325
21353
|
*/
|
|
21326
|
-
estimate: (agentId: string, input: Record<string, unknown>,
|
|
21354
|
+
estimate: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
21355
|
+
workspace_id?: string;
|
|
21356
|
+
} & RequestOptions) => Promise<ExecutionEstimateResponse>;
|
|
21327
21357
|
/**
|
|
21328
21358
|
* Fetches a single execution by ID.
|
|
21329
21359
|
*
|
|
@@ -21345,13 +21375,16 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21345
21375
|
* Returns only executions triggered by the authenticated user,
|
|
21346
21376
|
* ordered by creation time descending.
|
|
21347
21377
|
*
|
|
21348
|
-
* @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.
|
|
21349
21380
|
* @returns Array of execution records.
|
|
21350
21381
|
*
|
|
21351
21382
|
* @example
|
|
21352
|
-
* const executions = await client.agents.executions.list();
|
|
21383
|
+
* const executions = await client.agents.executions.list({ workspace_id: 'ws_abc123' });
|
|
21353
21384
|
*/
|
|
21354
|
-
list: (
|
|
21385
|
+
list: (opts?: {
|
|
21386
|
+
workspace_id?: string;
|
|
21387
|
+
} & RequestOptions) => Promise<Execution[]>;
|
|
21355
21388
|
/**
|
|
21356
21389
|
* Opens an SSE stream for real-time execution events.
|
|
21357
21390
|
*
|
|
@@ -21663,6 +21696,7 @@ interface CreateMealPlanAttributes {
|
|
|
21663
21696
|
plan_content?: string;
|
|
21664
21697
|
patient_notes?: string;
|
|
21665
21698
|
parent_plan_id?: string;
|
|
21699
|
+
metadata?: Record<string, unknown>;
|
|
21666
21700
|
}
|
|
21667
21701
|
interface UpdateMealPlanAttributes {
|
|
21668
21702
|
status?: string;
|
|
@@ -21671,6 +21705,7 @@ interface UpdateMealPlanAttributes {
|
|
|
21671
21705
|
macro_targets?: Record<string, unknown>;
|
|
21672
21706
|
plan_content?: string;
|
|
21673
21707
|
patient_notes?: string;
|
|
21708
|
+
metadata?: Record<string, unknown>;
|
|
21674
21709
|
}
|
|
21675
21710
|
interface CreateClientGoalAttributes {
|
|
21676
21711
|
workspace_id: string;
|
|
@@ -21736,6 +21771,7 @@ interface CreateClientSupplementAttributes {
|
|
|
21736
21771
|
fullscript_variant_id?: string;
|
|
21737
21772
|
prescribed_at?: string;
|
|
21738
21773
|
discontinued_at?: string;
|
|
21774
|
+
metadata?: Record<string, unknown>;
|
|
21739
21775
|
}
|
|
21740
21776
|
interface UpdateClientSupplementAttributes {
|
|
21741
21777
|
status?: string;
|
|
@@ -21749,6 +21785,7 @@ interface UpdateClientSupplementAttributes {
|
|
|
21749
21785
|
fullscript_variant_id?: string;
|
|
21750
21786
|
prescribed_at?: string;
|
|
21751
21787
|
discontinued_at?: string;
|
|
21788
|
+
metadata?: Record<string, unknown>;
|
|
21752
21789
|
}
|
|
21753
21790
|
interface CreateDeliveryAttributes {
|
|
21754
21791
|
workspace_id: string;
|
|
@@ -21771,7 +21808,7 @@ interface CreatePracticeResourceAttributes {
|
|
|
21771
21808
|
workspace_id: string;
|
|
21772
21809
|
title: string;
|
|
21773
21810
|
description?: string;
|
|
21774
|
-
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";
|
|
21775
21812
|
storage_key?: string;
|
|
21776
21813
|
url?: string;
|
|
21777
21814
|
tags?: string[];
|
|
@@ -21787,11 +21824,14 @@ interface CreatePracticeResourceAttributes {
|
|
|
21787
21824
|
applicable_conditions?: string[];
|
|
21788
21825
|
related_goal_types?: string[];
|
|
21789
21826
|
icon_url?: string;
|
|
21827
|
+
category?: string;
|
|
21828
|
+
condition_tags?: string[];
|
|
21829
|
+
metadata?: Record<string, unknown>;
|
|
21790
21830
|
}
|
|
21791
21831
|
interface UpdatePracticeResourceAttributes {
|
|
21792
21832
|
title?: string;
|
|
21793
21833
|
description?: string;
|
|
21794
|
-
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";
|
|
21795
21835
|
storage_key?: string;
|
|
21796
21836
|
url?: string;
|
|
21797
21837
|
tags?: string[];
|
|
@@ -21807,6 +21847,9 @@ interface UpdatePracticeResourceAttributes {
|
|
|
21807
21847
|
applicable_conditions?: string[];
|
|
21808
21848
|
related_goal_types?: string[];
|
|
21809
21849
|
icon_url?: string;
|
|
21850
|
+
category?: string;
|
|
21851
|
+
condition_tags?: string[];
|
|
21852
|
+
metadata?: Record<string, unknown>;
|
|
21810
21853
|
}
|
|
21811
21854
|
interface CreatePracticeToolAttributes {
|
|
21812
21855
|
workspace_id: string;
|
|
@@ -21903,6 +21946,15 @@ interface PatientAdherenceResponse {
|
|
|
21903
21946
|
goals: PatientAdherenceGoals;
|
|
21904
21947
|
health_metrics: PatientAdherenceHealthMetrics;
|
|
21905
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
|
+
}
|
|
21906
21958
|
interface CreateGoalTemplateAttributes {
|
|
21907
21959
|
workspace_id: string;
|
|
21908
21960
|
goal_type: string;
|
|
@@ -22495,6 +22547,23 @@ declare function createClinicalNamespace(rb: RequestBuilder): {
|
|
|
22495
22547
|
* @returns `true` on successful deletion
|
|
22496
22548
|
*/
|
|
22497
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>;
|
|
22498
22567
|
};
|
|
22499
22568
|
/**
|
|
22500
22569
|
* Manage supplement prescriptions for clinical patients.
|
|
@@ -23134,11 +23203,16 @@ declare class GptClient extends BaseClient {
|
|
|
23134
23203
|
};
|
|
23135
23204
|
executions: {
|
|
23136
23205
|
start: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
23206
|
+
workspace_id?: string;
|
|
23137
23207
|
model_id?: string;
|
|
23138
23208
|
} & RequestOptions) => Promise<Execution>;
|
|
23139
|
-
estimate: (agentId: string, input: Record<string, unknown>,
|
|
23209
|
+
estimate: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
23210
|
+
workspace_id?: string;
|
|
23211
|
+
} & RequestOptions) => Promise<ExecutionEstimateResponse>;
|
|
23140
23212
|
get: (id: string, options?: RequestOptions) => Promise<Execution>;
|
|
23141
|
-
list: (
|
|
23213
|
+
list: (opts?: {
|
|
23214
|
+
workspace_id?: string;
|
|
23215
|
+
} & RequestOptions) => Promise<Execution[]>;
|
|
23142
23216
|
stream: (id: string, options?: RequestOptions & StreamOptions) => Promise<AsyncIterableIterator<ExecutionEvent>>;
|
|
23143
23217
|
approve: (id: string, approvedData?: Record<string, unknown>, options?: RequestOptions) => Promise<Execution>;
|
|
23144
23218
|
deny: (id: string, reason: string, options?: RequestOptions) => Promise<Execution>;
|
|
@@ -23841,7 +23915,7 @@ declare class GptClient extends BaseClient {
|
|
|
23841
23915
|
text: string;
|
|
23842
23916
|
max_chars: number;
|
|
23843
23917
|
workspace_id: string;
|
|
23844
|
-
platform
|
|
23918
|
+
platform? /** Direct email composition, AI drafting, sender profiles, and tracking */: string;
|
|
23845
23919
|
}, options?: RequestOptions) => Promise<unknown>;
|
|
23846
23920
|
refine: (attributes: {
|
|
23847
23921
|
text: string;
|
|
@@ -23851,7 +23925,7 @@ declare class GptClient extends BaseClient {
|
|
|
23851
23925
|
suggestTopics: (attributes: {
|
|
23852
23926
|
workspace_id: string;
|
|
23853
23927
|
industry?: string;
|
|
23854
|
-
brand_identity_id
|
|
23928
|
+
brand_identity_id?: string;
|
|
23855
23929
|
count?: number;
|
|
23856
23930
|
}, options?: RequestOptions) => Promise<unknown>;
|
|
23857
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
|
*/
|
|
@@ -21282,16 +21308,16 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21282
21308
|
* @param agentId - The UUID of the agent to execute.
|
|
21283
21309
|
* @param input - Input data for the agent (task description, documents, etc.).
|
|
21284
21310
|
* @param opts - Additional execution options.
|
|
21311
|
+
* @param opts.workspace_id - The workspace to execute in. Required for `sk_app_` key auth.
|
|
21285
21312
|
* @param opts.model_id - Override model for this execution only (e.g., "anthropic/claude-sonnet-4").
|
|
21286
21313
|
* Highest priority in the model resolution chain.
|
|
21287
|
-
* @param reqOptions - Optional request options. Use `idempotencyKey` to prevent duplicate executions.
|
|
21288
21314
|
* @returns The created execution record with status `pending`.
|
|
21289
21315
|
*
|
|
21290
21316
|
* @example
|
|
21291
21317
|
* const exec = await client.agents.executions.start('agt_01...', {
|
|
21292
21318
|
* task: 'Extract invoice fields',
|
|
21293
21319
|
* document_id: 'doc_01...',
|
|
21294
|
-
* });
|
|
21320
|
+
* }, { workspace_id: 'ws_abc123' });
|
|
21295
21321
|
* console.log(exec.id, exec.status); // 'pending'
|
|
21296
21322
|
*
|
|
21297
21323
|
* @example
|
|
@@ -21299,10 +21325,11 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21299
21325
|
* const exec = await client.agents.executions.start(
|
|
21300
21326
|
* 'agt_01...',
|
|
21301
21327
|
* { task: 'Complex reasoning' },
|
|
21302
|
-
* { model_id: 'anthropic/claude-sonnet-4' },
|
|
21328
|
+
* { workspace_id: 'ws_abc123', model_id: 'anthropic/claude-sonnet-4' },
|
|
21303
21329
|
* );
|
|
21304
21330
|
*/
|
|
21305
21331
|
start: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
21332
|
+
workspace_id?: string;
|
|
21306
21333
|
model_id?: string;
|
|
21307
21334
|
} & RequestOptions) => Promise<Execution>;
|
|
21308
21335
|
/**
|
|
@@ -21314,16 +21341,19 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21314
21341
|
*
|
|
21315
21342
|
* @param agentId - The UUID of the agent.
|
|
21316
21343
|
* @param input - Input data (same format as {@link start}).
|
|
21317
|
-
* @param
|
|
21344
|
+
* @param opts - Additional options.
|
|
21345
|
+
* @param opts.workspace_id - The workspace to estimate for. Required for `sk_app_` key auth.
|
|
21318
21346
|
* @returns Cost estimate with min/max credit ranges.
|
|
21319
21347
|
*
|
|
21320
21348
|
* @example
|
|
21321
21349
|
* const estimate = await client.agents.executions.estimate('agt_01...', {
|
|
21322
21350
|
* task: 'Process batch',
|
|
21323
|
-
* });
|
|
21351
|
+
* }, { workspace_id: 'ws_abc123' });
|
|
21324
21352
|
* console.log(`Estimated cost: ${estimate.min_credits} - ${estimate.max_credits}`);
|
|
21325
21353
|
*/
|
|
21326
|
-
estimate: (agentId: string, input: Record<string, unknown>,
|
|
21354
|
+
estimate: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
21355
|
+
workspace_id?: string;
|
|
21356
|
+
} & RequestOptions) => Promise<ExecutionEstimateResponse>;
|
|
21327
21357
|
/**
|
|
21328
21358
|
* Fetches a single execution by ID.
|
|
21329
21359
|
*
|
|
@@ -21345,13 +21375,16 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
21345
21375
|
* Returns only executions triggered by the authenticated user,
|
|
21346
21376
|
* ordered by creation time descending.
|
|
21347
21377
|
*
|
|
21348
|
-
* @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.
|
|
21349
21380
|
* @returns Array of execution records.
|
|
21350
21381
|
*
|
|
21351
21382
|
* @example
|
|
21352
|
-
* const executions = await client.agents.executions.list();
|
|
21383
|
+
* const executions = await client.agents.executions.list({ workspace_id: 'ws_abc123' });
|
|
21353
21384
|
*/
|
|
21354
|
-
list: (
|
|
21385
|
+
list: (opts?: {
|
|
21386
|
+
workspace_id?: string;
|
|
21387
|
+
} & RequestOptions) => Promise<Execution[]>;
|
|
21355
21388
|
/**
|
|
21356
21389
|
* Opens an SSE stream for real-time execution events.
|
|
21357
21390
|
*
|
|
@@ -21663,6 +21696,7 @@ interface CreateMealPlanAttributes {
|
|
|
21663
21696
|
plan_content?: string;
|
|
21664
21697
|
patient_notes?: string;
|
|
21665
21698
|
parent_plan_id?: string;
|
|
21699
|
+
metadata?: Record<string, unknown>;
|
|
21666
21700
|
}
|
|
21667
21701
|
interface UpdateMealPlanAttributes {
|
|
21668
21702
|
status?: string;
|
|
@@ -21671,6 +21705,7 @@ interface UpdateMealPlanAttributes {
|
|
|
21671
21705
|
macro_targets?: Record<string, unknown>;
|
|
21672
21706
|
plan_content?: string;
|
|
21673
21707
|
patient_notes?: string;
|
|
21708
|
+
metadata?: Record<string, unknown>;
|
|
21674
21709
|
}
|
|
21675
21710
|
interface CreateClientGoalAttributes {
|
|
21676
21711
|
workspace_id: string;
|
|
@@ -21736,6 +21771,7 @@ interface CreateClientSupplementAttributes {
|
|
|
21736
21771
|
fullscript_variant_id?: string;
|
|
21737
21772
|
prescribed_at?: string;
|
|
21738
21773
|
discontinued_at?: string;
|
|
21774
|
+
metadata?: Record<string, unknown>;
|
|
21739
21775
|
}
|
|
21740
21776
|
interface UpdateClientSupplementAttributes {
|
|
21741
21777
|
status?: string;
|
|
@@ -21749,6 +21785,7 @@ interface UpdateClientSupplementAttributes {
|
|
|
21749
21785
|
fullscript_variant_id?: string;
|
|
21750
21786
|
prescribed_at?: string;
|
|
21751
21787
|
discontinued_at?: string;
|
|
21788
|
+
metadata?: Record<string, unknown>;
|
|
21752
21789
|
}
|
|
21753
21790
|
interface CreateDeliveryAttributes {
|
|
21754
21791
|
workspace_id: string;
|
|
@@ -21771,7 +21808,7 @@ interface CreatePracticeResourceAttributes {
|
|
|
21771
21808
|
workspace_id: string;
|
|
21772
21809
|
title: string;
|
|
21773
21810
|
description?: string;
|
|
21774
|
-
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";
|
|
21775
21812
|
storage_key?: string;
|
|
21776
21813
|
url?: string;
|
|
21777
21814
|
tags?: string[];
|
|
@@ -21787,11 +21824,14 @@ interface CreatePracticeResourceAttributes {
|
|
|
21787
21824
|
applicable_conditions?: string[];
|
|
21788
21825
|
related_goal_types?: string[];
|
|
21789
21826
|
icon_url?: string;
|
|
21827
|
+
category?: string;
|
|
21828
|
+
condition_tags?: string[];
|
|
21829
|
+
metadata?: Record<string, unknown>;
|
|
21790
21830
|
}
|
|
21791
21831
|
interface UpdatePracticeResourceAttributes {
|
|
21792
21832
|
title?: string;
|
|
21793
21833
|
description?: string;
|
|
21794
|
-
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";
|
|
21795
21835
|
storage_key?: string;
|
|
21796
21836
|
url?: string;
|
|
21797
21837
|
tags?: string[];
|
|
@@ -21807,6 +21847,9 @@ interface UpdatePracticeResourceAttributes {
|
|
|
21807
21847
|
applicable_conditions?: string[];
|
|
21808
21848
|
related_goal_types?: string[];
|
|
21809
21849
|
icon_url?: string;
|
|
21850
|
+
category?: string;
|
|
21851
|
+
condition_tags?: string[];
|
|
21852
|
+
metadata?: Record<string, unknown>;
|
|
21810
21853
|
}
|
|
21811
21854
|
interface CreatePracticeToolAttributes {
|
|
21812
21855
|
workspace_id: string;
|
|
@@ -21903,6 +21946,15 @@ interface PatientAdherenceResponse {
|
|
|
21903
21946
|
goals: PatientAdherenceGoals;
|
|
21904
21947
|
health_metrics: PatientAdherenceHealthMetrics;
|
|
21905
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
|
+
}
|
|
21906
21958
|
interface CreateGoalTemplateAttributes {
|
|
21907
21959
|
workspace_id: string;
|
|
21908
21960
|
goal_type: string;
|
|
@@ -22495,6 +22547,23 @@ declare function createClinicalNamespace(rb: RequestBuilder): {
|
|
|
22495
22547
|
* @returns `true` on successful deletion
|
|
22496
22548
|
*/
|
|
22497
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>;
|
|
22498
22567
|
};
|
|
22499
22568
|
/**
|
|
22500
22569
|
* Manage supplement prescriptions for clinical patients.
|
|
@@ -23134,11 +23203,16 @@ declare class GptClient extends BaseClient {
|
|
|
23134
23203
|
};
|
|
23135
23204
|
executions: {
|
|
23136
23205
|
start: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
23206
|
+
workspace_id?: string;
|
|
23137
23207
|
model_id?: string;
|
|
23138
23208
|
} & RequestOptions) => Promise<Execution>;
|
|
23139
|
-
estimate: (agentId: string, input: Record<string, unknown>,
|
|
23209
|
+
estimate: (agentId: string, input: Record<string, unknown>, opts?: {
|
|
23210
|
+
workspace_id?: string;
|
|
23211
|
+
} & RequestOptions) => Promise<ExecutionEstimateResponse>;
|
|
23140
23212
|
get: (id: string, options?: RequestOptions) => Promise<Execution>;
|
|
23141
|
-
list: (
|
|
23213
|
+
list: (opts?: {
|
|
23214
|
+
workspace_id?: string;
|
|
23215
|
+
} & RequestOptions) => Promise<Execution[]>;
|
|
23142
23216
|
stream: (id: string, options?: RequestOptions & StreamOptions) => Promise<AsyncIterableIterator<ExecutionEvent>>;
|
|
23143
23217
|
approve: (id: string, approvedData?: Record<string, unknown>, options?: RequestOptions) => Promise<Execution>;
|
|
23144
23218
|
deny: (id: string, reason: string, options?: RequestOptions) => Promise<Execution>;
|
|
@@ -23841,7 +23915,7 @@ declare class GptClient extends BaseClient {
|
|
|
23841
23915
|
text: string;
|
|
23842
23916
|
max_chars: number;
|
|
23843
23917
|
workspace_id: string;
|
|
23844
|
-
platform
|
|
23918
|
+
platform? /** Direct email composition, AI drafting, sender profiles, and tracking */: string;
|
|
23845
23919
|
}, options?: RequestOptions) => Promise<unknown>;
|
|
23846
23920
|
refine: (attributes: {
|
|
23847
23921
|
text: string;
|
|
@@ -23851,7 +23925,7 @@ declare class GptClient extends BaseClient {
|
|
|
23851
23925
|
suggestTopics: (attributes: {
|
|
23852
23926
|
workspace_id: string;
|
|
23853
23927
|
industry?: string;
|
|
23854
|
-
brand_identity_id
|
|
23928
|
+
brand_identity_id?: string;
|
|
23855
23929
|
count?: number;
|
|
23856
23930
|
}, options?: RequestOptions) => Promise<unknown>;
|
|
23857
23931
|
generateImagePrompt: (attributes: {
|