@tashks/core 0.1.5 → 0.3.0

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.
@@ -1,32 +1,43 @@
1
1
  import * as Schema from "effect/Schema";
2
- export declare const TaskStatus: Schema.Literal<["active", "backlog", "blocked", "done", "dropped", "on-hold"]>;
2
+ export declare const TaskStatus: typeof Schema.String;
3
3
  export type TaskStatus = Schema.Schema.Type<typeof TaskStatus>;
4
- export declare const TaskArea: Schema.Literal<["health", "infrastructure", "work", "personal", "blog", "code", "home", "side-projects"]>;
4
+ export declare const TaskArea: typeof Schema.String;
5
5
  export type TaskArea = Schema.Schema.Type<typeof TaskArea>;
6
- export declare const TaskUrgency: Schema.Literal<["low", "medium", "high", "urgent", "critical"]>;
6
+ export declare const TaskUrgency: typeof Schema.String;
7
7
  export type TaskUrgency = Schema.Schema.Type<typeof TaskUrgency>;
8
- export declare const TaskEnergy: Schema.Literal<["low", "medium", "high"]>;
8
+ export declare const TaskEnergy: typeof Schema.String;
9
9
  export type TaskEnergy = Schema.Schema.Type<typeof TaskEnergy>;
10
10
  export declare const Subtask: Schema.Struct<{
11
11
  text: typeof Schema.String;
12
12
  done: typeof Schema.Boolean;
13
13
  }>;
14
14
  export type Subtask = Schema.Schema.Type<typeof Subtask>;
15
- export declare const TaskRecurrenceTrigger: Schema.Literal<["clock", "completion"]>;
15
+ export declare const TaskRecurrenceTrigger: typeof Schema.String;
16
16
  export type TaskRecurrenceTrigger = Schema.Schema.Type<typeof TaskRecurrenceTrigger>;
17
- export declare const TaskRecurrenceStrategy: Schema.Literal<["replace", "accumulate"]>;
17
+ export declare const TaskRecurrenceStrategy: typeof Schema.String;
18
18
  export type TaskRecurrenceStrategy = Schema.Schema.Type<typeof TaskRecurrenceStrategy>;
