@gravity-rail/sdk 4.0.0 → 6.0.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 +4 -2
- package/dist/account-CSJJbLIj.d.cts +459 -0
- package/dist/account-CSJJbLIj.d.ts +459 -0
- package/dist/{path-CUY-Iw70.d.ts → agent_standing_job-CqKpMoHO.d.cts} +1068 -140
- package/dist/{path-B3b3_El9.d.cts → agent_standing_job-yehTe972.d.ts} +1068 -140
- package/dist/{chat-interaction-DXgKjFqZ.d.cts → chat-interaction-BtUtVszg.d.ts} +13512 -9340
- package/dist/{chat-interaction-a7U-tHfQ.d.ts → chat-interaction-CAfwlYvv.d.cts} +13512 -9340
- package/dist/{chunk-WHRIIBJ4.js → chunk-L4XC6KDG.js} +1773 -475
- package/dist/chunk-L4XC6KDG.js.map +1 -0
- package/dist/{chunk-D5VNVTUQ.js → chunk-P2MSMMMJ.js} +120 -2
- package/dist/chunk-P2MSMMMJ.js.map +1 -0
- package/dist/{chunk-ZLF3N3ZD.js → chunk-P2X5TOYY.js} +31 -5
- package/dist/chunk-P2X5TOYY.js.map +1 -0
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +3 -2
- package/dist/helpers.d.ts +3 -2
- package/dist/helpers.js +1 -1
- package/dist/index.cjs +1961 -917
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -249
- package/dist/index.d.ts +87 -249
- package/dist/index.js +171 -458
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +1928 -448
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +2428 -263
- package/dist/internal.d.ts +2428 -263
- package/dist/internal.js +146 -27
- package/dist/internal.js.map +1 -1
- package/dist/{member-import-VOLKR5dY.d.ts → member-import-C5nnoGvW.d.ts} +1 -1
- package/dist/{member-import-BHtOru8g.d.cts → member-import-DhaNVT7s.d.cts} +1 -1
- package/dist/realtime.cjs +250 -3
- package/dist/realtime.cjs.map +1 -1
- package/dist/realtime.d.cts +87 -4
- package/dist/realtime.d.ts +87 -4
- package/dist/realtime.js +245 -3
- package/dist/realtime.js.map +1 -1
- package/dist/schemas.cjs +154 -19
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +624 -72
- package/dist/schemas.d.ts +624 -72
- package/dist/schemas.js +72 -21
- package/dist/schemas.js.map +1 -1
- package/dist/{tasks-CgptqCsN.d.cts → tasks-A12E_RLa.d.cts} +2243 -1979
- package/dist/{tasks-CgptqCsN.d.ts → tasks-DrmyOlRh.d.ts} +2243 -1979
- package/dist/{types-BXaWYGHj.d.cts → types-Bv6GtLZ2.d.cts} +25 -2
- package/dist/{types-BXaWYGHj.d.ts → types-Bv6GtLZ2.d.ts} +25 -2
- package/package.json +4 -4
- package/dist/chunk-D5VNVTUQ.js.map +0 -1
- package/dist/chunk-WHRIIBJ4.js.map +0 -1
- package/dist/chunk-ZLF3N3ZD.js.map +0 -1
package/dist/schemas.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
ActivitySubject,
|
|
3
|
+
ActivityVerb,
|
|
4
|
+
AiDisclosure,
|
|
2
5
|
AttendeeResponseStatus,
|
|
3
6
|
CalendarEventStatus,
|
|
4
7
|
CalendarScheduleAvailabilityType,
|
|
@@ -7,8 +10,9 @@ import {
|
|
|
7
10
|
DataFieldType,
|
|
8
11
|
DataSensitivity,
|
|
9
12
|
DataTypeRecordScope,
|
|
10
|
-
IndexStatus
|
|
11
|
-
|
|
13
|
+
IndexStatus,
|
|
14
|
+
ResponseLength
|
|
15
|
+
} from "./chunk-P2MSMMMJ.js";
|
|
12
16
|
|
|
13
17
|
// src/schemas/accounts.ts
|
|
14
18
|
import { z } from "zod";
|
|
@@ -508,6 +512,10 @@ function createTool(name, description, schema) {
|
|
|
508
512
|
}
|
|
509
513
|
|
|
510
514
|
// src/schemas/chats.ts
|
|
515
|
+
var CallActivityLabelSchema = z4.object({
|
|
516
|
+
verb: z4.nativeEnum(ActivityVerb),
|
|
517
|
+
subject: z4.nativeEnum(ActivitySubject)
|
|
518
|
+
}).strict();
|
|
511
519
|
var ChannelEnum = z4.enum([
|
|
512
520
|
"cli",
|
|
513
521
|
"frame",
|
|
@@ -734,7 +742,7 @@ var InitiateOutboundCallSchema = WorkspaceIdSchema.extend({
|
|
|
734
742
|
});
|
|
735
743
|
var RateMessageSchema = WorkspaceIdSchema.extend({
|
|
736
744
|
chatId: z4.number().describe("Chat ID"),
|
|
737
|
-
messageUuid: z4.string().describe("Message
|
|
745
|
+
messageUuid: z4.string().describe("Message id (message ID) to rate, not its uuid"),
|
|
738
746
|
rating: z4.number().describe("Rating (1-5)")
|
|
739
747
|
});
|
|
740
748
|
var CreateChatForWorkflowSchema = WorkspaceIdSchema.extend({
|
|
@@ -814,6 +822,7 @@ var ToolCallFunctionSchema = z4.object({
|
|
|
814
822
|
arguments: z4.string()
|
|
815
823
|
});
|
|
816
824
|
var ToolCallSchema = z4.object({
|
|
825
|
+
activity: CallActivityLabelSchema.nullable().optional(),
|
|
817
826
|
id: z4.string(),
|
|
818
827
|
type: z4.literal("function"),
|
|
819
828
|
function: ToolCallFunctionSchema
|
|
@@ -870,8 +879,9 @@ var ChatMessageAPIResponseSchema = z4.object({
|
|
|
870
879
|
smsDeliveryUpdatedAt: z4.string().nullable().optional(),
|
|
871
880
|
// Friendly failure reason — only set when smsDeliveryStatus is failed/undelivered.
|
|
872
881
|
smsDeliveryFailureReason: z4.string().nullable().optional(),
|
|
873
|
-
// ADR-11 provenance. Null
|
|
874
|
-
//
|
|
882
|
+
// ADR-11 provenance. Null whenever the writer set none, including rows
|
|
883
|
+
// written before the columns existed and many assistant and tool rows
|
|
884
|
+
// written today — clients fall back to `role`.
|
|
875
885
|
origin: MessageOriginEnum.nullable().optional(),
|
|
876
886
|
audience: MessageAudienceEnum.nullable().optional(),
|
|
877
887
|
// Recorded outcome of a `role: 'tool'` message; null on other messages.
|
|
@@ -885,6 +895,11 @@ var ChatCompletionMessageSchema = z4.object({
|
|
|
885
895
|
content: z4.string()
|
|
886
896
|
});
|
|
887
897
|
var ChatMessageUISchema = ChatMessageAPIResponseSchema.extend({
|
|
898
|
+
approvalDecision: z4.object({
|
|
899
|
+
callId: z4.string(),
|
|
900
|
+
tool: z4.string(),
|
|
901
|
+
answer: z4.enum(["approve", "approve_always", "reject", "edit", "other"])
|
|
902
|
+
}).nullable().optional(),
|
|
888
903
|
error: z4.object({
|
|
889
904
|
code: z4.string(),
|
|
890
905
|
message: z4.string()
|
|
@@ -1129,7 +1144,7 @@ var DataTypeFormDataBaseSchema = z5.object({
|
|
|
1129
1144
|
/** Hide this Form and its records from Members without `records:admin`. */
|
|
1130
1145
|
adminOnly: z5.boolean().optional(),
|
|
1131
1146
|
fields: z5.array(SchemaFieldFormDataSchema),
|
|
1132
|
-
ownerId: z5.number().
|
|
1147
|
+
ownerId: z5.number().optional()
|
|
1133
1148
|
}).strict();
|
|
1134
1149
|
var DataTypeFormDataSchema = DataTypeFormDataBaseSchema.superRefine(validateDataTypePolicy);
|
|
1135
1150
|
var DataRecordFiltersSchema = z5.object({
|
|
@@ -1415,7 +1430,8 @@ var CreateInquirySchema = z7.object({
|
|
|
1415
1430
|
"other",
|
|
1416
1431
|
"demo_request",
|
|
1417
1432
|
"waitlist",
|
|
1418
|
-
"whitepaper"
|
|
1433
|
+
"whitepaper",
|
|
1434
|
+
"slack_teams"
|
|
1419
1435
|
]),
|
|
1420
1436
|
cellNumber: z7.string().optional(),
|
|
1421
1437
|
businessNumber: z7.string().optional(),
|
|
@@ -1461,9 +1477,10 @@ var AnonymousInquiryFormSchema = CreateInquirySchema.refine(
|
|
|
1461
1477
|
}
|
|
1462
1478
|
);
|
|
1463
1479
|
var ListInquiriesSchema = z7.object({
|
|
1464
|
-
page: z7.number().optional().describe("Page number"),
|
|
1465
|
-
pageSize: z7.number().optional().describe("Items per page"),
|
|
1466
|
-
inquiryType: z7.string().optional().describe("Filter by inquiry
|
|
1480
|
+
page: z7.number().int().min(1).optional().describe("Page number"),
|
|
1481
|
+
pageSize: z7.number().int().min(1).optional().describe("Items per page"),
|
|
1482
|
+
inquiryType: z7.union([z7.string(), z7.array(z7.string())]).optional().describe("Filter by inquiry types"),
|
|
1483
|
+
statuses: z7.array(z7.enum(["new", "in_progress", "done", "spam"])).optional().describe("Filter by inquiry statuses")
|
|
1467
1484
|
});
|
|
1468
1485
|
var GetInquirySchema = z7.object({
|
|
1469
1486
|
inquiryId: z7.number().describe("Inquiry ID")
|
|
@@ -1478,7 +1495,7 @@ var EnrichInquirySchema = z7.object({
|
|
|
1478
1495
|
});
|
|
1479
1496
|
var UpdateInquiryRequestSchema = z7.object({
|
|
1480
1497
|
notes: z7.string().optional(),
|
|
1481
|
-
status: z7.enum(["new", "in_progress", "done"]).optional()
|
|
1498
|
+
status: z7.enum(["new", "in_progress", "done", "spam"]).optional()
|
|
1482
1499
|
});
|
|
1483
1500
|
var UpdateInquirySchema = z7.object({
|
|
1484
1501
|
inquiryId: z7.number().describe("Inquiry ID")
|
|
@@ -1518,8 +1535,8 @@ var CreateWorkspaceMemberRequestSchema = z8.object({
|
|
|
1518
1535
|
accountEnabled: z8.boolean().optional(),
|
|
1519
1536
|
isOrgOwner: z8.boolean().optional(),
|
|
1520
1537
|
accountTosAccepted: z8.boolean().optional(),
|
|
1521
|
-
//
|
|
1522
|
-
memberType: z8.enum(["member", "test", "
|
|
1538
|
+
// The types the API creates here; it rejects any other value. Omitted means 'member'.
|
|
1539
|
+
memberType: z8.enum(["member", "test", "business"]).optional()
|
|
1523
1540
|
});
|
|
1524
1541
|
var UpdateWorkspaceMemberRequestSchema = z8.object({
|
|
1525
1542
|
// Member details
|
|
@@ -1669,7 +1686,8 @@ var MemberRoleSchema = z8.object({
|
|
|
1669
1686
|
});
|
|
1670
1687
|
var MemberSchema = z8.object({
|
|
1671
1688
|
id: z8.number(),
|
|
1672
|
-
|
|
1689
|
+
// Absent for a Business, an Agent, a test Member and an anonymous Member.
|
|
1690
|
+
accountUuid: z8.string().nullable().optional(),
|
|
1673
1691
|
memberRoleId: z8.number(),
|
|
1674
1692
|
// Consolidated member fields (from personas consolidation migration)
|
|
1675
1693
|
name: z8.string().optional(),
|
|
@@ -1696,7 +1714,7 @@ var MemberSchema = z8.object({
|
|
|
1696
1714
|
isSuperuser: z8.boolean().optional(),
|
|
1697
1715
|
locale: z8.string().optional(),
|
|
1698
1716
|
timezone: z8.string().optional(),
|
|
1699
|
-
memberType: z8.enum(["member", "test", "anonymous"]).optional(),
|
|
1717
|
+
memberType: z8.enum(["member", "test", "anonymous", "agent", "business"]).optional(),
|
|
1700
1718
|
isArchived: z8.boolean().optional(),
|
|
1701
1719
|
// Timestamps
|
|
1702
1720
|
createdAt: z8.string().optional(),
|
|
@@ -1770,12 +1788,37 @@ var SiteFormDataSchema = z10.object({
|
|
|
1770
1788
|
defaultWorkflowId: z10.number().optional(),
|
|
1771
1789
|
homePageId: z10.number().optional()
|
|
1772
1790
|
});
|
|
1791
|
+
var pageNodeSchema = z10.lazy(
|
|
1792
|
+
() => z10.object({
|
|
1793
|
+
type: z10.string(),
|
|
1794
|
+
attrs: z10.record(z10.string(), z10.unknown()).nullable().optional(),
|
|
1795
|
+
content: z10.array(pageNodeSchema).nullable().optional(),
|
|
1796
|
+
marks: z10.array(
|
|
1797
|
+
z10.object({
|
|
1798
|
+
type: z10.string(),
|
|
1799
|
+
attrs: z10.record(z10.string(), z10.unknown()).nullable().optional()
|
|
1800
|
+
}).passthrough()
|
|
1801
|
+
).nullable().optional(),
|
|
1802
|
+
text: z10.string().nullable().optional()
|
|
1803
|
+
}).passthrough()
|
|
1804
|
+
);
|
|
1805
|
+
var pageDocumentSchema = z10.lazy(
|
|
1806
|
+
() => z10.object({
|
|
1807
|
+
type: z10.literal("doc").optional(),
|
|
1808
|
+
content: z10.array(pageNodeSchema).nullable().optional(),
|
|
1809
|
+
translations: z10.record(z10.string(), pageDocumentSchema).nullable().optional()
|
|
1810
|
+
}).passthrough()
|
|
1811
|
+
);
|
|
1773
1812
|
var SitePageFormDataSchema = z10.object({
|
|
1774
1813
|
title: z10.string(),
|
|
1775
1814
|
slug: z10.string().optional(),
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1815
|
+
status: z10.string().optional(),
|
|
1816
|
+
contentBlocks: pageDocumentSchema.optional(),
|
|
1817
|
+
sourceUrl: z10.string().nullable().optional(),
|
|
1818
|
+
sourceHtml: z10.string().nullable().optional(),
|
|
1819
|
+
sourceMarkdown: z10.string().nullable().optional(),
|
|
1820
|
+
sourceMetadata: z10.record(z10.string(), z10.unknown()).nullable().optional()
|
|
1821
|
+
}).strict();
|
|
1779
1822
|
var MenuItemFormDataSchema = z10.object({
|
|
1780
1823
|
label: z10.string(),
|
|
1781
1824
|
itemType: z10.enum(["page", "url"]),
|
|
@@ -1866,7 +1909,7 @@ var CaptureRowSchema = z11.discriminatedUnion("source", [
|
|
|
1866
1909
|
source: z11.literal("task"),
|
|
1867
1910
|
field: z11.object(SchemaFieldSchema.shape).partial().required({ name: true }),
|
|
1868
1911
|
permissions: CapturePermissionsSchema.optional(),
|
|
1869
|
-
fill: z11.enum(["asked", "inferred"]).optional(),
|
|
1912
|
+
fill: z11.enum(["asked", "inferred", "ask", "collect"]).optional(),
|
|
1870
1913
|
required: z11.boolean().optional(),
|
|
1871
1914
|
exits: z11.boolean().optional()
|
|
1872
1915
|
}),
|
|
@@ -1875,7 +1918,7 @@ var CaptureRowSchema = z11.discriminatedUnion("source", [
|
|
|
1875
1918
|
dataTypeUuid: z11.string().uuid(),
|
|
1876
1919
|
fieldSlug: z11.string().min(1).max(100),
|
|
1877
1920
|
permissions: CapturePermissionsSchema.optional(),
|
|
1878
|
-
fill: z11.
|
|
1921
|
+
fill: z11.enum(["asked", "inferred", "ask", "collect"]).optional(),
|
|
1879
1922
|
required: z11.boolean().optional()
|
|
1880
1923
|
})
|
|
1881
1924
|
]);
|
|
@@ -1961,7 +2004,6 @@ var WorkflowEscalationPolicySchema = z12.object({
|
|
|
1961
2004
|
"requests_human"
|
|
1962
2005
|
])
|
|
1963
2006
|
).nullable().optional(),
|
|
1964
|
-
answerNotFound: z12.boolean().optional(),
|
|
1965
2007
|
pausedMessage: z12.string().nullable().optional(),
|
|
1966
2008
|
notifiedMessage: z12.string().nullable().optional(),
|
|
1967
2009
|
onlineMessage: z12.string().nullable().optional(),
|
|
@@ -1978,10 +2020,17 @@ var WorkflowEscalationRoutingSchema = z12.object({
|
|
|
1978
2020
|
}).strict();
|
|
1979
2021
|
|
|
1980
2022
|
// src/schemas/workflows.ts
|
|
2023
|
+
var WorkflowAgentBehaviorSchema = z13.object({
|
|
2024
|
+
responseLength: z13.nativeEnum(ResponseLength).optional(),
|
|
2025
|
+
oneQuestionPerTurn: z13.boolean().optional(),
|
|
2026
|
+
aiDisclosure: z13.nativeEnum(AiDisclosure).optional(),
|
|
2027
|
+
smsStopInstructions: z13.boolean().optional()
|
|
2028
|
+
}).strict();
|
|
1981
2029
|
var WorkflowSharedFormDataSchema = z13.object({
|
|
1982
2030
|
name: z13.string(),
|
|
1983
2031
|
escalationSettings: WorkflowEscalationPolicySchema.nullable().optional(),
|
|
1984
2032
|
escalationRouting: WorkflowEscalationRoutingSchema.nullable().optional(),
|
|
2033
|
+
agentBehavior: WorkflowAgentBehaviorSchema.nullable().optional(),
|
|
1985
2034
|
description: z13.string().optional(),
|
|
1986
2035
|
prompt: z13.string().optional(),
|
|
1987
2036
|
ownerId: z13.number().optional(),
|
|
@@ -2092,6 +2141,7 @@ export {
|
|
|
2092
2141
|
ArchivePhoneNumberSchema,
|
|
2093
2142
|
ArchiveTaskSchema,
|
|
2094
2143
|
AssistantChatParticipantSchema,
|
|
2144
|
+
CallActivityLabelSchema,
|
|
2095
2145
|
CancelCalendarEventSchema,
|
|
2096
2146
|
ChannelEnum,
|
|
2097
2147
|
ChatCompletionMessageSchema,
|
|
@@ -2320,6 +2370,7 @@ export {
|
|
|
2320
2370
|
UpsertDataRecordSchema,
|
|
2321
2371
|
VerifyCodeRequestSchema,
|
|
2322
2372
|
VerifyCodeResponseSchema,
|
|
2373
|
+
WorkflowAgentBehaviorSchema,
|
|
2323
2374
|
WorkflowCreateFormDataSchema,
|
|
2324
2375
|
WorkflowEscalationPolicySchema,
|
|
2325
2376
|
WorkflowEscalationRoutingSchema,
|