@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.
@@ -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,QAAQ,2GASpB,CAAC;AACF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,QAAQ,CAAC,CAAC;AAE3D,eAAO,MAAM,WAAW,iEAMvB,CAAC;AACF,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,WAAW,CAAC,CAAC;AAEjE,eAAO,MAAM,UAAU,2CAA0C,CAAC;AAClE,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;AAE/D,eAAO,MAAM,OAAO;;;EAGlB,CAAC;AACH,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,OAAO,CAAC,CAAC;AAEzD,eAAO,MAAM,qBAAqB,yCAAwC,CAAC;AAC3E,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CACrD,OAAO,qBAAqB,CAC5B,CAAC;AAEF,eAAO,MAAM,sBAAsB,2CAA0C,CAAC;AAC9E,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CACtD,OAAO,sBAAsB,CAC7B,CAAC;AAEF,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBf,CAAC;AACH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 @@
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
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
- project: Schema.NullOr(Schema.String),
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
- project: Schema.optionalWith(Schema.NullOr(Schema.String), {
44
- default: () => null,
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
- project: Schema.optionalWith(Schema.NullOr(Schema.String), { exact: true }),
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,