@kl1/contracts 1.4.44 → 1.4.46

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/index.mjs CHANGED
@@ -621,7 +621,7 @@ var MessageDirectionTypeSchema = z18.union([
621
621
  z18.literal("outgoing"),
622
622
  z18.literal("system")
623
623
  ]);
624
- var WorkflowAutoReplyMessageTypeSchema = z18.enum(["text", "image"]).default("text");
624
+ var WorkflowAutoReplyMessageTypeSchema = z18.enum(["text", "image", "typing_on"]).default("text");
625
625
  var messageTypes = [
626
626
  z18.literal("text"),
627
627
  z18.literal("image"),
@@ -633,6 +633,7 @@ var messageTypes = [
633
633
  z18.literal("fallback"),
634
634
  z18.literal("location"),
635
635
  z18.literal("sticker"),
636
+ z18.literal("typing_on"),
636
637
  // botpress specific
637
638
  z18.literal("carousel"),
638
639
  z18.literal("card"),
@@ -6019,7 +6020,8 @@ var GetAllTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
6019
6020
  agentIds: z75.array(z75.string().uuid()).optional(),
6020
6021
  agentCallsOnly: z75.coerce.boolean().optional(),
6021
6022
  contactId: z75.string().uuid().optional(),
6022
- recordingsOnly: z75.boolean().optional()
6023
+ recordingsOnly: z75.boolean().optional(),
6024
+ tagIds: z75.array(z75.string().uuid()).optional()
6023
6025
  });
6024
6026
  var GetRecentTelephonyCdrSchema = DefaultQueryParamsSchema.extend({
6025
6027
  type: z75.array(z75.string()).optional(),
@@ -8829,16 +8831,17 @@ var chatContract = initContract39().router(
8829
8831
  path: "/message/send",
8830
8832
  body: z110.object({
8831
8833
  roomId: z110.string().uuid(),
8832
- message: z110.string(),
8834
+ message: z110.string().optional(),
8833
8835
  messageType: WorkflowAutoReplyMessageTypeSchema
8834
- // workflowId: z.string().uuid(),
8835
- }),
8836
+ }).refine(
8837
+ (data) => data.messageType === "typing_on" || data.message !== void 0,
8838
+ { message: "Message is required.'" }
8839
+ ),
8836
8840
  responses: {
8837
8841
  200: DefaultSuccessResponseSchema.extend({
8838
8842
  data: MessageSchema
8839
8843
  }),
8840
8844
  403: DefaultErrorResponseSchema
8841
- // 404
8842
8845
  },
8843
8846
  summary: "send auto reply message"
8844
8847
  },