@tashks/core 0.1.4 → 0.2.3
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/dist/src/id.d.ts.map +1 -1
- package/dist/src/id.js +3 -1
- package/dist/src/proseql-repository.d.ts.map +1 -1
- package/dist/src/proseql-repository.js +100 -4
- package/dist/src/query.d.ts +59 -11
- package/dist/src/query.d.ts.map +1 -1
- package/dist/src/query.js +97 -9
- package/dist/src/recurrence.d.ts.map +1 -1
- package/dist/src/recurrence.js +3 -0
- package/dist/src/repository.d.ts +38 -1
- package/dist/src/repository.d.ts.map +1 -1
- package/dist/src/repository.js +312 -6
- package/dist/src/schema.d.ts +108 -34
- package/dist/src/schema.d.ts.map +1 -1
- package/dist/src/schema.js +54 -10
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/query.test.d.ts +0 -2
- package/dist/src/query.test.d.ts.map +0 -1
- package/dist/src/query.test.js +0 -673
- package/dist/src/repository.test.d.ts +0 -2
- package/dist/src/repository.test.d.ts.map +0 -1
- package/dist/src/repository.test.js +0 -1443
- package/dist/src/schema.test.d.ts +0 -2
- package/dist/src/schema.test.d.ts.map +0 -1
- package/dist/src/schema.test.js +0 -123
package/dist/src/schema.d.ts.map
CHANGED
|
@@ -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,
|
|
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,sBAAgB,CAAC;AACxC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/D,eAAO,MA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package/dist/src/schema.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as Schema from "effect/Schema";
|
|
2
2
|
const currentDateIso = () => new Date().toISOString().slice(0, 10);
|
|
3
|
-
export const TaskStatus = Schema.
|
|
4
|
-
export const TaskArea = Schema.
|
|
5
|
-
export const TaskUrgency = Schema.
|
|
6
|
-
export const TaskEnergy = Schema.
|
|
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.
|
|
12
|
-
export const TaskRecurrenceStrategy = Schema.
|
|
11
|
+
export const TaskRecurrenceTrigger = Schema.String;
|
|
12
|
+
export const TaskRecurrenceStrategy = Schema.String;
|
|
13
13
|
export const Task = Schema.Struct({
|
|
14
14
|
id: Schema.String,
|
|
15
15
|
title: Schema.String,
|
|
16
16
|
status: TaskStatus,
|
|
17
17
|
area: TaskArea,
|
|
18
|
-
|
|
18
|
+
projects: Schema.Array(Schema.String),
|
|
19
19
|
tags: Schema.Array(Schema.String),
|
|
20
20
|
created: Schema.String,
|
|
21
21
|
updated: Schema.String,
|
|
@@ -35,13 +35,16 @@ export const Task = Schema.Struct({
|
|
|
35
35
|
recurrence_trigger: TaskRecurrenceTrigger,
|
|
36
36
|
recurrence_strategy: TaskRecurrenceStrategy,
|
|
37
37
|
recurrence_last_generated: Schema.NullOr(Schema.String),
|
|
38
|
+
related: Schema.Array(Schema.String),
|
|
39
|
+
is_template: Schema.Boolean,
|
|
40
|
+
from_template: Schema.NullOr(Schema.String),
|
|
38
41
|
});
|
|
39
42
|
export const TaskCreateInput = Schema.Struct({
|
|
40
43
|
title: Schema.String,
|
|
41
44
|
status: Schema.optionalWith(TaskStatus, { default: () => "active" }),
|
|
42
45
|
area: Schema.optionalWith(TaskArea, { default: () => "personal" }),
|
|
43
|
-
|
|
44
|
-
default: () =>
|
|
46
|
+
projects: Schema.optionalWith(Schema.Array(Schema.String), {
|
|
47
|
+
default: () => [],
|
|
45
48
|
}),
|
|
46
49
|
tags: Schema.optionalWith(Schema.Array(Schema.String), {
|
|
47
50
|
default: () => [],
|
|
@@ -96,13 +99,22 @@ export const TaskCreateInput = Schema.Struct({
|
|
|
96
99
|
recurrence_last_generated: Schema.optionalWith(Schema.NullOr(Schema.String), {
|
|
97
100
|
default: () => null,
|
|
98
101
|
}),
|
|
102
|
+
related: Schema.optionalWith(Schema.Array(Schema.String), {
|
|
103
|
+
default: () => [],
|
|
104
|
+
}),
|
|
105
|
+
is_template: Schema.optionalWith(Schema.Boolean, {
|
|
106
|
+
default: () => false,
|
|
107
|
+
}),
|
|
108
|
+
from_template: Schema.optionalWith(Schema.NullOr(Schema.String), {
|
|
109
|
+
default: () => null,
|
|
110
|
+
}),
|
|
99
111
|
});
|
|
100
112
|
export const TaskPatch = Schema.Struct({
|
|
101
113
|
id: Schema.optionalWith(Schema.String, { exact: true }),
|
|
102
114
|
title: Schema.optionalWith(Schema.String, { exact: true }),
|
|
103
115
|
status: Schema.optionalWith(TaskStatus, { exact: true }),
|
|
104
116
|
area: Schema.optionalWith(TaskArea, { exact: true }),
|
|
105
|
-
|
|
117
|
+
projects: Schema.optionalWith(Schema.Array(Schema.String), { exact: true }),
|
|
106
118
|
tags: Schema.optionalWith(Schema.Array(Schema.String), { exact: true }),
|
|
107
119
|
created: Schema.optionalWith(Schema.String, { exact: true }),
|
|
108
120
|
updated: Schema.optionalWith(Schema.String, { exact: true }),
|
|
@@ -140,6 +152,38 @@ export const TaskPatch = Schema.Struct({
|
|
|
140
152
|
recurrence_last_generated: Schema.optionalWith(Schema.NullOr(Schema.String), {
|
|
141
153
|
exact: true,
|
|
142
154
|
}),
|
|
155
|
+
related: Schema.optionalWith(Schema.Array(Schema.String), { exact: true }),
|
|
156
|
+
is_template: Schema.optionalWith(Schema.Boolean, { exact: true }),
|
|
157
|
+
from_template: Schema.optionalWith(Schema.NullOr(Schema.String), {
|
|
158
|
+
exact: true,
|
|
159
|
+
}),
|
|
160
|
+
});
|
|
161
|
+
export const ProjectStatus = Schema.String;
|
|
162
|
+
export const Project = Schema.Struct({
|
|
163
|
+
id: Schema.String,
|
|
164
|
+
title: Schema.String,
|
|
165
|
+
status: ProjectStatus,
|
|
166
|
+
area: TaskArea,
|
|
167
|
+
description: Schema.String,
|
|
168
|
+
tags: Schema.Array(Schema.String),
|
|
169
|
+
created: Schema.String,
|
|
170
|
+
updated: Schema.String,
|
|
171
|
+
});
|
|
172
|
+
export const ProjectCreateInput = Schema.Struct({
|
|
173
|
+
title: Schema.String,
|
|
174
|
+
status: Schema.optionalWith(ProjectStatus, { default: () => "active" }),
|
|
175
|
+
area: Schema.optionalWith(TaskArea, { default: () => "personal" }),
|
|
176
|
+
description: Schema.optionalWith(Schema.String, { default: () => "" }),
|
|
177
|
+
tags: Schema.optionalWith(Schema.Array(Schema.String), { default: () => [] }),
|
|
178
|
+
created: Schema.optionalWith(Schema.String, { default: currentDateIso }),
|
|
179
|
+
updated: Schema.optionalWith(Schema.String, { default: currentDateIso }),
|
|
180
|
+
});
|
|
181
|
+
export const ProjectPatch = Schema.Struct({
|
|
182
|
+
title: Schema.optionalWith(Schema.String, { exact: true }),
|
|
183
|
+
status: Schema.optionalWith(ProjectStatus, { exact: true }),
|
|
184
|
+
area: Schema.optionalWith(TaskArea, { exact: true }),
|
|
185
|
+
description: Schema.optionalWith(Schema.String, { exact: true }),
|
|
186
|
+
tags: Schema.optionalWith(Schema.Array(Schema.String), { exact: true }),
|
|
143
187
|
});
|
|
144
188
|
export const WorkLogEntry = Schema.Struct({
|
|
145
189
|
id: Schema.String,
|