@gravity-rail/sdk 0.14.0 → 0.15.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/dist/schemas.js CHANGED
@@ -8,7 +8,7 @@ import {
8
8
  DataSensitivity,
9
9
  DataTypeRecordScope,
10
10
  IndexStatus
11
- } from "./chunk-V7ZKEH4V.js";
11
+ } from "./chunk-2YLKG4TT.js";
12
12
 
13
13
  // src/schemas/accounts.ts
14
14
  import { z } from "zod";
@@ -512,14 +512,7 @@ var ChannelEnum = z4.enum([
512
512
  "a2a",
513
513
  "routine"
514
514
  ]);
515
- var MessageRoleEnum = z4.enum([
516
- "user",
517
- "assistant",
518
- "system",
519
- "tool",
520
- "function",
521
- "operator"
522
- ]);
515
+ var MessageRoleEnum = z4.enum(["user", "assistant", "system", "tool", "function"]);
523
516
  var ChatFilterObjectTypeEnum = z4.enum([
524
517
  "title",
525
518
  "participant",
@@ -584,10 +577,27 @@ var HumanChatParticipantSchema = z4.object({
584
577
  role: z4.literal("user"),
585
578
  memberId: z4.number()
586
579
  });
587
- var OperatorChatParticipantSchema = z4.object({
580
+ var AssistantChatParticipantSchema = z4.object({
581
+ name: z4.string(),
582
+ // A revision-backed assistant has no Member row at all, so the backend
583
+ // serves `memberId: null` here — it is NOT a required number.
584
+ memberId: z4.number().nullable().optional(),
585
+ memberType: z4.string().optional(),
586
+ role: z4.literal("assistant"),
587
+ additionalInstructions: z4.string().optional()
588
+ });
589
+ var ContributorChatParticipantSchema = z4.object({
590
+ name: z4.string(),
591
+ memberId: z4.number(),
592
+ memberType: z4.string().optional(),
593
+ role: z4.literal("contributor"),
594
+ additionalInstructions: z4.string().optional()
595
+ });
596
+ var SupervisorChatParticipantSchema = z4.object({
588
597
  name: z4.string(),
589
598
  memberId: z4.number(),
590
- role: z4.literal("operator")
599
+ memberType: z4.string().optional(),
600
+ role: z4.literal("supervisor")
591
601
  });
592
602
  var ChatFormDataSchema = z4.object({
593
603
  id: z4.number().optional(),
@@ -601,6 +611,12 @@ var ChatFormDataSchema = z4.object({
601
611
  siteId: z4.number().nullable().optional(),
602
612
  memberId: z4.number().nullable().optional(),
603
613
  participants: z4.array(ChatParticipantFormDataSchema),
614
+ // Who answers. The explicit successor to `agentEnabled` — see ChatFormData.
615
+ assistantKind: z4.enum(["ai", "human"]).optional(),
616
+ // The chat's user participant, named without the "unless it's the caller"
617
+ // caveat that `memberId` carries.
618
+ userMemberId: z4.number().nullable().optional(),
619
+ // Deprecated alias for `assistantKind`; false ⇒ 'human'.
604
620
  agentEnabled: z4.boolean().optional(),
605
621
  assistantMemberId: z4.number().nullable().optional(),
606
622
  assistantName: z4.string().nullable().optional(),
@@ -734,14 +750,9 @@ var ChatSchema = z4.object({
734
750
  participants: z4.array(
735
751
  z4.union([
736
752
  HumanChatParticipantSchema,
737
- OperatorChatParticipantSchema,
738
- z4.object({
739
- name: z4.string(),
740
- memberId: z4.number(),
741
- memberType: z4.string().optional(),
742
- role: z4.literal("assistant"),
743
- additionalInstructions: z4.string().optional()
744
- })
753
+ AssistantChatParticipantSchema,
754
+ ContributorChatParticipantSchema,
755
+ SupervisorChatParticipantSchema
745
756
  ])
746
757
  ),
747
758
  canSendAsAssistant: z4.boolean().optional()
@@ -1919,6 +1930,7 @@ export {
1919
1930
  ArchiveChatSchema,
1920
1931
  ArchivePhoneNumberSchema,
1921
1932
  ArchiveTaskSchema,
1933
+ AssistantChatParticipantSchema,
1922
1934
  CancelCalendarEventSchema,
1923
1935
  ChannelEnum,
1924
1936
  ChatCompletionMessageSchema,
@@ -1938,6 +1950,7 @@ export {
1938
1950
  CheckAvailabilitySchema,
1939
1951
  ChildTaskFormDataSchema,
1940
1952
  CloneWorkflowSchema,
1953
+ ContributorChatParticipantSchema,
1941
1954
  CreateAccountSchema,
1942
1955
  CreateCalendarEventSchema,
1943
1956
  CreateCalendarSchema,
@@ -2093,7 +2106,6 @@ export {
2093
2106
  MilestoneFormDataSchema,
2094
2107
  MilestoneGoalFormDataSchema,
2095
2108
  MissingMembershipItemSchema,
2096
- OperatorChatParticipantSchema,
2097
2109
  OrganizationSchema,
2098
2110
  PhoneNumberFormDataSchema,
2099
2111
  RateLimitAllowlistEntrySchema,
@@ -2113,6 +2125,7 @@ export {
2113
2125
  SiteFormDataSchema,
2114
2126
  SitePageFormDataSchema,
2115
2127
  StartSiteCrawlSchema,
2128
+ SupervisorChatParticipantSchema,
2116
2129
  TaskExportDataTypeRelationSchema,
2117
2130
  TaskFormDataSchema,
2118
2131
  TextContentSchema,