@gravity-rail/sdk 3.2.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 +20 -3
- package/dist/account-CSJJbLIj.d.cts +459 -0
- package/dist/account-CSJJbLIj.d.ts +459 -0
- package/dist/{path-ChuuGGLG.d.ts → agent_standing_job-CqKpMoHO.d.cts} +1099 -153
- package/dist/{path-CXnjBalr.d.cts → agent_standing_job-yehTe972.d.ts} +1099 -153
- package/dist/{chat-interaction-Cc9hQNyx.d.ts → chat-interaction-BtUtVszg.d.ts} +14107 -9967
- package/dist/{chat-interaction-CoHsIqyX.d.cts → chat-interaction-CAfwlYvv.d.cts} +14107 -9967
- package/dist/{chunk-MAPAZORN.js → chunk-L4XC6KDG.js} +1940 -605
- 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-RLFS7O2L.js → chunk-P2X5TOYY.js} +211 -83
- 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 +2309 -1146
- 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 +2333 -710
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +2486 -285
- package/dist/internal.d.ts +2486 -285
- package/dist/internal.js +158 -31
- package/dist/internal.js.map +1 -1
- package/dist/{member-import-BWyl88Qx.d.ts → member-import-C5nnoGvW.d.ts} +1 -1
- package/dist/{member-import-9h52_4KO.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 +156 -23
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +623 -72
- package/dist/schemas.d.ts +623 -72
- package/dist/schemas.js +74 -25
- package/dist/schemas.js.map +1 -1
- package/dist/{tasks-B7tIHQcS.d.cts → tasks-A12E_RLa.d.cts} +2275 -2043
- package/dist/{tasks-B7tIHQcS.d.ts → tasks-DrmyOlRh.d.ts} +2275 -2043
- 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 +5 -5
- package/dist/chunk-D5VNVTUQ.js.map +0 -1
- package/dist/chunk-MAPAZORN.js.map +0 -1
- package/dist/chunk-RLFS7O2L.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";
|
|
@@ -27,9 +31,7 @@ var AdminAccountFormDataSchema = AccountFormDataSchema.extend({
|
|
|
27
31
|
isSuperuser: z.boolean().optional(),
|
|
28
32
|
enabled: z.boolean().optional(),
|
|
29
33
|
orgOwner: z.boolean().optional(),
|
|
30
|
-
organizationId: z.number().nullable().optional()
|
|
31
|
-
stripeCustomerId: z.string().nullable().optional()
|
|
32
|
-
// Superuser only
|
|
34
|
+
organizationId: z.number().nullable().optional()
|
|
33
35
|
});
|
|
34
36
|
var AccountSchema = z.object({
|
|
35
37
|
id: z.number(),
|
|
@@ -48,7 +50,6 @@ var AccountSchema = z.object({
|
|
|
48
50
|
tosAccepted: z.boolean(),
|
|
49
51
|
optedOut: z.boolean(),
|
|
50
52
|
signupWorkspaceId: z.number().nullable(),
|
|
51
|
-
stripeCustomerId: z.string().nullable(),
|
|
52
53
|
organizationId: z.number().nullable(),
|
|
53
54
|
organizationName: z.string().nullable(),
|
|
54
55
|
locale: z.string().nullable()
|
|
@@ -121,6 +122,7 @@ var OrganizationSchema = z.object({
|
|
|
121
122
|
creatorName: z.string().optional()
|
|
122
123
|
});
|
|
123
124
|
var AdminOrganizationSchema = OrganizationSchema.extend({
|
|
125
|
+
requireMfa: z.boolean().optional(),
|
|
124
126
|
accountCount: z.number(),
|
|
125
127
|
workspaceCount: z.number(),
|
|
126
128
|
enforceCreditLimit: z.boolean(),
|
|
@@ -510,6 +512,10 @@ function createTool(name, description, schema) {
|
|
|
510
512
|
}
|
|
511
513
|
|
|
512
514
|
// src/schemas/chats.ts
|
|
515
|
+
var CallActivityLabelSchema = z4.object({
|
|
516
|
+
verb: z4.nativeEnum(ActivityVerb),
|
|
517
|
+
subject: z4.nativeEnum(ActivitySubject)
|
|
518
|
+
}).strict();
|
|
513
519
|
var ChannelEnum = z4.enum([
|
|
514
520
|
"cli",
|
|
515
521
|
"frame",
|
|
@@ -736,7 +742,7 @@ var InitiateOutboundCallSchema = WorkspaceIdSchema.extend({
|
|
|
736
742
|
});
|
|
737
743
|
var RateMessageSchema = WorkspaceIdSchema.extend({
|
|
738
744
|
chatId: z4.number().describe("Chat ID"),
|
|
739
|
-
messageUuid: z4.string().describe("Message
|
|
745
|
+
messageUuid: z4.string().describe("Message id (message ID) to rate, not its uuid"),
|
|
740
746
|
rating: z4.number().describe("Rating (1-5)")
|
|
741
747
|
});
|
|
742
748
|
var CreateChatForWorkflowSchema = WorkspaceIdSchema.extend({
|
|
@@ -816,6 +822,7 @@ var ToolCallFunctionSchema = z4.object({
|
|
|
816
822
|
arguments: z4.string()
|
|
817
823
|
});
|
|
818
824
|
var ToolCallSchema = z4.object({
|
|
825
|
+
activity: CallActivityLabelSchema.nullable().optional(),
|
|
819
826
|
id: z4.string(),
|
|
820
827
|
type: z4.literal("function"),
|
|
821
828
|
function: ToolCallFunctionSchema
|
|
@@ -872,8 +879,9 @@ var ChatMessageAPIResponseSchema = z4.object({
|
|
|
872
879
|
smsDeliveryUpdatedAt: z4.string().nullable().optional(),
|
|
873
880
|
// Friendly failure reason — only set when smsDeliveryStatus is failed/undelivered.
|
|
874
881
|
smsDeliveryFailureReason: z4.string().nullable().optional(),
|
|
875
|
-
// ADR-11 provenance. Null
|
|
876
|
-
//
|
|
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`.
|
|
877
885
|
origin: MessageOriginEnum.nullable().optional(),
|
|
878
886
|
audience: MessageAudienceEnum.nullable().optional(),
|
|
879
887
|
// Recorded outcome of a `role: 'tool'` message; null on other messages.
|
|
@@ -887,6 +895,11 @@ var ChatCompletionMessageSchema = z4.object({
|
|
|
887
895
|
content: z4.string()
|
|
888
896
|
});
|
|
889
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(),
|
|
890
903
|
error: z4.object({
|
|
891
904
|
code: z4.string(),
|
|
892
905
|
message: z4.string()
|
|
@@ -1131,7 +1144,7 @@ var DataTypeFormDataBaseSchema = z5.object({
|
|
|
1131
1144
|
/** Hide this Form and its records from Members without `records:admin`. */
|
|
1132
1145
|
adminOnly: z5.boolean().optional(),
|
|
1133
1146
|
fields: z5.array(SchemaFieldFormDataSchema),
|
|
1134
|
-
ownerId: z5.number().
|
|
1147
|
+
ownerId: z5.number().optional()
|
|
1135
1148
|
}).strict();
|
|
1136
1149
|
var DataTypeFormDataSchema = DataTypeFormDataBaseSchema.superRefine(validateDataTypePolicy);
|
|
1137
1150
|
var DataRecordFiltersSchema = z5.object({
|
|
@@ -1417,7 +1430,8 @@ var CreateInquirySchema = z7.object({
|
|
|
1417
1430
|
"other",
|
|
1418
1431
|
"demo_request",
|
|
1419
1432
|
"waitlist",
|
|
1420
|
-
"whitepaper"
|
|
1433
|
+
"whitepaper",
|
|
1434
|
+
"slack_teams"
|
|
1421
1435
|
]),
|
|
1422
1436
|
cellNumber: z7.string().optional(),
|
|
1423
1437
|
businessNumber: z7.string().optional(),
|
|
@@ -1463,9 +1477,10 @@ var AnonymousInquiryFormSchema = CreateInquirySchema.refine(
|
|
|
1463
1477
|
}
|
|
1464
1478
|
);
|
|
1465
1479
|
var ListInquiriesSchema = z7.object({
|
|
1466
|
-
page: z7.number().optional().describe("Page number"),
|
|
1467
|
-
pageSize: z7.number().optional().describe("Items per page"),
|
|
1468
|
-
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")
|
|
1469
1484
|
});
|
|
1470
1485
|
var GetInquirySchema = z7.object({
|
|
1471
1486
|
inquiryId: z7.number().describe("Inquiry ID")
|
|
@@ -1480,7 +1495,7 @@ var EnrichInquirySchema = z7.object({
|
|
|
1480
1495
|
});
|
|
1481
1496
|
var UpdateInquiryRequestSchema = z7.object({
|
|
1482
1497
|
notes: z7.string().optional(),
|
|
1483
|
-
status: z7.enum(["new", "in_progress", "done"]).optional()
|
|
1498
|
+
status: z7.enum(["new", "in_progress", "done", "spam"]).optional()
|
|
1484
1499
|
});
|
|
1485
1500
|
var UpdateInquirySchema = z7.object({
|
|
1486
1501
|
inquiryId: z7.number().describe("Inquiry ID")
|
|
@@ -1520,8 +1535,8 @@ var CreateWorkspaceMemberRequestSchema = z8.object({
|
|
|
1520
1535
|
accountEnabled: z8.boolean().optional(),
|
|
1521
1536
|
isOrgOwner: z8.boolean().optional(),
|
|
1522
1537
|
accountTosAccepted: z8.boolean().optional(),
|
|
1523
|
-
//
|
|
1524
|
-
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()
|
|
1525
1540
|
});
|
|
1526
1541
|
var UpdateWorkspaceMemberRequestSchema = z8.object({
|
|
1527
1542
|
// Member details
|
|
@@ -1671,7 +1686,8 @@ var MemberRoleSchema = z8.object({
|
|
|
1671
1686
|
});
|
|
1672
1687
|
var MemberSchema = z8.object({
|
|
1673
1688
|
id: z8.number(),
|
|
1674
|
-
|
|
1689
|
+
// Absent for a Business, an Agent, a test Member and an anonymous Member.
|
|
1690
|
+
accountUuid: z8.string().nullable().optional(),
|
|
1675
1691
|
memberRoleId: z8.number(),
|
|
1676
1692
|
// Consolidated member fields (from personas consolidation migration)
|
|
1677
1693
|
name: z8.string().optional(),
|
|
@@ -1698,7 +1714,7 @@ var MemberSchema = z8.object({
|
|
|
1698
1714
|
isSuperuser: z8.boolean().optional(),
|
|
1699
1715
|
locale: z8.string().optional(),
|
|
1700
1716
|
timezone: z8.string().optional(),
|
|
1701
|
-
memberType: z8.enum(["member", "test", "anonymous"]).optional(),
|
|
1717
|
+
memberType: z8.enum(["member", "test", "anonymous", "agent", "business"]).optional(),
|
|
1702
1718
|
isArchived: z8.boolean().optional(),
|
|
1703
1719
|
// Timestamps
|
|
1704
1720
|
createdAt: z8.string().optional(),
|
|
@@ -1772,12 +1788,37 @@ var SiteFormDataSchema = z10.object({
|
|
|
1772
1788
|
defaultWorkflowId: z10.number().optional(),
|
|
1773
1789
|
homePageId: z10.number().optional()
|
|
1774
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
|
+
);
|
|
1775
1812
|
var SitePageFormDataSchema = z10.object({
|
|
1776
1813
|
title: z10.string(),
|
|
1777
1814
|
slug: z10.string().optional(),
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
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();
|
|
1781
1822
|
var MenuItemFormDataSchema = z10.object({
|
|
1782
1823
|
label: z10.string(),
|
|
1783
1824
|
itemType: z10.enum(["page", "url"]),
|
|
@@ -1868,7 +1909,7 @@ var CaptureRowSchema = z11.discriminatedUnion("source", [
|
|
|
1868
1909
|
source: z11.literal("task"),
|
|
1869
1910
|
field: z11.object(SchemaFieldSchema.shape).partial().required({ name: true }),
|
|
1870
1911
|
permissions: CapturePermissionsSchema.optional(),
|
|
1871
|
-
fill: z11.enum(["asked", "inferred"]).optional(),
|
|
1912
|
+
fill: z11.enum(["asked", "inferred", "ask", "collect"]).optional(),
|
|
1872
1913
|
required: z11.boolean().optional(),
|
|
1873
1914
|
exits: z11.boolean().optional()
|
|
1874
1915
|
}),
|
|
@@ -1877,7 +1918,7 @@ var CaptureRowSchema = z11.discriminatedUnion("source", [
|
|
|
1877
1918
|
dataTypeUuid: z11.string().uuid(),
|
|
1878
1919
|
fieldSlug: z11.string().min(1).max(100),
|
|
1879
1920
|
permissions: CapturePermissionsSchema.optional(),
|
|
1880
|
-
fill: z11.
|
|
1921
|
+
fill: z11.enum(["asked", "inferred", "ask", "collect"]).optional(),
|
|
1881
1922
|
required: z11.boolean().optional()
|
|
1882
1923
|
})
|
|
1883
1924
|
]);
|
|
@@ -1963,7 +2004,6 @@ var WorkflowEscalationPolicySchema = z12.object({
|
|
|
1963
2004
|
"requests_human"
|
|
1964
2005
|
])
|
|
1965
2006
|
).nullable().optional(),
|
|
1966
|
-
answerNotFound: z12.boolean().optional(),
|
|
1967
2007
|
pausedMessage: z12.string().nullable().optional(),
|
|
1968
2008
|
notifiedMessage: z12.string().nullable().optional(),
|
|
1969
2009
|
onlineMessage: z12.string().nullable().optional(),
|
|
@@ -1980,10 +2020,17 @@ var WorkflowEscalationRoutingSchema = z12.object({
|
|
|
1980
2020
|
}).strict();
|
|
1981
2021
|
|
|
1982
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();
|
|
1983
2029
|
var WorkflowSharedFormDataSchema = z13.object({
|
|
1984
2030
|
name: z13.string(),
|
|
1985
2031
|
escalationSettings: WorkflowEscalationPolicySchema.nullable().optional(),
|
|
1986
2032
|
escalationRouting: WorkflowEscalationRoutingSchema.nullable().optional(),
|
|
2033
|
+
agentBehavior: WorkflowAgentBehaviorSchema.nullable().optional(),
|
|
1987
2034
|
description: z13.string().optional(),
|
|
1988
2035
|
prompt: z13.string().optional(),
|
|
1989
2036
|
ownerId: z13.number().optional(),
|
|
@@ -2094,6 +2141,7 @@ export {
|
|
|
2094
2141
|
ArchivePhoneNumberSchema,
|
|
2095
2142
|
ArchiveTaskSchema,
|
|
2096
2143
|
AssistantChatParticipantSchema,
|
|
2144
|
+
CallActivityLabelSchema,
|
|
2097
2145
|
CancelCalendarEventSchema,
|
|
2098
2146
|
ChannelEnum,
|
|
2099
2147
|
ChatCompletionMessageSchema,
|
|
@@ -2322,6 +2370,7 @@ export {
|
|
|
2322
2370
|
UpsertDataRecordSchema,
|
|
2323
2371
|
VerifyCodeRequestSchema,
|
|
2324
2372
|
VerifyCodeResponseSchema,
|
|
2373
|
+
WorkflowAgentBehaviorSchema,
|
|
2325
2374
|
WorkflowCreateFormDataSchema,
|
|
2326
2375
|
WorkflowEscalationPolicySchema,
|
|
2327
2376
|
WorkflowEscalationRoutingSchema,
|