@gravity-rail/sdk 0.10.1 → 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 +7 -8
- package/dist/{chunk-TJT7A4CO.js → chunk-V7ZKEH4V.js} +1 -1
- package/dist/chunk-V7ZKEH4V.js.map +1 -0
- package/dist/{chunk-2BJG4GYM.js → chunk-YESHLUL7.js} +812 -180
- package/dist/chunk-YESHLUL7.js.map +1 -0
- package/dist/{client-BffM3KcA.d.cts → client-BCgXtr8p.d.cts} +2630 -1114
- package/dist/{client-DfjAYbt8.d.ts → client-Dh1l20Ue.d.ts} +2630 -1114
- package/dist/helpers.cjs +6 -18
- package/dist/helpers.cjs.map +1 -1
- package/dist/helpers.d.cts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/helpers.js +6 -18
- package/dist/helpers.js.map +1 -1
- package/dist/index.cjs +842 -268
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -21
- package/dist/index.d.ts +23 -21
- package/dist/index.js +51 -95
- package/dist/index.js.map +1 -1
- package/dist/internal.cjs +956 -258
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +443 -74
- package/dist/internal.d.ts +443 -74
- package/dist/internal.js +71 -2
- package/dist/internal.js.map +1 -1
- package/dist/realtime.cjs +42 -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 +42 -0
- package/dist/realtime.js.map +1 -1
- package/dist/{scopes-CmNKWrzb.d.ts → revision-state-BTF-MnbW.d.cts} +220 -18
- package/dist/{scopes-CjSvITpL.d.cts → revision-state-DOH1NMGb.d.ts} +220 -18
- package/dist/schemas.cjs +27 -110
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +48 -466
- package/dist/schemas.d.ts +48 -466
- package/dist/schemas.js +27 -107
- package/dist/schemas.js.map +1 -1
- package/dist/{inquiries-UcWNYo-Q.d.cts → tasks-C4aYbWVv.d.cts} +452 -141
- package/dist/{inquiries-UcWNYo-Q.d.ts → tasks-C4aYbWVv.d.ts} +452 -141
- package/package.json +1 -1
- package/dist/chunk-2BJG4GYM.js.map +0 -1
- package/dist/chunk-TJT7A4CO.js.map +0 -1
package/dist/schemas.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
DataSensitivity,
|
|
9
9
|
DataTypeRecordScope,
|
|
10
10
|
IndexStatus
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-V7ZKEH4V.js";
|
|
12
12
|
|
|
13
13
|
// src/schemas/accounts.ts
|
|
14
14
|
import { z } from "zod";
|
|
@@ -331,7 +331,7 @@ var CreateCalendarEventSchema = z2.object({
|
|
|
331
331
|
title: z2.string().describe("Event title"),
|
|
332
332
|
startTime: z2.string().describe("ISO 8601 datetime string"),
|
|
333
333
|
attendeeIds: z2.array(z2.number()).optional().describe("Member IDs of attendees"),
|
|
334
|
-
|
|
334
|
+
workflowRevisionId: z2.number().optional().describe("Associated workflow revision ID"),
|
|
335
335
|
taskId: z2.number().optional().describe("Associated task ID"),
|
|
336
336
|
description: z2.string().optional().describe("Event description"),
|
|
337
337
|
location: z2.string().optional().describe("Event location (physical or virtual)")
|
|
@@ -571,12 +571,16 @@ var ChatFormDataSchema = z4.object({
|
|
|
571
571
|
title: z4.string().optional(),
|
|
572
572
|
channel: z4.string(),
|
|
573
573
|
workflowId: z4.number().nullable(),
|
|
574
|
+
workflowUuid: z4.string().nullable().optional(),
|
|
575
|
+
workflowRevisionId: z4.number().nullable().optional(),
|
|
576
|
+
workflowRevisionUuid: z4.string().nullable().optional(),
|
|
574
577
|
phoneNumberId: z4.number().nullable().optional(),
|
|
575
578
|
siteId: z4.number().nullable().optional(),
|
|
576
579
|
memberId: z4.number().nullable().optional(),
|
|
577
580
|
participants: z4.array(ChatParticipantFormDataSchema),
|
|
578
581
|
agentEnabled: z4.boolean().optional(),
|
|
579
582
|
assistantMemberId: z4.number().nullable().optional(),
|
|
583
|
+
assistantName: z4.string().nullable().optional(),
|
|
580
584
|
// Legacy client-side alias. ChatsApi serializes it as assistantMemberId.
|
|
581
585
|
agentMemberId: z4.number().nullable().optional(),
|
|
582
586
|
// Per-chat assistant model override (snapshotted onto the assistant
|
|
@@ -588,7 +592,6 @@ var ChatFormDataSchema = z4.object({
|
|
|
588
592
|
paused: z4.boolean().optional(),
|
|
589
593
|
muted: z4.boolean().optional(),
|
|
590
594
|
needsResponse: z4.boolean().optional(),
|
|
591
|
-
workflowVersionNumber: z4.number().nullable().optional(),
|
|
592
595
|
// Human-typed initial SMS/email body. Optional, request-body only.
|
|
593
596
|
// Backend dispatches via the existing initial-message path when the
|
|
594
597
|
// Agent is disabled. Treat as PHI client-side.
|
|
@@ -603,7 +606,8 @@ var ChatFiltersSchema = z4.object({
|
|
|
603
606
|
needsResponse: z4.boolean().optional(),
|
|
604
607
|
paused: z4.boolean().optional(),
|
|
605
608
|
archived: z4.boolean().optional(),
|
|
606
|
-
channel: z4.string().optional()
|
|
609
|
+
channel: z4.string().optional(),
|
|
610
|
+
chatType: z4.enum(["assignment", "manager", "dm", "contributor"]).optional().describe("Filter by chat type. Omitted = all types.")
|
|
607
611
|
});
|
|
608
612
|
var ListChatsSchema = WorkspaceIdSchema.merge(ChatFiltersSchema);
|
|
609
613
|
var GetChatSchema = WorkspaceIdSchema.extend({
|
|
@@ -877,13 +881,6 @@ function validateDataTypePolicy(data, ctx) {
|
|
|
877
881
|
const hasHighRiskCategory = fields.some(
|
|
878
882
|
(field) => (field.categories ?? []).some((category) => HIGH_RISK_CATEGORIES.has(category))
|
|
879
883
|
);
|
|
880
|
-
if (recordScope === "workspace" /* WORKSPACE */ && data.isCollection === false) {
|
|
881
|
-
ctx.addIssue({
|
|
882
|
-
code: z5.ZodIssueCode.custom,
|
|
883
|
-
path: ["isCollection"],
|
|
884
|
-
message: "Workspace-scoped data types must be collections"
|
|
885
|
-
});
|
|
886
|
-
}
|
|
887
884
|
if (recordScope === "workspace" /* WORKSPACE */ && hasHighRiskCategory) {
|
|
888
885
|
ctx.addIssue({
|
|
889
886
|
code: z5.ZodIssueCode.custom,
|
|
@@ -905,13 +902,6 @@ function validateDataTypeUpdatePolicy(data, ctx) {
|
|
|
905
902
|
const hasHighRiskCategory = fields.some(
|
|
906
903
|
(field) => (field.categories ?? []).some((category) => HIGH_RISK_CATEGORIES.has(category))
|
|
907
904
|
);
|
|
908
|
-
if (data.recordScope === "workspace" /* WORKSPACE */ && data.isCollection === false) {
|
|
909
|
-
ctx.addIssue({
|
|
910
|
-
code: z5.ZodIssueCode.custom,
|
|
911
|
-
path: ["isCollection"],
|
|
912
|
-
message: "Workspace-scoped data types must be collections"
|
|
913
|
-
});
|
|
914
|
-
}
|
|
915
905
|
if (data.recordScope === "workspace" /* WORKSPACE */ && hasFields && hasHighRiskCategory) {
|
|
916
906
|
ctx.addIssue({
|
|
917
907
|
code: z5.ZodIssueCode.custom,
|
|
@@ -1304,6 +1294,13 @@ var CreateInquirySchema = z7.object({
|
|
|
1304
1294
|
productId: z7.number().optional(),
|
|
1305
1295
|
recaptchaToken: z7.string().optional()
|
|
1306
1296
|
});
|
|
1297
|
+
var AnonymousInquiryFormSchema = CreateInquirySchema.refine(
|
|
1298
|
+
(data) => Boolean(data.email?.trim()) || Boolean(data.cellNumber?.trim()),
|
|
1299
|
+
{
|
|
1300
|
+
message: "At least one of email or cellNumber is required",
|
|
1301
|
+
path: ["email"]
|
|
1302
|
+
}
|
|
1303
|
+
);
|
|
1307
1304
|
var ListInquiriesSchema = z7.object({
|
|
1308
1305
|
page: z7.number().optional().describe("Page number"),
|
|
1309
1306
|
pageSize: z7.number().optional().describe("Items per page"),
|
|
@@ -1483,82 +1480,6 @@ var MemberLabelFormDataSchema = z8.object({
|
|
|
1483
1480
|
description: z8.string().optional(),
|
|
1484
1481
|
color: z8.string()
|
|
1485
1482
|
});
|
|
1486
|
-
var MemberFilterObjectTypeEnum = z8.enum([
|
|
1487
|
-
"label",
|
|
1488
|
-
"dataType",
|
|
1489
|
-
"member",
|
|
1490
|
-
"memberRole",
|
|
1491
|
-
"name",
|
|
1492
|
-
"email",
|
|
1493
|
-
"phone",
|
|
1494
|
-
"phoneType",
|
|
1495
|
-
"age",
|
|
1496
|
-
"dateOfBirth",
|
|
1497
|
-
"workflow",
|
|
1498
|
-
"tosAccepted",
|
|
1499
|
-
"notifySms",
|
|
1500
|
-
"notifyEmail",
|
|
1501
|
-
"notifyVoice",
|
|
1502
|
-
"smsDeliveryStatus",
|
|
1503
|
-
"callForwarded",
|
|
1504
|
-
"calendarEvent",
|
|
1505
|
-
"chatEngagement",
|
|
1506
|
-
"lastMessageActivity",
|
|
1507
|
-
"memberCreated",
|
|
1508
|
-
"isDefault",
|
|
1509
|
-
"memberType",
|
|
1510
|
-
"memberField",
|
|
1511
|
-
"journey"
|
|
1512
|
-
]);
|
|
1513
|
-
var MemberFilterFilterTypeEnum = z8.enum([
|
|
1514
|
-
"any",
|
|
1515
|
-
"all",
|
|
1516
|
-
"none",
|
|
1517
|
-
"partial",
|
|
1518
|
-
"notPartial",
|
|
1519
|
-
"exact",
|
|
1520
|
-
"equals",
|
|
1521
|
-
"notEquals",
|
|
1522
|
-
"notContains",
|
|
1523
|
-
"atLeast",
|
|
1524
|
-
"atMost",
|
|
1525
|
-
"field",
|
|
1526
|
-
"dateFilter",
|
|
1527
|
-
"greaterThan",
|
|
1528
|
-
"greaterThanOrEqual",
|
|
1529
|
-
"lessThan",
|
|
1530
|
-
"lessThanOrEqual",
|
|
1531
|
-
"within",
|
|
1532
|
-
"olderThan",
|
|
1533
|
-
"never",
|
|
1534
|
-
"isEmpty",
|
|
1535
|
-
"notEmpty",
|
|
1536
|
-
"before",
|
|
1537
|
-
"after",
|
|
1538
|
-
"between",
|
|
1539
|
-
"notBetween",
|
|
1540
|
-
"daysAgo",
|
|
1541
|
-
"lessThanDaysAgo",
|
|
1542
|
-
"daysUntil",
|
|
1543
|
-
"hasKey",
|
|
1544
|
-
"hasKeyValue",
|
|
1545
|
-
"smsDeliveryStatusNeedsAttention",
|
|
1546
|
-
"callForwardedAny"
|
|
1547
|
-
]);
|
|
1548
|
-
var MemberFilterRuleSchema = z8.object({
|
|
1549
|
-
id: z8.number(),
|
|
1550
|
-
uuid: z8.string(),
|
|
1551
|
-
objectType: MemberFilterObjectTypeEnum,
|
|
1552
|
-
filterType: MemberFilterFilterTypeEnum,
|
|
1553
|
-
objectIds: z8.array(z8.number()).optional(),
|
|
1554
|
-
query: z8.string().optional()
|
|
1555
|
-
});
|
|
1556
|
-
var MemberFilterRuleFormDataSchema = z8.object({
|
|
1557
|
-
objectType: MemberFilterObjectTypeEnum,
|
|
1558
|
-
filterType: MemberFilterFilterTypeEnum,
|
|
1559
|
-
objectIds: z8.array(z8.number()).optional(),
|
|
1560
|
-
query: z8.string().optional()
|
|
1561
|
-
});
|
|
1562
1483
|
var MemberFilterSchema = z8.object({
|
|
1563
1484
|
id: z8.number(),
|
|
1564
1485
|
name: z8.string(),
|
|
@@ -1566,14 +1487,12 @@ var MemberFilterSchema = z8.object({
|
|
|
1566
1487
|
description: z8.string().optional(),
|
|
1567
1488
|
pinned: z8.boolean().optional(),
|
|
1568
1489
|
createdAt: z8.string(),
|
|
1569
|
-
updatedAt: z8.string()
|
|
1570
|
-
rules: z8.array(MemberFilterRuleSchema)
|
|
1490
|
+
updatedAt: z8.string()
|
|
1571
1491
|
});
|
|
1572
1492
|
var MemberFilterFormDataSchema = z8.object({
|
|
1573
1493
|
name: z8.string(),
|
|
1574
1494
|
description: z8.string().optional(),
|
|
1575
|
-
pinned: z8.boolean().optional()
|
|
1576
|
-
rules: z8.array(MemberFilterRuleFormDataSchema)
|
|
1495
|
+
pinned: z8.boolean().optional()
|
|
1577
1496
|
});
|
|
1578
1497
|
var MemberRoleSchema = z8.object({
|
|
1579
1498
|
id: z8.number(),
|
|
@@ -1812,12 +1731,11 @@ var ChildTaskFormDataSchema = z12.object({
|
|
|
1812
1731
|
celCondition: z12.string().optional()
|
|
1813
1732
|
});
|
|
1814
1733
|
var AbilityDataSchema = z12.object({
|
|
1815
|
-
|
|
1816
|
-
//
|
|
1734
|
+
uuid: z12.string(),
|
|
1735
|
+
// UUID for matching/creating abilities
|
|
1817
1736
|
abilityType: z12.string(),
|
|
1818
1737
|
config: z12.record(z12.string(), z12.any()).optional(),
|
|
1819
1738
|
enabled: z12.boolean().optional(),
|
|
1820
|
-
order: z12.number().optional(),
|
|
1821
1739
|
celCondition: z12.string().optional()
|
|
1822
1740
|
});
|
|
1823
1741
|
var TaskFormDataSchema = z12.object({
|
|
@@ -1863,8 +1781,13 @@ var WorkflowCreateFormDataSchema = z13.object({
|
|
|
1863
1781
|
description: z13.string().optional(),
|
|
1864
1782
|
prompt: z13.string().optional(),
|
|
1865
1783
|
ownerId: z13.number().optional(),
|
|
1866
|
-
|
|
1867
|
-
|
|
1784
|
+
copyFromAgentId: z13.number().optional(),
|
|
1785
|
+
copyFromWorkflowRevisionId: z13.number().optional(),
|
|
1786
|
+
copySourceDigest: z13.string().optional(),
|
|
1787
|
+
assistantName: z13.string().nullable().optional(),
|
|
1788
|
+
assistantIdentity: z13.string().nullable().optional(),
|
|
1789
|
+
// Concrete revision models; selecting an Agent copies its preset here.
|
|
1790
|
+
// Explicit null resets to the concrete Haiku fallback and clears config.
|
|
1868
1791
|
chatModelId: z13.string().nullable().optional(),
|
|
1869
1792
|
chatModelConfig: z13.record(z13.string(), z13.unknown()).nullable().optional(),
|
|
1870
1793
|
realtimeModelId: z13.string().nullable().optional(),
|
|
@@ -1927,6 +1850,7 @@ export {
|
|
|
1927
1850
|
AdminAccountMembershipSchema,
|
|
1928
1851
|
AdminOrganizationSchema,
|
|
1929
1852
|
AdminWorkspaceMemberFormDataSchema,
|
|
1853
|
+
AnonymousInquiryFormSchema,
|
|
1930
1854
|
ApiKeyCreatedSchema,
|
|
1931
1855
|
ApiKeyFormDataSchema,
|
|
1932
1856
|
ApiKeySchema,
|
|
@@ -2088,11 +2012,7 @@ export {
|
|
|
2088
2012
|
LoginResponseSchema,
|
|
2089
2013
|
MarkEmailReadSchema,
|
|
2090
2014
|
MarkEmailUnreadSchema,
|
|
2091
|
-
MemberFilterFilterTypeEnum,
|
|
2092
2015
|
MemberFilterFormDataSchema,
|
|
2093
|
-
MemberFilterObjectTypeEnum,
|
|
2094
|
-
MemberFilterRuleFormDataSchema,
|
|
2095
|
-
MemberFilterRuleSchema,
|
|
2096
2016
|
MemberFilterSchema,
|
|
2097
2017
|
MemberFormDataSchema,
|
|
2098
2018
|
MemberLabelFormDataSchema,
|