@kl1/contracts 1.4.40 → 1.4.41

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
@@ -3219,10 +3219,13 @@ var CreateCommentSchema = z43.object({
3219
3219
  comment: z43.string(),
3220
3220
  mentions: z43.array(z43.string()).optional()
3221
3221
  });
3222
- var UpdateCommentSchema = CreateCommentSchema;
3222
+ var UpdateCommentSchema = z43.object({
3223
+ comment: z43.string(),
3224
+ mentions: z43.array(z43.string()).optional()
3225
+ });
3223
3226
  var GetCommentQuerySchema = z43.object({
3224
3227
  ticketId: z43.string().optional(),
3225
- deleted: z43.enum(["true", "false"]).default("false").transform((v) => v === "true" ? true : false)
3228
+ withDeleted: z43.enum(["true", "false"])
3226
3229
  }).optional();
3227
3230
 
3228
3231
  // src/comment/schema.ts
@@ -3326,7 +3329,7 @@ var commentContract = initContract9().router(
3326
3329
  headers: DefaultHeaderSchema,
3327
3330
  query: GetCommentQuerySchema,
3328
3331
  responses: {
3329
- 201: z46.array(CommentSchema),
3332
+ 200: z46.array(CommentSchema),
3330
3333
  400: z46.object({
3331
3334
  message: z46.string()
3332
3335
  }),
@@ -3362,7 +3365,7 @@ var commentContract = initContract9().router(
3362
3365
  summary: "Delete a comment."
3363
3366
  }
3364
3367
  },
3365
- { pathPrefix: "ts/comment" }
3368
+ { pathPrefix: "tcs/api/v1/comment" }
3366
3369
  );
3367
3370
 
3368
3371
  // src/company/index.ts
@@ -6497,7 +6500,7 @@ var ticketContract = initContract26().router(
6497
6500
  },
