@kl1/contracts 1.3.23 → 1.3.25

Sign up to get free protection for your applications and to get access to all the features.
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),
@@ -4930,7 +4938,10 @@ var dashboardContract = initContract13().router(
4930
4938
  day: z56.date(),
4931
4939
  userCheckInLog: UserCheckInLogSchema
4932
4940
  })
4933
- )
4941
+ ),
4942
+ page: z56.coerce.number().positive(),
4943
+ pageSize: z56.coerce.number().positive(),
4944
+ total: z56.coerce.number().positive()
4934
4945
  })
4935
4946
  }
4936
4947
  },
@@ -7091,6 +7102,34 @@ var widgetContract = initContract29().router(
7091
7102
  },
7092
7103
  summary: "Get contact widgets"
7093
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
+ },
7094
7133
  getWidgetById: {
7095
7134
  method: "GET",
7096
7135
  path: "/:id",
@@ -7113,7 +7152,11 @@ var widgetContract = initContract29().router(
7113
7152
  headers: DefaultHeaderSchema,
7114
7153
  responses: {
7115
7154
  201: DefaultSuccessResponseSchema.extend({
7116
- url: z88.string()
7155
+ widget: z88.object({
7156
+ token: z88.string().nullable(),
7157
+ headers: z88.array(WidgetHeaderSchema),
7158
+ url: z88.string()
7159
+ })
7117
7160
  }),
7118
7161
  400: z88.object({
7119
7162
  message: z88.string()