@gpt-platform/client 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +362 -231
- package/dist/index.d.ts +362 -231
- package/dist/index.js +25 -15
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -15
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
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.10.
|
|
609
|
+
declare const SDK_VERSION = "0.10.1";
|
|
610
610
|
/** Default API version sent in every request — updated automatically by mix update.sdks */
|
|
611
611
|
declare const DEFAULT_API_VERSION = "2026-03-23";
|
|
612
612
|
|
|
@@ -12305,6 +12305,317 @@ interface CompletionEstimate {
|
|
|
12305
12305
|
blockers: string[];
|
|
12306
12306
|
}
|
|
12307
12307
|
|
|
12308
|
+
/** Attributes accepted by `POST /social/accounts` (create action). */
|
|
12309
|
+
interface SocialAccountCreateAttributes {
|
|
12310
|
+
platform: string;
|
|
12311
|
+
platform_user_id?: string;
|
|
12312
|
+
display_name?: string;
|
|
12313
|
+
avatar_url?: string;
|
|
12314
|
+
account_type?: string;
|
|
12315
|
+
is_active?: boolean;
|
|
12316
|
+
posting_enabled?: boolean;
|
|
12317
|
+
metadata?: Record<string, unknown>;
|
|
12318
|
+
}
|
|
12319
|
+
/** Attributes accepted by `PATCH /social/accounts/:id` (update action). */
|
|
12320
|
+
interface SocialAccountUpdateAttributes {
|
|
12321
|
+
display_name?: string;
|
|
12322
|
+
avatar_url?: string;
|
|
12323
|
+
metadata?: Record<string, unknown>;
|
|
12324
|
+
last_verified_at?: string;
|
|
12325
|
+
}
|
|
12326
|
+
/** Attributes accepted by `POST /social/posts` (create action). */
|
|
12327
|
+
interface SocialPostCreateAttributes {
|
|
12328
|
+
platform: string;
|
|
12329
|
+
content: string;
|
|
12330
|
+
media_urls?: string[];
|
|
12331
|
+
hashtags?: string[];
|
|
12332
|
+
link_url?: string;
|
|
12333
|
+
link_metadata?: Record<string, unknown>;
|
|
12334
|
+
max_retries?: number;
|
|
12335
|
+
social_account_id: string;
|
|
12336
|
+
social_campaign_id?: string;
|
|
12337
|
+
}
|
|
12338
|
+
/** Attributes accepted by `PATCH /social/posts/:id` (update action). */
|
|
12339
|
+
interface SocialPostUpdateAttributes {
|
|
12340
|
+
content?: string;
|
|
12341
|
+
media_urls?: string[];
|
|
12342
|
+
hashtags?: string[];
|
|
12343
|
+
link_url?: string;
|
|
12344
|
+
link_metadata?: Record<string, unknown>;
|
|
12345
|
+
platform_metadata?: Record<string, unknown>;
|
|
12346
|
+
}
|
|
12347
|
+
/** Attributes accepted by `POST /social/campaigns` (create action). */
|
|
12348
|
+
interface SocialCampaignCreateAttributes {
|
|
12349
|
+
/** Required. Campaign name. */
|
|
12350
|
+
name: string;
|
|
12351
|
+
/** Content brief that the AI will use to generate master copy. */
|
|
12352
|
+
content_brief?: string;
|
|
12353
|
+
/** Target platforms, e.g. ["twitter", "linkedin", "instagram"]. */
|
|
12354
|
+
target_platforms?: string[];
|
|
12355
|
+
/** Media URLs to include in generated posts. */
|
|
12356
|
+
media_urls?: string[];
|
|
12357
|
+
/** SEO keywords for content optimization. */
|
|
12358
|
+
seo_keywords?: string[];
|
|
12359
|
+
/** Optional brand identity UUID for tone/style guidance. */
|
|
12360
|
+
brand_identity_id?: string;
|
|
12361
|
+
}
|
|
12362
|
+
/** Attributes accepted by `PATCH /social/campaigns/:id` (update action). */
|
|
12363
|
+
interface SocialCampaignUpdateAttributes {
|
|
12364
|
+
name?: string;
|
|
12365
|
+
content_brief?: string;
|
|
12366
|
+
target_platforms?: string[];
|
|
12367
|
+
media_urls?: string[];
|
|
12368
|
+
seo_keywords?: string[];
|
|
12369
|
+
brand_identity_id?: string;
|
|
12370
|
+
}
|
|
12371
|
+
/**
|
|
12372
|
+
* Social media management namespace — accounts, posts, metrics, and campaigns.
|
|
12373
|
+
*
|
|
12374
|
+
* Covers the full social publishing lifecycle: connect accounts, create and
|
|
12375
|
+
* schedule posts, collect engagement metrics, and run AI-powered social campaigns.
|
|
12376
|
+
*
|
|
12377
|
+
* @example
|
|
12378
|
+
* ```typescript
|
|
12379
|
+
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
12380
|
+
*
|
|
12381
|
+
* // List connected accounts
|
|
12382
|
+
* const accounts = await client.social.accounts.listByWorkspace('ws_abc');
|
|
12383
|
+
*
|
|
12384
|
+
* // Create and schedule a post
|
|
12385
|
+
* const post = await client.social.posts.create({ ... });
|
|
12386
|
+
* await client.social.posts.schedule(post.id, '2026-03-10T12:00:00Z');
|
|
12387
|
+
*
|
|
12388
|
+
* // Get latest metrics
|
|
12389
|
+
* const metrics = await client.social.metrics.latestForPost(post.id);
|
|
12390
|
+
* ```
|
|
12391
|
+
*/
|
|
12392
|
+
declare function createSocialNamespace(rb: RequestBuilder): {
|
|
12393
|
+
/** Social account management — connect, enable/disable, and deactivate accounts. */
|
|
12394
|
+
accounts: {
|
|
12395
|
+
/** List social accounts for a workspace. */
|
|
12396
|
+
listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12397
|
+
/** List social accounts by platform (e.g. "twitter", "instagram"). */
|
|
12398
|
+
listByPlatform: (platform: string, options?: RequestOptions) => Promise<unknown>;
|
|
12399
|
+
/** Get a single social account by ID. */
|
|
12400
|
+
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12401
|
+
/** Connect a new social account. */
|
|
12402
|
+
create: (attributes: SocialAccountCreateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
12403
|
+
/** Update a social account. */
|
|
12404
|
+
update: (id: string, attributes: SocialAccountUpdateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
12405
|
+
/** Delete a social account. */
|
|
12406
|
+
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12407
|
+
/** Enable posting on an account. */
|
|
12408
|
+
enablePosting: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12409
|
+
/** Disable posting on an account. */
|
|
12410
|
+
disablePosting: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12411
|
+
/** Deactivate (disconnect) an account. */
|
|
12412
|
+
deactivate: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12413
|
+
};
|
|
12414
|
+
/** Social post management — create, schedule, publish, cancel, and retry posts. */
|
|
12415
|
+
posts: {
|
|
12416
|
+
/** Create a new social post draft. */
|
|
12417
|
+
create: (attributes: SocialPostCreateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
12418
|
+
/** Get a single post by ID. */
|
|
12419
|
+
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12420
|
+
/** Update a draft post. */
|
|
12421
|
+
update: (id: string, attributes: SocialPostUpdateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
12422
|
+
/** Delete a post. */
|
|
12423
|
+
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12424
|
+
/** Schedule a post for future publishing. */
|
|
12425
|
+
schedule: (id: string, scheduledAt: string, options?: RequestOptions) => Promise<unknown>;
|
|
12426
|
+
/** Publish a post immediately. */
|
|
12427
|
+
publishNow: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12428
|
+
/** Cancel a scheduled or draft post. */
|
|
12429
|
+
cancel: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12430
|
+
/** Retry a failed post. */
|
|
12431
|
+
retry: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12432
|
+
/** Update SEO metadata on a post. */
|
|
12433
|
+
updateSeo: (id: string, attributes: {
|
|
12434
|
+
seo_score?: number;
|
|
12435
|
+
seo_analysis?: Record<string, unknown>;
|
|
12436
|
+
}, options?: RequestOptions) => Promise<unknown>;
|
|
12437
|
+
/** List scheduled posts. */
|
|
12438
|
+
listScheduled: (options?: RequestOptions) => Promise<unknown>;
|
|
12439
|
+
/** List posts by account. */
|
|
12440
|
+
listByAccount: (socialAccountId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12441
|
+
/** List posts by campaign. */
|
|
12442
|
+
listByCampaign: (socialCampaignId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12443
|
+
/** List all posts for a workspace. */
|
|
12444
|
+
listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12445
|
+
};
|
|
12446
|
+
/** Post engagement metrics — impressions, reach, likes, comments, and more. */
|
|
12447
|
+
metrics: {
|
|
12448
|
+
/** Get a single metric record by ID. */
|
|
12449
|
+
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12450
|
+
/** List all metrics for a post. */
|
|
12451
|
+
listByPost: (socialPostId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12452
|
+
/** Get the latest metric per collection window for a post. */
|
|
12453
|
+
latestForPost: (socialPostId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12454
|
+
/** Aggregate metrics across all posts for a social account. */
|
|
12455
|
+
byAccount: (socialAccountId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12456
|
+
/** Aggregate metrics across all posts in a social campaign. */
|
|
12457
|
+
byCampaign: (socialCampaignId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12458
|
+
};
|
|
12459
|
+
/** AI-powered social campaigns — generate master copy and adapt for platforms. */
|
|
12460
|
+
campaigns: {
|
|
12461
|
+
/** List all social campaigns. */
|
|
12462
|
+
list: (options?: RequestOptions) => Promise<unknown>;
|
|
12463
|
+
/** Get a single campaign by ID. */
|
|
12464
|
+
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12465
|
+
/**
|
|
12466
|
+
* Create a new social campaign.
|
|
12467
|
+
* Workspace is resolved from the authenticated user's context — do NOT
|
|
12468
|
+
* pass `workspace_id` in attributes.
|
|
12469
|
+
*/
|
|
12470
|
+
create: (attributes: SocialCampaignCreateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
12471
|
+
/** Update a campaign. */
|
|
12472
|
+
update: (id: string, attributes: SocialCampaignUpdateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
12473
|
+
/** Delete a campaign. */
|
|
12474
|
+
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12475
|
+
/** Schedule a campaign for a future date. */
|
|
12476
|
+
schedule: (id: string, scheduledAt: string, options?: RequestOptions) => Promise<unknown>;
|
|
12477
|
+
/** Cancel a campaign. */
|
|
12478
|
+
cancel: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12479
|
+
/** Generate AI master copy from the campaign's content brief. */
|
|
12480
|
+
generateMasterCopy: (id: string, workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12481
|
+
/** Adapt master copy for target platforms and create SocialPost drafts. */
|
|
12482
|
+
adaptForPlatforms: (id: string, workspaceId: string, socialAccountId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12483
|
+
};
|
|
12484
|
+
/** Trending content discovery — snapshots, items, and watch alerts. */
|
|
12485
|
+
trending: {
|
|
12486
|
+
/**
|
|
12487
|
+
* Get a trending snapshot by ID.
|
|
12488
|
+
* @param id - Snapshot UUID
|
|
12489
|
+
* @returns TrendingSnapshot with metadata (query, enrichment level, item count)
|
|
12490
|
+
* @example
|
|
12491
|
+
* ```typescript
|
|
12492
|
+
* const snapshot = await client.social.trending.get('snap_abc');
|
|
12493
|
+
* ```
|
|
12494
|
+
*/
|
|
12495
|
+
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12496
|
+
/**
|
|
12497
|
+
* List trending snapshots for a workspace.
|
|
12498
|
+
* @param workspaceId - Workspace UUID
|
|
12499
|
+
* @returns Array of TrendingSnapshot records
|
|
12500
|
+
* @example
|
|
12501
|
+
* ```typescript
|
|
12502
|
+
* const snapshots = await client.social.trending.listByWorkspace('ws_abc');
|
|
12503
|
+
* ```
|
|
12504
|
+
*/
|
|
12505
|
+
listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12506
|
+
/**
|
|
12507
|
+
* Create a trending snapshot (trigger on-demand collection).
|
|
12508
|
+
* @param attributes - Snapshot attributes (workspace_id, enrichment_level, etc.)
|
|
12509
|
+
* @returns Created TrendingSnapshot
|
|
12510
|
+
* @example
|
|
12511
|
+
* ```typescript
|
|
12512
|
+
* const snapshot = await client.social.trending.create({
|
|
12513
|
+
* workspace_id: 'ws_abc',
|
|
12514
|
+
* enrichment_level: 'scored',
|
|
12515
|
+
* fetched_at: new Date().toISOString(),
|
|
12516
|
+
* });
|
|
12517
|
+
* ```
|
|
12518
|
+
*/
|
|
12519
|
+
create: (attributes: {
|
|
12520
|
+
workspace_id: string;
|
|
12521
|
+
enrichment_level?: "raw" | "scored" | "summarized" | "full";
|
|
12522
|
+
query?: string;
|
|
12523
|
+
source_breakdown?: Record<string, unknown>;
|
|
12524
|
+
item_count?: number;
|
|
12525
|
+
fetched_at?: string;
|
|
12526
|
+
}, options?: RequestOptions) => Promise<unknown>;
|
|
12527
|
+
/** Delete a trending snapshot by ID. */
|
|
12528
|
+
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12529
|
+
/**
|
|
12530
|
+
* List trending snapshots within a date range.
|
|
12531
|
+
* @param from - Start date (ISO 8601 string)
|
|
12532
|
+
* @param to - End date (ISO 8601 string)
|
|
12533
|
+
* @returns Array of TrendingSnapshot records in the range
|
|
12534
|
+
* @example
|
|
12535
|
+
* ```typescript
|
|
12536
|
+
* const snapshots = await client.social.trending.listByDateRange(
|
|
12537
|
+
* '2026-03-01T00:00:00Z',
|
|
12538
|
+
* '2026-03-21T23:59:59Z',
|
|
12539
|
+
* );
|
|
12540
|
+
* ```
|
|
12541
|
+
*/
|
|
12542
|
+
listByDateRange: (from: string, to: string, options?: RequestOptions) => Promise<unknown>;
|
|
12543
|
+
/** Trending snapshot items — individual content pieces within a snapshot. */
|
|
12544
|
+
items: {
|
|
12545
|
+
/** Get a single trending item by ID. */
|
|
12546
|
+
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12547
|
+
/**
|
|
12548
|
+
* List trending items for a snapshot.
|
|
12549
|
+
* @param snapshotId - Parent snapshot UUID
|
|
12550
|
+
* @returns Array of TrendingSnapshotItem records
|
|
12551
|
+
* @example
|
|
12552
|
+
* ```typescript
|
|
12553
|
+
* const items = await client.social.trending.items.listBySnapshot('snap_abc');
|
|
12554
|
+
* ```
|
|
12555
|
+
*/
|
|
12556
|
+
listBySnapshot: (snapshotId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12557
|
+
};
|
|
12558
|
+
};
|
|
12559
|
+
/** Trending watch alerts — monitor topics and get notified on matches. */
|
|
12560
|
+
watches: {
|
|
12561
|
+
/**
|
|
12562
|
+
* Get a trending watch by ID.
|
|
12563
|
+
* @param id - Watch UUID
|
|
12564
|
+
* @returns TrendingWatch with conditions and notification config
|
|
12565
|
+
*/
|
|
12566
|
+
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12567
|
+
/**
|
|
12568
|
+
* List trending watches for a workspace.
|
|
12569
|
+
* @param workspaceId - Workspace UUID
|
|
12570
|
+
* @returns Array of TrendingWatch records
|
|
12571
|
+
* @example
|
|
12572
|
+
* ```typescript
|
|
12573
|
+
* const watches = await client.social.watches.listByWorkspace('ws_abc');
|
|
12574
|
+
* ```
|
|
12575
|
+
*/
|
|
12576
|
+
listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
12577
|
+
/**
|
|
12578
|
+
* Create a new trending watch alert.
|
|
12579
|
+
* @param attributes - Watch attributes (name, query, conditions, notification_config)
|
|
12580
|
+
* @returns Created TrendingWatch
|
|
12581
|
+
* @example
|
|
12582
|
+
* ```typescript
|
|
12583
|
+
* const watch = await client.social.watches.create({
|
|
12584
|
+
* workspace_id: 'ws_abc',
|
|
12585
|
+
* name: 'AI Industry News',
|
|
12586
|
+
* query: 'artificial intelligence',
|
|
12587
|
+
* conditions: { min_score: 0.7 },
|
|
12588
|
+
* notification_config: { channel: 'webhook', url: 'https://...' },
|
|
12589
|
+
* });
|
|
12590
|
+
* ```
|
|
12591
|
+
*/
|
|
12592
|
+
create: (attributes: {
|
|
12593
|
+
workspace_id: string;
|
|
12594
|
+
name: string;
|
|
12595
|
+
query: string;
|
|
12596
|
+
sources?: string[];
|
|
12597
|
+
conditions?: Record<string, unknown>;
|
|
12598
|
+
notification_config?: Record<string, unknown>;
|
|
12599
|
+
enabled?: boolean;
|
|
12600
|
+
}, options?: RequestOptions) => Promise<unknown>;
|
|
12601
|
+
/**
|
|
12602
|
+
* Update a trending watch.
|
|
12603
|
+
* @param id - Watch UUID
|
|
12604
|
+
* @param attributes - Fields to update (name, query, conditions, enabled, etc.)
|
|
12605
|
+
*/
|
|
12606
|
+
update: (id: string, attributes: {
|
|
12607
|
+
name?: string;
|
|
12608
|
+
query?: string;
|
|
12609
|
+
sources?: string[];
|
|
12610
|
+
conditions?: Record<string, unknown>;
|
|
12611
|
+
notification_config?: Record<string, unknown>;
|
|
12612
|
+
enabled?: boolean;
|
|
12613
|
+
}, options?: RequestOptions) => Promise<unknown>;
|
|
12614
|
+
/** Delete a trending watch by ID. */
|
|
12615
|
+
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
12616
|
+
};
|
|
12617
|
+
};
|
|
12618
|
+
|
|
12308
12619
|
/** Attributes accepted when creating a new ingestion claim. */
|
|
12309
12620
|
type CreateWatcherClaimAttributes = {
|
|
12310
12621
|
document_id: string;
|
|
@@ -24824,6 +25135,11 @@ interface UpdateClientResourceAssignmentAttributes {
|
|
|
24824
25135
|
interface TriggerPipelineResponse {
|
|
24825
25136
|
execution_id: string | null;
|
|
24826
25137
|
}
|
|
25138
|
+
/** Options for triggering a pipeline on a clinical session. */
|
|
25139
|
+
interface TriggerPipelineOptions {
|
|
25140
|
+
/** Slug of a specific pipeline to trigger. Defaults to "post-session-documentation". */
|
|
25141
|
+
pipeline_slug?: string;
|
|
25142
|
+
}
|
|
24827
25143
|
interface PatientAdherenceGoals {
|
|
24828
25144
|
total: number;
|
|
24829
25145
|
completed: number;
|
|
@@ -25224,18 +25540,27 @@ declare function createClinicalNamespace(rb: RequestBuilder): {
|
|
|
25224
25540
|
*
|
|
25225
25541
|
* @param sessionId - Session UUID
|
|
25226
25542
|
* @param workspaceId - Workspace UUID
|
|
25543
|
+
* @param triggerOptions - Optional pipeline targeting (pipeline_slug)
|
|
25227
25544
|
* @param options - Request options
|
|
25228
25545
|
* @returns {@link TriggerPipelineResponse} with execution_id (may be null if pipeline not configured)
|
|
25229
25546
|
*
|
|
25230
25547
|
* @example
|
|
25231
25548
|
* ```typescript
|
|
25549
|
+
* // Default pipeline (post-session-documentation)
|
|
25232
25550
|
* const { execution_id } = await client.clinical.sessions.triggerPipeline(
|
|
25233
25551
|
* 'sess_xyz',
|
|
25234
25552
|
* 'ws_123',
|
|
25235
25553
|
* );
|
|
25554
|
+
*
|
|
25555
|
+
* // Specific pipeline by slug
|
|
25556
|
+
* const { execution_id: eid } = await client.clinical.sessions.triggerPipeline(
|
|
25557
|
+
* 'sess_xyz',
|
|
25558
|
+
* 'ws_123',
|
|
25559
|
+
* { pipeline_slug: 'chartless-quick-goals-update' },
|
|
25560
|
+
* );
|
|
25236
25561
|
* ```
|
|
25237
25562
|
*/
|
|
25238
|
-
triggerPipeline: (sessionId: string, workspaceId: string, options?: RequestOptions) => Promise<TriggerPipelineResponse>;
|
|
25563
|
+
triggerPipeline: (sessionId: string, workspaceId: string, triggerOptions?: TriggerPipelineOptions, options?: RequestOptions) => Promise<TriggerPipelineResponse>;
|
|
25239
25564
|
};
|
|
25240
25565
|
/**
|
|
25241
25566
|
* Manage clinical notes (SOAP notes, progress notes, AI-generated summaries).
|
|
@@ -28387,23 +28712,26 @@ declare class GptClient extends BaseClient {
|
|
|
28387
28712
|
listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28388
28713
|
listByPlatform: (platform: string, options?: RequestOptions) => Promise<unknown>;
|
|
28389
28714
|
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28390
|
-
create: (attributes:
|
|
28391
|
-
update: (id: string, attributes:
|
|
28715
|
+
create: (attributes: SocialAccountCreateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
28716
|
+
update: (id: string, attributes: SocialAccountUpdateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
28392
28717
|
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28393
28718
|
enablePosting: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28394
28719
|
disablePosting: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28395
28720
|
deactivate: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28396
28721
|
};
|
|
28397
28722
|
posts: {
|
|
28398
|
-
create: (attributes:
|
|
28723
|
+
create: (attributes: SocialPostCreateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
28399
28724
|
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28400
|
-
update: (id: string, attributes:
|
|
28725
|
+
update: (id: string, attributes: SocialPostUpdateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
28401
28726
|
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28402
28727
|
schedule: (id: string, scheduledAt: string, options?: RequestOptions) => Promise<unknown>;
|
|
28403
28728
|
publishNow: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28404
28729
|
cancel: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28405
28730
|
retry: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28406
|
-
updateSeo: (id: string, attributes:
|
|
28731
|
+
updateSeo: (id: string, attributes: {
|
|
28732
|
+
seo_score?: number;
|
|
28733
|
+
seo_analysis?: Record<string, unknown>;
|
|
28734
|
+
}, options?: RequestOptions) => Promise<unknown>;
|
|
28407
28735
|
listScheduled: (options?: RequestOptions) => Promise<unknown>;
|
|
28408
28736
|
listByAccount: (socialAccountId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28409
28737
|
listByCampaign: (socialCampaignId: string, options?: RequestOptions) => Promise<unknown>;
|
|
@@ -28419,8 +28747,8 @@ declare class GptClient extends BaseClient {
|
|
|
28419
28747
|
campaigns: {
|
|
28420
28748
|
list: (options?: RequestOptions) => Promise<unknown>;
|
|
28421
28749
|
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28422
|
-
create: (attributes:
|
|
28423
|
-
update: (id: string, attributes:
|
|
28750
|
+
create: (attributes: SocialCampaignCreateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
28751
|
+
update: (id: string, attributes: SocialCampaignUpdateAttributes, options?: RequestOptions) => Promise<unknown>;
|
|
28424
28752
|
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28425
28753
|
schedule: (id: string, scheduledAt: string, options?: RequestOptions) => Promise<unknown>;
|
|
28426
28754
|
cancel: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
@@ -28430,7 +28758,14 @@ declare class GptClient extends BaseClient {
|
|
|
28430
28758
|
trending: {
|
|
28431
28759
|
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28432
28760
|
listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28433
|
-
create: (attributes:
|
|
28761
|
+
create: (attributes: {
|
|
28762
|
+
workspace_id: string;
|
|
28763
|
+
enrichment_level?: "raw" | "scored" | "summarized" | "full";
|
|
28764
|
+
query?: string;
|
|
28765
|
+
source_breakdown?: Record<string, unknown>;
|
|
28766
|
+
item_count?: number;
|
|
28767
|
+
fetched_at?: string;
|
|
28768
|
+
}, options?: RequestOptions) => Promise<unknown>;
|
|
28434
28769
|
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28435
28770
|
listByDateRange: (from: string, to: string, options?: RequestOptions) => Promise<unknown>;
|
|
28436
28771
|
items: {
|
|
@@ -28441,8 +28776,23 @@ declare class GptClient extends BaseClient {
|
|
|
28441
28776
|
watches: {
|
|
28442
28777
|
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28443
28778
|
listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28444
|
-
create: (attributes:
|
|
28445
|
-
|
|
28779
|
+
create: (attributes: {
|
|
28780
|
+
workspace_id: string;
|
|
28781
|
+
name: string;
|
|
28782
|
+
query: string;
|
|
28783
|
+
sources?: string[];
|
|
28784
|
+
conditions?: Record<string, unknown>;
|
|
28785
|
+
notification_config?: Record<string, unknown>;
|
|
28786
|
+
enabled?: boolean;
|
|
28787
|
+
}, options?: RequestOptions) => Promise<unknown>;
|
|
28788
|
+
update: (id: string, attributes: {
|
|
28789
|
+
name?: string;
|
|
28790
|
+
query?: string;
|
|
28791
|
+
sources?: string[];
|
|
28792
|
+
conditions?: Record<string, unknown>;
|
|
28793
|
+
notification_config?: Record<string, unknown>;
|
|
28794
|
+
enabled?: boolean;
|
|
28795
|
+
}, options?: RequestOptions) => Promise<unknown>;
|
|
28446
28796
|
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28447
28797
|
};
|
|
28448
28798
|
};
|
|
@@ -28753,225 +29103,6 @@ declare class Webhooks {
|
|
|
28753
29103
|
static safeVerify(payload: string, signatureHeader: string, secret: string, options?: WebhookVerifyOptions): Promise<boolean>;
|
|
28754
29104
|
}
|
|
28755
29105
|
|
|
28756
|
-
/**
|
|
28757
|
-
* Social media management namespace — accounts, posts, metrics, and campaigns.
|
|
28758
|
-
*
|
|
28759
|
-
* Covers the full social publishing lifecycle: connect accounts, create and
|
|
28760
|
-
* schedule posts, collect engagement metrics, and run AI-powered social campaigns.
|
|
28761
|
-
*
|
|
28762
|
-
* @example
|
|
28763
|
-
* ```typescript
|
|
28764
|
-
* const client = new GptClient({ apiKey: 'sk_app_...' });
|
|
28765
|
-
*
|
|
28766
|
-
* // List connected accounts
|
|
28767
|
-
* const accounts = await client.social.accounts.listByWorkspace('ws_abc');
|
|
28768
|
-
*
|
|
28769
|
-
* // Create and schedule a post
|
|
28770
|
-
* const post = await client.social.posts.create({ ... });
|
|
28771
|
-
* await client.social.posts.schedule(post.id, '2026-03-10T12:00:00Z');
|
|
28772
|
-
*
|
|
28773
|
-
* // Get latest metrics
|
|
28774
|
-
* const metrics = await client.social.metrics.latestForPost(post.id);
|
|
28775
|
-
* ```
|
|
28776
|
-
*/
|
|
28777
|
-
declare function createSocialNamespace(rb: RequestBuilder): {
|
|
28778
|
-
/** Social account management — connect, enable/disable, and deactivate accounts. */
|
|
28779
|
-
accounts: {
|
|
28780
|
-
/** List social accounts for a workspace. */
|
|
28781
|
-
listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28782
|
-
/** List social accounts by platform (e.g. "twitter", "instagram"). */
|
|
28783
|
-
listByPlatform: (platform: string, options?: RequestOptions) => Promise<unknown>;
|
|
28784
|
-
/** Get a single social account by ID. */
|
|
28785
|
-
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28786
|
-
/** Connect a new social account. */
|
|
28787
|
-
create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
|
|
28788
|
-
/** Update a social account. */
|
|
28789
|
-
update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
|
|
28790
|
-
/** Delete a social account. */
|
|
28791
|
-
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28792
|
-
/** Enable posting on an account. */
|
|
28793
|
-
enablePosting: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28794
|
-
/** Disable posting on an account. */
|
|
28795
|
-
disablePosting: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28796
|
-
/** Deactivate (disconnect) an account. */
|
|
28797
|
-
deactivate: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28798
|
-
};
|
|
28799
|
-
/** Social post management — create, schedule, publish, cancel, and retry posts. */
|
|
28800
|
-
posts: {
|
|
28801
|
-
/** Create a new social post draft. */
|
|
28802
|
-
create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
|
|
28803
|
-
/** Get a single post by ID. */
|
|
28804
|
-
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28805
|
-
/** Update a draft post. */
|
|
28806
|
-
update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
|
|
28807
|
-
/** Delete a post. */
|
|
28808
|
-
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28809
|
-
/** Schedule a post for future publishing. */
|
|
28810
|
-
schedule: (id: string, scheduledAt: string, options?: RequestOptions) => Promise<unknown>;
|
|
28811
|
-
/** Publish a post immediately. */
|
|
28812
|
-
publishNow: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28813
|
-
/** Cancel a scheduled or draft post. */
|
|
28814
|
-
cancel: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28815
|
-
/** Retry a failed post. */
|
|
28816
|
-
retry: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28817
|
-
/** Update SEO metadata on a post. */
|
|
28818
|
-
updateSeo: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
|
|
28819
|
-
/** List scheduled posts. */
|
|
28820
|
-
listScheduled: (options?: RequestOptions) => Promise<unknown>;
|
|
28821
|
-
/** List posts by account. */
|
|
28822
|
-
listByAccount: (socialAccountId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28823
|
-
/** List posts by campaign. */
|
|
28824
|
-
listByCampaign: (socialCampaignId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28825
|
-
/** List all posts for a workspace. */
|
|
28826
|
-
listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28827
|
-
};
|
|
28828
|
-
/** Post engagement metrics — impressions, reach, likes, comments, and more. */
|
|
28829
|
-
metrics: {
|
|
28830
|
-
/** Get a single metric record by ID. */
|
|
28831
|
-
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28832
|
-
/** List all metrics for a post. */
|
|
28833
|
-
listByPost: (socialPostId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28834
|
-
/** Get the latest metric per collection window for a post. */
|
|
28835
|
-
latestForPost: (socialPostId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28836
|
-
/** Aggregate metrics across all posts for a social account. */
|
|
28837
|
-
byAccount: (socialAccountId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28838
|
-
/** Aggregate metrics across all posts in a social campaign. */
|
|
28839
|
-
byCampaign: (socialCampaignId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28840
|
-
};
|
|
28841
|
-
/** AI-powered social campaigns — generate master copy and adapt for platforms. */
|
|
28842
|
-
campaigns: {
|
|
28843
|
-
/** List all social campaigns. */
|
|
28844
|
-
list: (options?: RequestOptions) => Promise<unknown>;
|
|
28845
|
-
/** Get a single campaign by ID. */
|
|
28846
|
-
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28847
|
-
/** Create a new social campaign. */
|
|
28848
|
-
create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
|
|
28849
|
-
/** Update a campaign. */
|
|
28850
|
-
update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
|
|
28851
|
-
/** Delete a campaign. */
|
|
28852
|
-
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28853
|
-
/** Schedule a campaign for a future date. */
|
|
28854
|
-
schedule: (id: string, scheduledAt: string, options?: RequestOptions) => Promise<unknown>;
|
|
28855
|
-
/** Cancel a campaign. */
|
|
28856
|
-
cancel: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28857
|
-
/** Generate AI master copy from the campaign's content brief. */
|
|
28858
|
-
generateMasterCopy: (id: string, workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28859
|
-
/** Adapt master copy for target platforms and create SocialPost drafts. */
|
|
28860
|
-
adaptForPlatforms: (id: string, workspaceId: string, socialAccountId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28861
|
-
};
|
|
28862
|
-
/** Trending content discovery — snapshots, items, and watch alerts. */
|
|
28863
|
-
trending: {
|
|
28864
|
-
/**
|
|
28865
|
-
* Get a trending snapshot by ID.
|
|
28866
|
-
* @param id - Snapshot UUID
|
|
28867
|
-
* @returns TrendingSnapshot with metadata (query, enrichment level, item count)
|
|
28868
|
-
* @example
|
|
28869
|
-
* ```typescript
|
|
28870
|
-
* const snapshot = await client.social.trending.get('snap_abc');
|
|
28871
|
-
* ```
|
|
28872
|
-
*/
|
|
28873
|
-
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28874
|
-
/**
|
|
28875
|
-
* List trending snapshots for a workspace.
|
|
28876
|
-
* @param workspaceId - Workspace UUID
|
|
28877
|
-
* @returns Array of TrendingSnapshot records
|
|
28878
|
-
* @example
|
|
28879
|
-
* ```typescript
|
|
28880
|
-
* const snapshots = await client.social.trending.listByWorkspace('ws_abc');
|
|
28881
|
-
* ```
|
|
28882
|
-
*/
|
|
28883
|
-
listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28884
|
-
/**
|
|
28885
|
-
* Create a trending snapshot (trigger on-demand collection).
|
|
28886
|
-
* @param attributes - Snapshot attributes (workspace_id, enrichment_level, etc.)
|
|
28887
|
-
* @returns Created TrendingSnapshot
|
|
28888
|
-
* @example
|
|
28889
|
-
* ```typescript
|
|
28890
|
-
* const snapshot = await client.social.trending.create({
|
|
28891
|
-
* workspace_id: 'ws_abc',
|
|
28892
|
-
* enrichment_level: 'scored',
|
|
28893
|
-
* fetched_at: new Date().toISOString(),
|
|
28894
|
-
* });
|
|
28895
|
-
* ```
|
|
28896
|
-
*/
|
|
28897
|
-
create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
|
|
28898
|
-
/** Delete a trending snapshot by ID. */
|
|
28899
|
-
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28900
|
-
/**
|
|
28901
|
-
* List trending snapshots within a date range.
|
|
28902
|
-
* @param from - Start date (ISO 8601 string)
|
|
28903
|
-
* @param to - End date (ISO 8601 string)
|
|
28904
|
-
* @returns Array of TrendingSnapshot records in the range
|
|
28905
|
-
* @example
|
|
28906
|
-
* ```typescript
|
|
28907
|
-
* const snapshots = await client.social.trending.listByDateRange(
|
|
28908
|
-
* '2026-03-01T00:00:00Z',
|
|
28909
|
-
* '2026-03-21T23:59:59Z',
|
|
28910
|
-
* );
|
|
28911
|
-
* ```
|
|
28912
|
-
*/
|
|
28913
|
-
listByDateRange: (from: string, to: string, options?: RequestOptions) => Promise<unknown>;
|
|
28914
|
-
/** Trending snapshot items — individual content pieces within a snapshot. */
|
|
28915
|
-
items: {
|
|
28916
|
-
/** Get a single trending item by ID. */
|
|
28917
|
-
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28918
|
-
/**
|
|
28919
|
-
* List trending items for a snapshot.
|
|
28920
|
-
* @param snapshotId - Parent snapshot UUID
|
|
28921
|
-
* @returns Array of TrendingSnapshotItem records
|
|
28922
|
-
* @example
|
|
28923
|
-
* ```typescript
|
|
28924
|
-
* const items = await client.social.trending.items.listBySnapshot('snap_abc');
|
|
28925
|
-
* ```
|
|
28926
|
-
*/
|
|
28927
|
-
listBySnapshot: (snapshotId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28928
|
-
};
|
|
28929
|
-
};
|
|
28930
|
-
/** Trending watch alerts — monitor topics and get notified on matches. */
|
|
28931
|
-
watches: {
|
|
28932
|
-
/**
|
|
28933
|
-
* Get a trending watch by ID.
|
|
28934
|
-
* @param id - Watch UUID
|
|
28935
|
-
* @returns TrendingWatch with conditions and notification config
|
|
28936
|
-
*/
|
|
28937
|
-
get: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28938
|
-
/**
|
|
28939
|
-
* List trending watches for a workspace.
|
|
28940
|
-
* @param workspaceId - Workspace UUID
|
|
28941
|
-
* @returns Array of TrendingWatch records
|
|
28942
|
-
* @example
|
|
28943
|
-
* ```typescript
|
|
28944
|
-
* const watches = await client.social.watches.listByWorkspace('ws_abc');
|
|
28945
|
-
* ```
|
|
28946
|
-
*/
|
|
28947
|
-
listByWorkspace: (workspaceId: string, options?: RequestOptions) => Promise<unknown>;
|
|
28948
|
-
/**
|
|
28949
|
-
* Create a new trending watch alert.
|
|
28950
|
-
* @param attributes - Watch attributes (name, query, conditions, notification_config)
|
|
28951
|
-
* @returns Created TrendingWatch
|
|
28952
|
-
* @example
|
|
28953
|
-
* ```typescript
|
|
28954
|
-
* const watch = await client.social.watches.create({
|
|
28955
|
-
* workspace_id: 'ws_abc',
|
|
28956
|
-
* name: 'AI Industry News',
|
|
28957
|
-
* query: 'artificial intelligence',
|
|
28958
|
-
* conditions: { min_score: 0.7 },
|
|
28959
|
-
* notification_config: { channel: 'webhook', url: 'https://...' },
|
|
28960
|
-
* });
|
|
28961
|
-
* ```
|
|
28962
|
-
*/
|
|
28963
|
-
create: (attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
|
|
28964
|
-
/**
|
|
28965
|
-
* Update a trending watch.
|
|
28966
|
-
* @param id - Watch UUID
|
|
28967
|
-
* @param attributes - Fields to update (name, query, conditions, enabled, etc.)
|
|
28968
|
-
*/
|
|
28969
|
-
update: (id: string, attributes: Record<string, unknown>, options?: RequestOptions) => Promise<unknown>;
|
|
28970
|
-
/** Delete a trending watch by ID. */
|
|
28971
|
-
delete: (id: string, options?: RequestOptions) => Promise<unknown>;
|
|
28972
|
-
};
|
|
28973
|
-
};
|
|
28974
|
-
|
|
28975
29106
|
/**
|
|
28976
29107
|
* Creates the memory namespace for structured document section navigation.
|
|
28977
29108
|
*
|