@krak-stack/auth 0.1.37 → 0.1.38

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/api.d.ts CHANGED
@@ -23,38 +23,137 @@ export declare const AuthApi: HttpApi.HttpApi<"AuthApi", import("effect/unstable
23
23
  readonly createdAt: import("effect/Schema").Date;
24
24
  readonly updatedAt: import("effect/Schema").Date;
25
25
  }>;
26
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("./better-auth").TooManyRequests>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"users", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getUser", "GET", "/api/users/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
27
- readonly id: import("effect/Schema").NonEmptyString;
28
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
26
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("./better-auth").TooManyRequests>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"authExtra", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createApiKey", "POST", "/api/auth/create-api-key", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
27
+ readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
28
+ readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
29
+ readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
30
+ readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
31
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
29
32
  readonly id: import("effect/Schema").String;
30
- readonly name: import("effect/Schema").String;
31
- readonly email: import("effect/Schema").String;
32
- readonly emailVerified: import("effect/Schema").Boolean;
33
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
34
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
35
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
36
- readonly createdAt: import("effect/Schema").Date;
37
- readonly updatedAt: import("effect/Schema").Date;
38
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getUserActiveOrganization", "GET", "/api/organizations/user/:userId/active", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
39
- readonly userId: import("effect/Schema").NonEmptyString;
40
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
41
- readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
42
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listUsersByIds", "GET", "/api/users", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
43
- readonly ids: import("effect/Schema").NonEmptyString;
33
+ readonly key: import("effect/Schema").String;
34
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getProjectPublicConfig", "GET", "/api/auth/project-config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
35
+ readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
36
+ readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
37
+ readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
44
38
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
45
- readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
39
+ readonly projectKey: import("effect/Schema").String;
40
+ readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
41
+ readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
42
+ readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
43
+ readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
44
+ readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
45
+ readonly authOptions: import("effect/Schema").Struct<{
46
+ readonly emailPassword: import("effect/Schema").Boolean;
47
+ readonly emailOtp: import("effect/Schema").Boolean;
48
+ readonly google: import("effect/Schema").Boolean;
49
+ readonly signUp: import("effect/Schema").Boolean;
50
+ readonly signUpName: import("effect/Schema").Boolean;
51
+ }>;
52
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"setPassword", "POST", "/api/auth/set-password", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
53
+ readonly newPassword: import("effect/Schema").NonEmptyString;
54
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
55
+ readonly ok: import("effect/Schema").Boolean;
56
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"uploadOrganizationLogo", "POST", "/api/organizations/logo/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
57
+ readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
58
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
59
+ readonly url: import("effect/Schema").String;
60
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"uploadUserImage", "POST", "/api/auth/image/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
61
+ readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
62
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
63
+ readonly url: import("effect/Schema").String;
64
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("./extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyApiKey", "POST", "/api/auth/verify-api-key", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
65
+ readonly key: import("effect/Schema").NonEmptyString;
66
+ readonly configId: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>>;
67
+ readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
68
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
69
+ readonly valid: import("effect/Schema").Boolean;
70
+ readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
71
+ readonly message: import("effect/Schema").String;
72
+ readonly code: import("effect/Schema").String;
73
+ }>>;
74
+ readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
46
75
  readonly id: import("effect/Schema").String;
47
- readonly name: import("effect/Schema").String;
48
- readonly email: import("effect/Schema").String;
49
- readonly emailVerified: import("effect/Schema").Boolean;
50
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
51
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
52
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
76
+ readonly configId: import("effect/Schema").String;
77
+ readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
78
+ readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
79
+ readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
80
+ readonly referenceId: import("effect/Schema").String;
81
+ readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
82
+ readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
53
83
  readonly createdAt: import("effect/Schema").Date;
54
84
  readonly updatedAt: import("effect/Schema").Date;
85
+ readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
86
+ readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
55
87
  }>>;