6498
6501
  getTicketById: {
6499
6502
  method: "GET",
6500
- path: "ts/ticket/:id",
6503
+ path: "tcs/api/v1/ticket/:id",
6501
6504
  pathParams: z81.object({ id: z81.string() }),
6502
6505
  headers: DefaultHeaderSchema,
6503
6506
  responses: {
@@ -6514,7 +6517,7 @@ var ticketContract = initContract26().router(
6514
6517
  },
6515
6518
  getTicketByContactId: {
6516
6519
  method: "GET",
6517
- path: "ts/ticket/contact/:id",
6520
+ path: "tcs/api/v1/ticket/contact/:id",
6518
6521
  pathParams: z81.object({ id: z81.string() }),
6519
6522
  query: TicketParamsSchema,
6520
6523
  headers: DefaultHeaderSchema,
@@ -6532,12 +6535,12 @@ var ticketContract = initContract26().router(
6532
6535
  },
6533
6536
  updateTicket: {
6534
6537
  method: "PATCH",
6535
- path: "ts/ticket/:id",
6538
+ path: "tcs/api/v1/ticket/:id",
6536
6539
  pathParams: z81.object({ id: z81.string() }),
6537
6540
  body: UpdateTicketValidationSchema,
6538
6541
  headers: DefaultHeaderSchema,
6539
6542
  responses: {
6540
- 201: DefaultSuccessResponseSchema.extend({
6543
+ 200: DefaultSuccessResponseSchema.extend({
6541
6544
  data: TicketSchema
6542
6545
  }),
6543
6546
  400: z81.object({
@@ -6557,7 +6560,7 @@ var ticketContract = initContract26().router(
6557
6560
  },
6558
6561
  deleteTicket: {
6559
6562
  method: "DELETE",
6560
- path: "ts/ticket/:id",
6563
+ path: "tcs/api/v1/ticket/:id",
6561
6564
  pathParams: z81.object({ id: z81.string() }),
6562
6565
  headers: DefaultHeaderSchema,
6563
6566
  body: null,
@@ -6568,8 +6571,8 @@ var ticketContract = initContract26().router(
6568
6571
  summary: "Delete a extension."
6569
6572
  },
6570
6573
  updateDescription: {
6571
- method: "PATCH",
6572
- path: "ts/ticket/description/update/:id",
6574
+ method: "PUT",
6575
+ path: "tcs/api/v1/ticket/:id/description",
6573
6576
  pathParams: z81.object({ id: z81.string() }),
6574
6577
  body: z81.object({ description: z81.string() }),
6575
6578
  headers: DefaultHeaderSchema,
@@ -6591,8 +6594,8 @@ var ticketContract = initContract26().router(
6591
6594
  summary: "Update a description from a ticket"
6592
6595
  },
6593
6596
  updateTitle: {
6594
- method: "PATCH",
6595
- path: "ts/ticket/title/update/:id",
6597
+ method: "PUT",
6598
+ path: "tcs/api/v1/ticket/:id/title",
6596
6599
  pathParams: z81.object({ id: z81.string() }),
6597
6600
  body: z81.object({ title: z81.string() }),
6598
6601
  headers: DefaultHeaderSchema,
@@ -6614,8 +6617,8 @@ var ticketContract = initContract26().router(
6614
6617
  summary: "Update a title from a ticket"
6615
6618
  },
6616
6619
  updateType: {
6617
- method: "PATCH",
6618
- path: "ts/ticket/type/update/:id",
6620
+ method: "PUT",
6621
+ path: "tcs/api/v1/ticket/:id/type",
6619
6622
  pathParams: z81.object({ id: z81.string() }),
6620
6623
  body: z81.object({ type: z81.string() }),
6621
6624
  headers: DefaultHeaderSchema,
@@ -6637,8 +6640,8 @@ var ticketContract = initContract26().router(
6637
6640
  summary: "Update a type from a ticket"
6638
6641
  },
6639
6642
  updateStatus: {
6640
- method: "PATCH",
6641
- path: "ts/ticket/status/update/:id",
6643
+ method: "PUT",
6644
+ path: "tcs/api/v1/ticket/:id/status",
6642
6645
  pathParams: z81.object({ id: z81.string() }),
6643
6646
  body: z81.object({ status: z81.string() }),
6644
6647
  headers: DefaultHeaderSchema,
@@ -6660,8 +6663,8 @@ var ticketContract = initContract26().router(
6660
6663
  summary: "Update a status from a ticket"
6661
6664
  },
6662
6665
  updatePriority: {
6663
- method: "PATCH",
6664
- path: "ts/ticket/priority/update/:id",
6666
+ method: "PUT",
6667
+ path: "tcs/api/v1/ticket/:id/priority",
6665
6668
  pathParams: z81.object({ id: z81.string() }),
6666
6669
  body: z81.object({ priority: z81.string() }),
6667
6670
  headers: DefaultHeaderSchema,
@@ -6683,8 +6686,8 @@ var ticketContract = initContract26().router(
6683
6686
  summary: "Update a priority from a ticket"
6684
6687
  },
6685
6688
  updateChannel: {
6686
- method: "PATCH",
6687
- path: "ts/ticket/channel/update/:id",
6689
+ method: "PUT",
6690
+ path: "tcs/api/v1/ticket/:id/channel",
6688
6691
  pathParams: z81.object({ id: z81.string() }),
6689
6692
  body: z81.object({ channel: z81.string() }),
6690
6693
  headers: DefaultHeaderSchema,
@@ -6706,8 +6709,8 @@ var ticketContract = initContract26().router(
6706
6709
  summary: "Update a channel from a ticket"
6707
6710
  },
6708
6711
  updateTags: {
6709
- method: "PATCH",
6710
- path: "ts/ticket/tags/update/:id",
6712
+ method: "PUT",
6713
+ path: "tcs/api/v1/ticket/:id/tags",
6711
6714
  pathParams: z81.object({ id: z81.string() }),
6712
6715
  body: z81.object({ tags: z81.array(z81.string()) }),
6713
6716
  headers: DefaultHeaderSchema,
@@ -6729,11 +6732,10 @@ var ticketContract = initContract26().router(
6729
6732
  summary: "Update a tags from a ticket"
6730
6733
  },
6731
6734
  changeAssignee: {
6732
- method: "PATCH",
6733
- path: "ts/ticket/assignee/update/:id",
6735
+ method: "PUT",
6736
+ path: "tcs/api/v1/ticket/:id/assignee",
6734
6737
  pathParams: z81.object({ id: z81.string() }),
6735
6738
  body: z81.object({
6736
- ticketId: z81.string(),
6737
6739
  assigneeId: z81.string(),
6738
6740
  reason: z81.string().optional()
6739
6741
  }),
@@ -6759,8 +6761,8 @@ var ticketContract = initContract26().router(
6759
6761
  },
6760
6762
  getTicketCountByContact: {
6761
6763
  method: "GET",
6762
- path: "ts/ticket/ticket_count/contact/:id",
6763
- pathParams: z81.object({ id: z81.string() }),
6764
+ path: "tcs/api/v1/ticket/count/contact/:contactId",
6765
+ pathParams: z81.object({ contactId: z81.string() }),
6764
6766
  headers: DefaultHeaderSchema,
6765
6767
  responses: {
6766
6768
  200: DefaultSuccessResponseSchema.extend({
@@ -6816,7 +6818,7 @@ var ticketContract = initContract26().router(
6816
6818
  },
6817
6819
  getTicketReasonRequired: {
6818
6820
  method: "GET",
6819
- path: "ts/ticket/gs/ticket-reason-required",
6821
+ path: "tcs/api/v1/ticket/gs/ticket-reason-required",
6820
6822
  headers: DefaultHeaderSchema,
6821
6823
  responses: {
6822
6824
  200: DefaultSuccessResponseSchema.extend({
@@ -6830,8 +6832,8 @@ var ticketContract = initContract26().router(
6830
6832
  }
6831
6833
  },
6832
6834
  updateTicketReasonRequired: {
6833
- method: "PATCH",
6834
- path: "ts/ticket/gs/ticket-reason-required",
6835
+ method: "PUT",
6836
+ path: "tcs/api/v1/ticket/gs/ticket-reason-required",
6835
6837
  headers: DefaultHeaderSchema,
6836
6838
  body: TicketReasonRequiredSchema,
6837
6839
  responses: {