@gravity-rail/sdk 0.18.0 → 0.21.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/{chunk-MP5ENP4Q.js → chunk-24L4RD4Z.js} +560 -136
- package/dist/chunk-24L4RD4Z.js.map +1 -0
- package/dist/{chunk-2YLKG4TT.js → chunk-3HAV5XUJ.js} +1 -1
- package/dist/chunk-3HAV5XUJ.js.map +1 -0
- package/dist/{chunk-PJFEGUHM.js → chunk-7OLBLLV7.js} +6 -2
- package/dist/{chunk-PJFEGUHM.js.map → chunk-7OLBLLV7.js.map} +1 -1
- package/dist/{client-B51HZ6zY.d.cts → client-B0eh2BEY.d.cts} +1592 -364
- package/dist/{client-G5i59XtT.d.ts → client-CFz-BGmY.d.ts} +1592 -364
- package/dist/helpers.cjs +141 -0
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +17 -3
- package/dist/helpers.d.ts +17 -3
- package/dist/helpers.js +127 -1
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +658 -129
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -5
- package/dist/index.d.ts +28 -5
- package/dist/index.js +123 -11
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +581 -140
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +724 -553
- package/dist/internal.d.ts +724 -553
- package/dist/internal.js +23 -13
- package/dist/internal.js.map +1 -1
- package/dist/{revision-state-Cc7RAf8A.d.ts → revision-state-KfOztBkY.d.ts} +147 -232
- package/dist/{revision-state-DudSCwea.d.cts → revision-state-fJ9PM15N.d.cts} +147 -232
- package/dist/schemas.cjs +32 -18
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +37 -35
- package/dist/schemas.d.ts +37 -35
- package/dist/schemas.js +32 -18
- package/dist/schemas.js.map +1 -1
- package/dist/{tasks-1JXJJuG8.d.cts → tasks-WH_VfzMv.d.cts} +351 -20
- package/dist/{tasks-1JXJJuG8.d.ts → tasks-WH_VfzMv.d.ts} +351 -20
- package/package.json +6 -6
- package/dist/chunk-2YLKG4TT.js.map +0 -1
- package/dist/chunk-MP5ENP4Q.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { eX as SortOrder } from './tasks-WH_VfzMv.cjs';
|
|
2
|
+
import { iA as Resource$1 } from './client-B0eh2BEY.cjs';
|
|
3
3
|
|
|
4
4
|
interface MemberNotificationPreferences {
|
|
5
5
|
notifySms?: boolean;
|
|
@@ -28,6 +28,37 @@ interface ToolParameter {
|
|
|
28
28
|
default?: any;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
/**
|
|
32
|
+
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
33
|
+
* (group map from emit_openapi.py). Do not edit manually.
|
|
34
|
+
* Group: device_content_cache
|
|
35
|
+
*/
|
|
36
|
+
interface DeviceCacheFileEntry {
|
|
37
|
+
id: number;
|
|
38
|
+
filename: string;
|
|
39
|
+
title: string;
|
|
40
|
+
mimeType: string;
|
|
41
|
+
byteSize?: number | null;
|
|
42
|
+
version: number;
|
|
43
|
+
hash?: string | null;
|
|
44
|
+
etag: string;
|
|
45
|
+
profile: string;
|
|
46
|
+
/** True when indexed-rle will rewrite this image on download */
|
|
47
|
+
transcoded: boolean;
|
|
48
|
+
}
|
|
49
|
+
interface DeviceCacheManifestResponse {
|
|
50
|
+
folderId: number;
|
|
51
|
+
profile: string;
|
|
52
|
+
etag: string;
|
|
53
|
+
files: DeviceCacheFileEntry[];
|
|
54
|
+
/** True when the folder has more than 500 files; only the first page is listed */
|
|
55
|
+
truncated: boolean;
|
|
56
|
+
/** Folder file count before the 500-file page cap */
|
|
57
|
+
total: number;
|
|
58
|
+
phiPostureDecision: string;
|
|
59
|
+
phiPostureReasonCode: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
31
62
|
/**
|
|
32
63
|
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
33
64
|
* (group map from emit_openapi.py). Do not edit manually.
|
|
@@ -43,34 +74,7 @@ interface AttachedAddonInfo {
|
|
|
43
74
|
providesFeatures: string[];
|
|
44
75
|
}
|
|
45
76
|
/**
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* The caller supplies the target product id only — the server resolves
|
|
49
|
-
* the active workspace SubscriptionItem, updates the matching Stripe
|
|
50
|
-
* workspace line item when one exists (``proration_behavior=none``),
|
|
51
|
-
* and re-syncs workspace features. Provisioning is not re-run.
|
|
52
|
-
*/
|
|
53
|
-
interface ChangeWorkspaceProductRequest {
|
|
54
|
-
productId: number;
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Response payload for a successful workspace product switch.
|
|
58
|
-
*/
|
|
59
|
-
interface ChangeWorkspaceProductResponse {
|
|
60
|
-
workspaceUuid: string;
|
|
61
|
-
subscriptionId: number;
|
|
62
|
-
subscriptionItemId: number;
|
|
63
|
-
previousProductId: number;
|
|
64
|
-
newProductId: number;
|
|
65
|
-
previousProductName: string;
|
|
66
|
-
newProductName: string;
|
|
67
|
-
addedFeatures: string[];
|
|
68
|
-
removedFeatures: string[];
|
|
69
|
-
stripeUpdated?: boolean;
|
|
70
|
-
stripeSkipReason?: string | null;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Information about the workspace's current plan.
|
|
77
|
+
* Information about the org plan this workspace's features come from.
|
|
74
78
|
*/
|
|
75
79
|
interface CurrentPlanInfo {
|
|
76
80
|
subscriptionId: number;
|
|
@@ -353,7 +357,9 @@ interface DailySMSRowResponse {
|
|
|
353
357
|
* Efficiency metrics summary.
|
|
354
358
|
*/
|
|
355
359
|
interface EfficiencyMetricsResponse {
|
|
360
|
+
/** Workspaces whose usage exceeded their ORGANIZATION's allowance on its own. The 'budget' is the organization's, not the workspace's. */
|
|
356
361
|
workspacesOverBudget: number;
|
|
362
|
+
/** Mean of each workspace's usage as a percentage of its ORGANIZATION's allowance. Workspaces sharing an organization each report a fraction of the same allowance, so this reads low for multi-workspace organizations. */
|
|
357
363
|
averageUtilizationRate: number;
|
|
358
364
|
}
|
|
359
365
|
/**
|
|
@@ -428,12 +434,18 @@ declare const Resource: {
|
|
|
428
434
|
readonly storage_mb: "storage_mb";
|
|
429
435
|
};
|
|
430
436
|
/**
|
|
431
|
-
* Resource overage details
|
|
437
|
+
* Resource overage details for one workspace and one resource.
|
|
438
|
+
*
|
|
439
|
+
* The allowance is the **organization's**; only ``used`` is the workspace's.
|
|
432
440
|
*/
|
|
433
441
|
interface ResourceOverageResponse {
|
|
434
|
-
|
|
442
|
+
/** The allowance the workspace's ORGANIZATION is granted for this resource, once per billing period. This is not a per-workspace budget — every workspace in the organization is measured against this same number, so it repeats across workspace rows. */
|
|
443
|
+
organizationIncluded: number;
|
|
444
|
+
/** This workspace's usage of the resource in the period. */
|
|
435
445
|
used: number;
|
|
446
|
+
/** ``used`` minus ``organizationIncluded``, floored at zero: this workspace's usage measured against the whole organization's allowance. */
|
|
436
447
|
overageAmount: number;
|
|
448
|
+
/** ``overageAmount`` priced at the plan's overage rate. Not additive across workspaces sharing an organization. */
|
|
437
449
|
overageCostCents: number;
|
|
438
450
|
}
|
|
439
451
|
/**
|
|
@@ -444,7 +456,10 @@ interface ResourceUsageResponse {
|
|
|
444
456
|
sms: SMSMessageUsageResponse;
|
|
445
457
|
phoneCall: PhoneCallUsageResponse;
|
|
446
458
|
email: EmailUsageResponse;
|
|
447
|
-
|
|
459
|
+
/** Whole megabytes stored, or null when the figure would be partial. Never a partial sum — read `storage` for the per-origin subtotals that ARE measured. */
|
|
460
|
+
storageMb?: number | null;
|
|
461
|
+
/** Per-origin storage measurement backing `storageMb`. */
|
|
462
|
+
storage?: StorageUsageResponse | null;
|
|
448
463
|
member: number;
|
|
449
464
|
phoneNumber: number;
|
|
450
465
|
site: number;
|
|
@@ -480,6 +495,38 @@ interface SMSPhoneNumberUsageResponse {
|
|
|
480
495
|
totalChars: number;
|
|
481
496
|
totalSegments?: number;
|
|
482
497
|
}
|
|
498
|
+
/**
|
|
499
|
+
* Stored bytes attributed to one origin for this workspace.
|
|
500
|
+
*/
|
|
501
|
+
interface StorageOriginUsageResponse {
|
|
502
|
+
/** Machine-readable origin key, e.g. `workspace_files`, `workspace_file_versions`, `call_recordings`, `email_attachments`. */
|
|
503
|
+
origin: string;
|
|
504
|
+
/** Stored bytes attributed to this origin. Logical size as recorded at write time, not the on-disk size after S3 storage-class transitions. */
|
|
505
|
+
bytes: number;
|
|
506
|
+
/** Objects contributing to `bytes`. Rows whose size was never recorded are excluded from both — an unsized object is not a zero-byte one. */
|
|
507
|
+
objectCount: number;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Per-origin storage measurement, with what it could not reach.
|
|
511
|
+
*
|
|
512
|
+
* Reported instead of a bare megabyte figure because the figure would be a
|
|
513
|
+
* partial sum. ``complete`` is the reader's contract: while it is false,
|
|
514
|
+
* ``ResourceUsageResponse.storageMb`` is absent and ``measuredBytes`` is a
|
|
515
|
+
* subtotal covering only ``origins``.
|
|
516
|
+
*/
|
|
517
|
+
interface StorageUsageResponse {
|
|
518
|
+
/** True only when every known storage origin was measured. False means `measuredBytes` is a subtotal and no total is claimed — the same rule `OrgWorkspaceUsageResponse.totalsComplete` applies to credits. */
|
|
519
|
+
complete: boolean;
|
|
520
|
+
/** Sum of `origins`. A subtotal whenever `complete` is false. */
|
|
521
|
+
measuredBytes: number;
|
|
522
|
+
/** Objects behind `measuredBytes`, summed across `origins`. */
|
|
523
|
+
measuredObjectCount: number;
|
|
524
|
+
/** Stored workspace-file bytes divided by current-version bytes. 1.0 means retained noncurrent versions cost nothing extra; 3.0 means three copies of the average file are stored because the web-assets bucket never expires noncurrent versions. Null when the workspace holds no current file bytes. */
|
|
525
|
+
versionMultiple?: number | null;
|
|
526
|
+
origins?: StorageOriginUsageResponse[];
|
|
527
|
+
/** Known storage origins outside this measurement. Non-empty is why `complete` is false. */
|
|
528
|
+
unmeasuredOrigins?: UnmeasuredStorageOriginResponse[];
|
|
529
|
+
}
|
|
483
530
|
/**
|
|
484
531
|
* Top resource overage summary.
|
|
485
532
|
*/
|
|
@@ -488,17 +535,48 @@ interface TopResourceOverageResponse {
|
|
|
488
535
|
overageCostCents: number;
|
|
489
536
|
}
|
|
490
537
|
/**
|
|
491
|
-
*
|
|
538
|
+
* A source of stored bytes this measurement could not attribute.
|
|
539
|
+
*
|
|
540
|
+
* **No bucket name.** The Python constant
|
|
541
|
+
* (``lib.db.reports.storage_usage_report.UNMEASURED_STORAGE_ORIGINS``) does
|
|
542
|
+
* carry one, because a reader of that file needs it. The response does not:
|
|
543
|
+
* the origin key already identifies the subsystem, and this breakdown is
|
|
544
|
+
* intended to become customer-facing (see
|
|
545
|
+
* ``docs/projects/active/storage-allowance-and-measurement.md``), at which
|
|
546
|
+
* point a bucket name would be infrastructure topology disclosed to an org
|
|
547
|
+
* owner for no gain. Keeping it out now means that move needs no audit.
|
|
548
|
+
*/
|
|
549
|
+
interface UnmeasuredStorageOriginResponse {
|
|
550
|
+
/** Machine-readable origin key, e.g. `email_raw_mime`. */
|
|
551
|
+
origin: string;
|
|
552
|
+
/** Why the origin is unmeasured: `no_workspace_in_key`, `no_size_recorded`, `not_workspace_scoped`, or `no_database_record`. */
|
|
553
|
+
reason: string;
|
|
554
|
+
}
|
|
555
|
+
/**
|
|
556
|
+
* The ORGANIZATION plan a workspace's usage is reported against.
|
|
557
|
+
*
|
|
558
|
+
* A workspace holds no plan of its own — this is the plan its organization
|
|
559
|
+
* holds, and every field below describes that organization-wide plan.
|
|
492
560
|
*/
|
|
493
561
|
interface UsageProductSummaryResponse {
|
|
562
|
+
/** The organization plan's product id. */
|
|
494
563
|
id: number;
|
|
564
|
+
/** The organization plan's name, or 'No Product' when the organization holds no billable subscription. */
|
|
495
565
|
name: string;
|
|
496
|
-
|
|
566
|
+
/** Allowances granted to the workspace's ORGANIZATION once per billing period, keyed by resource. Not a per-workspace allocation: the same figures appear on every workspace row belonging to the organization. */
|
|
567
|
+
organizationInclusions: UsageProductSummaryResponseOrganizationInclusions;
|
|
568
|
+
/** Overage unit pricing from the organization's plan, keyed by resource. */
|
|
497
569
|
overages: UsageProductSummaryResponseOverages;
|
|
498
570
|
}
|
|
499
|
-
|
|
571
|
+
/**
|
|
572
|
+
* Allowances granted to the workspace's ORGANIZATION once per billing period, keyed by resource. Not a per-workspace allocation: the same figures appear on every workspace row belonging to the organization.
|
|
573
|
+
*/
|
|
574
|
+
type UsageProductSummaryResponseOrganizationInclusions = {
|
|
500
575
|
[key: string]: number;
|
|
501
576
|
};
|
|
577
|
+
/**
|
|
578
|
+
* Overage unit pricing from the organization's plan, keyed by resource.
|
|
579
|
+
*/
|
|
502
580
|
type UsageProductSummaryResponseOverages = {
|
|
503
581
|
[key: string]: ProductOverageConfigResponse;
|
|
504
582
|
};
|
|
@@ -513,9 +591,12 @@ interface UsageReportResponse {
|
|
|
513
591
|
* Summary metrics for usage report.
|
|
514
592
|
*/
|
|
515
593
|
interface UsageReportSummaryResponse {
|
|
594
|
+
/** Sum of every workspace's overage cost. Each workspace was measured against its ORGANIZATION's full allowance, so for an organization with several workspaces in this report the figure UNDERSTATES aggregate overage. See inclusionScopeNote. */
|
|
516
595
|
totalOverageCostCents: number;
|
|
517
596
|
topResourcesByOverage: TopResourceOverageResponse[];
|
|
518
597
|
efficiencyMetrics: EfficiencyMetricsResponse;
|
|
598
|
+
/** Constant caveat carried in the payload so an operator reading raw JSON sees why the totals above are not additive across an organization's workspaces. */
|
|
599
|
+
inclusionScopeNote?: string;
|
|
519
600
|
}
|
|
520
601
|
/**
|
|
521
602
|
* Workspace usage report response.
|
|
@@ -524,9 +605,11 @@ interface WorkspaceUsageReportResponse {
|
|
|
524
605
|
uuid: string;
|
|
525
606
|
name: string;
|
|
526
607
|
slug: string;
|
|
608
|
+
/** The plan the workspace's ORGANIZATION holds. Workspaces do not hold plans. */
|
|
527
609
|
product: UsageProductSummaryResponse;
|
|
528
610
|
usage: ResourceUsageResponse;
|
|
529
611
|
overages: Partial<Record<Resource, ResourceOverageResponse>>;
|
|
612
|
+
/** This workspace's overage cost, measured against its ORGANIZATION's full allowance. Do not add this across workspaces that share an organization — see UsageReportSummaryResponse.inclusionScopeNote. */
|
|
530
613
|
totalOverageCostCents: number;
|
|
531
614
|
communicationDetails: CommunicationDetailsResponse;
|
|
532
615
|
}
|
|
@@ -1074,174 +1157,6 @@ interface AppContext {
|
|
|
1074
1157
|
*/
|
|
1075
1158
|
declare function formatAppContextAsMarkdown(context: AppContext | undefined): string;
|
|
1076
1159
|
|
|
1077
|
-
type OpenAITurnDetectionType = 'semantic_vad' | 'server_vad';
|
|
1078
|
-
type OpenAISemanticVADEagerness = 'low' | 'medium' | 'high' | 'auto';
|
|
1079
|
-
interface OpenAISemanticVADTurnDetection {
|
|
1080
|
-
type: 'semantic_vad';
|
|
1081
|
-
eagerness?: OpenAISemanticVADEagerness;
|
|
1082
|
-
create_response?: boolean;
|
|
1083
|
-
interrupt_response?: boolean;
|
|
1084
|
-
}
|
|
1085
|
-
interface OpenAIServerVADTurnDetection {
|
|
1086
|
-
type: 'server_vad';
|
|
1087
|
-
threshold?: number;
|
|
1088
|
-
prefix_padding_ms?: number;
|
|
1089
|
-
silence_duration_ms?: number;
|
|
1090
|
-
create_response?: boolean;
|
|
1091
|
-
interrupt_response?: boolean;
|
|
1092
|
-
}
|
|
1093
|
-
type OpenAITurnDetection = OpenAISemanticVADTurnDetection | OpenAIServerVADTurnDetection;
|
|
1094
|
-
/**
|
|
1095
|
-
* xAI's server-VAD block: OpenAI's fields plus `idle_timeout_ms`, which xAI
|
|
1096
|
-
* documents and OpenAI has no equivalent for. Mirrors
|
|
1097
|
-
* `lib/voice/realtime_config.py:XAIServerVADTurnDetection`.
|
|
1098
|
-
*
|
|
1099
|
-
* A configured `turnDetection` REPLACES xAI's default block wholesale rather
|
|
1100
|
-
* than merging with it, so setting `idle_timeout_ms` alone also drops the
|
|
1101
|
-
* phone-tuned threshold and prefix padding back to schema defaults.
|
|
1102
|
-
*/
|
|
1103
|
-
interface XAIServerVADTurnDetection extends OpenAIServerVADTurnDetection {
|
|
1104
|
-
/**
|
|
1105
|
-
* Silence (ms) before xAI speaks again unprompted. Unset means
|
|
1106
|
-
* re-engagement is off; there is deliberately no platform default. xAI
|
|
1107
|
-
* clamps the value up to its own floor, so read back the echoed session
|
|
1108
|
-
* when the exact wait matters.
|
|
1109
|
-
*/
|
|
1110
|
-
idle_timeout_ms?: number | null;
|
|
1111
|
-
}
|
|
1112
|
-
type ThinkingSound = 'none' | 'typing' | 'strumming' | 'speech';
|
|
1113
|
-
type InterruptionSound = 'none' | 'clav' | 'bells' | 'organ' | 'guzheng';
|
|
1114
|
-
/** Default filler phrases suggested when the user first enables "speech" mode. */
|
|
1115
|
-
declare const DEFAULT_THINKING_SPEECH_PHRASES: readonly string[];
|
|
1116
|
-
type TTSModel = 'native' | 'elevenlabs:tts:eleven_turbo_v2' | 'elevenlabs:tts:eleven_turbo_v2_5' | 'elevenlabs:tts:eleven_multilingual_v2' | 'elevenlabs:tts:eleven_flash_v2_5' | 'openai:tts:tts-1' | 'openai:tts:tts-1-hd' | 'openai:tts:gpt-4o-mini-tts' | 'aws:tts:polly-generative' | 'aws:tts:polly-neural' | 'google:tts:chirp';
|
|
1117
|
-
/** Extract the provider from a TTSModel ID (e.g. "elevenlabs:tts:eleven_flash_v2_5" -> "elevenlabs"). */
|
|
1118
|
-
declare function getTTSProvider(ttsModel: string | null | undefined): string | null;
|
|
1119
|
-
/**
|
|
1120
|
-
* Base configuration for all realtime models.
|
|
1121
|
-
* Contains common fields that apply to all realtime model providers.
|
|
1122
|
-
*/
|
|
1123
|
-
interface BaseRealtimeModelConfig {
|
|
1124
|
-
/** Sound to play while the agent is processing tool calls. */
|
|
1125
|
-
thinkingSound?: ThinkingSound | null;
|
|
1126
|
-
/** Volume level for the thinking sound (0-100). 0 means muted. Missing or null means full volume (100). */
|
|
1127
|
-
thinkingSoundVolume?: number | null;
|
|
1128
|
-
/** Initial delay in milliseconds before playing thinking sound. Prevents needless interruption on short tool calls. Default: 500ms. */
|
|
1129
|
-
thinkingSoundInitialDelay?: number | null;
|
|
1130
|
-
/** When `thinkingSound` is 'speech', one of these phrases is spoken while the agent runs a tool. Phrases rotate round-robin per session. */
|
|
1131
|
-
thinkingSpeechPhrases?: string[] | null;
|
|
1132
|
-
/** Sound to play when user stops speaking after interrupting the assistant. Provides immediate auditory feedback that input was received. Default: none. */
|
|
1133
|
-
interruptionSound?: InterruptionSound | null;
|
|
1134
|
-
/** Volume level for the interruption sound (0-100). 0 means muted. Missing or null means full volume (100). */
|
|
1135
|
-
interruptionSoundVolume?: number | null;
|
|
1136
|
-
/** TTS model ID in provider:tts:model format (e.g. 'elevenlabs:tts:eleven_flash_v2_5'), or 'native'. */
|
|
1137
|
-
ttsModel?: TTSModel | null;
|
|
1138
|
-
/** Canonical voice identifier (e.g., elevenlabs:voice:catt) that selects the specific agent voice. */
|
|
1139
|
-
voiceModel?: string | null;
|
|
1140
|
-
}
|
|
1141
|
-
/**
|
|
1142
|
-
* Native realtime providers always use the model's built-in audio. The
|
|
1143
|
-
* backend Pydantic schemas now enforce `ttsModel: "native"` and reject
|
|
1144
|
-
* external `sttModel`. Mirroring that contract on the client surface
|
|
1145
|
-
* keeps the editor in sync — see `useVoiceConfig.buildSubmitConfig`.
|
|
1146
|
-
*/
|
|
1147
|
-
interface OpenAIRealtimeModelConfig extends BaseRealtimeModelConfig {
|
|
1148
|
-
ttsModel?: 'native' | null;
|
|
1149
|
-
turnDetection?: OpenAITurnDetection | null;
|
|
1150
|
-
}
|
|
1151
|
-
interface GeminiRealtimeModelConfig extends BaseRealtimeModelConfig {
|
|
1152
|
-
ttsModel?: 'native' | null;
|
|
1153
|
-
}
|
|
1154
|
-
interface CustomRealtimeModelConfig extends BaseRealtimeModelConfig {
|
|
1155
|
-
sttModel?: string | null;
|
|
1156
|
-
sttConfig?: Record<string, unknown> | null;
|
|
1157
|
-
inferenceModel: string;
|
|
1158
|
-
inferenceModelConfig?: ChatModelConfig | null;
|
|
1159
|
-
}
|
|
1160
|
-
interface AWSRealtimeModelConfig extends BaseRealtimeModelConfig {
|
|
1161
|
-
ttsModel?: 'native' | null;
|
|
1162
|
-
}
|
|
1163
|
-
/**
|
|
1164
|
-
* xAI Voice Agent realtime config. Only `server_vad` is supported, so
|
|
1165
|
-
* the server-side schema rejects `semantic_vad`. Mirrors
|
|
1166
|
-
* `lib/constants.py:XAIRealtimeModelConfig`.
|
|
1167
|
-
*/
|
|
1168
|
-
interface XAIRealtimeModelConfig extends BaseRealtimeModelConfig {
|
|
1169
|
-
ttsModel?: 'native' | null;
|
|
1170
|
-
turnDetection?: XAIServerVADTurnDetection | null;
|
|
1171
|
-
}
|
|
1172
|
-
type RealtimeModelConfig = OpenAIRealtimeModelConfig | GeminiRealtimeModelConfig | CustomRealtimeModelConfig | AWSRealtimeModelConfig | XAIRealtimeModelConfig;
|
|
1173
|
-
type GeminiThinkingLevel = 'minimal' | 'low' | 'medium' | 'high';
|
|
1174
|
-
/**
|
|
1175
|
-
* OpenAI GPT-5 reasoning effort. The ACCEPTED SUBSET IS MODEL-DEPENDENT — sending
|
|
1176
|
-
* an out-of-set value is a hard 400 at the API. Mirror of the per-family vocab in
|
|
1177
|
-
* lib/ai/chat_model_config.py (see getOpenAIReasoningEfforts):
|
|
1178
|
-
* gpt-5 (5.0): minimal / low / medium / high
|
|
1179
|
-
* gpt-5.1: none / low / medium / high
|
|
1180
|
-
* gpt-5.4: none / low / medium / high / xhigh
|
|
1181
|
-
* This union is the superset; the UI filters it down per selected model.
|
|
1182
|
-
*/
|
|
1183
|
-
type OpenAIReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
1184
|
-
/**
|
|
1185
|
-
* xAI (Grok) reasoning levels. Note "none" disables reasoning entirely
|
|
1186
|
-
* (used by Grok 4.3 to switch into non-reasoning mode); xAI does NOT
|
|
1187
|
-
* accept OpenAI's "minimal".
|
|
1188
|
-
* https://docs.x.ai/developers/model-capabilities/text/reasoning#effort-levels
|
|
1189
|
-
*/
|
|
1190
|
-
type XAIReasoningEffort = 'none' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
1191
|
-
/**
|
|
1192
|
-
* Base configuration for all chat models.
|
|
1193
|
-
* Can be extended for provider-specific options.
|
|
1194
|
-
*/
|
|
1195
|
-
interface BaseChatModelConfig {
|
|
1196
|
-
}
|
|
1197
|
-
interface GeminiChatModelConfig extends BaseChatModelConfig {
|
|
1198
|
-
thinkingLevel?: GeminiThinkingLevel | null;
|
|
1199
|
-
includeThoughts?: boolean | null;
|
|
1200
|
-
}
|
|
1201
|
-
interface ClaudeChatModelConfig extends BaseChatModelConfig {
|
|
1202
|
-
thinkingEnabled?: boolean | null;
|
|
1203
|
-
thinkingBudgetTokens?: number | null;
|
|
1204
|
-
}
|
|
1205
|
-
interface OpenAIChatModelConfig extends BaseChatModelConfig {
|
|
1206
|
-
provider: 'openai';
|
|
1207
|
-
reasoningEffort?: OpenAIReasoningEffort | null;
|
|
1208
|
-
}
|
|
1209
|
-
interface XAIChatModelConfig extends BaseChatModelConfig {
|
|
1210
|
-
provider: 'xai';
|
|
1211
|
-
reasoningEffort?: XAIReasoningEffort | null;
|
|
1212
|
-
}
|
|
1213
|
-
type ChatModelConfig = GeminiChatModelConfig | ClaudeChatModelConfig | OpenAIChatModelConfig | XAIChatModelConfig;
|
|
1214
|
-
/**
|
|
1215
|
-
* Supported TTS preview providers.
|
|
1216
|
-
* These are the voice providers that support TTS preview in the UI.
|
|
1217
|
-
*/
|
|
1218
|
-
declare const TTS_PREVIEW_PROVIDERS: readonly ["openai", "elevenlabs", "google", "aws", "deepgram", "xai"];
|
|
1219
|
-
type TTSPreviewProvider = (typeof TTS_PREVIEW_PROVIDERS)[number];
|
|
1220
|
-
/**
|
|
1221
|
-
* Get the canonical voice model ID from a realtime model config.
|
|
1222
|
-
*
|
|
1223
|
-
* Voice model IDs follow the format: `{provider}:voice:{voiceName}`
|
|
1224
|
-
* Examples:
|
|
1225
|
-
* - `openai:voice:ash`
|
|
1226
|
-
* - `elevenlabs:voice:catt`
|
|
1227
|
-
* - `google:voice:puck`
|
|
1228
|
-
*
|
|
1229
|
-
* @param entity - An object with optional realtimeModelConfig
|
|
1230
|
-
* @returns The canonical voice model ID, or null if no voice is configured
|
|
1231
|
-
*/
|
|
1232
|
-
declare function getVoiceModelId(entity: {
|
|
1233
|
-
realtimeModelConfig?: RealtimeModelConfig | null;
|
|
1234
|
-
}): string | null;
|
|
1235
|
-
/**
|
|
1236
|
-
* Check if an entity's voice can be previewed.
|
|
1237
|
-
*
|
|
1238
|
-
* @param entity - An object with optional realtimeModelConfig
|
|
1239
|
-
* @returns True if the entity's voice supports TTS preview
|
|
1240
|
-
*/
|
|
1241
|
-
declare function canPreviewVoice(entity: {
|
|
1242
|
-
realtimeModelConfig?: RealtimeModelConfig | null;
|
|
1243
|
-
}): boolean;
|
|
1244
|
-
|
|
1245
1160
|
/**
|
|
1246
1161
|
* Default AI model constants shared across the frontend.
|
|
1247
1162
|
*
|
|
@@ -1251,27 +1166,28 @@ declare function canPreviewVoice(entity: {
|
|
|
1251
1166
|
/** Default chat/inference model for new agents and assistants. */
|
|
1252
1167
|
declare const DEFAULT_CHAT_MODEL = "aws:bedrock:claude-4-5-haiku";
|
|
1253
1168
|
/** Default inference model for custom voice stack. */
|
|
1254
|
-
declare const DEFAULT_VOICE_INFERENCE_MODEL = "
|
|
1169
|
+
declare const DEFAULT_VOICE_INFERENCE_MODEL = "openai:chat:gpt-5.6-luna";
|
|
1255
1170
|
/** Default voice model for custom realtime configurations. */
|
|
1256
1171
|
declare const DEFAULT_CUSTOM_VOICE_MODEL = "elevenlabs:voice:river";
|
|
1257
1172
|
|
|
1258
1173
|
/**
|
|
1259
1174
|
* Resource metadata for products
|
|
1260
1175
|
*
|
|
1261
|
-
*
|
|
1176
|
+
* Display labels, units and descriptions for each resource type. This is a
|
|
1177
|
+
* presentation lookup only — a resource's entry says how to name and count it,
|
|
1178
|
+
* never what a plan allows. Per-resource caps were removed: `Product.limits`
|
|
1179
|
+
* was rendered in two admin surfaces and the usage dashboard and enforced by
|
|
1180
|
+
* nothing, so the scope/feature filtering that existed to drive the cap editor
|
|
1181
|
+
* (`getApplicableResources`, `getApplicableResourceSlugs`,
|
|
1182
|
+
* `getScopeFromProductType`, `ResourceScope`) went with it. Credits are the one
|
|
1183
|
+
* metered allowance, and they are gated server-side.
|
|
1262
1184
|
*/
|
|
1263
1185
|
|
|
1264
|
-
/** Scope defines where a resource can be configured */
|
|
1265
|
-
type ResourceScope = 'workspace' | 'org' | 'any';
|
|
1266
1186
|
interface ResourceMetadata {
|
|
1267
1187
|
label: string;
|
|
1268
1188
|
unit: string;
|
|
1269
1189
|
unitPlural: string;
|
|
1270
1190
|
description: string;
|
|
1271
|
-
/** Feature required to use this resource (null means always available) */
|
|
1272
|
-
requiresFeature: WorkspaceFeature | null;
|
|
1273
|
-
/** Where this resource can be configured */
|
|
1274
|
-
scope: ResourceScope;
|
|
1275
1191
|
}
|
|
1276
1192
|
/**
|
|
1277
1193
|
* Get metadata for a specific resource
|
|
@@ -1281,25 +1197,6 @@ declare function getResourceMetadata(resource: Resource$1): ResourceMetadata | u
|
|
|
1281
1197
|
* Get all available resource slugs
|
|
1282
1198
|
*/
|
|
1283
1199
|
declare function getAllResourceSlugs(): Resource$1[];
|
|
1284
|
-
/**
|
|
1285
|
-
* Get the scope ('workspace' or 'org') for a product type.
|
|
1286
|
-
*/
|
|
1287
|
-
declare function getScopeFromProductType(productType: ProductType): ResourceScope;
|
|
1288
|
-
/**
|
|
1289
|
-
* Get resources applicable to a given scope and optional feature set.
|
|
1290
|
-
*
|
|
1291
|
-
* @param scope - 'workspace', 'org', or 'any' to filter by where resources can be configured
|
|
1292
|
-
* @param enabledFeatures - Optional list of enabled features. If provided, resources requiring
|
|
1293
|
-
* features not in this list will be excluded. If null/undefined,
|
|
1294
|
-
* all resources matching the scope are returned.
|
|
1295
|
-
*/
|
|
1296
|
-
declare function getApplicableResources(scope: ResourceScope, enabledFeatures?: WorkspaceFeature[] | null): Resource$1[];
|
|
1297
|
-
/**
|
|
1298
|
-
* Get resources applicable to a product type.
|
|
1299
|
-
* This is a convenience wrapper around getApplicableResources that derives scope from product type.
|
|
1300
|
-
* Does not filter by features - use getApplicableResources directly for feature-based filtering.
|
|
1301
|
-
*/
|
|
1302
|
-
declare function getApplicableResourceSlugs(productType: ProductType): Resource$1[];
|
|
1303
1200
|
|
|
1304
1201
|
/**
|
|
1305
1202
|
* Centralized OAuth and API scope management for TypeScript/JavaScript clients.
|
|
@@ -1326,6 +1223,7 @@ declare enum ScopeCategory {
|
|
|
1326
1223
|
DATATYPES = "datatypes",
|
|
1327
1224
|
RECORDS = "records",
|
|
1328
1225
|
FILES = "files",
|
|
1226
|
+
DEVICES = "devices",
|
|
1329
1227
|
JOURNEYS = "journeys",
|
|
1330
1228
|
EXPERIMENTS = "experiments",
|
|
1331
1229
|
SITES = "sites",
|
|
@@ -1551,6 +1449,23 @@ declare const SCOPES: {
|
|
|
1551
1449
|
readonly description: "Delete files";
|
|
1552
1450
|
readonly implies: readonly ["files:write"];
|
|
1553
1451
|
};
|
|
1452
|
+
readonly 'devices:read': {
|
|
1453
|
+
readonly name: "devices:read";
|
|
1454
|
+
readonly category: ScopeCategory.DEVICES;
|
|
1455
|
+
readonly description: "View companion devices";
|
|
1456
|
+
};
|
|
1457
|
+
readonly 'devices:write': {
|
|
1458
|
+
readonly name: "devices:write";
|
|
1459
|
+
readonly category: ScopeCategory.DEVICES;
|
|
1460
|
+
readonly description: "Enrol and manage own companion devices";
|
|
1461
|
+
readonly implies: readonly ["devices:read"];
|
|
1462
|
+
};
|
|
1463
|
+
readonly 'devices:admin': {
|
|
1464
|
+
readonly name: "devices:admin";
|
|
1465
|
+
readonly category: ScopeCategory.DEVICES;
|
|
1466
|
+
readonly description: "List and revoke any companion device";
|
|
1467
|
+
readonly implies: readonly ["devices:write"];
|
|
1468
|
+
};
|
|
1554
1469
|
readonly 'journeys:read': {
|
|
1555
1470
|
readonly name: "journeys:read";
|
|
1556
1471
|
readonly category: ScopeCategory.JOURNEYS;
|
|
@@ -1901,4 +1816,4 @@ interface RevisionState {
|
|
|
1901
1816
|
*/
|
|
1902
1817
|
declare function getRevisionState(workflow: RevisionStateWorkflow, revision?: RevisionStateRevision): RevisionState;
|
|
1903
1818
|
|
|
1904
|
-
export {
|
|
1819
|
+
export { PIDS_DISPOSITIONS as $, type AIModelUsageResponse as A, type BillingStatistics as B, type CallEndSection as C, DEFAULT_CHAT_MODEL as D, type EfficiencyMetricsResponse as E, type EmailUsageResponse as F, type EngineTimeSeries as G, type ErrorCodeBucket as H, type EventRuleMetrics as I, type ExportStatistics as J, type FeatureSyncStatus as K, type HealthCheckStatistics as L, type MetricSummary$1 as M, type HealthDetailRequest as N, type HealthMetricsRequest as O, type HealthMetricsResponse as P, type HealthSummary as Q, type ImportStatistics as R, type MemberNotificationPreferences as S, type MemberNotifyActionParams as T, type MemberUsageReport as U, type VoiceMetricsResponse$1 as V, type WorkspaceHealthResponse$1 as W, type MetricDataPoint as X, type MetricSection as Y, type MetricSummary as Z, type MetricValue as _, type AIUsageDetailsResponse as a, getResourceMetadata as a$, PIDS_SOURCES as a0, type PageContext as a1, type PerformanceMetrics as a2, type PhoneCallPhoneNumberUsageResponse as a3, type PhoneCallUsageResponse as a4, type PhoneCommunicationDetailsResponse as a5, type PhoneNumberUsage as a6, type PidsDisposition as a7, type PidsSource as a8, type ProductOverageConfigResponse as a9, type TaskCountResponse as aA, type TimeSeriesData as aB, type TimeSeriesDataPoint as aC, type ToolParameter as aD, type ToolkitContext as aE, ToolkitState as aF, type TopOffender as aG, type TopResourceOverageResponse as aH, type TtsReconnectOutcomeEntry as aI, type TtsReconnectSection as aJ, type UsageProductSummaryResponse as aK, type UsageReportResponse as aL, type UsageReportRequest as aM, type UsageStatistics as aN, type VoiceMetricsResponse as aO, type VoiceMetricsTimeRange as aP, WIDGET_SLUGS as aQ, type WebhookMetrics as aR, type WidgetSlug as aS, type WorkflowContext as aT, type WorkspaceHealthDetail as aU, type WorkspaceHealthResponse as aV, type WorkspaceHealthRow as aW, type WorkspaceRoutineWorkflowAccessResponse as aX, type WorkspaceUsageReportResponse as aY, formatAppContextAsMarkdown as aZ, getAllResourceSlugs as a_, type ProvisionPlanRequest as aa, type ProvisionPlanResponse as ab, type RequestsSection as ac, type RequestsStatusEntry as ad, type ResourceMetadata as ae, type ResourceOverageResponse as af, type ResourceUsageResponse as ag, type RevisionState as ah, type RevisionStateRevision as ai, type RevisionStateWorkflow as aj, type RoutineRunMetrics as ak, type RoutineWorkflowAccessMissingRole as al, type RoutineWorkflowAccessWarning as am, SCOPES as an, SCOPE_PRESETS as ao, type SMSCommunicationDetailsResponse as ap, type SMSMessageUsageResponse as aq, type SMSPhoneNumberUsageResponse as ar, ScopeCategory as as, ScopeManager as at, type ScopeName as au, type SiteContext as av, type SkippedWorkspace as aw, type StatisticsSummary as ax, type SystemStatistics as ay, type TaskContext as az, type AcquisitionFunnelChannel as b, getRevisionState as b0, type ScopeDefinition as b1, type AcquisitionFunnelRecentSignup as c, type AcquisitionFunnelResponse as d, type AdminDomainResponse as e, type AdminDomainSiteMapping as f, type AdminDomainWidgetMapping as g, type AdminPidsFindingResponse as h, type AnalyticsFilter as i, type AnalyticsQuery as j, type AppContext as k, type AttachedAddonInfo as l, type CallEndStatusEntry as m, type ChannelErrorBreakdown as n, type ChannelFailures as o, type CommunicationDetailsResponse as p, type CurrentPlanInfo as q, DEFAULT_CUSTOM_VOICE_MODEL as r, DEFAULT_VOICE_INFERENCE_MODEL as s, type DailyPhoneRowResponse as t, type DailySMSRowResponse as u, type DashboardMetrics as v, type DataRecordContext as w, type DeviceCacheFileEntry as x, type DeviceCacheManifestResponse as y, type EmailCountsResponse as z };
|