@superdurable/connector-asana 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +10 -2
- package/dex-connector.json +196 -0
- package/dist/chunk-JITMOBYX.js +376 -0
- package/dist/connection-Bu8DfK5s.d.ts +600 -0
- package/dist/index.d.ts +338 -0
- package/dist/index.js +917 -0
- package/dist/mock.d.ts +153 -0
- package/dist/mock.js +361 -0
- package/package.json +58 -4
|
@@ -0,0 +1,600 @@
|
|
|
1
|
+
import { SecretString, CredentialProvider, Query, Mutation, ConnectionRef } from '@superdurable/connectors-sdk';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
|
|
4
|
+
/** Connector configuration; omitted fields use manifest defaults. */
|
|
5
|
+
interface Config {
|
|
6
|
+
/** Asana REST API base URL that every task, section, and story path is appended to; leave blank for Asana's public API. Enter an absolute HTTPS URL only for an explicitly supported compatible gateway, or a loopback HTTP URL for a local test server; Asana tokens are sent to whatever host this names. */
|
|
7
|
+
endpoint?: string;
|
|
8
|
+
/** Maximum complete Asana API response in bytes. Leave blank to keep the displayed safety limit; enter a positive integer only to change it. An oversized read selects invalidResponse, and an oversized response to an accepted createTask or addComment selects uncertain. */
|
|
9
|
+
maxResponseBytes?: number;
|
|
10
|
+
}
|
|
11
|
+
/** Runtime schema for manifest configuration. */
|
|
12
|
+
declare const ConfigSchema: z.ZodObject<{
|
|
13
|
+
endpoint: z.ZodOptional<z.ZodString>;
|
|
14
|
+
maxResponseBytes: z.ZodOptional<z.ZodNumber>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/** Private connector credentials resolved by the host. */
|
|
17
|
+
interface Credentials {
|
|
18
|
+
/** Secret Asana personal access token created at https://app.asana.com/0/my-apps under Personal access tokens > Create new token; Asana treats the value as opaque, so paste it exactly as shown once. Dex Web stores it as a secret and sends it only to Asana as a bearer token, and blank means no Asana call can authenticate. */
|
|
19
|
+
accessToken: SecretString;
|
|
20
|
+
}
|
|
21
|
+
/** Decode private credential fields for the connector. */
|
|
22
|
+
declare function decodeCredentials(value: unknown): Credentials;
|
|
23
|
+
/** Host-owned source of private connector credentials. */
|
|
24
|
+
type CredentialSource = CredentialProvider<Credentials>;
|
|
25
|
+
/** ListTasksInput selects one page of tasks. Set exactly one of ProjectID and SectionID, and at most one
|
|
26
|
+
* of IsIncompleteOnly and CompletedSince. */
|
|
27
|
+
interface ListTasksInput {
|
|
28
|
+
/** ProjectID lists the tasks of this project gid. */
|
|
29
|
+
"projectId"?: string | undefined;
|
|
30
|
+
/** SectionID lists the tasks of this section gid. */
|
|
31
|
+
"sectionId"?: string | undefined;
|
|
32
|
+
/** IsIncompleteOnly lists only incomplete tasks. */
|
|
33
|
+
"isIncompleteOnly"?: boolean | undefined;
|
|
34
|
+
/** CompletedSince lists incomplete tasks plus tasks completed at or after this time. */
|
|
35
|
+
"completedSince"?: string | null | undefined;
|
|
36
|
+
/** ModifiedSince lists only tasks that changed at or after this time. Asana counts assigning, renaming,
|
|
37
|
+
* completing, commenting on, or adding the task to a project as a change. */
|
|
38
|
+
"modifiedSince"?: string | null | undefined;
|
|
39
|
+
/** PageSize is the number of tasks to request, 1 to 100; zero requests 50. */
|
|
40
|
+
"pageSize"?: number | undefined;
|
|
41
|
+
/** Offset continues a previous list with the same filters; blank reads the first page. Asana expires
|
|
42
|
+
* offset tokens after some time. */
|
|
43
|
+
"offset"?: string | undefined;
|
|
44
|
+
}
|
|
45
|
+
/** UserReference identifies an Asana user by gid and display name. */
|
|
46
|
+
interface UserReference {
|
|
47
|
+
/** ID is the user's gid. */
|
|
48
|
+
"id": string;
|
|
49
|
+
/** Name is the user's display name. */
|
|
50
|
+
"name"?: string | undefined;
|
|
51
|
+
}
|
|
52
|
+
/** ProjectReference identifies an Asana project. */
|
|
53
|
+
interface ProjectReference {
|
|
54
|
+
/** ID is the project's gid. */
|
|
55
|
+
"id": string;
|
|
56
|
+
/** Name is the project name. */
|
|
57
|
+
"name"?: string | undefined;
|
|
58
|
+
}
|
|
59
|
+
/** SectionReference identifies a section of a project. */
|
|
60
|
+
interface SectionReference {
|
|
61
|
+
/** ID is the section's gid. */
|
|
62
|
+
"id": string;
|
|
63
|
+
/** Name is the section name, such as Approved. */
|
|
64
|
+
"name"?: string | undefined;
|
|
65
|
+
}
|
|
66
|
+
/** TaskMembership is one project that holds a task, with the task's section in it. */
|
|
67
|
+
interface TaskMembership {
|
|
68
|
+
/** Project is the project. */
|
|
69
|
+
"project": ProjectReference;
|
|
70
|
+
/** Section is the task's section in the project, or nil when Asana reports none. */
|
|
71
|
+
"section"?: SectionReference | undefined;
|
|
72
|
+
}
|
|
73
|
+
/** TaskReference identifies another task, such as a parent. */
|
|
74
|
+
interface TaskReference {
|
|
75
|
+
/** ID is the task's gid. */
|
|
76
|
+
"id": string;
|
|
77
|
+
/** Name is the task name. */
|
|
78
|
+
"name"?: string | undefined;
|
|
79
|
+
}
|
|
80
|
+
/** WorkspaceReference identifies an Asana workspace or organization. */
|
|
81
|
+
interface WorkspaceReference {
|
|
82
|
+
/** ID is the workspace's gid. */
|
|
83
|
+
"id": string;
|
|
84
|
+
/** Name is the workspace name. */
|
|
85
|
+
"name"?: string | undefined;
|
|
86
|
+
}
|
|
87
|
+
/** EnumOptionReference identifies one option of an enum or multi-enum custom field. */
|
|
88
|
+
interface EnumOptionReference {
|
|
89
|
+
/** ID is the enum option's gid. */
|
|
90
|
+
"id": string;
|
|
91
|
+
/** Name is the option name, such as High. */
|
|
92
|
+
"name"?: string | undefined;
|
|
93
|
+
}
|
|
94
|
+
/** CustomFieldValue is one custom field's value on a task. DisplayValue is Asana's text rendering for every
|
|
95
|
+
* field type; the typed value is set for text, number, enum, and multi-enum fields. */
|
|
96
|
+
interface CustomFieldValue {
|
|
97
|
+
/** ID is the custom field's gid. */
|
|
98
|
+
"id": string;
|
|
99
|
+
/** Name is the custom field name. */
|
|
100
|
+
"name"?: string | undefined;
|
|
101
|
+
/** Type is Asana's resource_subtype, such as text, number, enum, multi_enum, date, or people. */
|
|
102
|
+
"type"?: string | undefined;
|
|
103
|
+
/** DisplayValue is the value as Asana displays it, or empty for an unset field. */
|
|
104
|
+
"displayValue"?: string | undefined;
|
|
105
|
+
/** TextValue is a text field's value. */
|
|
106
|
+
"textValue"?: string | undefined;
|
|
107
|
+
/** NumberValue is a number field's value. */
|
|
108
|
+
"numberValue"?: number | undefined;
|
|
109
|
+
/** EnumOption is an enum field's selected option. */
|
|
110
|
+
"enumOption"?: EnumOptionReference | undefined;
|
|
111
|
+
/** MultiEnumOptions lists a multi-enum field's selected options. */
|
|
112
|
+
"multiEnumOptions"?: Array<EnumOptionReference> | undefined;
|
|
113
|
+
}
|
|
114
|
+
/** Task is the connector's view of one Asana task. Asana's own status vocabulary is the completed flag;
|
|
115
|
+
* section membership carries the workflow state, so moving a task between sections is its status change. */
|
|
116
|
+
interface Task {
|
|
117
|
+
/** ID is the task's Asana gid, a decimal string. */
|
|
118
|
+
"id": string;
|
|
119
|
+
/** Name is the task name. */
|
|
120
|
+
"name": string;
|
|
121
|
+
/** ResourceSubtype is default_task, milestone, approval, or another Asana task subtype. */
|
|
122
|
+
"resourceSubtype"?: string | undefined;
|
|
123
|
+
/** IsCompleted reports a completed task. */
|
|
124
|
+
"isCompleted": boolean;
|
|
125
|
+
/** CompletedAt is when the task was completed, or nil while it is incomplete. */
|
|
126
|
+
"completedAt"?: string | null | undefined;
|
|
127
|
+
/** Assignee is the assigned user, or nil for an unassigned task. Email addresses are never read. */
|
|
128
|
+
"assignee"?: UserReference | undefined;
|
|
129
|
+
/** DueOn is the due date as YYYY-MM-DD, or empty. */
|
|
130
|
+
"dueOn"?: string | undefined;
|
|
131
|
+
/** DueAt is the due date and time, set only for a task with a due time. */
|
|
132
|
+
"dueAt"?: string | null | undefined;
|
|
133
|
+
/** StartOn is the start date as YYYY-MM-DD, or empty. */
|
|
134
|
+
"startOn"?: string | undefined;
|
|
135
|
+
/** Memberships lists up to 20 projects that hold the task and the section of each. */
|
|
136
|
+
"memberships"?: Array<TaskMembership> | undefined;
|
|
137
|
+
/** Parent is the parent task of a subtask, or nil. */
|
|
138
|
+
"parent"?: TaskReference | undefined;
|
|
139
|
+
/** Workspace is the task's workspace, returned by getTask and updateTask only. */
|
|
140
|
+
"workspace"?: WorkspaceReference | undefined;
|
|
141
|
+
/** Notes is the plain-text description, returned by getTask and updateTask only, at most 65536 characters. */
|
|
142
|
+
"notes"?: string | undefined;
|
|
143
|
+
/** IsNotesTruncated reports that Notes stopped at 65536 characters. */
|
|
144
|
+
"isNotesTruncated"?: boolean | undefined;
|
|
145
|
+
/** CustomFields lists up to 50 custom field values, returned by getTask and updateTask only. */
|
|
146
|
+
"customFields"?: Array<CustomFieldValue> | undefined;
|
|
147
|
+
/** PermalinkURL is the task's Asana web URL. */
|
|
148
|
+
"permalinkUrl"?: string | undefined;
|
|
149
|
+
/** CreatedAt is when the task was created. */
|
|
150
|
+
"createdAt": string;
|
|
151
|
+
/** ModifiedAt is when the task, or an association such as a project or comment, last changed. */
|
|
152
|
+
"modifiedAt": string;
|
|
153
|
+
}
|
|
154
|
+
/** ListTasksOutput is one page of tasks in Asana's order. */
|
|
155
|
+
interface ListTasksOutput {
|
|
156
|
+
/** Tasks lists the page's tasks without notes or custom field values. */
|
|
157
|
+
"tasks": Array<Task> | null;
|
|
158
|
+
/** NextOffset continues the list; it is empty on the last page. */
|
|
159
|
+
"nextOffset"?: string | undefined;
|
|
160
|
+
}
|
|
161
|
+
/** GetTaskInput identifies one task. */
|
|
162
|
+
interface GetTaskInput {
|
|
163
|
+
/** TaskID is the task's gid, the number in its Asana URL, such as 1204567890123456. */
|
|
164
|
+
"taskId": string;
|
|
165
|
+
}
|
|
166
|
+
/** CustomFieldValueInput sets one custom field. Set exactly one of Text, Number, EnumOptionID, and
|
|
167
|
+
* MultiEnumOptionIDs, matching the field's type; other custom field types are not supported. */
|
|
168
|
+
interface CustomFieldValueInput {
|
|
169
|
+
/** CustomFieldID is the custom field's gid. */
|
|
170
|
+
"customFieldId": string;
|
|
171
|
+
/** Text sets a text field. */
|
|
172
|
+
"text"?: string | undefined;
|
|
173
|
+
/** Number sets a number field. */
|
|
174
|
+
"number"?: number | undefined;
|
|
175
|
+
/** EnumOptionID selects an enum field's option by its gid, not its name. */
|
|
176
|
+
"enumOptionId"?: string | undefined;
|
|
177
|
+
/** MultiEnumOptionIDs selects a multi-enum field's options by gid, replacing the current selection. */
|
|
178
|
+
"multiEnumOptionIds"?: Array<string> | undefined;
|
|
179
|
+
}
|
|
180
|
+
/** CreateTaskInput describes one task. Set exactly one of ProjectID and WorkspaceID; SectionID requires
|
|
181
|
+
* ProjectID. */
|
|
182
|
+
interface CreateTaskInput {
|
|
183
|
+
/** Name is the one-line task name, at most 1024 characters. */
|
|
184
|
+
"name": string;
|
|
185
|
+
/** Notes is the plain-text description, at most 65536 characters; blank sends none. */
|
|
186
|
+
"notes"?: string | undefined;
|
|
187
|
+
/** ProjectID adds the task to this project gid; its workspace becomes the task's workspace. */
|
|
188
|
+
"projectId"?: string | undefined;
|
|
189
|
+
/** SectionID places the task in this section of ProjectID; blank uses the project's default section. */
|
|
190
|
+
"sectionId"?: string | undefined;
|
|
191
|
+
/** WorkspaceID creates the task in this workspace gid without a project. */
|
|
192
|
+
"workspaceId"?: string | undefined;
|
|
193
|
+
/** AssigneeID assigns the task to me, a user gid, or the email address of a workspace member; blank
|
|
194
|
+
* leaves it unassigned. */
|
|
195
|
+
"assigneeId"?: string | undefined;
|
|
196
|
+
/** DueOn is the due date as YYYY-MM-DD; blank sends none. */
|
|
197
|
+
"dueOn"?: string | undefined;
|
|
198
|
+
/** CustomFields sets up to 20 text, number, enum, or multi-enum custom field values. */
|
|
199
|
+
"customFields"?: Array<CustomFieldValueInput> | undefined;
|
|
200
|
+
}
|
|
201
|
+
/** CreateTaskOutput identifies the created task. On providerRejected and uncertain, TaskID is empty and the
|
|
202
|
+
* requested name and container are echoed so the application can reconcile. */
|
|
203
|
+
interface CreateTaskOutput {
|
|
204
|
+
/** TaskID is the new task's gid. */
|
|
205
|
+
"taskId"?: string | undefined;
|
|
206
|
+
/** Name echoes the requested name. */
|
|
207
|
+
"name": string;
|
|
208
|
+
/** ProjectID echoes the requested project. */
|
|
209
|
+
"projectId"?: string | undefined;
|
|
210
|
+
/** SectionID echoes the requested section. */
|
|
211
|
+
"sectionId"?: string | undefined;
|
|
212
|
+
/** WorkspaceID echoes the requested workspace. */
|
|
213
|
+
"workspaceId"?: string | undefined;
|
|
214
|
+
/** PermalinkURL is the new task's Asana web URL. */
|
|
215
|
+
"permalinkUrl"?: string | undefined;
|
|
216
|
+
/** CreatedAt is when Asana created the task. */
|
|
217
|
+
"createdAt"?: string | null | undefined;
|
|
218
|
+
}
|
|
219
|
+
/** UpdateTaskInput changes one task. Every set field is an absolute value, so sending the same update twice
|
|
220
|
+
* leaves the same task. Set at least one change. */
|
|
221
|
+
interface UpdateTaskInput {
|
|
222
|
+
/** TaskID is the task's gid. */
|
|
223
|
+
"taskId": string;
|
|
224
|
+
/** IsCompleted completes the task when true and reopens it when false; nil leaves it. */
|
|
225
|
+
"isCompleted"?: boolean | undefined;
|
|
226
|
+
/** AssigneeID assigns the task to me, a user gid, or a workspace member's email address; a pointer to
|
|
227
|
+
* "" unassigns it, and nil leaves the assignee. */
|
|
228
|
+
"assigneeId"?: string | undefined;
|
|
229
|
+
/** DueOn sets the due date as YYYY-MM-DD; a pointer to "" clears it, and nil leaves it. */
|
|
230
|
+
"dueOn"?: string | undefined;
|
|
231
|
+
/** CustomFields sets up to 20 text, number, enum, or multi-enum custom field values. */
|
|
232
|
+
"customFields"?: Array<CustomFieldValueInput> | undefined;
|
|
233
|
+
/** SectionID moves the task to this section, removing it from the project's other sections; blank leaves
|
|
234
|
+
* its sections. Asana places a moved task at the top of the section. */
|
|
235
|
+
"sectionId"?: string | undefined;
|
|
236
|
+
}
|
|
237
|
+
/** UpdateTaskOutput reports the update. On updated, Task is the task read back after every change. */
|
|
238
|
+
interface UpdateTaskOutput {
|
|
239
|
+
/** TaskID echoes the requested task. */
|
|
240
|
+
"taskId": string;
|
|
241
|
+
/** Task is the task after the update, set only on updated. */
|
|
242
|
+
"task"?: Task | undefined;
|
|
243
|
+
/** IsMovedToSection reports that Asana confirmed the section move, which happens before field changes. */
|
|
244
|
+
"isMovedToSection"?: boolean | undefined;
|
|
245
|
+
}
|
|
246
|
+
/** AddCommentInput describes one comment on one task. */
|
|
247
|
+
interface AddCommentInput {
|
|
248
|
+
/** TaskID is the task's gid. */
|
|
249
|
+
"taskId": string;
|
|
250
|
+
/** Text is the plain-text comment, at most 65536 characters; line breaks are kept and the text is never
|
|
251
|
+
* read as markup. */
|
|
252
|
+
"text": string;
|
|
253
|
+
}
|
|
254
|
+
/** AddCommentOutput identifies the added comment. On notFound, providerRejected, and uncertain, CommentID is
|
|
255
|
+
* empty and TaskID echoes the request. */
|
|
256
|
+
interface AddCommentOutput {
|
|
257
|
+
/** TaskID echoes the requested task. */
|
|
258
|
+
"taskId": string;
|
|
259
|
+
/** CommentID is the new comment story's gid. */
|
|
260
|
+
"commentId"?: string | undefined;
|
|
261
|
+
/** Author is the user that wrote the comment, the connection's user. */
|
|
262
|
+
"author"?: UserReference | undefined;
|
|
263
|
+
/** CreatedAt is when Asana stored the comment. */
|
|
264
|
+
"createdAt"?: string | null | undefined;
|
|
265
|
+
}
|
|
266
|
+
/** Runtime validator for ListTasksInput. */
|
|
267
|
+
declare const ListTasksInputSchema: z.ZodObject<{
|
|
268
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
269
|
+
sectionId: z.ZodOptional<z.ZodString>;
|
|
270
|
+
isIncompleteOnly: z.ZodOptional<z.ZodBoolean>;
|
|
271
|
+
completedSince: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
272
|
+
modifiedSince: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
273
|
+
pageSize: z.ZodOptional<z.ZodNumber>;
|
|
274
|
+
offset: z.ZodOptional<z.ZodString>;
|
|
275
|
+
}, z.core.$strict>;
|
|
276
|
+
/** Runtime validator for UserReference. */
|
|
277
|
+
declare const UserReferenceSchema: z.ZodObject<{
|
|
278
|
+
id: z.ZodString;
|
|
279
|
+
name: z.ZodOptional<z.ZodString>;
|
|
280
|
+
}, z.core.$strict>;
|
|
281
|
+
/** Runtime validator for ProjectReference. */
|
|
282
|
+
declare const ProjectReferenceSchema: z.ZodObject<{
|
|
283
|
+
id: z.ZodString;
|
|
284
|
+
name: z.ZodOptional<z.ZodString>;
|
|
285
|
+
}, z.core.$strict>;
|
|
286
|
+
/** Runtime validator for SectionReference. */
|
|
287
|
+
declare const SectionReferenceSchema: z.ZodObject<{
|
|
288
|
+
id: z.ZodString;
|
|
289
|
+
name: z.ZodOptional<z.ZodString>;
|
|
290
|
+
}, z.core.$strict>;
|
|
291
|
+
/** Runtime validator for TaskMembership. */
|
|
292
|
+
declare const TaskMembershipSchema: z.ZodObject<{
|
|
293
|
+
project: z.ZodObject<{
|
|
294
|
+
id: z.ZodString;
|
|
295
|
+
name: z.ZodOptional<z.ZodString>;
|
|
296
|
+
}, z.core.$strict>;
|
|
297
|
+
section: z.ZodOptional<z.ZodObject<{
|
|
298
|
+
id: z.ZodString;
|
|
299
|
+
name: z.ZodOptional<z.ZodString>;
|
|
300
|
+
}, z.core.$strict>>;
|
|
301
|
+
}, z.core.$strict>;
|
|
302
|
+
/** Runtime validator for TaskReference. */
|
|
303
|
+
declare const TaskReferenceSchema: z.ZodObject<{
|
|
304
|
+
id: z.ZodString;
|
|
305
|
+
name: z.ZodOptional<z.ZodString>;
|
|
306
|
+
}, z.core.$strict>;
|
|
307
|
+
/** Runtime validator for WorkspaceReference. */
|
|
308
|
+
declare const WorkspaceReferenceSchema: z.ZodObject<{
|
|
309
|
+
id: z.ZodString;
|
|
310
|
+
name: z.ZodOptional<z.ZodString>;
|
|
311
|
+
}, z.core.$strict>;
|
|
312
|
+
/** Runtime validator for EnumOptionReference. */
|
|
313
|
+
declare const EnumOptionReferenceSchema: z.ZodObject<{
|
|
314
|
+
id: z.ZodString;
|
|
315
|
+
name: z.ZodOptional<z.ZodString>;
|
|
316
|
+
}, z.core.$strict>;
|
|
317
|
+
/** Runtime validator for CustomFieldValue. */
|
|
318
|
+
declare const CustomFieldValueSchema: z.ZodObject<{
|
|
319
|
+
id: z.ZodString;
|
|
320
|
+
name: z.ZodOptional<z.ZodString>;
|
|
321
|
+
type: z.ZodOptional<z.ZodString>;
|
|
322
|
+
displayValue: z.ZodOptional<z.ZodString>;
|
|
323
|
+
textValue: z.ZodOptional<z.ZodString>;
|
|
324
|
+
numberValue: z.ZodOptional<z.ZodNumber>;
|
|
325
|
+
enumOption: z.ZodOptional<z.ZodObject<{
|
|
326
|
+
id: z.ZodString;
|
|
327
|
+
name: z.ZodOptional<z.ZodString>;
|
|
328
|
+
}, z.core.$strict>>;
|
|
329
|
+
multiEnumOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
330
|
+
id: z.ZodString;
|
|
331
|
+
name: z.ZodOptional<z.ZodString>;
|
|
332
|
+
}, z.core.$strict>>>;
|
|
333
|
+
}, z.core.$strict>;
|
|
334
|
+
/** Runtime validator for Task. */
|
|
335
|
+
declare const TaskSchema: z.ZodObject<{
|
|
336
|
+
id: z.ZodString;
|
|
337
|
+
name: z.ZodString;
|
|
338
|
+
resourceSubtype: z.ZodOptional<z.ZodString>;
|
|
339
|
+
isCompleted: z.ZodBoolean;
|
|
340
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
341
|
+
assignee: z.ZodOptional<z.ZodObject<{
|
|
342
|
+
id: z.ZodString;
|
|
343
|
+
name: z.ZodOptional<z.ZodString>;
|
|
344
|
+
}, z.core.$strict>>;
|
|
345
|
+
dueOn: z.ZodOptional<z.ZodString>;
|
|
346
|
+
dueAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
347
|
+
startOn: z.ZodOptional<z.ZodString>;
|
|
348
|
+
memberships: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
349
|
+
project: z.ZodObject<{
|
|
350
|
+
id: z.ZodString;
|
|
351
|
+
name: z.ZodOptional<z.ZodString>;
|
|
352
|
+
}, z.core.$strict>;
|
|
353
|
+
section: z.ZodOptional<z.ZodObject<{
|
|
354
|
+
id: z.ZodString;
|
|
355
|
+
name: z.ZodOptional<z.ZodString>;
|
|
356
|
+
}, z.core.$strict>>;
|
|
357
|
+
}, z.core.$strict>>>;
|
|
358
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
359
|
+
id: z.ZodString;
|
|
360
|
+
name: z.ZodOptional<z.ZodString>;
|
|
361
|
+
}, z.core.$strict>>;
|
|
362
|
+
workspace: z.ZodOptional<z.ZodObject<{
|
|
363
|
+
id: z.ZodString;
|
|
364
|
+
name: z.ZodOptional<z.ZodString>;
|
|
365
|
+
}, z.core.$strict>>;
|
|
366
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
367
|
+
isNotesTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
368
|
+
customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
369
|
+
id: z.ZodString;
|
|
370
|
+
name: z.ZodOptional<z.ZodString>;
|
|
371
|
+
type: z.ZodOptional<z.ZodString>;
|
|
372
|
+
displayValue: z.ZodOptional<z.ZodString>;
|
|
373
|
+
textValue: z.ZodOptional<z.ZodString>;
|
|
374
|
+
numberValue: z.ZodOptional<z.ZodNumber>;
|
|
375
|
+
enumOption: z.ZodOptional<z.ZodObject<{
|
|
376
|
+
id: z.ZodString;
|
|
377
|
+
name: z.ZodOptional<z.ZodString>;
|
|
378
|
+
}, z.core.$strict>>;
|
|
379
|
+
multiEnumOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
380
|
+
id: z.ZodString;
|
|
381
|
+
name: z.ZodOptional<z.ZodString>;
|
|
382
|
+
}, z.core.$strict>>>;
|
|
383
|
+
}, z.core.$strict>>>;
|
|
384
|
+
permalinkUrl: z.ZodOptional<z.ZodString>;
|
|
385
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
386
|
+
modifiedAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
387
|
+
}, z.core.$strict>;
|
|
388
|
+
/** Runtime validator for ListTasksOutput. */
|
|
389
|
+
declare const ListTasksOutputSchema: z.ZodObject<{
|
|
390
|
+
tasks: z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
391
|
+
id: z.ZodString;
|
|
392
|
+
name: z.ZodString;
|
|
393
|
+
resourceSubtype: z.ZodOptional<z.ZodString>;
|
|
394
|
+
isCompleted: z.ZodBoolean;
|
|
395
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
396
|
+
assignee: z.ZodOptional<z.ZodObject<{
|
|
397
|
+
id: z.ZodString;
|
|
398
|
+
name: z.ZodOptional<z.ZodString>;
|
|
399
|
+
}, z.core.$strict>>;
|
|
400
|
+
dueOn: z.ZodOptional<z.ZodString>;
|
|
401
|
+
dueAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
402
|
+
startOn: z.ZodOptional<z.ZodString>;
|
|
403
|
+
memberships: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
404
|
+
project: z.ZodObject<{
|
|
405
|
+
id: z.ZodString;
|
|
406
|
+
name: z.ZodOptional<z.ZodString>;
|
|
407
|
+
}, z.core.$strict>;
|
|
408
|
+
section: z.ZodOptional<z.ZodObject<{
|
|
409
|
+
id: z.ZodString;
|
|
410
|
+
name: z.ZodOptional<z.ZodString>;
|
|
411
|
+
}, z.core.$strict>>;
|
|
412
|
+
}, z.core.$strict>>>;
|
|
413
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
414
|
+
id: z.ZodString;
|
|
415
|
+
name: z.ZodOptional<z.ZodString>;
|
|
416
|
+
}, z.core.$strict>>;
|
|
417
|
+
workspace: z.ZodOptional<z.ZodObject<{
|
|
418
|
+
id: z.ZodString;
|
|
419
|
+
name: z.ZodOptional<z.ZodString>;
|
|
420
|
+
}, z.core.$strict>>;
|
|
421
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
422
|
+
isNotesTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
423
|
+
customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
424
|
+
id: z.ZodString;
|
|
425
|
+
name: z.ZodOptional<z.ZodString>;
|
|
426
|
+
type: z.ZodOptional<z.ZodString>;
|
|
427
|
+
displayValue: z.ZodOptional<z.ZodString>;
|
|
428
|
+
textValue: z.ZodOptional<z.ZodString>;
|
|
429
|
+
numberValue: z.ZodOptional<z.ZodNumber>;
|
|
430
|
+
enumOption: z.ZodOptional<z.ZodObject<{
|
|
431
|
+
id: z.ZodString;
|
|
432
|
+
name: z.ZodOptional<z.ZodString>;
|
|
433
|
+
}, z.core.$strict>>;
|
|
434
|
+
multiEnumOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
435
|
+
id: z.ZodString;
|
|
436
|
+
name: z.ZodOptional<z.ZodString>;
|
|
437
|
+
}, z.core.$strict>>>;
|
|
438
|
+
}, z.core.$strict>>>;
|
|
439
|
+
permalinkUrl: z.ZodOptional<z.ZodString>;
|
|
440
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
441
|
+
modifiedAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
442
|
+
}, z.core.$strict>>>;
|
|
443
|
+
nextOffset: z.ZodOptional<z.ZodString>;
|
|
444
|
+
}, z.core.$strict>;
|
|
445
|
+
/** Runtime validator for GetTaskInput. */
|
|
446
|
+
declare const GetTaskInputSchema: z.ZodObject<{
|
|
447
|
+
taskId: z.ZodString;
|
|
448
|
+
}, z.core.$strict>;
|
|
449
|
+
/** Runtime validator for CustomFieldValueInput. */
|
|
450
|
+
declare const CustomFieldValueInputSchema: z.ZodObject<{
|
|
451
|
+
customFieldId: z.ZodString;
|
|
452
|
+
text: z.ZodOptional<z.ZodString>;
|
|
453
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
454
|
+
enumOptionId: z.ZodOptional<z.ZodString>;
|
|
455
|
+
multiEnumOptionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
456
|
+
}, z.core.$strict>;
|
|
457
|
+
/** Runtime validator for CreateTaskInput. */
|
|
458
|
+
declare const CreateTaskInputSchema: z.ZodObject<{
|
|
459
|
+
name: z.ZodString;
|
|
460
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
461
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
462
|
+
sectionId: z.ZodOptional<z.ZodString>;
|
|
463
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
464
|
+
assigneeId: z.ZodOptional<z.ZodString>;
|
|
465
|
+
dueOn: z.ZodOptional<z.ZodString>;
|
|
466
|
+
customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
467
|
+
customFieldId: z.ZodString;
|
|
468
|
+
text: z.ZodOptional<z.ZodString>;
|
|
469
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
470
|
+
enumOptionId: z.ZodOptional<z.ZodString>;
|
|
471
|
+
multiEnumOptionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
472
|
+
}, z.core.$strict>>>;
|
|
473
|
+
}, z.core.$strict>;
|
|
474
|
+
/** Runtime validator for CreateTaskOutput. */
|
|
475
|
+
declare const CreateTaskOutputSchema: z.ZodObject<{
|
|
476
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
477
|
+
name: z.ZodString;
|
|
478
|
+
projectId: z.ZodOptional<z.ZodString>;
|
|
479
|
+
sectionId: z.ZodOptional<z.ZodString>;
|
|
480
|
+
workspaceId: z.ZodOptional<z.ZodString>;
|
|
481
|
+
permalinkUrl: z.ZodOptional<z.ZodString>;
|
|
482
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
483
|
+
}, z.core.$strict>;
|
|
484
|
+
/** Runtime validator for UpdateTaskInput. */
|
|
485
|
+
declare const UpdateTaskInputSchema: z.ZodObject<{
|
|
486
|
+
taskId: z.ZodString;
|
|
487
|
+
isCompleted: z.ZodOptional<z.ZodBoolean>;
|
|
488
|
+
assigneeId: z.ZodOptional<z.ZodString>;
|
|
489
|
+
dueOn: z.ZodOptional<z.ZodString>;
|
|
490
|
+
customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
491
|
+
customFieldId: z.ZodString;
|
|
492
|
+
text: z.ZodOptional<z.ZodString>;
|
|
493
|
+
number: z.ZodOptional<z.ZodNumber>;
|
|
494
|
+
enumOptionId: z.ZodOptional<z.ZodString>;
|
|
495
|
+
multiEnumOptionIds: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
496
|
+
}, z.core.$strict>>>;
|
|
497
|
+
sectionId: z.ZodOptional<z.ZodString>;
|
|
498
|
+
}, z.core.$strict>;
|
|
499
|
+
/** Runtime validator for UpdateTaskOutput. */
|
|
500
|
+
declare const UpdateTaskOutputSchema: z.ZodObject<{
|
|
501
|
+
taskId: z.ZodString;
|
|
502
|
+
task: z.ZodOptional<z.ZodObject<{
|
|
503
|
+
id: z.ZodString;
|
|
504
|
+
name: z.ZodString;
|
|
505
|
+
resourceSubtype: z.ZodOptional<z.ZodString>;
|
|
506
|
+
isCompleted: z.ZodBoolean;
|
|
507
|
+
completedAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
508
|
+
assignee: z.ZodOptional<z.ZodObject<{
|
|
509
|
+
id: z.ZodString;
|
|
510
|
+
name: z.ZodOptional<z.ZodString>;
|
|
511
|
+
}, z.core.$strict>>;
|
|
512
|
+
dueOn: z.ZodOptional<z.ZodString>;
|
|
513
|
+
dueAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
514
|
+
startOn: z.ZodOptional<z.ZodString>;
|
|
515
|
+
memberships: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
516
|
+
project: z.ZodObject<{
|
|
517
|
+
id: z.ZodString;
|
|
518
|
+
name: z.ZodOptional<z.ZodString>;
|
|
519
|
+
}, z.core.$strict>;
|
|
520
|
+
section: z.ZodOptional<z.ZodObject<{
|
|
521
|
+
id: z.ZodString;
|
|
522
|
+
name: z.ZodOptional<z.ZodString>;
|
|
523
|
+
}, z.core.$strict>>;
|
|
524
|
+
}, z.core.$strict>>>;
|
|
525
|
+
parent: z.ZodOptional<z.ZodObject<{
|
|
526
|
+
id: z.ZodString;
|
|
527
|
+
name: z.ZodOptional<z.ZodString>;
|
|
528
|
+
}, z.core.$strict>>;
|
|
529
|
+
workspace: z.ZodOptional<z.ZodObject<{
|
|
530
|
+
id: z.ZodString;
|
|
531
|
+
name: z.ZodOptional<z.ZodString>;
|
|
532
|
+
}, z.core.$strict>>;
|
|
533
|
+
notes: z.ZodOptional<z.ZodString>;
|
|
534
|
+
isNotesTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
535
|
+
customFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
536
|
+
id: z.ZodString;
|
|
537
|
+
name: z.ZodOptional<z.ZodString>;
|
|
538
|
+
type: z.ZodOptional<z.ZodString>;
|
|
539
|
+
displayValue: z.ZodOptional<z.ZodString>;
|
|
540
|
+
textValue: z.ZodOptional<z.ZodString>;
|
|
541
|
+
numberValue: z.ZodOptional<z.ZodNumber>;
|
|
542
|
+
enumOption: z.ZodOptional<z.ZodObject<{
|
|
543
|
+
id: z.ZodString;
|
|
544
|
+
name: z.ZodOptional<z.ZodString>;
|
|
545
|
+
}, z.core.$strict>>;
|
|
546
|
+
multiEnumOptions: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
547
|
+
id: z.ZodString;
|
|
548
|
+
name: z.ZodOptional<z.ZodString>;
|
|
549
|
+
}, z.core.$strict>>>;
|
|
550
|
+
}, z.core.$strict>>>;
|
|
551
|
+
permalinkUrl: z.ZodOptional<z.ZodString>;
|
|
552
|
+
createdAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
553
|
+
modifiedAt: z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>;
|
|
554
|
+
}, z.core.$strict>>;
|
|
555
|
+
isMovedToSection: z.ZodOptional<z.ZodBoolean>;
|
|
556
|
+
}, z.core.$strict>;
|
|
557
|
+
/** Runtime validator for AddCommentInput. */
|
|
558
|
+
declare const AddCommentInputSchema: z.ZodObject<{
|
|
559
|
+
taskId: z.ZodString;
|
|
560
|
+
text: z.ZodString;
|
|
561
|
+
}, z.core.$strict>;
|
|
562
|
+
/** Runtime validator for AddCommentOutput. */
|
|
563
|
+
declare const AddCommentOutputSchema: z.ZodObject<{
|
|
564
|
+
taskId: z.ZodString;
|
|
565
|
+
commentId: z.ZodOptional<z.ZodString>;
|
|
566
|
+
author: z.ZodOptional<z.ZodObject<{
|
|
567
|
+
id: z.ZodString;
|
|
568
|
+
name: z.ZodOptional<z.ZodString>;
|
|
569
|
+
}, z.core.$strict>>;
|
|
570
|
+
createdAt: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>>>;
|
|
571
|
+
}, z.core.$strict>;
|
|
572
|
+
|
|
573
|
+
/** Typed operations supplied by a client or mock. */
|
|
574
|
+
interface Operations {
|
|
575
|
+
/** Invoke listTasks through this connection. */
|
|
576
|
+
listTasks(): Query<ListTasksInput, ListTasksOutput>;
|
|
577
|
+
/** Invoke getTask through this connection. */
|
|
578
|
+
getTask(): Query<GetTaskInput, Task>;
|
|
579
|
+
/** Invoke createTask through this connection. */
|
|
580
|
+
createTask(): Mutation<CreateTaskInput, CreateTaskOutput>;
|
|
581
|
+
/** Invoke updateTask through this connection. */
|
|
582
|
+
updateTask(): Mutation<UpdateTaskInput, UpdateTaskOutput>;
|
|
583
|
+
/** Invoke addComment through this connection. */
|
|
584
|
+
addComment(): Mutation<AddCommentInput, AddCommentOutput>;
|
|
585
|
+
}
|
|
586
|
+
/** Named connector connection kept outside Flow state. */
|
|
587
|
+
declare class Connection<BoundOperations = Operations> {
|
|
588
|
+
/** Stable provider and connection name. */
|
|
589
|
+
readonly reference: ConnectionRef;
|
|
590
|
+
/** Bound provider operations. */
|
|
591
|
+
readonly operations: BoundOperations;
|
|
592
|
+
/** Validate a reference and bind operations. */
|
|
593
|
+
constructor(reference: ConnectionRef, operations: BoundOperations);
|
|
594
|
+
}
|
|
595
|
+
/** Bind a client to a named connection. */
|
|
596
|
+
declare function newConnection(client: Operations, reference: ConnectionRef): Connection;
|
|
597
|
+
/** Bind scripted operations to a named connection. */
|
|
598
|
+
declare function newConnectionWithOperations(operations: Operations, reference: ConnectionRef): Connection;
|
|
599
|
+
|
|
600
|
+
export { type AddCommentInput as A, TaskReferenceSchema as B, Connection as C, TaskSchema as D, type EnumOptionReference as E, UpdateTaskInputSchema as F, type GetTaskInput as G, UpdateTaskOutputSchema as H, type UserReference as I, UserReferenceSchema as J, WorkspaceReferenceSchema as K, type ListTasksInput as L, decodeCredentials as M, newConnection as N, type Operations as O, type ProjectReference as P, newConnectionWithOperations as Q, type SectionReference as S, type Task as T, type UpdateTaskInput as U, type WorkspaceReference as W, type AddCommentOutput as a, type CreateTaskInput as b, type CreateTaskOutput as c, type ListTasksOutput as d, type UpdateTaskOutput as e, type Config as f, type Credentials as g, AddCommentInputSchema as h, AddCommentOutputSchema as i, ConfigSchema as j, CreateTaskInputSchema as k, CreateTaskOutputSchema as l, type CredentialSource as m, type CustomFieldValue as n, type CustomFieldValueInput as o, CustomFieldValueInputSchema as p, CustomFieldValueSchema as q, EnumOptionReferenceSchema as r, GetTaskInputSchema as s, ListTasksInputSchema as t, ListTasksOutputSchema as u, ProjectReferenceSchema as v, SectionReferenceSchema as w, type TaskMembership as x, TaskMembershipSchema as y, type TaskReference as z };
|