@gravity-rail/sdk 0.53.1 → 0.55.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chat-interaction-BDWwGHdp.d.cts → chat-interaction-C620llgG.d.cts} +1554 -285
- package/dist/{chat-interaction-pkhyXbVv.d.ts → chat-interaction-DDz9ZtQ8.d.ts} +1554 -285
- package/dist/{chunk-JRK77RT4.js → chunk-7R22EG5F.js} +379 -9
- package/dist/chunk-7R22EG5F.js.map +1 -0
- package/dist/{chunk-MMDSZ25F.js → chunk-HXVJF54M.js} +1 -1
- package/dist/chunk-HXVJF54M.js.map +1 -0
- package/dist/helpers.d.cts +4 -4
- package/dist/helpers.d.ts +4 -4
- package/dist/index.cjs +385 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +17 -2
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +404 -11
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +7 -6
- package/dist/internal.d.ts +7 -6
- package/dist/internal.js +35 -5
- package/dist/internal.js.map +1 -1
- package/dist/{member-import-Do6D2g14.d.ts → member-import-D1QvZiy5.d.ts} +1 -1
- package/dist/{member-import-BtTWfQ46.d.cts → member-import-DzuvKnMC.d.cts} +1 -1
- package/dist/{path-UGcX8CEF.d.ts → path-BIk9UPr0.d.cts} +95 -53
- package/dist/{path-J_F_cq4m.d.cts → path-kbfnY2gB.d.ts} +95 -53
- package/dist/realtime.cjs +26 -0
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +17 -0
- package/dist/realtime.d.ts +17 -0
- package/dist/realtime.js +26 -0
- package/dist/realtime.js.map +1 -1
- package/dist/schemas.d.cts +2 -2
- package/dist/schemas.d.ts +2 -2
- package/dist/schemas.js +1 -1
- package/dist/{tasks-JweebIce.d.cts → tasks-BdYhYUpU.d.cts} +92 -26
- package/dist/{tasks-JweebIce.d.ts → tasks-BdYhYUpU.d.ts} +92 -26
- package/package.json +3 -3
- package/dist/chunk-JRK77RT4.js.map +0 -1
- package/dist/chunk-MMDSZ25F.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { c4 as ChannelMessagesUnavailableReason, n5 as Resource$1, Z as ActivityEventLine, L as ActivityAggregateResponse, $ as ActivityEventsResponse, kL as PathDefinition } from './chat-interaction-DDz9ZtQ8.js';
|
|
2
|
+
import { e_ as SortOrder } from './tasks-BdYhYUpU.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
@@ -332,6 +332,36 @@ interface ChannelMessagesResponse {
|
|
|
332
332
|
reason?: ChannelMessagesUnavailableReason | null;
|
|
333
333
|
}
|
|
334
334
|
|
|
335
|
+
/**
|
|
336
|
+
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
337
|
+
* (group map from emit_openapi.py). Do not edit manually.
|
|
338
|
+
* Group: say_task
|
|
339
|
+
*/
|
|
340
|
+
/**
|
|
341
|
+
* A Say template for one supported locale.
|
|
342
|
+
*/
|
|
343
|
+
interface SayMessageTranslation {
|
|
344
|
+
locale: string;
|
|
345
|
+
/** @maxLength 4000 */
|
|
346
|
+
text: string;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* What the agent says, verbatim, when the conversation reaches this Task.
|
|
350
|
+
*
|
|
351
|
+
* ``message`` is a Jinja2 template rendered with the same variables as a
|
|
352
|
+
* Task prompt. Optional ``translations`` override it by exact locale or
|
|
353
|
+
* same-language match. Every script is optional: without an applicable
|
|
354
|
+
* nonblank script the Task completes silently. Every authored variant must
|
|
355
|
+
* parse (checked by the runtime's ``validate``).
|
|
356
|
+
*/
|
|
357
|
+
interface SayTaskConfiguration {
|
|
358
|
+
/** @maxLength 4000 */
|
|
359
|
+
message?: string;
|
|
360
|
+
waitForResponse?: boolean;
|
|
361
|
+
/** @maxItems 100 */
|
|
362
|
+
translations?: SayMessageTranslation[];
|
|
363
|
+
}
|
|
364
|
+
|
|
335
365
|
/**
|
|
336
366
|
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
337
367
|
* (group map from emit_openapi.py). Do not edit manually.
|
|
@@ -1124,6 +1154,50 @@ type PidsDisposition = (typeof PIDS_DISPOSITIONS)[number];
|
|
|
1124
1154
|
declare const PIDS_SOURCES: readonly ["scheduled", "backfill", "pre_llm"];
|
|
1125
1155
|
type PidsSource = (typeof PIDS_SOURCES)[number];
|
|
1126
1156
|
|
|
1157
|
+
/**
|
|
1158
|
+
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
1159
|
+
* (group map from emit_openapi.py). Do not edit manually.
|
|
1160
|
+
* Group: athena_outreach_state
|
|
1161
|
+
*/
|
|
1162
|
+
/**
|
|
1163
|
+
* A closed-code refusal; ``detail`` is the code's fixed sentence.
|
|
1164
|
+
*/
|
|
1165
|
+
interface ReconcileAthenaBookingRefusalResponse {
|
|
1166
|
+
code: string;
|
|
1167
|
+
detail: string;
|
|
1168
|
+
}
|
|
1169
|
+
/**
|
|
1170
|
+
* The operator's reconciliation of one uncertain booking attempt.
|
|
1171
|
+
*/
|
|
1172
|
+
interface ReconcileAthenaBookingRequest {
|
|
1173
|
+
attemptId: string;
|
|
1174
|
+
appointmentId?: string | null;
|
|
1175
|
+
clear?: true | null;
|
|
1176
|
+
vendorOutcomeConfirmed?: boolean;
|
|
1177
|
+
executionTerminated?: boolean;
|
|
1178
|
+
}
|
|
1179
|
+
/**
|
|
1180
|
+
* ``200``: the attempt was finalized as booked, or cleared.
|
|
1181
|
+
*/
|
|
1182
|
+
interface ReconcileAthenaBookingResponse {
|
|
1183
|
+
connectionId: number;
|
|
1184
|
+
memberId: number;
|
|
1185
|
+
attemptId: string;
|
|
1186
|
+
mode: ReconcileAthenaBookingResponseMode;
|
|
1187
|
+
bookingState: ReconcileAthenaBookingResponseBookingState;
|
|
1188
|
+
appointmentId?: string | null;
|
|
1189
|
+
}
|
|
1190
|
+
type ReconcileAthenaBookingResponseBookingState = typeof ReconcileAthenaBookingResponseBookingState[keyof typeof ReconcileAthenaBookingResponseBookingState];
|
|
1191
|
+
declare const ReconcileAthenaBookingResponseBookingState: {
|
|
1192
|
+
readonly booked: "booked";
|
|
1193
|
+
readonly none: "none";
|
|
1194
|
+
};
|
|
1195
|
+
type ReconcileAthenaBookingResponseMode = typeof ReconcileAthenaBookingResponseMode[keyof typeof ReconcileAthenaBookingResponseMode];
|
|
1196
|
+
declare const ReconcileAthenaBookingResponseMode: {
|
|
1197
|
+
readonly finalize: "finalize";
|
|
1198
|
+
readonly clear: "clear";
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1127
1201
|
declare const MEMBER_RELATIONSHIP_KINDS: readonly [{
|
|
1128
1202
|
readonly kind: "parent_of";
|
|
1129
1203
|
readonly cardinality: "many_to_many";
|
|
@@ -1423,12 +1497,12 @@ interface HealthDetailRequest {
|
|
|
1423
1497
|
* Group: acquisition_funnel
|
|
1424
1498
|
*/
|
|
1425
1499
|
/**
|
|
1426
|
-
*
|
|
1500
|
+
* Self-serve signups in the window grouped by first-touch source.
|
|
1427
1501
|
*
|
|
1428
1502
|
* ``source`` matches ``BookOfBusinessAcquisitionDistribution.source``
|
|
1429
1503
|
* semantics (``utm_source`` or ``"direct"``) so the two rollups join.
|
|
1430
|
-
* Only
|
|
1431
|
-
*
|
|
1504
|
+
* Only self-serve signups WITH an acquisition record are grouped here.
|
|
1505
|
+
* Marked signups with no record are counted in ``unattributedSignupCount``.
|
|
1432
1506
|
*/
|
|
1433
1507
|
interface AcquisitionFunnelChannel {
|
|
1434
1508
|
source: string;
|
|
@@ -1436,24 +1510,28 @@ interface AcquisitionFunnelChannel {
|
|
|
1436
1510
|
latestSignupAt: string;
|
|
1437
1511
|
}
|
|
1438
1512
|
/**
|
|
1439
|
-
* One
|
|
1513
|
+
* One self-serve signup, newest-first — the same population as signupCount.
|
|
1440
1514
|
*
|
|
1441
|
-
*
|
|
1442
|
-
*
|
|
1443
|
-
*
|
|
1444
|
-
*
|
|
1515
|
+
* PII-free by construction: account id only (never email/name), the signup
|
|
1516
|
+
* method the path recorded, and the allowlisted, query-stripped marketing
|
|
1517
|
+
* values (``lib.services.acquisition.sanitize_acquisition``). ``source`` is
|
|
1518
|
+
* null when the signup has no acquisition record. A stored ``utm_source``
|
|
1519
|
+
* is returned as-is, including the string ``"unattributed"``.
|
|
1445
1520
|
*/
|
|
1446
1521
|
interface AcquisitionFunnelRecentSignup {
|
|
1447
1522
|
accountId: number;
|
|
1448
1523
|
createdAt: string;
|
|
1449
|
-
|
|
1524
|
+
/** Signup path that created the account: email, sms, or google. */
|
|
1525
|
+
signupMethod: string;
|
|
1526
|
+
/** First-touch utm_source, or "direct" when the record has no utm_source. Null when this signup has no acquisition record. */
|
|
1527
|
+
source?: string | null;
|
|
1450
1528
|
utmMedium?: string | null;
|
|
1451
1529
|
utmCampaign?: string | null;
|
|
1452
1530
|
referrer?: string | null;
|
|
1453
1531
|
landingPage?: string | null;
|
|
1454
1532
|
}
|
|
1455
1533
|
/**
|
|
1456
|
-
*
|
|
1534
|
+
* Self-serve signups by first-touch channel (superuser only).
|
|
1457
1535
|
*/
|
|
1458
1536
|
interface AcquisitionFunnelResponse {
|
|
1459
1537
|
generatedAt: string;
|
|
@@ -1461,11 +1539,14 @@ interface AcquisitionFunnelResponse {
|
|
|
1461
1539
|
windowDays: number;
|
|
1462
1540
|
windowStart: string;
|
|
1463
1541
|
captureLiveSince: string | null;
|
|
1542
|
+
/** Self-serve signups in the window: accounts created by email, SMS, or Google signup and marked by that path. Omits member provisioning, imports, invitations, and rows from before the marker (no backfill). */
|
|
1464
1543
|
signupCount: number;
|
|
1544
|
+
/** Self-serve signups in the window that have a first-touch acquisition record. */
|
|
1465
1545
|
attributedSignupCount: number;
|
|
1546
|
+
/** Self-serve signups in the window with no first-touch record. Kept out of the channel rows so direct stays a real measurement. */
|
|
1466
1547
|
unattributedSignupCount: number;
|
|
1467
1548
|
channels: AcquisitionFunnelChannel[];
|
|
1468
|
-
|
|
1549
|
+
recentSelfServeSignups: AcquisitionFunnelRecentSignup[];
|
|
1469
1550
|
}
|
|
1470
1551
|
|
|
1471
1552
|
/**
|
|
@@ -1611,45 +1692,6 @@ interface AppContext {
|
|
|
1611
1692
|
*/
|
|
1612
1693
|
declare function formatAppContextAsMarkdown(context: AppContext | undefined): string;
|
|
1613
1694
|
|
|
1614
|
-
/**
|
|
1615
|
-
* Generated by Orval, grouped by scripts/types-codegen/group_generated.ts
|
|
1616
|
-
* (group map from emit_openapi.py). Do not edit manually.
|
|
1617
|
-
* Group: say_task
|
|
1618
|
-
*/
|
|
1619
|
-
/**
|
|
1620
|
-
* A Say template for one supported locale.
|
|
1621
|
-
*/
|
|
1622
|
-
interface SayMessageTranslation {
|
|
1623
|
-
locale: string;
|
|
1624
|
-
/** @maxLength 4000 */
|
|
1625
|
-
text: string;
|
|
1626
|
-
}
|
|
1627
|
-
/**
|
|
1628
|
-
* What the agent says, verbatim, when the conversation reaches this Task.
|
|
1629
|
-
*
|
|
1630
|
-
* ``message`` is a Jinja2 template rendered with the same variables as a
|
|
1631
|
-
* Task prompt. Optional ``translations`` override it by exact locale or
|
|
1632
|
-
* same-language match. Every script is optional: without an applicable
|
|
1633
|
-
* nonblank script the Task completes silently. Every authored variant must
|
|
1634
|
-
* parse (checked by the runtime's ``validate``).
|
|
1635
|
-
*/
|
|
1636
|
-
interface SayTaskConfiguration {
|
|
1637
|
-
/** @maxLength 4000 */
|
|
1638
|
-
message?: string;
|
|
1639
|
-
waitForResponse?: boolean;
|
|
1640
|
-
/** @maxItems 100 */
|
|
1641
|
-
translations?: SayMessageTranslation[];
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
/**
|
|
1645
|
-
* The Task types a Workflow can contain: `chat` (the conversational Task, also
|
|
1646
|
-
* stored as `standard`) and `say` (speaks a literal script, then follows its
|
|
1647
|
-
* `complete` outcome).
|
|
1648
|
-
*/
|
|
1649
|
-
type TaskType = 'chat' | 'say';
|
|
1650
|
-
|
|
1651
|
-
type DataRow = TaskDataRow | FormDataRow;
|
|
1652
|
-
|
|
1653
1695
|
/**
|
|
1654
1696
|
* Default AI model constants shared across the frontend.
|
|
1655
1697
|
*
|
|
@@ -2358,4 +2400,4 @@ declare function pathDraftFromStorage(path: StoredPath): PathDraft;
|
|
|
2358
2400
|
/** Adapt only the edited Path. Preserve original blank/null values and inert markers on a no-op. */
|
|
2359
2401
|
declare function pathDraftToStorage<T extends StoredPath>(draft: PathDraft, original: T): T;
|
|
2360
2402
|
|
|
2361
|
-
export { type
|
|
2403
|
+
export { type VoiceMetricsResponse$1 as $, type AIModelUsageResponse as A, type BillingStatistics as B, type CallEndSection as C, CreateMemberContactPointRequestSharing as D, type CurrentPlanInfo as E, DEFAULT_AGENT_CHAT_MODEL as F, DEFAULT_AGENT_REALTIME_MODEL as G, DEFAULT_AGENT_REALTIME_MODEL_CONFIG as H, DEFAULT_CHAT_MODEL as I, DEFAULT_CUSTOM_VOICE_MODEL as J, DEFAULT_VOICE_INFERENCE_MODEL as K, type DailyPhoneRowResponse as L, type DailySMSRowResponse as M, type DashboardMetrics as N, type DataRecordContext as O, type DataRecordImportOutcomes as P, type DeviceCacheFileEntry as Q, type DeviceCacheManifestResponse as R, type EfficiencyMetricsResponse as S, type EmailCountsResponse as T, type EmailUsageResponse as U, type EngineTimeSeries as V, type ErrorCodeBucket as W, type EventRuleMetrics as X, type ExportStatistics as Y, type FeatureSyncStatus as Z, type MetricSummary$1 as _, type AIUsageDetailsResponse as a, type StoredPath as a$, type WorkspaceHealthResponse$1 as a0, type HealthCheckStatistics as a1, type HealthDetailRequest as a2, type HealthMetricsRequest as a3, type HealthMetricsResponse as a4, type HealthSummary as a5, type ImportStatistics as a6, MAX_EMAIL_SEND_RECIPIENTS as a7, MEMBER_RELATIONSHIP_KINDS as a8, type MemberContactPointResponse as a9, type ReconcileAthenaBookingRefusalResponse as aA, type ReconcileAthenaBookingRequest as aB, type ReconcileAthenaBookingResponse as aC, type RequestsSection as aD, type RequestsStatusEntry as aE, type ResourceMetadata as aF, type ResourceOverageResponse as aG, type ResourceUsageResponse as aH, type RetireMemberContactPointRequest as aI, type RevisionState as aJ, type RevisionStateRevision as aK, type RevisionStateWorkflow as aL, type RoutineRunMetrics as aM, SCOPES as aN, SCOPE_PRESETS as aO, type SMSCommunicationDetailsResponse as aP, type SMSMessageUsageResponse as aQ, type SMSPhoneNumberUsageResponse as aR, type SayMessageTranslation as aS, type SayTaskConfiguration as aT, type ScenarioDependencyAssessment as aU, ScopeCategory as aV, ScopeManager as aW, type ScopeName as aX, type SiteContext as aY, type SkippedWorkspace as aZ, type StatisticsSummary as a_, type MemberContactPointConfirmationResponse as aa, type MemberContactPointListResponse as ab, type MemberImportColumnResponse as ac, type MemberNotificationPreferences as ad, type MemberNotifyActionParams as ae, type MemberNotifyRecipientMode as af, type MemberUsageReport as ag, type MetricDataPoint as ah, type MetricSection as ai, type MetricSummary as aj, type MetricValue as ak, PIDS_DISPOSITIONS as al, PIDS_SOURCES as am, type PageContext as an, type PathDraft as ao, type PerformanceMetrics as ap, type PhoneCallPhoneNumberUsageResponse as aq, type PhoneCallUsageResponse as ar, type PhoneCommunicationDetailsResponse as as, type PhoneNumberUsage as at, type PidsDisposition as au, type PidsSource as av, type ProductOverageConfigResponse as aw, type ProvisionPlanRequest as ax, type ProvisionPlanResponse as ay, type RawDataRecordImportResponse as az, type AcquisitionFunnelChannel as b, type SystemStatistics as b0, type TaskContext as b1, type TaskCountResponse as b2, type TimeSeriesData as b3, type TimeSeriesDataPoint as b4, type ToolParameter as b5, type ToolkitContext as b6, ToolkitState as b7, type TopOffender as b8, type TopResourceOverageResponse as b9, pathDraftToStorage as bA, ScenarioDependencyAssessmentRefusalCodesItem as bB, type ScopeDefinition as bC, type TtsReconnectOutcomeEntry as ba, type TtsReconnectSection as bb, type UpdateMemberContactPointRequest as bc, UpdateMemberContactPointRequestContactType as bd, UpdateMemberContactPointRequestPurpose as be, UpdateMemberContactPointRequestSharing as bf, type UsageProductSummaryResponse as bg, type UsageReportResponse as bh, type UsageReportRequest as bi, type UsageStatistics as bj, type VoiceMetricsResponse as bk, type VoiceMetricsTimeRange as bl, WIDGET_SLUGS as bm, type WebhookMetrics as bn, type WidgetSlug as bo, type WorkflowContext as bp, type WorkspaceHealthDetail as bq, type WorkspaceHealthResponse as br, type WorkspaceHealthRow as bs, type WorkspaceUsageReportResponse as bt, formatAppContextAsMarkdown as bu, getAllResourceSlugs as bv, getPathDefinition as bw, getResourceMetadata as bx, getRevisionState as by, pathDraftFromStorage as bz, type AcquisitionFunnelRecentSignup as c, type AcquisitionFunnelResponse as d, type ActivityDetail as e, type ActivityFeedResponse as f, type AdminDomainResponse as g, type AdminDomainSiteMapping as h, type AdminDomainWidgetMapping as i, type AdminPidsFindingResponse as j, type AnalyticsFilter as k, type AnalyticsQuery as l, type AppContext as m, type AttachedAddonInfo as n, type BundleScenarioPreflightResponse as o, type CallEndStatusEntry as p, type ChannelErrorBreakdown as q, type ChannelFailures as r, type ChannelMessageResponse as s, ChannelMessageDirection as t, ChannelMessageSource as u, type ChannelMessagesResponse as v, type CommunicationDetailsResponse as w, type CreateMemberContactPointRequest as x, CreateMemberContactPointRequestContactType as y, CreateMemberContactPointRequestPurpose as z };
|
package/dist/realtime.cjs
CHANGED
|
@@ -825,6 +825,32 @@ var OperatorSessionClient = class {
|
|
|
825
825
|
answer_token: answerToken
|
|
826
826
|
});
|
|
827
827
|
}
|
|
828
|
+
/**
|
|
829
|
+
* Join a live, escalated voice call on this chat.
|
|
830
|
+
*
|
|
831
|
+
* Unlike {@link answerCall} (a waiting caller whose ring poll redirects the
|
|
832
|
+
* PSTN leg), the caller here is already on the AI media stream with the AI
|
|
833
|
+
* paused for an escalation. The backend
|
|
834
|
+
* (`lib/operator_session_handler.py::_join_live_call`) authorizes, attaches
|
|
835
|
+
* this session as bridge side "a", and re-points the live caller leg onto
|
|
836
|
+
* the bridge over Twilio REST — replacing the AI stream with the human one.
|
|
837
|
+
* The server then sends `operator.call.started`, after which audio flows
|
|
838
|
+
* exactly like an answered call.
|
|
839
|
+
*
|
|
840
|
+
* The chat id is carried by the session URL, so no argument is needed. Must
|
|
841
|
+
* be called once the session is ready (state `connected`); starts the
|
|
842
|
+
* microphone first so operator audio flows the instant the bridge attaches.
|
|
843
|
+
*/
|
|
844
|
+
async joinCall() {
|
|
845
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) {
|
|
846
|
+
throw new Error("Operator session WebSocket is not connected");
|
|
847
|
+
}
|
|
848
|
+
if (this.sessionState !== "connected") {
|
|
849
|
+
throw new Error("Operator session is not ready");
|
|
850
|
+
}
|
|
851
|
+
await this.startMicrophone();
|
|
852
|
+
this.sendCustom("operator.call.join");
|
|
853
|
+
}
|
|
828
854
|
/**
|
|
829
855
|
* Mute or unmute the operator's outbound microphone. Muting gates mic frames
|
|
830
856
|
* locally (the caller stops hearing the operator) while callee audio keeps
|