@gravity-rail/sdk 0.18.0 → 0.21.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.
Files changed (39) hide show
  1. package/dist/{chunk-MP5ENP4Q.js → chunk-24L4RD4Z.js} +560 -136
  2. package/dist/chunk-24L4RD4Z.js.map +1 -0
  3. package/dist/{chunk-2YLKG4TT.js → chunk-3HAV5XUJ.js} +1 -1
  4. package/dist/chunk-3HAV5XUJ.js.map +1 -0
  5. package/dist/{chunk-PJFEGUHM.js → chunk-7OLBLLV7.js} +6 -2
  6. package/dist/{chunk-PJFEGUHM.js.map → chunk-7OLBLLV7.js.map} +1 -1
  7. package/dist/{client-B51HZ6zY.d.cts → client-B0eh2BEY.d.cts} +1592 -364
  8. package/dist/{client-G5i59XtT.d.ts → client-CFz-BGmY.d.ts} +1592 -364
  9. package/dist/helpers.cjs +141 -0
  10. package/dist/helpers.cjs.map +1 -1
  11. package/dist/helpers.d.cts +17 -3
  12. package/dist/helpers.d.ts +17 -3
  13. package/dist/helpers.js +127 -1
  14. package/dist/helpers.js.map +1 -1
  15. package/dist/index.cjs +658 -129
  16. package/dist/index.cjs.map +1 -1
  17. package/dist/index.d.cts +28 -5
  18. package/dist/index.d.ts +28 -5
  19. package/dist/index.js +123 -11
  20. package/dist/index.js.map +1 -1
  21. package/dist/internal.cjs +581 -140
  22. package/dist/internal.cjs.map +1 -1
  23. package/dist/internal.d.cts +724 -553
  24. package/dist/internal.d.ts +724 -553
  25. package/dist/internal.js +23 -13
  26. package/dist/internal.js.map +1 -1
  27. package/dist/{revision-state-Cc7RAf8A.d.ts → revision-state-KfOztBkY.d.ts} +147 -232
  28. package/dist/{revision-state-DudSCwea.d.cts → revision-state-fJ9PM15N.d.cts} +147 -232
  29. package/dist/schemas.cjs +32 -18
  30. package/dist/schemas.cjs.map +1 -1
  31. package/dist/schemas.d.cts +37 -35
  32. package/dist/schemas.d.ts +37 -35
  33. package/dist/schemas.js +32 -18
  34. package/dist/schemas.js.map +1 -1
  35. package/dist/{tasks-1JXJJuG8.d.cts → tasks-WH_VfzMv.d.cts} +351 -20
  36. package/dist/{tasks-1JXJJuG8.d.ts → tasks-WH_VfzMv.d.ts} +351 -20
  37. package/package.json +6 -6
  38. package/dist/chunk-2YLKG4TT.js.map +0 -1
  39. package/dist/chunk-MP5ENP4Q.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-2YLKG4TT.js";
11
+ } from "./chunk-3HAV5XUJ.js";
12
12
 
13
13
  // src/schemas/accounts.ts
14
14
  import { z } from "zod";
@@ -55,11 +55,13 @@ var AccountSchema = z.object({
55
55
  });
56
56
  var LoginRequestSchema = z.object({
57
57
  phoneNumber: z.string(),
58
- organizationId: z.number().optional()
58
+ organizationId: z.number().optional(),
59
+ isSignUp: z.boolean().optional()
59
60
  });
60
61
  var VerifyCodeRequestSchema = z.object({
61
62
  phoneNumber: z.string(),
62
- code: z.string()
63
+ code: z.string(),
64
+ isSignUp: z.boolean().optional()
63
65
  });
