@kl1/contracts 1.3.24 → 1.3.25

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
@@ -634,8 +634,6 @@ var messageTypes = [
634
634
  z18.literal("text_with_image"),
635
635
  z18.literal("reaction"),
636
636
  z18.literal("contacts"),
637
- // messenger referral
638
- z18.literal("referral"),
639
637
  // system
640
638
  z18.literal("csat"),
641
639
  z18.literal("assign"),
@@ -4073,7 +4071,17 @@ var GetAllCxLogQueryParamsSchema = DefaultQueryParamsSchema.extend({
4073
4071
  channelIds: z51.array(z51.string().uuid()),
4074
4072
  trunks: z51.array(z51.string()),
4075
4073
  queueId: z51.array(z51.string()),
4076
- agentIds: z51.array(z51.string()),
4074
+ agentIds: z51.union([
4075
+ z51.array(z51.string()),
4076
+ // If it's an array
4077
+ z51.record(z51.string())
4078
+ // If it's an object
4079
+ ]).transform((val) => {
4080
+ if (Array.isArray(val)) {
4081
+ return val;
4082
+ }
4083
+ return Object.values(val);
4084
+ }),
4077
4085
  direction: z51.array(z51.union([z51.literal("inbound"), z51.literal("outbound")])),
4078
4086
  disposition: z51.array(z51.string()),
4079
4087
  sentimentScore: z51.array(sentimentScoreSchema),
@@ -7094,6 +7102,34 @@ var widgetContract = initContract29().router(
7094
7102
  },
7095
7103
  summary: "Get contact widgets"
7096
7104
  },
7105
+ getContactProfileWidgets: {
7106
+ method: "GET",
7107
+ path: "/contact_profile",
7108
+ headers: DefaultHeaderSchema,
7109
+ responses: {
7110
+ 200: z88.array(WidgetSchema),
7111
+ 400: z88.object({
7112
+ message: z88.string()
7113
+ }),
7114
+ 401: DefaultUnauthorizedSchema,
7115
+ 500: DefaultErrorResponseSchema
7116
+ },
7117
+ summary: "Get contact profile widgets"
7118
+ },
7119
+ getInboxDetailWidgets: {
7120
+ method: "GET",
7121
+ path: "/inbox_detail",
7122
+ headers: DefaultHeaderSchema,
7123
+ responses: {
7124
+ 200: z88.array(WidgetSchema),
7125
+ 400: z88.object({
7126
+ message: z88.string()
7127
+ }),
7128
+ 401: DefaultUnauthorizedSchema,
7129
+ 500: DefaultErrorResponseSchema
7130
+ },
7131
+ summary: "Get inbox detail widgets"
7132
+ },
7097
7133
  getWidgetById: {
7098
7134
  method: "GET",
7099
7135
  path: "/:id",
@@ -7116,7 +7152,11 @@ var widgetContract = initContract29().router(
7116
7152
  headers: DefaultHeaderSchema,
7117
7153
  responses: {
7118
7154
  201: DefaultSuccessResponseSchema.extend({
7119
- url: z88.string()
7155
+ widget: z88.object({
7156
+ token: z88.string().nullable(),
7157
+ headers: z88.array(WidgetHeaderSchema),
7158
+ url: z88.string()
7159
+ })
7120
7160
  }),
7121
7161
  400: z88.object({
7122
7162
  message: z88.string()