56
- readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
57
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"organizations", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getActiveMember", "GET", "/api/organizations/:organizationId/members/:userId", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
88
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyPassword", "POST", "/api/auth/verify-password", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
89
+ readonly password: import("effect/Schema").NonEmptyString;
90
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
91
+ readonly ok: import("effect/Schema").Boolean;
92
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./extra").ExtraBadRequest>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"domains", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createDomain", "POST", "/api/domains", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
93
+ readonly hostname: import("effect/Schema").NonEmptyString;
94
+ readonly rootHostname: import("effect/Schema").NonEmptyString;
95
+ readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
96
+ readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
97
+ readonly managed: import("effect/Schema").Boolean;
98
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
99
+ readonly id: import("effect/Schema").String;
100
+ readonly hostname: import("effect/Schema").String;
101
+ readonly rootHostname: import("effect/Schema").String;
102
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
103
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
104
+ readonly hostnameId: import("effect/Schema").String;
105
+ readonly managed: import("effect/Schema").Boolean;
106
+ readonly active: import("effect/Schema").Boolean;
107
+ readonly createdAt: import("effect/Schema").Date;
108
+ readonly updatedAt: import("effect/Schema").Date;
109
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"deleteDomain", "DELETE", "/api/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
110
+ readonly id: import("effect/Schema").NonEmptyString;
111
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
112
+ readonly id: import("effect/Schema").String;
113
+ readonly hostname: import("effect/Schema").String;
114
+ readonly rootHostname: import("effect/Schema").String;
115
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
116
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
117
+ readonly hostnameId: import("effect/Schema").String;
118
+ readonly managed: import("effect/Schema").Boolean;
119
+ readonly active: import("effect/Schema").Boolean;
120
+ readonly createdAt: import("effect/Schema").Date;
121
+ readonly updatedAt: import("effect/Schema").Date;
122
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomain", "GET", "/api/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
123
+ readonly id: import("effect/Schema").NonEmptyString;
124
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
125
+ readonly id: import("effect/Schema").String;
126
+ readonly hostname: import("effect/Schema").String;
127
+ readonly rootHostname: import("effect/Schema").String;
128
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
129
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
130
+ readonly hostnameId: import("effect/Schema").String;
131
+ readonly managed: import("effect/Schema").Boolean;
132
+ readonly active: import("effect/Schema").Boolean;
133
+ readonly createdAt: import("effect/Schema").Date;
134
+ readonly updatedAt: import("effect/Schema").Date;
135
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomainByHost", "GET", "/api/domains/by-host/:hostname", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
136
+ readonly hostname: import("effect/Schema").NonEmptyString;
137
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
138
+ readonly id: import("effect/Schema").String;
139
+ readonly hostname: import("effect/Schema").String;
140
+ readonly rootHostname: import("effect/Schema").String;
141
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
142
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
143
+ readonly hostnameId: import("effect/Schema").String;
144
+ readonly managed: import("effect/Schema").Boolean;
145
+ readonly active: import("effect/Schema").Boolean;
146
+ readonly createdAt: import("effect/Schema").Date;
147
+ readonly updatedAt: import("effect/Schema").Date;
148
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomainRecords", "GET", "/api/domains/:id/records", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
149
+ readonly id: import("effect/Schema").NonEmptyString;
150
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
151
+ readonly required: import("effect/Schema").Boolean;
152
+ readonly status: import("effect/Schema").String;
153
+ readonly type: import("effect/Schema").String;
154
+ readonly name: import("effect/Schema").String;
155
+ readonly value: import("effect/Schema").String;
156
+ }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"organizations", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getActiveMember", "GET", "/api/organizations/:organizationId/members/:userId", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
58
157
  readonly organizationId: import("effect/Schema").NonEmptyString;
59
158
  readonly userId: import("effect/Schema").NonEmptyString;
60
159
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
@@ -133,134 +232,35 @@ export declare const AuthApi: HttpApi.HttpApi<"AuthApi", import("effect/unstable
133
232
  readonly createdAt: import("effect/Schema").Date;
134
233
  }>>;
135
234
  readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
136
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"domains", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createDomain", "POST", "/api/domains", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
137
- readonly hostname: import("effect/Schema").NonEmptyString;
138
- readonly rootHostname: import("effect/Schema").NonEmptyString;
139
- readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
140
- readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
141
- readonly managed: import("effect/Schema").Boolean;
142
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
143
- readonly id: import("effect/Schema").String;
144
- readonly hostname: import("effect/Schema").String;
145
- readonly rootHostname: import("effect/Schema").String;
146
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
147
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
148
- readonly hostnameId: import("effect/Schema").String;
149
- readonly managed: import("effect/Schema").Boolean;
150
- readonly active: import("effect/Schema").Boolean;
151
- readonly createdAt: import("effect/Schema").Date;
152
- readonly updatedAt: import("effect/Schema").Date;
153
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"deleteDomain", "DELETE", "/api/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
154
- readonly id: import("effect/Schema").NonEmptyString;
155
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
156
- readonly id: import("effect/Schema").String;
157
- readonly hostname: import("effect/Schema").String;
158
- readonly rootHostname: import("effect/Schema").String;
159
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
160
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
161
- readonly hostnameId: import("effect/Schema").String;
162
- readonly managed: import("effect/Schema").Boolean;
163
- readonly active: import("effect/Schema").Boolean;
164
- readonly createdAt: import("effect/Schema").Date;
165
- readonly updatedAt: import("effect/Schema").Date;
166
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomain", "GET", "/api/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
235
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"users", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getUser", "GET", "/api/users/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
167
236
  readonly id: import("effect/Schema").NonEmptyString;
168
237
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
169
238
  readonly id: import("effect/Schema").String;
