@krak-stack/auth 0.1.56 → 0.1.57

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.
@@ -88,6 +88,7 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
88
88
  readonly remaining: Schema.NullOr<Schema.Number>;
89
89
  readonly lastRequest: Schema.NullOr<Schema.Date>;
90
90
  readonly expiresAt: Schema.NullOr<Schema.Date>;
91
+ readonly referrers: Schema.$Array<Schema.String>;
91
92
  readonly createdAt: Schema.Date;
92
93
  readonly updatedAt: Schema.Date;
93
94
  }>>, 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<{
@@ -146,6 +147,7 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
146
147
  readonly remaining: Schema.NullOr<Schema.Number>;
147
148
  readonly lastRequest: Schema.NullOr<Schema.Date>;
148
149
  readonly expiresAt: Schema.NullOr<Schema.Date>;
150
+ readonly referrers: Schema.$Array<Schema.String>;
149
151
  readonly createdAt: Schema.Date;
150
152
  readonly updatedAt: Schema.Date;
151
153
  }>>, 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<{
@@ -165,6 +167,7 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
165
167
  readonly remaining: Schema.NullOr<Schema.Number>;
166
168
  readonly lastRequest: Schema.NullOr<Schema.Date>;
167
169
  readonly expiresAt: Schema.NullOr<Schema.Date>;
170
+ readonly referrers: Schema.$Array<Schema.String>;
168
171
  readonly createdAt: Schema.Date;
169
172
  readonly updatedAt: Schema.Date;
170
173
  }>>, 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<{
@@ -190,6 +193,7 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
190
193
  readonly remaining: Schema.NullOr<Schema.Number>;
191
194
  readonly lastRequest: Schema.NullOr<Schema.Date>;
192
195
  readonly expiresAt: Schema.NullOr<Schema.Date>;
196
+ readonly referrers: Schema.$Array<Schema.String>;
193
197
  readonly createdAt: Schema.Date;
194
198
  readonly updatedAt: Schema.Date;
195
199
  }>>>, 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<{
@@ -300,6 +304,7 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
300
304
  readonly remaining: Schema.NullOr<Schema.Number>;
301
305
  readonly lastRequest: Schema.NullOr<Schema.Date>;
302
306
  readonly expiresAt: Schema.NullOr<Schema.Date>;
307
+ readonly referrers: Schema.$Array<Schema.String>;
303
308
  readonly createdAt: Schema.Date;
304
309
  readonly updatedAt: Schema.Date;
305
310
  }>>, 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<{
@@ -310,6 +315,7 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
310
315
  readonly rateLimitEnabled: Schema.optional<Schema.Boolean>;
311
316
  readonly rateLimitMax: Schema.optional<Schema.NullOr<Schema.Number>>;
312
317
  readonly rateLimitTimeWindow: Schema.optional<Schema.NullOr<Schema.Number>>;
318
+ readonly referrers: Schema.optional<Schema.$Array<Schema.String>>;
313
319
  }>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
314
320
  readonly id: Schema.String;
315
321
  readonly configId: Schema.String;
@@ -325,6 +331,7 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
325
331
  readonly remaining: Schema.NullOr<Schema.Number>;
326
332
  readonly lastRequest: Schema.NullOr<Schema.Date>;
327
333
  readonly expiresAt: Schema.NullOr<Schema.Date>;
334
+ readonly referrers: Schema.$Array<Schema.String>;
328
335
  readonly createdAt: Schema.Date;
329
336
  readonly updatedAt: Schema.Date;
330
337
  }>>, 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<{
@@ -55,7 +55,7 @@ export const AdminApiGroup = HttpApiGroup.make("admin")
55
55
  }).annotateMerge(OpenApi.annotations({
56
56
  title: "Update API key",
57
57
  summary: "Update an API key",
58
- description: "Updates API key metadata and rate-limit settings for authenticated administrators.",
58
+ description: "Updates API key metadata, referrer restrictions, and rate-limit settings for authenticated administrators.",
59
59
  })))
