@kl1/contracts 1.2.43-uat → 1.2.44-uat

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.mjs CHANGED
@@ -504,6 +504,12 @@ import z25 from "zod";
504
504
  // src/chat/schema.ts
505
505
  import z18 from "zod";
506
506
 
507
+ // src/facebook-feed/schema.ts
508
+ import z16 from "zod";
509
+
510
+ // src/user/schema.ts
511
+ import z15 from "zod";
512
+
507
513
  // src/role/schema.ts
508
514
  import z14 from "zod";
509
515
 
@@ -538,7 +544,6 @@ var RoleUserSchema = z14.object({
538
544
  var RoleUserCountSchema = z14.array(RoleUserSchema);
539
545
 
540
546
  // src/user/schema.ts
541
- import z15 from "zod";
542
547
  var UserSchema = z15.object({
543
548
  id: z15.string().uuid(),
544
549
  createdAt: z15.date(),
@@ -567,30 +572,29 @@ var UserSchema = z15.object({
567
572
  })
568
573
  });
569
574
 
570
- // src/workflow-rule/schema.ts
571
- import z16 from "zod";
572
- var WorkflowRuleSchema = DefaultEntitySchema.extend({
573
- name: z16.string(),
574
- isActive: z16.boolean(),
575
- type: z16.string()
576
- });
577
-
578
575
  // src/facebook-feed/schema.ts
579
- import z17 from "zod";
580
576
  var FeedPostSchema = DefaultEntitySchema.extend({
581
- message: z17.string().nullable(),
582
- type: z17.union([FeedPostTypeSchema, MessageTypeSchema]),
583
- metadata: z17.any(),
584
- platformId: z17.string(),
585
- platformMessageId: z17.string(),
586
- postCreatedAt: z17.date(),
587
- postUpdatedAt: z17.date(),
588
- socialPlatformId: z17.string(),
589
- template: z17.any(),
577
+ message: z16.string().nullable(),
578
+ type: z16.union([FeedPostTypeSchema, MessageTypeSchema]),
579
+ metadata: z16.any(),
580
+ platformId: z16.string(),
581
+ platformMessageId: z16.string(),
582
+ postCreatedAt: z16.date(),
583
+ postUpdatedAt: z16.date(),
584
+ socialPlatformId: z16.string(),
585
+ template: z16.any(),
590
586
  channel: ChannelSchema,
591
587
  platformContact: PlatformContactSchema,
592
588
  actor: UserSchema,
593
- permalinkURL: z17.string()
589
+ permalinkURL: z16.string()
590
+ });
591
+
592
+ // src/workflow-rule/schema.ts
593
+ import z17 from "zod";
594
+ var WorkflowRuleSchema = DefaultEntitySchema.extend({
595
+ name: z17.string(),
596
+ isActive: z17.boolean(),
597
+ type: z17.string()
594
598
  });
595
599
 
596
600
  // src/chat/schema.ts
@@ -599,6 +603,7 @@ var MessageDirectionTypeSchema = z18.enum([
599
603
  "outgoing",
600
604
  "system"
601
605
  ]);
606
+ var WorkflowAutoReplyMessageTypeSchema = z18.enum(["text", "image"]).default("text");
602
607
  var MessageTypeSchema = z18.enum([
603
608
  "text",
604
609
  "image",
@@ -1596,6 +1601,48 @@ var smsContract = initContract().router({
1596
1601
  500: DefaultErrorResponseSchema
1597
1602
  }
1598
1603
  },
1604
+ disconnectSMSChannel: {
1605
+ method: "POST",
1606
+ path: "/disconnect",
1607
+ body: ChannelSchema.partial(),
1608
+ responses: {
1609
+ 200: DefaultSuccessResponseSchema.extend({
1610
+ channel: ChannelSchema
1611
+ }),
1612
+ 400: DefaultErrorResponseSchema,
1613
+ 500: DefaultErrorResponseSchema
1614
+ }
1615
+ },
1616
+ reconnectSMSChannel: {
1617
+ method: "POST",
1618
+ path: "/reconnect/:channelId",
1619
+ pathParams: z27.object({
1620
+ channelId: z27.string().uuid()
1621
+ }),
1622
+ body: null,
1623
+ responses: {
1624
+ 200: DefaultSuccessResponseSchema.extend({
1625
+ channel: ChannelSchema
1626
+ }),
1627
+ 400: DefaultErrorResponseSchema,
1628
+ 500: DefaultErrorResponseSchema
1629
+ }
1630
+ },
1631
+ deleteSMSChannel: {
1632
+ method: "DELETE",
1633
+ path: "/delete/:channelId",
1634
+ pathParams: z27.object({
1635
+ channelId: z27.string().uuid()
1636
+ }),
1637
+ body: null,
1638
+ responses: {
1639
+ 200: DefaultSuccessResponseSchema.extend({
1640
+ channel: ChannelSchema
1641
+ }),
1642
+ 400: DefaultErrorResponseSchema,
1643
+ 500: DefaultErrorResponseSchema
1644
+ }
1645
+ },
1599
1646
  sendMessage: {
1600
1647
  method: "POST",
1601
1648
  path: "/message",
@@ -8120,6 +8167,24 @@ var chatContract = initContract39().router(
8120
8167
  },
8121
8168
  summary: "Update room assignee"
8122
8169
  },
8170
+ autoReply: {
8171
+ method: "POST",
8172
+ path: "/message/send",
8173
+ body: z111.object({
8174
+ roomId: z111.string().uuid(),
8175
+ message: z111.string(),
8176
+ messageType: WorkflowAutoReplyMessageTypeSchema
8177
+ // workflowId: z.string().uuid(),
8178
+ }),
8179
+ responses: {
8180
+ 200: DefaultSuccessResponseSchema.extend({
8181
+ data: MessageSchema
8182
+ }),
8183
+ 403: DefaultErrorResponseSchema
8184
+ // 404
8185
+ },
8186
+ summary: "send auto reply message"
8187
+ },
8123
8188
  solveRoom: {
8124
8189
  method: "POST",
8125
8190
  path: "/room/solve",