170
- readonly hostname: import("effect/Schema").String;
171
- readonly rootHostname: import("effect/Schema").String;
172
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
173
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
174
- readonly hostnameId: import("effect/Schema").String;
175
- readonly managed: import("effect/Schema").Boolean;
176
- readonly active: import("effect/Schema").Boolean;
239
+ readonly name: import("effect/Schema").String;
240
+ readonly email: import("effect/Schema").String;
241
+ readonly emailVerified: import("effect/Schema").Boolean;
242
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
243
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
244
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
177
245
  readonly createdAt: import("effect/Schema").Date;
178
246
  readonly updatedAt: import("effect/Schema").Date;
179
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomainByHost", "GET", "/api/domains/by-host/:hostname", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
180
- readonly hostname: import("effect/Schema").NonEmptyString;
247
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getUserActiveOrganization", "GET", "/api/organizations/user/:userId/active", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
248
+ readonly userId: import("effect/Schema").NonEmptyString;
181
249
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
182
- readonly id: import("effect/Schema").String;
183
- readonly hostname: import("effect/Schema").String;
184
- readonly rootHostname: import("effect/Schema").String;
185
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
186
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
187
- readonly hostnameId: import("effect/Schema").String;
188
- readonly managed: import("effect/Schema").Boolean;
189
- readonly active: import("effect/Schema").Boolean;
190
- readonly createdAt: import("effect/Schema").Date;
191
- readonly updatedAt: import("effect/Schema").Date;
192
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomainRecords", "GET", "/api/domains/:id/records", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
193
- readonly id: import("effect/Schema").NonEmptyString;
194
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
195
- readonly required: import("effect/Schema").Boolean;
196
- readonly status: import("effect/Schema").String;
197
- readonly type: import("effect/Schema").String;
198
- readonly name: import("effect/Schema").String;
199
- readonly value: import("effect/Schema").String;
200
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"authExtra", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createApiKey", "POST", "/api/auth/create-api-key", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
201
- readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
202
- readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
203
- readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
204
- readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
205
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
206
- readonly id: import("effect/Schema").String;
207
- readonly key: import("effect/Schema").String;
208
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getProjectPublicConfig", "GET", "/api/auth/project-config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
209
- readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
210
- readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
211
- readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
250
+ readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
251
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listUsersByIds", "GET", "/api/users", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
252
+ readonly ids: import("effect/Schema").NonEmptyString;
212
253
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
213
- readonly projectKey: import("effect/Schema").String;
214
- readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
215
- readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
216
- readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
217
- readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
218
- readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
219
- readonly authOptions: import("effect/Schema").Struct<{
220
- readonly emailPassword: import("effect/Schema").Boolean;
221
- readonly emailOtp: import("effect/Schema").Boolean;
222
- readonly google: import("effect/Schema").Boolean;
223
- readonly signUp: import("effect/Schema").Boolean;
224
- readonly signUpName: import("effect/Schema").Boolean;
225
- }>;
226
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"setPassword", "POST", "/api/auth/set-password", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
227
- readonly newPassword: import("effect/Schema").NonEmptyString;
228
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
229
- readonly ok: import("effect/Schema").Boolean;
230
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"uploadOrganizationLogo", "POST", "/api/organizations/logo/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
231
- readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
232
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
233
- readonly url: import("effect/Schema").String;
234
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").Forbidden | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"uploadUserImage", "POST", "/api/auth/image/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
235
- readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
236
- }>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
237
- readonly url: import("effect/Schema").String;
238
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("./extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyApiKey", "POST", "/api/auth/verify-api-key", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
239
- readonly key: import("effect/Schema").NonEmptyString;
240
- readonly configId: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>>;
241
- readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
242
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
243
- readonly valid: import("effect/Schema").Boolean;
244
- readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
245
- readonly message: import("effect/Schema").String;
246
- readonly code: import("effect/Schema").String;
247
- }>>;
248
- readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
254
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
249
255
  readonly id: import("effect/Schema").String;
250
- readonly configId: import("effect/Schema").String;
251
- readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
252
- readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
253
- readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
254
- readonly referenceId: import("effect/Schema").String;
255
- readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
256
- readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
256
+ readonly name: import("effect/Schema").String;
257
+ readonly email: import("effect/Schema").String;
258
+ readonly emailVerified: import("effect/Schema").Boolean;
259
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
260
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
261
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
257
262
  readonly createdAt: import("effect/Schema").Date;
258
263
  readonly updatedAt: import("effect/Schema").Date;
259
- readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
260
- readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
261
264
  }>>;
262
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./extra").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyPassword", "POST", "/api/auth/verify-password", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
263
- readonly password: import("effect/Schema").NonEmptyString;
264
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
265
- readonly ok: import("effect/Schema").Boolean;
266
- }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./extra").ExtraBadRequest>, never, never>, false>>;
265
+ readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
266
+ }>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false>>;
@@ -2,6 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
2
2
  // @ts-nocheck
