@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.
Files changed (38) hide show
  1. package/dist/access.d.ts +1 -3
  2. package/dist/access.js +1 -3
  3. package/dist/admin/api.group.d.ts +36 -36
  4. package/dist/admin/api.group.js +13 -13
  5. package/dist/api.d.ts +2109 -865
  6. package/dist/auth/api.group.d.ts +664 -106
  7. package/dist/auth/api.group.js +8 -8
  8. package/dist/auth/schema.d.ts +537 -70
  9. package/dist/auth/schema.js +26 -10
  10. package/dist/components/admin-organization-form.js +1 -0
  11. package/dist/components/admin-organizations.d.ts +4 -5
  12. package/dist/components/admin-organizations.js +34 -31
  13. package/dist/components/admin-users.d.ts +5 -6
  14. package/dist/components/admin-users.js +51 -50
  15. package/dist/components/api-key-edit-form.js +2 -1
  16. package/dist/components/auth-atoms.d.ts +213 -103
  17. package/dist/components/auth-client-api.d.ts +1412 -2371
  18. package/dist/components/auth-client-api.js +11 -7
  19. package/dist/components/auth-forms.js +6 -1
  20. package/dist/components/auth-provider.d.ts +13 -13
  21. package/dist/components/contact-fields.d.ts +40 -0
  22. package/dist/components/contact-fields.js +86 -0
  23. package/dist/components/member-required.js +2 -2
  24. package/dist/components/organization-switcher.js +101 -193
  25. package/dist/components/user-button.d.ts +73 -0
  26. package/dist/components/user-button.js +179 -29
  27. package/dist/extra/api.group.d.ts +19 -19
  28. package/dist/extra/api.group.js +3 -3
  29. package/dist/extra/schema.d.ts +1 -2
  30. package/dist/extra/schema.js +1 -2
  31. package/dist/query.js +5 -5
  32. package/dist/schema.d.ts +279 -12
  33. package/dist/schema.js +162 -42
  34. package/dist/server/api.group.d.ts +157 -29
  35. package/dist/server/api.group.js +12 -12
  36. package/dist/server/schema.d.ts +64 -0
  37. package/dist/service.d.ts +3380 -2446
  38. package/package.json +4 -4
@@ -1,30 +1,94 @@
1
1
  import { HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/unstable/httpapi";
2
- export declare const ServerUsersApiGroup: HttpApiGroup.HttpApiGroup<"users", HttpApiEndpoint.HttpApiEndpoint<"getUser", "GET", "/users/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
2
+ export declare const ServerUsersApiGroup: HttpApiGroup.HttpApiGroup<"users", HttpApiEndpoint.HttpApiEndpoint<"getUser", "GET", "/users/:id", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
3
3
  readonly id: import("effect/Schema").NonEmptyString;
4
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
4
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
5
5
  readonly id: import("effect/Schema").String;
6
6
  readonly name: import("effect/Schema").String;
7
7
  readonly email: import("effect/Schema").String;
8
8
  readonly emailVerified: import("effect/Schema").Boolean;
9
9
  readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
10
+ readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").decodeTo<import("effect/Schema").Struct<{
11
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
12
+ readonly email: import("effect/Schema").NonEmptyString;
13
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
14
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
15
+ readonly label: import("effect/Schema").NonEmptyString;
16
+ }>>;
17
+ }>>>;
18
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
19
+ readonly number: import("effect/Schema").NonEmptyString;
20
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
21
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
22
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
23
+ readonly label: import("effect/Schema").NonEmptyString;
24
+ }>>;
25
+ }>>>;
26
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
27
+ readonly url: import("effect/Schema").NonEmptyString;
28
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
29
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
30
+ readonly label: import("effect/Schema").NonEmptyString;
31
+ }>>;
32
+ }>>>;
33
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
34
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
35
+ readonly url: import("effect/Schema").NonEmptyString;
36
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
37
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
38
+ readonly label: import("effect/Schema").NonEmptyString;
39
+ }>>;
40
+ }>>>;
41
+ }>, import("effect/Schema").Unknown, never, never>>>;
10
42
  readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
