@unified-api/typescript-sdk 2.73.15 → 2.73.16

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 (95) hide show
  1. package/README.md +4 -0
  2. package/bin/mcp-server.js +752 -374
  3. package/bin/mcp-server.js.map +19 -11
  4. package/docs/sdks/change/README.md +165 -0
  5. package/docs/sdks/task/README.md +158 -0
  6. package/examples/package-lock.json +1 -1
  7. package/funcs/taskGetTaskChange.d.ts +15 -0
  8. package/funcs/taskGetTaskChange.d.ts.map +1 -0
  9. package/funcs/taskGetTaskChange.js +125 -0
  10. package/funcs/taskGetTaskChange.js.map +1 -0
  11. package/funcs/taskListTaskChanges.d.ts +15 -0
  12. package/funcs/taskListTaskChanges.d.ts.map +1 -0
  13. package/funcs/taskListTaskChanges.js +129 -0
  14. package/funcs/taskListTaskChanges.js.map +1 -0
  15. package/jsr.json +1 -1
  16. package/lib/config.d.ts +3 -3
  17. package/lib/config.js +3 -3
  18. package/lib/security.d.ts.map +1 -1
  19. package/lib/security.js.map +1 -1
  20. package/mcp-server/mcp-server.js +1 -1
  21. package/mcp-server/server.d.ts.map +1 -1
  22. package/mcp-server/server.js +5 -1
  23. package/mcp-server/server.js.map +1 -1
  24. package/mcp-server/tools/taskGetTaskChange.d.ts +8 -0
  25. package/mcp-server/tools/taskGetTaskChange.d.ts.map +1 -0
  26. package/mcp-server/tools/taskGetTaskChange.js +62 -0
  27. package/mcp-server/tools/taskGetTaskChange.js.map +1 -0
  28. package/mcp-server/tools/taskListTaskChanges.d.ts +8 -0
  29. package/mcp-server/tools/taskListTaskChanges.d.ts.map +1 -0
  30. package/mcp-server/tools/taskListTaskChanges.js +62 -0
  31. package/mcp-server/tools/taskListTaskChanges.js.map +1 -0
  32. package/package.json +1 -1
  33. package/sdk/change.d.ts +14 -0
  34. package/sdk/change.d.ts.map +1 -0
  35. package/sdk/change.js +26 -0
  36. package/sdk/change.js.map +1 -0
  37. package/sdk/models/operations/gettaskchange.d.ts +47 -0
  38. package/sdk/models/operations/gettaskchange.d.ts.map +1 -0
  39. package/sdk/models/operations/gettaskchange.js +84 -0
  40. package/sdk/models/operations/gettaskchange.js.map +1 -0
  41. package/sdk/models/operations/index.d.ts +2 -0
  42. package/sdk/models/operations/index.d.ts.map +1 -1
  43. package/sdk/models/operations/index.js +2 -0
  44. package/sdk/models/operations/index.js.map +1 -1
  45. package/sdk/models/operations/listtaskchanges.d.ts +65 -0
  46. package/sdk/models/operations/listtaskchanges.d.ts.map +1 -0
  47. package/sdk/models/operations/listtaskchanges.js +100 -0
  48. package/sdk/models/operations/listtaskchanges.js.map +1 -0
  49. package/sdk/models/shared/index.d.ts +2 -0
  50. package/sdk/models/shared/index.d.ts.map +1 -1
  51. package/sdk/models/shared/index.js +2 -0
  52. package/sdk/models/shared/index.js.map +1 -1
  53. package/sdk/models/shared/propertyconnectionpermissions.d.ts +1 -0
  54. package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
  55. package/sdk/models/shared/propertyconnectionpermissions.js +1 -0
  56. package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
  57. package/sdk/models/shared/taskchange.d.ts +46 -0
  58. package/sdk/models/shared/taskchange.d.ts.map +1 -0
  59. package/sdk/models/shared/taskchange.js +99 -0
  60. package/sdk/models/shared/taskchange.js.map +1 -0
  61. package/sdk/models/shared/taskchangeitem.d.ts +33 -0
  62. package/sdk/models/shared/taskchangeitem.d.ts.map +1 -0
  63. package/sdk/models/shared/taskchangeitem.js +73 -0
  64. package/sdk/models/shared/taskchangeitem.js.map +1 -0
  65. package/sdk/models/shared/webhook.d.ts +1 -0
  66. package/sdk/models/shared/webhook.d.ts.map +1 -1
  67. package/sdk/models/shared/webhook.js +1 -0
  68. package/sdk/models/shared/webhook.js.map +1 -1
  69. package/sdk/sdk.d.ts +3 -0
  70. package/sdk/sdk.d.ts.map +1 -1
  71. package/sdk/sdk.js +4 -0
  72. package/sdk/sdk.js.map +1 -1
  73. package/sdk/task.d.ts +8 -0
  74. package/sdk/task.d.ts.map +1 -1
  75. package/sdk/task.js +14 -0
  76. package/sdk/task.js.map +1 -1
  77. package/src/funcs/taskGetTaskChange.ts +173 -0
  78. package/src/funcs/taskListTaskChanges.ts +177 -0
  79. package/src/lib/config.ts +3 -3
  80. package/src/lib/security.ts +4 -1
  81. package/src/mcp-server/mcp-server.ts +1 -1
  82. package/src/mcp-server/server.ts +5 -1
  83. package/src/mcp-server/tools/taskGetTaskChange.ts +35 -0
  84. package/src/mcp-server/tools/taskListTaskChanges.ts +35 -0
  85. package/src/sdk/change.ts +40 -0
  86. package/src/sdk/models/operations/gettaskchange.ts +99 -0
  87. package/src/sdk/models/operations/index.ts +2 -0
  88. package/src/sdk/models/operations/listtaskchanges.ts +133 -0
  89. package/src/sdk/models/shared/index.ts +2 -0
  90. package/src/sdk/models/shared/propertyconnectionpermissions.ts +1 -0
  91. package/src/sdk/models/shared/taskchange.ts +109 -0
  92. package/src/sdk/models/shared/taskchangeitem.ts +70 -0
  93. package/src/sdk/models/shared/webhook.ts +1 -0
  94. package/src/sdk/sdk.ts +6 -0
  95. package/src/sdk/task.ts +30 -0
