@getsupervisor/agents-studio-sdk 1.10.0 → 1.12.0

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.cts CHANGED
@@ -350,6 +350,8 @@ type ClientConfig = {
350
350
  getWorkspaceId?: () => string | undefined;
351
351
  apiKey?: string;
352
352
  getApiKey?: () => string | undefined;
353
+ accessToken?: string;
354
+ getAccessToken?: () => string | undefined;
353
355
  };
354
356
  type AgentDetail = components['schemas']['AgentDetail'];
355
357
  type AgentSummary = components['schemas']['AgentSummary'];
@@ -372,6 +374,28 @@ type WorkspaceEnableRequest = components['schemas']['WorkspaceEnableRequest'];
372
374
  type WorkspaceEnableResponse = components['schemas']['WorkspaceEnableResponse'];
373
375
  type VoiceSummary = components['schemas']['VoiceSummary'];
374
376
  type VoiceListResponse = components['schemas']['VoiceListResponse'];
377
+ type ApiKeySummary = {
378
+ id: string;
379
+ name: string;
380
+ description?: string | null;
381
+ scopes: string[];
382
+ environment: 'production' | 'sandbox' | 'staging' | 'development';
383
+ keyPreview: string;
384
+ createdAt: string;
385
+ updatedAt: string;
386
+ lastUsedAt?: string | null;
387
+ revokedAt?: string | null;
388
+ };
389
+ type ApiKeyListResponse = ApiKeySummary[];
390
+ type CreateApiKeyRequest = {
391
+ name: string;
392
+ description?: string | null;
393
+ environment?: 'production' | 'sandbox' | 'staging' | 'development';
394
+ scopes?: string[];
395
+ };
396
+ type CreateApiKeyResponse = ApiKeySummary & {
397
+ key: string;
398
+ };
375
399
  type AgentSchedule = components['schemas']['AgentSchedule'];
376
400
  type UpdateAgentScheduleRequest = components['schemas']['UpdateAgentScheduleRequest'];
377
401
  type AgentVersionSummary = components['schemas']['AgentVersionSummary'];
@@ -379,6 +403,64 @@ type AgentVersionDetail = components['schemas']['AgentVersionDetail'];
379
403
  type AgentVersionListResponse = components['schemas']['AgentVersionListResponse'];
380
404
  type CreateAgentVersionRequest = components['schemas']['CreateAgentVersionRequest'];
381
405
  type UpdateAgentVersionRequest = components['schemas']['UpdateAgentVersionRequest'];
406
+ type AgentBlueprint = {
407
+ id: string;
408
+ agentId: string;
409
+ versionId: string;
410
+ versionStatus: 'draft' | 'active' | 'archived';
411
+ languageId: string;
412
+ personalityName: string;
413
+ personalityRole: string;
414
+ targetAudience: string;
415
+ mainGoal: string;
416
+ personalityInitialGreeting: string;
417
+ personalityMessageStyleId: string;
418
+ personalityToneStyleId: string;
419
+ requiredData: Record<string, unknown>[];
420
+ criticalRules: string[];
421
+ topicsAllowed: string[];
422
+ topicsForbidden: string[];
423
+ createdAt: string;
424
+ updatedAt: string;
425
+ };
426
+ type AgentBlueprintListItem = {
427
+ versionId: string;
428
+ status: 'draft' | 'active' | 'archived';
429
+ createdAt: string;
430
+ updatedAt: string;
431
+ blueprint: AgentBlueprint;
432
+ };
433
+ type AgentBlueprintListResponse = {
434
+ data: AgentBlueprintListItem[];
435
+ };
436
+ type CreateAgentBlueprintRequest = {
437
+ languageId: string;
438
+ personalityName: string;
439
+ personalityRole: string;
440
+ targetAudience: string;
441
+ mainGoal: string;
442
+ personalityInitialGreeting: string;
443
+ personalityMessageStyleId: string;
444
+ personalityToneStyleId: string;
445
+ requiredData?: Record<string, unknown>[];
446
+ criticalRules?: string[];
447
+ topicsAllowed?: string[];
448
+ topicsForbidden?: string[];
449
+ };
450
+ type UpdateAgentBlueprintRequest = {
451
+ languageId?: string;
452
+ personalityName?: string;
453
+ personalityRole?: string;
454
+ targetAudience?: string;
455
+ mainGoal?: string;
456
+ personalityInitialGreeting?: string;
457
+ personalityMessageStyleId?: string;
458
+ personalityToneStyleId?: string;
459
+ requiredData?: Record<string, unknown>[];
460
+ criticalRules?: string[];
461
+ topicsAllowed?: string[];
462
+ topicsForbidden?: string[];
463
+ };
382
464
  type ExecuteToolRequest = components['schemas']['ExecuteToolRequest'];