19
+ export declare const Comment: Schema.Struct<{
20
+ text: typeof Schema.String;
21
+ author: Schema.optionalWith<typeof Schema.String, {
22
+ default: () => string;
23
+ }>;
24
+ created: Schema.optionalWith<typeof Schema.String, {
25
+ default: () => string;
26
+ }>;
27
+ }>;
28
+ export type Comment = Schema.Schema.Type<typeof Comment>;
19
29
  export declare const Task: Schema.Struct<{
20
30
  id: typeof Schema.String;
21
31
  title: typeof Schema.String;
22
- status: Schema.Literal<["active", "backlog", "blocked", "done", "dropped", "on-hold"]>;
23
- area: Schema.Literal<["health", "infrastructure", "work", "personal", "blog", "code", "home", "side-projects"]>;
24
- project: Schema.NullOr<typeof Schema.String>;
32
+ description: typeof Schema.String;
33
+ status: typeof Schema.String;
34
+ area: typeof Schema.String;
35
+ projects: Schema.Array$<typeof Schema.String>;
25
36
  tags: Schema.Array$<typeof Schema.String>;
26
37
  created: typeof Schema.String;
27
38
  updated: typeof Schema.String;
28
- urgency: Schema.Literal<["low", "medium", "high", "urgent", "critical"]>;
29
- energy: Schema.Literal<["low", "medium", "high"]>;
39
+ urgency: typeof Schema.String;
40
+ energy: typeof Schema.String;
30
41
  due: Schema.NullOr<typeof Schema.String>;
31
42
  context: typeof Schema.String;
32
43
  subtasks: Schema.Array$<Schema.Struct<{
@@ -41,21 +52,38 @@ export declare const Task: Schema.Struct<{
41
52
  defer_until: Schema.NullOr<typeof Schema.String>;
42
53
  nudge_count: typeof Schema.Number;
43
54
  recurrence: Schema.NullOr<typeof Schema.String>;
44
- recurrence_trigger: Schema.Literal<["clock", "completion"]>;
45
- recurrence_strategy: Schema.Literal<["replace", "accumulate"]>;
55
+ recurrence_trigger: typeof Schema.String;
56
+ recurrence_strategy: typeof Schema.String;
46
57
  recurrence_last_generated: Schema.NullOr<typeof Schema.String>;
58
+ related: Schema.Array$<typeof Schema.String>;
59
+ is_template: typeof Schema.Boolean;
60
+ from_template: Schema.NullOr<typeof Schema.String>;
61
+ priority: Schema.NullOr<typeof Schema.Number>;
62
+ type: typeof Schema.String;
63
+ assignee: Schema.NullOr<typeof Schema.String>;
64
+ parent: Schema.NullOr<typeof Schema.String>;
65
+ close_reason: Schema.NullOr<typeof Schema.String>;
66
+ comments: Schema.Array$<Schema.Struct<{
67
+ text: typeof Schema.String;
68
+ author: Schema.optionalWith<typeof Schema.String, {
69
+ default: () => string;
70
+ }>;
71
+ created: Schema.optionalWith<typeof Schema.String, {
72
+ default: () => string;
73
+ }>;
74
+ }>>;
47
75
  }>;
48
76
  export type Task = Schema.Schema.Type<typeof Task>;
49
77
  export declare const TaskCreateInput: Schema.Struct<{
50
78
  title: typeof Schema.String;
51
- status: Schema.optionalWith<Schema.Literal<["active", "backlog", "blocked", "done", "dropped", "on-hold"]>, {
52
- default: () => "active";
79
+ status: Schema.optionalWith<typeof Schema.String, {
80
+ default: () => string;
53
81
  }>;
54
- area: Schema.optionalWith<Schema.Literal<["health", "infrastructure", "work", "personal", "blog", "code", "home", "side-projects"]>, {
55
- default: () => "personal";
82
+ area: Schema.optionalWith<typeof Schema.String, {
83
+ default: () => string;
56
84
  }>;
57
- project: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
58
- default: () => null;
85
+ projects: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
86
+ default: () => never[];
59
87
  }>;
60
88
  tags: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
61
89
  default: () => never[];
@@ -66,11 +94,11 @@ export declare const TaskCreateInput: Schema.Struct<{
66
94
  updated: Schema.optionalWith<typeof Schema.String, {
67
95
  default: () => string;
68
96
  }>;
69
- urgency: Schema.optionalWith<Schema.Literal<["low", "medium", "high", "urgent", "critical"]>, {
70
- default: () => "medium";
97
+ urgency: Schema.optionalWith<typeof Schema.String, {
98
+ default: () => string;
71
99
  }>;
72
- energy: Schema.optionalWith<Schema.Literal<["low", "medium", "high"]>, {
73
- default: () => "medium";
100
+ energy: Schema.optionalWith<typeof Schema.String, {
101
+ default: () => string;
74
102
  }>;
75
103
  due: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
76
104
  default: () => null;
@@ -108,15 +136,53 @@ export declare const TaskCreateInput: Schema.Struct<{
108
136
  recurrence: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
109
137
  default: () => null;
110
138
  }>;
111
- recurrence_trigger: Schema.optionalWith<Schema.Literal<["clock", "completion"]>, {
112
- default: () => "clock";
139
+ recurrence_trigger: Schema.optionalWith<typeof Schema.String, {
140
+ default: () => string;
113
141
  }>;
114
- recurrence_strategy: Schema.optionalWith<Schema.Literal<["replace", "accumulate"]>, {
115
- default: () => "replace";
142
+ recurrence_strategy: Schema.optionalWith<typeof Schema.String, {
143
+ default: () => string;
116
144
  }>;
117
145
  recurrence_last_generated: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
118
146
  default: () => null;
119
147
  }>;
148
+ related: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
149
+ default: () => never[];
150
+ }>;
151
+ is_template: Schema.optionalWith<typeof Schema.Boolean, {
152
+ default: () => false;
153
+ }>;
154
+ from_template: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
155
+ default: () => null;
156
+ }>;
157
+ priority: Schema.optionalWith<Schema.NullOr<typeof Schema.Number>, {
158
+ default: () => null;
159
+ }>;
160
+ type: Schema.optionalWith<typeof Schema.String, {
161
+ default: () => string;
162
+ }>;
163
+ assignee: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
164
+ default: () => null;
165
+ }>;
166
+ parent: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
167
+ default: () => null;
168
+ }>;
169
+ close_reason: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
170
+ default: () => null;
171
+ }>;
172
+ description: Schema.optionalWith<typeof Schema.String, {
173
+ default: () => string;
174
+ }>;
175
+ comments: Schema.optionalWith<Schema.Array$<Schema.Struct<{
176
+ text: typeof Schema.String;
177
+ author: Schema.optionalWith<typeof Schema.String, {
178
+ default: () => string;
179
+ }>;
180
+ created: Schema.optionalWith<typeof Schema.String, {
181
+ default: () => string;
182
+ }>;
183
+ }>>, {
184
+ default: () => never[];
185
+ }>;
120
186
  }>;
121
187
  export type TaskCreateInput = Schema.Schema.Encoded<typeof TaskCreateInput>;
122
188
  export declare const TaskPatch: Schema.Struct<{
@@ -126,13 +192,13 @@ export declare const TaskPatch: Schema.Struct<{
126
192
  title: Schema.optionalWith<typeof Schema.String, {
127
193
  exact: true;
128
194
  }>;
129
- status: Schema.optionalWith<Schema.Literal<["active", "backlog", "blocked", "done", "dropped", "on-hold"]>, {
195
+ status: Schema.optionalWith<typeof Schema.String, {
130
196
  exact: true;
131
197
  }>;
132
- area: Schema.optionalWith<Schema.Literal<["health", "infrastructure", "work", "personal", "blog", "code", "home", "side-projects"]>, {
198
+ area: Schema.optionalWith<typeof Schema.String, {
133
199
  exact: true;
134
200
  }>;
135
- project: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
201
+ projects: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
136
202
  exact: true;
137
203
  }>;
138
204
  tags: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
@@ -144,10 +210,10 @@ export declare const TaskPatch: Schema.Struct<{
144
210
  updated: Schema.optionalWith<typeof Schema.String, {
145
211
  exact: true;
146
212
  }>;
147
- urgency: Schema.optionalWith<Schema.Literal<["low", "medium", "high", "urgent", "critical"]>, {
213
+ urgency: Schema.optionalWith<typeof Schema.String, {
148
214
  exact: true;
149
215
  }>;
150
- energy: Schema.optionalWith<Schema.Literal<["low", "medium", "high"]>, {
216
+ energy: Schema.optionalWith<typeof Schema.String, {
151
217
  exact: true;
152
218
  }>;
153
219
  due: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
@@ -186,17 +252,108 @@ export declare const TaskPatch: Schema.Struct<{
186
252
  recurrence: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
187
253
  exact: true;
188
254
  }>;
189
- recurrence_trigger: Schema.optionalWith<Schema.Literal<["clock", "completion"]>, {
255
+ recurrence_trigger: Schema.optionalWith<typeof Schema.String, {
190
256
  exact: true;
191
257
  }>;
192
- recurrence_strategy: Schema.optionalWith<Schema.Literal<["replace", "accumulate"]>, {
258
+ recurrence_strategy: Schema.optionalWith<typeof Schema.String, {
193
259
  exact: true;
194
260
  }>;
195
261
  recurrence_last_generated: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
196
262
  exact: true;
197
263
  }>;
264
+ related: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
265
+ exact: true;
266
+ }>;
267
+ is_template: Schema.optionalWith<typeof Schema.Boolean, {
268
+ exact: true;
269
+ }>;
270
+ from_template: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
271
+ exact: true;
272
+ }>;
273
+ priority: Schema.optionalWith<Schema.NullOr<typeof Schema.Number>, {
274
+ exact: true;
275
+ }>;
276
+ type: Schema.optionalWith<typeof Schema.String, {
277
+ exact: true;
278
+ }>;
279
+ assignee: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
280
+ exact: true;
281
+ }>;
282
+ parent: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
283
+ exact: true;
284
+ }>;
285
+ close_reason: Schema.optionalWith<Schema.NullOr<typeof Schema.String>, {
286
+ exact: true;
287
+ }>;
288
+ description: Schema.optionalWith<typeof Schema.String, {
289
+ exact: true;
290
+ }>;
291
+ comments: Schema.optionalWith<Schema.Array$<Schema.Struct<{
292
+ text: typeof Schema.String;
293
+ author: Schema.optionalWith<typeof Schema.String, {
294
+ default: () => string;
295
+ }>;
296
+ created: Schema.optionalWith<typeof Schema.String, {
297
+ default: () => string;
298
+ }>;
299
+ }>>, {
300
+ exact: true;
301
+ }>;
198
302
  }>;
199
303
  export type TaskPatch = Schema.Schema.Encoded<typeof TaskPatch>;
304
+ export declare const ProjectStatus: typeof Schema.String;
305
+ export type ProjectStatus = Schema.Schema.Type<typeof ProjectStatus>;
306
+ export declare const Project: Schema.Struct<{
307
+ id: typeof Schema.String;
308
+ title: typeof Schema.String;
309
+ status: typeof Schema.String;
310
+ area: typeof Schema.String;
311
+ description: typeof Schema.String;
312
+ tags: Schema.Array$<typeof Schema.String>;
313
+ created: typeof Schema.String;
314
+ updated: typeof Schema.String;
315
+ }>;
316
+ export type Project = Schema.Schema.Type<typeof Project>;
317
+ export declare const ProjectCreateInput: Schema.Struct<{
318
+ title: typeof Schema.String;
319
+ status: Schema.optionalWith<typeof Schema.String, {
320
+ default: () => string;
321
+ }>;
322
+ area: Schema.optionalWith<typeof Schema.String, {
323
+ default: () => string;
324
+ }>;
325
+ description: Schema.optionalWith<typeof Schema.String, {
326
+ default: () => string;
327
+ }>;
328
+ tags: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
329
+ default: () => string[];
330
+ }>;
331
+ created: Schema.optionalWith<typeof Schema.String, {
332
+ default: () => string;
333
+ }>;
334
+ updated: Schema.optionalWith<typeof Schema.String, {
335
+ default: () => string;
336
+ }>;
337
+ }>;
338
+ export type ProjectCreateInput = Schema.Schema.Encoded<typeof ProjectCreateInput>;
339
+ export declare const ProjectPatch: Schema.Struct<{
340
+ title: Schema.optionalWith<typeof Schema.String, {
341
+ exact: true;
342
+ }>;
343
+ status: Schema.optionalWith<typeof Schema.String, {
344
+ exact: true;
345
+ }>;
346
+ area: Schema.optionalWith<typeof Schema.String, {
347
+ exact: true;
348
+ }>;
349
+ description: Schema.optionalWith<typeof Schema.String, {
350
+ exact: true;
351
+ }>;
352
+ tags: Schema.optionalWith<Schema.Array$<typeof Schema.String>, {
353
+ exact: true;
354
+ }>;
355
+ }>;
356
+ export type ProjectPatch = Schema.Schema.Encoded<typeof ProjectPatch>;
200
357
  export declare const WorkLogEntry: Schema.Struct<{
201
358
  id: typeof Schema.String;
202
359
  task_id: typeof Schema.String;
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAIxC,eAAO,MAAM,UAAU,gFAOtB,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/D,eAAO,MAAM,QA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AO,SAAS,CAAC,CAAC;AAEhE,eAAO,MAAM,aAAa,sBAAgB,CAAC;AAC3C,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,aAAa,CAAC,CAAC;AAErE,eAAO,MAAM,OAAO;;;;;;;;;EASlB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,CAAC;AAEzD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;uBAKgD,MAAM,EAAE;;;uBAhQ5D,MAAM;;;uBAAN,MAAM;;EAmQ/B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAElF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;EAMvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,YAAY,CAAC,CAAC;AAEtE,eAAO,MAAM,YAAY;;;;;;EAMvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,YAAY,CAAC,CAAC;AAEnE,eAAO,MAAM,kBAAkB;;;;;;EAM7B,CAAC;AACH,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CACrD,OAAO,kBAAkB,CACzB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;EAQvB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,YAAY,CAAC,CAAC"}
@@ -1,21 +1,29 @@
1
1
  import * as Schema from "effect/Schema";
2
2
  const currentDateIso = () => new Date().toISOString().slice(0, 10);
3
- export const TaskStatus = Schema.Literal("active", "backlog", "blocked", "done", "dropped", "on-hold");
4
- export const TaskArea = Schema.Literal("health", "infrastructure", "work", "personal", "blog", "code", "home", "side-projects");
5
- export const TaskUrgency = Schema.Literal("low", "medium", "high", "urgent", "critical");
6
- export const TaskEnergy = Schema.Literal("low", "medium", "high");
3
+ export const TaskStatus = Schema.String;
4
+ export const TaskArea = Schema.String;
5
+ export const TaskUrgency = Schema.String;
6
+ export const TaskEnergy = Schema.String;
7
7
  export const Subtask = Schema.Struct({
8
8
  text: Schema.String,
9
9
  done: Schema.Boolean,
10
10
  });
11
- export const TaskRecurrenceTrigger = Schema.Literal("clock", "completion");
12
- export const TaskRecurrenceStrategy = Schema.Literal("replace", "accumulate");
11
+ export const TaskRecurrenceTrigger = Schema.String;
12
+ export const TaskRecurrenceStrategy = Schema.String;
13
+ export const Comment = Schema.Struct({
14
+ text: Schema.String,
15
+ author: Schema.optionalWith(Schema.String, { default: () => "" }),
16
+ created: Schema.optionalWith(Schema.String, {
17
+ default: () => new Date().toISOString().slice(0, 10),
18
+ }),
19
+ });
13
20
  export const Task = Schema.Struct({
14
21
  id: Schema.String,
15
22
  title: Schema.String,
23
+ description: Schema.String,
16
24
  status: TaskStatus,
17
25
  area: TaskArea,
18
- project: Schema.NullOr(Schema.String),
26
+ projects: Schema.Array(Schema.String),
19
27
  tags: Schema.Array(Schema.String),
20
28
  created: Schema.String,
21
29
  updated: Schema.String,
@@ -35,13 +43,22 @@ export const Task = Schema.Struct({
35
43
  recurrence_trigger: TaskRecurrenceTrigger,
36
44
  recurrence_strategy: TaskRecurrenceStrategy,
37
45
  recurrence_last_generated: Schema.NullOr(Schema.String),
46
+ related: Schema.Array(Schema.String),
47
+ is_template: Schema.Boolean,
48
+ from_template: Schema.NullOr(Schema.String),
49
+ priority: Schema.NullOr(Schema.Number),
50
+ type: Schema.String,
51
+ assignee: Schema.NullOr(Schema.String),
52
+ parent: Schema.NullOr(Schema.String),
53
+ close_reason: Schema.NullOr(Schema.String),
54
+ comments: Schema.Array(Comment),
38
55
  });
39
56
  export const TaskCreateInput = Schema.Struct({
40
57
  title: Schema.String,
41
58
  status: Schema.optionalWith(TaskStatus, { default: () => "active" }),
42
59
  area: Schema.optionalWith(TaskArea, { default: () => "personal" }),
43
- project: Schema.optionalWith(Schema.NullOr(Schema.String), {
44
- default: () => null,
60
+ projects: Schema.optionalWith(Schema.Array(Schema.String), {
61
+ default: () => [],
45
62
  }),
46
63
  tags: Schema.optionalWith(Schema.Array(Schema.String), {
47
64
  default: () => [],
@@ -96,13 +113,43 @@ export const TaskCreateInput = Schema.Struct({
96
113
  recurrence_last_generated: Schema.optionalWith(Schema.NullOr(Schema.String), {
97
114
  default: () => null,
98
115
  }),
116
+ related: Schema.optionalWith(Schema.Array(Schema.String), {
117
+ default: () => [],
118
+ }),
119
+ is_template: Schema.optionalWith(Schema.Boolean, {
120
+ default: () => false,
121
+ }),
122
+ from_template: Schema.optionalWith(Schema.NullOr(Schema.String), {
123
+ default: () => null,
124
+ }),
125
+ priority: Schema.optionalWith(Schema.NullOr(Schema.Number), {
126
+ default: () => null,
127
+ }),
128
+ type: Schema.optionalWith(Schema.String, {
129
+ default: () => "task",
130
+ }),
131
+ assignee: Schema.optionalWith(Schema.NullOr(Schema.String), {
132
+ default: () => null,
133
+ }),
134
+ parent: Schema.optionalWith(Schema.NullOr(Schema.String), {
135
+ default: () => null,
136
+ }),
137
+ close_reason: Schema.optionalWith(Schema.NullOr(Schema.String), {
138
+ default: () => null,
139
+ }),
140
+ description: Schema.optionalWith(Schema.String, {
141
+ default: () => "",
142
+ }),
143
+ comments: Schema.optionalWith(Schema.Array(Comment), {
144
+ default: () => [],
145
+ }),
99
146
  });
100
147
  export const TaskPatch = Schema.Struct({
101
148
  id: Schema.optionalWith(Schema.String, { exact: true }),
102
149
  title: Schema.optionalWith(Schema.String, { exact: true }),
103
150
  status: Schema.optionalWith(TaskStatus, { exact: true }),
104
151
  area: Schema.optionalWith(TaskArea, { exact: true }),
105
- project: Schema.optionalWith(Schema.NullOr(Schema.String), { exact: true }),
152
+ projects: Schema.optionalWith(Schema.Array(Schema.String), { exact: true }),
106
153
  tags: Schema.optionalWith(Schema.Array(Schema.String), { exact: true }),
107
154
  created: Schema.optionalWith(Schema.String, { exact: true }),
108
155
  updated: Schema.optionalWith(Schema.String, { exact: true }),
@@ -140,6 +187,53 @@ export const TaskPatch = Schema.Struct({
140
187
  recurrence_last_generated: Schema.optionalWith(Schema.NullOr(Schema.String), {
141
188
  exact: true,
142
189
  }),
190
+ related: Schema.optionalWith(Schema.Array(Schema.String), { exact: true }),
191
+ is_template: Schema.optionalWith(Schema.Boolean, { exact: true }),
192
+ from_template: Schema.optionalWith(Schema.NullOr(Schema.String), {
193
+ exact: true,
194
+ }),
195
+ priority: Schema.optionalWith(Schema.NullOr(Schema.Number), {
196
+ exact: true,
197
+ }),
198
+ type: Schema.optionalWith(Schema.String, { exact: true }),
199
+ assignee: Schema.optionalWith(Schema.NullOr(Schema.String), {
200
+ exact: true,
201
+ }),
202
+ parent: Schema.optionalWith(Schema.NullOr(Schema.String), {
203
+ exact: true,
204
+ }),
205
+ close_reason: Schema.optionalWith(Schema.NullOr(Schema.String), {
206
+ exact: true,
207
+ }),
208
+ description: Schema.optionalWith(Schema.String, { exact: true }),
209
+ comments: Schema.optionalWith(Schema.Array(Comment), { exact: true }),
210
+ });
211
+ export const ProjectStatus = Schema.String;
212
+ export const Project = Schema.Struct({
213
+ id: Schema.String,
214
+ title: Schema.String,
215
+ status: ProjectStatus,
216
+ area: TaskArea,
217
+ description: Schema.String,
218
+ tags: Schema.Array(Schema.String),
219
+ created: Schema.String,
220
+ updated: Schema.String,
221
+ });
222
+ export const ProjectCreateInput = Schema.Struct({
223
+ title: Schema.String,
224
+ status: Schema.optionalWith(ProjectStatus, { default: () => "active" }),
225
+ area: Schema.optionalWith(TaskArea, { default: () => "personal" }),
226
+ description: Schema.optionalWith(Schema.String, { default: () => "" }),
227
+ tags: Schema.optionalWith(Schema.Array(Schema.String), { default: () => [] }),
228
+ created: Schema.optionalWith(Schema.String, { default: currentDateIso }),
229
+ updated: Schema.optionalWith(Schema.String, { default: currentDateIso }),
230
+ });
231
+ export const ProjectPatch = Schema.Struct({
232
+ title: Schema.optionalWith(Schema.String, { exact: true }),
233
+ status: Schema.optionalWith(ProjectStatus, { exact: true }),
234
+ area: Schema.optionalWith(TaskArea, { exact: true }),
235
+ description: Schema.optionalWith(Schema.String, { exact: true }),
236
+ tags: Schema.optionalWith(Schema.Array(Schema.String), { exact: true }),
143
237
  });
144
238
  export const WorkLogEntry = Schema.Struct({
145
239
  id: Schema.String,