@gjermundgaraba/wtf-api 0.4.0 → 0.6.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.
- package/dist/areas.d.ts +6 -6
- package/dist/areas.js +2 -2
- package/dist/index.d.ts +28 -28
- package/dist/index.js +3 -3
- package/dist/shared.d.ts +12 -4
- package/dist/shared.js +3 -1
- package/dist/tasks.d.ts +8 -8
- package/dist/tasks.js +6 -2
- package/package.json +6 -6
package/dist/areas.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
2
1
|
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
2
|
+
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
4
|
import { NotFound, PlacementRefused, StorageError } from "./shared.ts";
|
|
5
5
|
export declare const Area: Schema.Struct<{
|
|
@@ -38,7 +38,7 @@ export declare const AreaActions: readonly [Action.Action<"areas_list", Schema.$
|
|
|
38
38
|
readonly sortKey: Schema.String;
|
|
39
39
|
readonly createdAt: Schema.String;
|
|
40
40
|
readonly updatedAt: Schema.String;
|
|
41
|
-
}>>, readonly (typeof StorageError)[], true, typeof CurrentPrincipal>, Action.Action<"areas_get", Schema.Struct<{
|
|
41
|
+
}>>, readonly (typeof StorageError)[], true, typeof CurrentPrincipal, undefined, undefined>, Action.Action<"areas_get", Schema.Struct<{
|
|
42
42
|
readonly id: Schema.brand<Schema.String, "AreaId">;
|
|
43
43
|
}>, Schema.Struct<{
|
|
44
44
|
readonly id: Schema.brand<Schema.String, "AreaId">;
|
|
@@ -47,7 +47,7 @@ export declare const AreaActions: readonly [Action.Action<"areas_list", Schema.$
|
|
|
47
47
|
readonly sortKey: Schema.String;
|
|
48
48
|
readonly createdAt: Schema.String;
|
|
49
49
|
readonly updatedAt: Schema.String;
|
|
50
|
-
}>, readonly (typeof NotFound | typeof StorageError)[], true, typeof CurrentPrincipal>, Action.Action<"areas_create", Schema.Struct<{
|
|
50
|
+
}>, readonly (typeof NotFound | typeof StorageError)[], true, typeof CurrentPrincipal, undefined, undefined>, Action.Action<"areas_create", Schema.Struct<{
|
|
51
51
|
readonly title: Schema.String;
|
|
52
52
|
readonly description: Schema.optionalKey<Schema.String>;
|
|
53
53
|
readonly beforeId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.String, "AreaId">>>;
|
|
@@ -58,7 +58,7 @@ export declare const AreaActions: readonly [Action.Action<"areas_list", Schema.$
|
|
|
58
58
|
readonly sortKey: Schema.String;
|
|
59
59
|
readonly createdAt: Schema.String;
|
|
60
60
|
readonly updatedAt: Schema.String;
|
|
61
|
-
}>, readonly (typeof PlacementRefused | typeof StorageError)[], false, typeof CurrentPrincipal>, Action.Action<"areas_update", Schema.Struct<{
|
|
61
|
+
}>, readonly (typeof PlacementRefused | typeof StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, Action.Action<"areas_update", Schema.Struct<{
|
|
62
62
|
readonly id: Schema.brand<Schema.String, "AreaId">;
|
|
63
63
|
readonly title: Schema.optionalKey<Schema.String>;
|
|
64
64
|
readonly description: Schema.optionalKey<Schema.String>;
|
|
@@ -70,8 +70,8 @@ export declare const AreaActions: readonly [Action.Action<"areas_list", Schema.$
|
|
|
70
70
|
readonly sortKey: Schema.String;
|
|
71
71
|
readonly createdAt: Schema.String;
|
|
72
72
|
readonly updatedAt: Schema.String;
|
|
73
|
-
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof CurrentPrincipal>, Action.Action<"areas_remove", Schema.Struct<{
|
|
73
|
+
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, Action.Action<"areas_remove", Schema.Struct<{
|
|
74
74
|
readonly id: Schema.brand<Schema.String, "AreaId">;
|
|
75
75
|
}>, Schema.Struct<{
|
|
76
76
|
readonly id: Schema.brand<Schema.String, "AreaId">;
|
|
77
|
-
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof CurrentPrincipal>];
|
|
77
|
+
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>];
|
package/dist/areas.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
2
1
|
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
2
|
+
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
|
-
import { AreaId, Description, NotFound, PlacementRefused, StorageError, Title } from "./shared.js";
|
|
4
|
+
import { AreaId, Description, NotFound, PlacementRefused, StorageError, Title, } from "./shared.js";
|
|
5
5
|
export const Area = Schema.Struct({
|
|
6
6
|
id: AreaId,
|
|
7
7
|
title: Schema.String,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as ActionHttp from "@gjermundgaraba/effect-actions/ActionHttp";
|
|
2
|
-
import * as Authentication from "@gjermundgaraba/effect-actions/Authentication";
|
|
3
1
|
import { ProviderUnavailable } from "@gjermundgaraba/clankerauth-sdk/errors";
|
|
4
2
|
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
3
|
+
import * as ActionHttp from "@gjermundgaraba/effect-actions/ActionHttp";
|
|
4
|
+
import * as Authentication from "@gjermundgaraba/effect-actions/Authentication";
|
|
5
5
|
export * from "./shared.ts";
|
|
6
6
|
export * from "./areas.ts";
|
|
7
7
|
export * from "./tasks.ts";
|
|
8
8
|
export { Principal, signOutUrl } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
9
9
|
export { ProviderUnavailable } from "@gjermundgaraba/clankerauth-sdk/errors";
|
|
10
|
-
export { InvalidInput, Unauthenticated, Forbidden } from "@gjermundgaraba/effect-actions/Action";
|
|
10
|
+
export { InvalidInput, Unauthenticated, Forbidden, } from "@gjermundgaraba/effect-actions/Action";
|
|
11
11
|
export declare const Login: Authentication.Descriptor<CurrentPrincipal, import("@gjermundgaraba/clankerauth-sdk/session").Caller, import("effect/http-api/HttpApiSecurity").Http, "wtf.Login", readonly [typeof ProviderUnavailable]>;
|
|
12
12
|
export declare const actions: readonly [import("@gjermundgaraba/effect-actions/Action").Action<"areas_list", import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Never>, import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
13
13
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
@@ -16,7 +16,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
16
16
|
readonly sortKey: import("effect/Schema").String;
|
|
17
17
|
readonly createdAt: import("effect/Schema").String;
|
|
18
18
|
readonly updatedAt: import("effect/Schema").String;
|
|
19
|
-
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_get", import("effect/Schema").Struct<{
|
|
19
|
+
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_get", import("effect/Schema").Struct<{
|
|
20
20
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
21
21
|
}>, import("effect/Schema").Struct<{
|
|
22
22
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
@@ -25,7 +25,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
25
25
|
readonly sortKey: import("effect/Schema").String;
|
|
26
26
|
readonly createdAt: import("effect/Schema").String;
|
|
27
27
|
readonly updatedAt: import("effect/Schema").String;
|
|
28
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_create", import("effect/Schema").Struct<{
|
|
28
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_create", import("effect/Schema").Struct<{
|
|
29
29
|
readonly title: import("effect/Schema").String;
|
|
30
30
|
readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
31
31
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>>;
|
|
@@ -36,7 +36,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
36
36
|
readonly sortKey: import("effect/Schema").String;
|
|
37
37
|
readonly createdAt: import("effect/Schema").String;
|
|
38
38
|
readonly updatedAt: import("effect/Schema").String;
|
|
39
|
-
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_update", import("effect/Schema").Struct<{
|
|
39
|
+
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_update", import("effect/Schema").Struct<{
|
|
40
40
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
41
41
|
readonly title: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
42
42
|
readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
@@ -48,11 +48,11 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
48
48
|
readonly sortKey: import("effect/Schema").String;
|
|
49
49
|
readonly createdAt: import("effect/Schema").String;
|
|
50
50
|
readonly updatedAt: import("effect/Schema").String;
|
|
51
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_remove", import("effect/Schema").Struct<{
|
|
51
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_remove", import("effect/Schema").Struct<{
|
|
52
52
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
53
53
|
}>, import("effect/Schema").Struct<{
|
|
54
54
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
55
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_list", import("effect/Schema").Struct<{
|
|
55
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_list", import("effect/Schema").Struct<{
|
|
56
56
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
57
57
|
readonly statuses: import("effect/Schema").optionalKey<import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["inbox", "backlog", "todo", "in_progress", "done", "cancelled"]>>>;
|
|
58
58
|
readonly focus: import("effect/Schema").optionalKey<import("effect/Schema").Boolean>;
|
|
@@ -72,7 +72,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
72
72
|
readonly createdAt: import("effect/Schema").String;
|
|
73
73
|
readonly updatedAt: import("effect/Schema").String;
|
|
74
74
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
75
|
-
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_get", import("effect/Schema").Struct<{
|
|
75
|
+
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_get", import("effect/Schema").Struct<{
|
|
76
76
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
77
77
|
}>, import("effect/Schema").Struct<{
|
|
78
78
|
readonly title: import("effect/Schema").String;
|
|
@@ -89,7 +89,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
89
89
|
readonly createdAt: import("effect/Schema").String;
|
|
90
90
|
readonly updatedAt: import("effect/Schema").String;
|
|
91
91
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
92
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_create", import("effect/Schema").Struct<{
|
|
92
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_create", import("effect/Schema").Struct<{
|
|
93
93
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
94
94
|
readonly parentTaskId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
95
95
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
@@ -115,7 +115,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
115
115
|
readonly createdAt: import("effect/Schema").String;
|
|
116
116
|
readonly updatedAt: import("effect/Schema").String;
|
|
117
117
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
118
|
-
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").NoArea | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_update", import("effect/Schema").Struct<{
|
|
118
|
+
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").NoArea | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_update", import("effect/Schema").Struct<{
|
|
119
119
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
120
120
|
readonly parentTaskId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
121
121
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
@@ -142,7 +142,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
142
142
|
readonly createdAt: import("effect/Schema").String;
|
|
143
143
|
readonly updatedAt: import("effect/Schema").String;
|
|
144
144
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
145
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_archive", import("effect/Schema").Struct<{
|
|
145
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_archive", import("effect/Schema").Struct<{
|
|
146
146
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
147
147
|
}>, import("effect/Schema").Struct<{
|
|
148
148
|
readonly title: import("effect/Schema").String;
|
|
@@ -159,7 +159,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
159
159
|
readonly createdAt: import("effect/Schema").String;
|
|
160
160
|
readonly updatedAt: import("effect/Schema").String;
|
|
161
161
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
162
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_unarchive", import("effect/Schema").Struct<{
|
|
162
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_unarchive", import("effect/Schema").Struct<{
|
|
163
163
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
164
164
|
}>, import("effect/Schema").Struct<{
|
|
165
165
|
readonly title: import("effect/Schema").String;
|
|
@@ -176,23 +176,23 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
176
176
|
readonly createdAt: import("effect/Schema").String;
|
|
177
177
|
readonly updatedAt: import("effect/Schema").String;
|
|
178
178
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
179
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_remove", import("effect/Schema").Struct<{
|
|
179
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_remove", import("effect/Schema").Struct<{
|
|
180
180
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
181
181
|
}>, import("effect/Schema").Struct<{
|
|
182
182
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
183
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>];
|
|
183
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>];
|
|
184
184
|
export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/effect-actions/Action").Action<"whoami", import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Never>, import("effect/Schema").Struct<{
|
|
185
185
|
readonly subject: import("effect/Schema").NonEmptyString;
|
|
186
186
|
readonly issuer: import("effect/Schema").NonEmptyString;
|
|
187
187
|
readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
188
|
-
}>, readonly never[], true, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_list", import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Never>, import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
188
|
+
}>, readonly never[], true, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_list", import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Never>, import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
189
189
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
190
190
|
readonly title: import("effect/Schema").String;
|
|
191
191
|
readonly description: import("effect/Schema").String;
|
|
192
192
|
readonly sortKey: import("effect/Schema").String;
|
|
193
193
|
readonly createdAt: import("effect/Schema").String;
|
|
194
194
|
readonly updatedAt: import("effect/Schema").String;
|
|
195
|
-
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_get", import("effect/Schema").Struct<{
|
|
195
|
+
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_get", import("effect/Schema").Struct<{
|
|
196
196
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
197
197
|
}>, import("effect/Schema").Struct<{
|
|
198
198
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
@@ -201,7 +201,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
201
201
|
readonly sortKey: import("effect/Schema").String;
|
|
202
202
|
readonly createdAt: import("effect/Schema").String;
|
|
203
203
|
readonly updatedAt: import("effect/Schema").String;
|
|
204
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_create", import("effect/Schema").Struct<{
|
|
204
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_create", import("effect/Schema").Struct<{
|
|
205
205
|
readonly title: import("effect/Schema").String;
|
|
206
206
|
readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
207
207
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>>;
|
|
@@ -212,7 +212,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
212
212
|
readonly sortKey: import("effect/Schema").String;
|
|
213
213
|
readonly createdAt: import("effect/Schema").String;
|
|
214
214
|
readonly updatedAt: import("effect/Schema").String;
|
|
215
|
-
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_update", import("effect/Schema").Struct<{
|
|
215
|
+
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_update", import("effect/Schema").Struct<{
|
|
216
216
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
217
217
|
readonly title: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
218
218
|
readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
@@ -224,11 +224,11 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
224
224
|
readonly sortKey: import("effect/Schema").String;
|
|
225
225
|
readonly createdAt: import("effect/Schema").String;
|
|
226
226
|
readonly updatedAt: import("effect/Schema").String;
|
|
227
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_remove", import("effect/Schema").Struct<{
|
|
227
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_remove", import("effect/Schema").Struct<{
|
|
228
228
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
229
229
|
}>, import("effect/Schema").Struct<{
|
|
230
230
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
231
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_list", import("effect/Schema").Struct<{
|
|
231
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_list", import("effect/Schema").Struct<{
|
|
232
232
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
233
233
|
readonly statuses: import("effect/Schema").optionalKey<import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["inbox", "backlog", "todo", "in_progress", "done", "cancelled"]>>>;
|
|
234
234
|
readonly focus: import("effect/Schema").optionalKey<import("effect/Schema").Boolean>;
|
|
@@ -248,7 +248,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
248
248
|
readonly createdAt: import("effect/Schema").String;
|
|
249
249
|
readonly updatedAt: import("effect/Schema").String;
|
|
250
250
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
251
|
-
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_get", import("effect/Schema").Struct<{
|
|
251
|
+
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_get", import("effect/Schema").Struct<{
|
|
252
252
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
253
253
|
}>, import("effect/Schema").Struct<{
|
|
254
254
|
readonly title: import("effect/Schema").String;
|
|
@@ -265,7 +265,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
265
265
|
readonly createdAt: import("effect/Schema").String;
|
|
266
266
|
readonly updatedAt: import("effect/Schema").String;
|
|
267
267
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
268
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_create", import("effect/Schema").Struct<{
|
|
268
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_create", import("effect/Schema").Struct<{
|
|
269
269
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
270
270
|
readonly parentTaskId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
271
271
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
@@ -291,7 +291,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
291
291
|
readonly createdAt: import("effect/Schema").String;
|
|
292
292
|
readonly updatedAt: import("effect/Schema").String;
|
|
293
293
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
294
|
-
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").NoArea | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_update", import("effect/Schema").Struct<{
|
|
294
|
+
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").NoArea | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_update", import("effect/Schema").Struct<{
|
|
295
295
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
296
296
|
readonly parentTaskId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
297
297
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
@@ -318,7 +318,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
318
318
|
readonly createdAt: import("effect/Schema").String;
|
|
319
319
|
readonly updatedAt: import("effect/Schema").String;
|
|
320
320
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
321
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_archive", import("effect/Schema").Struct<{
|
|
321
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_archive", import("effect/Schema").Struct<{
|
|
322
322
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
323
323
|
}>, import("effect/Schema").Struct<{
|
|
324
324
|
readonly title: import("effect/Schema").String;
|
|
@@ -335,7 +335,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
335
335
|
readonly createdAt: import("effect/Schema").String;
|
|
336
336
|
readonly updatedAt: import("effect/Schema").String;
|
|
337
337
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
338
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_unarchive", import("effect/Schema").Struct<{
|
|
338
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_unarchive", import("effect/Schema").Struct<{
|
|
339
339
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
340
340
|
}>, import("effect/Schema").Struct<{
|
|
341
341
|
readonly title: import("effect/Schema").String;
|
|
@@ -352,8 +352,8 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
352
352
|
readonly createdAt: import("effect/Schema").String;
|
|
353
353
|
readonly updatedAt: import("effect/Schema").String;
|
|
354
354
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
355
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_remove", import("effect/Schema").Struct<{
|
|
355
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_remove", import("effect/Schema").Struct<{
|
|
356
356
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
357
357
|
}>, import("effect/Schema").Struct<{
|
|
358
358
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
359
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal>], [], Authentication.Descriptor<CurrentPrincipal, import("@gjermundgaraba/clankerauth-sdk/session").Caller, import("effect/http-api/HttpApiSecurity").Http, "wtf.Login", readonly [typeof ProviderUnavailable]
|
|
359
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>], [], Authentication.Descriptor<CurrentPrincipal, import("@gjermundgaraba/clankerauth-sdk/session").Caller, import("effect/http-api/HttpApiSecurity").Http, "wtf.Login", readonly [typeof ProviderUnavailable]>, readonly []>;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { ProviderUnavailable } from "@gjermundgaraba/clankerauth-sdk/errors";
|
|
2
|
+
import { CurrentPrincipal, Whoami, } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
1
3
|
import * as ActionHttp from "@gjermundgaraba/effect-actions/ActionHttp";
|
|
2
4
|
import * as Authentication from "@gjermundgaraba/effect-actions/Authentication";
|
|
3
|
-
import { ProviderUnavailable } from "@gjermundgaraba/clankerauth-sdk/errors";
|
|
4
|
-
import { CurrentPrincipal, Whoami } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
5
5
|
import { AreaActions } from "./areas.js";
|
|
6
6
|
import { TaskActions } from "./tasks.js";
|
|
7
7
|
export * from "./shared.js";
|
|
@@ -9,7 +9,7 @@ export * from "./areas.js";
|
|
|
9
9
|
export * from "./tasks.js";
|
|
10
10
|
export { Principal, signOutUrl } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
11
11
|
export { ProviderUnavailable } from "@gjermundgaraba/clankerauth-sdk/errors";
|
|
12
|
-
export { InvalidInput, Unauthenticated, Forbidden } from "@gjermundgaraba/effect-actions/Action";
|
|
12
|
+
export { InvalidInput, Unauthenticated, Forbidden, } from "@gjermundgaraba/effect-actions/Action";
|
|
13
13
|
export const Login = Authentication.make("wtf.Login", CurrentPrincipal, {
|
|
14
14
|
error: ProviderUnavailable,
|
|
15
15
|
});
|
package/dist/shared.d.ts
CHANGED
|
@@ -10,7 +10,9 @@ export type CalendarDate = typeof CalendarDate.Type;
|
|
|
10
10
|
declare const NotFound_base: Schema.Class<NotFound, Schema.TaggedStruct<"NotFound", {
|
|
11
11
|
readonly entity: Schema.Literals<readonly ["area", "task"]>;
|
|
12
12
|
readonly id: Schema.String;
|
|
13
|
-
}>, import("effect/Cause").YieldableError
|
|
13
|
+
}>, import("effect/Cause").YieldableError & {
|
|
14
|
+
readonly brand: unique symbol;
|
|
15
|
+
}>;
|
|
14
16
|
export declare class NotFound extends NotFound_base {
|
|
15
17
|
}
|
|
16
18
|
export declare const PlacementRefusal: Schema.Literals<readonly ["MissingArea", "MissingParent", "ParentInAnotherArea", "OwnSubtree", "MissingPosition", "ArchivedParent"]>;
|
|
@@ -18,17 +20,23 @@ export type PlacementRefusal = typeof PlacementRefusal.Type;
|
|
|
18
20
|
declare const PlacementRefused_base: Schema.Class<PlacementRefused, Schema.TaggedStruct<"PlacementRefused", {
|
|
19
21
|
readonly reason: Schema.Literals<readonly ["MissingArea", "MissingParent", "ParentInAnotherArea", "OwnSubtree", "MissingPosition", "ArchivedParent"]>;
|
|
20
22
|
readonly message: Schema.String;
|
|
21
|
-
}>, import("effect/Cause").YieldableError
|
|
23
|
+
}>, import("effect/Cause").YieldableError & {
|
|
24
|
+
readonly brand: unique symbol;
|
|
25
|
+
}>;
|
|
22
26
|
export declare class PlacementRefused extends PlacementRefused_base {
|
|
23
27
|
}
|
|
24
28
|
declare const NoArea_base: Schema.Class<NoArea, Schema.TaggedStruct<"NoArea", {
|
|
25
29
|
readonly message: Schema.String;
|
|
26
|
-
}>, import("effect/Cause").YieldableError
|
|
30
|
+
}>, import("effect/Cause").YieldableError & {
|
|
31
|
+
readonly brand: unique symbol;
|
|
32
|
+
}>;
|
|
27
33
|
export declare class NoArea extends NoArea_base {
|
|
28
34
|
}
|
|
29
35
|
declare const StorageError_base: Schema.Class<StorageError, Schema.TaggedStruct<"StorageError", {
|
|
30
36
|
readonly message: Schema.String;
|
|
31
|
-
}>, import("effect/Cause").YieldableError
|
|
37
|
+
}>, import("effect/Cause").YieldableError & {
|
|
38
|
+
readonly brand: unique symbol;
|
|
39
|
+
}>;
|
|
32
40
|
export declare class StorageError extends StorageError_base {
|
|
33
41
|
}
|
|
34
42
|
export {};
|
package/dist/shared.js
CHANGED
|
@@ -6,7 +6,9 @@ export const Title = Schema.String.check(Schema.isMaxCodePoints(TITLE_MAX_CODE_P
|
|
|
6
6
|
message: `Must be ${TITLE_MAX_CODE_POINTS.toLocaleString("en")} characters or fewer.`,
|
|
7
7
|
}), Schema.isPattern(/\S/u, { message: "Can't be blank." }));
|
|
8
8
|
export const Description = Schema.String.check(Schema.isBetweenCodePoints(0, 65_536));
|
|
9
|
-
export const CalendarDate = Schema.String.check(Schema.isPattern(/^\d{4}-\d{2}-\d{2}$/u, {
|
|
9
|
+
export const CalendarDate = Schema.String.check(Schema.isPattern(/^\d{4}-\d{2}-\d{2}$/u, {
|
|
10
|
+
expected: "a calendar date in YYYY-MM-DD format",
|
|
11
|
+
}), Schema.makeFilter((value) => {
|
|
10
12
|
const date = new Date(`${value}T00:00:00Z`);
|
|
11
13
|
return (!value.startsWith("0000") &&
|
|
12
14
|
Number.isFinite(date.getTime()) &&
|
package/dist/tasks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
2
1
|
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
2
|
+
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
4
|
import { NoArea, NotFound, PlacementRefused, StorageError } from "./shared.ts";
|
|
5
5
|
export declare const TaskStatus: Schema.Literals<readonly ["inbox", "backlog", "todo", "in_progress", "done", "cancelled"]>;
|
|
@@ -83,7 +83,7 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
83
83
|
readonly createdAt: Schema.String;
|
|
84
84
|
readonly updatedAt: Schema.String;
|
|
85
85
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
86
|
-
}>>, readonly (typeof StorageError)[], true, typeof CurrentPrincipal>, Action.Action<"tasks_get", Schema.Struct<{
|
|
86
|
+
}>>, readonly (typeof StorageError)[], true, typeof CurrentPrincipal, undefined, undefined>, Action.Action<"tasks_get", Schema.Struct<{
|
|
87
87
|
readonly id: Schema.brand<Schema.String, "TaskId">;
|
|
88
88
|
}>, Schema.Struct<{
|
|
89
89
|
readonly title: Schema.String;
|
|
@@ -100,7 +100,7 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
100
100
|
readonly createdAt: Schema.String;
|
|
101
101
|
readonly updatedAt: Schema.String;
|
|
102
102
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
103
|
-
}>, readonly (typeof NotFound | typeof StorageError)[], true, typeof CurrentPrincipal>, Action.Action<"tasks_create", Schema.Struct<{
|
|
103
|
+
}>, readonly (typeof NotFound | typeof StorageError)[], true, typeof CurrentPrincipal, undefined, undefined>, Action.Action<"tasks_create", Schema.Struct<{
|
|
104
104
|
readonly areaId: Schema.optionalKey<Schema.brand<Schema.String, "AreaId">>;
|
|
105
105
|
readonly parentTaskId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.String, "TaskId">>>;
|
|
106
106
|
readonly beforeId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.String, "TaskId">>>;
|
|
@@ -126,7 +126,7 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
126
126
|
readonly createdAt: Schema.String;
|
|
127
127
|
readonly updatedAt: Schema.String;
|
|
128
128
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
129
|
-
}>, readonly (typeof PlacementRefused | typeof NoArea | typeof StorageError)[], false, typeof CurrentPrincipal>, Action.Action<"tasks_update", Schema.Struct<{
|
|
129
|
+
}>, readonly (typeof PlacementRefused | typeof NoArea | typeof StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, Action.Action<"tasks_update", Schema.Struct<{
|
|
130
130
|
readonly areaId: Schema.optionalKey<Schema.brand<Schema.String, "AreaId">>;
|
|
131
131
|
readonly parentTaskId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.String, "TaskId">>>;
|
|
132
132
|
readonly beforeId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.String, "TaskId">>>;
|
|
@@ -153,7 +153,7 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
153
153
|
readonly createdAt: Schema.String;
|
|
154
154
|
readonly updatedAt: Schema.String;
|
|
155
155
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
156
|
-
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof CurrentPrincipal>, Action.Action<"tasks_archive", Schema.Struct<{
|
|
156
|
+
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, Action.Action<"tasks_archive", Schema.Struct<{
|
|
157
157
|
readonly id: Schema.brand<Schema.String, "TaskId">;
|
|
158
158
|
}>, Schema.Struct<{
|
|
159
159
|
readonly title: Schema.String;
|
|
@@ -170,7 +170,7 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
170
170
|
readonly createdAt: Schema.String;
|
|
171
171
|
readonly updatedAt: Schema.String;
|
|
172
172
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
173
|
-
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof CurrentPrincipal>, Action.Action<"tasks_unarchive", Schema.Struct<{
|
|
173
|
+
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, Action.Action<"tasks_unarchive", Schema.Struct<{
|
|
174
174
|
readonly id: Schema.brand<Schema.String, "TaskId">;
|
|
175
175
|
}>, Schema.Struct<{
|
|
176
176
|
readonly title: Schema.String;
|
|
@@ -187,8 +187,8 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
187
187
|
readonly createdAt: Schema.String;
|
|
188
188
|
readonly updatedAt: Schema.String;
|
|
189
189
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
190
|
-
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof CurrentPrincipal>, Action.Action<"tasks_remove", Schema.Struct<{
|
|
190
|
+
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>, Action.Action<"tasks_remove", Schema.Struct<{
|
|
191
191
|
readonly id: Schema.brand<Schema.String, "TaskId">;
|
|
192
192
|
}>, Schema.Struct<{
|
|
193
193
|
readonly id: Schema.brand<Schema.String, "TaskId">;
|
|
194
|
-
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof CurrentPrincipal>];
|
|
194
|
+
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof CurrentPrincipal, undefined, undefined>];
|
package/dist/tasks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
2
1
|
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
2
|
+
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
3
3
|
import { Schema } from "effect";
|
|
4
4
|
import { AreaId, CalendarDate, Description, NoArea, NotFound, PlacementRefused, StorageError, TaskId, Title, } from "./shared.js";
|
|
5
5
|
export const TaskStatus = Schema.Literals([
|
|
@@ -43,7 +43,11 @@ const edits = {
|
|
|
43
43
|
dueOn: Schema.optionalKey(content.dueOn),
|
|
44
44
|
owedTo: Schema.optionalKey(Schema.NullOr(Schema.String.check(Schema.isBetweenCodePoints(0, 256)))),
|
|
45
45
|
};
|
|
46
|
-
export const TaskCreate = Schema.Struct({
|
|
46
|
+
export const TaskCreate = Schema.Struct({
|
|
47
|
+
...edits,
|
|
48
|
+
title: Title,
|
|
49
|
+
...placement,
|
|
50
|
+
});
|
|
47
51
|
export const TaskUpdate = Schema.Struct({ id: TaskId, ...edits, ...placement });
|
|
48
52
|
export const TaskList = Schema.Struct({
|
|
49
53
|
areaId: Schema.optionalKey(AreaId),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjermundgaraba/wtf-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "The wtf wire contract: the area and task actions, their inputs, records and errors, for a typed HTTP or MCP client.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -23,18 +23,18 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@gjermundgaraba/clankerauth-sdk": "0.
|
|
27
|
-
"@gjermundgaraba/effect-actions": "0.
|
|
26
|
+
"@gjermundgaraba/clankerauth-sdk": "0.31.0",
|
|
27
|
+
"@gjermundgaraba/effect-actions": "0.23.0",
|
|
28
28
|
"effect": "4.0.6",
|
|
29
29
|
"typescript": "7.0.2",
|
|
30
30
|
"vite-plus": "1.4.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"@gjermundgaraba/clankerauth-sdk": "^0.
|
|
34
|
-
"@gjermundgaraba/effect-actions": "^0.
|
|
33
|
+
"@gjermundgaraba/clankerauth-sdk": "^0.31.0",
|
|
34
|
+
"@gjermundgaraba/effect-actions": "^0.23.0",
|
|
35
35
|
"effect": "~4.0.4"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=26.
|
|
38
|
+
"node": ">=26.12.0"
|
|
39
39
|
}
|
|
40
40
|
}
|