@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,139 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { UnifiedToCore } from "../core.js";
|
|
6
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
19
|
+
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
20
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
21
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
22
|
+
import { Result } from "../sdk/types/fp.js";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Remove a comment
|
|
26
|
+
*/
|
|
27
|
+
export async function taskRemoveTaskComment(
|
|
28
|
+
client: UnifiedToCore,
|
|
29
|
+
request: operations.RemoveTaskCommentRequest,
|
|
30
|
+
options?: RequestOptions,
|
|
31
|
+
): Promise<
|
|
32
|
+
Result<
|
|
33
|
+
operations.RemoveTaskCommentResponse | undefined,
|
|
34
|
+
| SDKError
|
|
35
|
+
| SDKValidationError
|
|
36
|
+
| UnexpectedClientError
|
|
37
|
+
| InvalidRequestError
|
|
38
|
+
| RequestAbortedError
|
|
39
|
+
| RequestTimeoutError
|
|
40
|
+
| ConnectionError
|
|
41
|
+
>
|
|
42
|
+
> {
|
|
43
|
+
const parsed = safeParse(
|
|
44
|
+
request,
|
|
45
|
+
(value) => operations.RemoveTaskCommentRequest$outboundSchema.parse(value),
|
|
46
|
+
"Input validation failed",
|
|
47
|
+
);
|
|
48
|
+
if (!parsed.ok) {
|
|
49
|
+
return parsed;
|
|
50
|
+
}
|
|
51
|
+
const payload = parsed.value;
|
|
52
|
+
const body = null;
|
|
53
|
+
|
|
54
|
+
const pathParams = {
|
|
55
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
56
|
+
explode: false,
|
|
57
|
+
charEncoding: "percent",
|
|
58
|
+
}),
|
|
59
|
+
id: encodeSimple("id", payload.id, {
|
|
60
|
+
explode: false,
|
|
61
|
+
charEncoding: "percent",
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const path = pathToFunc("/task/{connection_id}/comment/{id}")(pathParams);
|
|
66
|
+
|
|
67
|
+
const headers = new Headers({
|
|
68
|
+
Accept: "*/*",
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
72
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
73
|
+
|
|
74
|
+
const context = {
|
|
75
|
+
operationID: "removeTaskComment",
|
|
76
|
+
oAuth2Scopes: [],
|
|
77
|
+
|
|
78
|
+
resolvedSecurity: requestSecurity,
|
|
79
|
+
|
|
80
|
+
securitySource: client._options.security,
|
|
81
|
+
retryConfig: options?.retries
|
|
82
|
+
|| client._options.retryConfig
|
|
83
|
+
|| { strategy: "none" },
|
|
84
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const requestRes = client._createRequest(context, {
|
|
88
|
+
security: requestSecurity,
|
|
89
|
+
method: "DELETE",
|
|
90
|
+
baseURL: options?.serverURL,
|
|
91
|
+
path: path,
|
|
92
|
+
headers: headers,
|
|
93
|
+
body: body,
|
|
94
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
95
|
+
}, options);
|
|
96
|
+
if (!requestRes.ok) {
|
|
97
|
+
return requestRes;
|
|
98
|
+
}
|
|
99
|
+
const req = requestRes.value;
|
|
100
|
+
|
|
101
|
+
const doResult = await client._do(req, {
|
|
102
|
+
context,
|
|
103
|
+
errorCodes: ["4XX", "5XX"],
|
|
104
|
+
retryConfig: context.retryConfig,
|
|
105
|
+
retryCodes: context.retryCodes,
|
|
106
|
+
});
|
|
107
|
+
if (!doResult.ok) {
|
|
108
|
+
return doResult;
|
|
109
|
+
}
|
|
110
|
+
const response = doResult.value;
|
|
111
|
+
|
|
112
|
+
const responseFields = {
|
|
113
|
+
HttpMeta: { Response: response, Request: req },
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
const [result] = await M.match<
|
|
117
|
+
operations.RemoveTaskCommentResponse | undefined,
|
|
118
|
+
| SDKError
|
|
119
|
+
| SDKValidationError
|
|
120
|
+
| UnexpectedClientError
|
|
121
|
+
| InvalidRequestError
|
|
122
|
+
| RequestAbortedError
|
|
123
|
+
| RequestTimeoutError
|
|
124
|
+
| ConnectionError
|
|
125
|
+
>(
|
|
126
|
+
M.nil(200, operations.RemoveTaskCommentResponse$inboundSchema.optional()),
|
|
127
|
+
M.fail(["4XX", "5XX"]),
|
|
128
|
+
M.nil(
|
|
129
|
+
"default",
|
|
130
|
+
operations.RemoveTaskCommentResponse$inboundSchema.optional(),
|
|
131
|
+
{ hdrs: true },
|
|
132
|
+
),
|
|
133
|
+
)(response, { extraFields: responseFields });
|
|
134
|
+
if (!result.ok) {
|
|
135
|
+
return result;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { UnifiedToCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import {
|
|
13
|
+
ConnectionError,
|
|
14
|
+
InvalidRequestError,
|
|
15
|
+
RequestAbortedError,
|
|
16
|
+
RequestTimeoutError,
|
|
17
|
+
UnexpectedClientError,
|
|
18
|
+
} from "../sdk/models/errors/httpclienterrors.js";
|
|
19
|
+
import { SDKError } from "../sdk/models/errors/sdkerror.js";
|
|
20
|
+
import { SDKValidationError } from "../sdk/models/errors/sdkvalidationerror.js";
|
|
21
|
+
import * as operations from "../sdk/models/operations/index.js";
|
|
22
|
+
import * as shared from "../sdk/models/shared/index.js";
|
|
23
|
+
import { Result } from "../sdk/types/fp.js";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Update a comment
|
|
27
|
+
*/
|
|
28
|
+
export async function taskUpdateTaskComment(
|
|
29
|
+
client: UnifiedToCore,
|
|
30
|
+
request: operations.UpdateTaskCommentRequest,
|
|
31
|
+
options?: RequestOptions,
|
|
32
|
+
): Promise<
|
|
33
|
+
Result<
|
|
34
|
+
shared.TaskComment,
|
|
35
|
+
| SDKError
|
|
36
|
+
| SDKValidationError
|
|
37
|
+
| UnexpectedClientError
|
|
38
|
+
| InvalidRequestError
|
|
39
|
+
| RequestAbortedError
|
|
40
|
+
| RequestTimeoutError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
>
|
|
43
|
+
> {
|
|
44
|
+
const parsed = safeParse(
|
|
45
|
+
request,
|
|
46
|
+
(value) => operations.UpdateTaskCommentRequest$outboundSchema.parse(value),
|
|
47
|
+
"Input validation failed",
|
|
48
|
+
);
|
|
49
|
+
if (!parsed.ok) {
|
|
50
|
+
return parsed;
|
|
51
|
+
}
|
|
52
|
+
const payload = parsed.value;
|
|
53
|
+
const body = encodeJSON("body", payload.TaskComment, { explode: true });
|
|
54
|
+
|
|
55
|
+
const pathParams = {
|
|
56
|
+
connection_id: encodeSimple("connection_id", payload.connection_id, {
|
|
57
|
+
explode: false,
|
|
58
|
+
charEncoding: "percent",
|
|
59
|
+
}),
|
|
60
|
+
id: encodeSimple("id", payload.id, {
|
|
61
|
+
explode: false,
|
|
62
|
+
charEncoding: "percent",
|
|
63
|
+
}),
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const path = pathToFunc("/task/{connection_id}/comment/{id}")(pathParams);
|
|
67
|
+
|
|
68
|
+
const query = encodeFormQuery({
|
|
69
|
+
"fields": payload.fields,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const headers = new Headers({
|
|
73
|
+
"Content-Type": "application/json",
|
|
74
|
+
Accept: "application/json",
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
const securityInput = await extractSecurity(client._options.security);
|
|
78
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
79
|
+
|
|
80
|
+
const context = {
|
|
81
|
+
operationID: "updateTaskComment",
|
|
82
|
+
oAuth2Scopes: [],
|
|
83
|
+
|
|
84
|
+
resolvedSecurity: requestSecurity,
|
|
85
|
+
|
|
86
|
+
securitySource: client._options.security,
|
|
87
|
+
retryConfig: options?.retries
|
|
88
|
+
|| client._options.retryConfig
|
|
89
|
+
|| { strategy: "none" },
|
|
90
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const requestRes = client._createRequest(context, {
|
|
94
|
+
security: requestSecurity,
|
|
95
|
+
method: "PUT",
|
|
96
|
+
baseURL: options?.serverURL,
|
|
97
|
+
path: path,
|
|
98
|
+
headers: headers,
|
|
99
|
+
query: query,
|
|
100
|
+
body: body,
|
|
101
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
102
|
+
}, options);
|
|
103
|
+
if (!requestRes.ok) {
|
|
104
|
+
return requestRes;
|
|
105
|
+
}
|
|
106
|
+
const req = requestRes.value;
|
|
107
|
+
|
|
108
|
+
const doResult = await client._do(req, {
|
|
109
|
+
context,
|
|
110
|
+
errorCodes: ["4XX", "5XX"],
|
|
111
|
+
retryConfig: context.retryConfig,
|
|
112
|
+
retryCodes: context.retryCodes,
|
|
113
|
+
});
|
|
114
|
+
if (!doResult.ok) {
|
|
115
|
+
return doResult;
|
|
116
|
+
}
|
|
117
|
+
const response = doResult.value;
|
|
118
|
+
|
|
119
|
+
const [result] = await M.match<
|
|
120
|
+
shared.TaskComment,
|
|
121
|
+
| SDKError
|
|
122
|
+
| SDKValidationError
|
|
123
|
+
| UnexpectedClientError
|
|
124
|
+
| InvalidRequestError
|
|
125
|
+
| RequestAbortedError
|
|
126
|
+
| RequestTimeoutError
|
|
127
|
+
| ConnectionError
|
|
128
|
+
>(
|
|
129
|
+
M.json(200, shared.TaskComment$inboundSchema),
|
|
130
|
+
M.fail(["4XX", "5XX"]),
|
|
131
|
+
)(response);
|
|
132
|
+
if (!result.ok) {
|
|
133
|
+
return result;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
return result;
|
|
137
|
+
}
|
package/src/lib/config.ts
CHANGED
|
@@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.0",
|
|
68
|
-
sdkVersion: "2.9.
|
|
68
|
+
sdkVersion: "2.9.16",
|
|
69
69
|
genVersion: "2.484.0",
|
|
70
70
|
userAgent:
|
|
71
|
-
"speakeasy-sdk/typescript 2.9.
|
|
71
|
+
"speakeasy-sdk/typescript 2.9.16 2.484.0 1.0 @unified-api/typescript-sdk",
|
|
72
72
|
} as const;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { commentCreateTaskComment } from "../funcs/commentCreateTaskComment.js";
|
|
6
|
+
import { commentGetTaskComment } from "../funcs/commentGetTaskComment.js";
|
|
7
|
+
import { commentListTaskComments } from "../funcs/commentListTaskComments.js";
|
|
8
|
+
import { commentPatchTaskComment } from "../funcs/commentPatchTaskComment.js";
|
|
9
|
+
import { commentRemoveTaskComment } from "../funcs/commentRemoveTaskComment.js";
|
|
10
|
+
import { commentUpdateTaskComment } from "../funcs/commentUpdateTaskComment.js";
|
|
11
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import * as operations from "./models/operations/index.js";
|
|
13
|
+
import * as shared from "./models/shared/index.js";
|
|
14
|
+
import { unwrapAsync } from "./types/fp.js";
|
|
15
|
+
|
|
16
|
+
export class Comment extends ClientSDK {
|
|
17
|
+
/**
|
|
18
|
+
* Create a comment
|
|
19
|
+
*/
|
|
20
|
+
async createTaskComment(
|
|
21
|
+
request: operations.CreateTaskCommentRequest,
|
|
22
|
+
options?: RequestOptions,
|
|
23
|
+
): Promise<shared.TaskComment> {
|
|
24
|
+
return unwrapAsync(commentCreateTaskComment(
|
|
25
|
+
this,
|
|
26
|
+
request,
|
|
27
|
+
options,
|
|
28
|
+
));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Retrieve a comment
|
|
33
|
+
*/
|
|
34
|
+
async getTaskComment(
|
|
35
|
+
request: operations.GetTaskCommentRequest,
|
|
36
|
+
options?: RequestOptions,
|
|
37
|
+
): Promise<shared.TaskComment> {
|
|
38
|
+
return unwrapAsync(commentGetTaskComment(
|
|
39
|
+
this,
|
|
40
|
+
request,
|
|
41
|
+
options,
|
|
42
|
+
));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* List all comments
|
|
47
|
+
*/
|
|
48
|
+
async listTaskComments(
|
|
49
|
+
request: operations.ListTaskCommentsRequest,
|
|
50
|
+
options?: RequestOptions,
|
|
51
|
+
): Promise<Array<shared.TaskComment>> {
|
|
52
|
+
return unwrapAsync(commentListTaskComments(
|
|
53
|
+
this,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Update a comment
|
|
61
|
+
*/
|
|
62
|
+
async patchTaskComment(
|
|
63
|
+
request: operations.PatchTaskCommentRequest,
|
|
64
|
+
options?: RequestOptions,
|
|
65
|
+
): Promise<shared.TaskComment> {
|
|
66
|
+
return unwrapAsync(commentPatchTaskComment(
|
|
67
|
+
this,
|
|
68
|
+
request,
|
|
69
|
+
options,
|
|
70
|
+
));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Remove a comment
|
|
75
|
+
*/
|
|
76
|
+
async removeTaskComment(
|
|
77
|
+
request: operations.RemoveTaskCommentRequest,
|
|
78
|
+
options?: RequestOptions,
|
|
79
|
+
): Promise<operations.RemoveTaskCommentResponse | undefined> {
|
|
80
|
+
return unwrapAsync(commentRemoveTaskComment(
|
|
81
|
+
this,
|
|
82
|
+
request,
|
|
83
|
+
options,
|
|
84
|
+
));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Update a comment
|
|
89
|
+
*/
|
|
90
|
+
async updateTaskComment(
|
|
91
|
+
request: operations.UpdateTaskCommentRequest,
|
|
92
|
+
options?: RequestOptions,
|
|
93
|
+
): Promise<shared.TaskComment> {
|
|
94
|
+
return unwrapAsync(commentUpdateTaskComment(
|
|
95
|
+
this,
|
|
96
|
+
request,
|
|
97
|
+
options,
|
|
98
|
+
));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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 CreateTaskCommentRequest = {
|
|
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
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const CreateTaskCommentRequest$inboundSchema: z.ZodType<
|
|
26
|
+
CreateTaskCommentRequest,
|
|
27
|
+
z.ZodTypeDef,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.object({
|
|
30
|
+
TaskComment: shared.TaskComment$inboundSchema.optional(),
|
|
31
|
+
connection_id: z.string(),
|
|
32
|
+
fields: z.array(z.string()).optional(),
|
|
33
|
+
}).transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"TaskComment": "taskComment",
|
|
36
|
+
"connection_id": "connectionId",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type CreateTaskCommentRequest$Outbound = {
|
|
42
|
+
TaskComment?: shared.TaskComment$Outbound | undefined;
|
|
43
|
+
connection_id: string;
|
|
44
|
+
fields?: Array<string> | undefined;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const CreateTaskCommentRequest$outboundSchema: z.ZodType<
|
|
49
|
+
CreateTaskCommentRequest$Outbound,
|
|
50
|
+
z.ZodTypeDef,
|
|
51
|
+
CreateTaskCommentRequest
|
|
52
|
+
> = z.object({
|
|
53
|
+
taskComment: shared.TaskComment$outboundSchema.optional(),
|
|
54
|
+
connectionId: z.string(),
|
|
55
|
+
fields: z.array(z.string()).optional(),
|
|
56
|
+
}).transform((v) => {
|
|
57
|
+
return remap$(v, {
|
|
58
|
+
taskComment: "TaskComment",
|
|
59
|
+
connectionId: "connection_id",
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
+
*/
|
|
67
|
+
export namespace CreateTaskCommentRequest$ {
|
|
68
|
+
/** @deprecated use `CreateTaskCommentRequest$inboundSchema` instead. */
|
|
69
|
+
export const inboundSchema = CreateTaskCommentRequest$inboundSchema;
|
|
70
|
+
/** @deprecated use `CreateTaskCommentRequest$outboundSchema` instead. */
|
|
71
|
+
export const outboundSchema = CreateTaskCommentRequest$outboundSchema;
|
|
72
|
+
/** @deprecated use `CreateTaskCommentRequest$Outbound` instead. */
|
|
73
|
+
export type Outbound = CreateTaskCommentRequest$Outbound;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function createTaskCommentRequestToJSON(
|
|
77
|
+
createTaskCommentRequest: CreateTaskCommentRequest,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
CreateTaskCommentRequest$outboundSchema.parse(createTaskCommentRequest),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function createTaskCommentRequestFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<CreateTaskCommentRequest, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => CreateTaskCommentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'CreateTaskCommentRequest' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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 GetTaskCommentRequest = {
|
|
12
|
+
/**
|
|
13
|
+
* ID of the connection
|
|
14
|
+
*/
|
|
15
|
+
connectionId: string;
|
|
16
|
+
/**
|
|
17
|
+
* Comma-delimited fields to return
|
|
18
|
+
*/
|
|
19
|
+
fields?: Array<string> | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* ID of the Comment
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const GetTaskCommentRequest$inboundSchema: z.ZodType<
|
|
28
|
+
GetTaskCommentRequest,
|
|
29
|
+
z.ZodTypeDef,
|
|
30
|
+
unknown
|
|
31
|
+
> = z.object({
|
|
32
|
+
connection_id: z.string(),
|
|
33
|
+
fields: z.array(z.string()).optional(),
|
|
34
|
+
id: z.string(),
|
|
35
|
+
}).transform((v) => {
|
|
36
|
+
return remap$(v, {
|
|
37
|
+
"connection_id": "connectionId",
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export type GetTaskCommentRequest$Outbound = {
|
|
43
|
+
connection_id: string;
|
|
44
|
+
fields?: Array<string> | undefined;
|
|
45
|
+
id: string;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const GetTaskCommentRequest$outboundSchema: z.ZodType<
|
|
50
|
+
GetTaskCommentRequest$Outbound,
|
|
51
|
+
z.ZodTypeDef,
|
|
52
|
+
GetTaskCommentRequest
|
|
53
|
+
> = z.object({
|
|
54
|
+
connectionId: z.string(),
|
|
55
|
+
fields: z.array(z.string()).optional(),
|
|
56
|
+
id: z.string(),
|
|
57
|
+
}).transform((v) => {
|
|
58
|
+
return remap$(v, {
|
|
59
|
+
connectionId: "connection_id",
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @internal
|
|
65
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
66
|
+
*/
|
|
67
|
+
export namespace GetTaskCommentRequest$ {
|
|
68
|
+
/** @deprecated use `GetTaskCommentRequest$inboundSchema` instead. */
|
|
69
|
+
export const inboundSchema = GetTaskCommentRequest$inboundSchema;
|
|
70
|
+
/** @deprecated use `GetTaskCommentRequest$outboundSchema` instead. */
|
|
71
|
+
export const outboundSchema = GetTaskCommentRequest$outboundSchema;
|
|
72
|
+
/** @deprecated use `GetTaskCommentRequest$Outbound` instead. */
|
|
73
|
+
export type Outbound = GetTaskCommentRequest$Outbound;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function getTaskCommentRequestToJSON(
|
|
77
|
+
getTaskCommentRequest: GetTaskCommentRequest,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
GetTaskCommentRequest$outboundSchema.parse(getTaskCommentRequest),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function getTaskCommentRequestFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<GetTaskCommentRequest, SDKValidationError> {
|
|
87
|
+
return safeParse(
|
|
88
|
+
jsonString,
|
|
89
|
+
(x) => GetTaskCommentRequest$inboundSchema.parse(JSON.parse(x)),
|
|
90
|
+
`Failed to parse 'GetTaskCommentRequest' from JSON`,
|
|
91
|
+
);
|
|
92
|
+
}
|
|
@@ -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";
|