@kl1/contracts 1.2.30-uat → 1.2.32-uat

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.
@@ -2014,7 +2014,7 @@ export declare const chatContract: {
2014
2014
  integrationId: string;
2015
2015
  } | null;
2016
2016
  }>;
2017
- cxlog: z.ZodOptional<z.ZodNullable<z.ZodObject<{
2017
+ cxlog: z.ZodObject<{
2018
2018
  id: z.ZodString;
2019
2019
  createdAt: z.ZodDate;
2020
2020
  updatedAt: z.ZodDate;
@@ -2529,7 +2529,7 @@ export declare const chatContract: {
2529
2529
  deletedAt: Date | null;
2530
2530
  } | null | undefined;
2531
2531
  }[] | null | undefined;
2532
- }>>>;
2532
+ }>;
2533
2533
  workflowRule: z.ZodObject<{
2534
2534
  id: z.ZodString;
2535
2535
  createdAt: z.ZodDate;
@@ -2878,16 +2878,7 @@ export declare const chatContract: {
2878
2878
  closedAt: Date;
2879
2879
  lastMessageAt: Date | null;
2880
2880
  isBotRoom: boolean;
2881
- workflowRule: {
2882
- type: string;
2883
- id: string;
2884
- name: string;
2885
- createdAt: Date;
2886
- updatedAt: Date;
2887
- deletedAt: Date | null;
2888
- isActive: boolean;
2889
- };
2890
- cxlog?: {
2881
+ cxlog: {
2891
2882
  id: string;
2892
2883
  channel: string | null;
2893
2884
  direction: string | null;
@@ -2972,7 +2963,16 @@ export declare const chatContract: {
2972
2963
  deletedAt: Date | null;
2973
2964
  } | null | undefined;
2974
2965
  }[] | null | undefined;
2975
- } | null | undefined;
2966
+ };
2967
+ workflowRule: {
2968
+ type: string;
2969
+ id: string;
2970
+ name: string;
2971
+ createdAt: Date;
2972
+ updatedAt: Date;
2973
+ deletedAt: Date | null;
2974
+ isActive: boolean;
2975
+ };
2976
2976
  automationQueueId?: string | null | undefined;
2977
2977
  }, {
2978
2978
  id: string;
@@ -3296,16 +3296,7 @@ export declare const chatContract: {
3296
3296
  closedAt: Date;
3297
3297
  lastMessageAt: Date | null;
3298
3298
  isBotRoom: boolean;
3299
- workflowRule: {
3300
- type: string;
3301
- id: string;
3302
- name: string;
3303
- createdAt: Date;
3304
- updatedAt: Date;
3305
- deletedAt: Date | null;
3306
- isActive: boolean;
3307
- };
3308
- cxlog?: {
3299
+ cxlog: {
3309
3300
  id: string;
3310
3301
  channel: string | null;
3311
3302
  direction: string | null;
@@ -3390,7 +3381,16 @@ export declare const chatContract: {
3390
3381
  deletedAt: Date | null;
3391
3382
  } | null | undefined;
3392
3383
  }[] | null | undefined;
3393
- } | null | undefined;
3384
+ };
3385
+ workflowRule: {
3386
+ type: string;
3387
+ id: string;
3388
+ name: string;
3389
+ createdAt: Date;
3390
+ updatedAt: Date;
3391
+ deletedAt: Date | null;
3392
+ isActive: boolean;
3393
+ };
3394
3394
  automationQueueId?: string | null | undefined;
3395
3395
  }>;
3396
3396
  }, "strip", z.ZodTypeAny, {
@@ -3716,16 +3716,7 @@ export declare const chatContract: {
3716
3716
  closedAt: Date;
3717
3717
  lastMessageAt: Date | null;
3718
3718
  isBotRoom: boolean;
3719
- workflowRule: {
3720
- type: string;
3721
- id: string;
3722
- name: string;
3723
- createdAt: Date;
3724
- updatedAt: Date;
3725
- deletedAt: Date | null;
3726
- isActive: boolean;
3727
- };
3728
- cxlog?: {
3719
+ cxlog: {
3729
3720
  id: string;
3730
3721
  channel: string | null;
3731
3722
  direction: string | null;
@@ -3810,7 +3801,16 @@ export declare const chatContract: {
3810
3801
  deletedAt: Date | null;
3811
3802
  } | null | undefined;
3812
3803
  }[] | null | undefined;
3813
- } | null | undefined;
3804
+ };
3805
+ workflowRule: {
3806
+ type: string;
3807
+ id: string;
3808
+ name: string;
3809
+ createdAt: Date;
3810
+ updatedAt: Date;
3811
+ deletedAt: Date | null;
3812
+ isActive: boolean;
3813
+ };
3814
3814
  automationQueueId?: string | null | undefined;
3815
3815
  };