383
465
  type ExecuteToolResponse = components['schemas']['ExecuteToolResponse'];
384
466
  type ToolSummary = components['schemas']['ToolSummary'];
@@ -416,6 +498,17 @@ type RetryPolicy = {
416
498
  retryOn?: (err: unknown, attempt: number) => boolean;
417
499
  };
418
500
 
501
+ type ListAgentBlueprintsOptions = Pick<ListQueryOptions, 'filter'>;
502
+ type AgentBlueprintsApi$1 = {
503
+ list(agentId: string, options?: ListAgentBlueprintsOptions): Promise<AgentBlueprintListResponse>;
504
+ get(agentId: string, versionId: string): Promise<AgentBlueprint>;
505
+ create(agentId: string, versionId: string, payload: CreateAgentBlueprintRequest): Promise<AgentBlueprint>;
506
+ update(agentId: string, versionId: string, payload: UpdateAgentBlueprintRequest): Promise<AgentBlueprint>;
507
+ };
508
+ declare function createAgentBlueprintsApi(cfg: ClientConfig & {
509
+ retry?: RetryPolicy;
510
+ }): AgentBlueprintsApi$1;
511
+
419
512
  type ListAgentInstructionsOptions = ListQueryOptions & {
420
513
  versionId?: string;
421
514
  };
@@ -472,11 +565,13 @@ type AgentTagsApi = ReturnType<typeof createAgentTagsApi>;
472
565
  type AgentPhonesApi = ReturnType<typeof createAgentPhonesApi>;
473
566
  type AgentScheduleApi = ReturnType<typeof createAgentScheduleApi>;
474
567
  type AgentVersionsApi = ReturnType<typeof createAgentVersionsApi>;
568
+ type AgentBlueprintsApi = ReturnType<typeof createAgentBlueprintsApi>;
475
569
  type AgentInstructionsHelper = ReturnType<typeof bindAgentInstructions>;
476
570
  type AgentTagsHelper = ReturnType<typeof bindAgentTags>;
477
571
  type AgentPhonesHelper = ReturnType<typeof bindAgentPhones>;
478
572
  type AgentScheduleHelper = ReturnType<typeof bindAgentSchedule>;
479
573
  type AgentVersionsHelper = ReturnType<typeof bindAgentVersions>;
574
+ type AgentBlueprintsHelper = ReturnType<typeof bindAgentBlueprints>;
480
575
  type AgentBase = AgentSummary & Partial<Omit<AgentDetail, keyof AgentSummary>>;
