@unified-api/typescript-sdk 2.9.15 → 2.9.17

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.
Files changed (152) hide show
  1. package/README.md +12 -0
  2. package/docs/sdks/comment/README.md +501 -0
  3. package/docs/sdks/task/README.md +494 -0
  4. package/funcs/commentCreateTaskComment.d.ts +13 -0
  5. package/funcs/commentCreateTaskComment.d.ts.map +1 -0
  6. package/funcs/commentCreateTaskComment.js +103 -0
  7. package/funcs/commentCreateTaskComment.js.map +1 -0
  8. package/funcs/commentGetTaskComment.d.ts +13 -0
  9. package/funcs/commentGetTaskComment.d.ts.map +1 -0
  10. package/funcs/commentGetTaskComment.js +106 -0
  11. package/funcs/commentGetTaskComment.js.map +1 -0
  12. package/funcs/commentListTaskComments.d.ts +13 -0
  13. package/funcs/commentListTaskComments.d.ts.map +1 -0
  14. package/funcs/commentListTaskComments.js +110 -0
  15. package/funcs/commentListTaskComments.js.map +1 -0
  16. package/funcs/commentPatchTaskComment.d.ts +13 -0
  17. package/funcs/commentPatchTaskComment.d.ts.map +1 -0
  18. package/funcs/commentPatchTaskComment.js +107 -0
  19. package/funcs/commentPatchTaskComment.js.map +1 -0
  20. package/funcs/commentRemoveTaskComment.d.ts +12 -0
  21. package/funcs/commentRemoveTaskComment.d.ts.map +1 -0
  22. package/funcs/commentRemoveTaskComment.js +104 -0
  23. package/funcs/commentRemoveTaskComment.js.map +1 -0
  24. package/funcs/commentUpdateTaskComment.d.ts +13 -0
  25. package/funcs/commentUpdateTaskComment.d.ts.map +1 -0
  26. package/funcs/commentUpdateTaskComment.js +107 -0
  27. package/funcs/commentUpdateTaskComment.js.map +1 -0
  28. package/funcs/taskCreateTaskComment.d.ts +13 -0
  29. package/funcs/taskCreateTaskComment.d.ts.map +1 -0
  30. package/funcs/taskCreateTaskComment.js +103 -0
  31. package/funcs/taskCreateTaskComment.js.map +1 -0
  32. package/funcs/taskGetTaskComment.d.ts +13 -0
  33. package/funcs/taskGetTaskComment.d.ts.map +1 -0
  34. package/funcs/taskGetTaskComment.js +106 -0
  35. package/funcs/taskGetTaskComment.js.map +1 -0
  36. package/funcs/taskListTaskComments.d.ts +13 -0
  37. package/funcs/taskListTaskComments.d.ts.map +1 -0
  38. package/funcs/taskListTaskComments.js +110 -0
  39. package/funcs/taskListTaskComments.js.map +1 -0
  40. package/funcs/taskPatchTaskComment.d.ts +13 -0
  41. package/funcs/taskPatchTaskComment.d.ts.map +1 -0
  42. package/funcs/taskPatchTaskComment.js +107 -0
  43. package/funcs/taskPatchTaskComment.js.map +1 -0
  44. package/funcs/taskRemoveTaskComment.d.ts +12 -0
  45. package/funcs/taskRemoveTaskComment.d.ts.map +1 -0
  46. package/funcs/taskRemoveTaskComment.js +104 -0
  47. package/funcs/taskRemoveTaskComment.js.map +1 -0
  48. package/funcs/taskUpdateTaskComment.d.ts +13 -0
  49. package/funcs/taskUpdateTaskComment.d.ts.map +1 -0
  50. package/funcs/taskUpdateTaskComment.js +107 -0
  51. package/funcs/taskUpdateTaskComment.js.map +1 -0
  52. package/lib/config.d.ts +3 -3
  53. package/lib/config.js +3 -3
  54. package/package.json +1 -1
  55. package/sdk/comment.d.ts +30 -0
  56. package/sdk/comment.d.ts.map +1 -0
  57. package/sdk/comment.js +54 -0
  58. package/sdk/comment.js.map +1 -0
  59. package/sdk/models/operations/createtaskcomment.d.ts +40 -0
  60. package/sdk/models/operations/createtaskcomment.d.ts.map +1 -0
  61. package/sdk/models/operations/createtaskcomment.js +75 -0
  62. package/sdk/models/operations/createtaskcomment.js.map +1 -0
  63. package/sdk/models/operations/gettaskcomment.d.ts +42 -0
  64. package/sdk/models/operations/gettaskcomment.d.ts.map +1 -0
  65. package/sdk/models/operations/gettaskcomment.js +72 -0
  66. package/sdk/models/operations/gettaskcomment.js.map +1 -0
  67. package/sdk/models/operations/getunifiedintegrationauth.d.ts +6 -0
  68. package/sdk/models/operations/getunifiedintegrationauth.d.ts.map +1 -1
  69. package/sdk/models/operations/getunifiedintegrationauth.js +2 -0
  70. package/sdk/models/operations/getunifiedintegrationauth.js.map +1 -1
  71. package/sdk/models/operations/index.d.ts +6 -0
  72. package/sdk/models/operations/index.d.ts.map +1 -1
  73. package/sdk/models/operations/index.js +6 -0
  74. package/sdk/models/operations/index.js.map +1 -1
  75. package/sdk/models/operations/listtaskcomments.d.ts +57 -0
  76. package/sdk/models/operations/listtaskcomments.d.ts.map +1 -0
  77. package/sdk/models/operations/listtaskcomments.js +89 -0
  78. package/sdk/models/operations/listtaskcomments.js.map +1 -0
  79. package/sdk/models/operations/patchtaskcomment.d.ts +45 -0
  80. package/sdk/models/operations/patchtaskcomment.d.ts.map +1 -0
  81. package/sdk/models/operations/patchtaskcomment.js +77 -0
  82. package/sdk/models/operations/patchtaskcomment.js.map +1 -0
  83. package/sdk/models/operations/removetaskcomment.d.ts +66 -0
  84. package/sdk/models/operations/removetaskcomment.d.ts.map +1 -0
  85. package/sdk/models/operations/removetaskcomment.js +105 -0
  86. package/sdk/models/operations/removetaskcomment.js.map +1 -0
  87. package/sdk/models/operations/updatetaskcomment.d.ts +45 -0
  88. package/sdk/models/operations/updatetaskcomment.d.ts.map +1 -0
  89. package/sdk/models/operations/updatetaskcomment.js +77 -0
  90. package/sdk/models/operations/updatetaskcomment.js.map +1 -0
  91. package/sdk/models/shared/index.d.ts +1 -0
  92. package/sdk/models/shared/index.d.ts.map +1 -1
  93. package/sdk/models/shared/index.js +1 -0
  94. package/sdk/models/shared/index.js.map +1 -1
  95. package/sdk/models/shared/kmspage.d.ts +2 -2
  96. package/sdk/models/shared/kmspage.d.ts.map +1 -1
  97. package/sdk/models/shared/kmspage.js +2 -2
  98. package/sdk/models/shared/kmspage.js.map +1 -1
  99. package/sdk/models/shared/propertyconnectionpermissions.d.ts +6 -0
  100. package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  101. package/sdk/models/shared/propertyconnectionpermissions.js +2 -0
  102. package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  103. package/sdk/models/shared/taskcomment.d.ts +47 -0
  104. package/sdk/models/shared/taskcomment.d.ts.map +1 -0
  105. package/sdk/models/shared/taskcomment.js +92 -0
  106. package/sdk/models/shared/taskcomment.js.map +1 -0
  107. package/sdk/models/shared/tasktask.d.ts +5 -0
  108. package/sdk/models/shared/tasktask.d.ts.map +1 -1
  109. package/sdk/models/shared/tasktask.js +4 -0
  110. package/sdk/models/shared/tasktask.js.map +1 -1
  111. package/sdk/models/shared/webhook.d.ts +3 -0
  112. package/sdk/models/shared/webhook.d.ts.map +1 -1
  113. package/sdk/models/shared/webhook.js +1 -0
  114. package/sdk/models/shared/webhook.js.map +1 -1
  115. package/sdk/sdk.d.ts +3 -0
  116. package/sdk/sdk.d.ts.map +1 -1
  117. package/sdk/sdk.js +4 -0
  118. package/sdk/sdk.js.map +1 -1
  119. package/sdk/task.d.ts +24 -0
  120. package/sdk/task.d.ts.map +1 -1
  121. package/sdk/task.js +42 -0
  122. package/sdk/task.js.map +1 -1
  123. package/src/funcs/commentCreateTaskComment.ts +133 -0
  124. package/src/funcs/commentGetTaskComment.ts +136 -0
  125. package/src/funcs/commentListTaskComments.ts +140 -0
  126. package/src/funcs/commentPatchTaskComment.ts +137 -0
  127. package/src/funcs/commentRemoveTaskComment.ts +139 -0
  128. package/src/funcs/commentUpdateTaskComment.ts +137 -0
  129. package/src/funcs/taskCreateTaskComment.ts +133 -0
  130. package/src/funcs/taskGetTaskComment.ts +136 -0
  131. package/src/funcs/taskListTaskComments.ts +140 -0
  132. package/src/funcs/taskPatchTaskComment.ts +137 -0
  133. package/src/funcs/taskRemoveTaskComment.ts +139 -0
  134. package/src/funcs/taskUpdateTaskComment.ts +137 -0
  135. package/src/lib/config.ts +3 -3
  136. package/src/sdk/comment.ts +100 -0
  137. package/src/sdk/models/operations/createtaskcomment.ts +92 -0
  138. package/src/sdk/models/operations/gettaskcomment.ts +92 -0
  139. package/src/sdk/models/operations/getunifiedintegrationauth.ts +2 -0
  140. package/src/sdk/models/operations/index.ts +6 -0
  141. package/src/sdk/models/operations/listtaskcomments.ts +124 -0
  142. package/src/sdk/models/operations/patchtaskcomment.ts +99 -0
  143. package/src/sdk/models/operations/removetaskcomment.ts +151 -0
  144. package/src/sdk/models/operations/updatetaskcomment.ts +99 -0
  145. package/src/sdk/models/shared/index.ts +1 -0
  146. package/src/sdk/models/shared/kmspage.ts +4 -4
  147. package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
  148. package/src/sdk/models/shared/taskcomment.ts +109 -0
  149. package/src/sdk/models/shared/tasktask.ts +9 -0
  150. package/src/sdk/models/shared/webhook.ts +1 -0
  151. package/src/sdk/sdk.ts +6 -0
  152. package/src/sdk/task.ts +90 -0