3
3
  import { useAtomSuspense } from "@effect/atom-react";
4
4
  import { Link, useNavigate, useRouterState } from "@tanstack/react-router";
5
+ import { Atom, AsyncResult } from "effect/unstable/reactivity";
5
6
  import { REGEXP_ONLY_DIGITS } from "input-otp";
6
7
  import { KeyRound, Mail } from "lucide-react";
7
8
  import { useEffect, useState } from "react";
@@ -131,39 +132,43 @@ const useAuthFormOptions = ({ authClient, baseUrl, locale }) => {
131
132
  authClient: resolvedAuthClient,
132
133
  baseUrl: baseUrl ?? auth?.baseUrl,
133
134
  labels: labels(locale ?? auth?.locale ?? "en"),
135
+ projectConfig: auth?.projectConfig,
134
136
  };
135
137
  };
136
- const useAuthProjectConfig = (baseUrl, searchString) => {
138
+ const useAuthProjectConfig = (baseUrl, searchString, projectConfig) => {
137
139
  const projectId = getSearchParam(searchString, "projectId");
138
140
  const clientId = getSearchParam(searchString, "client_id");
139
141
  const host = getBrowserAuthHost();
140
- const result = useAtomSuspense(authApiClient(baseUrl).query("authExtra", "getProjectPublicConfig", {
141
- query: {
142
- ...(projectId ? { projectId } : {}),
143
- ...(clientId ? { clientId } : {}),
144
- ...(host ? { host } : {}),
145
- },
146
- timeToLive: "5 minutes",
147
- reactivityKeys: [
148
- "project-public-config",
149
- ...(projectId ? [`project:${projectId}`] : []),
150
- ...(clientId ? [`client:${clientId}`] : []),
151
- ...(host ? [`host:${host}`] : []),
152
- ],
153
- serializationKey: `project-public-config:${projectId ?? ""}:${clientId ?? ""}:${host ?? ""}`,
154
- }), { suspendOnWaiting: true });
142
+ const atom = projectConfig === undefined
143
+ ? authApiClient(baseUrl).query("authExtra", "getProjectPublicConfig", {
144
+ query: {
145
+ ...(projectId ? { projectId } : {}),
146
+ ...(clientId ? { clientId } : {}),
147
+ ...(host ? { host } : {}),
148
+ },
149
+ timeToLive: "5 minutes",
150
+ reactivityKeys: [
151
+ "project-public-config",
152
+ ...(projectId ? [`project:${projectId}`] : []),
153
+ ...(clientId ? [`client:${clientId}`] : []),
154
+ ...(host ? [`host:${host}`] : []),
155
+ ],
156
+ serializationKey: `project-public-config:${projectId ?? ""}:${clientId ?? ""}:${host ?? ""}`,
157
+ })
158
+ : Atom.make(AsyncResult.success(projectConfig));
159
+ const result = useAtomSuspense(atom, { suspendOnWaiting: true });
155
160
  return result.value;
156
161
  };
157
162
  const text = (value, params) => Object.entries(params ?? {}).reduce((current, [key, replacement]) => current.replace(`{${key}}`, replacement), value);
158
163
  const authLinkClassName = cn(buttonVariants({ variant: "link" }), "h-auto px-0 align-baseline");
159
164
  const searchObject = (searchString) => Object.fromEntries(new URLSearchParams(searchString));
160
165
  export function Signin(props) {
161
- const { authClient, baseUrl, labels: m } = useAuthFormOptions(props);
166
+ const { authClient, baseUrl, labels: m, projectConfig: providedProjectConfig, } = useAuthFormOptions(props);
162
167
  const navigate = useNavigate();
163
168
  const searchString = useRouterState({
164
169
  select: (state) => state.location.searchStr,
165
170
  });
166
- const projectConfig = useAuthProjectConfig(baseUrl, searchString);
171
+ const projectConfig = useAuthProjectConfig(baseUrl, searchString, providedProjectConfig);
167
172
  const redirectTarget = getRedirectTarget(searchString, projectConfig?.authDomain, projectConfig?.rootDomain);
168
173
  const socialRedirectTarget = getSocialRedirectTarget(searchString, projectConfig?.authDomain, projectConfig?.rootDomain);
169
174
  const oauthQuery = getOAuthQuery(searchString);
@@ -355,12 +360,12 @@ export function Signin(props) {
355
360
  : m.auth_sign_in }) })] }) })) : null, options.google && !emailSubmitted ? (_jsxs("div", { className: "mt-4 flex flex-col gap-3", children: [hasPrimaryAuth ? (_jsx(Divider, { label: m.auth_or_continue_with })) : null, _jsxs(Button, { type: "button", variant: "outline", className: "w-full", onClick: signInWithGoogle, children: [_jsx(GoogleLogo, {}), m.auth_continue_with_google] })] })) : null, !hasPrimaryAuth && !options.google ? (_jsx("p", { className: "text-muted-foreground text-sm", children: m.oauth_client_no_auth_methods })) : null, options.signUp ? (_jsxs("p", { className: "text-muted-foreground mt-6 text-center text-sm", children: [m.sign_in_need_account, " ", _jsx(Link, { className: authLinkClassName, to: "/sign-up", search: searchObject(searchString), children: m.auth_sign_up })] })) : null] })] }));