11
43
  readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
12
44
  readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
13
45
  readonly createdAt: import("effect/Schema").Date;
14
46
  readonly updatedAt: import("effect/Schema").Date;
15
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getUserActiveOrganization", "GET", "/organizations/user/:userId/active", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
47
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getUserActiveOrganization", "GET", "/organizations/user/:userId/active", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
16
48
  readonly userId: import("effect/Schema").NonEmptyString;
17
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
49
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
18
50
  readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
19
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listUsersByIds", "GET", "/users", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
51
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listUsersByIds", "GET", "/users", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
20
52
  readonly ids: import("effect/Schema").NonEmptyString;
21
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
53
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
22
54
  readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
23
55
  readonly id: import("effect/Schema").String;
24
56
  readonly name: import("effect/Schema").String;
25
57
  readonly email: import("effect/Schema").String;
26
58
  readonly emailVerified: import("effect/Schema").Boolean;
27
59
  readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
60
+ readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").decodeTo<import("effect/Schema").Struct<{
61
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
62
+ readonly email: import("effect/Schema").NonEmptyString;
63
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
64
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
65
+ readonly label: import("effect/Schema").NonEmptyString;
66
+ }>>;
67
+ }>>>;
68
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
69
+ readonly number: import("effect/Schema").NonEmptyString;
70
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
71
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
72
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
73
+ readonly label: import("effect/Schema").NonEmptyString;
74
+ }>>;
75
+ }>>>;
76
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
77
+ readonly url: import("effect/Schema").NonEmptyString;
78
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
79
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
80
+ readonly label: import("effect/Schema").NonEmptyString;
81
+ }>>;
82
+ }>>>;
83
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
84
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
85
+ readonly url: import("effect/Schema").NonEmptyString;
86
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
87
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
88
+ readonly label: import("effect/Schema").NonEmptyString;
89
+ }>>;
90
+ }>>>;
91
+ }>, import("effect/Schema").Unknown, never, never>>>;
28
92
  readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
29
93
  readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
30
94
  readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
@@ -32,11 +96,11 @@ export declare const ServerUsersApiGroup: HttpApiGroup.HttpApiGroup<"users", Htt
32
96
  readonly updatedAt: import("effect/Schema").Date;
33
97
  }>>;
34
98
  readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
35
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false>;
36
- export declare const ServerOrganizationsApiGroup: HttpApiGroup.HttpApiGroup<"organizations", HttpApiEndpoint.HttpApiEndpoint<"getActiveMember", "GET", "/organizations/:organizationId/members/:userId", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
99
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false>;
100
+ export declare const ServerOrganizationsApiGroup: HttpApiGroup.HttpApiGroup<"organizations", HttpApiEndpoint.HttpApiEndpoint<"getActiveMember", "GET", "/organizations/:organizationId/members/:userId", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
37
101
  readonly organizationId: import("effect/Schema").NonEmptyString;
38
102
  readonly userId: import("effect/Schema").NonEmptyString;
39
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
103
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
40
104
  readonly id: import("effect/Schema").String;
41
105
  readonly organizationId: import("effect/Schema").String;
42
106
  readonly userId: import("effect/Schema").String;
@@ -48,15 +112,47 @@ export declare const ServerOrganizationsApiGroup: HttpApiGroup.HttpApiGroup<"org
48
112
  readonly email: import("effect/Schema").String;
49
113
  readonly emailVerified: import("effect/Schema").Boolean;
50
114
  readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
115
+ readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").decodeTo<import("effect/Schema").Struct<{
116
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
117
+ readonly email: import("effect/Schema").NonEmptyString;
118
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
119
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
120
+ readonly label: import("effect/Schema").NonEmptyString;
121
+ }>>;
122
+ }>>>;
123
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
124
+ readonly number: import("effect/Schema").NonEmptyString;
125
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
126
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
127
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
128
+ readonly label: import("effect/Schema").NonEmptyString;
129
+ }>>;
130
+ }>>>;
131
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
132
+ readonly url: import("effect/Schema").NonEmptyString;
133
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
134
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
135
+ readonly label: import("effect/Schema").NonEmptyString;
136
+ }>>;
137
+ }>>>;
138
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
139
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
140
+ readonly url: import("effect/Schema").NonEmptyString;
141
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
142
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
143
+ readonly label: import("effect/Schema").NonEmptyString;
144
+ }>>;
145
+ }>>>;
146
+ }>, import("effect/Schema").Unknown, never, never>>>;
51
147
  readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
