@gravity-rail/sdk 8.0.0 → 8.1.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.
@@ -1096,8 +1096,8 @@ declare const CallActivityLabelSchema: z.ZodObject<{
1096
1096
  }, z.core.$strict>;
1097
1097
  declare const ChannelEnum: z.ZodEnum<{
1098
1098
  slack: "slack";
1099
- discord: "discord";
1100
1099
  teams: "teams";
1100
+ discord: "discord";
1101
1101
  email: "email";
1102
1102
  cli: "cli";
1103
1103
  frame: "frame";
@@ -1120,8 +1120,8 @@ declare const MessageRoleEnum: z.ZodEnum<{
1120
1120
  tool: "tool";
1121
1121
  }>;
1122
1122
  declare const ChatFilterObjectTypeEnum: z.ZodEnum<{
1123
- channel: "channel";
1124
1123
  paused: "paused";
1124
+ channel: "channel";
1125
1125
  title: "title";
1126
1126
  participant: "participant";
1127
1127
  mode: "mode";
@@ -1146,6 +1146,7 @@ declare const ChatMuteReasonEnum: z.ZodEnum<{
1146
1146
  waiting_on_person: "waiting_on_person";
1147
1147
  resolved_elsewhere: "resolved_elsewhere";
1148
1148
  not_mine: "not_mine";
1149
+ no_response_needed: "no_response_needed";
1149
1150
  }>;
1150
1151
  declare const TruncationReasonEnum: z.ZodEnum<{
1151
1152
  error: "error";
@@ -1358,8 +1359,10 @@ declare const UpdateChatMuteSchema: z.ZodObject<{
1358
1359
  waiting_on_person: "waiting_on_person";
1359
1360
  resolved_elsewhere: "resolved_elsewhere";
1360
1361
  not_mine: "not_mine";
1362
+ no_response_needed: "no_response_needed";
1361
1363
  }>>;
1362
1364
  muteExpiresOnInbound: z.ZodOptional<z.ZodBoolean>;
1365
+ dismissInboundMessageId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1363
1366
  }, z.core.$strip>;
1364
1367
  declare const GetChatsNeedsResponseSchema: z.ZodObject<{
1365
1368
  wid: z.ZodString;
@@ -1422,8 +1425,8 @@ declare const ChatSchema: z.ZodObject<{
1422
1425
  muted: z.ZodBoolean;
1423
1426
  channel: z.ZodEnum<{
1424
1427
  slack: "slack";
1425
- discord: "discord";
1426
1428
  teams: "teams";
1429
+ discord: "discord";
1427
1430
  email: "email";
1428
1431
  cli: "cli";
1429
1432
  frame: "frame";
@@ -1477,8 +1480,8 @@ declare const ChatSchema: z.ZodObject<{
1477
1480
  }, z.core.$strip>;
1478
1481
  declare const ChatFilterRuleSchema: z.ZodObject<{
1479
1482
  objectType: z.ZodEnum<{
1480
- channel: "channel";
1481
1483
  paused: "paused";
1484
+ channel: "channel";
1482
1485
  title: "title";
1483
1486
  participant: "participant";
1484
1487
  mode: "mode";
@@ -1503,8 +1506,8 @@ declare const ChatFilterRuleSchema: z.ZodObject<{
1503
1506
  }, z.core.$strip>;
1504
1507
  declare const ChatFilterRuleFormDataSchema: z.ZodObject<{
1505
1508
  objectType: z.ZodEnum<{
1506
- channel: "channel";
1507
1509
  paused: "paused";
1510
+ channel: "channel";
1508
1511
  title: "title";
1509
1512
  participant: "participant";
1510
1513
  mode: "mode";
@@ -2960,6 +2963,7 @@ declare const PhoneNumberFormDataSchema: z.ZodObject<{
2960
2963
  fax: "fax";
2961
2964
  }>>;
2962
2965
  voiceUnavailableMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2966
+ holdMusicFileId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2963
2967
  providerPhoneUuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2964
2968
  }, z.core.$strip>;
2965
2969
  declare const ListPhoneNumbersSchema: z.ZodObject<{
@@ -2980,6 +2984,7 @@ declare const CreatePhoneNumberSchema: z.ZodObject<{
2980
2984
  fax: "fax";
2981
2985
  }>>;
2982
2986
  voiceUnavailableMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2987
+ holdMusicFileId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2983
2988
  providerPhoneUuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2984
2989
  }, z.core.$strip>;
2985
2990
  declare const UpdatePhoneNumberSchema: z.ZodObject<{
@@ -2994,6 +2999,7 @@ declare const UpdatePhoneNumberSchema: z.ZodObject<{
2994
2999
  fax: "fax";
2995
3000
  }>>>;
2996
3001
  voiceUnavailableMessage: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
3002
+ holdMusicFileId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
2997
3003
  providerPhoneUuid: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2998
3004
  }, z.core.$strip>;
2999
3005
  declare const ArchivePhoneNumberSchema: z.ZodObject<{
package/dist/schemas.d.ts CHANGED
@@ -1096,8 +1096,8 @@ declare const CallActivityLabelSchema: z.ZodObject<{
1096
1096
  }, z.core.$strict>;
1097
1097
  declare const ChannelEnum: z.ZodEnum<{
1098
1098
  slack: "slack";
1099
- discord: "discord";
1100
1099
  teams: "teams";
1100
+ discord: "discord";
1101
1101
  email: "email";
1102
1102
  cli: "cli";
1103
1103
  frame: "frame";
@@ -1120,8 +1120,8 @@ declare const MessageRoleEnum: z.ZodEnum<{
1120
1120
  tool: "tool";
1121
1121
  }>;
1122
1122
  declare const ChatFilterObjectTypeEnum: z.ZodEnum<{
1123
- channel: "channel";
1124
1123
  paused: "paused";
1124
+ channel: "channel";
1125
1125
  title: "title";
1126
1126
  participant: "participant";
1127
1127
  mode: "mode";
@@ -1146,6 +1146,7 @@ declare const ChatMuteReasonEnum: z.ZodEnum<{
1146
1146
  waiting_on_person: "waiting_on_person";
1147
1147
  resolved_elsewhere: "resolved_elsewhere";
1148
1148
  not_mine: "not_mine";
1149
+ no_response_needed: "no_response_needed";
1149
1150
  }>;
1150
1151
  declare const TruncationReasonEnum: z.ZodEnum<{
1151
1152
  error: "error";
@@ -1358,8 +1359,10 @@ declare const UpdateChatMuteSchema: z.ZodObject<{
1358
1359
  waiting_on_person: "waiting_on_person";
1359
1360
  resolved_elsewhere: "resolved_elsewhere";
1360
1361
  not_mine: "not_mine";
1362
+ no_response_needed: "no_response_needed";
1361
1363
  }>>;
1362
1364
  muteExpiresOnInbound: z.ZodOptional<z.ZodBoolean>;
1365
+ dismissInboundMessageId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
1363
1366
  }, z.core.$strip>;
1364
1367
  declare const GetChatsNeedsResponseSchema: z.ZodObject<{
1365
1368
  wid: z.ZodString;
@@ -1422,8 +1425,8 @@ declare const ChatSchema: z.ZodObject<{
1422
1425
  muted: z.ZodBoolean;
1423
1426
  channel: z.ZodEnum<{
1424
1427
  slack: "slack";
1425
- discord: "discord";
1426
1428
  teams: "teams";
1429
+ discord: "discord";
1427
1430
  email: "email";
1428
1431
  cli: "cli";
1429
1432
  frame: "frame";
@@ -1477,8 +1480,8 @@ declare const ChatSchema: z.ZodObject<{
1477
1480
  }, z.core.$strip>;
1478
1481
  declare const ChatFilterRuleSchema: z.ZodObject<{
1479
1482
  objectType: z.ZodEnum<{
1480
- channel: "channel";
1481
1483
  paused: "paused";
1484
+ channel: "channel";
1482
1485
  title: "title";
1483
1486
  participant: "participant";
1484
1487
  mode: "mode";
@@ -1503,8 +1506,8 @@ declare const ChatFilterRuleSchema: z.ZodObject<{
1503
1506
  }, z.core.$strip>;
1504
1507
  declare const ChatFilterRuleFormDataSchema: z.ZodObject<{
1505
1508
  objectType: z.ZodEnum<{
1506
- channel: "channel";
1507
1509
  paused: "paused";
1510
+ channel: "channel";
1508
1511
  title: "title";
1509
1512
  participant: "participant";
1510
1513
  mode: "mode";
@@ -2960,6 +2963,7 @@ declare const PhoneNumberFormDataSchema: z.ZodObject<{
2960
2963
  fax: "fax";
2961
2964
  }>>;
2962
2965
  voiceUnavailableMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2966
+ holdMusicFileId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2963
2967
  providerPhoneUuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2964
2968
  }, z.core.$strip>;
2965
2969
  declare const ListPhoneNumbersSchema: z.ZodObject<{
@@ -2980,6 +2984,7 @@ declare const CreatePhoneNumberSchema: z.ZodObject<{
2980
2984
  fax: "fax";
2981
2985
  }>>;
2982
2986
  voiceUnavailableMessage: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2987
+ holdMusicFileId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
2983
2988
  providerPhoneUuid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2984
2989
  }, z.core.$strip>;
2985
2990
  declare const UpdatePhoneNumberSchema: z.ZodObject<{
@@ -2994,6 +2999,7 @@ declare const UpdatePhoneNumberSchema: z.ZodObject<{
2994
2999
  fax: "fax";
2995
3000
  }>>>;
2996
3001
  voiceUnavailableMessage: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
3002
+ holdMusicFileId: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodNumber>>>;
2997
3003
  providerPhoneUuid: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodString>>>;
2998
3004
  }, z.core.$strip>;
2999
3005
  declare const ArchivePhoneNumberSchema: z.ZodObject<{
package/dist/schemas.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  DataTypeRecordScope,
13
13
  IndexStatus,
14
14
  ResponseLength
15
- } from "./chunk-RKIR4UNS.js";
15
+ } from "./chunk-IIIRXFKG.js";
16
16
 
17
17
  // src/schemas/accounts.ts
18
18
  import { z } from "zod";
@@ -561,7 +561,8 @@ var ChatMuteReasonEnum = z4.enum([
561
561
  "working",
562
562
  "waiting_on_person",
563
563
  "resolved_elsewhere",
564
- "not_mine"
564
+ "not_mine",
565
+ "no_response_needed"
565
566
  ]);
566
567
  var TruncationReasonEnum = z4.enum([
567
568
  "barge_in",
@@ -708,7 +709,8 @@ var UpdateChatMuteSchema = WorkspaceIdSchema.extend({
708
709
  muteReason: ChatMuteReasonEnum.optional().describe(
709
710
  "Why the chat is muted (required when muting)"
710
711
  ),
711
- muteExpiresOnInbound: z4.boolean().optional().describe("Lapse the mute when the member sends a new inbound message")
712
+ muteExpiresOnInbound: z4.boolean().optional().describe("Lapse the mute when the member sends a new inbound message"),
713
+ dismissInboundMessageId: z4.number().int().positive().nullish()
712
714
  // Runtime mirror of the backend request model's validator
713
715
  // (`UpdateChatMuteRequest._muting_requires_reason`): muting without a
714
716
  // reason is a 422 at the API, so it is a parse failure here — a bare
@@ -718,7 +720,21 @@ var UpdateChatMuteSchema = WorkspaceIdSchema.extend({
718
720
  ctx.addIssue({
719
721
  code: z4.ZodIssueCode.custom,
720
722
  path: ["muteReason"],
721
- message: "Muting a chat requires a muteReason from the closed vocabulary: working, waiting_on_person, resolved_elsewhere, not_mine."
723
+ message: "Muting a chat requires a muteReason from the closed vocabulary: working, waiting_on_person, resolved_elsewhere, not_mine, no_response_needed."
724
+ });
725
+ }
726
+ if (data.muted && data.muteReason === "no_response_needed" && data.muteExpiresOnInbound === false) {
727
+ ctx.addIssue({
728
+ code: z4.ZodIssueCode.custom,
729
+ path: ["muteExpiresOnInbound"],
730
+ message: "Dismissing a response must expire on the next inbound."
731
+ });
732
+ }
733
+ if (data.muted && data.muteReason === "no_response_needed" && !data.dismissInboundMessageId) {
734
+ ctx.addIssue({
735
+ code: z4.ZodIssueCode.custom,
736
+ path: ["dismissInboundMessageId"],
737
+ message: "Dismissing a response requires the observed inbound message ID."
722
738
  });
723
739
  }
724
740
  });
@@ -1739,6 +1755,7 @@ var PhoneNumberFormDataSchema = z9.object({
1739
1755
  // Device mode only. Routing Rules own inbound destinations.
1740
1756
  inboundCallHandling: z9.enum(["agent", "fax"]).optional(),
1741
1757
  voiceUnavailableMessage: z9.string().nullable().optional(),
1758
+ holdMusicFileId: z9.number().int().positive().nullable().optional(),
1742
1759
  providerPhoneUuid: z9.string().nullable().optional()
1743
1760
  });
1744
1761
  var ListPhoneNumbersSchema = WorkspaceIdSchema;