@krak-stack/auth 0.2.17 → 0.2.19
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/README.md +34 -0
- package/dist/admin/api.group.d.ts +19 -13
- package/dist/admin/api.group.js +1 -1
- package/dist/admin/schema.d.ts +9 -7
- package/dist/admin/schema.js +1 -2
- package/dist/api.d.ts +161 -155
- package/dist/api.js +1 -1
- package/dist/auth/api.group.d.ts +1 -1
- package/dist/auth/api.group.js +1 -1
- package/dist/auth/schema.js +1 -1
- package/dist/components/admin-organization-form.js +1 -1
- package/dist/components/admin-organizations.js +5 -25
- package/dist/components/admin-users.js +5 -25
- package/dist/components/associated-projects-notice.js +1 -1
- package/dist/components/auth-atoms.d.ts +1 -1
- package/dist/components/auth-atoms.js +1 -1
- package/dist/components/auth-client-api.d.ts +117 -111
- package/dist/components/auth-client-api.js +3 -3
- package/dist/components/auth-forms.js +2 -2
- package/dist/components/auth-provider.d.ts +1 -1
- package/dist/components/auth-provider.js +2 -2
- package/dist/components/member-required.js +1 -1
- package/dist/components/organization-switcher.js +1 -1
- package/dist/components/user-button.js +1 -1
- package/dist/config.js +2 -2
- package/dist/extra/api.group.d.ts +3 -3
- package/dist/extra/api.group.js +2 -2
- package/dist/extra/schema.d.ts +2 -2
- package/dist/extra/schema.js +2 -2
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/server/actor.d.ts +1 -1
- package/dist/server/actor.js +1 -1
- package/dist/server/api.group.d.ts +1 -1
- package/dist/server/api.group.js +2 -2
- package/dist/server/middleware.d.ts +2 -2
- package/dist/server/middleware.js +2 -2
- package/dist/server/proxy.d.ts +4 -2
- package/dist/server/proxy.js +12 -3
- package/dist/service.d.ts +141 -141
- package/dist/service.js +3 -3
- package/package.json +7 -11
- package/patches/@lucas-barake%2Feffect-form-react@0.26.0-beta.5.patch +66 -0
- package/patches/@lucas-barake%2Feffect-form@0.25.0-beta.6.patch +86 -0
- package/patches/README.md +31 -0
- package/dist/query.d.ts +0 -49
- package/dist/query.js +0 -114
package/README.md
CHANGED
|
@@ -8,6 +8,40 @@ Typed Effect contracts, server authentication middleware, project authorization
|
|
|
8
8
|
bun add @krak-stack/auth effect
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
### Temporary Effect form patches
|
|
12
|
+
|
|
13
|
+
React consumers of this interim release must patch both published form betas for
|
|
14
|
+
stable Effect 4. The patches are bundled with Auth but are **not applied
|
|
15
|
+
automatically** to a consuming application.
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
mkdir -p patches
|
|
19
|
+
cp node_modules/@krak-stack/auth/patches/*.patch patches/
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Merge these fields into the application's workspace-root `package.json`,
|
|
23
|
+
preserving existing overrides and patches, then run `bun install`:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"overrides": {
|
|
28
|
+
"@lucas-barake/effect-form": "0.25.0-beta.6",
|
|
29
|
+
"@lucas-barake/effect-form-react": "0.26.0-beta.5"
|
|
30
|
+
},
|
|
31
|
+
"patchedDependencies": {
|
|
32
|
+
"@lucas-barake/effect-form@0.25.0-beta.6": "patches/@lucas-barake%2Feffect-form@0.25.0-beta.6.patch",
|
|
33
|
+
"@lucas-barake/effect-form-react@0.26.0-beta.5": "patches/@lucas-barake%2Feffect-form-react@0.26.0-beta.5.patch"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Commit the patches, manifest, and lockfile together. Other package managers need
|
|
39
|
+
equivalent patch configuration. Server-only imports do not load the form
|
|
40
|
+
libraries. See the bundled `patches/README.md` for provenance and cleanup after
|
|
41
|
+
[upstream release PR #111](https://github.com/lucas-barake/effect-form/pull/111).
|
|
42
|
+
|
|
43
|
+
### Entry points
|
|
44
|
+
|
|
11
45
|
Choose a narrow package subpath for the runtime boundary:
|
|
12
46
|
|
|
13
47
|
| Entry point | Purpose |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/
|
|
1
|
+
import { HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/http-api";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
export * from "./schema.js";
|
|
4
4
|
export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEndpoint.HttpApiEndpoint<"createDomain", "POST", "/admin/domains", never, never, Schema.toCodecJson<Schema.Struct<{
|
|
@@ -218,13 +218,16 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
|
|
|
218
218
|
readonly createdAt: Schema.Date;
|
|
219
219
|
readonly updatedAt: Schema.Date;
|
|
220
220
|
}>>>, Schema.toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listOrganizations", "GET", "/admin/organizations", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
221
|
-
readonly page: Schema.Int
|
|
222
|
-
readonly pageSize: Schema.Int
|
|
221
|
+
readonly page: Schema.decodeTo<Schema.Int, Schema.optionalKey<Schema.Union<readonly [Schema.Number, Schema.NumberFromString]>>, never, never>;
|
|
222
|
+
readonly pageSize: Schema.decodeTo<Schema.Int, Schema.optionalKey<Schema.Union<readonly [Schema.Number, Schema.NumberFromString]>>, never, never>;
|
|
223
223
|
readonly globalFilter: Schema.optional<Schema.String>;
|
|
224
|
-
readonly sort: Schema.optional<Schema.
|
|
225
|
-
readonly id:
|
|
226
|
-
readonly direction:
|
|
227
|
-
}
|
|
224
|
+
readonly sort: Schema.optional<Schema.declare<readonly {
|
|
225
|
+
readonly id: string;
|
|
226
|
+
readonly direction: "asc" | "desc";
|
|
227
|
+
}[], readonly {
|
|
228
|
+
readonly id: string;
|
|
229
|
+
readonly direction: "asc" | "desc";
|
|
230
|
+
}[]>>;
|
|
228
231
|
readonly projectId: Schema.optional<Schema.String>;
|
|
229
232
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
230
233
|
readonly data: Schema.$Array<Schema.Struct<{
|
|
@@ -256,13 +259,16 @@ export declare const AdminApiGroup: HttpApiGroup.HttpApiGroup<"admin", HttpApiEn
|
|
|
256
259
|
readonly pageCount: Schema.Int;
|
|
257
260
|
}>;
|
|
258
261
|
}>>, Schema.toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listUsers", "GET", "/admin/users", never, Schema.toCodecStringTree<Schema.Struct<{
|
|
259
|
-
readonly page: Schema.Int
|
|
260
|
-
readonly pageSize: Schema.Int
|
|
262
|
+
readonly page: Schema.decodeTo<Schema.Int, Schema.optionalKey<Schema.Union<readonly [Schema.Number, Schema.NumberFromString]>>, never, never>;
|
|
263
|
+
readonly pageSize: Schema.decodeTo<Schema.Int, Schema.optionalKey<Schema.Union<readonly [Schema.Number, Schema.NumberFromString]>>, never, never>;
|
|
261
264
|
readonly globalFilter: Schema.optional<Schema.String>;
|
|
262
|
-
readonly sort: Schema.optional<Schema.
|
|
263
|
-
readonly id:
|
|
264
|
-
readonly direction:
|
|
265
|
-
}
|
|
265
|
+
readonly sort: Schema.optional<Schema.declare<readonly {
|
|
266
|
+
readonly id: string;
|
|
267
|
+
readonly direction: "asc" | "desc";
|
|
268
|
+
}[], readonly {
|
|
269
|
+
readonly id: string;
|
|
270
|
+
readonly direction: "asc" | "desc";
|
|
271
|
+
}[]>>;
|
|
266
272
|
readonly projectId: Schema.optional<Schema.String>;
|
|
267
273
|
}>>, never, never, Schema.toCodecJson<Schema.Struct<{
|
|
268
274
|
readonly data: Schema.$Array<Schema.Struct<{
|
package/dist/admin/api.group.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi, } from "effect/
|
|
1
|
+
import { HttpApiEndpoint, HttpApiError, HttpApiGroup, OpenApi, } from "effect/http-api";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { AdminCreateOrganizationPayload, AdminApiKey, AdminApiKeyIdParams, AdminListQuery, AdminOrganization, AdminOrganizationIdParams, AdminUpdateApiKeyPayload, AdminUpdateOrganizationPayload, DashboardStatsQuery, DashboardStatsResponse, PaginatedAdminOrganizations, PaginatedAdminUsers, ServerCreateDomainPayload, ServerDomain, ServerDomainIdParams, ServerDomainRecordsResponse, ServerUpdateDomainPayload, } from "./schema.js";
|
|
4
4
|
export * from "./schema.js";
|
package/dist/admin/schema.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { ServerCreateDomainPayload, ServerDomain, ServerDomainIdParams, ServerDomainRecordsResponse, ServerUpdateDomainPayload } from "../server/schema.js";
|
|
3
3
|
export declare const AdminListQuery: Schema.Struct<{
|
|
4
|
-
readonly page: Schema.Int
|
|
5
|
-
readonly pageSize: Schema.Int
|
|
4
|
+
readonly page: Schema.decodeTo<Schema.Int, Schema.optionalKey<Schema.Union<readonly [Schema.Number, Schema.NumberFromString]>>, never, never>;
|
|
5
|
+
readonly pageSize: Schema.decodeTo<Schema.Int, Schema.optionalKey<Schema.Union<readonly [Schema.Number, Schema.NumberFromString]>>, never, never>;
|
|
6
6
|
readonly globalFilter: Schema.optional<Schema.String>;
|
|
7
|
-
readonly sort: Schema.optional<Schema.
|
|
8
|
-
readonly id:
|
|
9
|
-
readonly direction:
|
|
10
|
-
}
|
|
7
|
+
readonly sort: Schema.optional<Schema.declare<readonly {
|
|
8
|
+
readonly id: string;
|
|
9
|
+
readonly direction: "asc" | "desc";
|
|
10
|
+
}[], readonly {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
readonly direction: "asc" | "desc";
|
|
13
|
+
}[]>>;
|
|
11
14
|
readonly projectId: Schema.optional<Schema.String>;
|
|
12
15
|
}>;
|
|
13
16
|
export declare const AdminProjectPreview: Schema.Struct<{
|
|
@@ -229,4 +232,3 @@ export type AdminUpdateApiKeyPayload = typeof AdminUpdateApiKeyPayload.Type;
|
|
|
229
232
|
export type AdminCreateOrganizationPayload = typeof AdminCreateOrganizationPayload.Type;
|
|
230
233
|
export type AdminUpdateOrganizationPayload = typeof AdminUpdateOrganizationPayload.Type;
|
|
231
234
|
export { ServerCreateDomainPayload, ServerDomain, ServerDomainIdParams, ServerDomainRecordsResponse, ServerUpdateDomainPayload, };
|
|
232
|
-
export { SortParamsFromString } from "../query.js";
|
package/dist/admin/schema.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
import { ApiKeyPermissionGrant } from "../access.js";
|
|
3
|
-
import { PaginatedResponse, Query } from "
|
|
3
|
+
import { PaginatedResponse, Query } from "@krak-stack/registry/query";
|
|
4
4
|
import { ServerCreateDomainPayload, ServerDomain, ServerDomainIdParams, ServerDomainRecordsResponse, ServerUpdateDomainPayload, } from "../server/schema.js";
|
|
5
5
|
export const AdminListQuery = Schema.Struct({
|
|
6
6
|
...Query.fields,
|
|
@@ -312,4 +312,3 @@ export const PaginatedAdminOrganizations = PaginatedResponse(AdminOrganization).
|
|
|
312
312
|
description: "Paginated administrative organization list response.",
|
|
313
313
|
});
|
|
314
314
|
export { ServerCreateDomainPayload, ServerDomain, ServerDomainIdParams, ServerDomainRecordsResponse, ServerUpdateDomainPayload, };
|
|
315
|
-
export { SortParamsFromString } from "../query.js";
|