@krak-stack/auth 0.3.0 → 0.3.2

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.
@@ -16,7 +16,7 @@ export type OAuthConsentMessages = {
16
16
  };
17
17
  /** Shared login-provider-aware consent. The signed OAuth query is sent intact;
18
18
  * the provider, not the component, validates scopes, grants and callbacks. */
19
- export declare const OAuthConsent: ({ messages, baseUrl: providedBaseUrl, }: {
20
- readonly messages: OAuthConsentMessages;
19
+ export declare const OAuthConsent: ({ messages: overrides, baseUrl: providedBaseUrl, }: {
20
+ readonly messages?: Partial<OAuthConsentMessages>;
21
21
  readonly baseUrl?: string;
22
22
  }) => import("react").JSX.Element;
@@ -15,6 +15,62 @@ const ConsentSearch = Schema.Struct({
15
15
  sig: Schema.NonEmptyString,
16
16
  scope: Schema.optional(Schema.String),
17
17
  }).annotate({ identifier: "OAuthConsentSearch" });
18
+ const defaultMessages = {
19
+ en: {
20
+ title: "Authorize application",
21
+ description: ({ clientName }) => `${clientName} is requesting access to your account.`,
22
+ requestedScopes: "Requested scopes",
23
+ allow: "Authorize",
24
+ deny: "Deny",
25
+ error: "Unable to save your decision. Please try again.",
26
+ invalidRequest: "This authorization request is invalid or incomplete. Start again from your application.",
27
+ notice: "Only connect applications you trust. You can revoke access later.",
28
+ permissions: {
29
+ "mcp:read": {
30
+ title: "Read application data",
31
+ description: "View information your account can access in your organization.",
32
+ },
33
+ "mcp:write": {
34
+ title: "Make changes on your behalf",
35
+ description: "Only actions your account is allowed to perform.",
36
+ },
37
+ offline_access: {
38
+ title: "Stay connected",
39
+ description: "Continue access without asking you to sign in each time, until access is revoked.",
40
+ },
41
+ openid: { title: "Verify your identity" },
42
+ profile: { title: "View your name and profile picture" },
43
+ email: { title: "View your email address" },
44
+ },
45
+ },
46
+ fr: {
47
+ title: "Autoriser l'application",
48
+ description: ({ clientName }) => `${clientName} demande l'accès à votre compte.`,
49
+ requestedScopes: "Portées demandées",
50
+ allow: "Autoriser",
51
+ deny: "Refuser",
52
+ error: "Impossible d'enregistrer votre décision. Veuillez réessayer.",
53
+ invalidRequest: "Cette demande d'autorisation est invalide ou incomplète. Recommencez depuis votre application.",
54
+ notice: "Connectez uniquement des applications de confiance. Vous pourrez révoquer l'accès plus tard.",
55
+ permissions: {
56
+ "mcp:read": {
57
+ title: "Lire les données de l'application",
58
+ description: "Consulter les informations accessibles à votre compte dans votre organisation.",
59
+ },
60
+ "mcp:write": {
61
+ title: "Effectuer des modifications en votre nom",
62
+ description: "Uniquement les actions autorisées pour votre compte.",
63
+ },
64
+ offline_access: {
65
+ title: "Rester connecté",
66
+ description: "Continuer l'accès sans vous demander de vous reconnecter à chaque fois, jusqu'à sa révocation.",
67
+ },
68
+ openid: { title: "Vérifier votre identité" },
69
+ profile: { title: "Consulter votre nom et votre photo de profil" },
70
+ email: { title: "Consulter votre adresse courriel" },
71
+ },
72
+ },
73
+ };
18
74
  const scopeIcon = (scope) => {
19
75
  switch (scope) {
20
76
  case "mcp:read":
@@ -45,8 +101,14 @@ const makeConsentAtom = (baseUrl, search) => {
45
101
  };
46
102
  /** Shared login-provider-aware consent. The signed OAuth query is sent intact;
47
103
  * the provider, not the component, validates scopes, grants and callbacks. */
48
- export const OAuthConsent = ({ messages, baseUrl: providedBaseUrl, }) => {
104
+ export const OAuthConsent = ({ messages: overrides, baseUrl: providedBaseUrl, }) => {
49
105
  const auth = useKrakstackAuth();
106
+ const defaults = defaultMessages[auth?.locale ?? "en"];
107
+ const messages = {
108
+ ...defaults,
109
+ ...overrides,
110
+ permissions: { ...defaults.permissions, ...overrides?.permissions },
111
+ };
50
112
  const baseUrl = providedBaseUrl ?? auth?.baseUrl;
51
113
  const search = useRouterState({
52
114
  select: (state) => state.location.searchStr,
@@ -49,6 +49,55 @@ export declare const ServerUsersApiGroup: HttpApiGroup.HttpApiGroup<"users", Htt
49
49
  readonly userId: import("effect/Schema").NonEmptyString;
50
50
  }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
51
51
  readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
52
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listUsersByEmails", "GET", "/users/by-email", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
53
+ readonly emails: import("effect/Schema").NonEmptyString;
54
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
55
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
56
+ readonly id: import("effect/Schema").String;
57
+ readonly name: import("effect/Schema").String;
58
+ readonly email: import("effect/Schema").String;
59
+ readonly emailVerified: import("effect/Schema").Boolean;
60
+ readonly locale: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["en", "fr"]>>;
61
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
62
+ readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").decodeTo<import("effect/Schema").Struct<{
63
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
64
+ readonly email: import("effect/Schema").NonEmptyString;
65
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
66
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
67
+ readonly label: import("effect/Schema").NonEmptyString;
68
+ }>>;
69
+ }>>>;
70
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
71
+ readonly number: import("effect/Schema").NonEmptyString;
72
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
73
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
74
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
75
+ readonly label: import("effect/Schema").NonEmptyString;
76
+ }>>;
77
+ }>>>;
78
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
79
+ readonly url: import("effect/Schema").NonEmptyString;
80
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
81
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
82
+ readonly label: import("effect/Schema").NonEmptyString;
83
+ }>>;
84
+ }>>>;
85
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
86
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
87
+ readonly url: import("effect/Schema").NonEmptyString;
88
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
89
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
90
+ readonly label: import("effect/Schema").NonEmptyString;
91
+ }>>;
92
+ }>>>;
93
+ }>, import("effect/Schema").Unknown, never, never>>>;
94
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
95
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
96
+ readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
97
+ readonly createdAt: import("effect/Schema").Date;
98
+ readonly updatedAt: import("effect/Schema").Date;
99
+ }>>;
100
+ readonly missingEmails: import("effect/Schema").$Array<import("effect/Schema").String>;
52
101
  }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"listUsersByIds", "GET", "/users", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