60
60
  .add(HttpApiEndpoint.post("resetApiKeyRateLimit", "/admin/api-keys/:id/reset-rate-limit", {
61
61
  params: AdminApiKeyIdParams,
@@ -90,6 +90,7 @@ export declare const AdminApiKey: Schema.Struct<{
90
90
  readonly remaining: Schema.NullOr<Schema.Number>;
91
91
  readonly lastRequest: Schema.NullOr<Schema.Date>;
92
92
  readonly expiresAt: Schema.NullOr<Schema.Date>;
93
+ readonly referrers: Schema.$Array<Schema.String>;
93
94
  readonly createdAt: Schema.Date;
94
95
  readonly updatedAt: Schema.Date;
95
96
  }>;
@@ -99,6 +100,7 @@ export declare const AdminUpdateApiKeyPayload: Schema.Struct<{
99
100
  readonly rateLimitEnabled: Schema.optional<Schema.Boolean>;
100
101
  readonly rateLimitMax: Schema.optional<Schema.NullOr<Schema.Number>>;
101
102
  readonly rateLimitTimeWindow: Schema.optional<Schema.NullOr<Schema.Number>>;
103
+ readonly referrers: Schema.optional<Schema.$Array<Schema.String>>;
102
104
  }>;
103
105
  export declare const AdminCreateOrganizationPayload: Schema.Struct<{
104
106
  readonly name: Schema.NonEmptyString;
@@ -136,6 +136,7 @@ export const AdminApiKey = Schema.Struct({
136
136
  remaining: Schema.NullOr(Schema.Number),
137
137
  lastRequest: Schema.NullOr(Schema.Date),
138
138
  expiresAt: Schema.NullOr(Schema.Date),
139
+ referrers: Schema.Array(Schema.String),
139
140
  createdAt: Schema.Date,
140
141
  updatedAt: Schema.Date,
141
142
  }).annotate({
@@ -158,6 +159,7 @@ export const AdminApiKey = Schema.Struct({
158
159
  remaining: null,
159
160
  lastRequest: null,
160
161
  expiresAt: null,
162
+ referrers: ["https://app.example.com"],
161
163
  createdAt: new Date("2026-01-01T00:00:00.000Z"),
162
164
  updatedAt: new Date("2026-01-01T00:00:00.000Z"),
163
165
  },
@@ -169,6 +171,7 @@ export const AdminUpdateApiKeyPayload = Schema.Struct({
169
171
  rateLimitEnabled: Schema.optional(Schema.Boolean),
170
172
  rateLimitMax: Schema.optional(Schema.NullOr(Schema.Number)),
171
173
  rateLimitTimeWindow: Schema.optional(Schema.NullOr(Schema.Number)),
174
+ referrers: Schema.optional(Schema.Array(Schema.String)),
172
175
  }).annotate({
173
176
  identifier: "AdminUpdateApiKeyPayload",
174
177
  title: "Update API key payload",
@@ -180,6 +183,7 @@ export const AdminUpdateApiKeyPayload = Schema.Struct({
180
183
  rateLimitEnabled: true,
181
184
  rateLimitMax: 10000,
182
185
  rateLimitTimeWindow: 86400000,
186
+ referrers: ["https://app.example.com"],
183
187
  },
184
188
  ],
185
189
  });
package/dist/api.d.ts CHANGED
@@ -61,6 +61,7 @@ export declare const AuthServiceApi: HttpApi.HttpApi<"AuthServiceApi", import("e
61
61
  readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
62
62
  readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
63
63
  readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
64
+ readonly referrers: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
64
65
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
65
66
  readonly id: import("effect/Schema").String;
66
67
  readonly key: import("effect/Schema").String;
@@ -598,6 +599,7 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
598
599
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
599
600
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
600
601
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
602
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
601
603
  readonly createdAt: import("effect/Schema").Date;
602
604
  readonly updatedAt: import("effect/Schema").Date;
603
605
  }>>, 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<{
@@ -656,6 +658,7 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
656
658
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
657
659
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
658
660
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
661
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
659
662
  readonly createdAt: import("effect/Schema").Date;
660
663
  readonly updatedAt: import("effect/Schema").Date;
661
664
  }>>, 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<{
@@ -675,6 +678,7 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
675
678
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
676
679
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
677
680
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
681
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
678
682
  readonly createdAt: import("effect/Schema").Date;
679
683
  readonly updatedAt: import("effect/Schema").Date;
680
684
  }>>, 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<{
@@ -700,6 +704,7 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
700
704
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
701
705
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
702
706
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
707
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
703
708
  readonly createdAt: import("effect/Schema").Date;
704
709
  readonly updatedAt: import("effect/Schema").Date;
705
710
  }>>>, 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<{
@@ -810,6 +815,7 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
810
815
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
811
816
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
812
817
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
818
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
813
819
  readonly createdAt: import("effect/Schema").Date;
814
820
  readonly updatedAt: import("effect/Schema").Date;
815
821
  }>>, 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<{
@@ -820,6 +826,7 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
820
826
  readonly rateLimitEnabled: import("effect/Schema").optional<import("effect/Schema").Boolean>;
821
827
  readonly rateLimitMax: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
822
828
  readonly rateLimitTimeWindow: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
829
+ readonly referrers: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
823
830
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
824
831
  readonly id: import("effect/Schema").String;
825
832
  readonly configId: import("effect/Schema").String;
@@ -835,6 +842,7 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
835
842
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
836
843
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
837
844
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
845
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
838
846
  readonly createdAt: import("effect/Schema").Date;
839
847
  readonly updatedAt: import("effect/Schema").Date;
840
848
  }>>, 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<{
@@ -949,6 +957,7 @@ export declare const AuthClientApi: HttpApi.HttpApi<"AuthClientApi", import("eff
949
957
  readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
950
958
  readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
951
959
  readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
960
+ readonly referrers: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
952
961
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
953
962
  readonly id: import("effect/Schema").String;
954
963
  readonly key: import("effect/Schema").String;
@@ -0,0 +1,20 @@
1
+ import type { ApiKey } from "@better-auth/api-key/client";
2
+ import type { AuthUiClient } from "./auth-client";
3
+ type ApiKeySummary = Omit<ApiKey, "key">;
4
+ export type ApiKeyEditMessages = {
5
+ enabled: string;
6
+ name: string;
7
+ referrers: string;
8
+ referrersDescription: string;
9
+ referrersError: string;
10
+ referrersPlaceholder: string;
11
+ updateError: string;
12
+ };
13
+ export declare const ApiKeyEditForm: ({ authClient, configId, keyData, messages, onSaved, }: {
14
+ authClient: AuthUiClient;
15
+ configId: "organization" | "user";
16
+ keyData: ApiKeySummary;
17
+ messages: ApiKeyEditMessages;
18
+ onSaved: () => void;
19
+ }) => import("react").JSX.Element;
20
+ export {};
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useAtomSet, useAtomValue } from "@effect/atom-react";
3
+ import { FormBuilder, FormReact } from "@lucas-barake/effect-form-react";
4
+ import { Effect, Schema } from "effect";
5
+ import { useState } from "react";
6
+ import { CheckboxField, SubmitButton, SubmitError, TextAreaField, TextField, } from "@/components/ui/effect-form";
7
+ import { parseApiKeyReferrers } from "./api-key";
8
+ import { apiKeyReferrers, withApiKeyReferrers } from "./api-key-referrers";
9
+ const editApiKeyFormBuilder = FormBuilder.empty
10
+ .addField("name", Schema.NonEmptyString)
11
+ .addField("enabled", Schema.Boolean)
12
+ .addField("referrers", Schema.String);
13
+ export const ApiKeyEditForm = ({ authClient, configId, keyData, messages, onSaved, }) => {
14
+ const [form] = useState(() => FormReact.make(editApiKeyFormBuilder, {
15
+ fields: {
16
+ name: TextField,
17
+ enabled: CheckboxField,
18
+ referrers: TextAreaField,
19
+ },
20
+ mode: { validation: "onSubmit" },
21
+ onSubmit: (_, { decoded }) => Effect.tryPromise({
22
+ try: async () => {
23
+ const referrers = parseApiKeyReferrers(decoded.referrers, messages.referrersError);
24
+ const result = await authClient.apiKey.update({
25
+ configId,
26
+ keyId: keyData.id,
27
+ name: decoded.name.trim(),
28
+ enabled: decoded.enabled,
29
+ metadata: withApiKeyReferrers(keyData.metadata, referrers),
30
+ });
31
+ if (result.error) {
32
+ throw new Error(result.error.message ?? messages.updateError);
33
+ }
34
+ onSaved();
35
+ },
36
+ catch: (cause) => cause instanceof Error ? cause : new Error(messages.updateError),
37
+ }),
38
+ }));
39
+ const submit = useAtomSet(form.submit);
40
+ const submitResult = useAtomValue(form.submit);
41
+ return (_jsx("section", { className: "w-full", children: _jsx(form.Initialize, { defaultValues: {
42
+ name: keyData.name ?? "",
43
+ enabled: keyData.enabled,
44
+ referrers: apiKeyReferrers(keyData.metadata).join("\n"),
45
+ }, children: _jsxs("form", { className: "flex flex-col gap-4", onSubmit: (event) => {
46
+ event.preventDefault();
47
+ event.stopPropagation();
48
+ submit();
49
+ }, children: [_jsx(form.name, { label: messages.name, required: true }), _jsx(form.enabled, { label: messages.enabled }), _jsx(form.referrers, { label: messages.referrers, description: messages.referrersDescription, placeholder: messages.referrersPlaceholder, rows: 3 }), _jsx(SubmitError, { result: submitResult }), _jsx(SubmitButton, { form: form })] }) }) }));
50
+ };
@@ -0,0 +1,18 @@
1
+ import type { ApiKey } from "@better-auth/api-key/client";
2
+ type ApiKeyRateLimitMessages = {
3
+ disabled: string;
4
+ none: string;
5
+ unlimited: string;
6
+ usage: string;
7
+ windowDays: (count: number) => string;
8
+ windowHours: (count: number) => string;
9
+ windowMinutes: (count: number) => string;
10
+ windowSeconds: (count: number) => string;
11
+ };
12
+ type ApiKeyRateLimitValue = Pick<ApiKey, "rateLimitEnabled" | "rateLimitMax" | "rateLimitTimeWindow" | "requestCount">;
13
+ export declare const apiKeyUsagePercent: (keyData: ApiKeyRateLimitValue) => number;
14
+ export declare const ApiKeyRateLimit: ({ keyData, messages, }: {
15
+ keyData: ApiKeyRateLimitValue;
16
+ messages: ApiKeyRateLimitMessages;
17
+ }) => import("react").JSX.Element;
18
+ export {};
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Badge } from "@/components/ui/badge";
3
+ export const apiKeyUsagePercent = (keyData) => {
4
+ if (!keyData.rateLimitMax)
5
+ return 0;
6
+ return Math.min(100, Math.round((keyData.requestCount / keyData.rateLimitMax) * 100));
7
+ };
8
+ const formatWindow = (value, messages) => {
9
+ if (!value)
10
+ return messages.none;
11
+ const seconds = Math.round(value / 1000);
12
+ if (seconds % 86400 === 0)
13
+ return messages.windowDays(seconds / 86400);
14
+ if (seconds % 3600 === 0)
15
+ return messages.windowHours(seconds / 3600);
16
+ if (seconds % 60 === 0)
17
+ return messages.windowMinutes(seconds / 60);
18
+ return messages.windowSeconds(seconds);
19
+ };
20
+ export const ApiKeyRateLimit = ({ keyData, messages, }) => {
21
+ if (!keyData.rateLimitEnabled) {
22
+ return _jsx(Badge, { variant: "secondary", children: messages.disabled });
23
+ }
24
+ if (!keyData.rateLimitMax) {
25
+ return (_jsx("span", { className: "text-muted-foreground text-sm", children: messages.unlimited }));
26
+ }
27
+ const percent = apiKeyUsagePercent(keyData);
28
+ return (_jsxs("div", { className: "min-w-28 space-y-1", children: [_jsxs("div", { className: "text-muted-foreground flex justify-between gap-2 text-xs", children: [_jsxs("span", { children: [keyData.requestCount, "/", keyData.rateLimitMax] }), _jsxs("span", { children: [percent, "%"] })] }), _jsx("div", { "aria-label": messages.usage, "aria-valuemax": 100, "aria-valuemin": 0, "aria-valuenow": percent, className: "bg-muted h-2 overflow-hidden rounded-full", role: "progressbar", children: _jsx("div", { className: "bg-primary h-full rounded-full transition-[width]", style: { width: `${percent}%` } }) }), _jsx("p", { className: "text-muted-foreground text-xs", children: formatWindow(keyData.rateLimitTimeWindow, messages) })] }));
29
+ };
@@ -0,0 +1,8 @@
1
+ export declare const apiKeyReferrers: (metadata: unknown) => never[] | readonly string[];
2
+ export declare const withApiKeyReferrers: (metadata: unknown, referrers: ReadonlyArray<string>) => {
3
+ allowedOrigins: string[];
4
+ };
5
+ export declare const ApiKeyReferrers: ({ metadata, unrestrictedLabel, }: {
6
+ metadata: unknown;
7
+ unrestrictedLabel: string;
8
+ }) => import("react").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Option, Schema } from "effect";
3
+ import { Badge } from "@/components/ui/badge";
4
+ const Metadata = Schema.Record(Schema.String, Schema.Unknown);
5
+ const MetadataJson = Schema.fromJsonString(Metadata);
6
+ const Referrers = Schema.Array(Schema.String);
7
+ const apiKeyMetadata = (metadata) => {
8
+ const decodedMetadata = typeof metadata === "string"
9
+ ? Schema.decodeUnknownOption(MetadataJson)(metadata)
10
+ : Schema.decodeUnknownOption(Metadata)(metadata);
11
+ return Option.getOrElse(decodedMetadata, () => ({}));
12
+ };
13
+ export const apiKeyReferrers = (metadata) => Option.getOrElse(Schema.decodeUnknownOption(Referrers)(apiKeyMetadata(metadata).allowedOrigins), () => []);
14
+ export const withApiKeyReferrers = (metadata, referrers) => ({
15
+ ...apiKeyMetadata(metadata),
16
+ allowedOrigins: Array.from(referrers),
17
+ });
18
+ export const ApiKeyReferrers = ({ metadata, unrestrictedLabel, }) => {
19
+ const referrers = apiKeyReferrers(metadata);
20
+ if (referrers.length === 0) {
21
+ return (_jsx("span", { className: "text-muted-foreground text-sm", children: unrestrictedLabel }));
22
+ }
23
+ return (_jsx("div", { className: "flex max-w-sm flex-wrap gap-1.5", children: referrers.map((referrer) => (_jsx(Badge, { variant: "secondary", children: referrer }, referrer))) }));
24
+ };
@@ -1,4 +1,5 @@
1
1
  import { ExtraCreateApiKeyPayload, ExtraCreateApiKeyResponse } from "../extra/schema";
2
2
  export type CreateApiKeyPayload = typeof ExtraCreateApiKeyPayload.Type;
3
3
  export type CreatedApiKey = typeof ExtraCreateApiKeyResponse.Type;
4
+ export declare const parseApiKeyReferrers: (value: string, errorMessage: string) => string[];
4
5
  export declare const createApiKey: (payload: CreateApiKeyPayload, fallbackError: string) => Promise<CreatedApiKey>;
@@ -1,5 +1,24 @@
1
- import { Schema } from "effect";
1
+ import { Option, Schema } from "effect";
2
2
  import { ExtraCreateApiKeyPayload, ExtraCreateApiKeyResponse, } from "../extra/schema";
3
+ const decodeUrl = Schema.decodeUnknownOption(Schema.URLFromString);
4
+ export const parseApiKeyReferrers = (value, errorMessage) => {
5
+ const referrers = value
6
+ .split(/[\n,]+/)
7
+ .map((item) => item.trim())
8
+ .filter(Boolean)
9
+ .map((item) => {
10
+ const decoded = decodeUrl(item);
11
+ if (Option.isNone(decoded)) {
12
+ throw new Error(errorMessage.replace("{referrer}", item));
13
+ }
14
+ const url = decoded.value;
15
+ if (url.protocol !== "http:" && url.protocol !== "https:") {
16
+ throw new Error(errorMessage.replace("{referrer}", item));
17
+ }
18
+ return url.origin;
19
+ });
20
+ return Array.from(new Set(referrers));
21
+ };
3
22
  const ErrorResponse = Schema.Struct({ message: Schema.String });
4
23
  const errorMessage = async (value, fallback) => Schema.decodeUnknownPromise(ErrorResponse)(value)
5
24
  .then((error) => error.message)
@@ -86,6 +86,7 @@ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpAp
86
86
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
87
87
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
88
88
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
89
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
89
90
  readonly createdAt: import("effect/Schema").Date;
90
91
  readonly updatedAt: import("effect/Schema").Date;
91
92
  }>>, 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<{
@@ -144,6 +145,7 @@ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpAp
144
145
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
145
146
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
146
147
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
148
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
147
149
  readonly createdAt: import("effect/Schema").Date;
148
150
  readonly updatedAt: import("effect/Schema").Date;
149
151
  }>>, 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<{
@@ -163,6 +165,7 @@ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpAp
163
165
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
164
166
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
165
167
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
168
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
166
169
  readonly createdAt: import("effect/Schema").Date;
167
170
  readonly updatedAt: import("effect/Schema").Date;
168
171
  }>>, 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<{
@@ -188,6 +191,7 @@ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpAp
188
191
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
189
192
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
190
193
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
194
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
191
195
  readonly createdAt: import("effect/Schema").Date;
192
196
  readonly updatedAt: import("effect/Schema").Date;
193
197
  }>>>, 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<{
@@ -298,6 +302,7 @@ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpAp
298
302
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
299
303
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
300
304
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
305
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
301
306
  readonly createdAt: import("effect/Schema").Date;
302
307
  readonly updatedAt: import("effect/Schema").Date;
303
308
  }>>, 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<{
@@ -308,6 +313,7 @@ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpAp
308
313
  readonly rateLimitEnabled: import("effect/Schema").optional<import("effect/Schema").Boolean>;
309
314
  readonly rateLimitMax: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
310
315
  readonly rateLimitTimeWindow: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").Number>>;
316
+ readonly referrers: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
311
317
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
312
318
  readonly id: import("effect/Schema").String;
313
319
  readonly configId: import("effect/Schema").String;
@@ -323,6 +329,7 @@ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpAp
323
329
  readonly remaining: import("effect/Schema").NullOr<import("effect/Schema").Number>;
324
330
  readonly lastRequest: import("effect/Schema").NullOr<import("effect/Schema").Date>;
325
331
  readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
332
+ readonly referrers: import("effect/Schema").$Array<import("effect/Schema").String>;
326
333
  readonly createdAt: import("effect/Schema").Date;
327
334
  readonly updatedAt: import("effect/Schema").Date;
328
335
  }>>, 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<{
@@ -437,6 +444,7 @@ export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpAp
437
444
  readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
438
445
  readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
439
446
  readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
447
+ readonly referrers: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").String>>;
440
448
  }>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
441
449
  readonly id: import("effect/Schema").String;
442
450
  readonly key: import("effect/Schema").String;
@@ -3,7 +3,7 @@ import { DropdownMenuContent } from "@/components/ui/dropdown-menu";
3
3
  import type { AuthUiClient } from "./auth-client";
4
4
  declare const messages: {
5
5
  readonly en: {
6
- readonly api_key_rate_limit_notice: "API keys are subject to the same rate limits as your account.";
6
+ readonly organization_back: "Back";
7
7
  readonly organization_contact: "Contact methods";
8
8
  readonly organization_contact_add_email: "Add email";
9
9
  readonly organization_contact_add_phone: "Add phone";
@@ -75,6 +75,7 @@ declare const messages: {
75
75
  readonly organization_member_role_error: "Could not update the member role.";
76
76
  readonly organization_member_user: "User";
77
77
  readonly organization_members_description: "Review active members, update roles, and remove access when needed.";
78
+ readonly organization_members_dialog_description: "Manage members and invitations for {name}.";
78
79
  readonly organization_members_empty: "No members found.";
79
80
  readonly organization_members_heading: "Organization members";
80
81
  readonly organization_members_load_error: "Could not load organization members.";
@@ -95,24 +96,47 @@ declare const messages: {
95
96
  readonly organization_translation_name: "Name";
96
97
  readonly organization_update_error: "Could not update the organization.";
97
98
  readonly table_empty: "No results.";
99
+ readonly user_api_key_back: "Back";
100
+ readonly user_api_key_create_description: "Configure a new API key for this organization.";
98
101
  readonly user_api_key_create_error: "Could not create the API key.";
102
+ readonly user_api_key_create_title: "Create API key";
103
+ readonly user_api_key_copied: "Copied";
104
+ readonly user_api_key_copy: "Copy";
99
105
  readonly user_api_key_created_description: "Copy this key now. You will not be able to see it again.";
100
106
  readonly user_api_key_created_title: "API key created";
101
107
  readonly user_api_key_delete_error: "Could not delete the API key.";
102
108
  readonly user_api_key_disabled: "Disabled";
109
+ readonly user_api_key_edit_description: "Update the key name, status, and allowed referrers.";
110
+ readonly user_api_key_edit_title: "Edit API key";
103
111
  readonly user_api_key_enabled: "Enabled";
104
112
  readonly user_api_key_hidden: "Secret hidden";
105
113
  readonly user_api_key_name: "Key name";
114
+ readonly user_api_key_rate_limit: "Rate limit";
115
+ readonly user_api_key_referrers: "Allowed referrers (optional)";
116
+ readonly user_api_key_referrers_any: "Any referrer";
117
+ readonly user_api_key_referrers_column: "Referrers";
118
+ readonly user_api_key_referrers_description: "Enter any number of URLs, separated by commas or new lines. Leave empty to allow any referrer.";
119
+ readonly user_api_key_referrers_error: "{referrer} is not a valid HTTP(S) URL.";
120
+ readonly user_api_key_referrers_placeholder: "https://app.example.com\nhttps://admin.example.com";
106
121
  readonly user_api_key_starts_with: "Starts with {start}";
107
122
  readonly user_api_key_status: "Status";
123
+ readonly user_api_key_unlimited: "Unlimited";
124
+ readonly user_api_key_update_error: "Could not update the API key.";
125
+ readonly user_api_key_usage: "API key usage";
126
+ readonly user_api_key_window_days: "{count}d";
127
+ readonly user_api_key_window_hours: "{count}h";
128
+ readonly user_api_key_window_minutes: "{count}m";
129
+ readonly user_api_key_window_none: "None";
130
+ readonly user_api_key_window_seconds: "{count}s";
108
131
  readonly user_api_keys_load_error: "Could not load API keys.";
132
+ readonly user_api_keys_organization_description: "Create and manage API keys for {name}.";
109
133
  readonly user_api_keys_title: "API keys";
110
134
  readonly user_button_api_keys: "API keys";
111
135
  readonly user_delete: "Delete";
112
136
  readonly user_loading: "Loading...";
113
137
  };
114
138
  readonly fr: {
115
- readonly api_key_rate_limit_notice: "Les clés API sont soumises aux mêmes limites de débit que votre compte.";
139
+ readonly organization_back: "Retour";
116
140
  readonly organization_contact: "Moyens de contact";
117
141
  readonly organization_contact_add_email: "Ajouter un courriel";
118
142
  readonly organization_contact_add_phone: "Ajouter un téléphone";
@@ -184,6 +208,7 @@ declare const messages: {
184
208
  readonly organization_member_role_error: "Impossible de modifier le rôle du membre.";
185
209
  readonly organization_member_user: "Utilisateur";
186
210
  readonly organization_members_description: "Consultez les membres actifs, modifiez les rôles et retirez les accès au besoin.";
211
+ readonly organization_members_dialog_description: "Gérez les membres et les invitations de {name}.";
187
212
  readonly organization_members_empty: "Aucun membre trouvé.";
188
213
  readonly organization_members_heading: "Membres de l'organisation";
189
214
  readonly organization_members_load_error: "Impossible de charger les membres de l'organisation.";
@@ -204,17 +229,40 @@ declare const messages: {
204
229
  readonly organization_translation_name: "Nom";
205
230
  readonly organization_update_error: "Impossible de mettre à jour l'organisation.";
206
231
  readonly table_empty: "Aucun résultat.";
232
+ readonly user_api_key_back: "Retour";
233
+ readonly user_api_key_create_description: "Configurez une nouvelle clé API pour cette organisation.";
207
234
  readonly user_api_key_create_error: "Impossible de créer la clé API.";
235
+ readonly user_api_key_create_title: "Créer une clé API";
236
+ readonly user_api_key_copied: "Copié";
237
+ readonly user_api_key_copy: "Copier";
208
238
  readonly user_api_key_created_description: "Copiez cette clé maintenant. Vous ne pourrez plus la voir.";
209
239
  readonly user_api_key_created_title: "Clé API créée";
210
240
  readonly user_api_key_delete_error: "Impossible de supprimer la clé API.";
211
241
  readonly user_api_key_disabled: "Désactivée";
242
+ readonly user_api_key_edit_description: "Mettez à jour le nom, le statut et les référents autorisés de la clé.";
243
+ readonly user_api_key_edit_title: "Modifier la clé API";
212
244
  readonly user_api_key_enabled: "Activée";
213
245
  readonly user_api_key_hidden: "Secret masqué";
214
246
  readonly user_api_key_name: "Nom de la clé";
247
+ readonly user_api_key_rate_limit: "Limite de débit";
248
+ readonly user_api_key_referrers: "Référents autorisés (facultatifs)";
249
+ readonly user_api_key_referrers_any: "Tout référent";
250
+ readonly user_api_key_referrers_column: "Référents";
251
+ readonly user_api_key_referrers_description: "Saisissez autant d'URL que nécessaire, séparées par des virgules ou des sauts de ligne. Laissez vide pour autoriser tout référent.";
252
+ readonly user_api_key_referrers_error: "{referrer} n'est pas une URL HTTP(S) valide.";
253
+ readonly user_api_key_referrers_placeholder: "https://app.example.com\nhttps://admin.example.com";
215
254
  readonly user_api_key_starts_with: "Commence par {start}";
216
255
  readonly user_api_key_status: "Statut";
256
+ readonly user_api_key_unlimited: "Illimitée";
257
+ readonly user_api_key_update_error: "Impossible de mettre à jour la clé API.";
258
+ readonly user_api_key_usage: "Utilisation de la clé API";
259
+ readonly user_api_key_window_days: "{count} j";
260
+ readonly user_api_key_window_hours: "{count} h";
261
+ readonly user_api_key_window_minutes: "{count} min";
262
+ readonly user_api_key_window_none: "Aucune";
263
+ readonly user_api_key_window_seconds: "{count} s";
217
264
  readonly user_api_keys_load_error: "Impossible de charger les clés API.";
265
+ readonly user_api_keys_organization_description: "Créez et gérez les clés API de {name}.";
218
266
  readonly user_api_keys_title: "Clés API";
219
267
  readonly user_button_api_keys: "Clés API";
220
268
  readonly user_delete: "Supprimer";