52
148
  readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
53
149
  readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
54
150
  readonly createdAt: import("effect/Schema").Date;
55
151
  readonly updatedAt: import("effect/Schema").Date;
56
152
  }>;
57
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getOrganization", "GET", "/organizations/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
153
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getOrganization", "GET", "/organizations/:id", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
58
154
  readonly id: import("effect/Schema").NonEmptyString;
59
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
155
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
60
156
  readonly id: import("effect/Schema").String;
61
157
  readonly name: import("effect/Schema").String;
62
158
  readonly slug: import("effect/Schema").String;
@@ -114,9 +210,9 @@ export declare const ServerOrganizationsApiGroup: HttpApiGroup.HttpApiGroup<"org
114
210
  }>, import("effect/Schema").Unknown, never, never>>;
115
211
  readonly parentId: import("effect/Schema").NullOr<import("effect/Schema").String>;
116
212
  readonly createdAt: import("effect/Schema").Date;
117
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getOrganizationChildren", "GET", "/organizations/:organizationId/children", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
213
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getOrganizationChildren", "GET", "/organizations/:organizationId/children", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
118
214
  readonly organizationId: import("effect/Schema").NonEmptyString;
119
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
215
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").$Array<import("effect/Schema").Struct<{
120
216
  readonly id: import("effect/Schema").String;
121
217
  readonly name: import("effect/Schema").String;
122
218
  readonly slug: import("effect/Schema").String;
@@ -174,9 +270,9 @@ export declare const ServerOrganizationsApiGroup: HttpApiGroup.HttpApiGroup<"org
174
270
  }>, import("effect/Schema").Unknown, never, never>>;
175
271
  readonly parentId: import("effect/Schema").NullOr<import("effect/Schema").String>;
176
272
  readonly createdAt: import("effect/Schema").Date;
177
- }>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listOrganizationMembers", "GET", "/organizations/:organizationId/members", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
273
+ }>>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listOrganizationMembers", "GET", "/organizations/:organizationId/members", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
178
274
  readonly organizationId: import("effect/Schema").NonEmptyString;
179
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
275
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").$Array<import("effect/Schema").Struct<{
180
276
  readonly id: import("effect/Schema").String;
181
277
  readonly organizationId: import("effect/Schema").String;
182
278
  readonly userId: import("effect/Schema").String;
@@ -188,16 +284,48 @@ export declare const ServerOrganizationsApiGroup: HttpApiGroup.HttpApiGroup<"org
188
284
  readonly email: import("effect/Schema").String;
189
285
  readonly emailVerified: import("effect/Schema").Boolean;
190
286
  readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
287
+ readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").decodeTo<import("effect/Schema").Struct<{
288
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
289
+ readonly email: import("effect/Schema").NonEmptyString;
290
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
291
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
292
+ readonly label: import("effect/Schema").NonEmptyString;
293
+ }>>;
294
+ }>>>;
295
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
296
+ readonly number: import("effect/Schema").NonEmptyString;
297
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
298
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
299
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
300
+ readonly label: import("effect/Schema").NonEmptyString;
301
+ }>>;
302
+ }>>>;
303
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
304
+ readonly url: import("effect/Schema").NonEmptyString;
305
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
306
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
307
+ readonly label: import("effect/Schema").NonEmptyString;
308
+ }>>;
309
+ }>>>;
310
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
311
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
312
+ readonly url: import("effect/Schema").NonEmptyString;
313
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
314
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
315
+ readonly label: import("effect/Schema").NonEmptyString;
316
+ }>>;
317
+ }>>>;
318
+ }>, import("effect/Schema").Unknown, never, never>>>;
191
319
  readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