53
102
  readonly ids: import("effect/Schema").NonEmptyString;
54
103
  }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
@@ -1,8 +1,17 @@
1
1
  import { OpenApi } from "effect/http-api";
2
2
  import { HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/http-api";
3
3
  import { Member, Organization, User } from "../schema.js";
4
- import { ServerActiveOrganization, ServerCreateDomainPayload, ServerDomain, ServerDomainHostParams, ServerDomainIdParams, ServerDomainRecordsResponse, ServerIdParams, ServerIdsQuery, ServerMemberParams, ServerMembersResponse, ServerOrganizationChildrenResponse, ServerOrganizationIdParams, ServerOrganizationsQuery, ServerOrganizationsResponse, ServerUserIdParams, ServerUsersResponse, } from "./schema.js";
4
+ import { ServerActiveOrganization, ServerCreateDomainPayload, ServerDomain, ServerDomainHostParams, ServerDomainIdParams, ServerDomainRecordsResponse, ServerIdParams, ServerIdsQuery, ServerMemberParams, ServerMembersResponse, ServerOrganizationChildrenResponse, ServerOrganizationIdParams, ServerOrganizationsQuery, ServerOrganizationsResponse, ServerUserIdParams, ServerEmailsQuery, ServerUsersByEmailsResponse, ServerUsersResponse, } from "./schema.js";
5
5
  export const ServerUsersApiGroup = HttpApiGroup.make("users")
6
+ .add(HttpApiEndpoint.get("listUsersByEmails", "/users/by-email", {
7
+ query: ServerEmailsQuery.fields,
8
+ success: ServerUsersByEmailsResponse,
9
+ error: [HttpApiError.Unauthorized, HttpApiError.InternalServerError],
10
+ }).annotateMerge(OpenApi.annotations({
11
+ title: "List users by emails",
12
+ summary: "List users by emails",
13
+ description: "Returns trusted users, including locale, for comma-separated primary emails, plus missing emails. Matching is case-insensitive, trims whitespace, and deduplicates emails in request order. Requires a service API key.",
14
+ })))
6
15
  .add(HttpApiEndpoint.get("listUsersByIds", "/users", {
7
16
  query: ServerIdsQuery.fields,
8
17
  success: ServerUsersResponse,
@@ -12,7 +12,7 @@ export { ActorRequired } from "./actor.js";
12
12
  export type { ActorConstraint } from "./actor.js";
13
13
  export { ApiKeySecurity, AuthMiddleware, makeAuthenticationLive, } from "./middleware.js";
14
14
  export type { AuthMiddlewareOptions, AuthenticationLiveOptions, AuthRouterOptions, } from "./middleware.js";
15
- export { ServerActiveOrganization, ServerCreateDomainPayload, ServerDomain, ServerDomainHostParams, ServerDomainIdParams, ServerDomainRecordsResponse, ServerMembersResponse, ServerOrganizationChildrenResponse, ServerOrganizationsResponse, ServerUpdateDomainPayload, ServerUsersResponse, } from "./schema.js";
15
+ export { ServerActiveOrganization, ServerCreateDomainPayload, ServerDomain, ServerDomainHostParams, ServerDomainIdParams, ServerDomainRecordsResponse, ServerMembersResponse, ServerOrganizationChildrenResponse, ServerOrganizationsResponse, ServerUpdateDomainPayload, ServerUsersResponse, ServerEmailsQuery, ServerUsersByEmailsResponse, } from "./schema.js";
16
16
  export type { Member, Organization, OrganizationMetadata, User, } from "../schema.js";
17
17
  export { ApiKeyPermissionGrant, CurrentActor, Forbidden, all, actorUserId, any, defineProjectAccess, permission, policy, withPolicy, } from "../access.js";
18
18
  export type { ApiKeyOwner, ApiKeyActor, Actor, Policy, ProjectAccessConfig, ProjectAccessCatalog, ProjectAccessDefinition, UserActor, } from "../access.js";
@@ -7,5 +7,5 @@ export { proxyAuthHttpEffect, proxyAuthRequest, proxyAuthRequestEffect, } from "
7
7
  export { AuthProxyError, authProxyKeyHeader, proxyOriginHeaders, readProxyOrigin, stripProxyOriginHeaders, } from "./proxy-origin.js";
8
8
  export { ActorRequired } from "./actor.js";
9
9
  export { ApiKeySecurity, AuthMiddleware, makeAuthenticationLive, } from "./middleware.js";
10
- export { ServerActiveOrganization, ServerCreateDomainPayload, ServerDomain, ServerDomainHostParams, ServerDomainIdParams, ServerDomainRecordsResponse, ServerMembersResponse, ServerOrganizationChildrenResponse, ServerOrganizationsResponse, ServerUpdateDomainPayload, ServerUsersResponse, } from "./schema.js";
10
+ export { ServerActiveOrganization, ServerCreateDomainPayload, ServerDomain, ServerDomainHostParams, ServerDomainIdParams, ServerDomainRecordsResponse, ServerMembersResponse, ServerOrganizationChildrenResponse, ServerOrganizationsResponse, ServerUpdateDomainPayload, ServerUsersResponse, ServerEmailsQuery, ServerUsersByEmailsResponse, } from "./schema.js";
11
11
  export { ApiKeyPermissionGrant, CurrentActor, Forbidden, all, actorUserId, any, defineProjectAccess, permission, policy, withPolicy, } from "../access.js";
@@ -1,4 +1,55 @@
1
1
  import { Schema } from "effect";
2
+ export declare const ServerEmailsQuery: Schema.Struct<{
3
+ readonly emails: Schema.NonEmptyString;
4
+ }>;
5
+ export declare const ServerUsersByEmailsResponse: Schema.Struct<{
6
+ readonly data: Schema.$Array<Schema.Struct<{
7
+ readonly id: Schema.String;
8
+ readonly name: Schema.String;
9
+ readonly email: Schema.String;
10
+ readonly emailVerified: Schema.Boolean;
11
+ readonly locale: Schema.optional<Schema.Literals<readonly ["en", "fr"]>>;
12
+ readonly image: Schema.NullOr<Schema.String>;
13
+ readonly metadata: Schema.optional<Schema.NullOr<Schema.decodeTo<Schema.Struct<{
14
+ readonly emails: Schema.optional<Schema.$Array<Schema.Struct<{
15
+ readonly email: Schema.NonEmptyString;
16
+ readonly translations: Schema.$Array<Schema.Struct<{
17
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
18
+ readonly label: Schema.NonEmptyString;
19
+ }>>;
20
+ }>>>;
21
+ readonly phones: Schema.optional<Schema.$Array<Schema.Struct<{
22
+ readonly number: Schema.NonEmptyString;
23
+ readonly extension: Schema.optional<Schema.String>;
24
+ readonly translations: Schema.$Array<Schema.Struct<{
25
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
26
+ readonly label: Schema.NonEmptyString;
27
+ }>>;
28
+ }>>>;
29
+ readonly websites: Schema.optional<Schema.$Array<Schema.Struct<{
30
+ readonly url: Schema.NonEmptyString;
31
+ readonly translations: Schema.$Array<Schema.Struct<{
32
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
33
+ readonly label: Schema.NonEmptyString;
34
+ }>>;
35
+ }>>>;
36
+ readonly socials: Schema.optional<Schema.$Array<Schema.Struct<{
37
+ readonly platform: Schema.Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
38
+ readonly url: Schema.NonEmptyString;
39
+ readonly translations: Schema.$Array<Schema.Struct<{
40
+ readonly locale: Schema.Union<readonly [Schema.Literal<"en">, Schema.Literal<"fr">]>;
41
+ readonly label: Schema.NonEmptyString;
42
+ }>>;
43
+ }>>>;
44
+ }>, Schema.Unknown, never, never>>>;
45
+ readonly role: Schema.NullOr<Schema.String>;
46
+ readonly banned: Schema.NullOr<Schema.Boolean>;
47
+ readonly lastLoginMethod: Schema.optional<Schema.NullOr<Schema.String>>;
48
+ readonly createdAt: Schema.Date;
49
+ readonly updatedAt: Schema.Date;
50
+ }>>;
51
+ readonly missingEmails: Schema.$Array<Schema.String>;
52
+ }>;
2
53
  export declare const AuthProxyOrigin: Schema.Struct<{
3
54
  readonly apiKey: Schema.RedactedFromValue<Schema.NonEmptyString>;
4
55
  readonly host: Schema.String;
@@ -1,5 +1,12 @@
1
1
  import { Schema } from "effect";
2
2
  import { Member, Organization, User } from "../schema.js";
3
+ export const ServerEmailsQuery = Schema.Struct({
4
+ emails: Schema.NonEmptyString,
5
+ }).annotate({ identifier: "ServerEmailsQuery" });
6
+ export const ServerUsersByEmailsResponse = Schema.Struct({
7
+ data: Schema.Array(User),
8
+ missingEmails: Schema.Array(Schema.String),
9
+ }).annotate({ identifier: "ServerUsersByEmailsResponse" });
3
10
  export const AuthProxyOrigin = Schema.Struct({
4
11
  apiKey: Schema.RedactedFromValue(Schema.NonEmptyString),
5
12
  host: Schema.String.check(Schema.isPattern(/^(?:[a-z0-9](?:[a-z0-9.-]*[a-z0-9])?|\[[a-f0-9:]+\])(?::[0-9]{1,5})?$/)),
package/dist/service.d.ts CHANGED
@@ -2066,6 +2066,56 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
2066
2066
  }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
2067
2067
  readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
2068
2068
  }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, never, never>;
2069
+ readonly listUsersByEmails: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listUsersByEmails", "GET", "/api/users/by-email", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
2070
+ readonly emails: import("effect/Schema").NonEmptyString;
2071
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
2072
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
2073
+ readonly id: import("effect/Schema").String;
2074
+ readonly name: import("effect/Schema").String;
2075
+ readonly email: import("effect/Schema").String;
2076
+ readonly emailVerified: import("effect/Schema").Boolean;
2077
+ readonly locale: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["en", "fr"]>>;
2078
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
2079
+ readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").decodeTo<import("effect/Schema").Struct<{
2080
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
2081
+ readonly email: import("effect/Schema").NonEmptyString;
2082
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
2083
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
2084
+ readonly label: import("effect/Schema").NonEmptyString;
2085
+ }>>;
2086
+ }>>>;
2087
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
2088
+ readonly number: import("effect/Schema").NonEmptyString;
2089
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
2090
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
2091
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
2092
+ readonly label: import("effect/Schema").NonEmptyString;
2093
+ }>>;
2094
+ }>>>;
2095
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
2096
+ readonly url: import("effect/Schema").NonEmptyString;
2097
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
2098
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
2099
+ readonly label: import("effect/Schema").NonEmptyString;
2100
+ }>>;
2101
+ }>>>;
2102
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
2103
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
2104
+ readonly url: import("effect/Schema").NonEmptyString;
2105
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
2106
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
2107
+ readonly label: import("effect/Schema").NonEmptyString;
2108
+ }>>;
2109
+ }>>>;
2110
+ }>, import("effect/Schema").Unknown, never, never>>>;
2111
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
2112
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
2113
+ readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
2114
+ readonly createdAt: import("effect/Schema").Date;
2115
+ readonly updatedAt: import("effect/Schema").Date;
2116
+ }>>;
2117
+ readonly missingEmails: import("effect/Schema").$Array<import("effect/Schema").String>;
2118
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, never, never>;
2069
2119
  readonly listUsersByIds: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listUsersByIds", "GET", "/api/users", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