3816
3816
  requestId: string;
@@ -4137,16 +4137,7 @@ export declare const chatContract: {
4137
4137
  closedAt: Date;
4138
4138
  lastMessageAt: Date | null;
4139
4139
  isBotRoom: boolean;
4140
- workflowRule: {
4141
- type: string;
4142
- id: string;
4143
- name: string;
4144
- createdAt: Date;
4145
- updatedAt: Date;
4146
- deletedAt: Date | null;
4147
- isActive: boolean;
4148
- };
4149
- cxlog?: {
4140
+ cxlog: {
4150
4141
  id: string;
4151
4142
  channel: string | null;
4152
4143
  direction: string | null;
@@ -4231,7 +4222,16 @@ export declare const chatContract: {
4231
4222
  deletedAt: Date | null;
4232
4223
  } | null | undefined;
4233
4224
  }[] | null | undefined;
4234
- } | null | undefined;
4225
+ };
4226
+ workflowRule: {
4227
+ type: string;
4228
+ id: string;
4229
+ name: string;
4230
+ createdAt: Date;
4231
+ updatedAt: Date;
4232
+ deletedAt: Date | null;
4233
+ isActive: boolean;
4234
+ };
4235
4235
  automationQueueId?: string | null | undefined;
4236
4236
  };
4237
4237
  requestId: string;
@@ -6270,7 +6270,7 @@ export declare const chatContract: {
6270
6270
  closedAt: z.ZodDate;
6271
6271
  lastMessageAt: z.ZodNullable<z.ZodDate>;
6272
6272
  isBotRoom: z.ZodBoolean;
6273
- cxlog: z.ZodOptional<z.ZodNullable<z.ZodObject<{
6273
+ cxlog: z.ZodObject<{
6274
6274
  id: z.ZodString;
6275
6275
  createdAt: z.ZodDate;
6276
6276
  updatedAt: z.ZodDate;
@@ -6785,7 +6785,7 @@ export declare const chatContract: {
6785
6785
  deletedAt: Date | null;
6786
6786
  } | null | undefined;
6787
6787
  }[] | null | undefined;
6788
- }>>>;
6788
+ }>;
6789
6789
  workflowRule: z.ZodObject<{
6790
6790
  id: z.ZodString;
6791
6791
  createdAt: z.ZodDate;
@@ -7135,17 +7135,7 @@ export declare const chatContract: {
7135
7135
  closedAt: Date;
7136
7136
  lastMessageAt: Date | null;
7137
7137
  isBotRoom: boolean;
7138
- workflowRule: {
7139
- type: string;
7140
- id: string;
7141
- name: string;
7142
- createdAt: Date;
7143
- updatedAt: Date;
7144
- deletedAt: Date | null;
7145
- isActive: boolean;
7146
- };
7147
- solveMessage: string;
7148
- cxlog?: {
7138
+ cxlog: {
7149
7139
  id: string;
7150
7140
  channel: string | null;
7151
7141
  direction: string | null;
@@ -7230,7 +7220,17 @@ export declare const chatContract: {
7230
7220
  deletedAt: Date | null;
7231
7221
  } | null | undefined;
7232
7222
  }[] | null | undefined;
7233
- } | null | undefined;
7223
+ };
7224
+ workflowRule: {
7225
+ type: string;
7226
+ id: string;
7227
+ name: string;
7228
+ createdAt: Date;
7229
+ updatedAt: Date;
7230
+ deletedAt: Date | null;
7231
+ isActive: boolean;
7232
+ };
7233
+ solveMessage: string;
7234
7234
  automationQueueId?: string | null | undefined;
7235
7235
  }, {
7236
7236
  id: string;
@@ -7554,17 +7554,7 @@ export declare const chatContract: {
7554
7554
  closedAt: Date;
7555
7555
  lastMessageAt: Date | null;
7556
7556
  isBotRoom: boolean;
7557
- workflowRule: {
7558
- type: string;
7559
- id: string;
7560
- name: string;
7561
- createdAt: Date;
7562
- updatedAt: Date;
7563
- deletedAt: Date | null;
7564
- isActive: boolean;
7565
- };
7566
- solveMessage: string;
7567
- cxlog?: {
7557
+ cxlog: {
7568
7558
  id: string;
7569
7559
  channel: string | null;
7570
7560
  direction: string | null;
@@ -7649,7 +7639,17 @@ export declare const chatContract: {
7649
7639
  deletedAt: Date | null;
7650
7640
  } | null | undefined;
7651
7641
  }[] | null | undefined;
7652
- } | null | undefined;
7642
+ };
7643
+ workflowRule: {
7644
+ type: string;
7645
+ id: string;
7646
+ name: string;
7647
+ createdAt: Date;
7648
+ updatedAt: Date;
7649
+ deletedAt: Date | null;
7650
+ isActive: boolean;
7651
+ };
7652
+ solveMessage: string;
7653
7653
  automationQueueId?: string | null | undefined;
7654
7654
  }>;