192
320
  readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
193
321
  readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
194
322
  readonly createdAt: import("effect/Schema").Date;
195
323
  readonly updatedAt: import("effect/Schema").Date;
196
324
  }>;
197
- }>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listOrganizations", "GET", "/organizations", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
325
+ }>>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listOrganizations", "GET", "/organizations", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
198
326
  readonly ids: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
199
327
  readonly userId: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
200
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
328
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
201
329
  readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
202
330
  readonly id: import("effect/Schema").String;
203
331
  readonly name: import("effect/Schema").String;
@@ -258,14 +386,14 @@ export declare const ServerOrganizationsApiGroup: HttpApiGroup.HttpApiGroup<"org
258
386
  readonly createdAt: import("effect/Schema").Date;
259
387
  }>>;
260
388
  readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
261
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false>;
262
- export declare const ServerDomainsApiGroup: HttpApiGroup.HttpApiGroup<"domains", HttpApiEndpoint.HttpApiEndpoint<"createDomain", "POST", "/domains", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
389
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false>;
390
+ export declare const ServerDomainsApiGroup: HttpApiGroup.HttpApiGroup<"domains", HttpApiEndpoint.HttpApiEndpoint<"createDomain", "POST", "/domains", never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
263
391
  readonly hostname: import("effect/Schema").NonEmptyString;
264
392
  readonly rootHostname: import("effect/Schema").NonEmptyString;
265
393
  readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
266
394
  readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
267
395
  readonly managed: import("effect/Schema").Boolean;
268
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
396
+ }>>, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
269
397
  readonly id: import("effect/Schema").String;
270
398
  readonly hostname: import("effect/Schema").String;
271
399
  readonly rootHostname: import("effect/Schema").String;
@@ -280,9 +408,9 @@ export declare const ServerDomainsApiGroup: HttpApiGroup.HttpApiGroup<"domains",
280
408
  readonly active: import("effect/Schema").Boolean;
281
409
  readonly createdAt: import("effect/Schema").Date;
282
410
  readonly updatedAt: import("effect/Schema").Date;
283
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"deleteDomain", "DELETE", "/domains/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
411
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"deleteDomain", "DELETE", "/domains/:id", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
284
412
  readonly id: import("effect/Schema").NonEmptyString;
285
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
413
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
286
414
  readonly id: import("effect/Schema").String;
287
415
  readonly hostname: import("effect/Schema").String;
288
416
  readonly rootHostname: import("effect/Schema").String;
@@ -297,9 +425,9 @@ export declare const ServerDomainsApiGroup: HttpApiGroup.HttpApiGroup<"domains",
297
425
  readonly active: import("effect/Schema").Boolean;
298
426
  readonly createdAt: import("effect/Schema").Date;
299
427
  readonly updatedAt: import("effect/Schema").Date;
300
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomain", "GET", "/domains/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
428
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomain", "GET", "/domains/:id", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
301
429
  readonly id: import("effect/Schema").NonEmptyString;
302
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
430
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
303
431
  readonly id: import("effect/Schema").String;
304
432
  readonly hostname: import("effect/Schema").String;
305
433
  readonly rootHostname: import("effect/Schema").String;
@@ -314,9 +442,9 @@ export declare const ServerDomainsApiGroup: HttpApiGroup.HttpApiGroup<"domains",
314
442
  readonly active: import("effect/Schema").Boolean;
315
443
  readonly createdAt: import("effect/Schema").Date;
316
444
  readonly updatedAt: import("effect/Schema").Date;
317
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainByHost", "GET", "/domains/by-host/:hostname", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
445
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainByHost", "GET", "/domains/by-host/:hostname", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
318
446
  readonly hostname: import("effect/Schema").NonEmptyString;
319
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
447
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
320
448
  readonly id: import("effect/Schema").String;
321
449
  readonly hostname: import("effect/Schema").String;
322
450
  readonly rootHostname: import("effect/Schema").String;