2070
2120
  readonly ids: import("effect/Schema").NonEmptyString;
2071
2121
  }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
@@ -4148,6 +4198,56 @@ declare const AuthService_base: Context.ServiceClass<AuthService, "@krak-stack/a
4148
4198
  }>>, never, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
4149
4199
  readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
4150
4200
  }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, never, never>;
4201
+ readonly listUsersByEmails: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listUsersByEmails", "GET", "/api/users/by-email", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
4202
+ readonly emails: import("effect/Schema").NonEmptyString;
4203
+ }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
4204
+ readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
4205
+ readonly id: import("effect/Schema").String;
4206
+ readonly name: import("effect/Schema").String;
4207
+ readonly email: import("effect/Schema").String;
4208
+ readonly emailVerified: import("effect/Schema").Boolean;
4209
+ readonly locale: import("effect/Schema").optional<import("effect/Schema").Literals<readonly ["en", "fr"]>>;
4210
+ readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
4211
+ readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").decodeTo<import("effect/Schema").Struct<{
4212
+ readonly emails: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
4213
+ readonly email: import("effect/Schema").NonEmptyString;
4214
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
4215
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
4216
+ readonly label: import("effect/Schema").NonEmptyString;
4217
+ }>>;
4218
+ }>>>;
4219
+ readonly phones: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
4220
+ readonly number: import("effect/Schema").NonEmptyString;
4221
+ readonly extension: import("effect/Schema").optional<import("effect/Schema").String>;
4222
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
4223
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
4224
+ readonly label: import("effect/Schema").NonEmptyString;
4225
+ }>>;
4226
+ }>>>;
4227
+ readonly websites: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
4228
+ readonly url: import("effect/Schema").NonEmptyString;
4229
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
4230
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
4231
+ readonly label: import("effect/Schema").NonEmptyString;
4232
+ }>>;
4233
+ }>>>;
4234
+ readonly socials: import("effect/Schema").optional<import("effect/Schema").$Array<import("effect/Schema").Struct<{
4235
+ readonly platform: import("effect/Schema").Literals<readonly ["facebook", "github", "instagram", "linkedin", "tiktok", "x", "youtube"]>;
4236
+ readonly url: import("effect/Schema").NonEmptyString;
4237
+ readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
4238
+ readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
4239
+ readonly label: import("effect/Schema").NonEmptyString;
4240
+ }>>;
4241
+ }>>>;
4242
+ }>, import("effect/Schema").Unknown, never, never>>>;
4243
+ readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
4244
+ readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
4245
+ readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
4246
+ readonly createdAt: import("effect/Schema").Date;
4247
+ readonly updatedAt: import("effect/Schema").Date;
4248
+ }>>;
4249
+ readonly missingEmails: import("effect/Schema").$Array<import("effect/Schema").String>;
4250
+ }>>, import("effect/Schema").toCodecJson<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError>, never, never>, never, never>;
4151
4251
  readonly listUsersByIds: HttpApiClient.Client.Method<import("effect/http-api/HttpApiEndpoint").HttpApiEndpoint<"listUsersByIds", "GET", "/api/users", never, import("effect/Schema").toCodecStringTree<import("effect/Schema").Struct<{
4152
4252
  readonly ids: import("effect/Schema").NonEmptyString;
4153
4253
  }>>, never, never, import("effect/Schema").toCodecJson<import("effect/Schema").Struct<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@krak-stack/auth",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "Effect HttpApi clients and schemas for KrakStack Auth.",
5
5
  "license": "MIT",
6
6
  "files": [