@krak-stack/auth 0.2.17 → 0.2.18
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 +1 -1
- package/dist/admin/api.group.js +1 -1
- package/dist/api.d.ts +143 -143
- 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 +1 -1
- package/dist/components/admin-users.js +1 -1
- 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 +99 -99
- 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/query.js +2 -2
- 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 +2 -2
- package/dist/server/proxy.js +1 -1
- package/dist/service.d.ts +141 -141
- package/dist/service.js +3 -3
- package/package.json +6 -5
- 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/api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HttpApi, OpenApi } from "effect/
|
|
1
|
+
import { HttpApi, OpenApi } from "effect/http-api";
|
|
2
2
|
import { AdminApiGroup } from "./admin/api.group.js";
|
|
3
3
|
import { AuthApiGroup } from "./auth/api.group.js";
|
|
4
4
|
import { ExtraApiGroup } from "./extra/api.group.js";
|
package/dist/auth/api.group.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup } from "effect/
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup } from "effect/http-api";
|
|
3
3
|
import { AuthBadRequest, AuthConflict, AuthExpectationFailed, AuthForbidden, AuthInternalServerError, AuthNotFound, AuthTooManyRequests, AuthUnauthorized } from "./schema.js";
|
|
4
4
|
export * from "./schema.js";
|
|
5
5
|
export declare const AuthApiGroup: HttpApiGroup.HttpApiGroup<"auth", HttpApiEndpoint.HttpApiEndpoint<"adminBanUser", "POST", "/admin/ban-user", never, never, Schema.toCodecJson<Schema.Struct<{
|
package/dist/auth/api.group.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiGroup, OpenApi
|
|
2
|
+
import { HttpApiEndpoint, HttpApiGroup, OpenApi } from "effect/http-api";
|
|
3
3
|
import { AdminBanUserPayload, AdminStopImpersonatingPayload, AdminUserIdPayload, AdminUserResponse, AuthBadRequest, AuthConflict, AuthExpectationFailed, AuthForbidden, AuthInternalServerError, AuthInvitation, AuthNotFound, AuthOrganization, AuthSessionResponse, AuthStatusResponse, AuthSuccessResponse, AuthTooManyRequests, AuthUnauthorized, ChangePasswordPayload, ChangePasswordResponse, CreateOrganizationPayload, DeleteApiKeyPayload, FullAuthOrganization, GetFullOrganizationQuery, GetInvitationQuery, GetInvitationResponse, GetSessionQuery, GetSessionResponse, InvitationActionResponse, InvitationIdPayload, InviteMemberPayload, LeaveOrganizationPayload, LinkedAccount, LinkSocialPayload, ListApiKeysQuery, ListApiKeysResponse, MemberResponse, OAuthConsentPayload, OAuthPublicClient, OAuthPublicClientQuery, OAuthRedirectResponse, OrganizationImpersonateUserPayload, OrganizationImpersonateUserResponse, OrganizationInvitationsQuery, OrganizationListMembersQuery, OrganizationListMembersResponse, RemoveMemberPayload, RequestPasswordResetPayload, RequestPasswordResetResponse, ResetPasswordPayload, SendVerificationOtpPayload, SetActiveOrganizationPayload, SignInEmailOtpPayload, SignInEmailPayload, SignInEmailResponse, SignInResponse, SignInSocialPayload, SignOutPayload, SocialRedirectResponse, TwoFactorBackupVerifyPayload, TwoFactorDisablePayload, TwoFactorEnablePayload, TwoFactorEnableResponse, TwoFactorSendPayload, TwoFactorVerifyPayload, UnlinkAccountPayload, UpdateMemberRolePayload, UpdateOrganizationPayload, UpdateUserPayload, UserInvitationsQuery, VerifyEmailOtpPayload, VerifyEmailOtpResponse, } from "./schema.js";
|
|
4
4
|
export * from "./schema.js";
|
|
5
5
|
const errors = [
|
package/dist/auth/schema.js
CHANGED
|
@@ -6,7 +6,7 @@ export const AuthRedirectURLFromString = (origin = "http://localhost") => Schema
|
|
|
6
6
|
!url.username &&
|
|
7
7
|
!url.password
|
|
8
8
|
? undefined
|
|
9
|
-
: "Expected an HTTP or HTTPS redirect URL without credentials")), SchemaTransformation.
|
|
9
|
+
: "Expected an HTTP or HTTPS redirect URL without credentials")), SchemaTransformation.transformEffect({
|
|
10
10
|
decode: (value) => Effect.try({
|
|
11
11
|
try: () => new URL(value, origin),
|
|
12
12
|
catch: () => new SchemaIssue.InvalidValue({ message: "Invalid authentication redirect URL" }, value),
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useAtomSubscribe, useAtomValue } from "@effect/atom-react";
|
|
3
3
|
import { FormBuilder, FormReact } from "@lucas-barake/effect-form-react";
|
|
4
4
|
import { Effect, Schema } from "effect";
|
|
5
|
-
import { AsyncResult, Atom } from "effect/
|
|
5
|
+
import { AsyncResult, Atom } from "effect/reactivity";
|
|
6
6
|
import { useState } from "react";
|
|
7
7
|
import { ImageField, SingleSearchableSelectField, SubmitButton, SubmitError, TextField, } from "@krak-stack/registry/effect-form";
|
|
8
8
|
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, } from "@/components/ui/dialog";
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useAtomSet, useAtomSubscribe, useAtomValue } from "@effect/atom-react";
|
|
3
3
|
import { useNavigate, useRouter } from "@tanstack/react-router";
|
|
4
4
|
import { Cause, Effect, Schema } from "effect";
|
|
5
|
-
import { Atom, AsyncResult } from "effect/
|
|
5
|
+
import { Atom, AsyncResult } from "effect/reactivity";
|
|
6
6
|
import { Building2, Pencil, Trash2, UserCog } from "lucide-react";
|
|
7
7
|
import { useEffect, useState } from "react";
|
|
8
8
|
import { DataTable, DataTableListSummary, } from "@krak-stack/registry/data-table";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useAtomSet, useAtomValue } from "@effect/atom-react";
|
|
3
3
|
import { useNavigate, useRouter } from "@tanstack/react-router";
|
|
4
|
-
import { Atom, AsyncResult } from "effect/
|
|
4
|
+
import { Atom, AsyncResult } from "effect/reactivity";
|
|
5
5
|
import { Effect, Schema } from "effect";
|
|
6
6
|
import { Ban, Loader2, ShieldOff, UserCog, UserIcon } from "lucide-react";
|
|
7
7
|
import { useEffect, useState } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useAtomValue } from "@effect/atom-react";
|
|
3
|
-
import { AsyncResult, Atom } from "effect/
|
|
3
|
+
import { AsyncResult, Atom } from "effect/reactivity";
|
|
4
4
|
import { Badge } from "@/components/ui/badge";
|
|
5
5
|
import { authClientApi } from "./auth-client-api.js";
|
|
6
6
|
const associatedProjectsAtom = Atom.family((baseUrl) => Atom.family((organizationId) => authClientApi(baseUrl).query("authExtra", "listAssociatedProjects", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AsyncResult, Atom } from "effect/
|
|
1
|
+
import { AsyncResult, Atom } from "effect/reactivity";
|
|
2
2
|
export declare const AUTH_CLIENT_CHANGE_EVENT = "krakstack-auth:change";
|
|
3
3
|
export declare const refreshOnAuthChange: <A>(atom: Atom.Atom<A>) => Atom.Atom<A>;
|
|
4
4
|
export declare const authSessionAtom: (arg: string | undefined) => Atom.Atom<AsyncResult.AsyncResult<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Option } from "effect";
|
|
2
|
-
import { AsyncResult, Atom } from "effect/
|
|
2
|
+
import { AsyncResult, Atom } from "effect/reactivity";
|
|
3
3
|
import { authClientApi } from "./auth-client-api.js";
|
|
4
4
|
const LAST_LOGIN_METHOD_COOKIE = "krakstack-auth.last_used_login_method";
|
|
5
5
|
export const AUTH_CLIENT_CHANGE_EVENT = "krakstack-auth:change";
|