@@ -331,12 +459,12 @@ export declare const ServerDomainsApiGroup: HttpApiGroup.HttpApiGroup<"domains",
331
459
  readonly active: import("effect/Schema").Boolean;
332
460
  readonly createdAt: import("effect/Schema").Date;
333
461
  readonly updatedAt: import("effect/Schema").Date;
334
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainRecords", "GET", "/domains/:id/records", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
462
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainRecords", "GET", "/domains/:id/records", import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
335
463
  readonly id: import("effect/Schema").NonEmptyString;
336
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
464
+ }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").$Array<import("effect/Schema").Struct<{
337
465
  readonly required: import("effect/Schema").Boolean;
338
466
  readonly status: import("effect/Schema").String;
339
467
  readonly type: import("effect/Schema").String;
340
468
  readonly name: import("effect/Schema").String;
341
469
  readonly value: import("effect/Schema").String;
342
- }>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never>, false>;
470
+ }>>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never>, false>;
@@ -4,7 +4,7 @@ import { Member, Organization, User } from "../schema.js";
4
4
  import { ServerActiveOrganization, ServerCreateDomainPayload, ServerDomain, ServerDomainHostParams, ServerDomainIdParams, ServerDomainRecordsResponse, ServerIdParams, ServerIdsQuery, ServerMemberParams, ServerMembersResponse, ServerOrganizationChildrenResponse, ServerOrganizationIdParams, ServerOrganizationsQuery, ServerOrganizationsResponse, ServerUserIdParams, ServerUsersResponse, } from "./schema.js";
5
5
  export const ServerUsersApiGroup = HttpApiGroup.make("users")
6
6
  .add(HttpApiEndpoint.get("listUsersByIds", "/users", {
7
- query: ServerIdsQuery,
7
+ query: ServerIdsQuery.fields,
8
8
  success: ServerUsersResponse,
9
9
  error: [HttpApiError.Unauthorized, HttpApiError.InternalServerError],
10
10
  }).annotateMerge(OpenApi.annotations({
@@ -13,7 +13,7 @@ export const ServerUsersApiGroup = HttpApiGroup.make("users")
13
13
  description: "Returns trusted user records for a comma-separated list of IDs. Requires a service API key.",
14
14
  })))
15
15
  .add(HttpApiEndpoint.get("getUser", "/users/:id", {
16
- params: ServerIdParams,
16
+ params: ServerIdParams.fields,
17
17
  success: User,
18
18
  error: [
19
19
  HttpApiError.Unauthorized,
@@ -26,7 +26,7 @@ export const ServerUsersApiGroup = HttpApiGroup.make("users")
26
26
  description: "Returns a trusted user record by ID. Requires a service API key.",
27
27
  })))
