@gjermundgaraba/wtf-api 0.9.0 → 0.10.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/dist/areas.d.ts +5 -6
- package/dist/areas.js +5 -6
- package/dist/index.d.ts +30 -40
- package/dist/index.js +2 -12
- package/dist/tasks.d.ts +7 -8
- package/dist/tasks.js +7 -8
- package/dist/values.d.ts +2 -3
- package/dist/values.js +2 -3
- package/package.json +3 -5
package/dist/areas.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
2
1
|
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
3
2
|
import { Schema } from "effect";
|
|
4
3
|
import { NotFound, PlacementRefused, StorageError } from "./shared.ts";
|
|
@@ -38,7 +37,7 @@ export declare const AreaActions: readonly [Action.Action<"areas_list", Schema.$
|
|
|
38
37
|
readonly sortKey: Schema.String;
|
|
39
38
|
readonly createdAt: Schema.String;
|
|
40
39
|
readonly updatedAt: Schema.String;
|
|
41
|
-
}>>, readonly (typeof StorageError)[], true, typeof
|
|
40
|
+
}>>, readonly (typeof StorageError)[], true, typeof Action.Anyone, undefined, undefined>, Action.Action<"areas_get", Schema.Struct<{
|
|
42
41
|
readonly id: Schema.brand<Schema.String, "AreaId">;
|
|
43
42
|
}>, Schema.Struct<{
|
|
44
43
|
readonly id: Schema.brand<Schema.String, "AreaId">;
|
|
@@ -47,7 +46,7 @@ export declare const AreaActions: readonly [Action.Action<"areas_list", Schema.$
|
|
|
47
46
|
readonly sortKey: Schema.String;
|
|
48
47
|
readonly createdAt: Schema.String;
|
|
49
48
|
readonly updatedAt: Schema.String;
|
|
50
|
-
}>, readonly (typeof NotFound | typeof StorageError)[], true, typeof
|
|
49
|
+
}>, readonly (typeof NotFound | typeof StorageError)[], true, typeof Action.Anyone, undefined, undefined>, Action.Action<"areas_create", Schema.Struct<{
|
|
51
50
|
readonly title: Schema.String;
|
|
52
51
|
readonly description: Schema.optionalKey<Schema.String>;
|
|
53
52
|
readonly beforeId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.String, "AreaId">>>;
|
|
@@ -58,7 +57,7 @@ export declare const AreaActions: readonly [Action.Action<"areas_list", Schema.$
|
|
|
58
57
|
readonly sortKey: Schema.String;
|
|
59
58
|
readonly createdAt: Schema.String;
|
|
60
59
|
readonly updatedAt: Schema.String;
|
|
61
|
-
}>, readonly (typeof PlacementRefused | typeof StorageError)[], false, typeof
|
|
60
|
+
}>, readonly (typeof PlacementRefused | typeof StorageError)[], false, typeof Action.Anyone, undefined, undefined>, Action.Action<"areas_update", Schema.Struct<{
|
|
62
61
|
readonly id: Schema.brand<Schema.String, "AreaId">;
|
|
63
62
|
readonly title: Schema.optionalKey<Schema.String>;
|
|
64
63
|
readonly description: Schema.optionalKey<Schema.String>;
|
|
@@ -70,8 +69,8 @@ export declare const AreaActions: readonly [Action.Action<"areas_list", Schema.$
|
|
|
70
69
|
readonly sortKey: Schema.String;
|
|
71
70
|
readonly createdAt: Schema.String;
|
|
72
71
|
readonly updatedAt: Schema.String;
|
|
73
|
-
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof
|
|
72
|
+
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof Action.Anyone, undefined, undefined>, Action.Action<"areas_remove", Schema.Struct<{
|
|
74
73
|
readonly id: Schema.brand<Schema.String, "AreaId">;
|
|
75
74
|
}>, Schema.Struct<{
|
|
76
75
|
readonly id: Schema.brand<Schema.String, "AreaId">;
|
|
77
|
-
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof
|
|
76
|
+
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof Action.Anyone, undefined, undefined>];
|
package/dist/areas.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
2
1
|
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
3
2
|
import { Schema } from "effect";
|
|
4
3
|
import { AreaId, Description, NotFound, PlacementRefused, StorageError, Title, } from "./shared.js";
|
|
@@ -24,14 +23,14 @@ export const AreaUpdate = Schema.Struct({
|
|
|
24
23
|
export const AreaRef = Schema.Struct({ id: AreaId });
|
|
25
24
|
export const AreaActions = [
|
|
26
25
|
Action.make("areas_list", {
|
|
27
|
-
caller:
|
|
26
|
+
caller: Action.Anyone,
|
|
28
27
|
error: [StorageError],
|
|
29
28
|
description: "List areas in manual order.",
|
|
30
29
|
readOnly: true,
|
|
31
30
|
success: Schema.Array(Area),
|
|
32
31
|
}),
|
|
33
32
|
Action.make("areas_get", {
|
|
34
|
-
caller:
|
|
33
|
+
caller: Action.Anyone,
|
|
35
34
|
error: [NotFound, StorageError],
|
|
36
35
|
description: "Read an area.",
|
|
37
36
|
readOnly: true,
|
|
@@ -39,7 +38,7 @@ export const AreaActions = [
|
|
|
39
38
|
success: Area,
|
|
40
39
|
}),
|
|
41
40
|
Action.make("areas_create", {
|
|
42
|
-
caller:
|
|
41
|
+
caller: Action.Anyone,
|
|
43
42
|
error: [PlacementRefused, StorageError],
|
|
44
43
|
description: "Create an area before another area. Omitted or null beforeId appends.",
|
|
45
44
|
readOnly: false,
|
|
@@ -47,7 +46,7 @@ export const AreaActions = [
|
|
|
47
46
|
success: Area,
|
|
48
47
|
}),
|
|
49
48
|
Action.make("areas_update", {
|
|
50
|
-
caller:
|
|
49
|
+
caller: Action.Anyone,
|
|
51
50
|
error: [NotFound, PlacementRefused, StorageError],
|
|
52
51
|
description: "Update an area's title, Markdown description, or order atomically. Omitted beforeId preserves order; null appends.",
|
|
53
52
|
readOnly: false,
|
|
@@ -55,7 +54,7 @@ export const AreaActions = [
|
|
|
55
54
|
success: Area,
|
|
56
55
|
}),
|
|
57
56
|
Action.make("areas_remove", {
|
|
58
|
-
caller:
|
|
57
|
+
caller: Action.Anyone,
|
|
59
58
|
error: [NotFound, StorageError],
|
|
60
59
|
description: "Permanently delete an area and all its tasks.",
|
|
61
60
|
readOnly: false,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
import { ProviderUnavailable } from "@gjermundgaraba/clankerauth-sdk/errors";
|
|
2
|
-
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
3
1
|
import * as ActionHttp from "@gjermundgaraba/effect-actions/ActionHttp";
|
|
4
|
-
import * as Authentication from "@gjermundgaraba/effect-actions/Authentication";
|
|
5
2
|
export * from "./shared.ts";
|
|
6
3
|
export * from "./areas.ts";
|
|
7
4
|
export * from "./tasks.ts";
|
|
8
5
|
export * from "./values.ts";
|
|
9
|
-
export {
|
|
10
|
-
export { ProviderUnavailable } from "@gjermundgaraba/clankerauth-sdk/errors";
|
|
11
|
-
export { InvalidInput, Unauthenticated, Forbidden, } from "@gjermundgaraba/effect-actions/Action";
|
|
12
|
-
export declare const Login: Authentication.Descriptor<CurrentPrincipal, import("@gjermundgaraba/clankerauth-sdk/session").Caller, import("effect/http-api/HttpApiSecurity").Http, "wtf.Login", readonly [typeof ProviderUnavailable]>;
|
|
6
|
+
export { InvalidInput } from "@gjermundgaraba/effect-actions/Action";
|
|
13
7
|
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<{
|
|
14
8
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
15
9
|
readonly title: import("effect/Schema").String;
|
|
@@ -17,7 +11,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
17
11
|
readonly sortKey: import("effect/Schema").String;
|
|
18
12
|
readonly createdAt: import("effect/Schema").String;
|
|
19
13
|
readonly updatedAt: import("effect/Schema").String;
|
|
20
|
-
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof
|
|
14
|
+
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_get", import("effect/Schema").Struct<{
|
|
21
15
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
22
16
|
}>, import("effect/Schema").Struct<{
|
|
23
17
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
@@ -26,7 +20,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
26
20
|
readonly sortKey: import("effect/Schema").String;
|
|
27
21
|
readonly createdAt: import("effect/Schema").String;
|
|
28
22
|
readonly updatedAt: import("effect/Schema").String;
|
|
29
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof
|
|
23
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_create", import("effect/Schema").Struct<{
|
|
30
24
|
readonly title: import("effect/Schema").String;
|
|
31
25
|
readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
32
26
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>>;
|
|
@@ -37,7 +31,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
37
31
|
readonly sortKey: import("effect/Schema").String;
|
|
38
32
|
readonly createdAt: import("effect/Schema").String;
|
|
39
33
|
readonly updatedAt: import("effect/Schema").String;
|
|
40
|
-
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
34
|
+
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_update", import("effect/Schema").Struct<{
|
|
41
35
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
42
36
|
readonly title: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
43
37
|
readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
@@ -49,11 +43,11 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
49
43
|
readonly sortKey: import("effect/Schema").String;
|
|
50
44
|
readonly createdAt: import("effect/Schema").String;
|
|
51
45
|
readonly updatedAt: import("effect/Schema").String;
|
|
52
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
46
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_remove", import("effect/Schema").Struct<{
|
|
53
47
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
54
48
|
}>, import("effect/Schema").Struct<{
|
|
55
49
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
56
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
50
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_list", import("effect/Schema").Struct<{
|
|
57
51
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
58
52
|
readonly statuses: import("effect/Schema").optionalKey<import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["inbox", "backlog", "todo", "in_progress", "done", "cancelled"]>>>;
|
|
59
53
|
readonly focus: import("effect/Schema").optionalKey<import("effect/Schema").Boolean>;
|
|
@@ -73,7 +67,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
73
67
|
readonly createdAt: import("effect/Schema").String;
|
|
74
68
|
readonly updatedAt: import("effect/Schema").String;
|
|
75
69
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
76
|
-
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof
|
|
70
|
+
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_get", import("effect/Schema").Struct<{
|
|
77
71
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
78
72
|
}>, import("effect/Schema").Struct<{
|
|
79
73
|
readonly title: import("effect/Schema").String;
|
|
@@ -90,7 +84,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
90
84
|
readonly createdAt: import("effect/Schema").String;
|
|
91
85
|
readonly updatedAt: import("effect/Schema").String;
|
|
92
86
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
93
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof
|
|
87
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_create", import("effect/Schema").Struct<{
|
|
94
88
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
95
89
|
readonly parentTaskId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
96
90
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
@@ -116,7 +110,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
116
110
|
readonly createdAt: import("effect/Schema").String;
|
|
117
111
|
readonly updatedAt: import("effect/Schema").String;
|
|
118
112
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
119
|
-
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").NoArea | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
113
|
+
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").NoArea | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_update", import("effect/Schema").Struct<{
|
|
120
114
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
121
115
|
readonly parentTaskId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
122
116
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
@@ -143,7 +137,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
143
137
|
readonly createdAt: import("effect/Schema").String;
|
|
144
138
|
readonly updatedAt: import("effect/Schema").String;
|
|
145
139
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
146
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
140
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_archive", import("effect/Schema").Struct<{
|
|
147
141
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
148
142
|
}>, import("effect/Schema").Struct<{
|
|
149
143
|
readonly title: import("effect/Schema").String;
|
|
@@ -160,7 +154,7 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
160
154
|
readonly createdAt: import("effect/Schema").String;
|
|
161
155
|
readonly updatedAt: import("effect/Schema").String;
|
|
162
156
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
163
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
157
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_unarchive", import("effect/Schema").Struct<{
|
|
164
158
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
165
159
|
}>, import("effect/Schema").Struct<{
|
|
166
160
|
readonly title: import("effect/Schema").String;
|
|
@@ -177,29 +171,25 @@ export declare const actions: readonly [import("@gjermundgaraba/effect-actions/A
|
|
|
177
171
|
readonly createdAt: import("effect/Schema").String;
|
|
178
172
|
readonly updatedAt: import("effect/Schema").String;
|
|
179
173
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
180
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
174
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_remove", import("effect/Schema").Struct<{
|
|
181
175
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
182
176
|
}>, import("effect/Schema").Struct<{
|
|
183
177
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
184
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
178
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"values_get", import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Never>, import("effect/Schema").Struct<{
|
|
185
179
|
readonly text: import("effect/Schema").String;
|
|
186
|
-
}>, readonly typeof import("./shared.ts").StorageError[], true, typeof
|
|
180
|
+
}>, readonly typeof import("./shared.ts").StorageError[], true, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"values_update", import("effect/Schema").Struct<{
|
|
187
181
|
readonly text: import("effect/Schema").String;
|
|
188
182
|
}>, import("effect/Schema").Struct<{
|
|
189
183
|
readonly text: import("effect/Schema").String;
|
|
190
|
-
}>, readonly typeof import("./shared.ts").StorageError[], false, typeof
|
|
191
|
-
export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/effect-actions/Action").Action<"
|
|
192
|
-
readonly subject: import("effect/Schema").NonEmptyString;
|
|
193
|
-
readonly issuer: import("effect/Schema").NonEmptyString;
|
|
194
|
-
readonly scopes: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
195
|
-
}>, 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<{
|
|
184
|
+
}>, readonly typeof import("./shared.ts").StorageError[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>];
|
|
185
|
+
export declare const Http: ActionHttp.Binding<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<{
|
|
196
186
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
197
187
|
readonly title: import("effect/Schema").String;
|
|
198
188
|
readonly description: import("effect/Schema").String;
|
|
199
189
|
readonly sortKey: import("effect/Schema").String;
|
|
200
190
|
readonly createdAt: import("effect/Schema").String;
|
|
201
191
|
readonly updatedAt: import("effect/Schema").String;
|
|
202
|
-
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof
|
|
192
|
+
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_get", import("effect/Schema").Struct<{
|
|
203
193
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
204
194
|
}>, import("effect/Schema").Struct<{
|
|
205
195
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
@@ -208,7 +198,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
208
198
|
readonly sortKey: import("effect/Schema").String;
|
|
209
199
|
readonly createdAt: import("effect/Schema").String;
|
|
210
200
|
readonly updatedAt: import("effect/Schema").String;
|
|
211
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof
|
|
201
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_create", import("effect/Schema").Struct<{
|
|
212
202
|
readonly title: import("effect/Schema").String;
|
|
213
203
|
readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
214
204
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>>;
|
|
@@ -219,7 +209,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
219
209
|
readonly sortKey: import("effect/Schema").String;
|
|
220
210
|
readonly createdAt: import("effect/Schema").String;
|
|
221
211
|
readonly updatedAt: import("effect/Schema").String;
|
|
222
|
-
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
212
|
+
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_update", import("effect/Schema").Struct<{
|
|
223
213
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
224
214
|
readonly title: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
225
215
|
readonly description: import("effect/Schema").optionalKey<import("effect/Schema").String>;
|
|
@@ -231,11 +221,11 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
231
221
|
readonly sortKey: import("effect/Schema").String;
|
|
232
222
|
readonly createdAt: import("effect/Schema").String;
|
|
233
223
|
readonly updatedAt: import("effect/Schema").String;
|
|
234
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
224
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"areas_remove", import("effect/Schema").Struct<{
|
|
235
225
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
236
226
|
}>, import("effect/Schema").Struct<{
|
|
237
227
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "AreaId">;
|
|
238
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
228
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_list", import("effect/Schema").Struct<{
|
|
239
229
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
240
230
|
readonly statuses: import("effect/Schema").optionalKey<import("effect/Schema").$Array<import("effect/Schema").Literals<readonly ["inbox", "backlog", "todo", "in_progress", "done", "cancelled"]>>>;
|
|
241
231
|
readonly focus: import("effect/Schema").optionalKey<import("effect/Schema").Boolean>;
|
|
@@ -255,7 +245,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
255
245
|
readonly createdAt: import("effect/Schema").String;
|
|
256
246
|
readonly updatedAt: import("effect/Schema").String;
|
|
257
247
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
258
|
-
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof
|
|
248
|
+
}>>, readonly typeof import("./shared.ts").StorageError[], true, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_get", import("effect/Schema").Struct<{
|
|
259
249
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
260
250
|
}>, import("effect/Schema").Struct<{
|
|
261
251
|
readonly title: import("effect/Schema").String;
|
|
@@ -272,7 +262,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
272
262
|
readonly createdAt: import("effect/Schema").String;
|
|
273
263
|
readonly updatedAt: import("effect/Schema").String;
|
|
274
264
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
275
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof
|
|
265
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], true, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_create", import("effect/Schema").Struct<{
|
|
276
266
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
277
267
|
readonly parentTaskId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
278
268
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
@@ -298,7 +288,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
298
288
|
readonly createdAt: import("effect/Schema").String;
|
|
299
289
|
readonly updatedAt: import("effect/Schema").String;
|
|
300
290
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
301
|
-
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").NoArea | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
291
|
+
}>, readonly (typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").NoArea | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_update", import("effect/Schema").Struct<{
|
|
302
292
|
readonly areaId: import("effect/Schema").optionalKey<import("effect/Schema").brand<import("effect/Schema").String, "AreaId">>;
|
|
303
293
|
readonly parentTaskId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
304
294
|
readonly beforeId: import("effect/Schema").optionalKey<import("effect/Schema").NullOr<import("effect/Schema").brand<import("effect/Schema").String, "TaskId">>>;
|
|
@@ -325,7 +315,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
325
315
|
readonly createdAt: import("effect/Schema").String;
|
|
326
316
|
readonly updatedAt: import("effect/Schema").String;
|
|
327
317
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
328
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
318
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_archive", import("effect/Schema").Struct<{
|
|
329
319
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
330
320
|
}>, import("effect/Schema").Struct<{
|
|
331
321
|
readonly title: import("effect/Schema").String;
|
|
@@ -342,7 +332,7 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
342
332
|
readonly createdAt: import("effect/Schema").String;
|
|
343
333
|
readonly updatedAt: import("effect/Schema").String;
|
|
344
334
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
345
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
335
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_unarchive", import("effect/Schema").Struct<{
|
|
346
336
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
347
337
|
}>, import("effect/Schema").Struct<{
|
|
348
338
|
readonly title: import("effect/Schema").String;
|
|
@@ -359,14 +349,14 @@ export declare const Http: ActionHttp.Binding<readonly [import("@gjermundgaraba/
|
|
|
359
349
|
readonly createdAt: import("effect/Schema").String;
|
|
360
350
|
readonly updatedAt: import("effect/Schema").String;
|
|
361
351
|
readonly archivedAt: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
362
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
352
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").PlacementRefused | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"tasks_remove", import("effect/Schema").Struct<{
|
|
363
353
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
364
354
|
}>, import("effect/Schema").Struct<{
|
|
365
355
|
readonly id: import("effect/Schema").brand<import("effect/Schema").String, "TaskId">;
|
|
366
|
-
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof
|
|
356
|
+
}>, readonly (typeof import("./shared.ts").NotFound | typeof import("./shared.ts").StorageError)[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"values_get", import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").Never>, import("effect/Schema").Struct<{
|
|
367
357
|
readonly text: import("effect/Schema").String;
|
|
368
|
-
}>, readonly typeof import("./shared.ts").StorageError[], true, typeof
|
|
358
|
+
}>, readonly typeof import("./shared.ts").StorageError[], true, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>, import("@gjermundgaraba/effect-actions/Action").Action<"values_update", import("effect/Schema").Struct<{
|
|
369
359
|
readonly text: import("effect/Schema").String;
|
|
370
360
|
}>, import("effect/Schema").Struct<{
|
|
371
361
|
readonly text: import("effect/Schema").String;
|
|
372
|
-
}>, readonly typeof import("./shared.ts").StorageError[], false, typeof
|
|
362
|
+
}>, readonly typeof import("./shared.ts").StorageError[], false, typeof import("@gjermundgaraba/effect-actions/Action").Anyone, undefined, undefined>], [], undefined, readonly []>;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { ProviderUnavailable } from "@gjermundgaraba/clankerauth-sdk/errors";
|
|
2
|
-
import { CurrentPrincipal, Whoami, } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
3
1
|
import * as ActionHttp from "@gjermundgaraba/effect-actions/ActionHttp";
|
|
4
|
-
import * as Authentication from "@gjermundgaraba/effect-actions/Authentication";
|
|
5
2
|
import { AreaActions } from "./areas.js";
|
|
6
3
|
import { TaskActions } from "./tasks.js";
|
|
7
4
|
import { ValuesActions } from "./values.js";
|
|
@@ -9,17 +6,10 @@ export * from "./shared.js";
|
|
|
9
6
|
export * from "./areas.js";
|
|
10
7
|
export * from "./tasks.js";
|
|
11
8
|
export * from "./values.js";
|
|
12
|
-
export {
|
|
13
|
-
export { ProviderUnavailable } from "@gjermundgaraba/clankerauth-sdk/errors";
|
|
14
|
-
export { InvalidInput, Unauthenticated, Forbidden, } from "@gjermundgaraba/effect-actions/Action";
|
|
15
|
-
export const Login = Authentication.make("wtf.Login", CurrentPrincipal, {
|
|
16
|
-
error: ProviderUnavailable,
|
|
17
|
-
});
|
|
9
|
+
export { InvalidInput } from "@gjermundgaraba/effect-actions/Action";
|
|
18
10
|
export const actions = [
|
|
19
11
|
...AreaActions,
|
|
20
12
|
...TaskActions,
|
|
21
13
|
...ValuesActions,
|
|
22
14
|
];
|
|
23
|
-
export const Http = ActionHttp.make(
|
|
24
|
-
authentication: Login,
|
|
25
|
-
});
|
|
15
|
+
export const Http = ActionHttp.make(actions);
|
package/dist/tasks.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
2
1
|
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
3
2
|
import { Schema } from "effect";
|
|
4
3
|
import { NoArea, NotFound, PlacementRefused, StorageError } from "./shared.ts";
|
|
@@ -83,7 +82,7 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
83
82
|
readonly createdAt: Schema.String;
|
|
84
83
|
readonly updatedAt: Schema.String;
|
|
85
84
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
86
|
-
}>>, readonly (typeof StorageError)[], true, typeof
|
|
85
|
+
}>>, readonly (typeof StorageError)[], true, typeof Action.Anyone, undefined, undefined>, Action.Action<"tasks_get", Schema.Struct<{
|
|
87
86
|
readonly id: Schema.brand<Schema.String, "TaskId">;
|
|
88
87
|
}>, Schema.Struct<{
|
|
89
88
|
readonly title: Schema.String;
|
|
@@ -100,7 +99,7 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
100
99
|
readonly createdAt: Schema.String;
|
|
101
100
|
readonly updatedAt: Schema.String;
|
|
102
101
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
103
|
-
}>, readonly (typeof NotFound | typeof StorageError)[], true, typeof
|
|
102
|
+
}>, readonly (typeof NotFound | typeof StorageError)[], true, typeof Action.Anyone, undefined, undefined>, Action.Action<"tasks_create", Schema.Struct<{
|
|
104
103
|
readonly areaId: Schema.optionalKey<Schema.brand<Schema.String, "AreaId">>;
|
|
105
104
|
readonly parentTaskId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.String, "TaskId">>>;
|
|
106
105
|
readonly beforeId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.String, "TaskId">>>;
|
|
@@ -126,7 +125,7 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
126
125
|
readonly createdAt: Schema.String;
|
|
127
126
|
readonly updatedAt: Schema.String;
|
|
128
127
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
129
|
-
}>, readonly (typeof PlacementRefused | typeof NoArea | typeof StorageError)[], false, typeof
|
|
128
|
+
}>, readonly (typeof PlacementRefused | typeof NoArea | typeof StorageError)[], false, typeof Action.Anyone, undefined, undefined>, Action.Action<"tasks_update", Schema.Struct<{
|
|
130
129
|
readonly areaId: Schema.optionalKey<Schema.brand<Schema.String, "AreaId">>;
|
|
131
130
|
readonly parentTaskId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.String, "TaskId">>>;
|
|
132
131
|
readonly beforeId: Schema.optionalKey<Schema.NullOr<Schema.brand<Schema.String, "TaskId">>>;
|
|
@@ -153,7 +152,7 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
153
152
|
readonly createdAt: Schema.String;
|
|
154
153
|
readonly updatedAt: Schema.String;
|
|
155
154
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
156
|
-
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof
|
|
155
|
+
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof Action.Anyone, undefined, undefined>, Action.Action<"tasks_archive", Schema.Struct<{
|
|
157
156
|
readonly id: Schema.brand<Schema.String, "TaskId">;
|
|
158
157
|
}>, Schema.Struct<{
|
|
159
158
|
readonly title: Schema.String;
|
|
@@ -170,7 +169,7 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
170
169
|
readonly createdAt: Schema.String;
|
|
171
170
|
readonly updatedAt: Schema.String;
|
|
172
171
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
173
|
-
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof
|
|
172
|
+
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof Action.Anyone, undefined, undefined>, Action.Action<"tasks_unarchive", Schema.Struct<{
|
|
174
173
|
readonly id: Schema.brand<Schema.String, "TaskId">;
|
|
175
174
|
}>, Schema.Struct<{
|
|
176
175
|
readonly title: Schema.String;
|
|
@@ -187,8 +186,8 @@ export declare const TaskActions: readonly [Action.Action<"tasks_list", Schema.S
|
|
|
187
186
|
readonly createdAt: Schema.String;
|
|
188
187
|
readonly updatedAt: Schema.String;
|
|
189
188
|
readonly archivedAt: Schema.NullOr<Schema.String>;
|
|
190
|
-
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof
|
|
189
|
+
}>, readonly (typeof NotFound | typeof PlacementRefused | typeof StorageError)[], false, typeof Action.Anyone, undefined, undefined>, Action.Action<"tasks_remove", Schema.Struct<{
|
|
191
190
|
readonly id: Schema.brand<Schema.String, "TaskId">;
|
|
192
191
|
}>, Schema.Struct<{
|
|
193
192
|
readonly id: Schema.brand<Schema.String, "TaskId">;
|
|
194
|
-
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof
|
|
193
|
+
}>, readonly (typeof NotFound | typeof StorageError)[], false, typeof Action.Anyone, undefined, undefined>];
|
package/dist/tasks.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
2
1
|
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
3
2
|
import { Schema } from "effect";
|
|
4
3
|
import { AreaId, CalendarDate, Description, NoArea, NotFound, PlacementRefused, StorageError, TaskId, Title, } from "./shared.js";
|
|
@@ -58,7 +57,7 @@ export const TaskList = Schema.Struct({
|
|
|
58
57
|
export const TaskRef = Schema.Struct({ id: TaskId });
|
|
59
58
|
export const TaskActions = [
|
|
60
59
|
Action.make("tasks_list", {
|
|
61
|
-
caller:
|
|
60
|
+
caller: Action.Anyone,
|
|
62
61
|
error: [StorageError],
|
|
63
62
|
description: "List tasks in area and outline order, optionally filtering area, status, or focus. Archived tasks are left out unless archived is true, which lists only archived tasks.",
|
|
64
63
|
readOnly: true,
|
|
@@ -66,7 +65,7 @@ export const TaskActions = [
|
|
|
66
65
|
success: Schema.Array(Task),
|
|
67
66
|
}),
|
|
68
67
|
Action.make("tasks_get", {
|
|
69
|
-
caller:
|
|
68
|
+
caller: Action.Anyone,
|
|
70
69
|
error: [NotFound, StorageError],
|
|
71
70
|
description: "Read a task, including an archived one, whose archivedAt is set.",
|
|
72
71
|
readOnly: true,
|
|
@@ -74,7 +73,7 @@ export const TaskActions = [
|
|
|
74
73
|
success: Task,
|
|
75
74
|
}),
|
|
76
75
|
Action.make("tasks_create", {
|
|
77
|
-
caller:
|
|
76
|
+
caller: Action.Anyone,
|
|
78
77
|
error: [PlacementRefused, NoArea, StorageError],
|
|
79
78
|
description: "Capture a task, defaulting to inbox in the first area. A parent supplies its area and must not be archived.",
|
|
80
79
|
readOnly: false,
|
|
@@ -82,7 +81,7 @@ export const TaskActions = [
|
|
|
82
81
|
success: Task,
|
|
83
82
|
}),
|
|
84
83
|
Action.make("tasks_update", {
|
|
85
|
-
caller:
|
|
84
|
+
caller: Action.Anyone,
|
|
86
85
|
error: [NotFound, PlacementRefused, StorageError],
|
|
87
86
|
description: "Update task content and placement atomically, carrying its subtree to the destination area. Null clears wakeOn, dueOn, or owedTo. Omitted parentTaskId preserves it, except that a move to another areaId lands at that area's root; null means area root. A parent supplies its area; an explicit area must agree with an explicit parent. Omitted beforeId preserves order within the same siblings and appends when changing groups; null explicitly appends. A task that is not archived cannot move under an archived parent.",
|
|
88
87
|
readOnly: false,
|
|
@@ -90,7 +89,7 @@ export const TaskActions = [
|
|
|
90
89
|
success: Task,
|
|
91
90
|
}),
|
|
92
91
|
Action.make("tasks_archive", {
|
|
93
|
-
caller:
|
|
92
|
+
caller: Action.Anyone,
|
|
94
93
|
error: [NotFound, StorageError],
|
|
95
94
|
description: "Archive a task and its subtree, hiding them from tasks_list unless archived is true. Tasks already archived keep their archivedAt.",
|
|
96
95
|
readOnly: false,
|
|
@@ -98,7 +97,7 @@ export const TaskActions = [
|
|
|
98
97
|
success: Task,
|
|
99
98
|
}),
|
|
100
99
|
Action.make("tasks_unarchive", {
|
|
101
|
-
caller:
|
|
100
|
+
caller: Action.Anyone,
|
|
102
101
|
error: [NotFound, PlacementRefused, StorageError],
|
|
103
102
|
description: "Clear archivedAt across a task's whole subtree, restoring the task and every archived task under it, including when the task itself is not archived. Refused with ArchivedParent while its parent is archived; unarchive the parent instead.",
|
|
104
103
|
readOnly: false,
|
|
@@ -106,7 +105,7 @@ export const TaskActions = [
|
|
|
106
105
|
success: Task,
|
|
107
106
|
}),
|
|
108
107
|
Action.make("tasks_remove", {
|
|
109
|
-
caller:
|
|
108
|
+
caller: Action.Anyone,
|
|
110
109
|
error: [NotFound, StorageError],
|
|
111
110
|
description: "Permanently delete a task and its subtree, archived tasks in it included.",
|
|
112
111
|
readOnly: false,
|
package/dist/values.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
2
1
|
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
3
2
|
import { Schema } from "effect";
|
|
4
3
|
import { StorageError } from "./shared.ts";
|
|
@@ -12,8 +11,8 @@ export declare const ValuesUpdate: Schema.Struct<{
|
|
|
12
11
|
export type ValuesUpdate = typeof ValuesUpdate.Type;
|
|
13
12
|
export declare const ValuesActions: readonly [Action.Action<"values_get", Schema.$Record<Schema.String, Schema.Never>, Schema.Struct<{
|
|
14
13
|
readonly text: Schema.String;
|
|
15
|
-
}>, readonly (typeof StorageError)[], true, typeof
|
|
14
|
+
}>, readonly (typeof StorageError)[], true, typeof Action.Anyone, undefined, undefined>, Action.Action<"values_update", Schema.Struct<{
|
|
16
15
|
readonly text: Schema.String;
|
|
17
16
|
}>, Schema.Struct<{
|
|
18
17
|
readonly text: Schema.String;
|
|
19
|
-
}>, readonly (typeof StorageError)[], false, typeof
|
|
18
|
+
}>, readonly (typeof StorageError)[], false, typeof Action.Anyone, undefined, undefined>];
|
package/dist/values.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CurrentPrincipal } from "@gjermundgaraba/clankerauth-sdk/session";
|
|
2
1
|
import * as Action from "@gjermundgaraba/effect-actions/Action";
|
|
3
2
|
import { Schema } from "effect";
|
|
4
3
|
import { Description, StorageError } from "./shared.js";
|
|
@@ -6,14 +5,14 @@ export const Values = Schema.Struct({ text: Schema.String });
|
|
|
6
5
|
export const ValuesUpdate = Schema.Struct({ text: Description });
|
|
7
6
|
export const ValuesActions = [
|
|
8
7
|
Action.make("values_get", {
|
|
9
|
-
caller:
|
|
8
|
+
caller: Action.Anyone,
|
|
10
9
|
error: [StorageError],
|
|
11
10
|
description: "Read the values document.",
|
|
12
11
|
readOnly: true,
|
|
13
12
|
success: Values,
|
|
14
13
|
}),
|
|
15
14
|
Action.make("values_update", {
|
|
16
|
-
caller:
|
|
15
|
+
caller: Action.Anyone,
|
|
17
16
|
error: [StorageError],
|
|
18
17
|
description: "Replace the values document. The last save wins.",
|
|
19
18
|
readOnly: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjermundgaraba/wtf-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.1",
|
|
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,15 +23,13 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@gjermundgaraba/
|
|
27
|
-
"@gjermundgaraba/effect-actions": "0.26.1",
|
|
26
|
+
"@gjermundgaraba/effect-actions": "0.27.0",
|
|
28
27
|
"effect": "4.1.1",
|
|
29
28
|
"typescript": "7.0.2",
|
|
30
29
|
"vite-plus": "1.4.0"
|
|
31
30
|
},
|
|
32
31
|
"peerDependencies": {
|
|
33
|
-
"@gjermundgaraba/
|
|
34
|
-
"@gjermundgaraba/effect-actions": "^0.26.0",
|
|
32
|
+
"@gjermundgaraba/effect-actions": "^0.27.0",
|
|
35
33
|
"effect": "~4.1.1"
|
|
36
34
|
},
|
|
37
35
|
"engines": {
|