@astrale-domains/shell 0.1.0-beta.11 → 0.1.0-beta.13
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/README.md +63 -42
- package/dist/actions/index.d.ts +1 -0
- package/dist/actions/user/index.d.ts +1 -0
- package/dist/actions/user/resolve-home.d.ts +3 -0
- package/dist/application.d.ts +5 -9808
- package/dist/application.js +9 -8
- package/dist/entrypoints/runtime.d.ts +1 -0
- package/dist/index.d.ts +0 -2
- package/dist/index.js +0 -2
- package/dist/mutations/group/index.d.ts +1 -0
- package/dist/mutations/group/membership.d.ts +19 -0
- package/dist/mutations/space/access.d.ts +25 -0
- package/dist/mutations/space/default.d.ts +19 -0
- package/dist/mutations/space/index.d.ts +2 -0
- package/dist/mutations/user/index.d.ts +1 -0
- package/dist/mutations/user/repair.d.ts +37 -0
- package/dist/queries/space/access.d.ts +9 -0
- package/dist/queries/space/admin.d.ts +9 -0
- package/dist/queries/space/index.d.ts +3 -0
- package/dist/queries/space/member.d.ts +9 -0
- package/dist/queries/user/groups.d.ts +9 -0
- package/dist/queries/user/home.d.ts +9 -0
- package/dist/queries/user/index.d.ts +5 -0
- package/dist/queries/user/owned-spaces.d.ts +9 -0
- package/dist/queries/user/profile.d.ts +4 -0
- package/dist/queries/user/profile.js +1 -1
- package/dist/queries/user/setup.d.ts +13 -0
- package/dist/runtime.d.ts +10 -4
- package/dist/runtime.js +13 -14
- package/dist/schema/domain/index.d.ts +68 -1639
- package/dist/schema/domain/index.js +3 -2
- package/dist/schema/group/class.d.ts +13 -321
- package/dist/schema/group/class.js +3 -2
- package/dist/schema/group/methods.d.ts +2 -2
- package/dist/schema/group/methods.js +1 -5
- package/dist/schema/space/class.d.ts +10 -78
- package/dist/schema/space/class.js +3 -2
- package/dist/schema/space/methods.d.ts +4 -4
- package/dist/schema/space/methods.js +1 -5
- package/dist/schema/user/class.d.ts +14 -274
- package/dist/schema/user/class.js +5 -5
- package/dist/workflows/group/assign.d.ts +3 -0
- package/dist/workflows/group/change.d.ts +6 -0
- package/dist/workflows/group/index.d.ts +3 -0
- package/dist/workflows/group/unassign.d.ts +3 -0
- package/dist/workflows/index.d.ts +3 -0
- package/dist/workflows/setup/admin.d.ts +3 -0
- package/dist/workflows/setup/index.d.ts +5 -0
- package/dist/workflows/setup/member.d.ts +3 -0
- package/dist/workflows/setup/plan.d.ts +18 -0
- package/dist/workflows/setup/provision.d.ts +5 -0
- package/dist/workflows/setup/run.d.ts +7 -0
- package/dist/workflows/space/access.d.ts +7 -0
- package/dist/workflows/space/add.d.ts +3 -0
- package/dist/workflows/space/default.d.ts +3 -0
- package/dist/workflows/space/default.js +1 -1
- package/dist/workflows/space/index.d.ts +4 -0
- package/dist/workflows/space/remove.d.ts +3 -0
- package/package.json +14 -6
|
@@ -1,278 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Identity"> & {
|
|
11
|
-
readonly origin: "kernel.astrale.ai";
|
|
12
|
-
}, "kernel.astrale.ai:class.Identity", readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
|
|
13
|
-
readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
|
|
14
|
-
readonly origin: "kernel.astrale.ai";
|
|
15
|
-
};
|
|
16
|
-
readonly kind: 'node';
|
|
17
|
-
readonly abstract: true;
|
|
18
|
-
}, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
|
|
19
|
-
readonly origin: "kernel.astrale.ai";
|
|
20
|
-
}, "kernel.astrale.ai:class.Node", readonly import("@astrale-os/sdk/schema").AnyResolvedClass[], never, never, never, never, never, never>, ...never[]], import("@astrale-os/sdk/schema").PropertyProjection<({
|
|
21
|
-
claim: string;
|
|
22
|
-
op: "contains";
|
|
23
|
-
value: unknown;
|
|
24
|
-
} | {
|
|
25
|
-
claim: string;
|
|
26
|
-
op: "eq";
|
|
27
|
-
value: unknown;
|
|
28
|
-
} | {
|
|
29
|
-
claim: string;
|
|
30
|
-
op: "exists";
|
|
31
|
-
})[], false, "requiredClaims", "kernel.astrale.ai:class.Identity.property.requiredClaims"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, false, "frozen", "kernel.astrale.ai:class.Identity.property.frozen"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "iss", "kernel.astrale.ai:class.Identity.property.iss"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "sub", "kernel.astrale.ai:class.Identity.property.sub">, import("@astrale-os/sdk/schema").MethodProjection<{
|
|
32
|
-
audience: string;
|
|
33
|
-
ttlSeconds: number;
|
|
34
|
-
attenuation: unknown;
|
|
35
|
-
}, {
|
|
36
|
-
readonly mode: 'value';
|
|
37
|
-
readonly value: string;
|
|
38
|
-
}, false, "default", "authenticated", "delegate", "kernel.astrale.ai:class.Identity.method.delegate">, import("@astrale-os/sdk/schema").MethodProjection<Record<string, never>, {
|
|
39
|
-
readonly mode: 'value';
|
|
40
|
-
readonly value: {
|
|
41
|
-
id: string;
|
|
42
|
-
issuer: string;
|
|
43
|
-
subject: string;
|
|
44
|
-
frozen: boolean;
|
|
45
|
-
requiredClaims: ({
|
|
46
|
-
claim: string;
|
|
47
|
-
op: "contains";
|
|
48
|
-
value: unknown;
|
|
49
|
-
} | {
|
|
50
|
-
claim: string;
|
|
51
|
-
op: "eq";
|
|
52
|
-
value: unknown;
|
|
53
|
-
} | {
|
|
54
|
-
claim: string;
|
|
55
|
-
op: "exists";
|
|
56
|
-
})[];
|
|
57
|
-
};
|
|
58
|
-
}, true, "default", "authenticated", "whoami", "kernel.astrale.ai:class.Identity.method.whoami"> | import("@astrale-os/sdk/schema").MethodProjection<{
|
|
59
|
-
policy: string;
|
|
60
|
-
object: string;
|
|
61
|
-
}, {
|
|
62
|
-
readonly mode: 'value';
|
|
63
|
-
readonly value: {
|
|
64
|
-
allowed: boolean;
|
|
65
|
-
};
|
|
66
|
-
}, true, "default", "authenticated", "can", "kernel.astrale.ai:class.Identity.method.can"> | import("@astrale-os/sdk/schema").MethodProjection<{
|
|
67
|
-
issuer: string;
|
|
68
|
-
subject: string;
|
|
69
|
-
}, {
|
|
70
|
-
readonly mode: 'value';
|
|
71
|
-
readonly value: {
|
|
72
|
-
id: string;
|
|
73
|
-
issuer: string;
|
|
74
|
-
subject: string;
|
|
75
|
-
frozen: boolean;
|
|
76
|
-
requiredClaims: ({
|
|
77
|
-
claim: string;
|
|
78
|
-
op: "contains";
|
|
79
|
-
value: unknown;
|
|
80
|
-
} | {
|
|
81
|
-
claim: string;
|
|
82
|
-
op: "eq";
|
|
83
|
-
value: unknown;
|
|
84
|
-
} | {
|
|
85
|
-
claim: string;
|
|
86
|
-
op: "exists";
|
|
87
|
-
})[];
|
|
88
|
-
} | null;
|
|
89
|
-
}, true, "default", "authorized", "whois", "kernel.astrale.ai:class.Identity.method.whois"> | import("@astrale-os/sdk/schema").MethodProjection<{
|
|
90
|
-
audience?: string | undefined;
|
|
91
|
-
ttlSeconds: number;
|
|
92
|
-
grant?: unknown;
|
|
93
|
-
}, {
|
|
94
|
-
readonly mode: 'value';
|
|
95
|
-
readonly value: string;
|
|
96
|
-
}, true, "default", "authorized", "mint", "kernel.astrale.ai:class.Identity.method.mint">, import("@astrale-os/sdk/schema").PropertyProjection<({
|
|
97
|
-
claim: string;
|
|
98
|
-
op: "contains";
|
|
99
|
-
value: unknown;
|
|
100
|
-
} | {
|
|
101
|
-
claim: string;
|
|
102
|
-
op: "eq";
|
|
103
|
-
value: unknown;
|
|
104
|
-
} | {
|
|
105
|
-
claim: string;
|
|
106
|
-
op: "exists";
|
|
107
|
-
})[], false, "requiredClaims", "kernel.astrale.ai:class.Identity.property.requiredClaims"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, false, "frozen", "kernel.astrale.ai:class.Identity.property.frozen"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "iss", "kernel.astrale.ai:class.Identity.property.iss"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "sub", "kernel.astrale.ai:class.Identity.property.sub">, import("@astrale-os/sdk/schema").MethodProjection<{
|
|
108
|
-
audience: string;
|
|
109
|
-
ttlSeconds: number;
|
|
110
|
-
attenuation: unknown;
|
|
111
|
-
}, {
|
|
112
|
-
readonly mode: 'value';
|
|
113
|
-
readonly value: string;
|
|
114
|
-
}, false, "default", "authenticated", "delegate", "kernel.astrale.ai:class.Identity.method.delegate">, import("@astrale-os/sdk/schema").MethodProjection<Record<string, never>, {
|
|
115
|
-
readonly mode: 'value';
|
|
116
|
-
readonly value: {
|
|
117
|
-
id: string;
|
|
118
|
-
issuer: string;
|
|
119
|
-
subject: string;
|
|
120
|
-
frozen: boolean;
|
|
121
|
-
requiredClaims: ({
|
|
122
|
-
claim: string;
|
|
123
|
-
op: "contains";
|
|
124
|
-
value: unknown;
|
|
125
|
-
} | {
|
|
126
|
-
claim: string;
|
|
127
|
-
op: "eq";
|
|
128
|
-
value: unknown;
|
|
129
|
-
} | {
|
|
130
|
-
claim: string;
|
|
131
|
-
op: "exists";
|
|
132
|
-
})[];
|
|
133
|
-
};
|
|
134
|
-
}, true, "default", "authenticated", "whoami", "kernel.astrale.ai:class.Identity.method.whoami"> | import("@astrale-os/sdk/schema").MethodProjection<{
|
|
135
|
-
policy: string;
|
|
136
|
-
object: string;
|
|
137
|
-
}, {
|
|
138
|
-
readonly mode: 'value';
|
|
139
|
-
readonly value: {
|
|
140
|
-
allowed: boolean;
|
|
141
|
-
};
|
|
142
|
-
}, true, "default", "authenticated", "can", "kernel.astrale.ai:class.Identity.method.can"> | import("@astrale-os/sdk/schema").MethodProjection<{
|
|
143
|
-
issuer: string;
|
|
144
|
-
subject: string;
|
|
145
|
-
}, {
|
|
146
|
-
readonly mode: 'value';
|
|
147
|
-
readonly value: {
|
|
148
|
-
id: string;
|
|
149
|
-
issuer: string;
|
|
150
|
-
subject: string;
|
|
151
|
-
frozen: boolean;
|
|
152
|
-
requiredClaims: ({
|
|
153
|
-
claim: string;
|
|
154
|
-
op: "contains";
|
|
155
|
-
value: unknown;
|
|
156
|
-
} | {
|
|
157
|
-
claim: string;
|
|
158
|
-
op: "eq";
|
|
159
|
-
value: unknown;
|
|
160
|
-
} | {
|
|
161
|
-
claim: string;
|
|
162
|
-
op: "exists";
|
|
163
|
-
})[];
|
|
164
|
-
} | null;
|
|
165
|
-
}, true, "default", "authorized", "whois", "kernel.astrale.ai:class.Identity.method.whois"> | import("@astrale-os/sdk/schema").MethodProjection<{
|
|
166
|
-
audience?: string | undefined;
|
|
167
|
-
ttlSeconds: number;
|
|
168
|
-
grant?: unknown;
|
|
169
|
-
}, {
|
|
170
|
-
readonly mode: 'value';
|
|
171
|
-
readonly value: string;
|
|
172
|
-
}, true, "default", "authorized", "mint", "kernel.astrale.ai:class.Identity.method.mint">>];
|
|
1
|
+
import { nodeClass, type Kernel } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { resolveHome } from './methods.js';
|
|
4
|
+
declare const displayName: import("@astrale-os/sdk/schema").Property<z.ZodString, {
|
|
5
|
+
readonly required: false;
|
|
6
|
+
}>;
|
|
7
|
+
export interface UserConfig {
|
|
8
|
+
readonly description: string;
|
|
9
|
+
readonly extends: readonly [Kernel['classes']['Identity']];
|
|
173
10
|
readonly properties: {
|
|
174
|
-
readonly displayName:
|
|
11
|
+
readonly displayName: typeof displayName;
|
|
175
12
|
};
|
|
176
13
|
readonly methods: {
|
|
177
|
-
readonly resolveHome:
|
|
178
|
-
readonly mode: 'value';
|
|
179
|
-
readonly value: {
|
|
180
|
-
userId: string;
|
|
181
|
-
personalSpaceId: string | null;
|
|
182
|
-
};
|
|
183
|
-
}, "authenticated", false, "default">>;
|
|
14
|
+
readonly resolveHome: typeof resolveHome;
|
|
184
15
|
};
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
}) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
|
|
189
|
-
readonly name: "iss";
|
|
190
|
-
readonly key: "kernel.astrale.ai:class.Identity.property.iss";
|
|
191
|
-
}) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
|
|
192
|
-
readonly name: "sub";
|
|
193
|
-
readonly key: "kernel.astrale.ai:class.Identity.property.sub";
|
|
194
|
-
});
|
|
195
|
-
readonly effectiveInstanceMethods: import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
196
|
-
readonly mode: 'value';
|
|
197
|
-
readonly value: {
|
|
198
|
-
userId: string;
|
|
199
|
-
personalSpaceId: string | null;
|
|
200
|
-
};
|
|
201
|
-
}, "authenticated", false, "default">>, "resolveHome", "self"> | (import("@astrale-os/sdk/schema").ResolvedMethod<{
|
|
202
|
-
audience: string;
|
|
203
|
-
ttlSeconds: number;
|
|
204
|
-
attenuation: unknown;
|
|
205
|
-
}, {
|
|
206
|
-
readonly mode: 'value';
|
|
207
|
-
readonly value: string;
|
|
208
|
-
}, false, "default", "authenticated", import("@astrale-os/sdk/schema").PolicyCheckExpression<import("@astrale-os/sdk/schema").PolicyRef, import("@astrale-os/sdk/schema").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.delegate"> & {
|
|
209
|
-
readonly name: "delegate";
|
|
210
|
-
});
|
|
211
|
-
readonly effectiveStaticMethods: (import("@astrale-os/sdk/schema").ResolvedMethod<Record<string, never>, {
|
|
212
|
-
readonly mode: 'value';
|
|
213
|
-
readonly value: {
|
|
214
|
-
id: string;
|
|
215
|
-
issuer: string;
|
|
216
|
-
subject: string;
|
|
217
|
-
frozen: boolean;
|
|
218
|
-
requiredClaims: ({
|
|
219
|
-
claim: string;
|
|
220
|
-
op: "contains";
|
|
221
|
-
value: unknown;
|
|
222
|
-
} | {
|
|
223
|
-
claim: string;
|
|
224
|
-
op: "eq";
|
|
225
|
-
value: unknown;
|
|
226
|
-
} | {
|
|
227
|
-
claim: string;
|
|
228
|
-
op: "exists";
|
|
229
|
-
})[];
|
|
230
|
-
};
|
|
231
|
-
}, true, "default", "authenticated", import("@astrale-os/sdk/schema").PolicyCheckExpression<import("@astrale-os/sdk/schema").PolicyRef, import("@astrale-os/sdk/schema").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.whoami"> & {
|
|
232
|
-
readonly name: "whoami";
|
|
233
|
-
}) | (import("@astrale-os/sdk/schema").ResolvedMethod<{
|
|
234
|
-
policy: string;
|
|
235
|
-
object: string;
|
|
236
|
-
}, {
|
|
237
|
-
readonly mode: 'value';
|
|
238
|
-
readonly value: {
|
|
239
|
-
allowed: boolean;
|
|
240
|
-
};
|
|
241
|
-
}, true, "default", "authenticated", import("@astrale-os/sdk/schema").PolicyCheckExpression<import("@astrale-os/sdk/schema").PolicyRef, import("@astrale-os/sdk/schema").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.can"> & {
|
|
242
|
-
readonly name: "can";
|
|
243
|
-
}) | (import("@astrale-os/sdk/schema").ResolvedMethod<{
|
|
244
|
-
issuer: string;
|
|
245
|
-
subject: string;
|
|
246
|
-
}, {
|
|
247
|
-
readonly mode: 'value';
|
|
248
|
-
readonly value: {
|
|
249
|
-
id: string;
|
|
250
|
-
issuer: string;
|
|
251
|
-
subject: string;
|
|
252
|
-
frozen: boolean;
|
|
253
|
-
requiredClaims: ({
|
|
254
|
-
claim: string;
|
|
255
|
-
op: "contains";
|
|
256
|
-
value: unknown;
|
|
257
|
-
} | {
|
|
258
|
-
claim: string;
|
|
259
|
-
op: "eq";
|
|
260
|
-
value: unknown;
|
|
261
|
-
} | {
|
|
262
|
-
claim: string;
|
|
263
|
-
op: "exists";
|
|
264
|
-
})[];
|
|
265
|
-
} | null;
|
|
266
|
-
}, true, "default", "authorized", import("@astrale-os/sdk/schema").PolicyCheckExpression<import("@astrale-os/sdk/schema").PolicyRef, import("@astrale-os/sdk/schema").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.whois"> & {
|
|
267
|
-
readonly name: "whois";
|
|
268
|
-
}) | (import("@astrale-os/sdk/schema").ResolvedMethod<{
|
|
269
|
-
audience?: string | undefined;
|
|
270
|
-
ttlSeconds: number;
|
|
271
|
-
grant?: unknown;
|
|
272
|
-
}, {
|
|
273
|
-
readonly mode: 'value';
|
|
274
|
-
readonly value: string;
|
|
275
|
-
}, true, "default", "authorized", import("@astrale-os/sdk/schema").PolicyCheckExpression<import("@astrale-os/sdk/schema").PolicyRef, import("@astrale-os/sdk/schema").PolicyCheckObject>, "kernel.astrale.ai:class.Identity.method.mint"> & {
|
|
276
|
-
readonly name: "mint";
|
|
277
|
-
});
|
|
278
|
-
}>;
|
|
16
|
+
}
|
|
17
|
+
export declare const User: ReturnType<typeof nodeClass<UserConfig>>;
|
|
18
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { K, nodeClass, property } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { resolveHome } from './methods.js';
|
|
4
|
-
|
|
4
|
+
const displayName = property(z.string().min(1).max(160), { required: false });
|
|
5
|
+
const config = {
|
|
5
6
|
description: 'One externally identified person using Shell.',
|
|
6
7
|
extends: [K.classes.Identity],
|
|
7
|
-
properties: {
|
|
8
|
-
displayName: property(z.string().min(1).max(160), { required: false }),
|
|
9
|
-
},
|
|
8
|
+
properties: { displayName },
|
|
10
9
|
methods: { resolveHome },
|
|
11
|
-
}
|
|
10
|
+
};
|
|
11
|
+
export const User = nodeClass(config);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { WorkflowContext } from '@astrale-os/sdk/workflow';
|
|
2
|
+
import type { S, Shell } from '#schema';
|
|
3
|
+
type GroupCallable = typeof S.classes.Group.self.methods.assignUser | typeof S.classes.Group.self.methods.unassignUser;
|
|
4
|
+
type GroupContext = WorkflowContext<GroupCallable, Shell>;
|
|
5
|
+
export declare function changeMembership(context: GroupContext, present: boolean): Promise<Readonly<Record<never, never>>>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { setupAdminWorkflow } from './admin.js';
|
|
2
|
+
export { setupMemberWorkflow } from './member.js';
|
|
3
|
+
export { planUserSetup, type SetupConflictReason, type SetupPlan, type SetupRole } from './plan.js';
|
|
4
|
+
export { provisioningRequest, provisioningResult } from './provision.js';
|
|
5
|
+
export { runSetup } from './run.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Node } from '@astrale-os/sdk/graph/node';
|
|
2
|
+
import type { UserRepair } from '#mutations/user';
|
|
3
|
+
import type { UserSetupObservation } from '#queries/user';
|
|
4
|
+
import type { SetupUserInput, Shell } from '#schema';
|
|
5
|
+
export type SetupRole = 'member' | 'admin';
|
|
6
|
+
export type SetupPlan = {
|
|
7
|
+
readonly kind: 'conflict';
|
|
8
|
+
readonly reason: SetupConflictReason;
|
|
9
|
+
readonly message: string;
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: 'unchanged';
|
|
12
|
+
readonly personalSpaceId: Node['id'];
|
|
13
|
+
} | {
|
|
14
|
+
readonly kind: 'repair';
|
|
15
|
+
readonly repair: UserRepair;
|
|
16
|
+
};
|
|
17
|
+
export type SetupConflictReason = 'IDENTITY_CLASS_CONFLICT' | 'IDENTITY_FACT_CONFLICT' | 'MULTIPLE_DEFAULT_SPACES' | 'DEFAULT_SPACE_CLASS_CONFLICT' | 'AMBIGUOUS_PERSONAL_SPACE';
|
|
18
|
+
export declare function planUserSetup(domain: Shell, input: SetupUserInput, role: SetupRole, observation: UserSetupObservation): SetupPlan;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ProvisionRequest, ProvisionResult } from '@astrale-os/sdk/auth';
|
|
2
|
+
import type { SetupUserInput, SetupUserResult, Shell } from '#schema';
|
|
3
|
+
import type { SetupRole } from './plan.js';
|
|
4
|
+
export declare function provisioningRequest(domain: Shell, input: SetupUserInput, role: SetupRole): ProvisionRequest;
|
|
5
|
+
export declare function provisioningResult(result: ProvisionResult): SetupUserResult;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WorkflowContext } from '@astrale-os/sdk/workflow';
|
|
2
|
+
import type { S, SetupUserResult, Shell } from '#schema';
|
|
3
|
+
import { type SetupRole } from './plan.js';
|
|
4
|
+
type SetupCallable = typeof S.functions.setupAdmin | typeof S.functions.setupMember;
|
|
5
|
+
type SetupContext = WorkflowContext<SetupCallable, Shell>;
|
|
6
|
+
export declare function runSetup(context: SetupContext, role: SetupRole): Promise<SetupUserResult>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { WorkflowContext } from '@astrale-os/sdk/workflow';
|
|
2
|
+
import type { S, Shell } from '#schema';
|
|
3
|
+
export type DesiredSpaceAccess = 'member' | 'admin' | null;
|
|
4
|
+
type SpaceAccessCallable = typeof S.classes.Space.self.methods.addUser | typeof S.classes.Space.self.methods.removeUser;
|
|
5
|
+
type SpaceAccessContext = WorkflowContext<SpaceAccessCallable, Shell>;
|
|
6
|
+
export declare function setUserAccess(context: SpaceAccessContext, desired: DesiredSpaceAccess): Promise<Readonly<Record<never, never>>>;
|
|
7
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InvocationError } from '@astrale-os/sdk/execution';
|
|
2
2
|
import { Path } from '@astrale-os/sdk/graph/path';
|
|
3
|
-
import { defineWorkflow } from '@astrale-os/sdk/workflow';
|
|
3
|
+
import { defineWorkflow, } from '@astrale-os/sdk/workflow';
|
|
4
4
|
import { changeDefaultSpace } from '#mutations/space';
|
|
5
5
|
import { observeHome } from '#queries/user';
|
|
6
6
|
async function setDefault(context) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-domains/shell",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.13",
|
|
4
4
|
"description": "Astrale Shell Domain schema and remote product implementation",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -47,22 +47,30 @@
|
|
|
47
47
|
"zod": "4.4.3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@astrale-os/sdk": "0.5.0-beta.
|
|
50
|
+
"@astrale-os/sdk": "0.5.0-beta.51",
|
|
51
51
|
"@astrale/typescript-config": "npm:@jsr/astrale__typescript-config@~1.1.3",
|
|
52
|
+
"@types/node": "^22.0.0",
|
|
52
53
|
"typescript": "7.0.2",
|
|
53
54
|
"vitest": "4.1.10"
|
|
54
55
|
},
|
|
55
56
|
"peerDependencies": {
|
|
56
|
-
"@astrale-os/sdk": ">=0.5.0-beta.
|
|
57
|
+
"@astrale-os/sdk": ">=0.5.0-beta.51 <1.0.0"
|
|
58
|
+
},
|
|
59
|
+
"devEngines": {
|
|
60
|
+
"runtime": {
|
|
61
|
+
"name": "node",
|
|
62
|
+
"version": ">=24 <25 || >=26 <27",
|
|
63
|
+
"onFail": "error"
|
|
64
|
+
}
|
|
57
65
|
},
|
|
58
66
|
"engines": {
|
|
59
|
-
"node": ">=
|
|
67
|
+
"node": ">=22"
|
|
60
68
|
},
|
|
61
69
|
"scripts": {
|
|
62
70
|
"prebuild": "pnpm clean",
|
|
63
|
-
"build": "tsc --paths null &&
|
|
71
|
+
"build": "tsc --project tsconfig.package.json --paths null && node scripts/verify-platform-package.mjs",
|
|
64
72
|
"clean": "rm -rf dist",
|
|
65
|
-
"typecheck": "tsc --noEmit --paths null",
|
|
73
|
+
"typecheck": "tsc --noEmit --paths null && tsc --noEmit -p tsconfig.test.json",
|
|
66
74
|
"test": "NODE_PATH=$PWD/node_modules vitest run --config vitest.config.ts",
|
|
67
75
|
"test:file": "NODE_PATH=$PWD/node_modules vitest run --config vitest.config.ts"
|
|
68
76
|
}
|