@gravity-rail/sdk 0.3.0 → 0.5.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 +22 -0
- package/dist/{chunk-MFEEPNXO.js → chunk-QS6ZRQUZ.js} +37 -11
- package/dist/chunk-QS6ZRQUZ.js.map +1 -0
- package/dist/{chunk-DNTCSBEW.js → chunk-QZC4QPP2.js} +996 -161
- package/dist/chunk-QZC4QPP2.js.map +1 -0
- package/dist/{index-BK6BH83l.d.ts → index-CIwgGcAm.d.ts} +7600 -5388
- package/dist/{index-CafthMIC.d.cts → index-DNxSoo5S.d.cts} +7600 -5388
- package/dist/index.cjs +1047 -168
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +52 -2
- package/dist/inquiries-DiTDrTG2.d.cts +3536 -0
- package/dist/inquiries-DiTDrTG2.d.ts +3536 -0
- package/dist/internal.cjs +1063 -172
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +109 -91
- package/dist/internal.d.ts +109 -91
- package/dist/internal.js +60 -6
- package/dist/schemas.cjs +322 -50
- package/dist/schemas.cjs.map +1 -1
- package/dist/schemas.d.cts +339 -66
- package/dist/schemas.d.ts +339 -66
- package/dist/schemas.js +284 -40
- package/dist/schemas.js.map +1 -1
- package/package.json +10 -5
- package/dist/chunk-DNTCSBEW.js.map +0 -1
- package/dist/chunk-MFEEPNXO.js.map +0 -1
- package/dist/inquiries-8Tb9lh4a.d.cts +0 -1803
- package/dist/inquiries-8Tb9lh4a.d.ts +0 -1803
package/dist/schemas.cjs
CHANGED
|
@@ -80,6 +80,7 @@ __export(schemas_exports, {
|
|
|
80
80
|
CreateWorkflowSchema: () => CreateWorkflowSchema,
|
|
81
81
|
CreateWorkspaceMemberRequestSchema: () => CreateWorkspaceMemberRequestSchema,
|
|
82
82
|
CreateWorkspaceSchema: () => CreateWorkspaceSchema,
|
|
83
|
+
DataCategory: () => DataCategory,
|
|
83
84
|
DataFieldFormDataSchema: () => DataFieldFormDataSchema,
|
|
84
85
|
DataFieldSchema: () => DataFieldSchema,
|
|
85
86
|
DataFieldType: () => DataFieldType,
|
|
@@ -91,8 +92,12 @@ __export(schemas_exports, {
|
|
|
91
92
|
DataRecordSchema: () => DataRecordSchema,
|
|
92
93
|
DataRecordWithAccessModeSchema: () => DataRecordWithAccessModeSchema,
|
|
93
94
|
DataRecordsPaginatedResponseSchema: () => DataRecordsPaginatedResponseSchema,
|
|
95
|
+
DataSensitivity: () => DataSensitivity,
|
|
94
96
|
DataTypeExportItemSchema: () => DataTypeExportItemSchema,
|
|
95
97
|
DataTypeFormDataSchema: () => DataTypeFormDataSchema,
|
|
98
|
+
DataTypeMemberRoleAccessInputSchema: () => DataTypeMemberRoleAccessInputSchema,
|
|
99
|
+
DataTypeMemberRoleAccessResponseSchema: () => DataTypeMemberRoleAccessResponseSchema,
|
|
100
|
+
DataTypeRecordScope: () => DataTypeRecordScope,
|
|
96
101
|
DataTypeSchema: () => DataTypeSchema,
|
|
97
102
|
DeleteCalendarEventSchema: () => DeleteCalendarEventSchema,
|
|
98
103
|
DeleteCalendarSchema: () => DeleteCalendarSchema,
|
|
@@ -112,6 +117,7 @@ __export(schemas_exports, {
|
|
|
112
117
|
DeleteWorkflowSchema: () => DeleteWorkflowSchema,
|
|
113
118
|
DeleteWorkspaceSchema: () => DeleteWorkspaceSchema,
|
|
114
119
|
DuplicateAccountInfoSchema: () => DuplicateAccountInfoSchema,
|
|
120
|
+
EnrichInquirySchema: () => EnrichInquirySchema,
|
|
115
121
|
ErrorResponseSchema: () => ErrorResponseSchema,
|
|
116
122
|
FunctionToolSchema: () => FunctionToolSchema,
|
|
117
123
|
GenerateICalTokenSchema: () => GenerateICalTokenSchema,
|
|
@@ -210,6 +216,8 @@ __export(schemas_exports, {
|
|
|
210
216
|
OperatorChatParticipantSchema: () => OperatorChatParticipantSchema,
|
|
211
217
|
OrganizationSchema: () => OrganizationSchema,
|
|
212
218
|
PhoneNumberFormDataSchema: () => PhoneNumberFormDataSchema,
|
|
219
|
+
RateLimitAllowlistEntrySchema: () => RateLimitAllowlistEntrySchema,
|
|
220
|
+
RateLimitOverrideSchema: () => RateLimitOverrideSchema,
|
|
213
221
|
RateMessageSchema: () => RateMessageSchema,
|
|
214
222
|
RemoveDataFieldSchema: () => RemoveDataFieldSchema,
|
|
215
223
|
RemoveWorkspaceMemberSchema: () => RemoveWorkspaceMemberSchema,
|
|
@@ -373,7 +381,9 @@ var OrganizationSchema = import_zod.z.object({
|
|
|
373
381
|
id: import_zod.z.number(),
|
|
374
382
|
uuid: import_zod.z.string(),
|
|
375
383
|
name: import_zod.z.string(),
|
|
384
|
+
slug: import_zod.z.string(),
|
|
376
385
|
primary: import_zod.z.boolean(),
|
|
386
|
+
authMode: import_zod.z.enum(["open", "ssoForDomain", "ssoOnly"]),
|
|
377
387
|
contactEmail: import_zod.z.string().optional(),
|
|
378
388
|
contactPhone: import_zod.z.string().optional(),
|
|
379
389
|
createdAt: import_zod.z.string(),
|
|
@@ -382,7 +392,8 @@ var OrganizationSchema = import_zod.z.object({
|
|
|
382
392
|
});
|
|
383
393
|
var AdminOrganizationSchema = OrganizationSchema.extend({
|
|
384
394
|
accountCount: import_zod.z.number(),
|
|
385
|
-
workspaceCount: import_zod.z.number()
|
|
395
|
+
workspaceCount: import_zod.z.number(),
|
|
396
|
+
enforceCreditLimit: import_zod.z.boolean()
|
|
386
397
|
});
|
|
387
398
|
var CreateOrganizationRequestSchema = import_zod.z.object({
|
|
388
399
|
name: import_zod.z.string(),
|
|
@@ -395,15 +406,24 @@ var CreateOrganizationRequestSchema = import_zod.z.object({
|
|
|
395
406
|
});
|
|
396
407
|
var UpdateOrganizationRequestSchema = import_zod.z.object({
|
|
397
408
|
name: import_zod.z.string().optional(),
|
|
409
|
+
slug: import_zod.z.string().optional(),
|
|
398
410
|
primary: import_zod.z.boolean().optional(),
|
|
399
411
|
contactEmail: import_zod.z.string().optional(),
|
|
400
412
|
contactPhone: import_zod.z.string().optional(),
|
|
413
|
+
authMode: import_zod.z.enum(["open", "ssoForDomain", "ssoOnly"]).optional(),
|
|
414
|
+
ssoProvider: import_zod.z.string().nullable().optional(),
|
|
415
|
+
ssoDomain: import_zod.z.string().nullable().optional(),
|
|
416
|
+
ssoAutoProvision: import_zod.z.boolean().optional(),
|
|
417
|
+
ssoOidc: import_zod.z.unknown().nullable().optional(),
|
|
401
418
|
logo: import_zod.z.string().optional(),
|
|
402
419
|
// Base64 encoded
|
|
403
420
|
logoMimeType: import_zod.z.string().optional(),
|
|
404
421
|
// Twilio sub-account linkage. Explicit null clears the field so SMS
|
|
405
422
|
// falls through to the master client (does not touch Twilio itself).
|
|
406
|
-
twilioSubAccountSid: import_zod.z.string().nullable().optional()
|
|
423
|
+
twilioSubAccountSid: import_zod.z.string().nullable().optional(),
|
|
424
|
+
// Hard credit enforcement toggle — flips between the legacy soft
|
|
425
|
+
// alert-only mode and the hard 402 stop at zero credits.
|
|
426
|
+
enforceCreditLimit: import_zod.z.boolean().optional()
|
|
407
427
|
});
|
|
408
428
|
var AdminAccountMembershipSchema = import_zod.z.object({
|
|
409
429
|
workspaceUuid: import_zod.z.string(),
|
|
@@ -452,7 +472,7 @@ var CreateAccountSchema = import_zod.z.object({
|
|
|
452
472
|
// src/schemas/calendars.ts
|
|
453
473
|
var import_zod2 = require("zod");
|
|
454
474
|
|
|
455
|
-
// src/types/
|
|
475
|
+
// src/types/calendar-types.ts
|
|
456
476
|
var CalendarScheduleRecurrence = /* @__PURE__ */ ((CalendarScheduleRecurrence2) => {
|
|
457
477
|
CalendarScheduleRecurrence2["ONCE"] = "ONCE";
|
|
458
478
|
CalendarScheduleRecurrence2["DAILY"] = "DAILY";
|
|
@@ -783,6 +803,7 @@ var ChannelEnum = import_zod4.z.enum([
|
|
|
783
803
|
"realtime",
|
|
784
804
|
"chat",
|
|
785
805
|
"email",
|
|
806
|
+
"background",
|
|
786
807
|
"site-chat",
|
|
787
808
|
"direct-message"
|
|
788
809
|
]);
|
|
@@ -855,7 +876,11 @@ var ChatFormDataSchema = import_zod4.z.object({
|
|
|
855
876
|
paused: import_zod4.z.boolean().optional(),
|
|
856
877
|
muted: import_zod4.z.boolean().optional(),
|
|
857
878
|
needsResponse: import_zod4.z.boolean().optional(),
|
|
858
|
-
workflowVersionNumber: import_zod4.z.number().nullable().optional()
|
|
879
|
+
workflowVersionNumber: import_zod4.z.number().nullable().optional(),
|
|
880
|
+
// Human-typed initial SMS/email body. Optional, request-body only.
|
|
881
|
+
// Backend dispatches via the existing initial-message path when the
|
|
882
|
+
// Agent is disabled. Treat as PHI client-side.
|
|
883
|
+
initialMessage: import_zod4.z.string().nullable().optional()
|
|
859
884
|
});
|
|
860
885
|
var ChatFiltersSchema = import_zod4.z.object({
|
|
861
886
|
page: import_zod4.z.number().optional(),
|
|
@@ -925,8 +950,16 @@ var CreateChatForWorkflowSchema = WorkspaceIdSchema.extend({
|
|
|
925
950
|
var CreateChatCompletionSchema = WorkspaceIdSchema.extend({
|
|
926
951
|
chatId: import_zod4.z.number().describe("Chat ID"),
|
|
927
952
|
model: import_zod4.z.string().optional().describe("AI model to use"),
|
|
953
|
+
// ``id`` on each message is optional but, when provided for the latest
|
|
954
|
+
// user message, the backend uses it as the per-turn discriminator for
|
|
955
|
+
// the Temporal inference workflow. MCP/tool callers that validate
|
|
956
|
+
// through this schema would otherwise have ``id`` stripped and lose
|
|
957
|
+
// the same-message-retry idempotency the per-turn workflow IDs rely
|
|
958
|
+
// on (see lib/services/inference_keys.py and
|
|
959
|
+
// ChatCompletionMessageSchema below).
|
|
928
960
|
messages: import_zod4.z.array(
|
|
929
961
|
import_zod4.z.object({
|
|
962
|
+
id: import_zod4.z.string().optional(),
|
|
930
963
|
role: import_zod4.z.string(),
|
|
931
964
|
content: import_zod4.z.string()
|
|
932
965
|
})
|
|
@@ -1030,9 +1063,21 @@ var ChatMessageAPIResponseSchema = import_zod4.z.object({
|
|
|
1030
1063
|
error_details: import_zod4.z.any().optional(),
|
|
1031
1064
|
createdAt: import_zod4.z.string(),
|
|
1032
1065
|
email_id: import_zod4.z.number().optional(),
|
|
1033
|
-
inbox_id: import_zod4.z.number().optional()
|
|
1066
|
+
inbox_id: import_zod4.z.number().optional(),
|
|
1067
|
+
// Task this message was produced under. Null for messages that predate the
|
|
1068
|
+
// workflow-task tracking or that originated outside a task (e.g. manager
|
|
1069
|
+
// chats). Surfaced in chat transcripts to help reviewers trace messages
|
|
1070
|
+
// back to the workflow task that produced them.
|
|
1071
|
+
taskId: import_zod4.z.number().nullable().optional(),
|
|
1072
|
+
// SMS delivery fields — only present on messages sent via Twilio SMS.
|
|
1073
|
+
smsDeliveryStatus: import_zod4.z.string().nullable().optional(),
|
|
1074
|
+
smsDeliveryErrorCode: import_zod4.z.string().nullable().optional(),
|
|
1075
|
+
smsDeliveryUpdatedAt: import_zod4.z.string().nullable().optional(),
|
|
1076
|
+
// Friendly failure reason — only set when smsDeliveryStatus is failed/undelivered.
|
|
1077
|
+
smsDeliveryFailureReason: import_zod4.z.string().nullable().optional()
|
|
1034
1078
|
});
|
|
1035
1079
|
var ChatCompletionMessageSchema = import_zod4.z.object({
|
|
1080
|
+
id: import_zod4.z.string().optional(),
|
|
1036
1081
|
role: import_zod4.z.enum(["user", "assistant", "system"]),
|
|
1037
1082
|
content: import_zod4.z.string()
|
|
1038
1083
|
});
|
|
@@ -1054,10 +1099,10 @@ var ChatMessageChunkSchema = import_zod4.z.object({
|
|
|
1054
1099
|
error: import_zod4.z.string().optional()
|
|
1055
1100
|
});
|
|
1056
1101
|
|
|
1057
|
-
// src/schemas/
|
|
1102
|
+
// src/schemas/data-types.ts
|
|
1058
1103
|
var import_zod5 = require("zod");
|
|
1059
1104
|
|
|
1060
|
-
// src/types/
|
|
1105
|
+
// src/types/data-types.ts
|
|
1061
1106
|
var DataFieldType = /* @__PURE__ */ ((DataFieldType2) => {
|
|
1062
1107
|
DataFieldType2["ENUM"] = "enum";
|
|
1063
1108
|
DataFieldType2["EMAIL"] = "email";
|
|
@@ -1065,33 +1110,167 @@ var DataFieldType = /* @__PURE__ */ ((DataFieldType2) => {
|
|
|
1065
1110
|
DataFieldType2["TEXT"] = "text";
|
|
1066
1111
|
DataFieldType2["LONGTEXT"] = "longtext";
|
|
1067
1112
|
DataFieldType2["NUMBER"] = "number";
|
|
1113
|
+
DataFieldType2["INTEGER"] = "integer";
|
|
1068
1114
|
DataFieldType2["DATE"] = "date";
|
|
1069
1115
|
DataFieldType2["DATETIME"] = "datetime";
|
|
1070
1116
|
DataFieldType2["TIME_OF_DAY"] = "time_of_day";
|
|
1071
|
-
DataFieldType2["US_ZIP_CODE"] = "us_zip_code";
|
|
1072
|
-
DataFieldType2["INTEGER"] = "integer";
|
|
1073
1117
|
DataFieldType2["BOOLEAN"] = "boolean";
|
|
1118
|
+
DataFieldType2["FILE"] = "file";
|
|
1119
|
+
DataFieldType2["REFERENCE"] = "reference";
|
|
1120
|
+
DataFieldType2["FUNCTION"] = "function";
|
|
1074
1121
|
DataFieldType2["ARRAY"] = "array";
|
|
1075
1122
|
DataFieldType2["OBJECT"] = "object";
|
|
1076
|
-
DataFieldType2["
|
|
1123
|
+
DataFieldType2["US_ZIP_CODE"] = "us_zip_code";
|
|
1077
1124
|
return DataFieldType2;
|
|
1078
1125
|
})(DataFieldType || {});
|
|
1079
1126
|
var IndexStatus = /* @__PURE__ */ ((IndexStatus2) => {
|
|
1080
|
-
IndexStatus2["
|
|
1081
|
-
IndexStatus2["
|
|
1082
|
-
IndexStatus2["
|
|
1083
|
-
IndexStatus2["REMOVING"] = "removing";
|
|
1084
|
-
IndexStatus2["READY"] = "ready";
|
|
1127
|
+
IndexStatus2["NOT_INDEXED"] = "not_indexed";
|
|
1128
|
+
IndexStatus2["INDEXING"] = "indexing";
|
|
1129
|
+
IndexStatus2["INDEXED"] = "indexed";
|
|
1085
1130
|
IndexStatus2["ERROR"] = "error";
|
|
1086
1131
|
return IndexStatus2;
|
|
1087
1132
|
})(IndexStatus || {});
|
|
1133
|
+
var DataTypeRecordScope = /* @__PURE__ */ ((DataTypeRecordScope2) => {
|
|
1134
|
+
DataTypeRecordScope2["WORKSPACE"] = "workspace";
|
|
1135
|
+
DataTypeRecordScope2["MEMBER"] = "member";
|
|
1136
|
+
return DataTypeRecordScope2;
|
|
1137
|
+
})(DataTypeRecordScope || {});
|
|
1138
|
+
var DataSensitivity = /* @__PURE__ */ ((DataSensitivity2) => {
|
|
1139
|
+
DataSensitivity2["PUBLIC"] = "public";
|
|
1140
|
+
DataSensitivity2["INTERNAL"] = "internal";
|
|
1141
|
+
DataSensitivity2["CONFIDENTIAL"] = "confidential";
|
|
1142
|
+
DataSensitivity2["RESTRICTED"] = "restricted";
|
|
1143
|
+
DataSensitivity2["SECRET"] = "secret";
|
|
1144
|
+
return DataSensitivity2;
|
|
1145
|
+
})(DataSensitivity || {});
|
|
1146
|
+
var DataCategory = /* @__PURE__ */ ((DataCategory2) => {
|
|
1147
|
+
DataCategory2["PHI"] = "phi";
|
|
1148
|
+
DataCategory2["PII"] = "pii";
|
|
1149
|
+
DataCategory2["FINANCIAL"] = "financial";
|
|
1150
|
+
DataCategory2["OPERATIONAL"] = "operational";
|
|
1151
|
+
DataCategory2["CREDENTIAL"] = "credential";
|
|
1152
|
+
DataCategory2["PERSONAL"] = "personal";
|
|
1153
|
+
DataCategory2["IDENTIFIER"] = "identifier";
|
|
1154
|
+
return DataCategory2;
|
|
1155
|
+
})(DataCategory || {});
|
|
1088
1156
|
|
|
1089
|
-
// src/schemas/
|
|
1157
|
+
// src/schemas/data-types.ts
|
|
1090
1158
|
var DataFieldTypeEnum = import_zod5.z.nativeEnum(DataFieldType);
|
|
1091
1159
|
var IndexStatusEnum = import_zod5.z.nativeEnum(IndexStatus);
|
|
1160
|
+
var DataTypeRecordScopeEnum = import_zod5.z.nativeEnum(DataTypeRecordScope);
|
|
1161
|
+
var DataSensitivityEnum = import_zod5.z.nativeEnum(DataSensitivity);
|
|
1162
|
+
var DataCategoryEnum = import_zod5.z.nativeEnum(DataCategory);
|
|
1163
|
+
var DataTypeMemberRoleAccessInputSchema = import_zod5.z.object({
|
|
1164
|
+
memberRoleId: import_zod5.z.number(),
|
|
1165
|
+
accessMode: import_zod5.z.number().int().nonnegative()
|
|
1166
|
+
}).strict();
|
|
1167
|
+
var DataTypeMemberRoleAccessResponseSchema = DataTypeMemberRoleAccessInputSchema.extend({
|
|
1168
|
+
memberRoleName: import_zod5.z.string()
|
|
1169
|
+
});
|
|
1170
|
+
var SENSITIVITY_RANK = {
|
|
1171
|
+
["public" /* PUBLIC */]: 1,
|
|
1172
|
+
["internal" /* INTERNAL */]: 2,
|
|
1173
|
+
["confidential" /* CONFIDENTIAL */]: 3,
|
|
1174
|
+
["restricted" /* RESTRICTED */]: 4,
|
|
1175
|
+
["secret" /* SECRET */]: 5
|
|
1176
|
+
};
|
|
1177
|
+
var CATEGORY_MIN_SENSITIVITY = {
|
|
1178
|
+
["phi" /* PHI */]: "restricted" /* RESTRICTED */,
|
|
1179
|
+
["credential" /* CREDENTIAL */]: "secret" /* SECRET */
|
|
1180
|
+
};
|
|
1181
|
+
var HIGH_RISK_CATEGORIES = /* @__PURE__ */ new Set(["phi" /* PHI */, "credential" /* CREDENTIAL */]);
|
|
1182
|
+
function maxSensitivity(first, second) {
|
|
1183
|
+
return SENSITIVITY_RANK[first] >= SENSITIVITY_RANK[second] ? first : second;
|
|
1184
|
+
}
|
|
1185
|
+
function minSensitivityForCategories(categories = []) {
|
|
1186
|
+
return categories.reduce((minimum, category) => {
|
|
1187
|
+
const categoryMinimum = CATEGORY_MIN_SENSITIVITY[category];
|
|
1188
|
+
return categoryMinimum ? maxSensitivity(minimum, categoryMinimum) : minimum;
|
|
1189
|
+
}, "public" /* PUBLIC */);
|
|
1190
|
+
}
|
|
1191
|
+
function minSensitivityForFields(fields = []) {
|
|
1192
|
+
return fields.reduce((minimum, field) => {
|
|
1193
|
+
const fieldSensitivity = field.sensitivity ?? "confidential" /* CONFIDENTIAL */;
|
|
1194
|
+
const categoryMinimum = minSensitivityForCategories(field.categories ?? []);
|
|
1195
|
+
return maxSensitivity(minimum, maxSensitivity(fieldSensitivity, categoryMinimum));
|
|
1196
|
+
}, "public" /* PUBLIC */);
|
|
1197
|
+
}
|
|
1198
|
+
function validateFieldPolicy(field, ctx) {
|
|
1199
|
+
const categories = field.categories ?? [];
|
|
1200
|
+
const sensitivity = field.sensitivity ?? "confidential" /* CONFIDENTIAL */;
|
|
1201
|
+
const minimumSensitivity = minSensitivityForCategories(categories);
|
|
1202
|
+
if (SENSITIVITY_RANK[sensitivity] < SENSITIVITY_RANK[minimumSensitivity]) {
|
|
1203
|
+
ctx.addIssue({
|
|
1204
|
+
code: import_zod5.z.ZodIssueCode.custom,
|
|
1205
|
+
path: ["sensitivity"],
|
|
1206
|
+
message: `Sensitivity must be at least ${minimumSensitivity} for selected categories`
|
|
1207
|
+
});
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
function validateDataTypePolicy(data, ctx) {
|
|
1211
|
+
const recordScope = data.recordScope ?? "member" /* MEMBER */;
|
|
1212
|
+
const fields = data.fields ?? [];
|
|
1213
|
+
const derivedSensitivity = minSensitivityForFields(fields);
|
|
1214
|
+
const hasHighRiskCategory = fields.some(
|
|
1215
|
+
(field) => (field.categories ?? []).some((category) => HIGH_RISK_CATEGORIES.has(category))
|
|
1216
|
+
);
|
|
1217
|
+
if (recordScope === "workspace" /* WORKSPACE */ && data.isCollection === false) {
|
|
1218
|
+
ctx.addIssue({
|
|
1219
|
+
code: import_zod5.z.ZodIssueCode.custom,
|
|
1220
|
+
path: ["isCollection"],
|
|
1221
|
+
message: "Workspace-scoped data types must be collections"
|
|
1222
|
+
});
|
|
1223
|
+
}
|
|
1224
|
+
if (recordScope === "workspace" /* WORKSPACE */ && hasHighRiskCategory) {
|
|
1225
|
+
ctx.addIssue({
|
|
1226
|
+
code: import_zod5.z.ZodIssueCode.custom,
|
|
1227
|
+
path: ["fields"],
|
|
1228
|
+
message: "Workspace-scoped data types cannot include PHI or credential categories"
|
|
1229
|
+
});
|
|
1230
|
+
}
|
|
1231
|
+
if (data.sensitivity !== void 0 && data.sensitivity !== derivedSensitivity) {
|
|
1232
|
+
ctx.addIssue({
|
|
1233
|
+
code: import_zod5.z.ZodIssueCode.custom,
|
|
1234
|
+
path: ["sensitivity"],
|
|
1235
|
+
message: `Sensitivity is derived from fields and must be ${derivedSensitivity}`
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
}
|
|
1239
|
+
function validateDataTypeUpdatePolicy(data, ctx) {
|
|
1240
|
+
const fields = data.fields ?? [];
|
|
1241
|
+
const hasFields = data.fields !== void 0;
|
|
1242
|
+
const hasHighRiskCategory = fields.some(
|
|
1243
|
+
(field) => (field.categories ?? []).some((category) => HIGH_RISK_CATEGORIES.has(category))
|
|
1244
|
+
);
|
|
1245
|
+
if (data.recordScope === "workspace" /* WORKSPACE */ && data.isCollection === false) {
|
|
1246
|
+
ctx.addIssue({
|
|
1247
|
+
code: import_zod5.z.ZodIssueCode.custom,
|
|
1248
|
+
path: ["isCollection"],
|
|
1249
|
+
message: "Workspace-scoped data types must be collections"
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
if (data.recordScope === "workspace" /* WORKSPACE */ && hasFields && hasHighRiskCategory) {
|
|
1253
|
+
ctx.addIssue({
|
|
1254
|
+
code: import_zod5.z.ZodIssueCode.custom,
|
|
1255
|
+
path: ["fields"],
|
|
1256
|
+
message: "Workspace-scoped data types cannot include PHI or credential categories"
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
if (hasFields && data.sensitivity !== void 0) {
|
|
1260
|
+
const derivedSensitivity = minSensitivityForFields(fields);
|
|
1261
|
+
if (data.sensitivity !== derivedSensitivity) {
|
|
1262
|
+
ctx.addIssue({
|
|
1263
|
+
code: import_zod5.z.ZodIssueCode.custom,
|
|
1264
|
+
path: ["sensitivity"],
|
|
1265
|
+
message: `Sensitivity is derived from fields and must be ${derivedSensitivity}`
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
}
|
|
1092
1270
|
var EnumOptionSchema = import_zod5.z.object({
|
|
1093
1271
|
label: import_zod5.z.string(),
|
|
1094
|
-
value: import_zod5.z.union([import_zod5.z.string(), import_zod5.z.number()])
|
|
1272
|
+
value: import_zod5.z.union([import_zod5.z.string(), import_zod5.z.number()]),
|
|
1273
|
+
visibleWhen: import_zod5.z.string().optional()
|
|
1095
1274
|
});
|
|
1096
1275
|
var OptionsSchema = import_zod5.z.array(EnumOptionSchema).optional();
|
|
1097
1276
|
var DataFieldSchema = import_zod5.z.object({
|
|
@@ -1133,8 +1312,12 @@ var SchemaFieldSchema = import_zod5.z.object({
|
|
|
1133
1312
|
referencedTypeId: import_zod5.z.number().optional(),
|
|
1134
1313
|
shouldIndex: import_zod5.z.boolean().optional(),
|
|
1135
1314
|
adminOnly: import_zod5.z.boolean().optional(),
|
|
1136
|
-
defaultValue: import_zod5.z.any().optional()
|
|
1137
|
-
|
|
1315
|
+
defaultValue: import_zod5.z.any().optional(),
|
|
1316
|
+
sensitivity: DataSensitivityEnum.optional(),
|
|
1317
|
+
categories: import_zod5.z.array(DataCategoryEnum).optional(),
|
|
1318
|
+
celFunction: import_zod5.z.string().optional(),
|
|
1319
|
+
validateCel: import_zod5.z.string().optional()
|
|
1320
|
+
}).superRefine(validateFieldPolicy);
|
|
1138
1321
|
var SchemaFieldFormDataSchema = import_zod5.z.object({
|
|
1139
1322
|
slug: import_zod5.z.string(),
|
|
1140
1323
|
name: import_zod5.z.string(),
|
|
@@ -1146,8 +1329,12 @@ var SchemaFieldFormDataSchema = import_zod5.z.object({
|
|
|
1146
1329
|
referencedTypeId: import_zod5.z.number().optional(),
|
|
1147
1330
|
shouldIndex: import_zod5.z.boolean().optional(),
|
|
1148
1331
|
adminOnly: import_zod5.z.boolean().optional(),
|
|
1149
|
-
defaultValue: import_zod5.z.any().optional()
|
|
1150
|
-
|
|
1332
|
+
defaultValue: import_zod5.z.any().optional(),
|
|
1333
|
+
sensitivity: DataSensitivityEnum.optional(),
|
|
1334
|
+
categories: import_zod5.z.array(DataCategoryEnum).optional(),
|
|
1335
|
+
celFunction: import_zod5.z.string().optional(),
|
|
1336
|
+
validateCel: import_zod5.z.string().optional()
|
|
1337
|
+
}).superRefine(validateFieldPolicy);
|
|
1151
1338
|
var DataTypeSchema = import_zod5.z.object({
|
|
1152
1339
|
id: import_zod5.z.number(),
|
|
1153
1340
|
name: import_zod5.z.string(),
|
|
@@ -1157,21 +1344,29 @@ var DataTypeSchema = import_zod5.z.object({
|
|
|
1157
1344
|
prompt: import_zod5.z.string().optional(),
|
|
1158
1345
|
isCollection: import_zod5.z.boolean(),
|
|
1159
1346
|
pinned: import_zod5.z.boolean().optional(),
|
|
1347
|
+
archived: import_zod5.z.boolean().optional(),
|
|
1160
1348
|
ownerId: import_zod5.z.number().nullable(),
|
|
1349
|
+
recordScope: DataTypeRecordScopeEnum,
|
|
1350
|
+
sensitivity: DataSensitivityEnum,
|
|
1351
|
+
categories: import_zod5.z.array(DataCategoryEnum),
|
|
1352
|
+
memberRoleAccess: import_zod5.z.array(DataTypeMemberRoleAccessResponseSchema).optional(),
|
|
1161
1353
|
createdAt: import_zod5.z.string(),
|
|
1162
1354
|
updatedAt: import_zod5.z.string(),
|
|
1163
1355
|
fields: import_zod5.z.array(SchemaFieldSchema)
|
|
1164
|
-
});
|
|
1165
|
-
var
|
|
1356
|
+
}).superRefine(validateDataTypePolicy);
|
|
1357
|
+
var DataTypeFormDataBaseSchema = import_zod5.z.object({
|
|
1166
1358
|
name: import_zod5.z.string(),
|
|
1167
1359
|
slug: import_zod5.z.string(),
|
|
1168
1360
|
description: import_zod5.z.string().optional(),
|
|
1169
1361
|
prompt: import_zod5.z.string().optional(),
|
|
1170
1362
|
isCollection: import_zod5.z.boolean(),
|
|
1171
1363
|
pinned: import_zod5.z.boolean().optional(),
|
|
1364
|
+
recordScope: DataTypeRecordScopeEnum.optional(),
|
|
1172
1365
|
fields: import_zod5.z.array(SchemaFieldFormDataSchema),
|
|
1366
|
+
memberRoleAccess: import_zod5.z.array(DataTypeMemberRoleAccessInputSchema).optional(),
|
|
1173
1367
|
ownerId: import_zod5.z.number().nullable().optional()
|
|
1174
|
-
});
|
|
1368
|
+
}).strict();
|
|
1369
|
+
var DataTypeFormDataSchema = DataTypeFormDataBaseSchema.superRefine(validateDataTypePolicy);
|
|
1175
1370
|
var DataRecordFiltersSchema = import_zod5.z.object({
|
|
1176
1371
|
page: import_zod5.z.number().optional(),
|
|
1177
1372
|
pageSize: import_zod5.z.number().optional(),
|
|
@@ -1187,15 +1382,15 @@ var GetDataTypeBySlugSchema = WorkspaceIdSchema.extend({
|
|
|
1187
1382
|
slug: import_zod5.z.string().describe("Data type slug")
|
|
1188
1383
|
});
|
|
1189
1384
|
var CreateDataTypeSchema = WorkspaceIdSchema.merge(
|
|
1190
|
-
|
|
1385
|
+
DataTypeFormDataBaseSchema.extend({
|
|
1191
1386
|
fields: import_zod5.z.array(SchemaFieldFormDataSchema).default([]).describe(
|
|
1192
1387
|
"Field definitions for the data type. Can be empty initially and fields added later."
|
|
1193
1388
|
)
|
|
1194
1389
|
})
|
|
1195
|
-
);
|
|
1390
|
+
).superRefine(validateDataTypePolicy);
|
|
1196
1391
|
var UpdateDataTypeSchema = WorkspaceIdSchema.extend({
|
|
1197
1392
|
dataTypeId: import_zod5.z.number().describe("Data type ID")
|
|
1198
|
-
}).merge(
|
|
1393
|
+
}).merge(DataTypeFormDataBaseSchema.partial()).superRefine(validateDataTypeUpdatePolicy);
|
|
1199
1394
|
var DeleteDataTypeSchema = WorkspaceIdSchema.extend({
|
|
1200
1395
|
dataTypeId: import_zod5.z.number().describe("Data type ID to delete")
|
|
1201
1396
|
});
|
|
@@ -1207,25 +1402,35 @@ var GetDataRecordSchema = WorkspaceIdSchema.extend({
|
|
|
1207
1402
|
});
|
|
1208
1403
|
var CreateDataRecordSchema = WorkspaceIdSchema.extend({
|
|
1209
1404
|
dataTypeId: import_zod5.z.number().describe("Data type ID"),
|
|
1210
|
-
memberId: import_zod5.z.number().nullable().optional().describe("Member ID
|
|
1405
|
+
memberId: import_zod5.z.number().nullable().optional().describe("Member ID for member-scoped records; omit/null for workspace-scoped records."),
|
|
1406
|
+
memberExternalId: import_zod5.z.string().nullable().optional().describe("Member external ID (alternative to memberId)."),
|
|
1211
1407
|
fieldValues: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.any()).describe("Field values for the record"),
|
|
1212
1408
|
externalId: import_zod5.z.string().nullable().optional().describe("External ID for the record"),
|
|
1213
1409
|
assignmentTaskId: import_zod5.z.number().nullable().optional().describe("Assignment task ID (optional)")
|
|
1214
|
-
})
|
|
1410
|
+
}).refine(
|
|
1411
|
+
(data) => [data.memberId, data.memberExternalId].filter((value) => value != null).length <= 1,
|
|
1412
|
+
{
|
|
1413
|
+
message: "Specify only one of memberId or memberExternalId.",
|
|
1414
|
+
path: ["memberId"]
|
|
1415
|
+
}
|
|
1416
|
+
);
|
|
1215
1417
|
var UpdateDataRecordSchema = WorkspaceIdSchema.extend({
|
|
1216
1418
|
dataTypeId: import_zod5.z.number().describe("Data type ID"),
|
|
1217
1419
|
recordId: import_zod5.z.number().describe("Data record ID"),
|
|
1218
1420
|
fieldValues: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.any()).describe("New field values for the record"),
|
|
1219
1421
|
memberId: import_zod5.z.number().nullable().optional().describe(
|
|
1220
|
-
"Member ID
|
|
1422
|
+
"Member ID for member-scoped records; omit/null for workspace-scoped records. Cannot be used with memberExternalId."
|
|
1221
1423
|
),
|
|
1222
1424
|
memberExternalId: import_zod5.z.string().nullable().optional().describe("Member external ID (alternative to memberId). Cannot be used with memberId."),
|
|
1223
1425
|
externalId: import_zod5.z.string().nullable().optional().describe("External ID for the record"),
|
|
1224
1426
|
assignmentTaskId: import_zod5.z.number().nullable().optional().describe("Assignment task ID (optional)")
|
|
1225
|
-
}).refine(
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1427
|
+
}).refine(
|
|
1428
|
+
(data) => [data.memberId, data.memberExternalId].filter((value) => value != null).length <= 1,
|
|
1429
|
+
{
|
|
1430
|
+
message: "Specify only one of memberId or memberExternalId.",
|
|
1431
|
+
path: ["memberExternalId"]
|
|
1432
|
+
}
|
|
1433
|
+
);
|
|
1229
1434
|
var DeleteDataRecordSchema = WorkspaceIdSchema.extend({
|
|
1230
1435
|
dataTypeId: import_zod5.z.number().describe("Data type ID"),
|
|
1231
1436
|
recordId: import_zod5.z.number().describe("Data record ID to delete")
|
|
@@ -1233,7 +1438,9 @@ var DeleteDataRecordSchema = WorkspaceIdSchema.extend({
|
|
|
1233
1438
|
var UpsertDataRecordSchema = WorkspaceIdSchema.extend({
|
|
1234
1439
|
dataTypeId: import_zod5.z.number().describe("Data type ID"),
|
|
1235
1440
|
externalId: import_zod5.z.string().describe("External ID to match on"),
|
|
1236
|
-
fieldValues: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.any()).describe("Field values for the record")
|
|
1441
|
+
fieldValues: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.any()).describe("Field values for the record"),
|
|
1442
|
+
memberId: import_zod5.z.number().nullable().optional(),
|
|
1443
|
+
memberExternalId: import_zod5.z.string().nullable().optional()
|
|
1237
1444
|
});
|
|
1238
1445
|
var ToggleFieldIndexSchema = WorkspaceIdSchema.extend({
|
|
1239
1446
|
dataTypeId: import_zod5.z.number().describe("Data type ID"),
|
|
@@ -1284,7 +1491,8 @@ var DataRecordSchema = import_zod5.z.object({
|
|
|
1284
1491
|
updatedAt: import_zod5.z.string()
|
|
1285
1492
|
});
|
|
1286
1493
|
var DataRecordFormDataSchema = import_zod5.z.object({
|
|
1287
|
-
memberId: import_zod5.z.number().optional(),
|
|
1494
|
+
memberId: import_zod5.z.number().nullable().optional(),
|
|
1495
|
+
memberExternalId: import_zod5.z.string().optional(),
|
|
1288
1496
|
fieldValues: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.any()),
|
|
1289
1497
|
externalId: import_zod5.z.string().optional(),
|
|
1290
1498
|
assignmentTaskId: import_zod5.z.number().optional()
|
|
@@ -1323,11 +1531,14 @@ var DataIntegrityReportItemSchema = import_zod5.z.object({
|
|
|
1323
1531
|
});
|
|
1324
1532
|
var DataTypeExportItemSchema = import_zod5.z.object({
|
|
1325
1533
|
uuid: import_zod5.z.string(),
|
|
1534
|
+
templateUuid: import_zod5.z.string().nullable().optional(),
|
|
1326
1535
|
name: import_zod5.z.string(),
|
|
1327
1536
|
slug: import_zod5.z.string(),
|
|
1328
|
-
description: import_zod5.z.string().nullable(),
|
|
1537
|
+
description: import_zod5.z.string().nullable().optional(),
|
|
1538
|
+
prompt: import_zod5.z.string().nullable().optional(),
|
|
1329
1539
|
isCollection: import_zod5.z.boolean(),
|
|
1330
|
-
|
|
1540
|
+
recordScope: DataTypeRecordScopeEnum,
|
|
1541
|
+
fields: import_zod5.z.array(SchemaFieldSchema)
|
|
1331
1542
|
});
|
|
1332
1543
|
var TaskExportDataTypeRelationSchema = import_zod5.z.object({
|
|
1333
1544
|
dataTypeUuid: import_zod5.z.string(),
|
|
@@ -1341,21 +1552,35 @@ var InboxRuleSchema = import_zod6.z.object({
|
|
|
1341
1552
|
operator: import_zod6.z.enum(["contains", "equals", "ends_with", "regex", "ip_in_range"]),
|
|
1342
1553
|
value: import_zod6.z.string()
|
|
1343
1554
|
});
|
|
1555
|
+
var RateLimitOverrideSchema = import_zod6.z.object({
|
|
1556
|
+
enabled: import_zod6.z.boolean().nullish(),
|
|
1557
|
+
per_minute: import_zod6.z.number().int().nullish(),
|
|
1558
|
+
per_hour: import_zod6.z.number().int().nullish()
|
|
1559
|
+
});
|
|
1560
|
+
var RateLimitAllowlistEntrySchema = import_zod6.z.object({
|
|
1561
|
+
sender: import_zod6.z.string(),
|
|
1562
|
+
reason: import_zod6.z.string().nullish()
|
|
1563
|
+
});
|
|
1344
1564
|
var InboxRulesConfigSchema = import_zod6.z.object({
|
|
1345
1565
|
allowMode: import_zod6.z.enum(["all", "none", "rules"]).optional(),
|
|
1346
1566
|
denyMode: import_zod6.z.enum(["all", "none", "rules"]).optional(),
|
|
1347
1567
|
allowRules: import_zod6.z.array(InboxRuleSchema).optional(),
|
|
1348
|
-
denyRules: import_zod6.z.array(InboxRuleSchema).optional()
|
|
1568
|
+
denyRules: import_zod6.z.array(InboxRuleSchema).optional(),
|
|
1569
|
+
rateLimitEnabled: import_zod6.z.boolean().nullish(),
|
|
1570
|
+
rateLimitOverride: RateLimitOverrideSchema.nullish(),
|
|
1571
|
+
rateLimitAllowlist: import_zod6.z.array(RateLimitAllowlistEntrySchema).nullish()
|
|
1349
1572
|
});
|
|
1350
1573
|
var InboxFormDataSchema = import_zod6.z.object({
|
|
1351
1574
|
name: import_zod6.z.string(),
|
|
1352
1575
|
slug: import_zod6.z.string().optional(),
|
|
1353
1576
|
rules: InboxRulesConfigSchema.optional(),
|
|
1354
|
-
isPublic: import_zod6.z.boolean().optional(),
|
|
1355
1577
|
defaultWorkflowId: import_zod6.z.number().optional(),
|
|
1356
1578
|
assistantEnabled: import_zod6.z.boolean().optional(),
|
|
1357
1579
|
autoReplyEnabled: import_zod6.z.boolean().optional(),
|
|
1358
|
-
recipient: import_zod6.z.string().optional()
|
|
1580
|
+
recipient: import_zod6.z.string().optional(),
|
|
1581
|
+
// Optional OrgDomain UUID for inboxes hosted on a verified org-tier custom
|
|
1582
|
+
// domain. Backend validates ownership and email-config status.
|
|
1583
|
+
orgDomainUuid: import_zod6.z.string().uuid().optional()
|
|
1359
1584
|
});
|
|
1360
1585
|
var InboxEmailFiltersSchema = import_zod6.z.object({
|
|
1361
1586
|
page: import_zod6.z.number().optional(),
|
|
@@ -1398,8 +1623,9 @@ var GetRecentInboxMessagesSchema = WorkspaceIdSchema.extend({
|
|
|
1398
1623
|
// src/schemas/inquiries.ts
|
|
1399
1624
|
var import_zod7 = require("zod");
|
|
1400
1625
|
var CreateInquirySchema = import_zod7.z.object({
|
|
1401
|
-
name: import_zod7.z.string().
|
|
1402
|
-
|
|
1626
|
+
name: import_zod7.z.string().optional(),
|
|
1627
|
+
email: import_zod7.z.string().email().optional(),
|
|
1628
|
+
inquiryType: import_zod7.z.enum(["customer", "builder", "partner", "other", "demo_request", "waitlist"]),
|
|
1403
1629
|
cellNumber: import_zod7.z.string().optional(),
|
|
1404
1630
|
businessNumber: import_zod7.z.string().optional(),
|
|
1405
1631
|
businessName: import_zod7.z.string().optional(),
|
|
@@ -1417,6 +1643,14 @@ var ListInquiriesSchema = import_zod7.z.object({
|
|
|
1417
1643
|
var GetInquirySchema = import_zod7.z.object({
|
|
1418
1644
|
inquiryId: import_zod7.z.number().describe("Inquiry ID")
|
|
1419
1645
|
});
|
|
1646
|
+
var EnrichInquirySchema = import_zod7.z.object({
|
|
1647
|
+
inquiryUuid: import_zod7.z.string().uuid().describe("Inquiry UUID from cookie"),
|
|
1648
|
+
name: import_zod7.z.string().optional(),
|
|
1649
|
+
email: import_zod7.z.string().email().optional(),
|
|
1650
|
+
cellNumber: import_zod7.z.string().optional(),
|
|
1651
|
+
businessName: import_zod7.z.string().optional(),
|
|
1652
|
+
message: import_zod7.z.string().optional()
|
|
1653
|
+
});
|
|
1420
1654
|
var UpdateInquiryRequestSchema = import_zod7.z.object({
|
|
1421
1655
|
notes: import_zod7.z.string().optional(),
|
|
1422
1656
|
status: import_zod7.z.enum(["new", "in_progress", "done"]).optional()
|
|
@@ -1439,6 +1673,8 @@ var CreateWorkspaceMemberRequestSchema = import_zod8.z.object({
|
|
|
1439
1673
|
name: import_zod8.z.string().optional(),
|
|
1440
1674
|
description: import_zod8.z.string().optional(),
|
|
1441
1675
|
externalId: import_zod8.z.string().optional(),
|
|
1676
|
+
dateOfBirth: import_zod8.z.string().optional(),
|
|
1677
|
+
// ISO 8601 date (YYYY-MM-DD)
|
|
1442
1678
|
// Role and permissions
|
|
1443
1679
|
memberRoleId: import_zod8.z.number(),
|
|
1444
1680
|
// Notification preferences
|
|
@@ -1461,6 +1697,8 @@ var UpdateWorkspaceMemberRequestSchema = import_zod8.z.object({
|
|
|
1461
1697
|
phone: import_zod8.z.string().optional(),
|
|
1462
1698
|
email: import_zod8.z.string().optional(),
|
|
1463
1699
|
externalId: import_zod8.z.string().optional(),
|
|
1700
|
+
dateOfBirth: import_zod8.z.string().nullable().optional(),
|
|
1701
|
+
// ISO 8601 date (YYYY-MM-DD)
|
|
1464
1702
|
// Role and permissions
|
|
1465
1703
|
memberRoleId: import_zod8.z.number().optional(),
|
|
1466
1704
|
labelIds: import_zod8.z.array(import_zod8.z.number()).optional(),
|
|
@@ -1489,7 +1727,8 @@ var MemberFormDataSchema = import_zod8.z.object({
|
|
|
1489
1727
|
description: import_zod8.z.string().optional(),
|
|
1490
1728
|
phone: import_zod8.z.string().optional(),
|
|
1491
1729
|
email: import_zod8.z.string().optional(),
|
|
1492
|
-
externalId: import_zod8.z.string().optional()
|
|
1730
|
+
externalId: import_zod8.z.string().optional(),
|
|
1731
|
+
dateOfBirth: import_zod8.z.string().nullable().optional()
|
|
1493
1732
|
});
|
|
1494
1733
|
var MemberRoleTaskAccessSchema = import_zod8.z.object({
|
|
1495
1734
|
taskId: import_zod8.z.number(),
|
|
@@ -1522,7 +1761,8 @@ var MemberRoleFormDataSchema = import_zod8.z.object({
|
|
|
1522
1761
|
var GetCurrentMemberSchema = WorkspaceIdSchema;
|
|
1523
1762
|
var UpdateCurrentMemberSchema = WorkspaceIdSchema.extend({
|
|
1524
1763
|
name: import_zod8.z.string().optional().describe("New member name"),
|
|
1525
|
-
description: import_zod8.z.string().optional().describe("New member description")
|
|
1764
|
+
description: import_zod8.z.string().optional().describe("New member description"),
|
|
1765
|
+
dateOfBirth: import_zod8.z.string().nullable().optional().describe("New date of birth (YYYY-MM-DD)")
|
|
1526
1766
|
});
|
|
1527
1767
|
var ListWorkspaceMembersSchema = WorkspaceIdSchema.extend({
|
|
1528
1768
|
query: import_zod8.z.string().optional().describe("Search query (name, email, or phone)"),
|
|
@@ -1583,17 +1823,23 @@ var MemberFilterObjectTypeEnum = import_zod8.z.enum([
|
|
|
1583
1823
|
"email",
|
|
1584
1824
|
"phone",
|
|
1585
1825
|
"phoneType",
|
|
1826
|
+
"age",
|
|
1827
|
+
"dateOfBirth",
|
|
1586
1828
|
"workflow",
|
|
1587
1829
|
"tosAccepted",
|
|
1588
1830
|
"notifySms",
|
|
1589
1831
|
"notifyEmail",
|
|
1590
1832
|
"notifyVoice",
|
|
1833
|
+
"smsDeliveryStatus",
|
|
1834
|
+
"callForwarded",
|
|
1591
1835
|
"calendarEvent",
|
|
1592
1836
|
"chatEngagement",
|
|
1593
1837
|
"lastMessageActivity",
|
|
1594
1838
|
"memberCreated",
|
|
1595
1839
|
"isDefault",
|
|
1596
|
-
"memberType"
|
|
1840
|
+
"memberType",
|
|
1841
|
+
"memberField",
|
|
1842
|
+
"journey"
|
|
1597
1843
|
]);
|
|
1598
1844
|
var MemberFilterFilterTypeEnum = import_zod8.z.enum([
|
|
1599
1845
|
"any",
|
|
@@ -1626,7 +1872,9 @@ var MemberFilterFilterTypeEnum = import_zod8.z.enum([
|
|
|
1626
1872
|
"lessThanDaysAgo",
|
|
1627
1873
|
"daysUntil",
|
|
1628
1874
|
"hasKey",
|
|
1629
|
-
"hasKeyValue"
|
|
1875
|
+
"hasKeyValue",
|
|
1876
|
+
"smsDeliveryStatusNeedsAttention",
|
|
1877
|
+
"callForwardedAny"
|
|
1630
1878
|
]);
|
|
1631
1879
|
var MemberFilterRuleSchema = import_zod8.z.object({
|
|
1632
1880
|
id: import_zod8.z.number(),
|
|
@@ -1680,6 +1928,7 @@ var MemberSchema = import_zod8.z.object({
|
|
|
1680
1928
|
phoneType: import_zod8.z.string().optional(),
|
|
1681
1929
|
email: import_zod8.z.string().optional(),
|
|
1682
1930
|
externalId: import_zod8.z.string().optional(),
|
|
1931
|
+
dateOfBirth: import_zod8.z.string().nullable().optional(),
|
|
1683
1932
|
tosAccepted: import_zod8.z.boolean().optional(),
|
|
1684
1933
|
accountTosAccepted: import_zod8.z.boolean().optional(),
|
|
1685
1934
|
memberRoleName: import_zod8.z.string().optional(),
|
|
@@ -1732,7 +1981,7 @@ var DeleteMilestoneSchema = WorkspaceIdSchema.extend({
|
|
|
1732
1981
|
milestoneId: import_zod9.z.number().describe("Milestone ID to delete")
|
|
1733
1982
|
});
|
|
1734
1983
|
|
|
1735
|
-
// src/schemas/
|
|
1984
|
+
// src/schemas/phone-numbers.ts
|
|
1736
1985
|
var import_zod10 = require("zod");
|
|
1737
1986
|
var PhoneNumberFormDataSchema = import_zod10.z.object({
|
|
1738
1987
|
name: import_zod10.z.string().nullable().optional(),
|
|
@@ -1890,7 +2139,8 @@ var ChildTaskFormDataSchema = import_zod12.z.object({
|
|
|
1890
2139
|
taskId: import_zod12.z.number(),
|
|
1891
2140
|
choicePrompt: import_zod12.z.string().optional(),
|
|
1892
2141
|
autoNext: import_zod12.z.boolean().optional(),
|
|
1893
|
-
required: import_zod12.z.boolean().optional()
|
|
2142
|
+
required: import_zod12.z.boolean().optional(),
|
|
2143
|
+
celCondition: import_zod12.z.string().optional()
|
|
1894
2144
|
});
|
|
1895
2145
|
var AbilityDataSchema = import_zod12.z.object({
|
|
1896
2146
|
id: import_zod12.z.number().optional(),
|
|
@@ -1935,10 +2185,24 @@ var UnarchiveTaskSchema = WorkspaceIdSchema.extend({
|
|
|
1935
2185
|
|
|
1936
2186
|
// src/schemas/workflows.ts
|
|
1937
2187
|
var import_zod13 = require("zod");
|
|
2188
|
+
var WorkflowMemberRoleAccessInputSchema = import_zod13.z.object({
|
|
2189
|
+
memberRoleId: import_zod13.z.number(),
|
|
2190
|
+
accessMode: import_zod13.z.number()
|
|
2191
|
+
});
|
|
1938
2192
|
var WorkflowFormDataSchema = import_zod13.z.object({
|
|
1939
2193
|
name: import_zod13.z.string(),
|
|
1940
2194
|
description: import_zod13.z.string().optional(),
|
|
1941
|
-
|
|
2195
|
+
prompt: import_zod13.z.string().optional(),
|
|
2196
|
+
ownerId: import_zod13.z.number().optional(),
|
|
2197
|
+
startTaskId: import_zod13.z.number().nullable().optional(),
|
|
2198
|
+
agentId: import_zod13.z.number().nullable().optional(),
|
|
2199
|
+
createMode: import_zod13.z.enum(["task", "taskless"]).optional(),
|
|
2200
|
+
defaultPhoneNumberId: import_zod13.z.number().nullable().optional(),
|
|
2201
|
+
defaultInboxId: import_zod13.z.number().nullable().optional(),
|
|
2202
|
+
defaultTaskName: import_zod13.z.string().optional(),
|
|
2203
|
+
defaultTaskDescription: import_zod13.z.string().optional(),
|
|
2204
|
+
defaultTaskPrompt: import_zod13.z.string().optional(),
|
|
2205
|
+
memberRoleAccess: import_zod13.z.array(WorkflowMemberRoleAccessInputSchema).optional()
|
|
1942
2206
|
});
|
|
1943
2207
|
var ListWorkflowsSchema = WorkspaceIdSchema;
|
|
1944
2208
|
var GetWorkflowSchema = WorkspaceIdSchema.extend({
|
|
@@ -2038,6 +2302,7 @@ var GetProductSchema = import_zod14.z.object({
|
|
|
2038
2302
|
CreateWorkflowSchema,
|
|
2039
2303
|
CreateWorkspaceMemberRequestSchema,
|
|
2040
2304
|
CreateWorkspaceSchema,
|
|
2305
|
+
DataCategory,
|
|
2041
2306
|
DataFieldFormDataSchema,
|
|
2042
2307
|
DataFieldSchema,
|
|
2043
2308
|
DataFieldType,
|
|
@@ -2049,8 +2314,12 @@ var GetProductSchema = import_zod14.z.object({
|
|
|
2049
2314
|
DataRecordSchema,
|
|
2050
2315
|
DataRecordWithAccessModeSchema,
|
|
2051
2316
|
DataRecordsPaginatedResponseSchema,
|
|
2317
|
+
DataSensitivity,
|
|
2052
2318
|
DataTypeExportItemSchema,
|
|
2053
2319
|
DataTypeFormDataSchema,
|
|
2320
|
+
DataTypeMemberRoleAccessInputSchema,
|
|
2321
|
+
DataTypeMemberRoleAccessResponseSchema,
|
|
2322
|
+
DataTypeRecordScope,
|
|
2054
2323
|
DataTypeSchema,
|
|
2055
2324
|
DeleteCalendarEventSchema,
|
|
2056
2325
|
DeleteCalendarSchema,
|
|
@@ -2070,6 +2339,7 @@ var GetProductSchema = import_zod14.z.object({
|
|
|
2070
2339
|
DeleteWorkflowSchema,
|
|
2071
2340
|
DeleteWorkspaceSchema,
|
|
2072
2341
|
DuplicateAccountInfoSchema,
|
|
2342
|
+
EnrichInquirySchema,
|
|
2073
2343
|
ErrorResponseSchema,
|
|
2074
2344
|
FunctionToolSchema,
|
|
2075
2345
|
GenerateICalTokenSchema,
|
|
@@ -2168,6 +2438,8 @@ var GetProductSchema = import_zod14.z.object({
|
|
|
2168
2438
|
OperatorChatParticipantSchema,
|
|
2169
2439
|
OrganizationSchema,
|
|
2170
2440
|
PhoneNumberFormDataSchema,
|
|
2441
|
+
RateLimitAllowlistEntrySchema,
|
|
2442
|
+
RateLimitOverrideSchema,
|
|
2171
2443
|
RateMessageSchema,
|
|
2172
2444
|
RemoveDataFieldSchema,
|
|
2173
2445
|
RemoveWorkspaceMemberSchema,
|