@gpt-platform/client 0.7.1 → 0.7.3
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 +787 -37
- package/dist/index.d.ts +787 -37
- package/dist/index.js +1010 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1010 -53
- package/dist/index.mjs.map +1 -1
- package/llms.txt +115 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -606,7 +606,7 @@ 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.7.
|
|
609
|
+
declare const SDK_VERSION = "0.7.3";
|
|
610
610
|
/** Default API version sent in every request — updated automatically by mix update.sdks */
|
|
611
611
|
declare const DEFAULT_API_VERSION = "2026-03-11";
|
|
612
612
|
|
|
@@ -1101,6 +1101,74 @@ type CrawlerResult = {
|
|
|
1101
1101
|
};
|
|
1102
1102
|
type: string;
|
|
1103
1103
|
};
|
|
1104
|
+
/**
|
|
1105
|
+
* A "Resource object" representing a brand_identity
|
|
1106
|
+
*/
|
|
1107
|
+
type BrandIdentity = {
|
|
1108
|
+
/**
|
|
1109
|
+
* An attributes object for a brand_identity
|
|
1110
|
+
*/
|
|
1111
|
+
attributes?: {
|
|
1112
|
+
/**
|
|
1113
|
+
* Field included by default.
|
|
1114
|
+
*/
|
|
1115
|
+
color_palette: {
|
|
1116
|
+
[key: string]: unknown;
|
|
1117
|
+
};
|
|
1118
|
+
/**
|
|
1119
|
+
* Field included by default.
|
|
1120
|
+
*/
|
|
1121
|
+
description?: string | null | unknown;
|
|
1122
|
+
/**
|
|
1123
|
+
* Field included by default.
|
|
1124
|
+
*/
|
|
1125
|
+
industry?: string | null | unknown;
|
|
1126
|
+
/**
|
|
1127
|
+
* Field included by default.
|
|
1128
|
+
*/
|
|
1129
|
+
is_default: boolean;
|
|
1130
|
+
/**
|
|
1131
|
+
* Field included by default.
|
|
1132
|
+
*/
|
|
1133
|
+
logo_url?: string | null | unknown;
|
|
1134
|
+
/**
|
|
1135
|
+
* Field included by default.
|
|
1136
|
+
*/
|
|
1137
|
+
name: string;
|
|
1138
|
+
/**
|
|
1139
|
+
* Field included by default.
|
|
1140
|
+
*/
|
|
1141
|
+
target_audience?: string | null | unknown;
|
|
1142
|
+
/**
|
|
1143
|
+
* Field included by default.
|
|
1144
|
+
*/
|
|
1145
|
+
tenant_id: string;
|
|
1146
|
+
/**
|
|
1147
|
+
* Field included by default.
|
|
1148
|
+
*/
|
|
1149
|
+
values: Array<string>;
|
|
1150
|
+
/**
|
|
1151
|
+
* Brand voice description (e.g., 'Professional but approachable'). Field included by default.
|
|
1152
|
+
*/
|
|
1153
|
+
voice?: string | null | unknown;
|
|
1154
|
+
/**
|
|
1155
|
+
* Field included by default.
|
|
1156
|
+
*/
|
|
1157
|
+
website_url?: string | null | unknown;
|
|
1158
|
+
/**
|
|
1159
|
+
* Field included by default.
|
|
1160
|
+
*/
|
|
1161
|
+
workspace_id?: string | null | unknown;
|
|
1162
|
+
};
|
|
1163
|
+
id: string;
|
|
1164
|
+
/**
|
|
1165
|
+
* A relationships object for a brand_identity
|
|
1166
|
+
*/
|
|
1167
|
+
relationships?: {
|
|
1168
|
+
[key: string]: never;
|
|
1169
|
+
};
|
|
1170
|
+
type: string;
|
|
1171
|
+
};
|
|
1104
1172
|
/**
|
|
1105
1173
|
* A "Resource object" representing a scheduling_participant
|
|
1106
1174
|
*/
|
|
@@ -1497,10 +1565,32 @@ type Message = {
|
|
|
1497
1565
|
* An attributes object for a message
|
|
1498
1566
|
*/
|
|
1499
1567
|
attributes?: {
|
|
1568
|
+
/**
|
|
1569
|
+
* Field included by default.
|
|
1570
|
+
*/
|
|
1571
|
+
content: string;
|
|
1572
|
+
/**
|
|
1573
|
+
* Field included by default.
|
|
1574
|
+
*/
|
|
1575
|
+
created_at: unknown;
|
|
1576
|
+
/**
|
|
1577
|
+
* Field included by default.
|
|
1578
|
+
*/
|
|
1579
|
+
metadata?: {
|
|
1580
|
+
[key: string]: unknown;
|
|
1581
|
+
} | null | unknown;
|
|
1582
|
+
/**
|
|
1583
|
+
* Field included by default.
|
|
1584
|
+
*/
|
|
1585
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
1500
1586
|
/**
|
|
1501
1587
|
* Field included by default.
|
|
1502
1588
|
*/
|
|
1503
1589
|
thread_id: string;
|
|
1590
|
+
/**
|
|
1591
|
+
* Field included by default.
|
|
1592
|
+
*/
|
|
1593
|
+
updated_at: unknown;
|
|
1504
1594
|
};
|
|
1505
1595
|
id: string;
|
|
1506
1596
|
/**
|
|
@@ -2377,6 +2467,56 @@ type CrmActivity = {
|
|
|
2377
2467
|
};
|
|
2378
2468
|
type: string;
|
|
2379
2469
|
};
|
|
2470
|
+
/**
|
|
2471
|
+
* A "Resource object" representing a platform_tone
|
|
2472
|
+
*/
|
|
2473
|
+
type PlatformTone = {
|
|
2474
|
+
/**
|
|
2475
|
+
* An attributes object for a platform_tone
|
|
2476
|
+
*/
|
|
2477
|
+
attributes?: {
|
|
2478
|
+
/**
|
|
2479
|
+
* Field included by default.
|
|
2480
|
+
*/
|
|
2481
|
+
brand_identity_id: string;
|
|
2482
|
+
/**
|
|
2483
|
+
* Field included by default.
|
|
2484
|
+
*/
|
|
2485
|
+
call_to_action?: string | null | unknown;
|
|
2486
|
+
/**
|
|
2487
|
+
* Field included by default.
|
|
2488
|
+
*/
|
|
2489
|
+
custom_instructions?: string | null | unknown;
|
|
2490
|
+
/**
|
|
2491
|
+
* Field included by default.
|
|
2492
|
+
*/
|
|
2493
|
+
emoji_policy: "none" | "minimal" | "moderate" | "heavy";
|
|
2494
|
+
/**
|
|
2495
|
+
* Field included by default.
|
|
2496
|
+
*/
|
|
2497
|
+
hashtag_count: number;
|
|
2498
|
+
/**
|
|
2499
|
+
* Field included by default.
|
|
2500
|
+
*/
|
|
2501
|
+
max_length?: number | null | unknown;
|
|
2502
|
+
/**
|
|
2503
|
+
* Field included by default.
|
|
2504
|
+
*/
|
|
2505
|
+
platform: "facebook" | "instagram" | "threads" | "twitter" | "linkedin" | "reddit" | "bluesky";
|
|
2506
|
+
/**
|
|
2507
|
+
* Field included by default.
|
|
2508
|
+
*/
|
|
2509
|
+
tone: "casual" | "professional" | "humorous" | "inspirational" | "educational" | "promotional";
|
|
2510
|
+
};
|
|
2511
|
+
id: string;
|
|
2512
|
+
/**
|
|
2513
|
+
* A relationships object for a platform_tone
|
|
2514
|
+
*/
|
|
2515
|
+
relationships?: {
|
|
2516
|
+
[key: string]: never;
|
|
2517
|
+
};
|
|
2518
|
+
type: string;
|
|
2519
|
+
};
|
|
2380
2520
|
/**
|
|
2381
2521
|
* A "Resource object" representing a crm_contact
|
|
2382
2522
|
*/
|
|
@@ -4622,7 +4762,19 @@ type Tenant = {
|
|
|
4622
4762
|
* Field included by default.
|
|
4623
4763
|
*/
|
|
4624
4764
|
badge_url?: string | null | unknown;
|
|
4765
|
+
/**
|
|
4766
|
+
* Field included by default.
|
|
4767
|
+
*/
|
|
4768
|
+
contact_email?: string | null | unknown;
|
|
4769
|
+
/**
|
|
4770
|
+
* Field included by default.
|
|
4771
|
+
*/
|
|
4772
|
+
contact_phone?: string | null | unknown;
|
|
4625
4773
|
credit_balance?: number | null | unknown;
|
|
4774
|
+
/**
|
|
4775
|
+
* Field included by default.
|
|
4776
|
+
*/
|
|
4777
|
+
description?: string | null | unknown;
|
|
4626
4778
|
/**
|
|
4627
4779
|
* Field included by default.
|
|
4628
4780
|
*/
|
|
@@ -4660,7 +4812,7 @@ type Tenant = {
|
|
|
4660
4812
|
/**
|
|
4661
4813
|
* Lifecycle status of the tenant. Field included by default.
|
|
4662
4814
|
*/
|
|
4663
|
-
status: "active" | "suspended" | "cancelled";
|
|
4815
|
+
status: "active" | "suspended" | "cancelled" | "archived";
|
|
4664
4816
|
storage_quota_bytes?: number | null | unknown;
|
|
4665
4817
|
/**
|
|
4666
4818
|
* Tenant-set overage ceiling in bytes. nil = use plan max. Field included by default.
|
|
@@ -8052,10 +8204,6 @@ type Workspace = {
|
|
|
8052
8204
|
* Field included by default.
|
|
8053
8205
|
*/
|
|
8054
8206
|
name: string;
|
|
8055
|
-
/**
|
|
8056
|
-
* True when all documents have file_hash populated
|
|
8057
|
-
*/
|
|
8058
|
-
ready_for_deduplication?: boolean | null | unknown;
|
|
8059
8207
|
/**
|
|
8060
8208
|
* Field included by default.
|
|
8061
8209
|
*/
|
|
@@ -12072,33 +12220,75 @@ declare function createSchedulingNamespace(rb: RequestBuilder): {
|
|
|
12072
12220
|
/** Attributes accepted when updating a workspace (PATCH semantics). */
|
|
12073
12221
|
type UpdateWorkspaceAttributes = {
|
|
12074
12222
|
name?: string;
|
|
12223
|
+
slug?: string;
|
|
12224
|
+
description?: string;
|
|
12225
|
+
deduplicate_uploads?: boolean;
|
|
12075
12226
|
[key: string]: unknown;
|
|
12076
12227
|
};
|
|
12077
12228
|
/** Attributes accepted when creating an application. */
|
|
12078
12229
|
type CreateApplicationAttributes = {
|
|
12079
12230
|
name: string;
|
|
12231
|
+
owner_id?: string;
|
|
12232
|
+
slug?: string;
|
|
12233
|
+
base_url?: string;
|
|
12234
|
+
workspace_mode?: "single" | "multi";
|
|
12235
|
+
enabled_capabilities?: string[];
|
|
12236
|
+
allow_org_creation?: boolean;
|
|
12237
|
+
invitation_mode?: "open" | "admin_only";
|
|
12238
|
+
max_parallel_tools_global?: number;
|
|
12080
12239
|
[key: string]: unknown;
|
|
12081
12240
|
};
|
|
12082
12241
|
/** Attributes accepted when updating an application (PATCH semantics). */
|
|
12083
12242
|
type UpdateApplicationAttributes = {
|
|
12084
12243
|
name?: string;
|
|
12244
|
+
slug?: string;
|
|
12245
|
+
base_url?: string;
|
|
12246
|
+
workspace_mode?: "single" | "multi";
|
|
12247
|
+
enabled_capabilities?: string[];
|
|
12248
|
+
allow_org_creation?: boolean;
|
|
12249
|
+
invitation_mode?: "open" | "admin_only";
|
|
12250
|
+
max_parallel_tools_global?: number;
|
|
12085
12251
|
[key: string]: unknown;
|
|
12086
12252
|
};
|
|
12087
12253
|
/** Attributes accepted when creating a tenant. */
|
|
12088
12254
|
type CreateTenantAttributes = {
|
|
12089
12255
|
name: string;
|
|
12256
|
+
slug?: string;
|
|
12257
|
+
owner_id?: string;
|
|
12090
12258
|
application_id?: string;
|
|
12259
|
+
kind?: string;
|
|
12260
|
+
logo_url?: string;
|
|
12261
|
+
badge_url?: string;
|
|
12262
|
+
plan_tier?: string;
|
|
12263
|
+
is_personal?: boolean;
|
|
12264
|
+
vanity_slug?: string;
|
|
12265
|
+
description?: string;
|
|
12266
|
+
contact_email?: string;
|
|
12267
|
+
contact_phone?: string;
|
|
12091
12268
|
[key: string]: unknown;
|
|
12092
12269
|
};
|
|
12093
12270
|
/** Attributes accepted when updating a tenant (PATCH semantics). */
|
|
12094
12271
|
type UpdateTenantAttributes = {
|
|
12095
12272
|
name?: string;
|
|
12273
|
+
slug?: string;
|
|
12274
|
+
logo_url?: string;
|
|
12275
|
+
badge_url?: string;
|
|
12276
|
+
vanity_slug?: string;
|
|
12277
|
+
plan_tier?: string;
|
|
12278
|
+
description?: string;
|
|
12279
|
+
contact_email?: string;
|
|
12280
|
+
contact_phone?: string;
|
|
12096
12281
|
[key: string]: unknown;
|
|
12097
12282
|
};
|
|
12098
12283
|
/** Attributes accepted when creating an invitation. */
|
|
12099
12284
|
type CreateInvitationAttributes = {
|
|
12100
12285
|
email: string;
|
|
12101
|
-
|
|
12286
|
+
scope_type: "tenant" | "workspace";
|
|
12287
|
+
scope_id: string;
|
|
12288
|
+
role: "admin" | "member" | "editor" | "viewer";
|
|
12289
|
+
custom_message?: string;
|
|
12290
|
+
permissions?: string[];
|
|
12291
|
+
application_id?: string;
|
|
12102
12292
|
[key: string]: unknown;
|
|
12103
12293
|
};
|
|
12104
12294
|
/** Attributes accepted when creating a config entry. */
|
|
@@ -12112,6 +12302,36 @@ type UpdateConfigAttributes = {
|
|
|
12112
12302
|
value?: unknown;
|
|
12113
12303
|
[key: string]: unknown;
|
|
12114
12304
|
};
|
|
12305
|
+
/** Attributes accepted when creating a brand identity. */
|
|
12306
|
+
type CreateBrandIdentityAttributes = {
|
|
12307
|
+
name: string;
|
|
12308
|
+
workspace_id?: string;
|
|
12309
|
+
tenant_id?: string;
|
|
12310
|
+
logo_url?: string;
|
|
12311
|
+
icon_url?: string;
|
|
12312
|
+
primary_color?: string;
|
|
12313
|
+
secondary_color?: string;
|
|
12314
|
+
accent_color?: string;
|
|
12315
|
+
font_family?: string;
|
|
12316
|
+
tagline?: string;
|
|
12317
|
+
description?: string;
|
|
12318
|
+
[key: string]: unknown;
|
|
12319
|
+
};
|
|
12320
|
+
/** Attributes accepted when updating a brand identity (PATCH semantics). */
|
|
12321
|
+
type UpdateBrandIdentityAttributes = Partial<Omit<CreateBrandIdentityAttributes, "workspace_id" | "tenant_id">>;
|
|
12322
|
+
/** Attributes accepted when creating a platform tone. */
|
|
12323
|
+
type CreatePlatformToneAttributes = {
|
|
12324
|
+
name: string;
|
|
12325
|
+
brand_identity_id: string;
|
|
12326
|
+
tone_style?: string;
|
|
12327
|
+
formality_level?: string;
|
|
12328
|
+
vocabulary_preferences?: string;
|
|
12329
|
+
communication_guidelines?: string;
|
|
12330
|
+
example_phrases?: string[];
|
|
12331
|
+
[key: string]: unknown;
|
|
12332
|
+
};
|
|
12333
|
+
/** Attributes accepted when updating a platform tone (PATCH semantics). */
|
|
12334
|
+
type UpdatePlatformToneAttributes = Partial<Omit<CreatePlatformToneAttributes, "brand_identity_id">>;
|
|
12115
12335
|
|
|
12116
12336
|
/**
|
|
12117
12337
|
* Creates the platform namespace providing access to workspace management,
|
|
@@ -12303,6 +12523,18 @@ declare function createPlatformNamespace(rb: RequestBuilder): {
|
|
|
12303
12523
|
* ```
|
|
12304
12524
|
*/
|
|
12305
12525
|
update: (id: string, attributes: UpdateWorkspaceAttributes, options?: RequestOptions) => Promise<Workspace>;
|
|
12526
|
+
/**
|
|
12527
|
+
* Update storage-specific settings for a workspace.
|
|
12528
|
+
*
|
|
12529
|
+
* Updates the embedded storage settings (e.g., deduplication,
|
|
12530
|
+
* upload limits) without touching other workspace attributes.
|
|
12531
|
+
*
|
|
12532
|
+
* @param id - The UUID of the workspace.
|
|
12533
|
+
* @param settings - Storage settings to update.
|
|
12534
|
+
* @param options - Optional request options.
|
|
12535
|
+
* @returns The updated `Workspace`.
|
|
12536
|
+
*/
|
|
12537
|
+
updateStorageSettings: (id: string, settings: Record<string, unknown>, options?: RequestOptions) => Promise<Workspace>;
|
|
12306
12538
|
/**
|
|
12307
12539
|
* Allocate credits to a workspace.
|
|
12308
12540
|
*
|
|
@@ -12311,17 +12543,36 @@ declare function createPlatformNamespace(rb: RequestBuilder): {
|
|
|
12311
12543
|
* reflects the updated credit balance.
|
|
12312
12544
|
*
|
|
12313
12545
|
* @param workspaceId - The UUID of the workspace to allocate credits for.
|
|
12546
|
+
* @param amount - Number of credits to allocate (max 100,000 per call).
|
|
12547
|
+
* @param options - Optional request options.
|
|
12548
|
+
* @returns The updated `Workspace` after allocation.
|
|
12549
|
+
*
|
|
12550
|
+
* @example
|
|
12551
|
+
* ```typescript
|
|
12552
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
12553
|
+
* const workspace = await client.platform.workspaces.allocateCredits('ws_abc123', 5000);
|
|
12554
|
+
* ```
|
|
12555
|
+
*/
|
|
12556
|
+
allocateCredits: (workspaceId: string, amount: number, options?: RequestOptions) => Promise<Workspace>;
|
|
12557
|
+
/**
|
|
12558
|
+
* Populate content hashes for all documents in a workspace.
|
|
12559
|
+
*
|
|
12560
|
+
* Triggers a backfill operation that computes and stores content
|
|
12561
|
+
* hashes for documents that were created before hash-on-upload
|
|
12562
|
+
* was enabled. This is an idempotent operation — documents that
|
|
12563
|
+
* already have hashes are skipped.
|
|
12564
|
+
*
|
|
12565
|
+
* @param workspaceId - The UUID of the workspace to populate hashes for.
|
|
12314
12566
|
* @param options - Optional request options.
|
|
12315
|
-
* @returns The updated `Workspace
|
|
12567
|
+
* @returns The updated `Workspace`.
|
|
12316
12568
|
*
|
|
12317
12569
|
* @example
|
|
12318
12570
|
* ```typescript
|
|
12319
12571
|
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
12320
|
-
* const workspace = await client.platform.workspaces.
|
|
12321
|
-
* console.log(workspace.attributes?.credit_balance);
|
|
12572
|
+
* const workspace = await client.platform.workspaces.populateHashes('ws_abc123');
|
|
12322
12573
|
* ```
|
|
12323
12574
|
*/
|
|
12324
|
-
|
|
12575
|
+
populateHashes: (workspaceId: string, options?: RequestOptions) => Promise<Workspace>;
|
|
12325
12576
|
};
|
|
12326
12577
|
/**
|
|
12327
12578
|
* Applications — ISV application management.
|
|
@@ -12475,6 +12726,25 @@ declare function createPlatformNamespace(rb: RequestBuilder): {
|
|
|
12475
12726
|
* ```
|
|
12476
12727
|
*/
|
|
12477
12728
|
readCurrent: (options?: RequestOptions) => Promise<Application>;
|
|
12729
|
+
/**
|
|
12730
|
+
* Fetch an application by its unique slug.
|
|
12731
|
+
*
|
|
12732
|
+
* Looks up an application using its URL-friendly slug identifier
|
|
12733
|
+
* rather than its UUID. Useful for public-facing flows where the
|
|
12734
|
+
* slug is known (e.g., from a vanity URL).
|
|
12735
|
+
*
|
|
12736
|
+
* @param slug - The application slug (e.g., `"my-saas-app"`).
|
|
12737
|
+
* @param options - Optional request options.
|
|
12738
|
+
* @returns The matching `Application`.
|
|
12739
|
+
*
|
|
12740
|
+
* @example
|
|
12741
|
+
* ```typescript
|
|
12742
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
12743
|
+
* const app = await client.platform.applications.getBySlug('my-saas-app');
|
|
12744
|
+
* console.log(app.attributes?.name);
|
|
12745
|
+
* ```
|
|
12746
|
+
*/
|
|
12747
|
+
getBySlug: (slug: string, options?: RequestOptions) => Promise<Application>;
|
|
12478
12748
|
};
|
|
12479
12749
|
/**
|
|
12480
12750
|
* Tenants — customer organization management.
|
|
@@ -12632,7 +12902,6 @@ declare function createPlatformNamespace(rb: RequestBuilder): {
|
|
|
12632
12902
|
* ```
|
|
12633
12903
|
*/
|
|
12634
12904
|
schedulePurge: (id: string, options?: RequestOptions) => Promise<Tenant>;
|
|
12635
|
-
/**
|
|
12636
12905
|
/**
|
|
12637
12906
|
* Retrieve a single tenant by its ID.
|
|
12638
12907
|
*
|
|
@@ -12660,6 +12929,56 @@ declare function createPlatformNamespace(rb: RequestBuilder): {
|
|
|
12660
12929
|
* @returns The updated `Tenant`.
|
|
12661
12930
|
*/
|
|
12662
12931
|
transferOwnership: (tenantId: string, newOwnerId: string, options?: RequestOptions) => Promise<Tenant>;
|
|
12932
|
+
/**
|
|
12933
|
+
* Convert a personal tenant to an organization.
|
|
12934
|
+
*
|
|
12935
|
+
* Flips `is_personal` to `false`, sets a new name and slug, and
|
|
12936
|
+
* provisions a default workspace if `application_id` is provided.
|
|
12937
|
+
* Only the tenant owner can perform this action.
|
|
12938
|
+
*
|
|
12939
|
+
* @param tenantId - The UUID of the personal tenant to convert.
|
|
12940
|
+
* @param attributes - Conversion attributes. `name` is required; `slug` and `application_id` are optional.
|
|
12941
|
+
* @param options - Optional request options.
|
|
12942
|
+
* @returns The converted `Tenant`.
|
|
12943
|
+
*
|
|
12944
|
+
* @example
|
|
12945
|
+
* ```typescript
|
|
12946
|
+
* const org = await client.platform.tenants.convertToOrg(tenantId, {
|
|
12947
|
+
* name: "My Company",
|
|
12948
|
+
* });
|
|
12949
|
+
* console.log(org.is_personal); // false
|
|
12950
|
+
* ```
|
|
12951
|
+
*/
|
|
12952
|
+
convertToOrg: (tenantId: string, attributes: {
|
|
12953
|
+
name: string;
|
|
12954
|
+
slug?: string;
|
|
12955
|
+
application_id?: string;
|
|
12956
|
+
}, options?: RequestOptions) => Promise<Tenant>;
|
|
12957
|
+
/**
|
|
12958
|
+
* Create a new organization tenant.
|
|
12959
|
+
*
|
|
12960
|
+
* Requires the application to have `allow_org_creation` enabled.
|
|
12961
|
+
* Provisions a workspace, billing accounts, and storage for the new org.
|
|
12962
|
+
*
|
|
12963
|
+
* @param attributes - Org creation attributes. `name` is required.
|
|
12964
|
+
* @param options - Optional request options.
|
|
12965
|
+
* @returns The newly created organization `Tenant`.
|
|
12966
|
+
*/
|
|
12967
|
+
createOrg: (attributes: {
|
|
12968
|
+
name: string;
|
|
12969
|
+
logo_url?: string;
|
|
12970
|
+
[key: string]: unknown;
|
|
12971
|
+
}, options?: RequestOptions) => Promise<Tenant>;
|
|
12972
|
+
/**
|
|
12973
|
+
* Create a personal tenant for the current user.
|
|
12974
|
+
*
|
|
12975
|
+
* Each user may have at most one personal tenant. Name and slug are
|
|
12976
|
+
* auto-generated from the user's email.
|
|
12977
|
+
*
|
|
12978
|
+
* @param options - Optional request options.
|
|
12979
|
+
* @returns The newly created personal `Tenant`.
|
|
12980
|
+
*/
|
|
12981
|
+
createPersonal: (options?: RequestOptions) => Promise<Tenant>;
|
|
12663
12982
|
};
|
|
12664
12983
|
/**
|
|
12665
12984
|
* Invitations — workspace and application invitations for the current user.
|
|
@@ -12675,7 +12994,7 @@ declare function createPlatformNamespace(rb: RequestBuilder): {
|
|
|
12675
12994
|
* @param options - Optional request options.
|
|
12676
12995
|
* @returns The updated `Invitation`.
|
|
12677
12996
|
*/
|
|
12678
|
-
accept: (id: string, options?: RequestOptions) => Promise<Invitation>;
|
|
12997
|
+
accept: (id: string, token: string, options?: RequestOptions) => Promise<Invitation>;
|
|
12679
12998
|
/**
|
|
12680
12999
|
* Decline a pending invitation.
|
|
12681
13000
|
*
|
|
@@ -12754,7 +13073,6 @@ declare function createPlatformNamespace(rb: RequestBuilder): {
|
|
|
12754
13073
|
* ```
|
|
12755
13074
|
*/
|
|
12756
13075
|
create: (attributes: CreateInvitationAttributes, options?: RequestOptions) => Promise<Invitation>;
|
|
12757
|
-
/**
|
|
12758
13076
|
/**
|
|
12759
13077
|
* Resend an invitation email with a refreshed token and new 7-day expiry.
|
|
12760
13078
|
*
|
|
@@ -13019,6 +13337,333 @@ declare function createPlatformNamespace(rb: RequestBuilder): {
|
|
|
13019
13337
|
}>;
|
|
13020
13338
|
};
|
|
13021
13339
|
};
|
|
13340
|
+
/**
|
|
13341
|
+
* Brand Identities — visual branding configuration for tenants and workspaces.
|
|
13342
|
+
*
|
|
13343
|
+
* Brand identities define the visual appearance (colors, logos, fonts) applied
|
|
13344
|
+
* to tenant or workspace experiences. Each brand identity can be scoped to a
|
|
13345
|
+
* tenant or workspace, and one can be marked as the default at each scope level.
|
|
13346
|
+
*
|
|
13347
|
+
* Access via `client.platform.brandIdentities`.
|
|
13348
|
+
*/
|
|
13349
|
+
brandIdentities: {
|
|
13350
|
+
/**
|
|
13351
|
+
* List all brand identities accessible to the current actor.
|
|
13352
|
+
*
|
|
13353
|
+
* @param options - Optional page number, page size, and request options.
|
|
13354
|
+
* @returns A page of `BrandIdentity` records.
|
|
13355
|
+
*
|
|
13356
|
+
* @example
|
|
13357
|
+
* ```typescript
|
|
13358
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13359
|
+
* const brands = await client.platform.brandIdentities.list();
|
|
13360
|
+
* brands.forEach(b => console.log(b.attributes?.name));
|
|
13361
|
+
* ```
|
|
13362
|
+
*/
|
|
13363
|
+
list: (options?: {
|
|
13364
|
+
page?: number;
|
|
13365
|
+
pageSize?: number;
|
|
13366
|
+
} & RequestOptions) => Promise<BrandIdentity[]>;
|
|
13367
|
+
/**
|
|
13368
|
+
* Retrieve a single brand identity by its ID.
|
|
13369
|
+
*
|
|
13370
|
+
* @param id - The UUID of the brand identity.
|
|
13371
|
+
* @param options - Optional request options.
|
|
13372
|
+
* @returns The matching `BrandIdentity`.
|
|
13373
|
+
*
|
|
13374
|
+
* @example
|
|
13375
|
+
* ```typescript
|
|
13376
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13377
|
+
* const brand = await client.platform.brandIdentities.get('bi_abc123');
|
|
13378
|
+
* console.log(brand.attributes?.name, brand.attributes?.primary_color);
|
|
13379
|
+
* ```
|
|
13380
|
+
*/
|
|
13381
|
+
get: (id: string, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
13382
|
+
/**
|
|
13383
|
+
* Create a new brand identity.
|
|
13384
|
+
*
|
|
13385
|
+
* Defines visual branding (colors, logos, fonts) scoped to a tenant or
|
|
13386
|
+
* workspace. Pass `tenant_id` or `workspace_id` to set the scope.
|
|
13387
|
+
*
|
|
13388
|
+
* @param attributes - Brand identity creation attributes. `name` is required.
|
|
13389
|
+
* @param options - Optional request options.
|
|
13390
|
+
* @returns The newly created `BrandIdentity`.
|
|
13391
|
+
*
|
|
13392
|
+
* @example
|
|
13393
|
+
* ```typescript
|
|
13394
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13395
|
+
* const brand = await client.platform.brandIdentities.create({
|
|
13396
|
+
* name: 'Acme Healthcare',
|
|
13397
|
+
* primary_color: '#2563eb',
|
|
13398
|
+
* font_family: 'Inter',
|
|
13399
|
+
* tenant_id: 'tenant_abc123',
|
|
13400
|
+
* });
|
|
13401
|
+
* console.log(brand.id);
|
|
13402
|
+
* ```
|
|
13403
|
+
*/
|
|
13404
|
+
create: (attributes: CreateBrandIdentityAttributes, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
13405
|
+
/**
|
|
13406
|
+
* Update a brand identity's attributes.
|
|
13407
|
+
*
|
|
13408
|
+
* @param id - The UUID of the brand identity to update.
|
|
13409
|
+
* @param attributes - Attribute map of fields to change.
|
|
13410
|
+
* @param options - Optional request options.
|
|
13411
|
+
* @returns The updated `BrandIdentity`.
|
|
13412
|
+
*
|
|
13413
|
+
* @example
|
|
13414
|
+
* ```typescript
|
|
13415
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13416
|
+
* const brand = await client.platform.brandIdentities.update('bi_abc123', {
|
|
13417
|
+
* primary_color: '#dc2626',
|
|
13418
|
+
* tagline: 'Caring for you',
|
|
13419
|
+
* });
|
|
13420
|
+
* ```
|
|
13421
|
+
*/
|
|
13422
|
+
update: (id: string, attributes: UpdateBrandIdentityAttributes, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
13423
|
+
/**
|
|
13424
|
+
* Delete a brand identity.
|
|
13425
|
+
*
|
|
13426
|
+
* Permanently removes the brand identity. Any platform tones associated
|
|
13427
|
+
* with this brand identity should be deleted or reassigned first.
|
|
13428
|
+
*
|
|
13429
|
+
* @param id - The UUID of the brand identity to delete.
|
|
13430
|
+
* @param options - Optional request options.
|
|
13431
|
+
* @returns `true` on successful deletion.
|
|
13432
|
+
*
|
|
13433
|
+
* @example
|
|
13434
|
+
* ```typescript
|
|
13435
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13436
|
+
* await client.platform.brandIdentities.delete('bi_abc123');
|
|
13437
|
+
* ```
|
|
13438
|
+
*/
|
|
13439
|
+
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
13440
|
+
/**
|
|
13441
|
+
* List brand identities scoped to a specific tenant.
|
|
13442
|
+
*
|
|
13443
|
+
* @param tenantId - The UUID of the tenant.
|
|
13444
|
+
* @param options - Optional page number, page size, and request options.
|
|
13445
|
+
* @returns A page of `BrandIdentity` records for the tenant.
|
|
13446
|
+
*
|
|
13447
|
+
* @example
|
|
13448
|
+
* ```typescript
|
|
13449
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13450
|
+
* const brands = await client.platform.brandIdentities.listByTenant('tenant_abc123');
|
|
13451
|
+
* ```
|
|
13452
|
+
*/
|
|
13453
|
+
listByTenant: (tenantId: string, options?: {
|
|
13454
|
+
page?: number;
|
|
13455
|
+
pageSize?: number;
|
|
13456
|
+
} & RequestOptions) => Promise<BrandIdentity[]>;
|
|
13457
|
+
/**
|
|
13458
|
+
* List brand identities scoped to a specific workspace.
|
|
13459
|
+
*
|
|
13460
|
+
* @param workspaceId - The UUID of the workspace.
|
|
13461
|
+
* @param options - Optional page number, page size, and request options.
|
|
13462
|
+
* @returns A page of `BrandIdentity` records for the workspace.
|
|
13463
|
+
*
|
|
13464
|
+
* @example
|
|
13465
|
+
* ```typescript
|
|
13466
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13467
|
+
* const brands = await client.platform.brandIdentities.listByWorkspace('ws_abc123');
|
|
13468
|
+
* ```
|
|
13469
|
+
*/
|
|
13470
|
+
listByWorkspace: (workspaceId: string, options?: {
|
|
13471
|
+
page?: number;
|
|
13472
|
+
pageSize?: number;
|
|
13473
|
+
} & RequestOptions) => Promise<BrandIdentity[]>;
|
|
13474
|
+
/**
|
|
13475
|
+
* Get the default brand identity for a tenant.
|
|
13476
|
+
*
|
|
13477
|
+
* Returns the brand identity marked as default for the given tenant,
|
|
13478
|
+
* or throws if none is set.
|
|
13479
|
+
*
|
|
13480
|
+
* @param tenantId - The UUID of the tenant.
|
|
13481
|
+
* @param options - Optional request options.
|
|
13482
|
+
* @returns The default `BrandIdentity` for the tenant.
|
|
13483
|
+
*
|
|
13484
|
+
* @example
|
|
13485
|
+
* ```typescript
|
|
13486
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13487
|
+
* const defaultBrand = await client.platform.brandIdentities.getDefaultForTenant('tenant_abc123');
|
|
13488
|
+
* console.log(defaultBrand.attributes?.name);
|
|
13489
|
+
* ```
|
|
13490
|
+
*/
|
|
13491
|
+
getDefaultForTenant: (tenantId: string, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
13492
|
+
/**
|
|
13493
|
+
* Get the default brand identity for a workspace.
|
|
13494
|
+
*
|
|
13495
|
+
* Returns the brand identity marked as default for the given workspace,
|
|
13496
|
+
* or throws if none is set.
|
|
13497
|
+
*
|
|
13498
|
+
* @param workspaceId - The UUID of the workspace.
|
|
13499
|
+
* @param options - Optional request options.
|
|
13500
|
+
* @returns The default `BrandIdentity` for the workspace.
|
|
13501
|
+
*
|
|
13502
|
+
* @example
|
|
13503
|
+
* ```typescript
|
|
13504
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13505
|
+
* const defaultBrand = await client.platform.brandIdentities.getDefaultForWorkspace('ws_abc123');
|
|
13506
|
+
* console.log(defaultBrand.attributes?.name);
|
|
13507
|
+
* ```
|
|
13508
|
+
*/
|
|
13509
|
+
getDefaultForWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
13510
|
+
/**
|
|
13511
|
+
* Mark a brand identity as the default for its scope (tenant or workspace).
|
|
13512
|
+
*
|
|
13513
|
+
* If another brand identity was previously the default at this scope,
|
|
13514
|
+
* it is automatically unset.
|
|
13515
|
+
*
|
|
13516
|
+
* @param id - The UUID of the brand identity to set as default.
|
|
13517
|
+
* @param options - Optional request options.
|
|
13518
|
+
* @returns The updated `BrandIdentity` with `is_default` set to `true`.
|
|
13519
|
+
*
|
|
13520
|
+
* @example
|
|
13521
|
+
* ```typescript
|
|
13522
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13523
|
+
* const brand = await client.platform.brandIdentities.setDefault('bi_abc123');
|
|
13524
|
+
* console.log(brand.attributes?.is_default); // true
|
|
13525
|
+
* ```
|
|
13526
|
+
*/
|
|
13527
|
+
setDefault: (id: string, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
13528
|
+
/**
|
|
13529
|
+
* Remove the default status from a brand identity.
|
|
13530
|
+
*
|
|
13531
|
+
* After this call, the scope (tenant or workspace) will have no default
|
|
13532
|
+
* brand identity until another is explicitly set.
|
|
13533
|
+
*
|
|
13534
|
+
* @param id - The UUID of the brand identity to unset as default.
|
|
13535
|
+
* @param options - Optional request options.
|
|
13536
|
+
* @returns The updated `BrandIdentity` with `is_default` set to `false`.
|
|
13537
|
+
*
|
|
13538
|
+
* @example
|
|
13539
|
+
* ```typescript
|
|
13540
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13541
|
+
* const brand = await client.platform.brandIdentities.unsetDefault('bi_abc123');
|
|
13542
|
+
* console.log(brand.attributes?.is_default); // false
|
|
13543
|
+
* ```
|
|
13544
|
+
*/
|
|
13545
|
+
unsetDefault: (id: string, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
13546
|
+
};
|
|
13547
|
+
/**
|
|
13548
|
+
* Platform Tones — communication tone and style configuration.
|
|
13549
|
+
*
|
|
13550
|
+
* Platform tones define the voice, formality, and vocabulary preferences
|
|
13551
|
+
* used by AI-generated content within a brand identity context. Each tone
|
|
13552
|
+
* is associated with a brand identity and can be used to customize how
|
|
13553
|
+
* the platform communicates on behalf of the brand.
|
|
13554
|
+
*
|
|
13555
|
+
* Access via `client.platform.platformTones`.
|
|
13556
|
+
*/
|
|
13557
|
+
platformTones: {
|
|
13558
|
+
/**
|
|
13559
|
+
* List all platform tones accessible to the current actor.
|
|
13560
|
+
*
|
|
13561
|
+
* @param options - Optional page number, page size, and request options.
|
|
13562
|
+
* @returns A page of `PlatformTone` records.
|
|
13563
|
+
*
|
|
13564
|
+
* @example
|
|
13565
|
+
* ```typescript
|
|
13566
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13567
|
+
* const tones = await client.platform.platformTones.list();
|
|
13568
|
+
* tones.forEach(t => console.log(t.attributes?.name));
|
|
13569
|
+
* ```
|
|
13570
|
+
*/
|
|
13571
|
+
list: (options?: {
|
|
13572
|
+
page?: number;
|
|
13573
|
+
pageSize?: number;
|
|
13574
|
+
} & RequestOptions) => Promise<PlatformTone[]>;
|
|
13575
|
+
/**
|
|
13576
|
+
* Retrieve a single platform tone by its ID.
|
|
13577
|
+
*
|
|
13578
|
+
* @param id - The UUID of the platform tone.
|
|
13579
|
+
* @param options - Optional request options.
|
|
13580
|
+
* @returns The matching `PlatformTone`.
|
|
13581
|
+
*
|
|
13582
|
+
* @example
|
|
13583
|
+
* ```typescript
|
|
13584
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13585
|
+
* const tone = await client.platform.platformTones.get('pt_abc123');
|
|
13586
|
+
* console.log(tone.attributes?.name, tone.attributes?.formality_level);
|
|
13587
|
+
* ```
|
|
13588
|
+
*/
|
|
13589
|
+
get: (id: string, options?: RequestOptions) => Promise<PlatformTone>;
|
|
13590
|
+
/**
|
|
13591
|
+
* Create a new platform tone.
|
|
13592
|
+
*
|
|
13593
|
+
* Defines tone and style preferences for AI-generated content within
|
|
13594
|
+
* the context of a brand identity. `brand_identity_id` is required to
|
|
13595
|
+
* associate the tone with the correct brand.
|
|
13596
|
+
*
|
|
13597
|
+
* @param attributes - Platform tone creation attributes. `name` and `brand_identity_id` are required.
|
|
13598
|
+
* @param options - Optional request options.
|
|
13599
|
+
* @returns The newly created `PlatformTone`.
|
|
13600
|
+
*
|
|
13601
|
+
* @example
|
|
13602
|
+
* ```typescript
|
|
13603
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13604
|
+
* const tone = await client.platform.platformTones.create({
|
|
13605
|
+
* name: 'Professional',
|
|
13606
|
+
* brand_identity_id: 'bi_abc123',
|
|
13607
|
+
* formality_level: 'formal',
|
|
13608
|
+
* tone_style: 'authoritative',
|
|
13609
|
+
* });
|
|
13610
|
+
* console.log(tone.id);
|
|
13611
|
+
* ```
|
|
13612
|
+
*/
|
|
13613
|
+
create: (attributes: CreatePlatformToneAttributes, options?: RequestOptions) => Promise<PlatformTone>;
|
|
13614
|
+
/**
|
|
13615
|
+
* Update a platform tone's attributes.
|
|
13616
|
+
*
|
|
13617
|
+
* @param id - The UUID of the platform tone to update.
|
|
13618
|
+
* @param attributes - Attribute map of fields to change.
|
|
13619
|
+
* @param options - Optional request options.
|
|
13620
|
+
* @returns The updated `PlatformTone`.
|
|
13621
|
+
*
|
|
13622
|
+
* @example
|
|
13623
|
+
* ```typescript
|
|
13624
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13625
|
+
* const tone = await client.platform.platformTones.update('pt_abc123', {
|
|
13626
|
+
* formality_level: 'casual',
|
|
13627
|
+
* tone_style: 'friendly',
|
|
13628
|
+
* });
|
|
13629
|
+
* ```
|
|
13630
|
+
*/
|
|
13631
|
+
update: (id: string, attributes: UpdatePlatformToneAttributes, options?: RequestOptions) => Promise<PlatformTone>;
|
|
13632
|
+
/**
|
|
13633
|
+
* Delete a platform tone.
|
|
13634
|
+
*
|
|
13635
|
+
* Permanently removes the platform tone.
|
|
13636
|
+
*
|
|
13637
|
+
* @param id - The UUID of the platform tone to delete.
|
|
13638
|
+
* @param options - Optional request options.
|
|
13639
|
+
* @returns `true` on successful deletion.
|
|
13640
|
+
*
|
|
13641
|
+
* @example
|
|
13642
|
+
* ```typescript
|
|
13643
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13644
|
+
* await client.platform.platformTones.delete('pt_abc123');
|
|
13645
|
+
* ```
|
|
13646
|
+
*/
|
|
13647
|
+
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
13648
|
+
/**
|
|
13649
|
+
* List platform tones associated with a specific brand identity.
|
|
13650
|
+
*
|
|
13651
|
+
* @param brandIdentityId - The UUID of the brand identity.
|
|
13652
|
+
* @param options - Optional page number, page size, and request options.
|
|
13653
|
+
* @returns A page of `PlatformTone` records for the brand.
|
|
13654
|
+
*
|
|
13655
|
+
* @example
|
|
13656
|
+
* ```typescript
|
|
13657
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
13658
|
+
* const tones = await client.platform.platformTones.listByBrand('bi_abc123');
|
|
13659
|
+
* tones.forEach(t => console.log(t.attributes?.name));
|
|
13660
|
+
* ```
|
|
13661
|
+
*/
|
|
13662
|
+
listByBrand: (brandIdentityId: string, options?: {
|
|
13663
|
+
page?: number;
|
|
13664
|
+
pageSize?: number;
|
|
13665
|
+
} & RequestOptions) => Promise<PlatformTone[]>;
|
|
13666
|
+
};
|
|
13022
13667
|
};
|
|
13023
13668
|
|
|
13024
13669
|
interface PortalAuthResponse {
|
|
@@ -17457,6 +18102,39 @@ declare function createBillingNamespace(rb: RequestBuilder): {
|
|
|
17457
18102
|
/** List usage records for a specific tenant. */
|
|
17458
18103
|
listByTenant: (tenantId: string, options?: RequestOptions) => Promise<FeatureUsage[]>;
|
|
17459
18104
|
};
|
|
18105
|
+
/**
|
|
18106
|
+
* Plan-feature allocations — per-plan overrides for feature definitions (read-only).
|
|
18107
|
+
*
|
|
18108
|
+
* Allocations link feature definitions to plans, specifying which features are
|
|
18109
|
+
* enabled on each plan and any per-plan overrides for limits, credit costs,
|
|
18110
|
+
* and activation costs. Use `listByPlan` to build plan comparison tables.
|
|
18111
|
+
*/
|
|
18112
|
+
planFeatureAllocations: {
|
|
18113
|
+
/** List all plan-feature allocations for the current application. */
|
|
18114
|
+
list: (options?: {
|
|
18115
|
+
page?: number;
|
|
18116
|
+
pageSize?: number;
|
|
18117
|
+
} & RequestOptions) => Promise<PlanFeatureAllocation[]>;
|
|
18118
|
+
/** Fetch all plan-feature allocations by paginating through every page. */
|
|
18119
|
+
listAll: (options?: RequestOptions) => Promise<PlanFeatureAllocation[]>;
|
|
18120
|
+
/** Get a plan-feature allocation by ID. */
|
|
18121
|
+
get: (id: string, options?: RequestOptions) => Promise<PlanFeatureAllocation>;
|
|
18122
|
+
/**
|
|
18123
|
+
* List allocations for a specific plan.
|
|
18124
|
+
*
|
|
18125
|
+
* Use this to build a plan comparison table — returns all feature
|
|
18126
|
+
* allocations (enabled/disabled, limits, costs) for one plan.
|
|
18127
|
+
*
|
|
18128
|
+
* @param planId - UUID of the plan to query.
|
|
18129
|
+
*
|
|
18130
|
+
* @example
|
|
18131
|
+
* ```typescript
|
|
18132
|
+
* const allocations = await client.billing.planFeatureAllocations.listByPlan(planId);
|
|
18133
|
+
* const enabledFeatures = allocations.filter(a => a.attributes?.enabled);
|
|
18134
|
+
* ```
|
|
18135
|
+
*/
|
|
18136
|
+
listByPlan: (planId: string, options?: RequestOptions) => Promise<PlanFeatureAllocation[]>;
|
|
18137
|
+
};
|
|
17460
18138
|
};
|
|
17461
18139
|
|
|
17462
18140
|
/** Response from a semantic search query. */
|
|
@@ -18161,13 +18839,19 @@ interface BulkDeleteResponse {
|
|
|
18161
18839
|
/** Attributes accepted when updating an agent (PATCH semantics). */
|
|
18162
18840
|
type UpdateAgentAttributes = {
|
|
18163
18841
|
name?: string;
|
|
18164
|
-
|
|
18842
|
+
description?: string;
|
|
18843
|
+
instructions?: string;
|
|
18844
|
+
tags?: string[];
|
|
18845
|
+
execution_mode?: string;
|
|
18165
18846
|
[key: string]: unknown;
|
|
18166
18847
|
};
|
|
18167
|
-
/**
|
|
18168
|
-
type
|
|
18848
|
+
/** Attributes accepted when creating a new agent. */
|
|
18849
|
+
type CreateAgentAttributes = {
|
|
18169
18850
|
description?: string;
|
|
18170
|
-
|
|
18851
|
+
instructions?: string;
|
|
18852
|
+
vertical?: string;
|
|
18853
|
+
tags?: string[];
|
|
18854
|
+
execution_mode?: string;
|
|
18171
18855
|
[key: string]: unknown;
|
|
18172
18856
|
};
|
|
18173
18857
|
/** Attributes accepted when creating an agent version. */
|
|
@@ -18326,30 +19010,33 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
18326
19010
|
*/
|
|
18327
19011
|
get: (id: string, options?: RequestOptions) => Promise<Agent>;
|
|
18328
19012
|
/**
|
|
18329
|
-
* Creates a new agent with
|
|
19013
|
+
* Creates a new agent with a blank initial version (v1).
|
|
18330
19014
|
*
|
|
18331
|
-
* The
|
|
18332
|
-
*
|
|
18333
|
-
*
|
|
19015
|
+
* The agent is created with default settings. To set the prompt template,
|
|
19016
|
+
* create or update a schema version after creation:
|
|
19017
|
+
*
|
|
19018
|
+
* ```typescript
|
|
19019
|
+
* const agent = await client.agents.create('Invoice Parser');
|
|
19020
|
+
* await client.agents.updateSchemaVersion(agent.id, versionId, {
|
|
19021
|
+
* prompt_template: 'You are an expert invoice parser...',
|
|
19022
|
+
* });
|
|
19023
|
+
* ```
|
|
18334
19024
|
*
|
|
18335
|
-
* @param name -
|
|
18336
|
-
* @param
|
|
18337
|
-
* @param attributes - Optional additional attributes to set on the agent resource
|
|
18338
|
-
* (e.g. `{ model: 'gpt-4o', temperature: 0.2 }`).
|
|
19025
|
+
* @param name - The display name for the agent.
|
|
19026
|
+
* @param attributes - Optional agent attributes (description, instructions, tags, etc.).
|
|
18339
19027
|
* @param options - Optional request options.
|
|
18340
|
-
* @returns A promise that resolves to the
|
|
19028
|
+
* @returns A promise that resolves to the created `Agent` object with its auto-generated v1.
|
|
18341
19029
|
*
|
|
18342
19030
|
* @example
|
|
18343
19031
|
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
18344
19032
|
*
|
|
18345
|
-
* const agent = await client.agents.create(
|
|
18346
|
-
* '
|
|
18347
|
-
* '
|
|
18348
|
-
*
|
|
18349
|
-
* );
|
|
19033
|
+
* const agent = await client.agents.create('Invoice Parser', {
|
|
19034
|
+
* description: 'Extracts structured data from invoices',
|
|
19035
|
+
* instructions: 'Focus on line items and totals',
|
|
19036
|
+
* });
|
|
18350
19037
|
* console.log(`Created agent: ${agent.id}`);
|
|
18351
19038
|
*/
|
|
18352
|
-
create: (name: string,
|
|
19039
|
+
create: (name: string, attributes?: CreateAgentAttributes, options?: RequestOptions) => Promise<Agent>;
|
|
18353
19040
|
/**
|
|
18354
19041
|
* Updates one or more attributes of an existing agent.
|
|
18355
19042
|
*
|
|
@@ -18358,7 +19045,7 @@ declare function createAgentsNamespace(rb: RequestBuilder): {
|
|
|
18358
19045
|
*
|
|
18359
19046
|
* @param id - The UUID of the agent to update.
|
|
18360
19047
|
* @param attributes - A partial map of agent attributes to update
|
|
18361
|
-
* (e.g. `{ name: 'New Name',
|
|
19048
|
+
* (e.g. `{ name: 'New Name', description: 'Updated description' }`).
|
|
18362
19049
|
* @param options - Optional request options.
|
|
18363
19050
|
* @returns A promise that resolves to the updated `Agent` object.
|
|
18364
19051
|
*
|
|
@@ -20496,7 +21183,7 @@ declare class GptClient extends BaseClient {
|
|
|
20496
21183
|
listAll: (options?: RequestOptions) => Promise<Agent[]>;
|
|
20497
21184
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
20498
21185
|
get: (id: string, options?: RequestOptions) => Promise<Agent>;
|
|
20499
|
-
create: (name: string,
|
|
21186
|
+
create: (name: string, attributes?: CreateAgentAttributes, options?: RequestOptions) => Promise<Agent>;
|
|
20500
21187
|
update: (id: string, attributes: UpdateAgentAttributes, options?: RequestOptions) => Promise<Agent>;
|
|
20501
21188
|
test: (id: string, options?: RequestOptions) => Promise<Agent>;
|
|
20502
21189
|
validate: (id: string, options?: RequestOptions) => Promise<Agent>;
|
|
@@ -20693,6 +21380,15 @@ declare class GptClient extends BaseClient {
|
|
|
20693
21380
|
get: (id: string, options?: RequestOptions) => Promise<FeatureUsage>;
|
|
20694
21381
|
listByTenant: (tenantId: string, options?: RequestOptions) => Promise<FeatureUsage[]>;
|
|
20695
21382
|
};
|
|
21383
|
+
planFeatureAllocations: {
|
|
21384
|
+
list: (options?: {
|
|
21385
|
+
page?: number;
|
|
21386
|
+
pageSize?: number;
|
|
21387
|
+
} & RequestOptions) => Promise<PlanFeatureAllocation[]>;
|
|
21388
|
+
listAll: (options?: RequestOptions) => Promise<PlanFeatureAllocation[]>;
|
|
21389
|
+
get: (id: string, options?: RequestOptions) => Promise<PlanFeatureAllocation>;
|
|
21390
|
+
listByPlan: (planId: string, options?: RequestOptions) => Promise<PlanFeatureAllocation[]>;
|
|
21391
|
+
};
|
|
20696
21392
|
};
|
|
20697
21393
|
/** Product catalog, inventory, pricing, and taxonomy */
|
|
20698
21394
|
readonly catalog: {
|
|
@@ -20970,6 +21666,7 @@ declare class GptClient extends BaseClient {
|
|
|
20970
21666
|
update: (id: string, attributes: UpdateCrmContactAttributes, options?: RequestOptions) => Promise<CrmContact>;
|
|
20971
21667
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
20972
21668
|
listByWorkspace: (workspaceId: string, options?: {
|
|
21669
|
+
name?: string;
|
|
20973
21670
|
status?: "lead" | "marketing_qualified" | "sales_qualified" | "opportunity" | "customer" | "evangelist" | "churned";
|
|
20974
21671
|
filters?: AttributeFilter[];
|
|
20975
21672
|
tags?: string[];
|
|
@@ -20997,6 +21694,7 @@ declare class GptClient extends BaseClient {
|
|
|
20997
21694
|
get: (id: string, options?: RequestOptions) => Promise<CrmDeal>;
|
|
20998
21695
|
create: (attributes: CreateCrmDealAttributes, options?: RequestOptions) => Promise<CrmDeal>;
|
|
20999
21696
|
update: (id: string, attributes: UpdateCrmDealAttributes, options?: RequestOptions) => Promise<CrmDeal>;
|
|
21697
|
+
moveStage: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CrmDeal>;
|
|
21000
21698
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
21001
21699
|
listByWorkspace: (workspaceId: string, options?: {
|
|
21002
21700
|
page?: number;
|
|
@@ -21006,6 +21704,7 @@ declare class GptClient extends BaseClient {
|
|
|
21006
21704
|
activities: {
|
|
21007
21705
|
get: (id: string, options?: RequestOptions) => Promise<CrmActivity>;
|
|
21008
21706
|
create: (attributes: CreateCrmActivityAttributes, options?: RequestOptions) => Promise<CrmActivity>;
|
|
21707
|
+
update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<CrmActivity>;
|
|
21009
21708
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
21010
21709
|
listByWorkspace: (workspaceId: string, options?: {
|
|
21011
21710
|
page?: number;
|
|
@@ -21024,6 +21723,7 @@ declare class GptClient extends BaseClient {
|
|
|
21024
21723
|
create: (attributes: CreateCrmPipelineStageAttributes, options?: RequestOptions) => Promise<CrmPipelineStage>;
|
|
21025
21724
|
update: (id: string, attributes: UpdateCrmPipelineStageAttributes, options?: RequestOptions) => Promise<CrmPipelineStage>;
|
|
21026
21725
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
21726
|
+
listByPipeline: (pipelineId: string, options?: RequestOptions) => Promise<CrmPipelineStage[]>;
|
|
21027
21727
|
};
|
|
21028
21728
|
relationshipTypes: {
|
|
21029
21729
|
get: (id: string, options?: RequestOptions) => Promise<CrmRelationshipType>;
|
|
@@ -21506,7 +22206,9 @@ declare class GptClient extends BaseClient {
|
|
|
21506
22206
|
listAllExtractionExportsByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<Workspace[]>;
|
|
21507
22207
|
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
21508
22208
|
update: (id: string, attributes: UpdateWorkspaceAttributes, options?: RequestOptions) => Promise<Workspace>;
|
|
21509
|
-
|
|
22209
|
+
updateStorageSettings: (id: string, settings: Record<string, unknown>, options?: RequestOptions) => Promise<Workspace>;
|
|
22210
|
+
allocateCredits: (workspaceId: string, amount: number, options?: RequestOptions) => Promise<Workspace>;
|
|
22211
|
+
populateHashes: (workspaceId: string, options?: RequestOptions) => Promise<Workspace>;
|
|
21510
22212
|
};
|
|
21511
22213
|
applications: {
|
|
21512
22214
|
list: (options?: {
|
|
@@ -21523,6 +22225,7 @@ declare class GptClient extends BaseClient {
|
|
|
21523
22225
|
update: (id: string, attributes: UpdateApplicationAttributes, options?: RequestOptions) => Promise<Application>;
|
|
21524
22226
|
get: (id: string, options?: RequestOptions) => Promise<Application>;
|
|
21525
22227
|
readCurrent: (options?: RequestOptions) => Promise<Application>;
|
|
22228
|
+
getBySlug: (slug: string, options?: RequestOptions) => Promise<Application>;
|
|
21526
22229
|
};
|
|
21527
22230
|
tenants: {
|
|
21528
22231
|
list: (options?: {
|
|
@@ -21541,9 +22244,20 @@ declare class GptClient extends BaseClient {
|
|
|
21541
22244
|
schedulePurge: (id: string, options?: RequestOptions) => Promise<Tenant>;
|
|
21542
22245
|
get: (id: string, options?: RequestOptions) => Promise<Tenant>;
|
|
21543
22246
|
transferOwnership: (tenantId: string, newOwnerId: string, options?: RequestOptions) => Promise<Tenant>;
|
|
22247
|
+
convertToOrg: (tenantId: string, attributes: {
|
|
22248
|
+
name: string;
|
|
22249
|
+
slug?: string;
|
|
22250
|
+
application_id?: string;
|
|
22251
|
+
}, options?: RequestOptions) => Promise<Tenant>;
|
|
22252
|
+
createOrg: (attributes: {
|
|
22253
|
+
name: string;
|
|
22254
|
+
logo_url?: string;
|
|
22255
|
+
[key: string]: unknown;
|
|
22256
|
+
}, options?: RequestOptions) => Promise<Tenant>;
|
|
22257
|
+
createPersonal: (options?: RequestOptions) => Promise<Tenant>;
|
|
21544
22258
|
};
|
|
21545
22259
|
invitations: {
|
|
21546
|
-
accept: (id: string, options?: RequestOptions) => Promise<Invitation>;
|
|
22260
|
+
accept: (id: string, token: string, options?: RequestOptions) => Promise<Invitation>;
|
|
21547
22261
|
decline: (id: string, options?: RequestOptions) => Promise<Invitation>;
|
|
21548
22262
|
revoke: (id: string, options?: RequestOptions) => Promise<Invitation>;
|
|
21549
22263
|
listMe: (options?: {
|
|
@@ -21596,6 +22310,42 @@ declare class GptClient extends BaseClient {
|
|
|
21596
22310
|
}>;
|
|
21597
22311
|
};
|
|
21598
22312
|
};
|
|
22313
|
+
brandIdentities: {
|
|
22314
|
+
list: (options?: {
|
|
22315
|
+
page?: number;
|
|
22316
|
+
pageSize?: number;
|
|
22317
|
+
} & RequestOptions) => Promise<BrandIdentity[]>;
|
|
22318
|
+
get: (id: string, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
22319
|
+
create: (attributes: CreateBrandIdentityAttributes, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
22320
|
+
update: (id: string, attributes: UpdateBrandIdentityAttributes, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
22321
|
+
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
22322
|
+
listByTenant: (tenantId: string, options?: {
|
|
22323
|
+
page?: number;
|
|
22324
|
+
pageSize?: number;
|
|
22325
|
+
} & RequestOptions) => Promise<BrandIdentity[]>;
|
|
22326
|
+
listByWorkspace: (workspaceId: string, options?: {
|
|
22327
|
+
page?: number;
|
|
22328
|
+
pageSize?: number;
|
|
22329
|
+
} & RequestOptions) => Promise<BrandIdentity[]>;
|
|
22330
|
+
getDefaultForTenant: (tenantId: string, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
22331
|
+
getDefaultForWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
22332
|
+
setDefault: (id: string, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
22333
|
+
unsetDefault: (id: string, options?: RequestOptions) => Promise<BrandIdentity>;
|
|
22334
|
+
};
|
|
22335
|
+
platformTones: {
|
|
22336
|
+
list: (options?: {
|
|
22337
|
+
page?: number;
|
|
22338
|
+
pageSize?: number;
|
|
22339
|
+
} & RequestOptions) => Promise<PlatformTone[]>;
|
|
22340
|
+
get: (id: string, options?: RequestOptions) => Promise<PlatformTone>;
|
|
22341
|
+
create: (attributes: CreatePlatformToneAttributes, options?: RequestOptions) => Promise<PlatformTone>;
|
|
22342
|
+
update: (id: string, attributes: UpdatePlatformToneAttributes, options?: RequestOptions) => Promise<PlatformTone>;
|
|
22343
|
+
delete: (id: string, options?: RequestOptions) => Promise<true>;
|
|
22344
|
+
listByBrand: (brandIdentityId: string, options?: {
|
|
22345
|
+
page?: number;
|
|
22346
|
+
pageSize?: number;
|
|
22347
|
+
} & RequestOptions) => Promise<PlatformTone[]>;
|
|
22348
|
+
};
|
|
21599
22349
|
};
|
|
21600
22350
|
/** Event types, scheduled events, bookings, participants, and calendar sync */
|
|
21601
22351
|
readonly scheduling: {
|