@krak-stack/auth 0.2.0 → 0.2.2
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/access.d.ts +1 -3
- package/dist/access.js +1 -3
- package/dist/admin/api.group.d.ts +36 -36
- package/dist/admin/api.group.js +13 -13
- package/dist/api.d.ts +2109 -865
- package/dist/auth/api.group.d.ts +664 -106
- package/dist/auth/api.group.js +8 -8
- package/dist/auth/schema.d.ts +537 -70
- package/dist/auth/schema.js +26 -10
- package/dist/components/admin-organization-form.js +1 -0
- package/dist/components/admin-organizations.d.ts +4 -5
- package/dist/components/admin-organizations.js +34 -31
- package/dist/components/admin-users.d.ts +5 -6
- package/dist/components/admin-users.js +51 -50
- package/dist/components/api-key-edit-form.js +2 -1
- package/dist/components/auth-atoms.d.ts +213 -103
- package/dist/components/auth-client-api.d.ts +1412 -2371
- package/dist/components/auth-client-api.js +11 -7
- package/dist/components/auth-forms.js +6 -1
- package/dist/components/auth-provider.d.ts +13 -13
- package/dist/components/contact-fields.d.ts +40 -0
- package/dist/components/contact-fields.js +86 -0
- package/dist/components/member-required.js +2 -2
- package/dist/components/organization-switcher.js +101 -193
- package/dist/components/user-button.d.ts +73 -0
- package/dist/components/user-button.js +179 -29
- package/dist/extra/api.group.d.ts +19 -19
- package/dist/extra/api.group.js +3 -3
- package/dist/extra/schema.d.ts +1 -2
- package/dist/extra/schema.js +1 -2
- package/dist/query.js +5 -5
- package/dist/schema.d.ts +279 -12
- package/dist/schema.js +162 -42
- package/dist/server/api.group.d.ts +157 -29
- package/dist/server/api.group.js +12 -12
- package/dist/server/schema.d.ts +64 -0
- package/dist/service.d.ts +3380 -2446
- package/package.json +4 -4
|
@@ -1,64 +1,128 @@
|
|
|
1
1
|
import { Atom } from "effect/unstable/reactivity";
|
|
2
2
|
export declare const AUTH_CLIENT_CHANGE_EVENT = "krakstack-auth:change";
|
|
3
|
-
export declare const authSessionAtom: (arg: string | undefined) => Atom.Writable<import("effect/unstable/reactivity/AsyncResult").AsyncResult<
|
|
4
|
-
readonly session:
|
|
5
|
-
readonly id:
|
|
6
|
-
readonly expiresAt:
|
|
7
|
-
readonly token:
|
|
8
|
-
readonly createdAt:
|
|
9
|
-
readonly updatedAt:
|
|
10
|
-
readonly ipAddress
|
|
11
|
-
readonly userAgent
|
|
12
|
-
readonly userId:
|
|
13
|
-
readonly impersonatedBy
|
|
14
|
-
readonly impersonatedByOrganizationId
|
|
15
|
-
readonly activeOrganizationId
|
|
16
|
-
}
|
|
17
|
-
readonly user:
|
|
18
|
-
readonly id:
|
|
19
|
-
readonly name:
|
|
20
|
-
readonly email:
|
|
21
|
-
readonly emailVerified:
|
|
22
|
-
readonly image:
|
|
23
|
-
readonly
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
readonly
|
|
56
|
-
readonly
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
60
|
-
|
|
61
|
-
|
|
3
|
+
export declare const authSessionAtom: (arg: string | undefined) => Atom.Writable<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
|
|
4
|
+
readonly session: {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly expiresAt: Date;
|
|
7
|
+
readonly token: string;
|
|
8
|
+
readonly createdAt: Date;
|
|
9
|
+
readonly updatedAt: Date;
|
|
10
|
+
readonly ipAddress?: string | null | undefined;
|
|
11
|
+
readonly userAgent?: string | null | undefined;
|
|
12
|
+
readonly userId: string;
|
|
13
|
+
readonly impersonatedBy?: string | null | undefined;
|
|
14
|
+
readonly impersonatedByOrganizationId?: string | null | undefined;
|
|
15
|
+
readonly activeOrganizationId?: string | null | undefined;
|
|
16
|
+
};
|
|
17
|
+
readonly user: {
|
|
18
|
+
readonly id: string;
|
|
19
|
+
readonly name: string;
|
|
20
|
+
readonly email: string;
|
|
21
|
+
readonly emailVerified: boolean;
|
|
22
|
+
readonly image: string | null;
|
|
23
|
+
readonly metadata?: {
|
|
24
|
+
readonly emails?: readonly {
|
|
25
|
+
readonly email: string;
|
|
26
|
+
readonly translations: readonly {
|
|
27
|
+
readonly locale: "en" | "fr";
|
|
28
|
+
readonly label: string;
|
|
29
|
+
}[];
|
|
30
|
+
}[] | undefined;
|
|
31
|
+
readonly phones?: readonly {
|
|
32
|
+
readonly number: string;
|
|
33
|
+
readonly extension?: string | undefined;
|
|
34
|
+
readonly translations: readonly {
|
|
35
|
+
readonly locale: "en" | "fr";
|
|
36
|
+
readonly label: string;
|
|
37
|
+
}[];
|
|
38
|
+
}[] | undefined;
|
|
39
|
+
readonly websites?: readonly {
|
|
40
|
+
readonly url: string;
|
|
41
|
+
readonly translations: readonly {
|
|
42
|
+
readonly locale: "en" | "fr";
|
|
43
|
+
readonly label: string;
|
|
44
|
+
}[];
|
|
45
|
+
}[] | undefined;
|
|
46
|
+
readonly socials?: readonly {
|
|
47
|
+
readonly platform: "facebook" | "github" | "instagram" | "linkedin" | "tiktok" | "x" | "youtube";
|
|
48
|
+
readonly url: string;
|
|
49
|
+
readonly translations: readonly {
|
|
50
|
+
readonly locale: "en" | "fr";
|
|
51
|
+
readonly label: string;
|
|
52
|
+
}[];
|
|
53
|
+
}[] | undefined;
|
|
54
|
+
} | null | undefined;
|
|
55
|
+
readonly role: string | null;
|
|
56
|
+
readonly banned: boolean | null;
|
|
57
|
+
readonly banReason?: string | null | undefined;
|
|
58
|
+
readonly banExpires?: Date | null | undefined;
|
|
59
|
+
readonly twoFactorEnabled?: boolean | undefined;
|
|
60
|
+
readonly lastLoginMethod?: string | null | undefined;
|
|
61
|
+
readonly createdAt: Date;
|
|
62
|
+
readonly updatedAt: Date;
|
|
63
|
+
};
|
|
64
|
+
} | null, import("../auth/schema.js").AuthBadRequest>, Atom.Atom<import("effect/unstable/reactivity/AsyncResult").AsyncResult<import("effect/unstable/reactivity/AsyncResult").AsyncResult<{
|
|
65
|
+
readonly session: {
|
|
66
|
+
readonly id: string;
|
|
67
|
+
readonly expiresAt: Date;
|
|
68
|
+
readonly token: string;
|
|
69
|
+
readonly createdAt: Date;
|
|
70
|
+
readonly updatedAt: Date;
|
|
71
|
+
readonly ipAddress?: string | null | undefined;
|
|
72
|
+
readonly userAgent?: string | null | undefined;
|
|
73
|
+
readonly userId: string;
|
|
74
|
+
readonly impersonatedBy?: string | null | undefined;
|
|
75
|
+
readonly impersonatedByOrganizationId?: string | null | undefined;
|
|
76
|
+
readonly activeOrganizationId?: string | null | undefined;
|
|
77
|
+
};
|
|
78
|
+
readonly user: {
|
|
79
|
+
readonly id: string;
|
|
80
|
+
readonly name: string;
|
|
81
|
+
readonly email: string;
|
|
82
|
+
readonly emailVerified: boolean;
|
|
83
|
+
readonly image: string | null;
|
|
84
|
+
readonly metadata?: {
|
|
85
|
+
readonly emails?: readonly {
|
|
86
|
+
readonly email: string;
|
|
87
|
+
readonly translations: readonly {
|
|
88
|
+
readonly locale: "en" | "fr";
|
|
89
|
+
readonly label: string;
|
|
90
|
+
}[];
|
|
91
|
+
}[] | undefined;
|
|
92
|
+
readonly phones?: readonly {
|
|
93
|
+
readonly number: string;
|
|
94
|
+
readonly extension?: string | undefined;
|
|
95
|
+
readonly translations: readonly {
|
|
96
|
+
readonly locale: "en" | "fr";
|
|
97
|
+
readonly label: string;
|
|
98
|
+
}[];
|
|
99
|
+
}[] | undefined;
|
|
100
|
+
readonly websites?: readonly {
|
|
101
|
+
readonly url: string;
|
|
102
|
+
readonly translations: readonly {
|
|
103
|
+
readonly locale: "en" | "fr";
|
|
104
|
+
readonly label: string;
|
|
105
|
+
}[];
|
|
106
|
+
}[] | undefined;
|
|
107
|
+
readonly socials?: readonly {
|
|
108
|
+
readonly platform: "facebook" | "github" | "instagram" | "linkedin" | "tiktok" | "x" | "youtube";
|
|
109
|
+
readonly url: string;
|
|
110
|
+
readonly translations: readonly {
|
|
111
|
+
readonly locale: "en" | "fr";
|
|
112
|
+
readonly label: string;
|
|
113
|
+
}[];
|
|
114
|
+
}[] | undefined;
|
|
115
|
+
} | null | undefined;
|
|
116
|
+
readonly role: string | null;
|
|
117
|
+
readonly banned: boolean | null;
|
|
118
|
+
readonly banReason?: string | null | undefined;
|
|
119
|
+
readonly banExpires?: Date | null | undefined;
|
|
120
|
+
readonly twoFactorEnabled?: boolean | undefined;
|
|
121
|
+
readonly lastLoginMethod?: string | null | undefined;
|
|
122
|
+
readonly createdAt: Date;
|
|
123
|
+
readonly updatedAt: Date;
|
|
124
|
+
};
|
|
125
|
+
} | null, import("../auth/schema.js").AuthBadRequest>, unknown>>>;
|
|
62
126
|
export declare const authOrganizationsAtom: (arg: string | undefined) => Atom.Writable<import("effect/unstable/reactivity/AsyncResult").AsyncResult<readonly {
|
|
63
127
|
readonly id: string;
|
|
64
128
|
readonly name: string;
|
|
@@ -93,28 +157,51 @@ export declare const activeAuthOrganizationAtom: (arg: string | undefined) => (a
|
|
|
93
157
|
readonly userId?: string | null | undefined;
|
|
94
158
|
readonly parentId?: string | null | undefined;
|
|
95
159
|
readonly createdAt: Date;
|
|
96
|
-
readonly members: readonly
|
|
97
|
-
readonly id:
|
|
98
|
-
readonly organizationId:
|
|
99
|
-
readonly userId:
|
|
100
|
-
readonly role:
|
|
101
|
-
readonly createdAt:
|
|
102
|
-
readonly user:
|
|
103
|
-
readonly id:
|
|
104
|
-
readonly name:
|
|
105
|
-
readonly email:
|
|
106
|
-
readonly
|
|
107
|
-
readonly
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
160
|
+
readonly members: readonly {
|
|
161
|
+
readonly id: string;
|
|
162
|
+
readonly organizationId: string;
|
|
163
|
+
readonly userId: string;
|
|
164
|
+
readonly role: string;
|
|
165
|
+
readonly createdAt: Date;
|
|
166
|
+
readonly user: {
|
|
167
|
+
readonly id: string;
|
|
168
|
+
readonly name: string;
|
|
169
|
+
readonly email: string;
|
|
170
|
+
readonly image?: string | null | undefined;
|
|
171
|
+
readonly metadata?: {
|
|
172
|
+
readonly emails?: readonly {
|
|
173
|
+
readonly email: string;
|
|
174
|
+
readonly translations: readonly {
|
|
175
|
+
readonly locale: "en" | "fr";
|
|
176
|
+
readonly label: string;
|
|
177
|
+
}[];
|
|
178
|
+
}[] | undefined;
|
|
179
|
+
readonly phones?: readonly {
|
|
180
|
+
readonly number: string;
|
|
181
|
+
readonly extension?: string | undefined;
|
|
182
|
+
readonly translations: readonly {
|
|
183
|
+
readonly locale: "en" | "fr";
|
|
184
|
+
readonly label: string;
|
|
185
|
+
}[];
|
|
186
|
+
}[] | undefined;
|
|
187
|
+
readonly websites?: readonly {
|
|
188
|
+
readonly url: string;
|
|
189
|
+
readonly translations: readonly {
|
|
190
|
+
readonly locale: "en" | "fr";
|
|
191
|
+
readonly label: string;
|
|
192
|
+
}[];
|
|
193
|
+
}[] | undefined;
|
|
194
|
+
readonly socials?: readonly {
|
|
195
|
+
readonly platform: "facebook" | "github" | "instagram" | "linkedin" | "tiktok" | "x" | "youtube";
|
|
196
|
+
readonly url: string;
|
|
197
|
+
readonly translations: readonly {
|
|
198
|
+
readonly locale: "en" | "fr";
|
|
199
|
+
readonly label: string;
|
|
200
|
+
}[];
|
|
201
|
+
}[] | undefined;
|
|
202
|
+
} | null | undefined;
|
|
203
|
+
};
|
|
204
|
+
}[];
|
|
118
205
|
readonly invitations: readonly {
|
|
119
206
|
readonly id: string;
|
|
120
207
|
readonly email: string;
|
|
@@ -138,28 +225,51 @@ export declare const activeAuthOrganizationAtom: (arg: string | undefined) => (a
|
|
|
138
225
|
readonly userId?: string | null | undefined;
|
|
139
226
|
readonly parentId?: string | null | undefined;
|
|
140
227
|
readonly createdAt: Date;
|
|
141
|
-
readonly members: readonly
|
|
142
|
-
readonly id:
|
|
143
|
-
readonly organizationId:
|
|
144
|
-
readonly userId:
|
|
145
|
-
readonly role:
|
|
146
|
-
readonly createdAt:
|
|
147
|
-
readonly user:
|
|
148
|
-
readonly id:
|
|
149
|
-
readonly name:
|
|
150
|
-
readonly email:
|
|
151
|
-
readonly
|
|
152
|
-
readonly
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
228
|
+
readonly members: readonly {
|
|
229
|
+
readonly id: string;
|
|
230
|
+
readonly organizationId: string;
|
|
231
|
+
readonly userId: string;
|
|
232
|
+
readonly role: string;
|
|
233
|
+
readonly createdAt: Date;
|
|
234
|
+
readonly user: {
|
|
235
|
+
readonly id: string;
|
|
236
|
+
readonly name: string;
|
|
237
|
+
readonly email: string;
|
|
238
|
+
readonly image?: string | null | undefined;
|
|
239
|
+
readonly metadata?: {
|
|
240
|
+
readonly emails?: readonly {
|
|
241
|
+
readonly email: string;
|
|
242
|
+
readonly translations: readonly {
|
|
243
|
+
readonly locale: "en" | "fr";
|
|
244
|
+
readonly label: string;
|
|
245
|
+
}[];
|
|
246
|
+
}[] | undefined;
|
|
247
|
+
readonly phones?: readonly {
|
|
248
|
+
readonly number: string;
|
|
249
|
+
readonly extension?: string | undefined;
|
|
250
|
+
readonly translations: readonly {
|
|
251
|
+
readonly locale: "en" | "fr";
|
|
252
|
+
readonly label: string;
|
|
253
|
+
}[];
|
|
254
|
+
}[] | undefined;
|
|
255
|
+
readonly websites?: readonly {
|
|
256
|
+
readonly url: string;
|
|
257
|
+
readonly translations: readonly {
|
|
258
|
+
readonly locale: "en" | "fr";
|
|
259
|
+
readonly label: string;
|
|
260
|
+
}[];
|
|
261
|
+
}[] | undefined;
|
|
262
|
+
readonly socials?: readonly {
|
|
263
|
+
readonly platform: "facebook" | "github" | "instagram" | "linkedin" | "tiktok" | "x" | "youtube";
|
|
264
|
+
readonly url: string;
|
|
265
|
+
readonly translations: readonly {
|
|
266
|
+
readonly locale: "en" | "fr";
|
|
267
|
+
readonly label: string;
|
|
268
|
+
}[];
|
|
269
|
+
}[] | undefined;
|
|
270
|
+
} | null | undefined;
|
|
271
|
+
};
|
|
272
|
+
}[];
|
|
163
273
|
readonly invitations: readonly {
|
|
164
274
|
readonly id: string;
|
|
165
275
|
readonly email: string;
|