@unified-api/typescript-sdk 2.9.15 → 2.9.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.
- package/README.md +12 -0
- package/docs/sdks/comment/README.md +501 -0
- package/docs/sdks/task/README.md +494 -0
- package/funcs/commentCreateTaskComment.d.ts +13 -0
- package/funcs/commentCreateTaskComment.d.ts.map +1 -0
- package/funcs/commentCreateTaskComment.js +103 -0
- package/funcs/commentCreateTaskComment.js.map +1 -0
- package/funcs/commentGetTaskComment.d.ts +13 -0
- package/funcs/commentGetTaskComment.d.ts.map +1 -0
- package/funcs/commentGetTaskComment.js +106 -0
- package/funcs/commentGetTaskComment.js.map +1 -0
- package/funcs/commentListTaskComments.d.ts +13 -0
- package/funcs/commentListTaskComments.d.ts.map +1 -0
- package/funcs/commentListTaskComments.js +110 -0
- package/funcs/commentListTaskComments.js.map +1 -0
- package/funcs/commentPatchTaskComment.d.ts +13 -0
- package/funcs/commentPatchTaskComment.d.ts.map +1 -0
- package/funcs/commentPatchTaskComment.js +107 -0
- package/funcs/commentPatchTaskComment.js.map +1 -0
- package/funcs/commentRemoveTaskComment.d.ts +12 -0
- package/funcs/commentRemoveTaskComment.d.ts.map +1 -0
- package/funcs/commentRemoveTaskComment.js +104 -0
- package/funcs/commentRemoveTaskComment.js.map +1 -0
- package/funcs/commentUpdateTaskComment.d.ts +13 -0
- package/funcs/commentUpdateTaskComment.d.ts.map +1 -0
- package/funcs/commentUpdateTaskComment.js +107 -0
- package/funcs/commentUpdateTaskComment.js.map +1 -0
- package/funcs/taskCreateTaskComment.d.ts +13 -0
- package/funcs/taskCreateTaskComment.d.ts.map +1 -0
- package/funcs/taskCreateTaskComment.js +103 -0
- package/funcs/taskCreateTaskComment.js.map +1 -0
- package/funcs/taskGetTaskComment.d.ts +13 -0
- package/funcs/taskGetTaskComment.d.ts.map +1 -0
- package/funcs/taskGetTaskComment.js +106 -0
- package/funcs/taskGetTaskComment.js.map +1 -0
- package/funcs/taskListTaskComments.d.ts +13 -0
- package/funcs/taskListTaskComments.d.ts.map +1 -0
- package/funcs/taskListTaskComments.js +110 -0
- package/funcs/taskListTaskComments.js.map +1 -0
- package/funcs/taskPatchTaskComment.d.ts +13 -0
- package/funcs/taskPatchTaskComment.d.ts.map +1 -0
- package/funcs/taskPatchTaskComment.js +107 -0
- package/funcs/taskPatchTaskComment.js.map +1 -0
- package/funcs/taskRemoveTaskComment.d.ts +12 -0
- package/funcs/taskRemoveTaskComment.d.ts.map +1 -0
- package/funcs/taskRemoveTaskComment.js +104 -0
- package/funcs/taskRemoveTaskComment.js.map +1 -0
- package/funcs/taskUpdateTaskComment.d.ts +13 -0
- package/funcs/taskUpdateTaskComment.d.ts.map +1 -0
- package/funcs/taskUpdateTaskComment.js +107 -0
- package/funcs/taskUpdateTaskComment.js.map +1 -0
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/package.json +1 -1
- package/sdk/comment.d.ts +30 -0
- package/sdk/comment.d.ts.map +1 -0
- package/sdk/comment.js +54 -0
- package/sdk/comment.js.map +1 -0
- package/sdk/models/operations/createtaskcomment.d.ts +40 -0
- package/sdk/models/operations/createtaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/createtaskcomment.js +75 -0
- package/sdk/models/operations/createtaskcomment.js.map +1 -0
- package/sdk/models/operations/gettaskcomment.d.ts +42 -0
- package/sdk/models/operations/gettaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/gettaskcomment.js +72 -0
- package/sdk/models/operations/gettaskcomment.js.map +1 -0
- package/sdk/models/operations/getunifiedintegrationauth.d.ts +6 -0
- package/sdk/models/operations/getunifiedintegrationauth.d.ts.map +1 -1
- package/sdk/models/operations/getunifiedintegrationauth.js +2 -0
- package/sdk/models/operations/getunifiedintegrationauth.js.map +1 -1
- package/sdk/models/operations/index.d.ts +6 -0
- package/sdk/models/operations/index.d.ts.map +1 -1
- package/sdk/models/operations/index.js +6 -0
- package/sdk/models/operations/index.js.map +1 -1
- package/sdk/models/operations/listtaskcomments.d.ts +57 -0
- package/sdk/models/operations/listtaskcomments.d.ts.map +1 -0
- package/sdk/models/operations/listtaskcomments.js +89 -0
- package/sdk/models/operations/listtaskcomments.js.map +1 -0
- package/sdk/models/operations/patchtaskcomment.d.ts +45 -0
- package/sdk/models/operations/patchtaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/patchtaskcomment.js +77 -0
- package/sdk/models/operations/patchtaskcomment.js.map +1 -0
- package/sdk/models/operations/removetaskcomment.d.ts +66 -0
- package/sdk/models/operations/removetaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/removetaskcomment.js +105 -0
- package/sdk/models/operations/removetaskcomment.js.map +1 -0
- package/sdk/models/operations/updatetaskcomment.d.ts +45 -0
- package/sdk/models/operations/updatetaskcomment.d.ts.map +1 -0
- package/sdk/models/operations/updatetaskcomment.js +77 -0
- package/sdk/models/operations/updatetaskcomment.js.map +1 -0
- package/sdk/models/shared/index.d.ts +1 -0
- package/sdk/models/shared/index.d.ts.map +1 -1
- package/sdk/models/shared/index.js +1 -0
- package/sdk/models/shared/index.js.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.d.ts +6 -0
- package/sdk/models/shared/propertyconnectionpermissions.d.ts.map +1 -1
- package/sdk/models/shared/propertyconnectionpermissions.js +2 -0
- package/sdk/models/shared/propertyconnectionpermissions.js.map +1 -1
- package/sdk/models/shared/taskcomment.d.ts +47 -0
- package/sdk/models/shared/taskcomment.d.ts.map +1 -0
- package/sdk/models/shared/taskcomment.js +92 -0
- package/sdk/models/shared/taskcomment.js.map +1 -0
- package/sdk/models/shared/tasktask.d.ts +5 -0
- package/sdk/models/shared/tasktask.d.ts.map +1 -1
- package/sdk/models/shared/tasktask.js +4 -0
- package/sdk/models/shared/tasktask.js.map +1 -1
- package/sdk/models/shared/webhook.d.ts +3 -0
- package/sdk/models/shared/webhook.d.ts.map +1 -1
- package/sdk/models/shared/webhook.js +1 -0
- package/sdk/models/shared/webhook.js.map +1 -1
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/task.d.ts +24 -0
- package/sdk/task.d.ts.map +1 -1
- package/sdk/task.js +42 -0
- package/sdk/task.js.map +1 -1
- package/src/funcs/commentCreateTaskComment.ts +133 -0
- package/src/funcs/commentGetTaskComment.ts +136 -0
- package/src/funcs/commentListTaskComments.ts +140 -0
- package/src/funcs/commentPatchTaskComment.ts +137 -0
- package/src/funcs/commentRemoveTaskComment.ts +139 -0
- package/src/funcs/commentUpdateTaskComment.ts +137 -0
- package/src/funcs/taskCreateTaskComment.ts +133 -0
- package/src/funcs/taskGetTaskComment.ts +136 -0
- package/src/funcs/taskListTaskComments.ts +140 -0
- package/src/funcs/taskPatchTaskComment.ts +137 -0
- package/src/funcs/taskRemoveTaskComment.ts +139 -0
- package/src/funcs/taskUpdateTaskComment.ts +137 -0
- package/src/lib/config.ts +2 -2
- package/src/sdk/comment.ts +100 -0
- package/src/sdk/models/operations/createtaskcomment.ts +92 -0
- package/src/sdk/models/operations/gettaskcomment.ts +92 -0
- package/src/sdk/models/operations/getunifiedintegrationauth.ts +2 -0
- package/src/sdk/models/operations/index.ts +6 -0
- package/src/sdk/models/operations/listtaskcomments.ts +124 -0
- package/src/sdk/models/operations/patchtaskcomment.ts +99 -0
- package/src/sdk/models/operations/removetaskcomment.ts +151 -0
- package/src/sdk/models/operations/updatetaskcomment.ts +99 -0
- package/src/sdk/models/shared/index.ts +1 -0
- package/src/sdk/models/shared/propertyconnectionpermissions.ts +2 -0
- package/src/sdk/models/shared/taskcomment.ts +109 -0
- package/src/sdk/models/shared/tasktask.ts +9 -0
- package/src/sdk/models/shared/webhook.ts +1 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/task.ts +90 -0
|
@@ -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";
|
|
@@ -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
|
+
}
|
|
@@ -18,6 +18,10 @@ export type TaskTaskStatus = ClosedEnum<typeof TaskTaskStatus>;
|
|
|
18
18
|
|
|
19
19
|
export type TaskTask = {
|
|
20
20
|
assignedUserIds?: Array<string> | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Array of attachment IDs retrieved from StorageFile.Get endpoint
|
|
23
|
+
*/
|
|
24
|
+
attachmentIds?: Array<string> | undefined;
|
|
21
25
|
completedAt?: Date | undefined;
|
|
22
26
|
createdAt?: Date | undefined;
|
|
23
27
|
creatorUserId?: string | undefined;
|
|
@@ -65,6 +69,7 @@ export const TaskTask$inboundSchema: z.ZodType<
|
|
|
65
69
|
unknown
|
|
66
70
|
> = z.object({
|
|
67
71
|
assigned_user_ids: z.array(z.string()).optional(),
|
|
72
|
+
attachment_ids: z.array(z.string()).optional(),
|
|
68
73
|
completed_at: z.string().datetime({ offset: true }).transform(v =>
|
|
69
74
|
new Date(v)
|
|
70
75
|
).optional(),
|
|
@@ -90,6 +95,7 @@ export const TaskTask$inboundSchema: z.ZodType<
|
|
|
90
95
|
}).transform((v) => {
|
|
91
96
|
return remap$(v, {
|
|
92
97
|
"assigned_user_ids": "assignedUserIds",
|
|
98
|
+
"attachment_ids": "attachmentIds",
|
|
93
99
|
"completed_at": "completedAt",
|
|
94
100
|
"created_at": "createdAt",
|
|
95
101
|
"creator_user_id": "creatorUserId",
|
|
@@ -105,6 +111,7 @@ export const TaskTask$inboundSchema: z.ZodType<
|
|
|
105
111
|
/** @internal */
|
|
106
112
|
export type TaskTask$Outbound = {
|
|
107
113
|
assigned_user_ids?: Array<string> | undefined;
|
|
114
|
+
attachment_ids?: Array<string> | undefined;
|
|
108
115
|
completed_at?: string | undefined;
|
|
109
116
|
created_at?: string | undefined;
|
|
110
117
|
creator_user_id?: string | undefined;
|
|
@@ -131,6 +138,7 @@ export const TaskTask$outboundSchema: z.ZodType<
|
|
|
131
138
|
TaskTask
|
|
132
139
|
> = z.object({
|
|
133
140
|
assignedUserIds: z.array(z.string()).optional(),
|
|
141
|
+
attachmentIds: z.array(z.string()).optional(),
|
|
134
142
|
completedAt: z.date().transform(v => v.toISOString()).optional(),
|
|
135
143
|
createdAt: z.date().transform(v => v.toISOString()).optional(),
|
|
136
144
|
creatorUserId: z.string().optional(),
|
|
@@ -151,6 +159,7 @@ export const TaskTask$outboundSchema: z.ZodType<
|
|
|
151
159
|
}).transform((v) => {
|
|
152
160
|
return remap$(v, {
|
|
153
161
|
assignedUserIds: "assigned_user_ids",
|
|
162
|
+
attachmentIds: "attachment_ids",
|
|
154
163
|
completedAt: "completed_at",
|
|
155
164
|
createdAt: "created_at",
|
|
156
165
|
creatorUserId: "creator_user_id",
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { Candidate } from "./candidate.js";
|
|
|
17
17
|
import { Channel } from "./channel.js";
|
|
18
18
|
import { Class } from "./class.js";
|
|
19
19
|
import { Collection } from "./collection.js";
|
|
20
|
+
import { Comment } from "./comment.js";
|
|
20
21
|
import { Commerce } from "./commerce.js";
|
|
21
22
|
import { Commit } from "./commit.js";
|
|
22
23
|
import { Company } from "./company.js";
|
|
@@ -440,6 +441,11 @@ export class UnifiedTo extends ClientSDK {
|
|
|
440
441
|
return (this._task ??= new Task(this._options));
|
|
441
442
|
}
|
|
442
443
|
|
|
444
|
+
private _comment?: Comment;
|
|
445
|
+
get comment(): Comment {
|
|
446
|
+
return (this._comment ??= new Comment(this._options));
|
|
447
|
+
}
|
|
448
|
+
|
|
443
449
|
private _project?: Project;
|
|
444
450
|
get project(): Project {
|
|
445
451
|
return (this._project ??= new Project(this._options));
|