@@ -114,6 +114,8 @@ export const Scopes = {
114
114
  TaskProjectWrite: "task_project_write",
115
115
  TaskTaskRead: "task_task_read",
116
116
  TaskTaskWrite: "task_task_write",
117
+ TaskCommentRead: "task_comment_read",
118
+ TaskCommentWrite: "task_comment_write",
117
119
  ScimUsersRead: "scim_users_read",
118
120
  ScimUsersWrite: "scim_users_write",
119
121
  ScimGroupsRead: "scim_groups_read",
@@ -54,6 +54,7 @@ export * from "./createreporepository.js";
54
54
  export * from "./createscimgroups.js";
55
55
  export * from "./createscimusers.js";
56
56
  export * from "./createstoragefile.js";
57
+ export * from "./createtaskcomment.js";
57
58
  export * from "./createtaskproject.js";
58
59
  export * from "./createtasktask.js";
59
60
  export * from "./createticketingcustomer.js";
@@ -117,6 +118,7 @@ export * from "./getreporepository.js";
117
118
  export * from "./getscimgroups.js";
118
119
  export * from "./getscimusers.js";
119
120
  export * from "./getstoragefile.js";
121
+ export * from "./gettaskcomment.js";
120
122
  export * from "./gettaskproject.js";
121
123
  export * from "./gettasktask.js";
122
124
  export * from "./getticketingcustomer.js";
@@ -189,6 +191,7 @@ export * from "./listreporepositories.js";
189
191
  export * from "./listscimgroups.js";
190
192
  export * from "./listscimusers.js";
191
193
  export * from "./liststoragefiles.js";
194
+ export * from "./listtaskcomments.js";
192
195
  export * from "./listtaskprojects.js";
193
196
  export * from "./listtasktasks.js";
194
197
  export * from "./listticketingcustomers.js";
@@ -253,6 +256,7 @@ export * from "./patchreporepository.js";
253
256
  export * from "./patchscimgroups.js";
254
257
  export * from "./patchscimusers.js";
255
258
  export * from "./patchstoragefile.js";
259
+ export * from "./patchtaskcomment.js";
256
260
  export * from "./patchtaskproject.js";
257
261
  export * from "./patchtasktask.js";
258
262
  export * from "./patchticketingcustomer.js";
@@ -312,6 +316,7 @@ export * from "./removereporepository.js";
312
316
  export * from "./removescimgroups.js";
313
317
  export * from "./removescimusers.js";
314
318
  export * from "./removestoragefile.js";
319
+ export * from "./removetaskcomment.js";
315
320
  export * from "./removetaskproject.js";
316
321
  export * from "./removetasktask.js";
317
322
  export * from "./removeticketingcustomer.js";
@@ -371,6 +376,7 @@ export * from "./updatereporepository.js";
371
376
  export * from "./updatescimgroups.js";
372
377
  export * from "./updatescimusers.js";
373
378
  export * from "./updatestoragefile.js";
379
+ export * from "./updatetaskcomment.js";
374
380
  export * from "./updatetaskproject.js";
375
381
  export * from "./updatetasktask.js";
376
382
  export * from "./updateticketingcustomer.js";
@@ -0,0 +1,124 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type ListTaskCommentsRequest = {
12
+ /**
13
+ * ID of the connection
14
+ */
15
+ connectionId: string;
16
+ /**
17
+ * Comma-delimited fields to return
18
+ */
19
+ fields?: Array<string> | undefined;
20
+ limit?: number | undefined;
21
+ offset?: number | undefined;
22
+ order?: string | undefined;
23
+ /**
24
+ * Query string to search. eg. email address or name
25
+ */
26
+ query?: string | undefined;
27
+ sort?: string | undefined;
28
+ taskId?: string | undefined;
29
+ /**
30
+ * Return only results whose updated date is equal or greater to this value
31
+ */
32
+ updatedGte?: Date | undefined;
33
+ };
34
+
35
+ /** @internal */
36
+ export const ListTaskCommentsRequest$inboundSchema: z.ZodType<
37
+ ListTaskCommentsRequest,
38
+ z.ZodTypeDef,
39
+ unknown
40
+ > = z.object({
41
+ connection_id: z.string(),
42
+ fields: z.array(z.string()).optional(),
43
+ limit: z.number().optional(),
44
+ offset: z.number().optional(),
45
+ order: z.string().optional(),
46
+ query: z.string().optional(),
47
+ sort: z.string().optional(),
48
+ task_id: z.string().optional(),
49
+ updated_gte: z.string().datetime({ offset: true }).transform(v => new Date(v))
50
+ .optional(),
51
+ }).transform((v) => {
52
+ return remap$(v, {
53
+ "connection_id": "connectionId",
54
+ "task_id": "taskId",
55
+ "updated_gte": "updatedGte",
56
+ });
57
+ });
58
+
59
+ /** @internal */
60
+ export type ListTaskCommentsRequest$Outbound = {
61
+ connection_id: string;
62
+ fields?: Array<string> | undefined;
63
+ limit?: number | undefined;
64
+ offset?: number | undefined;
65
+ order?: string | undefined;
66
+ query?: string | undefined;
67
+ sort?: string | undefined;
68
+ task_id?: string | undefined;
69
+ updated_gte?: string | undefined;
70
+ };
71
+
72
+ /** @internal */
73
+ export const ListTaskCommentsRequest$outboundSchema: z.ZodType<
74
+ ListTaskCommentsRequest$Outbound,
75
+ z.ZodTypeDef,
76
+ ListTaskCommentsRequest
77
+ > = z.object({
78
+ connectionId: z.string(),
79
+ fields: z.array(z.string()).optional(),
80
+ limit: z.number().optional(),
81
+ offset: z.number().optional(),
82
+ order: z.string().optional(),
83
+ query: z.string().optional(),
84
+ sort: z.string().optional(),
85
+ taskId: z.string().optional(),
86
+ updatedGte: z.date().transform(v => v.toISOString()).optional(),
87
+ }).transform((v) => {
88
+ return remap$(v, {
89
+ connectionId: "connection_id",
90
+ taskId: "task_id",
91
+ updatedGte: "updated_gte",
92
+ });
93
+ });
94
+
95
+ /**
96
+ * @internal
97
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
98
+ */
99
+ export namespace ListTaskCommentsRequest$ {
100
+ /** @deprecated use `ListTaskCommentsRequest$inboundSchema` instead. */
101
+ export const inboundSchema = ListTaskCommentsRequest$inboundSchema;
102
+ /** @deprecated use `ListTaskCommentsRequest$outboundSchema` instead. */
103
+ export const outboundSchema = ListTaskCommentsRequest$outboundSchema;
104
+ /** @deprecated use `ListTaskCommentsRequest$Outbound` instead. */
105
+ export type Outbound = ListTaskCommentsRequest$Outbound;
106
+ }
107
+
108
+ export function listTaskCommentsRequestToJSON(
109
+ listTaskCommentsRequest: ListTaskCommentsRequest,
110
+ ): string {
111
+ return JSON.stringify(
112
+ ListTaskCommentsRequest$outboundSchema.parse(listTaskCommentsRequest),
113
+ );
114
+ }
115
+
116
+ export function listTaskCommentsRequestFromJSON(
117
+ jsonString: string,
118
+ ): SafeParseResult<ListTaskCommentsRequest, SDKValidationError> {
119
+ return safeParse(
120
+ jsonString,
121
+ (x) => ListTaskCommentsRequest$inboundSchema.parse(JSON.parse(x)),
122
+ `Failed to parse 'ListTaskCommentsRequest' from JSON`,
123
+ );
124
+ }
@@ -0,0 +1,99 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import * as shared from "../shared/index.js";
11
+
12
+ export type PatchTaskCommentRequest = {
13
+ taskComment?: shared.TaskComment | undefined;
14
+ /**
15
+ * ID of the connection
16
+ */
17
+ connectionId: string;
18
+ /**
19
+ * Comma-delimited fields to return
20
+ */
21
+ fields?: Array<string> | undefined;
22
+ /**
23
+ * ID of the Comment
24
+ */
25
+ id: string;
26
+ };
27
+
28
+ /** @internal */
29
+ export const PatchTaskCommentRequest$inboundSchema: z.ZodType<
30
+ PatchTaskCommentRequest,
31
+ z.ZodTypeDef,
32
+ unknown
33
+ > = z.object({
34
+ TaskComment: shared.TaskComment$inboundSchema.optional(),
35
+ connection_id: z.string(),
36
+ fields: z.array(z.string()).optional(),
37
+ id: z.string(),
38
+ }).transform((v) => {
39
+ return remap$(v, {
40
+ "TaskComment": "taskComment",
41
+ "connection_id": "connectionId",
42
+ });
43
+ });
44
+
45
+ /** @internal */
46
+ export type PatchTaskCommentRequest$Outbound = {
47
+ TaskComment?: shared.TaskComment$Outbound | undefined;
48
+ connection_id: string;
49
+ fields?: Array<string> | undefined;
50
+ id: string;
51
+ };
52
+
53
+ /** @internal */
54
+ export const PatchTaskCommentRequest$outboundSchema: z.ZodType<
55
+ PatchTaskCommentRequest$Outbound,
56
+ z.ZodTypeDef,
57
+ PatchTaskCommentRequest
58
+ > = z.object({
59
+ taskComment: shared.TaskComment$outboundSchema.optional(),
60
+ connectionId: z.string(),
61
+ fields: z.array(z.string()).optional(),
62
+ id: z.string(),
63
+ }).transform((v) => {
64
+ return remap$(v, {
65
+ taskComment: "TaskComment",
66
+ connectionId: "connection_id",
67
+ });
68
+ });
69
+
70
+ /**
71
+ * @internal
72
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
73
+ */
74
+ export namespace PatchTaskCommentRequest$ {
75
+ /** @deprecated use `PatchTaskCommentRequest$inboundSchema` instead. */
76
+ export const inboundSchema = PatchTaskCommentRequest$inboundSchema;
77
+ /** @deprecated use `PatchTaskCommentRequest$outboundSchema` instead. */
78
+ export const outboundSchema = PatchTaskCommentRequest$outboundSchema;
79
+ /** @deprecated use `PatchTaskCommentRequest$Outbound` instead. */
80
+ export type Outbound = PatchTaskCommentRequest$Outbound;
81
+ }
82
+
83
+ export function patchTaskCommentRequestToJSON(
84
+ patchTaskCommentRequest: PatchTaskCommentRequest,
85
+ ): string {
86
+ return JSON.stringify(
87
+ PatchTaskCommentRequest$outboundSchema.parse(patchTaskCommentRequest),
88
+ );
89
+ }
90
+
91
+ export function patchTaskCommentRequestFromJSON(
92
+ jsonString: string,
93
+ ): SafeParseResult<PatchTaskCommentRequest, SDKValidationError> {
94
+ return safeParse(
95
+ jsonString,
96
+ (x) => PatchTaskCommentRequest$inboundSchema.parse(JSON.parse(x)),
97
+ `Failed to parse 'PatchTaskCommentRequest' from JSON`,
98
+ );
99
+ }
@@ -0,0 +1,151 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type RemoveTaskCommentRequest = {
12
+ /**
13
+ * ID of the connection
14
+ */
15
+ connectionId: string;
16
+ /**
17
+ * ID of the Comment
18
+ */
19
+ id: string;
20
+ };
21
+
22
+ export type RemoveTaskCommentResponse = {
23
+ headers: { [k: string]: Array<string> };
24
+ };
25
+
26
+ /** @internal */
27
+ export const RemoveTaskCommentRequest$inboundSchema: z.ZodType<
28
+ RemoveTaskCommentRequest,
29
+ z.ZodTypeDef,
30
+ unknown
31
+ > = z.object({
32
+ connection_id: z.string(),
33
+ id: z.string(),
34
+ }).transform((v) => {
35
+ return remap$(v, {
36
+ "connection_id": "connectionId",
37
+ });
38
+ });
39
+
40
+ /** @internal */
41
+ export type RemoveTaskCommentRequest$Outbound = {
42
+ connection_id: string;
43
+ id: string;
44
+ };
45
+
46
+ /** @internal */
47
+ export const RemoveTaskCommentRequest$outboundSchema: z.ZodType<
48
+ RemoveTaskCommentRequest$Outbound,
49
+ z.ZodTypeDef,
50
+ RemoveTaskCommentRequest
51
+ > = z.object({
52
+ connectionId: z.string(),
53
+ id: z.string(),
54
+ }).transform((v) => {
55
+ return remap$(v, {
56
+ connectionId: "connection_id",
57
+ });
58
+ });
59
+
60
+ /**
61
+ * @internal
62
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
63
+ */
64
+ export namespace RemoveTaskCommentRequest$ {
65
+ /** @deprecated use `RemoveTaskCommentRequest$inboundSchema` instead. */
66
+ export const inboundSchema = RemoveTaskCommentRequest$inboundSchema;
67
+ /** @deprecated use `RemoveTaskCommentRequest$outboundSchema` instead. */
68
+ export const outboundSchema = RemoveTaskCommentRequest$outboundSchema;
69
+ /** @deprecated use `RemoveTaskCommentRequest$Outbound` instead. */
70
+ export type Outbound = RemoveTaskCommentRequest$Outbound;
71
+ }
72
+
73
+ export function removeTaskCommentRequestToJSON(
74
+ removeTaskCommentRequest: RemoveTaskCommentRequest,
75
+ ): string {
76
+ return JSON.stringify(
77
+ RemoveTaskCommentRequest$outboundSchema.parse(removeTaskCommentRequest),
78
+ );
79
+ }
80
+
81
+ export function removeTaskCommentRequestFromJSON(
82
+ jsonString: string,
83
+ ): SafeParseResult<RemoveTaskCommentRequest, SDKValidationError> {
84
+ return safeParse(
85
+ jsonString,
86
+ (x) => RemoveTaskCommentRequest$inboundSchema.parse(JSON.parse(x)),
87
+ `Failed to parse 'RemoveTaskCommentRequest' from JSON`,
88
+ );
89
+ }
90
+
91
+ /** @internal */
92
+ export const RemoveTaskCommentResponse$inboundSchema: z.ZodType<
93
+ RemoveTaskCommentResponse,
94
+ z.ZodTypeDef,
95
+ unknown
96
+ > = z.object({
97
+ Headers: z.record(z.array(z.string())),
98
+ }).transform((v) => {
99
+ return remap$(v, {
100
+ "Headers": "headers",
101
+ });
102
+ });
103
+
104
+ /** @internal */
105
+ export type RemoveTaskCommentResponse$Outbound = {
106
+ Headers: { [k: string]: Array<string> };
107
+ };
108
+
109
+ /** @internal */
110
+ export const RemoveTaskCommentResponse$outboundSchema: z.ZodType<
111
+ RemoveTaskCommentResponse$Outbound,
112
+ z.ZodTypeDef,
113
+ RemoveTaskCommentResponse
114
+ > = z.object({
115
+ headers: z.record(z.array(z.string())),
116
+ }).transform((v) => {
117
+ return remap$(v, {
118
+ headers: "Headers",
119
+ });
120
+ });
121
+
122
+ /**
123
+ * @internal
124
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
125
+ */
126
+ export namespace RemoveTaskCommentResponse$ {
127
+ /** @deprecated use `RemoveTaskCommentResponse$inboundSchema` instead. */
128
+ export const inboundSchema = RemoveTaskCommentResponse$inboundSchema;
129
+ /** @deprecated use `RemoveTaskCommentResponse$outboundSchema` instead. */
130
+ export const outboundSchema = RemoveTaskCommentResponse$outboundSchema;
131
+ /** @deprecated use `RemoveTaskCommentResponse$Outbound` instead. */
132
+ export type Outbound = RemoveTaskCommentResponse$Outbound;
133
+ }
134
+
135
+ export function removeTaskCommentResponseToJSON(
136
+ removeTaskCommentResponse: RemoveTaskCommentResponse,
137
+ ): string {
138
+ return JSON.stringify(
139
+ RemoveTaskCommentResponse$outboundSchema.parse(removeTaskCommentResponse),
140
+ );
141
+ }
142
+
143
+ export function removeTaskCommentResponseFromJSON(
144
+ jsonString: string,
145
+ ): SafeParseResult<RemoveTaskCommentResponse, SDKValidationError> {
146
+ return safeParse(
147
+ jsonString,
148
+ (x) => RemoveTaskCommentResponse$inboundSchema.parse(JSON.parse(x)),
149
+ `Failed to parse 'RemoveTaskCommentResponse' from JSON`,
150
+ );
151
+ }
@@ -0,0 +1,99 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import * as shared from "../shared/index.js";
11
+
12
+ export type UpdateTaskCommentRequest = {
13
+ taskComment?: shared.TaskComment | undefined;
14
+ /**
15
+ * ID of the connection
16
+ */
17
+ connectionId: string;
18
+ /**
19
+ * Comma-delimited fields to return
20
+ */
21
+ fields?: Array<string> | undefined;
22
+ /**
23
+ * ID of the Comment
24
+ */
25
+ id: string;
26
+ };
27
+
28
+ /** @internal */
29
+ export const UpdateTaskCommentRequest$inboundSchema: z.ZodType<
30
+ UpdateTaskCommentRequest,
31
+ z.ZodTypeDef,
32
+ unknown
33
+ > = z.object({
34
+ TaskComment: shared.TaskComment$inboundSchema.optional(),
35
+ connection_id: z.string(),
36
+ fields: z.array(z.string()).optional(),
37
+ id: z.string(),
38
+ }).transform((v) => {
39
+ return remap$(v, {
40
+ "TaskComment": "taskComment",
41
+ "connection_id": "connectionId",
42
+ });
43
+ });
44
+
45
+ /** @internal */
46
+ export type UpdateTaskCommentRequest$Outbound = {
47
+ TaskComment?: shared.TaskComment$Outbound | undefined;
48
+ connection_id: string;
49
+ fields?: Array<string> | undefined;
50
+ id: string;
51
+ };
52
+
53
+ /** @internal */
54
+ export const UpdateTaskCommentRequest$outboundSchema: z.ZodType<
55
+ UpdateTaskCommentRequest$Outbound,
56
+ z.ZodTypeDef,
57
+ UpdateTaskCommentRequest
58
+ > = z.object({
59
+ taskComment: shared.TaskComment$outboundSchema.optional(),
60
+ connectionId: z.string(),
61
+ fields: z.array(z.string()).optional(),
62
+ id: z.string(),
63
+ }).transform((v) => {
64
+ return remap$(v, {
65
+ taskComment: "TaskComment",
66
+ connectionId: "connection_id",
67
+ });
68
+ });
69
+
70
+ /**
71
+ * @internal
72
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
73
+ */
74
+ export namespace UpdateTaskCommentRequest$ {
75
+ /** @deprecated use `UpdateTaskCommentRequest$inboundSchema` instead. */
76
+ export const inboundSchema = UpdateTaskCommentRequest$inboundSchema;
77
+ /** @deprecated use `UpdateTaskCommentRequest$outboundSchema` instead. */
78
+ export const outboundSchema = UpdateTaskCommentRequest$outboundSchema;
79
+ /** @deprecated use `UpdateTaskCommentRequest$Outbound` instead. */
80
+ export type Outbound = UpdateTaskCommentRequest$Outbound;
81
+ }
82
+
83
+ export function updateTaskCommentRequestToJSON(
84
+ updateTaskCommentRequest: UpdateTaskCommentRequest,
85
+ ): string {
86
+ return JSON.stringify(
87
+ UpdateTaskCommentRequest$outboundSchema.parse(updateTaskCommentRequest),
88
+ );
89
+ }
90
+
91
+ export function updateTaskCommentRequestFromJSON(
92
+ jsonString: string,
93
+ ): SafeParseResult<UpdateTaskCommentRequest, SDKValidationError> {
94
+ return safeParse(
95
+ jsonString,
96
+ (x) => UpdateTaskCommentRequest$inboundSchema.parse(JSON.parse(x)),
97
+ `Failed to parse 'UpdateTaskCommentRequest' from JSON`,
98
+ );
99
+ }
@@ -168,6 +168,7 @@ export * from "./scimusergroups.js";
168
168
  export * from "./security.js";
169
169
  export * from "./storagefile.js";
170
170
  export * from "./storagepermission.js";
171
+ export * from "./taskcomment.js";
171
172
  export * from "./taskproject.js";
172
173
  export * from "./tasktask.js";
173
174
  export * from "./ticketingcustomer.js";
@@ -31,7 +31,7 @@ export type KmsPage = {
31
31
  metadata?: Array<KmsPageMetadata> | undefined;
32
32
  parentPageId?: string | undefined;
33
33
  raw?: { [k: string]: any } | undefined;
34
- spaceId: string;
34
+ spaceId?: string | undefined;
35
35
  title: string;
36
36
  type: KmsPageType;
37
37
  updatedAt?: Date | undefined;
@@ -70,7 +70,7 @@ export const KmsPage$inboundSchema: z.ZodType<KmsPage, z.ZodTypeDef, unknown> =
70
70
  metadata: z.array(KmsPageMetadata$inboundSchema).optional(),
71
71
  parent_page_id: z.string().optional(),
72
72
  raw: z.record(z.any()).optional(),
73
- space_id: z.string(),
73
+ space_id: z.string().optional(),
74
74
  title: z.string(),
75
75
  type: KmsPageType$inboundSchema,
76
76
  updated_at: z.string().datetime({ offset: true }).transform(v =>
@@ -100,7 +100,7 @@ export type KmsPage$Outbound = {
100
100
  metadata?: Array<KmsPageMetadata$Outbound> | undefined;
101
101
  parent_page_id?: string | undefined;
102
102
  raw?: { [k: string]: any } | undefined;
103
- space_id: string;
103
+ space_id?: string | undefined;
104
104
  title: string;
105
105
  type: string;
106
106
  updated_at?: string | undefined;
@@ -121,7 +121,7 @@ export const KmsPage$outboundSchema: z.ZodType<
121
121
  metadata: z.array(KmsPageMetadata$outboundSchema).optional(),
122
122
  parentPageId: z.string().optional(),
123
123
  raw: z.record(z.any()).optional(),
124
- spaceId: z.string(),
124
+ spaceId: z.string().optional(),
125
125
  title: z.string(),
126
126
  type: KmsPageType$outboundSchema,
127
127
  updatedAt: z.date().transform(v => v.toISOString()).optional(),
@@ -110,6 +110,8 @@ export const PropertyConnectionPermissions = {
110
110
  TaskProjectWrite: "task_project_write",
111
111
  TaskTaskRead: "task_task_read",
112
112
  TaskTaskWrite: "task_task_write",
113
+ TaskCommentRead: "task_comment_read",
114
+ TaskCommentWrite: "task_comment_write",
113
115
  ScimUsersRead: "scim_users_read",
114
116
  ScimUsersWrite: "scim_users_write",
115
117
  ScimGroupsRead: "scim_groups_read",
@@ -0,0 +1,109 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../../lib/primitives.js";
7
+ import { safeParse } from "../../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ export type TaskComment = {
12
+ createdAt?: Date | undefined;
13
+ id?: string | undefined;
14
+ raw?: { [k: string]: any } | undefined;
15
+ taskId: string;
16
+ text: string;
17
+ updatedAt?: Date | undefined;
18
+ userId?: string | undefined;
19
+ userName?: string | undefined;
20
+ };
21
+
22
+ /** @internal */
23
+ export const TaskComment$inboundSchema: z.ZodType<
24
+ TaskComment,
25
+ z.ZodTypeDef,
26
+ unknown
27
+ > = z.object({
28
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
29
+ .optional(),
30
+ id: z.string().optional(),
31
+ raw: z.record(z.any()).optional(),
32
+ task_id: z.string(),
33
+ text: z.string(),
34
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
35
+ .optional(),
36
+ user_id: z.string().optional(),
37
+ user_name: z.string().optional(),
38
+ }).transform((v) => {
39
+ return remap$(v, {
40
+ "created_at": "createdAt",
41
+ "task_id": "taskId",
42
+ "updated_at": "updatedAt",
43
+ "user_id": "userId",
44
+ "user_name": "userName",
45
+ });
46
+ });
47
+
48
+ /** @internal */
49
+ export type TaskComment$Outbound = {
50
+ created_at?: string | undefined;
51
+ id?: string | undefined;
52
+ raw?: { [k: string]: any } | undefined;
53
+ task_id: string;
54
+ text: string;
55
+ updated_at?: string | undefined;
56
+ user_id?: string | undefined;
57
+ user_name?: string | undefined;
58
+ };
59
+
60
+ /** @internal */
61
+ export const TaskComment$outboundSchema: z.ZodType<
62
+ TaskComment$Outbound,
63
+ z.ZodTypeDef,
64
+ TaskComment
65
+ > = z.object({
66
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
67
+ id: z.string().optional(),
68
+ raw: z.record(z.any()).optional(),
69
+ taskId: z.string(),
70
+ text: z.string(),
71
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
72
+ userId: z.string().optional(),
73
+ userName: z.string().optional(),
74
+ }).transform((v) => {
75
+ return remap$(v, {
76
+ createdAt: "created_at",
77
+ taskId: "task_id",
78
+ updatedAt: "updated_at",
79
+ userId: "user_id",
80
+ userName: "user_name",
81
+ });
82
+ });
83
+
84
+ /**
85
+ * @internal
86
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
87
+ */
88
+ export namespace TaskComment$ {
89
+ /** @deprecated use `TaskComment$inboundSchema` instead. */
90
+ export const inboundSchema = TaskComment$inboundSchema;
91
+ /** @deprecated use `TaskComment$outboundSchema` instead. */
92
+ export const outboundSchema = TaskComment$outboundSchema;
93
+ /** @deprecated use `TaskComment$Outbound` instead. */
94
+ export type Outbound = TaskComment$Outbound;
95
+ }
96
+
97
+ export function taskCommentToJSON(taskComment: TaskComment): string {
98
+ return JSON.stringify(TaskComment$outboundSchema.parse(taskComment));
99
+ }
100
+
101
+ export function taskCommentFromJSON(
102
+ jsonString: string,
103
+ ): SafeParseResult<TaskComment, SDKValidationError> {
104
+ return safeParse(
105
+ jsonString,
106
+ (x) => TaskComment$inboundSchema.parse(JSON.parse(x)),
107
+ `Failed to parse 'TaskComment' from JSON`,
108
+ );
109
+ }