@@ -0,0 +1,133 @@
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 ListTaskChangesRequest = {
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
+ /**
28
+ * Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
29
+ */
30
+ raw?: string | undefined;
31
+ sort?: string | undefined;
32
+ /**
33
+ * The task ID to filter by
34
+ */
35
+ taskId?: string | undefined;
36
+ /**
37
+ * Return only results whose updated date is equal or greater to this value
38
+ */
39
+ updatedGte?: string | undefined;
40
+ };
41
+
42
+ /** @internal */
43
+ export const ListTaskChangesRequest$inboundSchema: z.ZodType<
44
+ ListTaskChangesRequest,
45
+ z.ZodTypeDef,
46
+ unknown
47
+ > = z.object({
48
+ connection_id: z.string(),
49
+ fields: z.array(z.string()).optional(),
50
+ limit: z.number().optional(),
51
+ offset: z.number().optional(),
52
+ order: z.string().optional(),
53
+ query: z.string().optional(),
54
+ raw: z.string().optional(),
55
+ sort: z.string().optional(),
56
+ task_id: z.string().optional(),
57
+ updated_gte: z.string().optional(),
58
+ }).transform((v) => {
59
+ return remap$(v, {
60
+ "connection_id": "connectionId",
61
+ "task_id": "taskId",
62
+ "updated_gte": "updatedGte",
63
+ });
64
+ });
65
+
66
+ /** @internal */
67
+ export type ListTaskChangesRequest$Outbound = {
68
+ connection_id: string;
69
+ fields?: Array<string> | undefined;
70
+ limit?: number | undefined;
71
+ offset?: number | undefined;
72
+ order?: string | undefined;
73
+ query?: string | undefined;
74
+ raw?: string | undefined;
75
+ sort?: string | undefined;
76
+ task_id?: string | undefined;
77
+ updated_gte?: string | undefined;
78
+ };
79
+
80
+ /** @internal */
81
+ export const ListTaskChangesRequest$outboundSchema: z.ZodType<
82
+ ListTaskChangesRequest$Outbound,
83
+ z.ZodTypeDef,
84
+ ListTaskChangesRequest
85
+ > = z.object({
86
+ connectionId: z.string(),
87
+ fields: z.array(z.string()).optional(),
88
+ limit: z.number().optional(),
89
+ offset: z.number().optional(),
90
+ order: z.string().optional(),
91
+ query: z.string().optional(),
92
+ raw: z.string().optional(),
93
+ sort: z.string().optional(),
94
+ taskId: z.string().optional(),
95
+ updatedGte: z.string().optional(),
96
+ }).transform((v) => {
97
+ return remap$(v, {
98
+ connectionId: "connection_id",
99
+ taskId: "task_id",
100
+ updatedGte: "updated_gte",
101
+ });
102
+ });
103
+
104
+ /**
105
+ * @internal
106
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
107
+ */
108
+ export namespace ListTaskChangesRequest$ {
109
+ /** @deprecated use `ListTaskChangesRequest$inboundSchema` instead. */
110
+ export const inboundSchema = ListTaskChangesRequest$inboundSchema;
111
+ /** @deprecated use `ListTaskChangesRequest$outboundSchema` instead. */
112
+ export const outboundSchema = ListTaskChangesRequest$outboundSchema;
113
+ /** @deprecated use `ListTaskChangesRequest$Outbound` instead. */
114
+ export type Outbound = ListTaskChangesRequest$Outbound;
115
+ }
116
+
117
+ export function listTaskChangesRequestToJSON(
118
+ listTaskChangesRequest: ListTaskChangesRequest,
119
+ ): string {
120
+ return JSON.stringify(
121
+ ListTaskChangesRequest$outboundSchema.parse(listTaskChangesRequest),
122
+ );
123
+ }
124
+
125
+ export function listTaskChangesRequestFromJSON(
126
+ jsonString: string,
127
+ ): SafeParseResult<ListTaskChangesRequest, SDKValidationError> {
128
+ return safeParse(
129
+ jsonString,
130
+ (x) => ListTaskChangesRequest$inboundSchema.parse(JSON.parse(x)),
131
+ `Failed to parse 'ListTaskChangesRequest' from JSON`,
132
+ );
133
+ }
@@ -218,6 +218,8 @@ export * from "./scimusergroups.js";
218
218
  export * from "./security.js";
