@gravity-rail/sdk 0.10.1 → 0.12.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-2BJG4GYM.js → chunk-LODUVCW6.js} +884 -210
- package/dist/chunk-LODUVCW6.js.map +1 -0
- package/dist/{chunk-TJT7A4CO.js → chunk-V7ZKEH4V.js} +1 -1
- package/dist/chunk-V7ZKEH4V.js.map +1 -0
- package/dist/{client-BffM3KcA.d.cts → client-CYQ_N681.d.ts} +2794 -1123
- package/dist/{client-DfjAYbt8.d.ts → client-DSFqUxvN.d.cts} +2794 -1123
- 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 +914 -298
- 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 +1040 -297
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +446 -74
- package/dist/internal.d.ts +446 -74
- package/dist/internal.js +75 -3
- 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-C0VW3vDJ.d.cts} +221 -19
- package/dist/{scopes-CjSvITpL.d.cts → revision-state-CIRkBy-k.d.ts} +221 -19
- package/dist/schemas.cjs +55 -111
- 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 +55 -108
- package/dist/schemas.js.map +1 -1
- package/dist/{inquiries-UcWNYo-Q.d.cts → tasks-DcxMysiR.d.cts} +483 -143
- package/dist/{inquiries-UcWNYo-Q.d.ts → tasks-DcxMysiR.d.ts} +483 -143
- 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,
|
|
@@ -1294,7 +1284,15 @@ import { z as z7 } from "zod";
|
|
|
1294
1284
|
var CreateInquirySchema = z7.object({
|
|
1295
1285
|
name: z7.string().optional(),
|
|
1296
1286
|
email: z7.string().email().optional(),
|
|
1297
|
-
inquiryType: z7.enum([
|
|
1287
|
+
inquiryType: z7.enum([
|
|
1288
|
+
"customer",
|
|
1289
|
+
"builder",
|
|
1290
|
+
"partner",
|
|
1291
|
+
"other",
|
|
1292
|
+
"demo_request",
|
|
1293
|
+
"waitlist",
|
|
1294
|
+
"whitepaper"
|
|
1295
|
+
]),
|
|
1298
1296
|
cellNumber: z7.string().optional(),
|
|
1299
1297
|
businessNumber: z7.string().optional(),
|
|
1300
1298
|
businessName: z7.string().optional(),
|
|
@@ -1302,8 +1300,34 @@ var CreateInquirySchema = z7.object({
|
|
|
1302
1300
|
state: z7.string().optional(),
|
|
1303
1301
|
message: z7.string().optional(),
|
|
1304
1302
|
productId: z7.number().optional(),
|
|
1303
|
+
/** Marketing-document slug (whitepaper downloads) — lowercase kebab-case, mirrors the API validator. */
|
|
1304
|
+
documentId: z7.string().max(64).regex(/^[a-z0-9-]+$/).refine((v) => !v.startsWith("-") && !v.endsWith("-") && !v.includes("--"), {
|
|
1305
|
+
message: "Must be a lowercase kebab-case slug"
|
|
1306
|
+
}).optional(),
|
|
1307
|
+
/**
|
|
1308
|
+
* Per-form lead source (GRA-6765) — closed enum mirroring the API validator,
|
|
1309
|
+
* so gap-zero / generic-contact / concierge / etc. are distinguishable in
|
|
1310
|
+
* the funnel event and Slack notification. Never free text.
|
|
1311
|
+
*/
|
|
1312
|
+
source: z7.enum([
|
|
1313
|
+
"contact",
|
|
1314
|
+
"demo",
|
|
1315
|
+
"gap_zero",
|
|
1316
|
+
"waitlist_updates",
|
|
1317
|
+
"about_contact",
|
|
1318
|
+
"concierge_error",
|
|
1319
|
+
"concierge_anonymous",
|
|
1320
|
+
"whitepaper"
|
|
1321
|
+
]).optional(),
|
|
1305
1322
|
recaptchaToken: z7.string().optional()
|
|
1306
1323
|
});
|
|
1324
|
+
var AnonymousInquiryFormSchema = CreateInquirySchema.refine(
|
|
1325
|
+
(data) => Boolean(data.email?.trim()) || Boolean(data.cellNumber?.trim()),
|
|
1326
|
+
{
|
|
1327
|
+
message: "At least one of email or cellNumber is required",
|
|
1328
|
+
path: ["email"]
|
|
1329
|
+
}
|
|
1330
|
+
);
|
|
1307
1331
|
var ListInquiriesSchema = z7.object({
|
|
1308
1332
|
page: z7.number().optional().describe("Page number"),
|
|
1309
1333
|
pageSize: z7.number().optional().describe("Items per page"),
|
|
@@ -1483,82 +1507,6 @@ var MemberLabelFormDataSchema = z8.object({
|
|
|
1483
1507
|
description: z8.string().optional(),
|
|
1484
1508
|
color: z8.string()
|
|
1485
1509
|
});
|
|
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
1510
|
var MemberFilterSchema = z8.object({
|
|
1563
1511
|
id: z8.number(),
|
|
1564
1512
|
name: z8.string(),
|
|
@@ -1566,14 +1514,12 @@ var MemberFilterSchema = z8.object({
|
|
|
1566
1514
|
description: z8.string().optional(),
|
|
1567
1515
|
pinned: z8.boolean().optional(),
|
|
1568
1516
|
createdAt: z8.string(),
|
|
1569
|
-
updatedAt: z8.string()
|
|
1570
|
-
rules: z8.array(MemberFilterRuleSchema)
|
|
1517
|
+
updatedAt: z8.string()
|
|
1571
1518
|
});
|
|
1572
1519
|
var MemberFilterFormDataSchema = z8.object({
|
|
1573
1520
|
name: z8.string(),
|
|
1574
1521
|
description: z8.string().optional(),
|
|
1575
|
-
pinned: z8.boolean().optional()
|
|
1576
|
-
rules: z8.array(MemberFilterRuleFormDataSchema)
|
|
1522
|
+
pinned: z8.boolean().optional()
|
|
1577
1523
|
});
|
|
1578
1524
|
var MemberRoleSchema = z8.object({
|
|
1579
1525
|
id: z8.number(),
|
|
@@ -1812,12 +1758,11 @@ var ChildTaskFormDataSchema = z12.object({
|
|
|
1812
1758
|
celCondition: z12.string().optional()
|
|
1813
1759
|
});
|
|
1814
1760
|
var AbilityDataSchema = z12.object({
|
|
1815
|
-
|
|
1816
|
-
//
|
|
1761
|
+
uuid: z12.string(),
|
|
1762
|
+
// UUID for matching/creating abilities
|
|
1817
1763
|
abilityType: z12.string(),
|
|
1818
1764
|
config: z12.record(z12.string(), z12.any()).optional(),
|
|
1819
1765
|
enabled: z12.boolean().optional(),
|
|
1820
|
-
order: z12.number().optional(),
|
|
1821
1766
|
celCondition: z12.string().optional()
|
|
1822
1767
|
});
|
|
1823
1768
|
var TaskFormDataSchema = z12.object({
|
|
@@ -1863,8 +1808,13 @@ var WorkflowCreateFormDataSchema = z13.object({
|
|
|
1863
1808
|
description: z13.string().optional(),
|
|
1864
1809
|
prompt: z13.string().optional(),
|
|
1865
1810
|
ownerId: z13.number().optional(),
|
|
1866
|
-
|
|
1867
|
-
|
|
1811
|
+
copyFromAgentId: z13.number().optional(),
|
|
1812
|
+
copyFromWorkflowRevisionId: z13.number().optional(),
|
|
1813
|
+
copySourceDigest: z13.string().optional(),
|
|
1814
|
+
assistantName: z13.string().nullable().optional(),
|
|
1815
|
+
assistantIdentity: z13.string().nullable().optional(),
|
|
1816
|
+
// Concrete revision models; selecting an Agent copies its preset here.
|
|
1817
|
+
// Explicit null resets to the concrete Haiku fallback and clears config.
|
|
1868
1818
|
chatModelId: z13.string().nullable().optional(),
|
|
1869
1819
|
chatModelConfig: z13.record(z13.string(), z13.unknown()).nullable().optional(),
|
|
1870
1820
|
realtimeModelId: z13.string().nullable().optional(),
|
|
@@ -1927,6 +1877,7 @@ export {
|
|
|
1927
1877
|
AdminAccountMembershipSchema,
|
|
1928
1878
|
AdminOrganizationSchema,
|
|
1929
1879
|
AdminWorkspaceMemberFormDataSchema,
|
|
1880
|
+
AnonymousInquiryFormSchema,
|
|
1930
1881
|
ApiKeyCreatedSchema,
|
|
1931
1882
|
ApiKeyFormDataSchema,
|
|
1932
1883
|
ApiKeySchema,
|
|
@@ -2088,11 +2039,7 @@ export {
|
|
|
2088
2039
|
LoginResponseSchema,
|
|
2089
2040
|
MarkEmailReadSchema,
|
|
2090
2041
|
MarkEmailUnreadSchema,
|
|
2091
|
-
MemberFilterFilterTypeEnum,
|
|
2092
2042
|
MemberFilterFormDataSchema,
|
|
2093
|
-
MemberFilterObjectTypeEnum,
|
|
2094
|
-
MemberFilterRuleFormDataSchema,
|
|
2095
|
-
MemberFilterRuleSchema,
|
|
2096
2043
|
MemberFilterSchema,
|
|
2097
2044
|
MemberFormDataSchema,
|
|
2098
2045
|
MemberLabelFormDataSchema,
|