7655
7655
  }, "strip", z.ZodTypeAny, {
@@ -7975,17 +7975,7 @@ export declare const chatContract: {
7975
7975
  closedAt: Date;
7976
7976
  lastMessageAt: Date | null;
7977
7977
  isBotRoom: boolean;
7978
- workflowRule: {
7979
- type: string;
7980
- id: string;
7981
- name: string;
7982
- createdAt: Date;
7983
- updatedAt: Date;
7984
- deletedAt: Date | null;
7985
- isActive: boolean;
7986
- };
7987
- solveMessage: string;
7988
- cxlog?: {
7978
+ cxlog: {
7989
7979
  id: string;
7990
7980
  channel: string | null;
7991
7981
  direction: string | null;
@@ -8070,7 +8060,17 @@ export declare const chatContract: {
8070
8060
  deletedAt: Date | null;
8071
8061
  } | null | undefined;
8072
8062
  }[] | null | undefined;
8073
- } | null | undefined;
8063
+ };
8064
+ workflowRule: {
8065
+ type: string;
8066
+ id: string;
8067
+ name: string;
8068
+ createdAt: Date;
8069
+ updatedAt: Date;
8070
+ deletedAt: Date | null;
8071
+ isActive: boolean;
8072
+ };
8073
+ solveMessage: string;
8074
8074
  automationQueueId?: string | null | undefined;
8075
8075
  };
8076
8076
  requestId: string;
@@ -8397,17 +8397,7 @@ export declare const chatContract: {
8397
8397
  closedAt: Date;
8398
8398
  lastMessageAt: Date | null;
8399
8399
  isBotRoom: boolean;
8400
- workflowRule: {
8401
- type: string;
8402
- id: string;
8403
- name: string;
8404
- createdAt: Date;
8405
- updatedAt: Date;
8406
- deletedAt: Date | null;
8407
- isActive: boolean;
8408
- };
8409
- solveMessage: string;
8410
- cxlog?: {
8400
+ cxlog: {
8411
8401
  id: string;
8412
8402
  channel: string | null;
8413
8403
  direction: string | null;
@@ -8492,7 +8482,17 @@ export declare const chatContract: {
8492
8482
  deletedAt: Date | null;
8493
8483
  } | null | undefined;
8494
8484
  }[] | null | undefined;
8495
- } | null | undefined;
8485
+ };
8486
+ workflowRule: {
8487
+ type: string;
8488
+ id: string;
8489
+ name: string;
8490
+ createdAt: Date;
8491
+ updatedAt: Date;
8492
+ deletedAt: Date | null;
8493
+ isActive: boolean;
8494
+ };
8495
+ solveMessage: string;
8496
8496
  automationQueueId?: string | null | undefined;
8497
8497
  };
8498
8498
  requestId: string;