219
219
  export * from "./storagefile.js";
220
220
  export * from "./storagepermission.js";
221
+ export * from "./taskchange.js";
222
+ export * from "./taskchangeitem.js";
221
223
  export * from "./taskcomment.js";
222
224
  export * from "./taskmetadata.js";
223
225
  export * from "./taskproject.js";
@@ -140,6 +140,7 @@ export const PropertyConnectionPermissions = {
140
140
  TaskProjectWrite: "task_project_write",
141
141
  TaskTaskRead: "task_task_read",
142
142
  TaskTaskWrite: "task_task_write",
143
+ TaskChangeRead: "task_change_read",
143
144
  TaskCommentRead: "task_comment_read",
144
145
  TaskCommentWrite: "task_comment_write",
145
146
  ScimUsersRead: "scim_users_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
+ import {
11
+ TaskChangeItem,
12
+ TaskChangeItem$inboundSchema,
13
+ TaskChangeItem$Outbound,
14
+ TaskChangeItem$outboundSchema,
15
+ } from "./taskchangeitem.js";
16
+
17
+ export type TaskChange = {
18
+ createdAt?: Date | undefined;
19
+ id?: string | undefined;
20
+ items?: Array<TaskChangeItem> | undefined;
21
+ raw?: { [k: string]: any } | undefined;
22
+ taskId?: string | undefined;
23
+ updatedAt?: Date | undefined;
24
+ userId?: string | undefined;
25
+ };
26
+
27
+ /** @internal */
28
+ export const TaskChange$inboundSchema: z.ZodType<
29
+ TaskChange,
30
+ z.ZodTypeDef,
31
+ unknown
32
+ > = z.object({
33
+ created_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
34
+ .optional(),
35
+ id: z.string().optional(),
36
+ items: z.array(TaskChangeItem$inboundSchema).optional(),
37
+ raw: z.record(z.any()).optional(),
38
+ task_id: z.string().optional(),
39
+ updated_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
40
+ .optional(),
41
+ user_id: z.string().optional(),
42
+ }).transform((v) => {
43
+ return remap$(v, {
44
+ "created_at": "createdAt",
45
+ "task_id": "taskId",
46
+ "updated_at": "updatedAt",
47
+ "user_id": "userId",
48
+ });
49
+ });
50
+
51
+ /** @internal */
52
+ export type TaskChange$Outbound = {
53
+ created_at?: string | undefined;
54
+ id?: string | undefined;
55
+ items?: Array<TaskChangeItem$Outbound> | undefined;
56
+ raw?: { [k: string]: any } | undefined;
57
+ task_id?: string | undefined;
58
+ updated_at?: string | undefined;
59
+ user_id?: string | undefined;
60
+ };
61
+
62
+ /** @internal */
63
+ export const TaskChange$outboundSchema: z.ZodType<
64
+ TaskChange$Outbound,
65
+ z.ZodTypeDef,
66
+ TaskChange
67
+ > = z.object({
68
+ createdAt: z.date().transform(v => v.toISOString()).optional(),
69
+ id: z.string().optional(),
70
+ items: z.array(TaskChangeItem$outboundSchema).optional(),
71
+ raw: z.record(z.any()).optional(),
72
+ taskId: z.string().optional(),
73
+ updatedAt: z.date().transform(v => v.toISOString()).optional(),
74
+ userId: z.string().optional(),
75
+ }).transform((v) => {
76
+ return remap$(v, {
77
+ createdAt: "created_at",
78
+ taskId: "task_id",
79
+ updatedAt: "updated_at",
80
+ userId: "user_id",
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 TaskChange$ {
89
+ /** @deprecated use `TaskChange$inboundSchema` instead. */
90
+ export const inboundSchema = TaskChange$inboundSchema;
91
+ /** @deprecated use `TaskChange$outboundSchema` instead. */
92
+ export const outboundSchema = TaskChange$outboundSchema;
93
+ /** @deprecated use `TaskChange$Outbound` instead. */
94
+ export type Outbound = TaskChange$Outbound;
95
+ }
96
+
97
+ export function taskChangeToJSON(taskChange: TaskChange): string {
98
+ return JSON.stringify(TaskChange$outboundSchema.parse(taskChange));
99
+ }
100
+
101
+ export function taskChangeFromJSON(
102
+ jsonString: string,
103
+ ): SafeParseResult<TaskChange, SDKValidationError> {
104
+ return safeParse(
105
+ jsonString,
106
+ (x) => TaskChange$inboundSchema.parse(JSON.parse(x)),
107
+ `Failed to parse 'TaskChange' from JSON`,
108
+ );
109
+ }
@@ -0,0 +1,70 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type TaskChangeItem = {
11
+ field: string;
12
+ from?: string | undefined;
13
+ to?: string | undefined;
14
+ };
15
+
16
+ /** @internal */
17
+ export const TaskChangeItem$inboundSchema: z.ZodType<
18
+ TaskChangeItem,
19
+ z.ZodTypeDef,
20
+ unknown
21
+ > = z.object({
22
+ field: z.string(),
23
+ from: z.string().optional(),
24
+ to: z.string().optional(),
25
+ });
26
+
27
+ /** @internal */
28
+ export type TaskChangeItem$Outbound = {
29
+ field: string;
30
+ from?: string | undefined;
31
+ to?: string | undefined;
32
+ };
33
+
34
+ /** @internal */
35
+ export const TaskChangeItem$outboundSchema: z.ZodType<
36
+ TaskChangeItem$Outbound,
37
+ z.ZodTypeDef,
38
+ TaskChangeItem
39
+ > = z.object({
40
+ field: z.string(),
41
+ from: z.string().optional(),
42
+ to: z.string().optional(),
43
+ });
44
+
45
+ /**
46
+ * @internal
47
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
48
+ */
49
+ export namespace TaskChangeItem$ {
50
+ /** @deprecated use `TaskChangeItem$inboundSchema` instead. */
51
+ export const inboundSchema = TaskChangeItem$inboundSchema;
52
+ /** @deprecated use `TaskChangeItem$outboundSchema` instead. */
53
+ export const outboundSchema = TaskChangeItem$outboundSchema;
54
+ /** @deprecated use `TaskChangeItem$Outbound` instead. */
55
+ export type Outbound = TaskChangeItem$Outbound;
56
+ }
57
+
58
+ export function taskChangeItemToJSON(taskChangeItem: TaskChangeItem): string {
59
+ return JSON.stringify(TaskChangeItem$outboundSchema.parse(taskChangeItem));
60
+ }
61
+
62
+ export function taskChangeItemFromJSON(
63
+ jsonString: string,
64
+ ): SafeParseResult<TaskChangeItem, SDKValidationError> {
65
+ return safeParse(
66
+ jsonString,
67
+ (x) => TaskChangeItem$inboundSchema.parse(JSON.parse(x)),
68
+ `Failed to parse 'TaskChangeItem' from JSON`,
69
+ );
70
+ }
@@ -103,6 +103,7 @@ export const ObjectType = {
103
103
  TaskProject: "task_project",
104
104
  TaskTask: "task_task",
105
105
  TaskComment: "task_comment",
106
+ TaskChange: "task_change",
106
107
  ScimUsers: "scim_users",
107
108
  ScimGroups: "scim_groups",
108
109
  LmsCourse: "lms_course",
package/src/sdk/sdk.ts CHANGED
@@ -19,6 +19,7 @@ import { Calendar } from "./calendar.js";
19
19
  import { Call } from "./call.js";
20
20
  import { Candidate } from "./candidate.js";
21
21
  import { Category } from "./category.js";
22
+ import { Change } from "./change.js";
22
23
  import { Channel } from "./channel.js";
23
24
  import { Class } from "./class.js";
24
25
  import { Collection } from "./collection.js";
@@ -536,6 +537,11 @@ export class UnifiedTo extends ClientSDK {
536
537
  return (this._task ??= new Task(this._options));
537
538
  }
538
539
 
540
+ private _change?: Change;
541
+ get change(): Change {
542
+ return (this._change ??= new Change(this._options));
543
+ }
544
+
539
545
  private _project?: Project;
540
546
  get project(): Project {
541
547
  return (this._project ??= new Project(this._options));
package/src/sdk/task.ts CHANGED
@@ -10,8 +10,10 @@ import { commentRemoveTaskComment } from "../funcs/commentRemoveTaskComment.js";
10
10
  import { commentUpdateTaskComment } from "../funcs/commentUpdateTaskComment.js";
11
11
  import { taskCreateTaskProject } from "../funcs/taskCreateTaskProject.js";
12
12
  import { taskCreateTaskTask } from "../funcs/taskCreateTaskTask.js";
13
+ import { taskGetTaskChange } from "../funcs/taskGetTaskChange.js";
13
14
  import { taskGetTaskProject } from "../funcs/taskGetTaskProject.js";
14
15
  import { taskGetTaskTask } from "../funcs/taskGetTaskTask.js";
16
+ import { taskListTaskChanges } from "../funcs/taskListTaskChanges.js";
15
17
  import { taskListTaskProjects } from "../funcs/taskListTaskProjects.js";
16
18
  import { taskListTaskTasks } from "../funcs/taskListTaskTasks.js";
17
19
  import { taskPatchTaskProject } from "../funcs/taskPatchTaskProject.js";
@@ -68,6 +70,20 @@ export class Task extends ClientSDK {
68
70
  ));
69
71
  }
70
72
 
73
+ /**
74
+ * Retrieve a change
75
+ */
76
+ async getTaskChange(
77
+ request: operations.GetTaskChangeRequest,
78
+ options?: RequestOptions,
79
+ ): Promise<shared.TaskChange> {
80
+ return unwrapAsync(taskGetTaskChange(
81
+ this,
82
+ request,
83
+ options,
84
+ ));
85
+ }
86
+
71
87
  /**
72
88
  * Retrieve a comment
73
89
  */
@@ -110,6 +126,20 @@ export class Task extends ClientSDK {
110
126
  ));
111
127
  }
112
128
 
129
+ /**
130
+ * List all changes
131
+ */
132
+ async listTaskChanges(
133
+ request: operations.ListTaskChangesRequest,
134
+ options?: RequestOptions,
135
+ ): Promise<Array<shared.TaskChange>> {
136
+ return unwrapAsync(taskListTaskChanges(
137
+ this,
138
+ request,
139
+ options,
140
+ ));
141
+ }
142
+
113
143
  /**
114
144
  * List all comments
115
145
  */