@krak-stack/auth 0.1.46 → 0.1.48
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.group.d.ts +121 -3
- package/dist/admin/api.group.js +84 -1
- package/dist/admin/schema.d.ts +30 -0
- package/dist/admin/schema.js +70 -0
- package/dist/api.d.ts +143 -5
- package/dist/components/admin-organization-form.js +0 -1
- package/dist/components/admin-organizations.js +0 -1
- package/dist/components/admin-required.d.ts +43 -0
- package/dist/components/admin-required.js +183 -0
- package/dist/components/admin-users.js +0 -1
- package/dist/components/auth-client-api.d.ts +132 -4
- package/dist/components/auth-client.d.ts +24 -55
- package/dist/components/auth-client.js +23 -12
- package/dist/components/auth-forms.js +15 -12
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -0
- package/dist/components/organization-switcher.d.ts +4 -0
- package/dist/components/organization-switcher.js +69 -26
- package/dist/extra/api.group.d.ts +11 -1
- package/dist/extra/api.group.js +10 -1
- package/dist/extra/schema.d.ts +14 -0
- package/dist/extra/schema.js +32 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/server/proxy.js +1 -13
- package/dist/service.d.ts +28 -0
- package/package.json +3 -3
|
@@ -58,7 +58,26 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
|
|
|
58
58
|
readonly users: Schema.Number;
|
|
59
59
|
readonly organizations: Schema.Number;
|
|
60
60
|
}>>;
|
|
61
|
-
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
61
|
+
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"deleteApiKey", "DELETE", "/admin/api-keys/:id", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
62
|
+
readonly id: Schema.String;
|
|
63
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
64
|
+
readonly id: Schema.String;
|
|
65
|
+
readonly configId: Schema.String;
|
|
66
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
67
|
+
readonly start: Schema.NullOr<Schema.String>;
|
|
68
|
+
readonly referenceId: Schema.String;
|
|
69
|
+
readonly prefix: Schema.NullOr<Schema.String>;
|
|
70
|
+
readonly enabled: Schema.Boolean;
|
|
71
|
+
readonly rateLimitEnabled: Schema.Boolean;
|
|
72
|
+
readonly rateLimitTimeWindow: Schema.NullOr<Schema.Number>;
|
|
73
|
+
readonly rateLimitMax: Schema.NullOr<Schema.Number>;
|
|
74
|
+
readonly requestCount: Schema.Number;
|
|
75
|
+
readonly remaining: Schema.NullOr<Schema.Number>;
|
|
76
|
+
readonly lastRequest: Schema.NullOr<Schema.Date>;
|
|
77
|
+
readonly expiresAt: Schema.NullOr<Schema.Date>;
|
|
78
|
+
readonly createdAt: Schema.Date;
|
|
79
|
+
readonly updatedAt: Schema.Date;
|
|
80
|
+
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"deleteDomain", "DELETE", "/admin/domains/:id", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
62
81
|
readonly id: Schema.NonEmptyString;
|
|
63
82
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
64
83
|
readonly id: Schema.String;
|
|
@@ -85,6 +104,44 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
|
|
|
85
104
|
readonly metadata: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
86
105
|
readonly memberCount: Schema.optional<Schema.Number>;
|
|
87
106
|
readonly createdAt: Schema.Date;
|
|
107
|
+
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"disableApiKeyRateLimit", "POST", "/admin/api-keys/:id/disable-rate-limit", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
108
|
+
readonly id: Schema.String;
|
|
109
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
110
|
+
readonly id: Schema.String;
|
|
111
|
+
readonly configId: Schema.String;
|
|
112
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
113
|
+
readonly start: Schema.NullOr<Schema.String>;
|
|
114
|
+
readonly referenceId: Schema.String;
|
|
115
|
+
readonly prefix: Schema.NullOr<Schema.String>;
|
|
116
|
+
readonly enabled: Schema.Boolean;
|
|
117
|
+
readonly rateLimitEnabled: Schema.Boolean;
|
|
118
|
+
readonly rateLimitTimeWindow: Schema.NullOr<Schema.Number>;
|
|
119
|
+
readonly rateLimitMax: Schema.NullOr<Schema.Number>;
|
|
120
|
+
readonly requestCount: Schema.Number;
|
|
121
|
+
readonly remaining: Schema.NullOr<Schema.Number>;
|
|
122
|
+
readonly lastRequest: Schema.NullOr<Schema.Date>;
|
|
123
|
+
readonly expiresAt: Schema.NullOr<Schema.Date>;
|
|
124
|
+
readonly createdAt: Schema.Date;
|
|
125
|
+
readonly updatedAt: Schema.Date;
|
|
126
|
+
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"enableApiKeyRateLimit", "POST", "/admin/api-keys/:id/enable-rate-limit", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
127
|
+
readonly id: Schema.String;
|
|
128
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
129
|
+
readonly id: Schema.String;
|
|
130
|
+
readonly configId: Schema.String;
|
|
131
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
132
|
+
readonly start: Schema.NullOr<Schema.String>;
|
|
133
|
+
readonly referenceId: Schema.String;
|
|
134
|
+
readonly prefix: Schema.NullOr<Schema.String>;
|
|
135
|
+
readonly enabled: Schema.Boolean;
|
|
136
|
+
readonly rateLimitEnabled: Schema.Boolean;
|
|
137
|
+
readonly rateLimitTimeWindow: Schema.NullOr<Schema.Number>;
|
|
138
|
+
readonly rateLimitMax: Schema.NullOr<Schema.Number>;
|
|
139
|
+
readonly requestCount: Schema.Number;
|
|
140
|
+
readonly remaining: Schema.NullOr<Schema.Number>;
|
|
141
|
+
readonly lastRequest: Schema.NullOr<Schema.Date>;
|
|
142
|
+
readonly expiresAt: Schema.NullOr<Schema.Date>;
|
|
143
|
+
readonly createdAt: Schema.Date;
|
|
144
|
+
readonly updatedAt: Schema.Date;
|
|
88
145
|
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getDomainRecords", "GET", "/admin/domains/:id/records", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
89
146
|
readonly id: Schema.NonEmptyString;
|
|
90
147
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<Schema.Struct<{
|
|
@@ -93,7 +150,24 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
|
|
|
93
150
|
readonly type: Schema.String;
|
|
94
151
|
readonly name: Schema.String;
|
|
95
152
|
readonly value: Schema.String;
|
|
96
|
-
}>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
153
|
+
}>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listApiKeys", "GET", "/admin/api-keys", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<Schema.Struct<{
|
|
154
|
+
readonly id: Schema.String;
|
|
155
|
+
readonly configId: Schema.String;
|
|
156
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
157
|
+
readonly start: Schema.NullOr<Schema.String>;
|
|
158
|
+
readonly referenceId: Schema.String;
|
|
159
|
+
readonly prefix: Schema.NullOr<Schema.String>;
|
|
160
|
+
readonly enabled: Schema.Boolean;
|
|
161
|
+
readonly rateLimitEnabled: Schema.Boolean;
|
|
162
|
+
readonly rateLimitTimeWindow: Schema.NullOr<Schema.Number>;
|
|
163
|
+
readonly rateLimitMax: Schema.NullOr<Schema.Number>;
|
|
164
|
+
readonly requestCount: Schema.Number;
|
|
165
|
+
readonly remaining: Schema.NullOr<Schema.Number>;
|
|
166
|
+
readonly lastRequest: Schema.NullOr<Schema.Date>;
|
|
167
|
+
readonly expiresAt: Schema.NullOr<Schema.Date>;
|
|
168
|
+
readonly createdAt: Schema.Date;
|
|
169
|
+
readonly updatedAt: Schema.Date;
|
|
170
|
+
}>>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listDomains", "GET", "/admin/domains", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.$Array<Schema.Struct<{
|
|
97
171
|
readonly id: Schema.String;
|
|
98
172
|
readonly hostname: Schema.String;
|
|
99
173
|
readonly rootHostname: Schema.String;
|
|
@@ -162,7 +236,51 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
|
|
|
162
236
|
readonly total: Schema.Int;
|
|
163
237
|
readonly pageCount: Schema.Int;
|
|
164
238
|
}>;
|
|
165
|
-
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"
|
|
239
|
+
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"resetApiKeyRateLimit", "POST", "/admin/api-keys/:id/reset-rate-limit", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
240
|
+
readonly id: Schema.String;
|
|
241
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
242
|
+
readonly id: Schema.String;
|
|
243
|
+
readonly configId: Schema.String;
|
|
244
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
245
|
+
readonly start: Schema.NullOr<Schema.String>;
|
|
246
|
+
readonly referenceId: Schema.String;
|
|
247
|
+
readonly prefix: Schema.NullOr<Schema.String>;
|
|
248
|
+
readonly enabled: Schema.Boolean;
|
|
249
|
+
readonly rateLimitEnabled: Schema.Boolean;
|
|
250
|
+
readonly rateLimitTimeWindow: Schema.NullOr<Schema.Number>;
|
|
251
|
+
readonly rateLimitMax: Schema.NullOr<Schema.Number>;
|
|
252
|
+
readonly requestCount: Schema.Number;
|
|
253
|
+
readonly remaining: Schema.NullOr<Schema.Number>;
|
|
254
|
+
readonly lastRequest: Schema.NullOr<Schema.Date>;
|
|
255
|
+
readonly expiresAt: Schema.NullOr<Schema.Date>;
|
|
256
|
+
readonly createdAt: Schema.Date;
|
|
257
|
+
readonly updatedAt: Schema.Date;
|
|
258
|
+
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"updateApiKey", "PATCH", "/admin/api-keys/:id", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
259
|
+
readonly id: Schema.String;
|
|
260
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
261
|
+
readonly name: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
262
|
+
readonly enabled: Schema.optional<Schema.Boolean>;
|
|
263
|
+
readonly rateLimitEnabled: Schema.optional<Schema.Boolean>;
|
|
264
|
+
readonly rateLimitMax: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
265
|
+
readonly rateLimitTimeWindow: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
266
|
+
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
267
|
+
readonly id: Schema.String;
|
|
268
|
+
readonly configId: Schema.String;
|
|
269
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
270
|
+
readonly start: Schema.NullOr<Schema.String>;
|
|
271
|
+
readonly referenceId: Schema.String;
|
|
272
|
+
readonly prefix: Schema.NullOr<Schema.String>;
|
|
273
|
+
readonly enabled: Schema.Boolean;
|
|
274
|
+
readonly rateLimitEnabled: Schema.Boolean;
|
|
275
|
+
readonly rateLimitTimeWindow: Schema.NullOr<Schema.Number>;
|
|
276
|
+
readonly rateLimitMax: Schema.NullOr<Schema.Number>;
|
|
277
|
+
readonly requestCount: Schema.Number;
|
|
278
|
+
readonly remaining: Schema.NullOr<Schema.Number>;
|
|
279
|
+
readonly lastRequest: Schema.NullOr<Schema.Date>;
|
|
280
|
+
readonly expiresAt: Schema.NullOr<Schema.Date>;
|
|
281
|
+
readonly createdAt: Schema.Date;
|
|
282
|
+
readonly updatedAt: Schema.Date;
|
|
283
|
+
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"updateDomain", "PATCH", "/admin/domains/:id", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
166
284
|
readonly id: Schema.NonEmptyString;
|
|
167
285
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
168
286
|
readonly hostname: Schema.NonEmptyString;
|
package/dist/admin/api.group.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi, } from "effect/unstable/httpapi";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
|
-
import { AdminCreateOrganizationPayload, AdminListQuery, AdminOrganization, AdminOrganizationIdParams, AdminUpdateOrganizationPayload, DashboardStatsQuery, DashboardStatsResponse, PaginatedAdminOrganizations, PaginatedAdminUsers, ServerCreateDomainPayload, ServerDomain, ServerDomainIdParams, ServerDomainRecordsResponse, ServerUpdateDomainPayload, } from "./schema";
|
|
3
|
+
import { AdminCreateOrganizationPayload, AdminApiKey, AdminApiKeyIdParams, AdminListQuery, AdminOrganization, AdminOrganizationIdParams, AdminUpdateApiKeyPayload, AdminUpdateOrganizationPayload, DashboardStatsQuery, DashboardStatsResponse, PaginatedAdminOrganizations, PaginatedAdminUsers, ServerCreateDomainPayload, ServerDomain, ServerDomainIdParams, ServerDomainRecordsResponse, ServerUpdateDomainPayload, } from "./schema";
|
|
4
4
|
export * from "./schema";
|
|
5
5
|
export const AdminApiGroup = HttpApiGroup.make("admin")
|
|
6
6
|
.add(HttpApiEndpoint.get("dashboardStats", "/admin/dashboard-stats", {
|
|
@@ -15,6 +15,89 @@ export const AdminApiGroup = HttpApiGroup.make("admin")
|
|
|
15
15
|
title: "Dashboard stats",
|
|
16
16
|
summary: "Get dashboard statistics",
|
|
17
17
|
description: "Returns user, organization, and daily active user counts for authenticated administrators.",
|
|
18
|
+
})))
|
|
19
|
+
.add(HttpApiEndpoint.get("listApiKeys", "/admin/api-keys", {
|
|
20
|
+
success: Schema.Array(AdminApiKey),
|
|
21
|
+
error: [
|
|
22
|
+
HttpApiError.Unauthorized,
|
|
23
|
+
HttpApiError.Forbidden,
|
|
24
|
+
HttpApiError.InternalServerError,
|
|
25
|
+
],
|
|
26
|
+
}).annotateMerge(OpenApi.annotations({
|
|
27
|
+
title: "List API keys",
|
|
28
|
+
summary: "List API keys for administrators",
|
|
29
|
+
description: "Returns all API key metadata for authenticated administrators.",
|
|
30
|
+
})))
|
|
31
|
+
.add(HttpApiEndpoint.delete("deleteApiKey", "/admin/api-keys/:id", {
|
|
32
|
+
params: AdminApiKeyIdParams,
|
|
33
|
+
success: AdminApiKey,
|
|
34
|
+
error: [
|
|
35
|
+
HttpApiError.Unauthorized,
|
|
36
|
+
HttpApiError.Forbidden,
|
|
37
|
+
HttpApiError.NotFound,
|
|
38
|
+
HttpApiError.InternalServerError,
|
|
39
|
+
],
|
|
40
|
+
}).annotateMerge(OpenApi.annotations({
|
|
41
|
+
title: "Delete API key",
|
|
42
|
+
summary: "Delete an API key",
|
|
43
|
+
description: "Deletes an API key for authenticated administrators.",
|
|
44
|
+
})))
|
|
45
|
+
.add(HttpApiEndpoint.patch("updateApiKey", "/admin/api-keys/:id", {
|
|
46
|
+
params: AdminApiKeyIdParams,
|
|
47
|
+
payload: AdminUpdateApiKeyPayload,
|
|
48
|
+
success: AdminApiKey,
|
|
49
|
+
error: [
|
|
50
|
+
HttpApiError.Unauthorized,
|
|
51
|
+
HttpApiError.Forbidden,
|
|
52
|
+
HttpApiError.NotFound,
|
|
53
|
+
HttpApiError.InternalServerError,
|
|
54
|
+
],
|
|
55
|
+
}).annotateMerge(OpenApi.annotations({
|
|
56
|
+
title: "Update API key",
|
|
57
|
+
summary: "Update an API key",
|
|
58
|
+
description: "Updates API key metadata and rate-limit settings for authenticated administrators.",
|
|
59
|
+
})))
|
|
60
|
+
.add(HttpApiEndpoint.post("resetApiKeyRateLimit", "/admin/api-keys/:id/reset-rate-limit", {
|
|
61
|
+
params: AdminApiKeyIdParams,
|
|
62
|
+
success: AdminApiKey,
|
|
63
|
+
error: [
|
|
64
|
+
HttpApiError.Unauthorized,
|
|
65
|
+
HttpApiError.Forbidden,
|
|
66
|
+
HttpApiError.NotFound,
|
|
67
|
+
HttpApiError.InternalServerError,
|
|
68
|
+
],
|
|
69
|
+
}).annotateMerge(OpenApi.annotations({
|
|
70
|
+
title: "Reset API key rate limit",
|
|
71
|
+
summary: "Reset an API key rate-limit window",
|
|
72
|
+
description: "Resets request count and last-used window state for an API key.",
|
|
73
|
+
})))
|
|
74
|
+
.add(HttpApiEndpoint.post("enableApiKeyRateLimit", "/admin/api-keys/:id/enable-rate-limit", {
|
|
75
|
+
params: AdminApiKeyIdParams,
|
|
76
|
+
success: AdminApiKey,
|
|
77
|
+
error: [
|
|
78
|
+
HttpApiError.Unauthorized,
|
|
79
|
+
HttpApiError.Forbidden,
|
|
80
|
+
HttpApiError.NotFound,
|
|
81
|
+
HttpApiError.InternalServerError,
|
|
82
|
+
],
|
|
83
|
+
}).annotateMerge(OpenApi.annotations({
|
|
84
|
+
title: "Enable API key rate limit",
|
|
85
|
+
summary: "Enable API key rate limiting",
|
|
86
|
+
description: "Enables rate-limit enforcement for an API key.",
|
|
87
|
+
})))
|
|
88
|
+
.add(HttpApiEndpoint.post("disableApiKeyRateLimit", "/admin/api-keys/:id/disable-rate-limit", {
|
|
89
|
+
params: AdminApiKeyIdParams,
|
|
90
|
+
success: AdminApiKey,
|
|
91
|
+
error: [
|
|
92
|
+
HttpApiError.Unauthorized,
|
|
93
|
+
HttpApiError.Forbidden,
|
|
94
|
+
HttpApiError.NotFound,
|
|
95
|
+
HttpApiError.InternalServerError,
|
|
96
|
+
],
|
|
97
|
+
}).annotateMerge(OpenApi.annotations({
|
|
98
|
+
title: "Disable API key rate limit",
|
|
99
|
+
summary: "Disable API key rate limiting",
|
|
100
|
+
description: "Disables rate-limit enforcement for an API key.",
|
|
18
101
|
})))
|
|
19
102
|
.add(HttpApiEndpoint.get("listUsers", "/admin/users", {
|
|
20
103
|
query: AdminListQuery,
|
package/dist/admin/schema.d.ts
CHANGED
|
@@ -35,6 +35,34 @@ export declare const AdminOrganization: Schema.Struct<{
|
|
|
35
35
|
export declare const AdminOrganizationIdParams: Schema.Struct<{
|
|
36
36
|
readonly id: Schema.String;
|
|
37
37
|
}>;
|
|
38
|
+
export declare const AdminApiKeyIdParams: Schema.Struct<{
|
|
39
|
+
readonly id: Schema.String;
|
|
40
|
+
}>;
|
|
41
|
+
export declare const AdminApiKey: Schema.Struct<{
|
|
42
|
+
readonly id: Schema.String;
|
|
43
|
+
readonly configId: Schema.String;
|
|
44
|
+
readonly name: Schema.NullOr<Schema.String>;
|
|
45
|
+
readonly start: Schema.NullOr<Schema.String>;
|
|
46
|
+
readonly referenceId: Schema.String;
|
|
47
|
+
readonly prefix: Schema.NullOr<Schema.String>;
|
|
48
|
+
readonly enabled: Schema.Boolean;
|
|
49
|
+
readonly rateLimitEnabled: Schema.Boolean;
|
|
50
|
+
readonly rateLimitTimeWindow: Schema.NullOr<Schema.Number>;
|
|
51
|
+
readonly rateLimitMax: Schema.NullOr<Schema.Number>;
|
|
52
|
+
readonly requestCount: Schema.Number;
|
|
53
|
+
readonly remaining: Schema.NullOr<Schema.Number>;
|
|
54
|
+
readonly lastRequest: Schema.NullOr<Schema.Date>;
|
|
55
|
+
readonly expiresAt: Schema.NullOr<Schema.Date>;
|
|
56
|
+
readonly createdAt: Schema.Date;
|
|
57
|
+
readonly updatedAt: Schema.Date;
|
|
58
|
+
}>;
|
|
59
|
+
export declare const AdminUpdateApiKeyPayload: Schema.Struct<{
|
|
60
|
+
readonly name: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
61
|
+
readonly enabled: Schema.optional<Schema.Boolean>;
|
|
62
|
+
readonly rateLimitEnabled: Schema.optional<Schema.Boolean>;
|
|
63
|
+
readonly rateLimitMax: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
64
|
+
readonly rateLimitTimeWindow: Schema.optional<Schema.NullOr<Schema.Number>>;
|
|
65
|
+
}>;
|
|
38
66
|
export declare const AdminCreateOrganizationPayload: Schema.Struct<{
|
|
39
67
|
readonly name: Schema.NonEmptyString;
|
|
40
68
|
readonly slug: Schema.NonEmptyString;
|
|
@@ -126,6 +154,8 @@ export declare const PaginatedAdminOrganizations: Schema.Struct<{
|
|
|
126
154
|
export type AdminListQuery = typeof AdminListQuery.Type;
|
|
127
155
|
export type AdminUser = typeof AdminUser.Type;
|
|
128
156
|
export type AdminOrganization = typeof AdminOrganization.Type;
|
|
157
|
+
export type AdminApiKey = typeof AdminApiKey.Type;
|
|
158
|
+
export type AdminUpdateApiKeyPayload = typeof AdminUpdateApiKeyPayload.Type;
|
|
129
159
|
export type AdminCreateOrganizationPayload = typeof AdminCreateOrganizationPayload.Type;
|
|
130
160
|
export type AdminUpdateOrganizationPayload = typeof AdminUpdateOrganizationPayload.Type;
|
|
131
161
|
export { ServerCreateDomainPayload, ServerDomain, ServerDomainIdParams, ServerDomainRecordsResponse, ServerUpdateDomainPayload, };
|
package/dist/admin/schema.js
CHANGED
|
@@ -74,6 +74,76 @@ export const AdminOrganizationIdParams = Schema.Struct({
|
|
|
74
74
|
description: "Path parameters used to identify an organization.",
|
|
75
75
|
examples: [{ id: "organization-id" }],
|
|
76
76
|
});
|
|
77
|
+
export const AdminApiKeyIdParams = Schema.Struct({
|
|
78
|
+
id: Schema.String,
|
|
79
|
+
}).annotate({
|
|
80
|
+
identifier: "AdminApiKeyIdParams",
|
|
81
|
+
title: "Admin API key ID params",
|
|
82
|
+
description: "Path parameters used to identify an API key.",
|
|
83
|
+
examples: [{ id: "api-key-id" }],
|
|
84
|
+
});
|
|
85
|
+
export const AdminApiKey = Schema.Struct({
|
|
86
|
+
id: Schema.String,
|
|
87
|
+
configId: Schema.String,
|
|
88
|
+
name: Schema.NullOr(Schema.String),
|
|
89
|
+
start: Schema.NullOr(Schema.String),
|
|
90
|
+
referenceId: Schema.String,
|
|
91
|
+
prefix: Schema.NullOr(Schema.String),
|
|
92
|
+
enabled: Schema.Boolean,
|
|
93
|
+
rateLimitEnabled: Schema.Boolean,
|
|
94
|
+
rateLimitTimeWindow: Schema.NullOr(Schema.Number),
|
|
95
|
+
rateLimitMax: Schema.NullOr(Schema.Number),
|
|
96
|
+
requestCount: Schema.Number,
|
|
97
|
+
remaining: Schema.NullOr(Schema.Number),
|
|
98
|
+
lastRequest: Schema.NullOr(Schema.Date),
|
|
99
|
+
expiresAt: Schema.NullOr(Schema.Date),
|
|
100
|
+
createdAt: Schema.Date,
|
|
101
|
+
updatedAt: Schema.Date,
|
|
102
|
+
}).annotate({
|
|
103
|
+
identifier: "AdminApiKey",
|
|
104
|
+
title: "Admin API key",
|
|
105
|
+
description: "API key metadata returned to administrators.",
|
|
106
|
+
examples: [
|
|
107
|
+
{
|
|
108
|
+
id: "api-key-id",
|
|
109
|
+
configId: "service",
|
|
110
|
+
name: "Production service",
|
|
111
|
+
start: "svc_1234",
|
|
112
|
+
referenceId: "user-id",
|
|
113
|
+
prefix: "svc_",
|
|
114
|
+
enabled: true,
|
|
115
|
+
rateLimitEnabled: true,
|
|
116
|
+
rateLimitTimeWindow: 86400000,
|
|
117
|
+
rateLimitMax: 10000,
|
|
118
|
+
requestCount: 0,
|
|
119
|
+
remaining: null,
|
|
120
|
+
lastRequest: null,
|
|
121
|
+
expiresAt: null,
|
|
122
|
+
createdAt: new Date("2026-01-01T00:00:00.000Z"),
|
|
123
|
+
updatedAt: new Date("2026-01-01T00:00:00.000Z"),
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
});
|
|
127
|
+
export const AdminUpdateApiKeyPayload = Schema.Struct({
|
|
128
|
+
name: Schema.optional(Schema.NullOr(Schema.String)),
|
|
129
|
+
enabled: Schema.optional(Schema.Boolean),
|
|
130
|
+
rateLimitEnabled: Schema.optional(Schema.Boolean),
|
|
131
|
+
rateLimitMax: Schema.optional(Schema.NullOr(Schema.Number)),
|
|
132
|
+
rateLimitTimeWindow: Schema.optional(Schema.NullOr(Schema.Number)),
|
|
133
|
+
}).annotate({
|
|
134
|
+
identifier: "AdminUpdateApiKeyPayload",
|
|
135
|
+
title: "Update API key payload",
|
|
136
|
+
description: "Payload used by administrators to update API key metadata and rate limits.",
|
|
137
|
+
examples: [
|
|
138
|
+
{
|
|
139
|
+
name: "Production service",
|
|
140
|
+
enabled: true,
|
|
141
|
+
rateLimitEnabled: true,
|
|
142
|
+
rateLimitMax: 10000,
|
|
143
|
+
rateLimitTimeWindow: 86400000,
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
});
|
|
77
147
|
export const AdminCreateOrganizationPayload = Schema.Struct({
|
|
78
148
|
name: Schema.NonEmptyString,
|
|
79
149
|
slug: Schema.NonEmptyString,
|
package/dist/api.d.ts
CHANGED
|
@@ -64,7 +64,17 @@ export declare const AuthServiceApi: HttpApi.HttpApi<"AuthServiceApi", import("e
|
|
|
64
64
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
65
65
|
readonly id: import("effect/Schema").String;
|
|
66
66
|
readonly key: import("effect/Schema").String;
|
|
67
|
-
}>>, 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 | typeof import("./extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"
|
|
67
|
+
}>>, 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 | typeof import("./extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getOrganizationPublicProfile", "GET", "/api/auth/organization-profile", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
68
|
+
readonly organizationId: import("effect/Schema").String;
|
|
69
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
70
|
+
readonly id: import("effect/Schema").String;
|
|
71
|
+
readonly name: import("effect/Schema").String;
|
|
72
|
+
readonly slug: import("effect/Schema").String;
|
|
73
|
+
readonly displayName: import("effect/Schema").String;
|
|
74
|
+
readonly contactEmail: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
75
|
+
readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
76
|
+
readonly icon: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
77
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, 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<{
|
|
68
78
|
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
69
79
|
readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
70
80
|
readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
@@ -371,7 +381,26 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
|
|
|
371
381
|
readonly users: import("effect/Schema").Number;
|
|
372
382
|
readonly organizations: import("effect/Schema").Number;
|
|
373
383
|
}>>;
|
|
374
|
-
}>>, 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<"
|
|
384
|
+
}>>, 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<"deleteApiKey", "DELETE", "/api/auth/admin/api-keys/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
385
|
+
readonly id: import("effect/Schema").String;
|
|
386
|
+
}>>, 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<{
|
|
387
|
+
readonly id: import("effect/Schema").String;
|
|
388
|
+
readonly configId: import("effect/Schema").String;
|
|
389
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
390
|
+
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
391
|
+
readonly referenceId: import("effect/Schema").String;
|
|
392
|
+
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
393
|
+
readonly enabled: import("effect/Schema").Boolean;
|
|
394
|
+
readonly rateLimitEnabled: import("effect/Schema").Boolean;
|
|
395
|
+
readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
396
|
+
readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
397
|
+
readonly requestCount: import("effect/Schema").Number;
|
|
398
|
+
readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
399
|
+
readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
400
|
+
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
401
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
402
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
403
|
+
}>>, 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<"deleteDomain", "DELETE", "/api/auth/admin/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
375
404
|
readonly id: import("effect/Schema").NonEmptyString;
|
|
376
405
|
}>>, 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<{
|
|
377
406
|
readonly id: import("effect/Schema").String;
|
|
@@ -398,6 +427,44 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
|
|
|
398
427
|
readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
399
428
|
readonly memberCount: import("effect/Schema").optional<import("effect/Schema").Number>;
|
|
400
429
|
readonly createdAt: import("effect/Schema").Date;
|
|
430
|
+
}>>, 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<"disableApiKeyRateLimit", "POST", "/api/auth/admin/api-keys/:id/disable-rate-limit", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
431
|
+
readonly id: import("effect/Schema").String;
|
|
432
|
+
}>>, 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<{
|
|
433
|
+
readonly id: import("effect/Schema").String;
|
|
434
|
+
readonly configId: import("effect/Schema").String;
|
|
435
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
436
|
+
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
437
|
+
readonly referenceId: import("effect/Schema").String;
|
|
438
|
+
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
439
|
+
readonly enabled: import("effect/Schema").Boolean;
|
|
440
|
+
readonly rateLimitEnabled: import("effect/Schema").Boolean;
|
|
441
|
+
readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
442
|
+
readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
443
|
+
readonly requestCount: import("effect/Schema").Number;
|
|
444
|
+
readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
445
|
+
readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
446
|
+
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
447
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
448
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
449
|
+
}>>, 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<"enableApiKeyRateLimit", "POST", "/api/auth/admin/api-keys/:id/enable-rate-limit", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
450
|
+
readonly id: import("effect/Schema").String;
|
|
451
|
+
}>>, 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<{
|
|
452
|
+
readonly id: import("effect/Schema").String;
|
|
453
|
+
readonly configId: import("effect/Schema").String;
|
|
454
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
455
|
+
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
456
|
+
readonly referenceId: import("effect/Schema").String;
|
|
457
|
+
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
458
|
+
readonly enabled: import("effect/Schema").Boolean;
|
|
459
|
+
readonly rateLimitEnabled: import("effect/Schema").Boolean;
|
|
460
|
+
readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
461
|
+
readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
462
|
+
readonly requestCount: import("effect/Schema").Number;
|
|
463
|
+
readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
464
|
+
readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
465
|
+
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
466
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
467
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
401
468
|
}>>, 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/auth/admin/domains/:id/records", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
402
469
|
readonly id: import("effect/Schema").NonEmptyString;
|
|
403
470
|
}>>, 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<{
|
|
@@ -406,7 +473,24 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
|
|
|
406
473
|
readonly type: import("effect/Schema").String;
|
|
407
474
|
readonly name: import("effect/Schema").String;
|
|
408
475
|
readonly value: import("effect/Schema").String;
|
|
409
|
-
}>>>, 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<"
|
|
476
|
+
}>>>, 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<"listApiKeys", "GET", "/api/auth/admin/api-keys", 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<{
|
|
477
|
+
readonly id: import("effect/Schema").String;
|
|
478
|
+
readonly configId: import("effect/Schema").String;
|
|
479
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
480
|
+
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
481
|
+
readonly referenceId: import("effect/Schema").String;
|
|
482
|
+
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
483
|
+
readonly enabled: import("effect/Schema").Boolean;
|
|
484
|
+
readonly rateLimitEnabled: import("effect/Schema").Boolean;
|
|
485
|
+
readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
486
|
+
readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
487
|
+
readonly requestCount: import("effect/Schema").Number;
|
|
488
|
+
readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
489
|
+
readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
490
|
+
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
491
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
492
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
493
|
+
}>>>, 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<"listDomains", "GET", "/api/auth/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<{
|
|
410
494
|
readonly id: import("effect/Schema").String;
|
|
411
495
|
readonly hostname: import("effect/Schema").String;
|
|
412
496
|
readonly rootHostname: import("effect/Schema").String;
|
|
@@ -475,7 +559,51 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
|
|
|
475
559
|
readonly total: import("effect/Schema").Int;
|
|
476
560
|
readonly pageCount: import("effect/Schema").Int;
|
|
477
561
|
}>;
|
|
478
|
-
}>>, 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<"
|
|
562
|
+
}>>, 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<"resetApiKeyRateLimit", "POST", "/api/auth/admin/api-keys/:id/reset-rate-limit", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
563
|
+
readonly id: import("effect/Schema").String;
|
|
564
|
+
}>>, 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<{
|
|
565
|
+
readonly id: import("effect/Schema").String;
|
|
566
|
+
readonly configId: import("effect/Schema").String;
|
|
567
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
568
|
+
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
569
|
+
readonly referenceId: import("effect/Schema").String;
|
|
570
|
+
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
571
|
+
readonly enabled: import("effect/Schema").Boolean;
|
|
572
|
+
readonly rateLimitEnabled: import("effect/Schema").Boolean;
|
|
573
|
+
readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
574
|
+
readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
575
|
+
readonly requestCount: import("effect/Schema").Number;
|
|
576
|
+
readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
577
|
+
readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
578
|
+
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
579
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
580
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
581
|
+
}>>, 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<"updateApiKey", "PATCH", "/api/auth/admin/api-keys/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
582
|
+
readonly id: import("effect/Schema").String;
|
|
583
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
584
|
+
readonly name: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
585
|
+
readonly enabled: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
586
|
+
readonly rateLimitEnabled: import("effect/Schema").optional<import("effect/Schema").Boolean>;
|
|
587
|
+
readonly rateLimitMax: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
|
|
588
|
+
readonly rateLimitTimeWindow: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
|
|
589
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
590
|
+
readonly id: import("effect/Schema").String;
|
|
591
|
+
readonly configId: import("effect/Schema").String;
|
|
592
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
593
|
+
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
594
|
+
readonly referenceId: import("effect/Schema").String;
|
|
595
|
+
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
596
|
+
readonly enabled: import("effect/Schema").Boolean;
|
|
597
|
+
readonly rateLimitEnabled: import("effect/Schema").Boolean;
|
|
598
|
+
readonly rateLimitTimeWindow: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
599
|
+
readonly rateLimitMax: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
600
|
+
readonly requestCount: import("effect/Schema").Number;
|
|
601
|
+
readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
|
|
602
|
+
readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
603
|
+
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
604
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
605
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
606
|
+
}>>, 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<"updateDomain", "PATCH", "/api/auth/admin/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
479
607
|
readonly id: import("effect/Schema").NonEmptyString;
|
|
480
608
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
481
609
|
readonly hostname: import("effect/Schema").NonEmptyString;
|
|
@@ -577,7 +705,17 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
|
|
|
577
705
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
578
706
|
readonly id: import("effect/Schema").String;
|
|
579
707
|
readonly key: import("effect/Schema").String;
|
|
580
|
-
}>>, 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 | typeof import("./extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"
|
|
708
|
+
}>>, 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 | typeof import("./extra/schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getOrganizationPublicProfile", "GET", "/api/auth/organization-profile", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
709
|
+
readonly organizationId: import("effect/Schema").String;
|
|
710
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
711
|
+
readonly id: import("effect/Schema").String;
|
|
712
|
+
readonly name: import("effect/Schema").String;
|
|
713
|
+
readonly slug: import("effect/Schema").String;
|
|
714
|
+
readonly displayName: import("effect/Schema").String;
|
|
715
|
+
readonly contactEmail: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
716
|
+
readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
717
|
+
readonly icon: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
718
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, 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<{
|
|
581
719
|
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
582
720
|
readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
583
721
|
readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
|