@krak-stack/auth 0.1.39 → 0.1.41
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/admin/api.d.ts +196 -0
- package/dist/admin/api.js +158 -0
- package/dist/admin/index.d.ts +2 -0
- package/dist/admin/index.js +2 -0
- package/dist/admin/schema.d.ts +128 -0
- package/dist/admin/schema.js +190 -0
- package/dist/api.d.ts +278 -1
- package/dist/api.js +11 -2
- package/dist/components/admin-organization-form.d.ts +6 -0
- package/dist/components/admin-organization-form.js +126 -0
- package/dist/components/admin-organizations.d.ts +7 -0
- package/dist/components/admin-organizations.js +122 -0
- package/dist/components/admin-users.d.ts +8 -0
- package/dist/components/admin-users.js +282 -0
- package/dist/components/{auth-api-client.d.ts → auth-client-api.d.ts} +186 -196
- package/dist/components/auth-client-api.js +29 -0
- package/dist/components/auth-client.d.ts +2 -1
- package/dist/components/auth-forms.js +3 -3
- package/dist/components/auth-provider.d.ts +16 -15
- package/dist/components/auth-provider.js +30 -5
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/organization-switcher.js +4 -5
- package/dist/components/user-button.d.ts +11 -1
- package/dist/components/user-button.js +57 -6
- package/dist/components/utils.d.ts +11 -0
- package/dist/components/utils.js +24 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/query.d.ts +49 -0
- package/dist/query.js +114 -0
- package/dist/server/api.d.ts +32 -0
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +2 -1
- package/dist/server/schema.d.ts +4 -0
- package/dist/server/schema.js +8 -0
- package/dist/service.d.ts +462 -434
- package/dist/service.js +2 -2
- package/package.json +9 -1
- package/dist/components/auth-api-client.js +0 -29
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { PaginatedResponse, Query } from "../query";
|
|
3
|
+
import { ServerCreateDomainPayload, ServerDomain, ServerDomainIdParams, ServerDomainRecordsResponse, ServerUpdateDomainPayload, } from "../server/schema";
|
|
4
|
+
export const AdminListQuery = Schema.Struct({
|
|
5
|
+
...Query.fields,
|
|
6
|
+
projectId: Schema.optional(Schema.String),
|
|
7
|
+
}).annotate({
|
|
8
|
+
identifier: "AdminListQuery",
|
|
9
|
+
title: "Admin list query",
|
|
10
|
+
description: "Paginated administrative list query optionally scoped to linked project records.",
|
|
11
|
+
examples: [{ page: 0, pageSize: 10, projectId: "project-id" }],
|
|
12
|
+
});
|
|
13
|
+
export const AdminUser = Schema.Struct({
|
|
14
|
+
id: Schema.String,
|
|
15
|
+
name: Schema.String,
|
|
16
|
+
email: Schema.String,
|
|
17
|
+
emailVerified: Schema.Boolean,
|
|
18
|
+
image: Schema.NullOr(Schema.String),
|
|
19
|
+
createdAt: Schema.Date,
|
|
20
|
+
role: Schema.NullOr(Schema.String),
|
|
21
|
+
banned: Schema.NullOr(Schema.Boolean),
|
|
22
|
+
banReason: Schema.NullOr(Schema.String),
|
|
23
|
+
banExpires: Schema.NullOr(Schema.Date),
|
|
24
|
+
}).annotate({
|
|
25
|
+
identifier: "AdminUser",
|
|
26
|
+
title: "Admin user",
|
|
27
|
+
description: "Administrative user record returned in paginated user lists.",
|
|
28
|
+
examples: [
|
|
29
|
+
{
|
|
30
|
+
id: "user-id",
|
|
31
|
+
name: "Ada Lovelace",
|
|
32
|
+
email: "ada@example.com",
|
|
33
|
+
emailVerified: true,
|
|
34
|
+
image: null,
|
|
35
|
+
createdAt: new Date("2026-01-01T00:00:00.000Z"),
|
|
36
|
+
role: "admin",
|
|
37
|
+
banned: false,
|
|
38
|
+
banReason: null,
|
|
39
|
+
banExpires: null,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
});
|
|
43
|
+
export const AdminOrganization = Schema.Struct({
|
|
44
|
+
id: Schema.String,
|
|
45
|
+
name: Schema.String,
|
|
46
|
+
slug: Schema.String,
|
|
47
|
+
logo: Schema.optional(Schema.NullOr(Schema.String)),
|
|
48
|
+
metadata: Schema.optional(Schema.NullOr(Schema.String)),
|
|
49
|
+
createdAt: Schema.Date,
|
|
50
|
+
}).annotate({
|
|
51
|
+
identifier: "AdminOrganization",
|
|
52
|
+
title: "Admin organization",
|
|
53
|
+
description: "Administrative organization record managed by KrakStack Auth.",
|
|
54
|
+
examples: [
|
|
55
|
+
{
|
|
56
|
+
id: "organization-id",
|
|
57
|
+
name: "KrakStack",
|
|
58
|
+
slug: "krakstack",
|
|
59
|
+
logo: "https://example.com/logo.svg",
|
|
60
|
+
metadata: '{"tier":"internal"}',
|
|
61
|
+
createdAt: new Date("2026-01-01T00:00:00.000Z"),
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
});
|
|
65
|
+
export const AdminOrganizationIdParams = Schema.Struct({
|
|
66
|
+
id: Schema.String,
|
|
67
|
+
}).annotate({
|
|
68
|
+
identifier: "AdminOrganizationIdParams",
|
|
69
|
+
title: "Admin organization ID params",
|
|
70
|
+
description: "Path parameters used to identify an organization.",
|
|
71
|
+
examples: [{ id: "organization-id" }],
|
|
72
|
+
});
|
|
73
|
+
export const AdminCreateOrganizationPayload = Schema.Struct({
|
|
74
|
+
name: Schema.NonEmptyString,
|
|
75
|
+
slug: Schema.NonEmptyString,
|
|
76
|
+
logo: Schema.optional(Schema.String),
|
|
77
|
+
}).annotate({
|
|
78
|
+
identifier: "AdminCreateOrganizationPayload",
|
|
79
|
+
title: "Create organization payload",
|
|
80
|
+
description: "Payload used by administrators to create an organization.",
|
|
81
|
+
examples: [{ name: "KrakStack", slug: "krakstack" }],
|
|
82
|
+
});
|
|
83
|
+
export const AdminUpdateOrganizationPayload = Schema.Struct({
|
|
84
|
+
name: Schema.optional(Schema.NonEmptyString),
|
|
85
|
+
slug: Schema.optional(Schema.NonEmptyString),
|
|
86
|
+
logo: Schema.optional(Schema.String),
|
|
87
|
+
}).annotate({
|
|
88
|
+
identifier: "AdminUpdateOrganizationPayload",
|
|
89
|
+
title: "Update organization payload",
|
|
90
|
+
description: "Payload used by administrators to update an organization.",
|
|
91
|
+
examples: [{ name: "KrakStack Labs", slug: "krakstack-labs" }],
|
|
92
|
+
});
|
|
93
|
+
export const DashboardStatsQuery = Schema.Struct({
|
|
94
|
+
days: Schema.optional(Schema.Union([
|
|
95
|
+
Schema.Literal("7"),
|
|
96
|
+
Schema.Literal("14"),
|
|
97
|
+
Schema.Literal("30"),
|
|
98
|
+
Schema.Literal("90"),
|
|
99
|
+
])),
|
|
100
|
+
}).annotate({
|
|
101
|
+
identifier: "DashboardStatsQuery",
|
|
102
|
+
title: "Dashboard stats query",
|
|
103
|
+
description: "Time range used for dashboard chart series.",
|
|
104
|
+
examples: [{ days: "14" }],
|
|
105
|
+
});
|
|
106
|
+
export const DailyActiveUsersByDay = Schema.Struct({
|
|
107
|
+
date: Schema.String,
|
|
108
|
+
count: Schema.Number,
|
|
109
|
+
}).annotate({
|
|
110
|
+
identifier: "DailyActiveUsersByDay",
|
|
111
|
+
title: "Daily active users by day",
|
|
112
|
+
description: "Distinct authenticated users active on a calendar day.",
|
|
113
|
+
examples: [{ date: "2026-06-26", count: 18 }],
|
|
114
|
+
});
|
|
115
|
+
export const SignupsByDay = Schema.Struct({
|
|
116
|
+
date: Schema.String,
|
|
117
|
+
count: Schema.Number,
|
|
118
|
+
}).annotate({
|
|
119
|
+
identifier: "SignupsByDay",
|
|
120
|
+
title: "Signups by day",
|
|
121
|
+
description: "Users registered on a calendar day.",
|
|
122
|
+
examples: [{ date: "2026-06-26", count: 4 }],
|
|
123
|
+
});
|
|
124
|
+
export const ProjectConnections = Schema.Struct({
|
|
125
|
+
projectId: Schema.String,
|
|
126
|
+
projectName: Schema.String,
|
|
127
|
+
users: Schema.Number,
|
|
128
|
+
organizations: Schema.Number,
|
|
129
|
+
}).annotate({
|
|
130
|
+
identifier: "ProjectConnections",
|
|
131
|
+
title: "Project connections",
|
|
132
|
+
description: "Number of connected users and organizations for a project.",
|
|
133
|
+
examples: [
|
|
134
|
+
{
|
|
135
|
+
projectId: "project-id",
|
|
136
|
+
projectName: "Dashboard",
|
|
137
|
+
users: 12,
|
|
138
|
+
organizations: 3,
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
});
|
|
142
|
+
export const DashboardStatsResponse = Schema.Struct({
|
|
143
|
+
totalUsers: Schema.Number,
|
|
144
|
+
totalOrganizations: Schema.Number,
|
|
145
|
+
totalProjects: Schema.Number,
|
|
146
|
+
totalDomains: Schema.Number,
|
|
147
|
+
totalApiKeys: Schema.Number,
|
|
148
|
+
totalOauthClients: Schema.Number,
|
|
149
|
+
dailyActiveUsers: Schema.Number,
|
|
150
|
+
dailyActiveUsersByDay: Schema.Array(DailyActiveUsersByDay),
|
|
151
|
+
signupsByDay: Schema.Array(SignupsByDay),
|
|
152
|
+
projectConnections: Schema.Array(ProjectConnections),
|
|
153
|
+
}).annotate({
|
|
154
|
+
identifier: "DashboardStatsResponse",
|
|
155
|
+
title: "Dashboard stats response",
|
|
156
|
+
description: "Administrative dashboard statistics.",
|
|
157
|
+
examples: [
|
|
158
|
+
{
|
|
159
|
+
totalUsers: 42,
|
|
160
|
+
totalOrganizations: 3,
|
|
161
|
+
totalProjects: 2,
|
|
162
|
+
totalDomains: 5,
|
|
163
|
+
totalApiKeys: 7,
|
|
164
|
+
totalOauthClients: 1,
|
|
165
|
+
dailyActiveUsers: 18,
|
|
166
|
+
dailyActiveUsersByDay: [{ date: "2026-06-26", count: 18 }],
|
|
167
|
+
signupsByDay: [{ date: "2026-06-26", count: 4 }],
|
|
168
|
+
projectConnections: [
|
|
169
|
+
{
|
|
170
|
+
projectId: "project-id",
|
|
171
|
+
projectName: "Dashboard",
|
|
172
|
+
users: 12,
|
|
173
|
+
organizations: 3,
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
});
|
|
179
|
+
export const PaginatedAdminUsers = PaginatedResponse(AdminUser).annotate({
|
|
180
|
+
identifier: "PaginatedAdminUsers",
|
|
181
|
+
title: "Paginated admin users",
|
|
182
|
+
description: "Paginated administrative user list response.",
|
|
183
|
+
});
|
|
184
|
+
export const PaginatedAdminOrganizations = PaginatedResponse(AdminOrganization).annotate({
|
|
185
|
+
identifier: "PaginatedAdminOrganizations",
|
|
186
|
+
title: "Paginated admin organizations",
|
|
187
|
+
description: "Paginated administrative organization list response.",
|
|
188
|
+
});
|
|
189
|
+
export { ServerCreateDomainPayload, ServerDomain, ServerDomainIdParams, ServerDomainRecordsResponse, ServerUpdateDomainPayload, };
|
|
190
|
+
export { SortParamsFromString } from "../query";
|
package/dist/api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpApi } from "effect/unstable/httpapi";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const AuthServiceApi: HttpApi.HttpApi<"AuthServiceApi", import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"auth", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getSession", "GET", "/api/auth/get-session", 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").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
3
3
|
readonly session: import("effect/Schema").Struct<{
|
|
4
4
|
readonly id: import("effect/Schema").String;
|
|
5
5
|
readonly expiresAt: import("effect/Schema").Date;
|
|
@@ -102,7 +102,11 @@ export declare const AuthApi: HttpApi.HttpApi<"AuthApi", import("effect/unstable
|
|
|
102
102
|
readonly hostname: import("effect/Schema").String;
|
|
103
103
|
readonly rootHostname: import("effect/Schema").String;
|
|
104
104
|
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
105
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
106
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
105
107
|
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
108
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
109
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
106
110
|
readonly hostnameId: import("effect/Schema").String;
|
|
107
111
|
readonly managed: import("effect/Schema").Boolean;
|
|
108
112
|
readonly active: import("effect/Schema").Boolean;
|
|
@@ -115,7 +119,11 @@ export declare const AuthApi: HttpApi.HttpApi<"AuthApi", import("effect/unstable
|
|
|
115
119
|
readonly hostname: import("effect/Schema").String;
|
|
116
120
|
readonly rootHostname: import("effect/Schema").String;
|
|
117
121
|
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
122
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
123
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
118
124
|
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
125
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
126
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
119
127
|
readonly hostnameId: import("effect/Schema").String;
|
|
120
128
|
readonly managed: import("effect/Schema").Boolean;
|
|
121
129
|
readonly active: import("effect/Schema").Boolean;
|
|
@@ -128,7 +136,11 @@ export declare const AuthApi: HttpApi.HttpApi<"AuthApi", import("effect/unstable
|
|
|
128
136
|
readonly hostname: import("effect/Schema").String;
|
|
129
137
|
readonly rootHostname: import("effect/Schema").String;
|
|
130
138
|
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
139
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
140
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
131
141
|
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
142
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
143
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
132
144
|
readonly hostnameId: import("effect/Schema").String;
|
|
133
145
|
readonly managed: import("effect/Schema").Boolean;
|
|
134
146
|
readonly active: import("effect/Schema").Boolean;
|
|
@@ -141,7 +153,11 @@ export declare const AuthApi: HttpApi.HttpApi<"AuthApi", import("effect/unstable
|
|
|
141
153
|
readonly hostname: import("effect/Schema").String;
|
|
142
154
|
readonly rootHostname: import("effect/Schema").String;
|
|
143
155
|
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
156
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
157
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
144
158
|
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
159
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
160
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
145
161
|
readonly hostnameId: import("effect/Schema").String;
|
|
146
162
|
readonly managed: import("effect/Schema").Boolean;
|
|
147
163
|
readonly active: import("effect/Schema").Boolean;
|
|
@@ -270,3 +286,264 @@ export declare const AuthApi: HttpApi.HttpApi<"AuthApi", import("effect/unstable
|
|
|
270
286
|
}>>;
|
|
271
287
|
readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
272
288
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false>>;
|
|
289
|
+
export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"admin", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createDomain", "POST", "/api/admin/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<{
|
|
290
|
+
readonly hostname: import("effect/Schema").NonEmptyString;
|
|
291
|
+
readonly rootHostname: import("effect/Schema").NonEmptyString;
|
|
292
|
+
readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
293
|
+
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
294
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
295
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
296
|
+
readonly id: import("effect/Schema").String;
|
|
297
|
+
readonly hostname: import("effect/Schema").String;
|
|
298
|
+
readonly rootHostname: import("effect/Schema").String;
|
|
299
|
+
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
300
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
301
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
302
|
+
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
303
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
304
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
305
|
+
readonly hostnameId: import("effect/Schema").String;
|
|
306
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
307
|
+
readonly active: import("effect/Schema").Boolean;
|
|
308
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
309
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
310
|
+
}>>, 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<"createOrganization", "POST", "/api/admin/organizations", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
311
|
+
readonly name: import("effect/Schema").NonEmptyString;
|
|
312
|
+
readonly slug: import("effect/Schema").NonEmptyString;
|
|
313
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
314
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
315
|
+
readonly id: import("effect/Schema").String;
|
|
316
|
+
readonly name: import("effect/Schema").String;
|
|
317
|
+
readonly slug: import("effect/Schema").String;
|
|
318
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
319
|
+
readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
320
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
321
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<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<"dashboardStats", "GET", "/api/admin/dashboard-stats", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
322
|
+
readonly days: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"7">, import("effect/Schema").Literal<"14">, import("effect/Schema").Literal<"30">, import("effect/Schema").Literal<"90">]>>;
|
|
323
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
324
|
+
readonly totalUsers: import("effect/Schema").Number;
|
|
325
|
+
readonly totalOrganizations: import("effect/Schema").Number;
|
|
326
|
+
readonly totalProjects: import("effect/Schema").Number;
|
|
327
|
+
readonly totalDomains: import("effect/Schema").Number;
|
|
328
|
+
readonly totalApiKeys: import("effect/Schema").Number;
|
|
329
|
+
readonly totalOauthClients: import("effect/Schema").Number;
|
|
330
|
+
readonly dailyActiveUsers: import("effect/Schema").Number;
|
|
331
|
+
readonly dailyActiveUsersByDay: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
332
|
+
readonly date: import("effect/Schema").String;
|
|
333
|
+
readonly count: import("effect/Schema").Number;
|
|
334
|
+
}>>;
|
|
335
|
+
readonly signupsByDay: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
336
|
+
readonly date: import("effect/Schema").String;
|
|
337
|
+
readonly count: import("effect/Schema").Number;
|
|
338
|
+
}>>;
|
|
339
|
+
readonly projectConnections: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
340
|
+
readonly projectId: import("effect/Schema").String;
|
|
341
|
+
readonly projectName: import("effect/Schema").String;
|
|
342
|
+
readonly users: import("effect/Schema").Number;
|
|
343
|
+
readonly organizations: import("effect/Schema").Number;
|
|
344
|
+
}>>;
|
|
345
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<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<"deleteDomain", "DELETE", "/api/admin/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
346
|
+
readonly id: import("effect/Schema").NonEmptyString;
|
|
347
|
+
}>>, 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<{
|
|
348
|
+
readonly id: import("effect/Schema").String;
|
|
349
|
+
readonly hostname: import("effect/Schema").String;
|
|
350
|
+
readonly rootHostname: import("effect/Schema").String;
|
|
351
|
+
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
352
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
353
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
354
|
+
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
355
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
356
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
357
|
+
readonly hostnameId: import("effect/Schema").String;
|
|
358
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
359
|
+
readonly active: import("effect/Schema").Boolean;
|
|
360
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
361
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
362
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<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>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"deleteOrganization", "DELETE", "/api/admin/organizations/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
363
|
+
readonly id: import("effect/Schema").String;
|
|
364
|
+
}>>, 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<{
|
|
365
|
+
readonly id: import("effect/Schema").String;
|
|
366
|
+
readonly name: import("effect/Schema").String;
|
|
367
|
+
readonly slug: import("effect/Schema").String;
|
|
368
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
369
|
+
readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
370
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
371
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<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>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomainRecords", "GET", "/api/admin/domains/:id/records", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
372
|
+
readonly id: import("effect/Schema").NonEmptyString;
|
|
373
|
+
}>>, 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<{
|
|
374
|
+
readonly required: import("effect/Schema").Boolean;
|
|
375
|
+
readonly status: import("effect/Schema").String;
|
|
376
|
+
readonly type: import("effect/Schema").String;
|
|
377
|
+
readonly name: import("effect/Schema").String;
|
|
378
|
+
readonly value: import("effect/Schema").String;
|
|
379
|
+
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<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>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listDomains", "GET", "/api/admin/domains", 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").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
380
|
+
readonly id: import("effect/Schema").String;
|
|
381
|
+
readonly hostname: import("effect/Schema").String;
|
|
382
|
+
readonly rootHostname: import("effect/Schema").String;
|
|
383
|
+
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
384
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
385
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
386
|
+
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
387
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
388
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
389
|
+
readonly hostnameId: import("effect/Schema").String;
|
|
390
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
391
|
+
readonly active: import("effect/Schema").Boolean;
|
|
392
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
393
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
394
|
+
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<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<"listOrganizations", "GET", "/api/admin/organizations", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
395
|
+
readonly page: import("effect/Schema").Int;
|
|
396
|
+
readonly pageSize: import("effect/Schema").Int;
|
|
397
|
+
readonly globalFilter: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
398
|
+
readonly sort: import("effect/Schema").optional<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").decodeTo<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
399
|
+
readonly id: import("effect/Schema").NonEmptyString;
|
|
400
|
+
readonly direction: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"asc">, import("effect/Schema").Literal<"desc">]>;
|
|
401
|
+
}>>, import("effect/Schema").String, never, never>, never, never>>;
|
|
402
|
+
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
403
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
404
|
+
readonly data: import("effect/Schema").$Array<import("effect/Schema").Schema<{
|
|
405
|
+
readonly id: string;
|
|
406
|
+
readonly name: string;
|
|
407
|
+
readonly slug: string;
|
|
408
|
+
readonly logo?: string | null | undefined;
|
|
409
|
+
readonly metadata?: string | null | undefined;
|
|
410
|
+
readonly createdAt: Date;
|
|
411
|
+
}>>;
|
|
412
|
+
readonly meta: import("effect/Schema").Struct<{
|
|
413
|
+
readonly page: import("effect/Schema").Int;
|
|
414
|
+
readonly pageSize: import("effect/Schema").Int;
|
|
415
|
+
readonly total: import("effect/Schema").Int;
|
|
416
|
+
readonly pageCount: import("effect/Schema").Int;
|
|
417
|
+
}>;
|
|
418
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<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<"listUsers", "GET", "/api/admin/users", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
419
|
+
readonly page: import("effect/Schema").Int;
|
|
420
|
+
readonly pageSize: import("effect/Schema").Int;
|
|
421
|
+
readonly globalFilter: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
422
|
+
readonly sort: import("effect/Schema").optional<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").decodeTo<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
423
|
+
readonly id: import("effect/Schema").NonEmptyString;
|
|
424
|
+
readonly direction: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"asc">, import("effect/Schema").Literal<"desc">]>;
|
|
425
|
+
}>>, import("effect/Schema").String, never, never>, never, never>>;
|
|
426
|
+
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
427
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
428
|
+
readonly data: import("effect/Schema").$Array<import("effect/Schema").Schema<import("effect/Schema").Struct.ReadonlySide<{
|
|
429
|
+
readonly id: import("effect/Schema").String;
|
|
430
|
+
readonly name: import("effect/Schema").String;
|
|
431
|
+
readonly email: import("effect/Schema").String;
|
|
432
|
+
readonly emailVerified: import("effect/Schema").Boolean;
|
|
433
|
+
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
434
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
435
|
+
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
436
|
+
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
437
|
+
readonly banReason: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
438
|
+
readonly banExpires: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
439
|
+
}, "Type">>>;
|
|
440
|
+
readonly meta: import("effect/Schema").Struct<{
|
|
441
|
+
readonly page: import("effect/Schema").Int;
|
|
442
|
+
readonly pageSize: import("effect/Schema").Int;
|
|
443
|
+
readonly total: import("effect/Schema").Int;
|
|
444
|
+
readonly pageCount: import("effect/Schema").Int;
|
|
445
|
+
}>;
|
|
446
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<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<"updateDomain", "PATCH", "/api/admin/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
447
|
+
readonly id: import("effect/Schema").NonEmptyString;
|
|
448
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
449
|
+
readonly hostname: import("effect/Schema").NonEmptyString;
|
|
450
|
+
readonly rootHostname: import("effect/Schema").NonEmptyString;
|
|
451
|
+
readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
452
|
+
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
453
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
454
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
455
|
+
readonly id: import("effect/Schema").String;
|
|
456
|
+
readonly hostname: import("effect/Schema").String;
|
|
457
|
+
readonly rootHostname: import("effect/Schema").String;
|
|
458
|
+
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
459
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
460
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
461
|
+
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
462
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
463
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
464
|
+
readonly hostnameId: import("effect/Schema").String;
|
|
465
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
466
|
+
readonly active: import("effect/Schema").Boolean;
|
|
467
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
468
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
469
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<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>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"updateOrganization", "PATCH", "/api/admin/organizations/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
470
|
+
readonly id: import("effect/Schema").String;
|
|
471
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
472
|
+
readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
473
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
474
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
475
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
476
|
+
readonly id: import("effect/Schema").String;
|
|
477
|
+
readonly name: import("effect/Schema").String;
|
|
478
|
+
readonly slug: import("effect/Schema").String;
|
|
479
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
480
|
+
readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
481
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
482
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<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>, 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<{
|
|
483
|
+
readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
|
|
484
|
+
readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
485
|
+
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
486
|
+
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
487
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
488
|
+
readonly id: import("effect/Schema").String;
|
|
489
|
+
readonly key: import("effect/Schema").String;
|
|
490
|
+
}>>, 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<{
|
|
491
|
+
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
492
|
+
readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
493
|
+
readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
494
|
+
readonly rootHost: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
495
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
496
|
+
readonly projectKey: import("effect/Schema").String;
|
|
497
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
498
|
+
readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
499
|
+
readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
500
|
+
readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
501
|
+
readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
502
|
+
readonly authOptions: import("effect/Schema").Struct<{
|
|
503
|
+
readonly emailPassword: import("effect/Schema").Boolean;
|
|
504
|
+
readonly emailOtp: import("effect/Schema").Boolean;
|
|
505
|
+
readonly google: import("effect/Schema").Boolean;
|
|
506
|
+
readonly signUp: import("effect/Schema").Boolean;
|
|
507
|
+
readonly signUpName: import("effect/Schema").Boolean;
|
|
508
|
+
}>;
|
|
509
|
+
}>>, 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<{
|
|
510
|
+
readonly newPassword: import("effect/Schema").NonEmptyString;
|
|
511
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
512
|
+
readonly ok: import("effect/Schema").Boolean;
|
|
513
|
+
}>>, 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<{
|
|
514
|
+
readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
|
|
515
|
+
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
516
|
+
readonly url: import("effect/Schema").String;
|
|
517
|
+
}>>, 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<{
|
|
518
|
+
readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
|
|
519
|
+
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
520
|
+
readonly url: import("effect/Schema").String;
|
|
521
|
+
}>>, 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<{
|
|
522
|
+
readonly key: import("effect/Schema").NonEmptyString;
|
|
523
|
+
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">]>>;
|
|
524
|
+
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
525
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
526
|
+
readonly valid: import("effect/Schema").Boolean;
|
|
527
|
+
readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
528
|
+
readonly message: import("effect/Schema").String;
|
|
529
|
+
readonly code: import("effect/Schema").String;
|
|
530
|
+
}>>;
|
|
531
|
+
readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
532
|
+
readonly id: import("effect/Schema").String;
|
|
533
|
+
readonly configId: import("effect/Schema").String;
|
|
534
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
535
|
+
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
536
|
+
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
537
|
+
readonly referenceId: import("effect/Schema").String;
|
|
538
|
+
readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
539
|
+
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
540
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
541
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
542
|
+
readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
543
|
+
readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
|
|
544
|
+
}>>;
|
|
545
|
+
}>>, 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<{
|
|
546
|
+
readonly password: import("effect/Schema").NonEmptyString;
|
|
547
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
548
|
+
readonly ok: import("effect/Schema").Boolean;
|
|
549
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./extra").ExtraBadRequest>, never, never>, false>>;
|
package/dist/api.js
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { HttpApi, OpenApi } from "effect/unstable/httpapi";
|
|
2
|
+
import { AdminApiGroup } from "./admin/api";
|
|
2
3
|
import { BetterAuthApiGroup } from "./better-auth/api";
|
|
3
4
|
import { ExtraApiGroup } from "./extra/api";
|
|
4
5
|
import { ServerDomainsApiGroup, ServerOrganizationsApiGroup, ServerUsersApiGroup, } from "./server/api";
|
|
5
|
-
export const
|
|
6
|
+
export const AuthServiceApi = HttpApi.make("AuthServiceApi")
|
|
6
7
|
.annotateMerge(OpenApi.annotations({
|
|
7
|
-
title: "KrakStack Auth API",
|
|
8
|
+
title: "KrakStack Auth Service API",
|
|
8
9
|
version: "1.0.0",
|
|
9
10
|
description: "Auth API for Better Auth extensions, KrakStack extra endpoints, and trusted server endpoints.",
|
|
10
11
|
}))
|
|
11
12
|
.add(BetterAuthApiGroup.prefix("/auth"), ExtraApiGroup, ServerUsersApiGroup, ServerOrganizationsApiGroup, ServerDomainsApiGroup)
|
|
12
13
|
.prefix("/api");
|
|
14
|
+
export const AuthClientApi = HttpApi.make("AuthClientApi")
|
|
15
|
+
.annotateMerge(OpenApi.annotations({
|
|
16
|
+
title: "KrakStack Auth Client API",
|
|
17
|
+
version: "1.0.0",
|
|
18
|
+
description: "Browser-facing API used by KrakStack Auth React components.",
|
|
19
|
+
}))
|
|
20
|
+
.add(ExtraApiGroup, AdminApiGroup)
|
|
21
|
+
.prefix("/api");
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type AdminOrganization } from "../admin/schema";
|
|
2
|
+
export declare function AdminOrganizationForm({ organization, onClose, onSaved, }: {
|
|
3
|
+
organization?: AdminOrganization;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onSaved: (organization: AdminOrganization) => void;
|
|
6
|
+
}): import("react").JSX.Element;
|