@gravity-rail/sdk 0.8.0 → 0.11.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/README.md +45 -8
- package/dist/chunk-FSSXKQR5.js +471 -0
- package/dist/chunk-FSSXKQR5.js.map +1 -0
- package/dist/{chunk-QS6ZRQUZ.js → chunk-V7ZKEH4V.js} +8 -1
- package/dist/chunk-V7ZKEH4V.js.map +1 -0
- package/dist/{chunk-ML55PVP7.js → chunk-YESHLUL7.js} +1435 -703
- package/dist/chunk-YESHLUL7.js.map +1 -0
- package/dist/{client-C2aWAalu.d.cts → client-BCgXtr8p.d.cts} +3684 -1291
- package/dist/{client-CLGovEox.d.ts → client-Dh1l20Ue.d.ts} +3684 -1291
- package/dist/helpers.cjs +177 -13
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +82 -3
- package/dist/helpers.d.ts +82 -3
- package/dist/helpers.js +155 -12
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +1679 -420
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -24
- package/dist/index.d.ts +32 -24
- package/dist/index.js +193 -113
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +1742 -413
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +634 -29
- package/dist/internal.d.ts +634 -29
- package/dist/internal.js +140 -7
- package/dist/internal.js.map +1 -1
- package/dist/realtime.cjs +43 -0
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +26 -0
- package/dist/realtime.d.ts +26 -0
- package/dist/realtime.js +43 -0
- package/dist/realtime.js.map +1 -1
- package/dist/{scopes-D6a_Mvqr.d.ts → revision-state-BTF-MnbW.d.cts} +270 -23
- package/dist/{scopes-CDaJBQVT.d.cts → revision-state-DOH1NMGb.d.ts} +270 -23
- package/dist/schemas.cjs +56 -117
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +121 -484
- package/dist/schemas.d.ts +121 -484
- package/dist/schemas.js +55 -114
- package/dist/schemas.js.map +1 -1
- package/dist/{inquiries-CmECZnkl.d.cts → tasks-C4aYbWVv.d.cts} +944 -148
- package/dist/{inquiries-CmECZnkl.d.ts → tasks-C4aYbWVv.d.ts} +944 -148
- package/package.json +5 -5
- package/dist/chunk-ML55PVP7.js.map +0 -1
- package/dist/chunk-QS6ZRQUZ.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ev as SortOrder } from './tasks-C4aYbWVv.js';
|
|
2
|
+
import { mz as WorkspaceFeature, hS as Resource$1, hk as ProductType } from './client-Dh1l20Ue.js';
|
|
3
3
|
|
|
4
4
|
interface MemberNotificationPreferences {
|
|
5
5
|
notifySms?: boolean;
|
|
@@ -29,8 +29,8 @@ interface ToolParameter {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
|
-
* Generated by Orval
|
|
33
|
-
*
|
|
32
|
+
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
33
|
+
* (group map from emit_openapi.py). Do not edit manually.
|
|
34
34
|
* Group: workspace_health
|
|
35
35
|
*/
|
|
36
36
|
/**
|
|
@@ -124,6 +124,48 @@ interface ProvisionPlanRequest {
|
|
|
124
124
|
subscriptionId?: number;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
+
/**
|
|
128
|
+
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
129
|
+
* (group map from emit_openapi.py). Do not edit manually.
|
|
130
|
+
* Group: domain
|
|
131
|
+
*/
|
|
132
|
+
/**
|
|
133
|
+
* A registered domain and every capability mapped onto it, org-agnostic.
|
|
134
|
+
*/
|
|
135
|
+
interface AdminDomainResponse {
|
|
136
|
+
uuid: string;
|
|
137
|
+
domain: string;
|
|
138
|
+
organizationId: number;
|
|
139
|
+
organizationName: string;
|
|
140
|
+
ownershipStatus: string;
|
|
141
|
+
ownershipVerifiedAt?: string | null;
|
|
142
|
+
emailConfigured: boolean;
|
|
143
|
+
emailStatus?: string | null;
|
|
144
|
+
siteConfigured: boolean;
|
|
145
|
+
siteMappings: AdminDomainSiteMapping[];
|
|
146
|
+
widgetMappings: AdminDomainWidgetMapping[];
|
|
147
|
+
createdAt: string;
|
|
148
|
+
updatedAt: string;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* One site a domain routes to (from ``SiteMapping``).
|
|
152
|
+
*/
|
|
153
|
+
interface AdminDomainSiteMapping {
|
|
154
|
+
siteSlug?: string | null;
|
|
155
|
+
workspaceName: string;
|
|
156
|
+
workspaceUuid: string;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* One workspace's widget enablement on a domain (workspace_widget_domains).
|
|
160
|
+
*/
|
|
161
|
+
interface AdminDomainWidgetMapping {
|
|
162
|
+
workspaceName: string;
|
|
163
|
+
workspaceUuid: string;
|
|
164
|
+
widgets: string[];
|
|
165
|
+
allowSubdomains: boolean;
|
|
166
|
+
port?: number | null;
|
|
167
|
+
}
|
|
168
|
+
|
|
127
169
|
interface TaskCountResponse {
|
|
128
170
|
taskCount: number;
|
|
129
171
|
}
|
|
@@ -247,8 +289,8 @@ interface SystemStatistics {
|
|
|
247
289
|
}
|
|
248
290
|
|
|
249
291
|
/**
|
|
250
|
-
* Generated by Orval
|
|
251
|
-
*
|
|
292
|
+
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
293
|
+
* (group map from emit_openapi.py). Do not edit manually.
|
|
252
294
|
* Group: usage
|
|
253
295
|
*/
|
|
254
296
|
/**
|
|
@@ -288,7 +330,7 @@ interface CommunicationDetailsResponse {
|
|
|
288
330
|
interface DailyPhoneRowResponse {
|
|
289
331
|
date: string;
|
|
290
332
|
phoneNumberId: number;
|
|
291
|
-
phoneNumber: string;
|
|
333
|
+
phoneNumber: string | null;
|
|
292
334
|
phoneName: string | null;
|
|
293
335
|
inbound: number;
|
|
294
336
|
outbound: number;
|
|
@@ -300,7 +342,7 @@ interface DailyPhoneRowResponse {
|
|
|
300
342
|
interface DailySMSRowResponse {
|
|
301
343
|
date: string;
|
|
302
344
|
phoneNumberId: number;
|
|
303
|
-
phoneNumber: string;
|
|
345
|
+
phoneNumber: string | null;
|
|
304
346
|
phoneName: string | null;
|
|
305
347
|
inbound: number;
|
|
306
348
|
outbound: number;
|
|
@@ -327,7 +369,7 @@ interface EmailUsageResponse {
|
|
|
327
369
|
*/
|
|
328
370
|
interface PhoneCallPhoneNumberUsageResponse {
|
|
329
371
|
phoneNumberId: number;
|
|
330
|
-
phoneNumber: string;
|
|
372
|
+
phoneNumber: string | null;
|
|
331
373
|
phoneName: string | null;
|
|
332
374
|
inbound: number;
|
|
333
375
|
outbound: number;
|
|
@@ -362,11 +404,14 @@ interface ProductOverageConfigResponse {
|
|
|
362
404
|
*
|
|
363
405
|
* Two categories:
|
|
364
406
|
* - Usage resources: consumed over time, tracked per billing period.
|
|
365
|
-
*
|
|
366
|
-
*
|
|
407
|
+
* AI usage converts to credits via the model multipliers in ai_models.yaml
|
|
408
|
+
* scaled by the plan's AI multiplier (lib/services/ai_multiplier.py); SMS,
|
|
409
|
+
* voice, and email convert via the telephony rate card
|
|
410
|
+
* (lib/services/service_rate_card.py). Credits are the unified billing
|
|
411
|
+
* currency; resources are what you actually consume.
|
|
367
412
|
* - State resources: current count, not cumulative (members, sites, etc.)
|
|
368
413
|
*/
|
|
369
|
-
type Resource =
|
|
414
|
+
type Resource = typeof Resource[keyof typeof Resource];
|
|
370
415
|
declare const Resource: {
|
|
371
416
|
readonly credit: "credit";
|
|
372
417
|
readonly stt: "stt";
|
|
@@ -428,7 +473,7 @@ interface SMSMessageUsageResponse {
|
|
|
428
473
|
*/
|
|
429
474
|
interface SMSPhoneNumberUsageResponse {
|
|
430
475
|
phoneNumberId: number;
|
|
431
|
-
phoneNumber: string;
|
|
476
|
+
phoneNumber: string | null;
|
|
432
477
|
phoneName: string | null;
|
|
433
478
|
inbound: number;
|
|
434
479
|
outbound: number;
|
|
@@ -488,7 +533,8 @@ interface WorkspaceUsageReportResponse {
|
|
|
488
533
|
|
|
489
534
|
interface PhoneNumberUsage {
|
|
490
535
|
phoneNumberId: number;
|
|
491
|
-
|
|
536
|
+
/** Matches PhoneNumber.number (nullable). */
|
|
537
|
+
phoneNumber: string | null;
|
|
492
538
|
phoneName: string | null;
|
|
493
539
|
inbound: number;
|
|
494
540
|
outbound: number;
|
|
@@ -508,8 +554,8 @@ interface MemberUsageReport {
|
|
|
508
554
|
}
|
|
509
555
|
|
|
510
556
|
/**
|
|
511
|
-
* Generated by Orval
|
|
512
|
-
*
|
|
557
|
+
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
558
|
+
* (group map from emit_openapi.py). Do not edit manually.
|
|
513
559
|
* Group: voice_metrics
|
|
514
560
|
*/
|
|
515
561
|
interface CallEndSection$1 {
|
|
@@ -547,7 +593,7 @@ interface MetricSummary$1 {
|
|
|
547
593
|
p50?: number;
|
|
548
594
|
p90?: number;
|
|
549
595
|
p99?: number;
|
|
550
|
-
|
|
596
|
+
hasDistribution?: boolean;
|
|
551
597
|
}
|
|
552
598
|
interface RequestsSection$1 {
|
|
553
599
|
statuses: RequestsStatusEntry$1[];
|
|
@@ -626,9 +672,42 @@ type VoiceMetricsResponse = Omit<VoiceMetricsResponse$1, 'voice' | 'chat' | 'cal
|
|
|
626
672
|
ttsReconnect: TtsReconnectSection;
|
|
627
673
|
};
|
|
628
674
|
|
|
675
|
+
/** A single prompt-injection finding, as returned by the admin API. */
|
|
676
|
+
interface AdminPidsFindingResponse {
|
|
677
|
+
id: number;
|
|
678
|
+
langfuseTraceId: string;
|
|
679
|
+
workspaceUuid: string;
|
|
680
|
+
chatId: number | null;
|
|
681
|
+
memberId: number | null;
|
|
682
|
+
channel: string;
|
|
683
|
+
/** Per-category combined confidence (0..1). */
|
|
684
|
+
attackCategories: Record<string, number>;
|
|
685
|
+
confidence: number;
|
|
686
|
+
/** Stage-1 rule names that matched (never raw matched text). */
|
|
687
|
+
stage1MatchedPatterns: string[];
|
|
688
|
+
/** Stage-2 LLM judge verdict (per-category quoted spans = PHI). */
|
|
689
|
+
stage2Verdict: Record<string, unknown> | null;
|
|
690
|
+
stage2Status: string;
|
|
691
|
+
detectorVersion: string;
|
|
692
|
+
/** scheduled | backfill | pre_llm. */
|
|
693
|
+
source: PidsSource;
|
|
694
|
+
reviewedAt: string | null;
|
|
695
|
+
reviewedByMemberId: number | null;
|
|
696
|
+
reviewerDisposition: PidsDisposition | null;
|
|
697
|
+
wazuhEmittedAt: string | null;
|
|
698
|
+
createdAt: string;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
/** Reviewer disposition values (matches the backend `ReviewerDisposition`). */
|
|
702
|
+
declare const PIDS_DISPOSITIONS: readonly ["true_positive", "false_positive", "needs_more_context"];
|
|
703
|
+
type PidsDisposition = (typeof PIDS_DISPOSITIONS)[number];
|
|
704
|
+
/** Finding source values (matches the backend `FindingSource`). */
|
|
705
|
+
declare const PIDS_SOURCES: readonly ["scheduled", "backfill", "pre_llm"];
|
|
706
|
+
type PidsSource = (typeof PIDS_SOURCES)[number];
|
|
707
|
+
|
|
629
708
|
/**
|
|
630
|
-
* Generated by Orval
|
|
631
|
-
*
|
|
709
|
+
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
710
|
+
* (group map from emit_openapi.py). Do not edit manually.
|
|
632
711
|
* Group: health_dashboard
|
|
633
712
|
*/
|
|
634
713
|
/**
|
|
@@ -683,9 +762,10 @@ interface HealthSummary {
|
|
|
683
762
|
totalWebhookVolume?: number;
|
|
684
763
|
totalSmsResponded?: number;
|
|
685
764
|
totalSmsOutboundChats?: number;
|
|
686
|
-
totalMemberChats?: number;
|
|
687
765
|
totalNeedsResponse?: number;
|
|
688
766
|
totalAccessGapWarnings?: number;
|
|
767
|
+
totalRoutineWorkflowAccessWarnings?: number;
|
|
768
|
+
totalOpenCriticalActionIncidents?: number;
|
|
689
769
|
}
|
|
690
770
|
/**
|
|
691
771
|
* A workspace that was skipped during metrics collection.
|
|
@@ -718,6 +798,47 @@ interface WorkspaceHealthRow {
|
|
|
718
798
|
memberChats?: number;
|
|
719
799
|
needsResponse?: number;
|
|
720
800
|
accessGapWarnings?: number;
|
|
801
|
+
routineWorkflowAccessWarnings?: number;
|
|
802
|
+
openCriticalActionIncidents?: number;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
/**
|
|
806
|
+
* A role in a Routine's audience that lacks Workflow USE.
|
|
807
|
+
*
|
|
808
|
+
* IDs + names are safe for admins (who already see role names); logs/breadcrumbs
|
|
809
|
+
* must use IDs only.
|
|
810
|
+
*/
|
|
811
|
+
interface RoutineWorkflowAccessMissingRole {
|
|
812
|
+
id: number;
|
|
813
|
+
name: string;
|
|
814
|
+
}
|
|
815
|
+
/**
|
|
816
|
+
* One Routine → Workflow reference whose audience is missing Workflow USE.
|
|
817
|
+
*
|
|
818
|
+
* PHI-safe: Routine / EventRule / Workflow / role IDs and names only — no
|
|
819
|
+
* Member-level data (names, phones, emails). ``actionType`` is either an
|
|
820
|
+
* EventRule action type (e.g. ``"sms:send"``) or ``"routine:workflow"`` for
|
|
821
|
+
* the ``Routine.workflow_id`` background-run path.
|
|
822
|
+
*/
|
|
823
|
+
interface RoutineWorkflowAccessWarning {
|
|
824
|
+
routineId: number;
|
|
825
|
+
routineName?: string | null;
|
|
826
|
+
eventRuleId?: number | null;
|
|
827
|
+
actionType: string;
|
|
828
|
+
workflowId: number;
|
|
829
|
+
workflowUuid: string;
|
|
830
|
+
workflowName: string;
|
|
831
|
+
targetKind: string;
|
|
832
|
+
missingRoles: RoutineWorkflowAccessMissingRole[];
|
|
833
|
+
audienceRoleCount: number;
|
|
834
|
+
}
|
|
835
|
+
/**
|
|
836
|
+
* Routine Workflow-access warning detail for a single workspace.
|
|
837
|
+
*/
|
|
838
|
+
interface WorkspaceRoutineWorkflowAccessResponse {
|
|
839
|
+
workspaceUuid: string;
|
|
840
|
+
warnings: RoutineWorkflowAccessWarning[];
|
|
841
|
+
totalWarnings: number;
|
|
721
842
|
}
|
|
722
843
|
|
|
723
844
|
interface HealthMetricsRequest {
|
|
@@ -752,6 +873,79 @@ interface HealthDetailRequest {
|
|
|
752
873
|
hours?: number;
|
|
753
874
|
}
|
|
754
875
|
|
|
876
|
+
/**
|
|
877
|
+
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
878
|
+
* (group map from emit_openapi.py). Do not edit manually.
|
|
879
|
+
* Group: acquisition_funnel
|
|
880
|
+
*/
|
|
881
|
+
/**
|
|
882
|
+
* Signups within the window grouped by first-touch acquisition source.
|
|
883
|
+
*
|
|
884
|
+
* ``source`` matches ``BookOfBusinessAcquisitionDistribution.source``
|
|
885
|
+
* semantics (``utm_source`` or ``"direct"``) so the two rollups join.
|
|
886
|
+
* Only accounts WITH an acquisition record are grouped here; record-less
|
|
887
|
+
* accounts are counted in ``unattributedSignupCount`` instead.
|
|
888
|
+
*/
|
|
889
|
+
interface AcquisitionFunnelChannel {
|
|
890
|
+
source: string;
|
|
891
|
+
signupCount: number;
|
|
892
|
+
latestSignupAt: string;
|
|
893
|
+
}
|
|
894
|
+
/**
|
|
895
|
+
* One attributed signup, newest-first — the low-volume legibility core.
|
|
896
|
+
*
|
|
897
|
+
* At a handful of signups a month the per-signup list IS the report. PII-free
|
|
898
|
+
* by construction: account id only (never email/name), and the acquisition
|
|
899
|
+
* fields are the allowlisted, query-stripped marketing values
|
|
900
|
+
* (``lib.services.acquisition.sanitize_acquisition``).
|
|
901
|
+
*/
|
|
902
|
+
interface AcquisitionFunnelRecentSignup {
|
|
903
|
+
accountId: number;
|
|
904
|
+
createdAt: string;
|
|
905
|
+
source: string;
|
|
906
|
+
utmMedium?: string | null;
|
|
907
|
+
utmCampaign?: string | null;
|
|
908
|
+
referrer?: string | null;
|
|
909
|
+
landingPage?: string | null;
|
|
910
|
+
}
|
|
911
|
+
/**
|
|
912
|
+
* Channel -> signup rollup of ``Account.acquisition`` (superuser only).
|
|
913
|
+
*/
|
|
914
|
+
interface AcquisitionFunnelResponse {
|
|
915
|
+
generatedAt: string;
|
|
916
|
+
queryVersion: string;
|
|
917
|
+
windowDays: number;
|
|
918
|
+
windowStart: string;
|
|
919
|
+
captureLiveSince: string | null;
|
|
920
|
+
signupCount: number;
|
|
921
|
+
attributedSignupCount: number;
|
|
922
|
+
unattributedSignupCount: number;
|
|
923
|
+
channels: AcquisitionFunnelChannel[];
|
|
924
|
+
recentAttributedSignups: AcquisitionFunnelRecentSignup[];
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
/**
|
|
928
|
+
* Widget-domain configuration types.
|
|
929
|
+
*
|
|
930
|
+
* Server response/request shapes are generated from Pydantic via
|
|
931
|
+
* emit_openapi.py → Orval into ./generated/workspace_widget_domain. This thin
|
|
932
|
+
* layer re-exports them under stable public names and adds the client-only
|
|
933
|
+
* widget-slug registry the UI iterates over.
|
|
934
|
+
*
|
|
935
|
+
* The candidate-domain list served by GET /w/{wid}/domains/for-widget reuses
|
|
936
|
+
* `WorkspaceAvailableDomainsResponse` (see ./organization-types).
|
|
937
|
+
*/
|
|
938
|
+
|
|
939
|
+
/**
|
|
940
|
+
* Canonical embeddable-widget slugs. Mirrors the backend `WidgetSlug` enum
|
|
941
|
+
* (`lib/models/glb/workspace_widget_domain_models.py`); kept as a client-side
|
|
942
|
+
* const so UI can render one toggle per slug without a round-trip. Keep in sync
|
|
943
|
+
* with the backend registry — it is the source of truth the config API and the
|
|
944
|
+
* origin gate both validate against.
|
|
945
|
+
*/
|
|
946
|
+
declare const WIDGET_SLUGS: readonly ["chat", "operator", "operator-tools", "chat-app"];
|
|
947
|
+
type WidgetSlug = (typeof WIDGET_SLUGS)[number];
|
|
948
|
+
|
|
755
949
|
/**
|
|
756
950
|
* App context types - shared between client and server
|
|
757
951
|
*
|
|
@@ -927,7 +1121,16 @@ interface XAIRealtimeModelConfig extends BaseRealtimeModelConfig {
|
|
|
927
1121
|
}
|
|
928
1122
|
type RealtimeModelConfig = OpenAIRealtimeModelConfig | GeminiRealtimeModelConfig | CustomRealtimeModelConfig | AWSRealtimeModelConfig | XAIRealtimeModelConfig;
|
|
929
1123
|
type GeminiThinkingLevel = 'minimal' | 'low' | 'medium' | 'high';
|
|
930
|
-
|
|
1124
|
+
/**
|
|
1125
|
+
* OpenAI GPT-5 reasoning effort. The ACCEPTED SUBSET IS MODEL-DEPENDENT — sending
|
|
1126
|
+
* an out-of-set value is a hard 400 at the API. Mirror of the per-family vocab in
|
|
1127
|
+
* lib/ai/chat_model_config.py (see getOpenAIReasoningEfforts):
|
|
1128
|
+
* gpt-5 (5.0): minimal / low / medium / high
|
|
1129
|
+
* gpt-5.1: none / low / medium / high
|
|
1130
|
+
* gpt-5.4: none / low / medium / high / xhigh
|
|
1131
|
+
* This union is the superset; the UI filters it down per selected model.
|
|
1132
|
+
*/
|
|
1133
|
+
type OpenAIReasoningEffort = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
931
1134
|
/**
|
|
932
1135
|
* xAI (Grok) reasoning levels. Note "none" disables reasoning entirely
|
|
933
1136
|
* (used by Grok 4.3 to switch into non-reasoning mode); xAI does NOT
|
|
@@ -962,7 +1165,7 @@ type ChatModelConfig = GeminiChatModelConfig | ClaudeChatModelConfig | OpenAICha
|
|
|
962
1165
|
* Supported TTS preview providers.
|
|
963
1166
|
* These are the voice providers that support TTS preview in the UI.
|
|
964
1167
|
*/
|
|
965
|
-
declare const TTS_PREVIEW_PROVIDERS: readonly ["openai", "elevenlabs", "google", "aws", "
|
|
1168
|
+
declare const TTS_PREVIEW_PROVIDERS: readonly ["openai", "elevenlabs", "google", "aws", "deepgram", "xai"];
|
|
966
1169
|
type TTSPreviewProvider = (typeof TTS_PREVIEW_PROVIDERS)[number];
|
|
967
1170
|
/**
|
|
968
1171
|
* Get the canonical voice model ID from a realtime model config.
|
|
@@ -1604,4 +1807,48 @@ declare const SCOPE_PRESETS: {
|
|
|
1604
1807
|
ALL: ScopeName[];
|
|
1605
1808
|
};
|
|
1606
1809
|
|
|
1607
|
-
|
|
1810
|
+
/**
|
|
1811
|
+
* Derived revision state — the single place derived booleans about a workflow
|
|
1812
|
+
* revision live. The API never puts these on the wire (they can contradict
|
|
1813
|
+
* their inputs; the facts they derive from can't). Every consumer — web app,
|
|
1814
|
+
* CLI, MCP — computes them here from the workflow root's pointer columns plus
|
|
1815
|
+
* the revision's own facts.
|
|
1816
|
+
*
|
|
1817
|
+
* See docs/features/conversations/workflows/versioning/api-shape.md.
|
|
1818
|
+
*/
|
|
1819
|
+
/** The two facts a revision derivation needs from the stable workflow root. */
|
|
1820
|
+
interface RevisionStateWorkflow {
|
|
1821
|
+
activeRevisionId: number;
|
|
1822
|
+
draftRevisionId: number;
|
|
1823
|
+
/** Fact behind "has unpublished changes"; null after a fresh clone/publish. */
|
|
1824
|
+
draftModifiedAt?: string | null;
|
|
1825
|
+
}
|
|
1826
|
+
/** The two facts a derivation needs from the revision itself, when one is in hand. */
|
|
1827
|
+
interface RevisionStateRevision {
|
|
1828
|
+
id: number;
|
|
1829
|
+
/** Present on published revisions, null/absent on the draft. */
|
|
1830
|
+
publishedAt?: string | null;
|
|
1831
|
+
}
|
|
1832
|
+
interface RevisionState {
|
|
1833
|
+
/** This revision is the workflow's active (live-traffic) revision. */
|
|
1834
|
+
isActive: boolean;
|
|
1835
|
+
/** This revision is the workflow's mutable draft. */
|
|
1836
|
+
isDraft: boolean;
|
|
1837
|
+
/** active === draft: live traffic reads the editor's mutable draft. */
|
|
1838
|
+
draftIsLive: boolean;
|
|
1839
|
+
/** The draft has been edited since the last publish (or since creation). */
|
|
1840
|
+
hasUnpublishedChanges: boolean;
|
|
1841
|
+
/** 'published' once the revision has a publish timestamp, else 'draft'. */
|
|
1842
|
+
state: 'draft' | 'published';
|
|
1843
|
+
}
|
|
1844
|
+
/**
|
|
1845
|
+
* Derive a revision's state from the workflow root pointers and (optionally)
|
|
1846
|
+
* the revision in hand. Pure — no I/O, no allocation beyond the result.
|
|
1847
|
+
*
|
|
1848
|
+
* When `revision` is omitted, per-revision facts default to false / 'draft'
|
|
1849
|
+
* (there is no revision to compare), while the workflow-level derivations
|
|
1850
|
+
* (`draftIsLive`, `hasUnpublishedChanges`) are still computed.
|
|
1851
|
+
*/
|
|
1852
|
+
declare function getRevisionState(workflow: RevisionStateWorkflow, revision?: RevisionStateRevision): RevisionState;
|
|
1853
|
+
|
|
1854
|
+
export { type HealthMetricsResponse as $, type AIModelUsageResponse as A, type BaseChatModelConfig as B, type CallEndSection as C, DEFAULT_CHAT_MODEL as D, DEFAULT_THINKING_SPEECH_PHRASES as E, DEFAULT_VOICE_INFERENCE_MODEL as F, type DailyPhoneRowResponse as G, type DailySMSRowResponse as H, type DashboardMetrics as I, type DataRecordContext as J, type EfficiencyMetricsResponse as K, type EmailCountsResponse as L, type EmailUsageResponse as M, type EngineTimeSeries as N, type ErrorCodeBucket as O, type EventRuleMetrics as P, type ExportStatistics as Q, type FeatureSyncStatus as R, type GeminiChatModelConfig as S, type GeminiRealtimeModelConfig as T, type GeminiThinkingLevel as U, type MetricSummary$1 as V, type VoiceMetricsResponse$1 as W, type WorkspaceHealthResponse$1 as X, type HealthCheckStatistics as Y, type HealthDetailRequest as Z, type HealthMetricsRequest as _, type AIUsageDetailsResponse as a, type ToolParameter as a$, type HealthSummary as a0, type ImportStatistics as a1, type InterruptionSound as a2, type MemberNotificationPreferences as a3, type MemberNotifyActionParams as a4, type MemberUsageReport as a5, type MetricDataPoint as a6, type MetricSection as a7, type MetricSummary as a8, type MetricValue as a9, type ResourceScope as aA, type ResourceUsageResponse as aB, type RevisionState as aC, type RevisionStateRevision as aD, type RevisionStateWorkflow as aE, type RoutineWorkflowAccessMissingRole as aF, type RoutineWorkflowAccessWarning as aG, SCOPES as aH, SCOPE_PRESETS as aI, type SMSCommunicationDetailsResponse as aJ, type SMSMessageUsageResponse as aK, type SMSPhoneNumberUsageResponse as aL, ScopeCategory as aM, ScopeManager as aN, type ScopeName as aO, type SiteContext as aP, type SkippedWorkspace as aQ, type StatisticsSummary as aR, type SystemStatistics as aS, type TTSModel as aT, type TTSPreviewProvider as aU, TTS_PREVIEW_PROVIDERS as aV, type TaskContext as aW, type TaskCountResponse as aX, type ThinkingSound as aY, type TimeSeriesData as aZ, type TimeSeriesDataPoint as a_, type OpenAIChatModelConfig as aa, type OpenAIRealtimeModelConfig as ab, type OpenAIReasoningEffort as ac, type OpenAISemanticVADEagerness as ad, type OpenAISemanticVADTurnDetection as ae, type OpenAIServerVADTurnDetection as af, type OpenAITurnDetection as ag, type OpenAITurnDetectionType as ah, PIDS_DISPOSITIONS as ai, PIDS_SOURCES as aj, type PageContext as ak, type PerformanceMetrics as al, type PhoneCallPhoneNumberUsageResponse as am, type PhoneCallUsageResponse as an, type PhoneCommunicationDetailsResponse as ao, type PhoneNumberUsage as ap, type PidsDisposition as aq, type PidsSource as ar, type ProductOverageConfigResponse as as, type ProvisionPlanRequest as at, type ProvisionPlanResponse as au, type RealtimeModelConfig as av, type RequestsSection as aw, type RequestsStatusEntry as ax, type ResourceMetadata as ay, type ResourceOverageResponse as az, type AWSRealtimeModelConfig as b, type ToolkitContext as b0, ToolkitState as b1, type TopOffender as b2, type TopResourceOverageResponse as b3, type TtsReconnectOutcomeEntry as b4, type TtsReconnectSection as b5, type UsageProductSummaryResponse as b6, type UsageReportResponse as b7, type UsageReportRequest as b8, type UsageStatistics as b9, type VoiceMetricsResponse as ba, type VoiceMetricsTimeRange as bb, WIDGET_SLUGS as bc, type WebhookMetrics as bd, type WidgetSlug as be, type WorkflowContext as bf, type WorkspaceHealthDetail as bg, type WorkspaceHealthResponse as bh, type WorkspaceHealthRow as bi, type WorkspaceRoutineWorkflowAccessResponse as bj, type WorkspaceUsageReportResponse as bk, type XAIChatModelConfig as bl, type XAIRealtimeModelConfig as bm, type XAIReasoningEffort as bn, canPreviewVoice as bo, formatAppContextAsMarkdown as bp, getAllResourceSlugs as bq, getApplicableResourceSlugs as br, getApplicableResources as bs, getResourceMetadata as bt, getRevisionState as bu, getScopeFromProductType as bv, getTTSProvider as bw, getVoiceModelId as bx, type ScopeDefinition as by, type AcquisitionFunnelChannel as c, type AcquisitionFunnelRecentSignup as d, type AcquisitionFunnelResponse as e, type AdminDomainResponse as f, type AdminDomainSiteMapping as g, type AdminDomainWidgetMapping as h, type AdminPidsFindingResponse as i, type AnalyticsFilter as j, type AnalyticsQuery as k, type AppContext as l, type AttachedAddonInfo as m, type BaseRealtimeModelConfig as n, type BillingStatistics as o, type CallEndStatusEntry as p, type ChangeWorkspaceProductRequest as q, type ChangeWorkspaceProductResponse as r, type ChannelErrorBreakdown as s, type ChannelFailures as t, type ChatModelConfig as u, type ClaudeChatModelConfig as v, type CommunicationDetailsResponse as w, type CurrentPlanInfo as x, type CustomRealtimeModelConfig as y, DEFAULT_CUSTOM_VOICE_MODEL as z };
|