64
66
  var VerifyCodeResponseSchema = z.object({
65
67
  success: z.boolean(),
@@ -111,7 +113,6 @@ var OrganizationSchema = z.object({
111
113
  uuid: z.string(),
112
114
  name: z.string(),
113
115
  slug: z.string(),
114
- primary: z.boolean(),
115
116
  authMode: z.enum(["open", "ssoForDomain", "ssoOnly"]),
116
117
  contactEmail: z.string().optional(),
117
118
  contactPhone: z.string().optional(),
@@ -122,11 +123,13 @@ var OrganizationSchema = z.object({
122
123
  var AdminOrganizationSchema = OrganizationSchema.extend({
123
124
  accountCount: z.number(),
124
125
  workspaceCount: z.number(),
125
- enforceCreditLimit: z.boolean()
126
+ enforceCreditLimit: z.boolean(),
127
+ // Carrier provisioning entitlements — 0 = may not provision.
128
+ maxPhoneNumbers: z.number().int().min(0),
129
+ maxA2pBrands: z.number().int().min(0)
126
130
  });
127
131
  var CreateOrganizationRequestSchema = z.object({
128
132
  name: z.string(),
129
- primary: z.boolean().optional(),
130
133
  contactEmail: z.string().optional(),
131
134
  contactPhone: z.string().optional(),
132
135
  logo: z.string().optional(),
@@ -136,7 +139,6 @@ var CreateOrganizationRequestSchema = z.object({
136
139
  var UpdateOrganizationRequestSchema = z.object({
137
140
  name: z.string().optional(),
138
141
  slug: z.string().optional(),
139
- primary: z.boolean().optional(),
140
142
  contactEmail: z.string().optional(),
141
143
  contactPhone: z.string().optional(),
142
144
  authMode: z.enum(["open", "ssoForDomain", "ssoOnly"]).optional(),
@@ -152,7 +154,11 @@ var UpdateOrganizationRequestSchema = z.object({
152
154
  twilioSubAccountSid: z.string().nullable().optional(),
153
155
  // Hard credit enforcement toggle — flips between the legacy soft
154
156
  // alert-only mode and the hard 402 stop at zero credits.
155
- enforceCreditLimit: z.boolean().optional()
157
+ enforceCreditLimit: z.boolean().optional(),
158
+ // Carrier provisioning entitlements — 0 = may not provision.
159
+ // Superuser-only; explicit null is ignored server-side.
160
+ maxPhoneNumbers: z.number().int().min(0).optional(),
161
+ maxA2pBrands: z.number().int().min(0).optional()
156
162
  });
157
163
  var AdminAccountMembershipSchema = z.object({
158
164
  workspaceUuid: z.string(),
@@ -331,6 +337,7 @@ var CreateCalendarEventSchema = z2.object({
331
337
  title: z2.string().describe("Event title"),
332
338
  startTime: z2.string().describe("ISO 8601 datetime string"),
333
339
  attendeeIds: z2.array(z2.number()).optional().describe("Member IDs of attendees"),
340
+ workflowId: z2.number().optional().describe("STABLE workflow root ID (resolves to the active revision)"),
334
341
  workflowRevisionId: z2.number().optional().describe("Associated workflow revision ID"),
335
342
  taskId: z2.number().optional().describe("Associated task ID"),
336
343
  description: z2.string().optional().describe("Event description"),
@@ -898,7 +905,11 @@ function minSensitivityForCategories(categories = []) {
898
905
  return categoryMinimum ? maxSensitivity(minimum, categoryMinimum) : minimum;
899
906
  }, "public" /* PUBLIC */);
900
907
  }
908
+ var EMPTY_SCHEMA_SENSITIVITY = "confidential" /* CONFIDENTIAL */;
901
909
  function minSensitivityForFields(fields = []) {
910
+ if (fields.length === 0) {
911
+ return EMPTY_SCHEMA_SENSITIVITY;
912
+ }
902
913
  return fields.reduce((minimum, field) => {
903
914
  const fieldSensitivity = field.sensitivity ?? "confidential" /* CONFIDENTIAL */;
904
915
  const categoryMinimum = minSensitivityForCategories(field.categories ?? []);
@@ -1280,6 +1291,16 @@ var InboxFormDataSchema = z6.object({
1280
1291
  assistantEnabled: z6.boolean().optional(),
1281
1292
  autoReplyEnabled: z6.boolean().optional(),
1282
1293
  recipient: z6.string().optional(),
1294
+ // Inbox-specific footer overriding the workspace-wide one. Empty string
1295
+ // clears the override; the backend sanitizes and length-caps it with the
1296
+ // same rules as the workspace footer.
1297
+ emailFooter: z6.string().nullish(),
1298
+ // Store mail from senders who are not workspace Members instead of
1299
+ // dropping it. Stored only — such mail is never processed by the AI. Must
1300
+ // be declared here or Zod strips it: `UpdateInboxSchema` backs the MCP
1301
+ // `update_inbox` tool, and a stripped key makes the tool report success
1302
+ // while changing nothing.
1303
+ receiveNonMemberEmails: z6.boolean().optional(),
1283
1304
  // Optional OrgDomain UUID for inboxes hosted on a verified org-tier custom
1284
1305
  // domain. Backend validates ownership and email-config status.
1285
1306
  orgDomainUuid: z6.string().uuid().optional()
@@ -1675,11 +1696,7 @@ var SiteFormDataSchema = z10.object({
1675
1696
  isReseller: z10.boolean().optional(),
1676
1697
  isPublic: z10.boolean().optional(),
1677
1698
  defaultWorkflowId: z10.number().optional(),
1678
- homePageId: z10.number().optional(),
1679
- crawl: z10.boolean().optional(),
1680
- crawlUrl: z10.string().optional(),
1681
- crawlLimit: z10.number().optional(),
1682
- crawlExcludedTags: z10.array(z10.string()).optional()
1699
+ homePageId: z10.number().optional()
1683
1700
  });
1684
1701
  var SitePageFormDataSchema = z10.object({
1685
1702
  title: z10.string(),
@@ -1716,9 +1733,6 @@ var DeleteSiteSchema = WorkspaceIdSchema.extend({
1716
1733
  var GetSiteCountsSchema = WorkspaceIdSchema.extend({
1717
1734
  siteId: z10.number().describe("Site ID")
1718
1735
  });
1719
- var StartSiteCrawlSchema = WorkspaceIdSchema.extend({
1720
- siteId: z10.number().describe("Site ID")
1721
- });
1722
1736
  var ListSitePagesSchema = WorkspaceIdSchema.extend({
1723
1737
  siteId: z10.number().describe("Site ID"),
1724
1738
  search: z10.string().optional().describe("Search term"),
@@ -1834,7 +1848,7 @@ var WorkflowCreateFormDataSchema = z12.object({
1834
1848
  assistantName: z12.string().nullable().optional(),
1835
1849
  assistantIdentity: z12.string().nullable().optional(),
1836
1850
  // Concrete revision models; selecting an Agent copies its preset here.
1837
- // Explicit null resets to the concrete Haiku fallback and clears config.
1851
+ // Explicit null/blank is rejected by the API — there is no invisible fallback.
1838
1852
  chatModelId: z12.string().nullable().optional(),
1839
1853
  chatModelConfig: z12.record(z12.string(), z12.unknown()).nullable().optional(),
1840
1854
  realtimeModelId: z12.string().nullable().optional(),
@@ -1986,6 +2000,7 @@ export {
1986
2000
  DeleteWorkflowSchema,
1987
2001
  DeleteWorkspaceSchema,
1988
2002
  DuplicateAccountInfoSchema,
2003
+ EMPTY_SCHEMA_SENSITIVITY,
1989
2004
  EnrichInquirySchema,
1990
2005
  ErrorResponseSchema,
1991
2006
  FunctionToolSchema,
@@ -2094,7 +2109,6 @@ export {
2094
2109
  SendSmsToMemberSchema,
2095
2110
  SiteFormDataSchema,
2096
2111
  SitePageFormDataSchema,
2097
- StartSiteCrawlSchema,
2098
2112
  SupervisorChatParticipantSchema,
2099
2113
  TaskExportDataTypeRelationSchema,
2100
2114
  TaskFormDataSchema,