356
361
  }
357
362
  export function Signup(props) {
358
- const { authClient, baseUrl, labels: m } = useAuthFormOptions(props);
363
+ const { authClient, baseUrl, labels: m, projectConfig: providedProjectConfig, } = useAuthFormOptions(props);
359
364
  const navigate = useNavigate();
360
365
  const searchString = useRouterState({
361
366
  select: (state) => state.location.searchStr,
362
367
  });
363
- const projectConfig = useAuthProjectConfig(baseUrl, searchString);
368
+ const projectConfig = useAuthProjectConfig(baseUrl, searchString, providedProjectConfig);
364
369
  const redirectTarget = getRedirectTarget(searchString, projectConfig?.authDomain, projectConfig?.rootDomain);
365
370
  const authOptions = projectConfig?.authOptions ?? {};
366
371
  const onNavigate = (target) => navigate({ href: target });
@@ -479,12 +484,12 @@ export function ResetPassword(props) {
479
484
  }, children: [_jsx(form.AppField, { name: "password", children: (field) => (_jsx(field.TextField, { label: m.reset_password_new_password, type: "password", autoComplete: "new-password", minLength: 8, required: true })) }), _jsx(form.FormError, {}), _jsx(form.SubmitButton, {})] }) }) })] }));
480
485
  }