28
28
  .add(HttpApiEndpoint.get("getUserActiveOrganization", "/organizations/user/:userId/active", {
29
- params: ServerUserIdParams,
29
+ params: ServerUserIdParams.fields,
30
30
  success: ServerActiveOrganization,
31
31
  error: [HttpApiError.Unauthorized, HttpApiError.InternalServerError],
32
32
  }).annotateMerge(OpenApi.annotations({
@@ -40,7 +40,7 @@ export const ServerUsersApiGroup = HttpApiGroup.make("users")
40
40
  }));
41
41
  export const ServerOrganizationsApiGroup = HttpApiGroup.make("organizations")
42
42
  .add(HttpApiEndpoint.get("listOrganizations", "/organizations", {
43
- query: ServerOrganizationsQuery,
43
+ query: ServerOrganizationsQuery.fields,
44
44
  success: ServerOrganizationsResponse,
45
45
  error: [
46
46
  HttpApiError.BadRequest,
@@ -53,7 +53,7 @@ export const ServerOrganizationsApiGroup = HttpApiGroup.make("organizations")
53
53
  description: "Returns trusted organization records for either a comma-separated list of IDs or a user ID. Exactly one of ids or userId is required. Requires a service API key.",
54
54
  })))
55
55
  .add(HttpApiEndpoint.get("getOrganization", "/organizations/:id", {
56
- params: ServerIdParams,
56
+ params: ServerIdParams.fields,
57
57
  success: Organization,
58
58
  error: [
59
59
  HttpApiError.Unauthorized,
@@ -66,7 +66,7 @@ export const ServerOrganizationsApiGroup = HttpApiGroup.make("organizations")
66
66
  description: "Returns a trusted organization record by ID. Requires a service API key.",
67
67
  })))
68
68
  .add(HttpApiEndpoint.get("getOrganizationChildren", "/organizations/:organizationId/children", {
69
- params: ServerOrganizationIdParams,
69
+ params: ServerOrganizationIdParams.fields,
70
70
  success: ServerOrganizationChildrenResponse,
71
71
  error: [HttpApiError.Unauthorized, HttpApiError.InternalServerError],
72
72
  }).annotateMerge(OpenApi.annotations({
@@ -75,7 +75,7 @@ export const ServerOrganizationsApiGroup = HttpApiGroup.make("organizations")
75
75
  description: "Returns direct child organizations for a parent organization. Requires a service API key.",
76
76
  })))
77
77
  .add(HttpApiEndpoint.get("getActiveMember", "/organizations/:organizationId/members/:userId", {
78
- params: ServerMemberParams,
78
+ params: ServerMemberParams.fields,
79
79
  success: Member,
80
80
  error: [
81
81
  HttpApiError.Unauthorized,
@@ -88,7 +88,7 @@ export const ServerOrganizationsApiGroup = HttpApiGroup.make("organizations")
88
88
  description: "Returns the member record and role for a user in an organization. Requires a service API key.",
89
89
  })))
90
90
  .add(HttpApiEndpoint.get("listOrganizationMembers", "/organizations/:organizationId/members", {
91
- params: ServerOrganizationIdParams,
91
+ params: ServerOrganizationIdParams.fields,
92
92
  success: ServerMembersResponse,
93
93
  error: [HttpApiError.Unauthorized, HttpApiError.InternalServerError],
94
94
  }).annotateMerge(OpenApi.annotations({
@@ -115,7 +115,7 @@ export const ServerDomainsApiGroup = HttpApiGroup.make("domains")
115
115
  description: "Registers an auth hostname for a trusted service. Managed domains are provisioned in Cloudflare by auth; unmanaged domains are only registered for auth request resolution. Requires a service API key.",
116
116
  })))
117
117
  .add(HttpApiEndpoint.get("getDomain", "/domains/:id", {
118
- params: ServerDomainIdParams,
118
+ params: ServerDomainIdParams.fields,
119
119
  success: ServerDomain,
120
120
  error: [
121
121
  HttpApiError.Unauthorized,
@@ -124,7 +124,7 @@ export const ServerDomainsApiGroup = HttpApiGroup.make("domains")
124
124
  ],
125
125
  }))
126
126
  .add(HttpApiEndpoint.get("getDomainByHost", "/domains/by-host/:hostname", {
127
- params: ServerDomainHostParams,
127
+ params: ServerDomainHostParams.fields,
128
128
  success: ServerDomain,
129
129
  error: [
130
130
  HttpApiError.Unauthorized,
@@ -133,7 +133,7 @@ export const ServerDomainsApiGroup = HttpApiGroup.make("domains")
133
133
  ],
134
134
  }))
135
135
  .add(HttpApiEndpoint.get("getDomainRecords", "/domains/:id/records", {
136
- params: ServerDomainIdParams,
136
+ params: ServerDomainIdParams.fields,
137
137
  success: ServerDomainRecordsResponse,
138
138
  error: [
139
139
  HttpApiError.Unauthorized,
@@ -142,7 +142,7 @@ export const ServerDomainsApiGroup = HttpApiGroup.make("domains")
142
142
  ],
143
143
  }))
144
144
  .add(HttpApiEndpoint.delete("deleteDomain", "/domains/:id", {
145
- params: ServerDomainIdParams,
145
+ params: ServerDomainIdParams.fields,
146
146
  success: ServerDomain,
147
147
  error: [
148
148
  HttpApiError.Unauthorized,
@@ -29,6 +29,38 @@ export declare const ServerUsersResponse: Schema.Struct<{
29
29
  readonly email: Schema.String;
30
30
  readonly emailVerified: Schema.Boolean;
31
31
  readonly image: Schema.NullOr<Schema.String>;
32
+ readonly metadata: Schema.optional<Schema.NullOr<Schema.decodeTo<Schema.Struct<{
33
+ readonly emails: Schema.optional<Schema.$Array<Schema.Struct<{
34
+ readonly email: Schema.NonEmptyString;
35
+ readonly translations: Schema.$Array<Schema.Struct<{
36
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
37
+ readonly label: Schema.NonEmptyString;
38
+ }>>;
39
+ }>>>;
40
+ readonly phones: Schema.optional<Schema.$Array<Schema.Struct<{
41
+ readonly number: Schema.NonEmptyString;
42
+ readonly extension: Schema.optional<Schema.String>;
43
+ readonly translations: Schema.$Array<Schema.Struct<{
44
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
45
+ readonly label: Schema.NonEmptyString;
46
+ }>>;
47
+ }>>>;
48
+ readonly websites: Schema.optional<Schema.$Array<Schema.Struct<{
49
+ readonly url: Schema.NonEmptyString;
50
+ readonly translations: Schema.$Array<Schema.Struct<{
51
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
52
+ readonly label: Schema.NonEmptyString;
53
+ }>>;
54
+ }>>>;
55
+ readonly socials: Schema.optional<Schema.$Array<Schema.Struct<{
56
+ readonly platform: Schema.Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
57
+ readonly url: Schema.NonEmptyString;
58
+ readonly translations: Schema.$Array<Schema.Struct<{
59
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
60
+ readonly label: Schema.NonEmptyString;
61
+ }>>;
62
+ }>>>;
63
+ }>, Schema.Unknown, never, never>>>;
32
64
  readonly role: Schema.NullOr<Schema.String>;
33
65
  readonly banned: Schema.NullOr<Schema.Boolean>;
34
66
  readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
@@ -170,6 +202,38 @@ export declare const ServerMembersResponse: Schema.$Array<Schema.Struct<{
170
202
  readonly email: Schema.String;
171
203
  readonly emailVerified: Schema.Boolean;
172
204
  readonly image: Schema.NullOr<Schema.String>;
205
+ readonly metadata: Schema.optional<Schema.NullOr<Schema.decodeTo<Schema.Struct<{
206
+ readonly emails: Schema.optional<Schema.$Array<Schema.Struct<{
207
+ readonly email: Schema.NonEmptyString;
208
+ readonly translations: Schema.$Array<Schema.Struct<{
209
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
210
+ readonly label: Schema.NonEmptyString;
211
+ }>>;
212
+ }>>>;
213
+ readonly phones: Schema.optional<Schema.$Array<Schema.Struct<{
214
+ readonly number: Schema.NonEmptyString;
215
+ readonly extension: Schema.optional<Schema.String>;
216
+ readonly translations: Schema.$Array<Schema.Struct<{
217
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
218
+ readonly label: Schema.NonEmptyString;
219
+ }>>;
220
+ }>>>;
221
+ readonly websites: Schema.optional<Schema.$Array<Schema.Struct<{
222
+ readonly url: Schema.NonEmptyString;
223
+ readonly translations: Schema.$Array<Schema.Struct<{
224
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
225
+ readonly label: Schema.NonEmptyString;
226
+ }>>;
227
+ }>>>;
228
+ readonly socials: Schema.optional<Schema.$Array<Schema.Struct<{
229
+ readonly platform: Schema.Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
230
+ readonly url: Schema.NonEmptyString;
231
+ readonly translations: Schema.$Array<Schema.Struct<{
232
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
233
+ readonly label: Schema.NonEmptyString;
234
+ }>>;
235
+ }>>>;
236
+ }>, Schema.Unknown, never, never>>>;
173
237
  readonly role: Schema.NullOr<Schema.String>;
174
238
  readonly banned: Schema.NullOr<Schema.Boolean>;
175
239
  readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;