package/dist/index.js CHANGED
@@ -53,6 +53,7 @@ __export(src_exports, {
53
53
  contactContract: () => contactContract2,
54
54
  contactLabelSettingContract: () => contactLabelSettingContract,
55
55
  contactSettingContract: () => contactSettingContract,
56
+ cxIntelligenceContract: () => cxIntelligenceContract,
56
57
  cxLogContract: () => cxLogContract,
57
58
  dashboardContract: () => dashboardContract,
58
59
  evaluateFormContract: () => evaluateFormContract,
@@ -84,6 +85,7 @@ __export(src_exports, {
84
85
  publicApiContract: () => publicApiContract2,
85
86
  receiveMessageContract: () => receiveMessageContract,
86
87
  roleSettingContract: () => roleSettingContract,
88
+ settingCxIntelligenceContract: () => settingCxIntelligenceContract,
87
89
  smsSettingContract: () => smsSettingContract,
88
90
  snippetContract: () => snippetContract,
89
91
  snippetSettingContract: () => snippetSettingContract,
@@ -835,7 +837,7 @@ var RoomSchema = DefaultEntitySchema.extend({
835
837
  })
836
838
  }),
837
839
  channel: ChannelSchema,
838
- cxlog: CxLogSchema.nullable().optional(),
840
+ cxlog: CxLogSchema,
839
841
  workflowRule: WorkflowRuleSchema,
840
842
  automationQueueId: import_zod18.default.string().uuid().optional().nullable()
841
843
  });
@@ -10132,6 +10134,53 @@ var subscriptionContract = (0, import_core53.initContract)().router(
10132
10134
  pathPrefix: "subscriptions"
10133
10135
  }
10134
10136
  );
10137
+
10138
+ // src/cx-intelligence/index.ts
10139
+ var import_core54 = require("@ts-rest/core");
10140
+ var import_zod139 = __toESM(require("zod"));
10141
+ var cxIntelligenceContract = (0, import_core54.initContract)().router(
10142
+ {
10143
+ toggle: {
10144
+ method: "POST",
10145
+ path: "/toggle",
10146
+ headers: DefaultHeaderSchema,
10147
+ body: import_zod139.default.object({
10148
+ enabled: import_zod139.default.union([import_zod139.default.literal(true), import_zod139.default.literal(false)])
10149
+ }),
10150
+ responses: {
10151
+ 200: DefaultSuccessResponseSchema.extend({
10152
+ message: import_zod139.default.string()
10153
+ }),
10154
+ 500: DefaultErrorResponseSchema
10155
+ },
10156
+ summary: "Toggle Cx Intelligence"
10157
+ }
10158
+ },
10159
+ { pathPrefix: "cx-intelligence" }
10160
+ );
10161
+ var settingCxIntelligenceContract = (0, import_core54.initContract)().router(
10162
+ {
10163
+ checkStatus: {
10164
+ method: "GET",
10165
+ path: "/status",
10166
+ headers: DefaultHeaderSchema,
10167
+ responses: {
10168
+ 200: DefaultSuccessResponseSchema.extend({
10169
+ message: import_zod139.default.string(),
10170
+ status: import_zod139.default.boolean()
10171
+ }),
10172
+ 422: import_zod139.default.object({
10173
+ requestId: import_zod139.default.string(),
10174
+ message: import_zod139.default.string(),
10175
+ status: import_zod139.default.boolean()
10176
+ }),
10177
+ 500: DefaultErrorResponseSchema
10178
+ },
10179
+ summary: "Check Cx Intelligence status"
10180
+ }
10181
+ },
10182
+ { pathPrefix: "settings/cx-intelligence" }
10183
+ );
10135
10184
  // Annotate the CommonJS export names for ESM import in node:
10136
10185
  0 && (module.exports = {
10137
10186
  activityLogContract,
@@ -10157,6 +10206,7 @@ var subscriptionContract = (0, import_core53.initContract)().router(
10157
10206
  contactContract,
10158
10207
  contactLabelSettingContract,
10159
10208
  contactSettingContract,
10209
+ cxIntelligenceContract,
10160
10210
  cxLogContract,
10161
10211
  dashboardContract,
10162
10212
  evaluateFormContract,
@@ -10188,6 +10238,7 @@ var subscriptionContract = (0, import_core53.initContract)().router(
10188
10238
  publicApiContract,
10189
10239
  receiveMessageContract,
10190
10240
  roleSettingContract,
10241
+ settingCxIntelligenceContract,
10191
10242
  smsSettingContract,
10192
10243
  snippetContract,
10193
10244
  snippetSettingContract,