481
486
  export function TwoFactor(props) {
482
- const { authClient, baseUrl, labels: m } = useAuthFormOptions(props);
487
+ const { authClient, baseUrl, labels: m, projectConfig: providedProjectConfig, } = useAuthFormOptions(props);
483
488
  const navigate = useNavigate();
484
489
  const searchString = useRouterState({
485
490
  select: (state) => state.location.searchStr,
486
491
  });
487
- const projectConfig = useAuthProjectConfig(baseUrl, searchString);
492
+ const projectConfig = useAuthProjectConfig(baseUrl, searchString, providedProjectConfig);
488
493
  const redirectTarget = getRedirectTarget(searchString, projectConfig?.authDomain, projectConfig?.rootDomain);
489
494
  const oauthQuery = getOAuthQuery(searchString);
490
495
  const onNavigate = (target) => navigateTarget(target, navigate);
@@ -1,16 +1,34 @@
1
1
  import { type ReactNode } from "react";
2
2
  import type { AuthUiClient } from "./auth-client";
3
+ import type { ExtraProjectPublicConfig } from "../extra/schema";
3
4
  export type KrakstackAuthLocale = "en" | "fr";
4
5
  export type KrakstackAuthProviderProps = {
5
6
  children: ReactNode;
6
7
  locale?: KrakstackAuthLocale | undefined;
7
8
  baseUrl?: string | undefined;
9
+ projectId?: string | null | undefined;
8
10
  authClient?: AuthUiClient | undefined;
9
11
  };
10
12
  export type KrakstackAuthContextValue = {
11
13
  locale: KrakstackAuthLocale;
12
14
  baseUrl?: string | undefined;
13
15
  authClient: AuthUiClient;
16
+ projectConfig: ExtraProjectPublicConfig | null;
14
17
  };
15
- export declare function KrakstackAuthProvider({ children, locale, baseUrl, authClient, }: KrakstackAuthProviderProps): import("react").JSX.Element;
18
+ export declare function KrakstackAuthProvider({ children, locale, baseUrl, projectId, authClient, }: KrakstackAuthProviderProps): import("react").JSX.Element;
16
19
  export declare const useKrakstackAuth: () => KrakstackAuthContextValue | null;
20
+ export declare const useKrakstackAuthProjectConfig: () => {
21
+ readonly projectKey: string;
22
+ readonly name: string | null;
23
+ readonly logoUrl: string | null;
24
+ readonly authDomain: string | null;
25
+ readonly rootDomain: string | null;
26
+ readonly themeCss: string | null;
27
+ readonly authOptions: {
28
+ readonly emailPassword: boolean;
29
+ readonly emailOtp: boolean;
30
+ readonly google: boolean;
31
+ readonly signUp: boolean;
32
+ readonly signUpName: boolean;
33
+ };
34
+ } | null;
@@ -1,8 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { apiKeyClient } from "@better-auth/api-key/client";
3
+ import { useAtomSuspense } from "@effect/atom-react";
4
+ import { useRouterState } from "@tanstack/react-router";
3
5
  import { emailOTPClient, genericOAuthClient, organizationClient, twoFactorClient, } from "better-auth/client/plugins";
4
6
  import { createAuthClient } from "better-auth/react";
5
7
  import { createContext, useContext, useMemo } from "react";
8
+ import { authApiClient } from "./auth-api-client";
6
9
  const KrakstackAuthContext = createContext(null);
7
10
  const createAuthUiClient = (baseUrl) => createAuthClient({
8
11
  ...(baseUrl ? { baseURL: baseUrl } : {}),
@@ -14,9 +17,41 @@ const createAuthUiClient = (baseUrl) => createAuthClient({
14
17
  genericOAuthClient(),
15
18
  ],
16
19
  });
17
- export function KrakstackAuthProvider({ children, locale = "en", baseUrl, authClient, }) {
20
+ const getSearchParam = (searchString, key) => {
21
+ if (!searchString)
22
+ return null;
23
+ return new URLSearchParams(searchString).get(key);
24
+ };
25
+ const getBrowserAuthHost = () => typeof window === "undefined" ? null : window.location.host;
26
+ const useProjectConfig = (baseUrl, providedProjectId) => {
27
+ const searchString = useRouterState({
28
+ select: (state) => state.location.searchStr,
29
+ });
30
+ const projectId = providedProjectId ?? getSearchParam(searchString, "projectId");
31
+ const clientId = getSearchParam(searchString, "client_id");
32
+ const host = getBrowserAuthHost();
33
+ const result = useAtomSuspense(authApiClient(baseUrl).query("authExtra", "getProjectPublicConfig", {
34
+ query: {
35
+ ...(projectId ? { projectId } : {}),
36
+ ...(clientId ? { clientId } : {}),
37
+ ...(host ? { host } : {}),
38
+ },
39
+ timeToLive: "5 minutes",
40
+ reactivityKeys: [
41
+ "project-public-config",
42
+ ...(projectId ? [`project:${projectId}`] : []),
43
+ ...(clientId ? [`client:${clientId}`] : []),
44
+ ...(host ? [`host:${host}`] : []),
45
+ ],
46
+ serializationKey: `project-public-config:${projectId ?? ""}:${clientId ?? ""}:${host ?? ""}`,
47
+ }), { suspendOnWaiting: true });
48
+ return result.value;
49
+ };
50
+ export function KrakstackAuthProvider({ children, locale = "en", baseUrl, projectId, authClient, }) {
18
51
  const resolvedAuthClient = useMemo(() => authClient ?? createAuthUiClient(baseUrl), [authClient, baseUrl]);
19
- const value = useMemo(() => ({ authClient: resolvedAuthClient, baseUrl, locale }), [resolvedAuthClient, baseUrl, locale]);
52
+ const projectConfig = useProjectConfig(baseUrl, projectId);
53
+ const value = useMemo(() => ({ authClient: resolvedAuthClient, baseUrl, locale, projectConfig }), [resolvedAuthClient, baseUrl, locale, projectConfig]);
20
54
  return (_jsx(KrakstackAuthContext.Provider, { value: value, children: children }));
21
55
  }
22
56
  export const useKrakstackAuth = () => useContext(KrakstackAuthContext);
57
+ export const useKrakstackAuthProjectConfig = () => useKrakstackAuth()?.projectConfig ?? null;
@@ -1,4 +1,4 @@
1
- export { KrakstackAuthProvider, useKrakstackAuth } from "./auth-provider";
1
+ export { KrakstackAuthProvider, useKrakstackAuth, useKrakstackAuthProjectConfig, } from "./auth-provider";
2
2
  export { OrganizationSwitcher } from "./organization-switcher";
3
3
  export { ResetPassword, Signin, Signup, TwoFactor } from "./auth-forms";
4
4
  export { UserButton } from "./user-button";
@@ -1,4 +1,4 @@
1
- export { KrakstackAuthProvider, useKrakstackAuth } from "./auth-provider";
1
+ export { KrakstackAuthProvider, useKrakstackAuth, useKrakstackAuthProjectConfig, } from "./auth-provider";
2
2
  export { OrganizationSwitcher } from "./organization-switcher";
3
3
  export { ResetPassword, Signin, Signup, TwoFactor } from "./auth-forms";
4
4
  export { UserButton } from "./user-button";
@@ -177,38 +177,71 @@ export declare const ServerDomainsApiGroup: HttpApiGroup.HttpApiGroup<"domains",
177
177
  readonly name: import("effect/Schema").String;
178
178
  readonly value: import("effect/Schema").String;
179
179
  }>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never>, false>;
180
- export declare const ServerApi: HttpApi.HttpApi<"ServerApi", HttpApiGroup.HttpApiGroup<"users", HttpApiEndpoint.HttpApiEndpoint<"getUser", "GET", "/api/users/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
180
+ export declare const ServerApi: HttpApi.HttpApi<"ServerApi", HttpApiGroup.HttpApiGroup<"domains", HttpApiEndpoint.HttpApiEndpoint<"createDomain", "POST", "/api/domains", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
181
+ readonly hostname: import("effect/Schema").NonEmptyString;
182
+ readonly rootHostname: import("effect/Schema").NonEmptyString;
183
+ readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
184
+ readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
185
+ readonly managed: import("effect/Schema").Boolean;
186
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
187
+ readonly id: import("effect/Schema").String;
188
+ readonly hostname: import("effect/Schema").String;
189
+ readonly rootHostname: import("effect/Schema").String;
190
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
191
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
192
+ readonly hostnameId: import("effect/Schema").String;
193
+ readonly managed: import("effect/Schema").Boolean;
194
+ readonly active: import("effect/Schema").Boolean;
195
+ readonly createdAt: import("effect/Schema").Date;
196
+ readonly updatedAt: import("effect/Schema").Date;
197
+ }>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"deleteDomain", "DELETE", "/api/domains/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
198
+ readonly id: import("effect/Schema").NonEmptyString;
199
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
200
+ readonly id: import("effect/Schema").String;
201
+ readonly hostname: import("effect/Schema").String;
202
+ readonly rootHostname: import("effect/Schema").String;
203
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
204
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
205
+ readonly hostnameId: import("effect/Schema").String;
206
+ readonly managed: import("effect/Schema").Boolean;
207
+ readonly active: import("effect/Schema").Boolean;
208
+ readonly createdAt: import("effect/Schema").Date;
209
+ readonly updatedAt: import("effect/Schema").Date;
210
+ }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomain", "GET", "/api/domains/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
181
211
  readonly id: import("effect/Schema").NonEmptyString;