481
576
  interface AgentEntity extends AgentBase {
482
577
  instructions: AgentInstructionsHelper;
@@ -484,6 +579,7 @@ interface AgentEntity extends AgentBase {
484
579
  phones: AgentPhonesHelper;
485
580
  schedule: AgentScheduleHelper;
486
581
  versions: AgentVersionsHelper;
582
+ blueprints: AgentBlueprintsHelper;
487
583
  save(patch: UpdateAgentRequest): Promise<AgentEntity>;
488
584
  delete(): Promise<void>;
489
585
  refresh(): Promise<AgentEntity>;
@@ -494,6 +590,7 @@ type AgentEntityFactoryOptions = {
494
590
  phonesApi: AgentPhonesApi;
495
591
  scheduleApi: AgentScheduleApi;
496
592
  versionsApi: AgentVersionsApi;
593
+ blueprintsApi: AgentBlueprintsApi;
497
594
  reload(agentId: string): Promise<AgentEntity>;
498
595
  updateAgent(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
499
596
  deleteAgent(agentId: string): Promise<void>;
@@ -628,6 +725,14 @@ declare const bindAgentVersions: (api: AgentVersionsApi, agentId: string) => {
628
725
  readonly delete: (instructionId: string) => Promise<void>;
629
726
  };
630
727
  };
728
+ declare const bindAgentBlueprints: (api: AgentBlueprintsApi, agentId: string) => {
729
+ list(opts?: ListAgentBlueprintsOptions): Promise<AgentBlueprintListResponse>;
730
+ version(versionId: string): {
731
+ readonly get: () => Promise<AgentBlueprint>;
732
+ readonly create: (payload: CreateAgentBlueprintRequest) => Promise<AgentBlueprint>;
733
+ readonly update: (payload: UpdateAgentBlueprintRequest) => Promise<AgentBlueprint>;
734
+ };
735
+ };
631
736
  type AgentSnapshot = AgentDetail | AgentSummary;
632
737
  declare const createAgentEntity: (dto: AgentSnapshot, options: AgentEntityFactoryOptions) => AgentEntity;
633
738
 
@@ -637,6 +742,7 @@ type AgentEntityDependencies = {
637
742
  phonesApi: ReturnType<typeof createAgentPhonesApi>;
638
743
  scheduleApi: ReturnType<typeof createAgentScheduleApi>;
639
744
  versionsApi: ReturnType<typeof createAgentVersionsApi>;
745
+ blueprintsApi: ReturnType<typeof createAgentBlueprintsApi>;
640
746
  };
641
747
  type ListAgentsOptions = Pick<ListQueryOptions, 'page' | 'limit' | 'filter'>;
642
748
  type AgentsApi = {
@@ -659,6 +765,16 @@ declare function createAgentsApi(cfg: ClientConfig & {
659
765
  retry?: RetryPolicy;
660
766
  }, relatedApis?: AgentEntityDependencies): AgentsApi | AgentsApiWithEntities;
661
767
 
768
+ type ApiKeysApi = {
769
+ list(): Promise<ApiKeyListResponse>;
770
+ create(payload: CreateApiKeyRequest): Promise<CreateApiKeyResponse>;
771
+ revoke(apiKeyId: string): Promise<void>;
772
+ show(apiKeyId: string): Promise<CreateApiKeyResponse>;
773
+ };
774
+ declare function createApiKeysApi(cfg: ClientConfig & {
775
+ retry?: RetryPolicy;
776
+ }): ApiKeysApi;
777
+
662
778
  type ListToolsOptions = ListQueryOptions & {
663
779
  agentType?: 'chat' | 'voice';
664
780
  };
@@ -712,6 +828,10 @@ declare function createClient(initialCfg: ClientConfig & {
712
828
  setApiKey(key?: string): void;
713
829
  useApiKey(getter?: () => string | undefined): void;
714
830
  clearApiKey(): void;
831
+ getAccessToken: () => string;
832
+ setAccessToken(token?: string): void;
833
+ useAccessToken(getter?: () => string | undefined): void;
834
+ clearAccessToken(): void;
715
835
  };
716
836
  workspace: {
717
837
  get: () => string;
@@ -724,6 +844,10 @@ declare function createClient(initialCfg: ClientConfig & {
724
844
  setApiKey(key?: string): void;
725
845
  useApiKey(getter?: () => string | undefined): void;
726
846
  clearApiKey(): void;
847
+ getAccessToken: () => string;
848
+ setAccessToken(token?: string): void;
849
+ useAccessToken(getter?: () => string | undefined): void;
850
+ clearAccessToken(): void;
727
851
  };
728
852
  workspace: {
729
853
  get: () => string;
@@ -762,6 +886,7 @@ declare function createClient(initialCfg: ClientConfig & {
762
886
  updateInstruction(agentId: string, versionId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
763
887
  deleteInstruction(agentId: string, versionId: string, instructionId: string): Promise<void>;
764
888
  } & ((agentId: string) => ReturnType<typeof bindAgentVersions>);
889
+ blueprints: AgentBlueprintsApi$1 & ((agentId: string) => ReturnType<typeof bindAgentBlueprints>);
765
890
  delete: (agent: string | AgentEntity) => Promise<void>;
766
891
  list(options?: ListAgentsOptions): Promise<PaginatedResult<Omit<{
767
892
  data: components["schemas"]["AgentSummary"][];
@@ -798,6 +923,7 @@ declare function createClient(initialCfg: ClientConfig & {
798
923
  voices: {
799
924
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
800
925
  };
926
+ apiKeys: ApiKeysApi;
801
927
  };
802
928
  };
803
929
  agents: {
@@ -830,6 +956,7 @@ declare function createClient(initialCfg: ClientConfig & {
830
956
  updateInstruction(agentId: string, versionId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
831
957
  deleteInstruction(agentId: string, versionId: string, instructionId: string): Promise<void>;
832
958
  } & ((agentId: string) => ReturnType<typeof bindAgentVersions>);
959
+ blueprints: AgentBlueprintsApi$1 & ((agentId: string) => ReturnType<typeof bindAgentBlueprints>);
833
960
  delete: (agent: string | AgentEntity) => Promise<void>;
834
961
  list(options?: ListAgentsOptions): Promise<PaginatedResult<Omit<{
835
962
  data: components["schemas"]["AgentSummary"][];
@@ -866,6 +993,7 @@ declare function createClient(initialCfg: ClientConfig & {
866
993
  voices: {
867
994
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
868
995
  };
996
+ apiKeys: ApiKeysApi;
869
997
  };
870
998
 
871
999
  type QueryParamPrimitive = string | number | boolean;
@@ -888,6 +1016,7 @@ declare function createHttp(cfg: ClientConfig & {
888
1016
  buildHeaders: (extra?: HeadersInit) => Record<string, string>;
889
1017
  resolveWorkspaceId: () => string;
890
1018
  resolveApiKey: () => string;
1019
+ resolveAccessToken: () => string;
891
1020
  };
892
1021
 
893
- export { type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ClientConfig, type ConnectPhoneRequest, type CreateAgentRequest, type CreateAgentVersionRequest, type CreateInstructionRequest, type ErrorResponse, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentInstructionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWorkspacePhonesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionRequest, type UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentTags, bindAgentVersions, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };
1022
+ export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateInstructionRequest, type ErrorResponse, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWorkspacePhonesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentBlueprintRequest, type UpdateAgentRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionRequest, type UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };
package/dist/index.d.ts CHANGED
@@ -350,6 +350,8 @@ type ClientConfig = {
350
350
  getWorkspaceId?: () => string | undefined;
351
351
  apiKey?: string;
352
352
  getApiKey?: () => string | undefined;
353
+ accessToken?: string;
354
+ getAccessToken?: () => string | undefined;
353
355
  };
354
356
  type AgentDetail = components['schemas']['AgentDetail'];
355
357
  type AgentSummary = components['schemas']['AgentSummary'];
@@ -372,6 +374,28 @@ type WorkspaceEnableRequest = components['schemas']['WorkspaceEnableRequest'];
372
374
  type WorkspaceEnableResponse = components['schemas']['WorkspaceEnableResponse'];
373
375
  type VoiceSummary = components['schemas']['VoiceSummary'];
374
376
  type VoiceListResponse = components['schemas']['VoiceListResponse'];
377
+ type ApiKeySummary = {
378
+ id: string;
379
+ name: string;
380
+ description?: string | null;
381
+ scopes: string[];
382
+ environment: 'production' | 'sandbox' | 'staging' | 'development';
383
+ keyPreview: string;
384
+ createdAt: string;
385
+ updatedAt: string;
386
+ lastUsedAt?: string | null;
387
+ revokedAt?: string | null;
388
+ };
389
+ type ApiKeyListResponse = ApiKeySummary[];
390
+ type CreateApiKeyRequest = {
391
+ name: string;
392
+ description?: string | null;
393
+ environment?: 'production' | 'sandbox' | 'staging' | 'development';
394
+ scopes?: string[];
395
+ };
396
+ type CreateApiKeyResponse = ApiKeySummary & {
397
+ key: string;
398
+ };
375
399
  type AgentSchedule = components['schemas']['AgentSchedule'];
376
400
  type UpdateAgentScheduleRequest = components['schemas']['UpdateAgentScheduleRequest'];
377
401
  type AgentVersionSummary = components['schemas']['AgentVersionSummary'];
@@ -379,6 +403,64 @@ type AgentVersionDetail = components['schemas']['AgentVersionDetail'];
379
403
  type AgentVersionListResponse = components['schemas']['AgentVersionListResponse'];
380
404
  type CreateAgentVersionRequest = components['schemas']['CreateAgentVersionRequest'];
381
405
  type UpdateAgentVersionRequest = components['schemas']['UpdateAgentVersionRequest'];
406
+ type AgentBlueprint = {
407
+ id: string;
408
+ agentId: string;
409
+ versionId: string;
410
+ versionStatus: 'draft' | 'active' | 'archived';
411
+ languageId: string;
412
+ personalityName: string;
413
+ personalityRole: string;
414
+ targetAudience: string;
415
+ mainGoal: string;
416
+ personalityInitialGreeting: string;
417
+ personalityMessageStyleId: string;
418
+ personalityToneStyleId: string;
419
+ requiredData: Record<string, unknown>[];
420
+ criticalRules: string[];
421
+ topicsAllowed: string[];
422
+ topicsForbidden: string[];
423
+ createdAt: string;
424
+ updatedAt: string;
425
+ };
426
+ type AgentBlueprintListItem = {
427
+ versionId: string;
428
+ status: 'draft' | 'active' | 'archived';
429
+ createdAt: string;
430
+ updatedAt: string;
431
+ blueprint: AgentBlueprint;
432
+ };
433
+ type AgentBlueprintListResponse = {
434
+ data: AgentBlueprintListItem[];
435
+ };
436
+ type CreateAgentBlueprintRequest = {
437
+ languageId: string;
438
+ personalityName: string;
439
+ personalityRole: string;
440
+ targetAudience: string;
441
+ mainGoal: string;
442
+ personalityInitialGreeting: string;
443
+ personalityMessageStyleId: string;
444
+ personalityToneStyleId: string;
445
+ requiredData?: Record<string, unknown>[];
446
+ criticalRules?: string[];
447
+ topicsAllowed?: string[];
448
+ topicsForbidden?: string[];
449
+ };
450
+ type UpdateAgentBlueprintRequest = {
451
+ languageId?: string;
452
+ personalityName?: string;
453
+ personalityRole?: string;
454
+ targetAudience?: string;
455
+ mainGoal?: string;
456
+ personalityInitialGreeting?: string;
457
+ personalityMessageStyleId?: string;
458
+ personalityToneStyleId?: string;
459
+ requiredData?: Record<string, unknown>[];
460
+ criticalRules?: string[];
461
+ topicsAllowed?: string[];
462
+ topicsForbidden?: string[];
463
+ };
382
464
  type ExecuteToolRequest = components['schemas']['ExecuteToolRequest'];
383
465
  type ExecuteToolResponse = components['schemas']['ExecuteToolResponse'];
384
466
  type ToolSummary = components['schemas']['ToolSummary'];
@@ -416,6 +498,17 @@ type RetryPolicy = {
416
498
  retryOn?: (err: unknown, attempt: number) => boolean;
417
499
  };
418
500
 
501
+ type ListAgentBlueprintsOptions = Pick<ListQueryOptions, 'filter'>;
502
+ type AgentBlueprintsApi$1 = {
503
+ list(agentId: string, options?: ListAgentBlueprintsOptions): Promise<AgentBlueprintListResponse>;
504
+ get(agentId: string, versionId: string): Promise<AgentBlueprint>;
505
+ create(agentId: string, versionId: string, payload: CreateAgentBlueprintRequest): Promise<AgentBlueprint>;
506
+ update(agentId: string, versionId: string, payload: UpdateAgentBlueprintRequest): Promise<AgentBlueprint>;
507
+ };
508
+ declare function createAgentBlueprintsApi(cfg: ClientConfig & {
509
+ retry?: RetryPolicy;
510
+ }): AgentBlueprintsApi$1;
511
+
419
512
  type ListAgentInstructionsOptions = ListQueryOptions & {
420
513
  versionId?: string;
421
514
  };
@@ -472,11 +565,13 @@ type AgentTagsApi = ReturnType<typeof createAgentTagsApi>;
472
565
  type AgentPhonesApi = ReturnType<typeof createAgentPhonesApi>;
473
566
  type AgentScheduleApi = ReturnType<typeof createAgentScheduleApi>;
474
567
  type AgentVersionsApi = ReturnType<typeof createAgentVersionsApi>;
568
+ type AgentBlueprintsApi = ReturnType<typeof createAgentBlueprintsApi>;
475
569
  type AgentInstructionsHelper = ReturnType<typeof bindAgentInstructions>;
476
570
  type AgentTagsHelper = ReturnType<typeof bindAgentTags>;
477
571
  type AgentPhonesHelper = ReturnType<typeof bindAgentPhones>;
478
572
  type AgentScheduleHelper = ReturnType<typeof bindAgentSchedule>;
479
573
  type AgentVersionsHelper = ReturnType<typeof bindAgentVersions>;
574
+ type AgentBlueprintsHelper = ReturnType<typeof bindAgentBlueprints>;
480
575
  type AgentBase = AgentSummary & Partial<Omit<AgentDetail, keyof AgentSummary>>;
481
576
  interface AgentEntity extends AgentBase {
482
577
  instructions: AgentInstructionsHelper;
@@ -484,6 +579,7 @@ interface AgentEntity extends AgentBase {
484
579
  phones: AgentPhonesHelper;
485
580
  schedule: AgentScheduleHelper;
486
581
  versions: AgentVersionsHelper;
582
+ blueprints: AgentBlueprintsHelper;
487
583
  save(patch: UpdateAgentRequest): Promise<AgentEntity>;
488
584
  delete(): Promise<void>;
489
585
  refresh(): Promise<AgentEntity>;
@@ -494,6 +590,7 @@ type AgentEntityFactoryOptions = {
494
590
  phonesApi: AgentPhonesApi;
495
591
  scheduleApi: AgentScheduleApi;
496
592
  versionsApi: AgentVersionsApi;
593
+ blueprintsApi: AgentBlueprintsApi;
497
594
  reload(agentId: string): Promise<AgentEntity>;
498
595
  updateAgent(agentId: string, payload: UpdateAgentRequest): Promise<AgentEntity>;
499
596
  deleteAgent(agentId: string): Promise<void>;
@@ -628,6 +725,14 @@ declare const bindAgentVersions: (api: AgentVersionsApi, agentId: string) => {
628
725
  readonly delete: (instructionId: string) => Promise<void>;
629
726
  };
630
727
  };
728
+ declare const bindAgentBlueprints: (api: AgentBlueprintsApi, agentId: string) => {
729
+ list(opts?: ListAgentBlueprintsOptions): Promise<AgentBlueprintListResponse>;
730
+ version(versionId: string): {
731
+ readonly get: () => Promise<AgentBlueprint>;
732
+ readonly create: (payload: CreateAgentBlueprintRequest) => Promise<AgentBlueprint>;
733
+ readonly update: (payload: UpdateAgentBlueprintRequest) => Promise<AgentBlueprint>;
734
+ };
735
+ };
631
736
  type AgentSnapshot = AgentDetail | AgentSummary;
632
737
  declare const createAgentEntity: (dto: AgentSnapshot, options: AgentEntityFactoryOptions) => AgentEntity;
633
738
 
@@ -637,6 +742,7 @@ type AgentEntityDependencies = {
637
742
  phonesApi: ReturnType<typeof createAgentPhonesApi>;
638
743
  scheduleApi: ReturnType<typeof createAgentScheduleApi>;
639
744
  versionsApi: ReturnType<typeof createAgentVersionsApi>;
745
+ blueprintsApi: ReturnType<typeof createAgentBlueprintsApi>;
640
746
  };
641
747
  type ListAgentsOptions = Pick<ListQueryOptions, 'page' | 'limit' | 'filter'>;
642
748
  type AgentsApi = {
@@ -659,6 +765,16 @@ declare function createAgentsApi(cfg: ClientConfig & {
659
765
  retry?: RetryPolicy;
660
766
  }, relatedApis?: AgentEntityDependencies): AgentsApi | AgentsApiWithEntities;
661
767
 
768
+ type ApiKeysApi = {
769
+ list(): Promise<ApiKeyListResponse>;
770
+ create(payload: CreateApiKeyRequest): Promise<CreateApiKeyResponse>;
771
+ revoke(apiKeyId: string): Promise<void>;
772
+ show(apiKeyId: string): Promise<CreateApiKeyResponse>;
773
+ };
774
+ declare function createApiKeysApi(cfg: ClientConfig & {
775
+ retry?: RetryPolicy;
776
+ }): ApiKeysApi;
777
+
662
778
  type ListToolsOptions = ListQueryOptions & {
663
779
  agentType?: 'chat' | 'voice';
664
780
  };
@@ -712,6 +828,10 @@ declare function createClient(initialCfg: ClientConfig & {
712
828
  setApiKey(key?: string): void;
713
829
  useApiKey(getter?: () => string | undefined): void;
714
830
  clearApiKey(): void;
831
+ getAccessToken: () => string;
832
+ setAccessToken(token?: string): void;
833
+ useAccessToken(getter?: () => string | undefined): void;
834
+ clearAccessToken(): void;
715
835
  };
716
836
  workspace: {
717
837
  get: () => string;
@@ -724,6 +844,10 @@ declare function createClient(initialCfg: ClientConfig & {
724
844
  setApiKey(key?: string): void;
725
845
  useApiKey(getter?: () => string | undefined): void;
726
846
  clearApiKey(): void;
847
+ getAccessToken: () => string;
848
+ setAccessToken(token?: string): void;
849
+ useAccessToken(getter?: () => string | undefined): void;
850
+ clearAccessToken(): void;
727
851
  };
728
852
  workspace: {
729
853
  get: () => string;
@@ -762,6 +886,7 @@ declare function createClient(initialCfg: ClientConfig & {
762
886
  updateInstruction(agentId: string, versionId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
763
887
  deleteInstruction(agentId: string, versionId: string, instructionId: string): Promise<void>;
764
888
  } & ((agentId: string) => ReturnType<typeof bindAgentVersions>);
889
+ blueprints: AgentBlueprintsApi$1 & ((agentId: string) => ReturnType<typeof bindAgentBlueprints>);
765
890
  delete: (agent: string | AgentEntity) => Promise<void>;
766
891
  list(options?: ListAgentsOptions): Promise<PaginatedResult<Omit<{
767
892
  data: components["schemas"]["AgentSummary"][];
@@ -798,6 +923,7 @@ declare function createClient(initialCfg: ClientConfig & {
798
923
  voices: {
799
924
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
800
925
  };
926
+ apiKeys: ApiKeysApi;
801
927
  };
802
928
  };
803
929
  agents: {
@@ -830,6 +956,7 @@ declare function createClient(initialCfg: ClientConfig & {
830
956
  updateInstruction(agentId: string, versionId: string, instructionId: string, payload: UpdateInstructionRequest): Promise<Instruction>;
831
957
  deleteInstruction(agentId: string, versionId: string, instructionId: string): Promise<void>;
832
958
  } & ((agentId: string) => ReturnType<typeof bindAgentVersions>);
959
+ blueprints: AgentBlueprintsApi$1 & ((agentId: string) => ReturnType<typeof bindAgentBlueprints>);
833
960
  delete: (agent: string | AgentEntity) => Promise<void>;
834
961
  list(options?: ListAgentsOptions): Promise<PaginatedResult<Omit<{
835
962
  data: components["schemas"]["AgentSummary"][];
@@ -866,6 +993,7 @@ declare function createClient(initialCfg: ClientConfig & {
866
993
  voices: {
867
994
  list(options?: ListVoicesOptions): Promise<PaginatedResult<VoiceListResponse, ListVoicesOptions>>;
868
995
  };
996
+ apiKeys: ApiKeysApi;
869
997
  };
870
998
 
871
999
  type QueryParamPrimitive = string | number | boolean;
@@ -888,6 +1016,7 @@ declare function createHttp(cfg: ClientConfig & {
888
1016
  buildHeaders: (extra?: HeadersInit) => Record<string, string>;
889
1017
  resolveWorkspaceId: () => string;
890
1018
  resolveApiKey: () => string;
1019
+ resolveAccessToken: () => string;
891
1020
  };
892
1021
 
893
- export { type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ClientConfig, type ConnectPhoneRequest, type CreateAgentRequest, type CreateAgentVersionRequest, type CreateInstructionRequest, type ErrorResponse, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentInstructionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWorkspacePhonesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionRequest, type UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentTags, bindAgentVersions, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };
1022
+ export { type AgentBlueprint, type AgentBlueprintListItem, type AgentBlueprintListResponse, type AgentBlueprintsApi$1 as AgentBlueprintsApi, type AgentDetail, type AgentEntity, type AgentEntityFactoryOptions, type AgentListResponse, type AgentSchedule, type AgentSummary, type AgentTagRequest, type AgentTagsResponse, type AgentVersionDetail, type AgentVersionListResponse, type AgentVersionSummary, type AgentsApi, type AgentsApiWithEntities, type ApiKeyListResponse, type ApiKeySummary, type ApiKeysApi, type ClientConfig, type ConnectPhoneRequest, type CreateAgentBlueprintRequest, type CreateAgentRequest, type CreateAgentVersionRequest, type CreateApiKeyRequest, type CreateApiKeyResponse, type CreateInstructionRequest, type ErrorResponse, type ExecuteToolRequest, type ExecuteToolResponse, HttpError, type Instruction, type InstructionCreatedResponse, type InstructionListResponse, type ListAgentBlueprintsOptions, type ListAgentInstructionsOptions, type ListAgentVersionInstructionsOptions, type ListAgentVersionsOptions, type ListAgentsOptions, type ListQueryOptions, type ListToolResourcesOptions, type ListToolsOptions, type ListVoicesOptions, type ListWorkspacePhonesOptions, NetworkError, type PaginatedResult, type PaginationMeta, type PhoneAssignmentResponse, type QueryBuilderInput, type QueryBuilderSerializable, type QueryFilterOperators, type QueryFilters, type QueryOrGroups, type QueryValue, type RetryPolicy, TimeoutError, type ToolConnectionRequest, type ToolConnectionResponse, type ToolListResponse, type ToolResourceListResponse, type ToolResourceReloadResponse, type ToolResourceSummary, type ToolResourceUploadRequest, type ToolResourceUploadResponse, type ToolSummary, type UpdateAgentBlueprintRequest, type UpdateAgentRequest, type UpdateAgentScheduleRequest, type UpdateAgentVersionRequest, type UpdateInstructionRequest, type VoiceListResponse, type VoiceSummary, type WorkspaceEnableRequest, type WorkspaceEnableResponse, type WorkspacePhone, type WorkspacePhoneChannel, type WorkspacePhonesResponse, bindAgentBlueprints, bindAgentInstructions, bindAgentPhones, bindAgentSchedule, bindAgentTags, bindAgentVersions, createAgentBlueprintsApi, createAgentEntity, createAgentInstructionsApi, createAgentPhonesApi, createAgentScheduleApi, createAgentTagsApi, createAgentVersionsApi, createAgentsApi, createApiKeysApi, createClient, createHttp, createToolsApi, createVoicesApi, createWorkspacesApi };