182
212
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
183
213
  readonly id: import("effect/Schema").String;
184
- readonly name: import("effect/Schema").String;
185
- readonly email: import("effect/Schema").String;
186
- readonly emailVerified: import("effect/Schema").Boolean;
187
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
188
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
189
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
214
+ readonly hostname: import("effect/Schema").String;
215
+ readonly rootHostname: import("effect/Schema").String;
216
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
217
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
218
+ readonly hostnameId: import("effect/Schema").String;
219
+ readonly managed: import("effect/Schema").Boolean;
220
+ readonly active: import("effect/Schema").Boolean;
190
221
  readonly createdAt: import("effect/Schema").Date;
191
222
  readonly updatedAt: import("effect/Schema").Date;
192
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getUserActiveOrganization", "GET", "/api/organizations/user/:userId/active", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
193
- readonly userId: import("effect/Schema").NonEmptyString;
223
+ }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainByHost", "GET", "/api/domains/by-host/:hostname", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
224
+ readonly hostname: import("effect/Schema").NonEmptyString;
194
225
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
195
- readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
196
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listUsersByIds", "GET", "/api/users", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
197
- readonly ids: import("effect/Schema").NonEmptyString;
198
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
199
- readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
200
- readonly id: import("effect/Schema").String;
201
- readonly name: import("effect/Schema").String;
202
- readonly email: import("effect/Schema").String;
203
- readonly emailVerified: import("effect/Schema").Boolean;
204
- readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
205
- readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
206
- readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
207
- readonly createdAt: import("effect/Schema").Date;
208
- readonly updatedAt: import("effect/Schema").Date;
209
- }>>;
210
- readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
211
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false> | HttpApiGroup.HttpApiGroup<"organizations", HttpApiEndpoint.HttpApiEndpoint<"getActiveMember", "GET", "/api/organizations/:organizationId/members/:userId", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
226
+ readonly id: import("effect/Schema").String;
227
+ readonly hostname: import("effect/Schema").String;
228
+ readonly rootHostname: import("effect/Schema").String;
229
+ readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
230
+ readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
231
+ readonly hostnameId: import("effect/Schema").String;
232
+ readonly managed: import("effect/Schema").Boolean;
233
+ readonly active: import("effect/Schema").Boolean;
234
+ readonly createdAt: import("effect/Schema").Date;
235
+ readonly updatedAt: import("effect/Schema").Date;
236
+ }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainRecords", "GET", "/api/domains/:id/records", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
237
+ readonly id: import("effect/Schema").NonEmptyString;
238
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
239
+ readonly required: import("effect/Schema").Boolean;
240
+ readonly status: import("effect/Schema").String;
241
+ readonly type: import("effect/Schema").String;
242
+ readonly name: import("effect/Schema").String;
243
+ readonly value: import("effect/Schema").String;
244
+ }>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never>, false> | HttpApiGroup.HttpApiGroup<"organizations", HttpApiEndpoint.HttpApiEndpoint<"getActiveMember", "GET", "/api/organizations/:organizationId/members/:userId", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
212
245
  readonly organizationId: import("effect/Schema").NonEmptyString;
213
246
  readonly userId: import("effect/Schema").NonEmptyString;
214
247
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
@@ -287,68 +320,35 @@ export declare const ServerApi: HttpApi.HttpApi<"ServerApi", HttpApiGroup.HttpAp
287
320
  readonly createdAt: import("effect/Schema").Date;
288
321
  }>>;
289
322
  readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
290
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false> | HttpApiGroup.HttpApiGroup<"domains", HttpApiEndpoint.HttpApiEndpoint<"createDomain", "POST", "/api/domains", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
291
- readonly hostname: import("effect/Schema").NonEmptyString;
292
- readonly rootHostname: import("effect/Schema").NonEmptyString;
293
- readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
294
- readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
295
- readonly managed: import("effect/Schema").Boolean;
296
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
297
- readonly id: import("effect/Schema").String;
298
- readonly hostname: import("effect/Schema").String;
299
- readonly rootHostname: import("effect/Schema").String;
300
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
301
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
302
- readonly hostnameId: import("effect/Schema").String;
303
- readonly managed: import("effect/Schema").Boolean;
304
- readonly active: import("effect/Schema").Boolean;
305
- readonly createdAt: import("effect/Schema").Date;
306
- readonly updatedAt: import("effect/Schema").Date;
307
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"deleteDomain", "DELETE", "/api/domains/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
308
- readonly id: import("effect/Schema").NonEmptyString;
309
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
310
- readonly id: import("effect/Schema").String;
311
- readonly hostname: import("effect/Schema").String;
312
- readonly rootHostname: import("effect/Schema").String;
313
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
314
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
315
- readonly hostnameId: import("effect/Schema").String;
316
- readonly managed: import("effect/Schema").Boolean;
317
- readonly active: import("effect/Schema").Boolean;
318
- readonly createdAt: import("effect/Schema").Date;
319
- readonly updatedAt: import("effect/Schema").Date;
320
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomain", "GET", "/api/domains/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
323
+ }>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false> | HttpApiGroup.HttpApiGroup<"users", HttpApiEndpoint.HttpApiEndpoint<"getUser", "GET", "/api/users/:id", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
321
324
  readonly id: import("effect/Schema").NonEmptyString;
322
325
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
323
326
  readonly id: import("effect/Schema").String;
324
- readonly hostname: import("effect/Schema").String;
325
- readonly rootHostname: import("effect/Schema").String;
326
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
327
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
328
- readonly hostnameId: import("effect/Schema").String;
329
- readonly managed: import("effect/Schema").Boolean;
330
- readonly active: import("effect/Schema").Boolean;
327
+ readonly name: import("effect/Schema").String;
328
+ readonly email: import("effect/Schema").String;
329
+ readonly emailVerified: import("effect/Schema").Boolean;
330
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
331
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
332
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
331
333
  readonly createdAt: import("effect/Schema").Date;
332
334
  readonly updatedAt: import("effect/Schema").Date;
333
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainByHost", "GET", "/api/domains/by-host/:hostname", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
334
- readonly hostname: import("effect/Schema").NonEmptyString;
335
+ }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getUserActiveOrganization", "GET", "/api/organizations/user/:userId/active", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
336
+ readonly userId: import("effect/Schema").NonEmptyString;
335
337
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
336
- readonly id: import("effect/Schema").String;
337
- readonly hostname: import("effect/Schema").String;
338
- readonly rootHostname: import("effect/Schema").String;
339
- readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
340
- readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
341
- readonly hostnameId: import("effect/Schema").String;
342
- readonly managed: import("effect/Schema").Boolean;
343
- readonly active: import("effect/Schema").Boolean;
344
- readonly createdAt: import("effect/Schema").Date;
345
- readonly updatedAt: import("effect/Schema").Date;
346
- }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainRecords", "GET", "/api/domains/:id/records", HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
347
- readonly id: import("effect/Schema").NonEmptyString;
348
- }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
349
- readonly required: import("effect/Schema").Boolean;
350
- readonly status: import("effect/Schema").String;
351
- readonly type: import("effect/Schema").String;
352
- readonly name: import("effect/Schema").String;
353
- readonly value: import("effect/Schema").String;
354
- }>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never>, false>>;
338
+ readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
339
+ }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listUsersByIds", "GET", "/api/users", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
340
+ readonly ids: import("effect/Schema").NonEmptyString;
341
+ }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
342
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
343
+ readonly id: import("effect/Schema").String;
344
+ readonly name: import("effect/Schema").String;
345
+ readonly email: import("effect/Schema").String;
346
+ readonly emailVerified: import("effect/Schema").Boolean;
347
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
348
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
349
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
350
+ readonly createdAt: import("effect/Schema").Date;
351
+ readonly updatedAt: import("effect/Schema").Date;
352
+ }>>;
353
+ readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
354
+ }>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, false>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krak-stack/auth",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "description": "Effect HttpApi clients and schemas for KrakStack Auth.",
5
5
  "license": "MIT",
6
6
  "files": [