@krak-stack/auth 0.1.41 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/{api.d.ts → api.group.d.ts} +1 -0
- package/dist/admin/{api.js → api.group.js} +1 -0
- package/dist/api.d.ts +22 -30
- package/dist/api.js +5 -5
- package/dist/better-auth/{index.d.ts → api.group.d.ts} +6 -8
- package/dist/better-auth/{api.js → api.group.js} +2 -4
- package/dist/components/admin-organization-form.js +1 -1
- package/dist/components/auth-client-api.d.ts +16 -20
- package/dist/components/organization-switcher.js +13 -13
- package/dist/extra/api.group.d.ts +68 -0
- package/dist/extra/{api.js → api.group.js} +5 -17
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/server/{api.d.ts → api.group.d.ts} +0 -196
- package/dist/server/{api.js → api.group.js} +1 -6
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.js +1 -1
- package/dist/service.d.ts +12 -24
- package/package.json +7 -7
- package/dist/admin/index.d.ts +0 -2
- package/dist/admin/index.js +0 -2
- package/dist/better-auth/api.d.ts +0 -55
- package/dist/better-auth/index.js +0 -12
- package/dist/extra/api.d.ts +0 -139
- package/dist/extra/index.d.ts +0 -76
- package/dist/extra/index.js +0 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@krak-stack/auth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.42",
|
|
4
4
|
"description": "Effect HttpApi clients and schemas for KrakStack Auth.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -36,20 +36,20 @@
|
|
|
36
36
|
},
|
|
37
37
|
"./tailwind.css": "./tailwind.css",
|
|
38
38
|
"./better-auth": {
|
|
39
|
-
"types": "./dist/better-auth/
|
|
40
|
-
"default": "./dist/better-auth/
|
|
39
|
+
"types": "./dist/better-auth/api.group.d.ts",
|
|
40
|
+
"default": "./dist/better-auth/api.group.js"
|
|
41
41
|
},
|
|
42
42
|
"./extra": {
|
|
43
|
-
"types": "./dist/extra/
|
|
44
|
-
"default": "./dist/extra/
|
|
43
|
+
"types": "./dist/extra/api.group.d.ts",
|
|
44
|
+
"default": "./dist/extra/api.group.js"
|
|
45
45
|
},
|
|
46
46
|
"./server": {
|
|
47
47
|
"types": "./dist/server/index.d.ts",
|
|
48
48
|
"default": "./dist/server/index.js"
|
|
49
49
|
},
|
|
50
50
|
"./admin": {
|
|
51
|
-
"types": "./dist/admin/
|
|
52
|
-
"default": "./dist/admin/
|
|
51
|
+
"types": "./dist/admin/api.group.d.ts",
|
|
52
|
+
"default": "./dist/admin/api.group.js"
|
|
53
53
|
}
|
|
54
54
|
},
|
|
55
55
|
"publishConfig": {
|
package/dist/admin/index.d.ts
DELETED
package/dist/admin/index.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { HttpApi } from "effect/unstable/httpapi";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/unstable/httpapi";
|
|
3
|
-
import { TooManyRequests } from "./schema";
|
|
4
|
-
export declare const BetterAuthApiGroup: HttpApiGroup.HttpApiGroup<"auth", HttpApiEndpoint.HttpApiEndpoint<"getSession", "GET", "/get-session", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
5
|
-
readonly session: import("effect/Schema").Struct<{
|
|
6
|
-
readonly id: import("effect/Schema").String;
|
|
7
|
-
readonly expiresAt: import("effect/Schema").Date;
|
|
8
|
-
readonly token: import("effect/Schema").String;
|
|
9
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
10
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
11
|
-
readonly ipAddress: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
12
|
-
readonly userAgent: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
13
|
-
readonly userId: import("effect/Schema").String;
|
|
14
|
-
readonly impersonatedBy: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
15
|
-
readonly activeOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
16
|
-
}>;
|
|
17
|
-
readonly user: import("effect/Schema").Struct<{
|
|
18
|
-
readonly id: import("effect/Schema").String;
|
|
19
|
-
readonly name: import("effect/Schema").String;
|
|
20
|
-
readonly email: import("effect/Schema").String;
|
|
21
|
-
readonly emailVerified: import("effect/Schema").Boolean;
|
|
22
|
-
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
23
|
-
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
24
|
-
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
25
|
-
readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
26
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
27
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
28
|
-
}>;
|
|
29
|
-
}>>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError | typeof TooManyRequests>, never, never>, false>;
|
|
30
|
-
export declare const BetterAuthApi: HttpApi.HttpApi<"BetterAuthApi", HttpApiGroup.HttpApiGroup<"auth", HttpApiEndpoint.HttpApiEndpoint<"getSession", "GET", "/api/auth/get-session", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
31
|
-
readonly session: import("effect/Schema").Struct<{
|
|
32
|
-
readonly id: import("effect/Schema").String;
|
|
33
|
-
readonly expiresAt: import("effect/Schema").Date;
|
|
34
|
-
readonly token: import("effect/Schema").String;
|
|
35
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
36
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
37
|
-
readonly ipAddress: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
38
|
-
readonly userAgent: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
39
|
-
readonly userId: import("effect/Schema").String;
|
|
40
|
-
readonly impersonatedBy: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
41
|
-
readonly activeOrganizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
42
|
-
}>;
|
|
43
|
-
readonly user: import("effect/Schema").Struct<{
|
|
44
|
-
readonly id: import("effect/Schema").String;
|
|
45
|
-
readonly name: import("effect/Schema").String;
|
|
46
|
-
readonly email: import("effect/Schema").String;
|
|
47
|
-
readonly emailVerified: import("effect/Schema").Boolean;
|
|
48
|
-
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
49
|
-
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
50
|
-
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
51
|
-
readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
52
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
53
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
54
|
-
}>;
|
|
55
|
-
}>>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.NotFound | typeof HttpApiError.InternalServerError | typeof TooManyRequests>, never, never>, false>>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { FetchHttpClient } from "effect/unstable/http";
|
|
2
|
-
import { AtomHttpApi } from "effect/unstable/reactivity";
|
|
3
|
-
import { defaultBaseUrl } from "../config";
|
|
4
|
-
import { BetterAuthApi } from "./api";
|
|
5
|
-
export class BetterAuthApiClient extends AtomHttpApi.Service()("BetterAuthApiClient", {
|
|
6
|
-
api: BetterAuthApi,
|
|
7
|
-
baseUrl: defaultBaseUrl(),
|
|
8
|
-
httpClient: FetchHttpClient.layer,
|
|
9
|
-
}) {
|
|
10
|
-
}
|
|
11
|
-
export { BetterAuthApi, BetterAuthApiGroup } from "./api";
|
|
12
|
-
export * from "./schema";
|
package/dist/extra/api.d.ts
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { HttpApi } from "effect/unstable/httpapi";
|
|
2
|
-
import { HttpApiEndpoint, HttpApiError, HttpApiGroup } from "effect/unstable/httpapi";
|
|
3
|
-
import { ExtraBadRequest } from "./schema";
|
|
4
|
-
export declare const ExtraApiGroup: HttpApiGroup.HttpApiGroup<"authExtra", HttpApiEndpoint.HttpApiEndpoint<"createApiKey", "POST", "/auth/create-api-key", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
5
|
-
readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
|
|
6
|
-
readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
7
|
-
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
8
|
-
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
9
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
10
|
-
readonly id: import("effect/Schema").String;
|
|
11
|
-
readonly key: import("effect/Schema").String;
|
|
12
|
-
}>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getProjectPublicConfig", "GET", "/auth/project-config", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
|
|
13
|
-
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
14
|
-
readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
15
|
-
readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
16
|
-
readonly rootHost: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
17
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
18
|
-
readonly projectKey: import("effect/Schema").String;
|
|
19
|
-
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
20
|
-
readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
21
|
-
readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
22
|
-
readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
23
|
-
readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
24
|
-
readonly authOptions: import("effect/Schema").Struct<{
|
|
25
|
-
readonly emailPassword: import("effect/Schema").Boolean;
|
|
26
|
-
readonly emailOtp: import("effect/Schema").Boolean;
|
|
27
|
-
readonly google: import("effect/Schema").Boolean;
|
|
28
|
-
readonly signUp: import("effect/Schema").Boolean;
|
|
29
|
-
readonly signUpName: import("effect/Schema").Boolean;
|
|
30
|
-
}>;
|
|
31
|
-
}>>, HttpApiEndpoint.Json<typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"setPassword", "POST", "/auth/set-password", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
32
|
-
readonly newPassword: import("effect/Schema").NonEmptyString;
|
|
33
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
34
|
-
readonly ok: import("effect/Schema").Boolean;
|
|
35
|
-
}>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"uploadOrganizationLogo", "POST", "/organizations/logo/upload", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
|
|
36
|
-
readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
|
|
37
|
-
}>>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
38
|
-
readonly url: import("effect/Schema").String;
|
|
39
|
-
}>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"uploadUserImage", "POST", "/auth/image/upload", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
|
|
40
|
-
readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
|
|
41
|
-
}>>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
42
|
-
readonly url: import("effect/Schema").String;
|
|
43
|
-
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError | typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"verifyApiKey", "POST", "/auth/verify-api-key", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
44
|
-
readonly key: import("effect/Schema").NonEmptyString;
|
|
45
|
-
readonly configId: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>>;
|
|
46
|
-
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
47
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
48
|
-
readonly valid: import("effect/Schema").Boolean;
|
|
49
|
-
readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
50
|
-
readonly message: import("effect/Schema").String;
|
|
51
|
-
readonly code: import("effect/Schema").String;
|
|
52
|
-
}>>;
|
|
53
|
-
readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
54
|
-
readonly id: import("effect/Schema").String;
|
|
55
|
-
readonly configId: import("effect/Schema").String;
|
|
56
|
-
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
57
|
-
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
58
|
-
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
59
|
-
readonly referenceId: import("effect/Schema").String;
|
|
60
|
-
readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
61
|
-
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
62
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
63
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
64
|
-
readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
65
|
-
readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
|
|
66
|
-
}>>;
|
|
67
|
-
}>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"verifyPassword", "POST", "/auth/verify-password", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
68
|
-
readonly password: import("effect/Schema").NonEmptyString;
|
|
69
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
70
|
-
readonly ok: import("effect/Schema").Boolean;
|
|
71
|
-
}>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never>, false>;
|
|
72
|
-
export declare const ExtraApi: HttpApi.HttpApi<"ExtraApi", HttpApiGroup.HttpApiGroup<"authExtra", HttpApiEndpoint.HttpApiEndpoint<"createApiKey", "POST", "/api/auth/create-api-key", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
73
|
-
readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
|
|
74
|
-
readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
75
|
-
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
76
|
-
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
77
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
78
|
-
readonly id: import("effect/Schema").String;
|
|
79
|
-
readonly key: import("effect/Schema").String;
|
|
80
|
-
}>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"getProjectPublicConfig", "GET", "/api/auth/project-config", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<import("effect/Schema").Struct<{
|
|
81
|
-
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
82
|
-
readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
83
|
-
readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
84
|
-
readonly rootHost: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
85
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
86
|
-
readonly projectKey: import("effect/Schema").String;
|
|
87
|
-
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
88
|
-
readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
89
|
-
readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
90
|
-
readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
91
|
-
readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
92
|
-
readonly authOptions: import("effect/Schema").Struct<{
|
|
93
|
-
readonly emailPassword: import("effect/Schema").Boolean;
|
|
94
|
-
readonly emailOtp: import("effect/Schema").Boolean;
|
|
95
|
-
readonly google: import("effect/Schema").Boolean;
|
|
96
|
-
readonly signUp: import("effect/Schema").Boolean;
|
|
97
|
-
readonly signUpName: import("effect/Schema").Boolean;
|
|
98
|
-
}>;
|
|
99
|
-
}>>, HttpApiEndpoint.Json<typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"setPassword", "POST", "/api/auth/set-password", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
100
|
-
readonly newPassword: import("effect/Schema").NonEmptyString;
|
|
101
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
102
|
-
readonly ok: import("effect/Schema").Boolean;
|
|
103
|
-
}>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"uploadOrganizationLogo", "POST", "/api/organizations/logo/upload", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
|
|
104
|
-
readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
|
|
105
|
-
}>>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
106
|
-
readonly url: import("effect/Schema").String;
|
|
107
|
-
}>>, HttpApiEndpoint.Json<typeof HttpApiError.BadRequest | typeof HttpApiError.Unauthorized | typeof HttpApiError.Forbidden | typeof HttpApiError.InternalServerError>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"uploadUserImage", "POST", "/api/auth/image/upload", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
|
|
108
|
-
readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
|
|
109
|
-
}>>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
110
|
-
readonly url: import("effect/Schema").String;
|
|
111
|
-
}>>, HttpApiEndpoint.Json<typeof HttpApiError.Unauthorized | typeof HttpApiError.InternalServerError | typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"verifyApiKey", "POST", "/api/auth/verify-api-key", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
112
|
-
readonly key: import("effect/Schema").NonEmptyString;
|
|
113
|
-
readonly configId: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>>;
|
|
114
|
-
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
115
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
116
|
-
readonly valid: import("effect/Schema").Boolean;
|
|
117
|
-
readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
118
|
-
readonly message: import("effect/Schema").String;
|
|
119
|
-
readonly code: import("effect/Schema").String;
|
|
120
|
-
}>>;
|
|
121
|
-
readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
122
|
-
readonly id: import("effect/Schema").String;
|
|
123
|
-
readonly configId: import("effect/Schema").String;
|
|
124
|
-
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
125
|
-
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
126
|
-
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
127
|
-
readonly referenceId: import("effect/Schema").String;
|
|
128
|
-
readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
129
|
-
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
130
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
131
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
132
|
-
readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
133
|
-
readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
|
|
134
|
-
}>>;
|
|
135
|
-
}>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never> | HttpApiEndpoint.HttpApiEndpoint<"verifyPassword", "POST", "/api/auth/verify-password", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
136
|
-
readonly password: import("effect/Schema").NonEmptyString;
|
|
137
|
-
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<import("effect/Schema").Struct<{
|
|
138
|
-
readonly ok: import("effect/Schema").Boolean;
|
|
139
|
-
}>>, HttpApiEndpoint.Json<typeof ExtraBadRequest>, never, never>, false>>;
|
package/dist/extra/index.d.ts
DELETED
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { AtomHttpApi } from "effect/unstable/reactivity";
|
|
2
|
-
declare const ExtraApiClient_base: AtomHttpApi.AtomHttpApiClient<ExtraApiClient, "ExtraApiClient", import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"authExtra", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createApiKey", "POST", "/api/auth/create-api-key", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
3
|
-
readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
|
|
4
|
-
readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
5
|
-
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
6
|
-
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
7
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
8
|
-
readonly id: import("effect/Schema").String;
|
|
9
|
-
readonly key: import("effect/Schema").String;
|
|
10
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getProjectPublicConfig", "GET", "/api/auth/project-config", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
11
|
-
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
12
|
-
readonly clientId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
13
|
-
readonly host: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
14
|
-
readonly rootHost: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
15
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
16
|
-
readonly projectKey: import("effect/Schema").String;
|
|
17
|
-
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
18
|
-
readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
19
|
-
readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
20
|
-
readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
21
|
-
readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
22
|
-
readonly authOptions: import("effect/Schema").Struct<{
|
|
23
|
-
readonly emailPassword: import("effect/Schema").Boolean;
|
|
24
|
-
readonly emailOtp: import("effect/Schema").Boolean;
|
|
25
|
-
readonly google: import("effect/Schema").Boolean;
|
|
26
|
-
readonly signUp: import("effect/Schema").Boolean;
|
|
27
|
-
readonly signUpName: import("effect/Schema").Boolean;
|
|
28
|
-
}>;
|
|
29
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"setPassword", "POST", "/api/auth/set-password", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
30
|
-
readonly newPassword: import("effect/Schema").NonEmptyString;
|
|
31
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
32
|
-
readonly ok: import("effect/Schema").Boolean;
|
|
33
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"uploadOrganizationLogo", "POST", "/api/organizations/logo/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
|
|
34
|
-
readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
|
|
35
|
-
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
36
|
-
readonly url: import("effect/Schema").String;
|
|
37
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").BadRequest | 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<"uploadUserImage", "POST", "/api/auth/image/upload", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/unstable/httpapi/HttpApiSchema").asMultipartStream<import("effect/Schema").Struct<{
|
|
38
|
-
readonly file: import("effect/Schema").decodeTo<import("effect/unstable/http/Multipart").PersistedFileSchema, import("effect/Schema").$Array<import("effect/unstable/http/Multipart").PersistedFileSchema>, never, never>;
|
|
39
|
-
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
40
|
-
readonly url: import("effect/Schema").String;
|
|
41
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError | typeof import("./schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyApiKey", "POST", "/api/auth/verify-api-key", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
42
|
-
readonly key: import("effect/Schema").NonEmptyString;
|
|
43
|
-
readonly configId: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>>;
|
|
44
|
-
readonly permissions: import("effect/Schema").optional<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
45
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
46
|
-
readonly valid: import("effect/Schema").Boolean;
|
|
47
|
-
readonly error: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
48
|
-
readonly message: import("effect/Schema").String;
|
|
49
|
-
readonly code: import("effect/Schema").String;
|
|
50
|
-
}>>;
|
|
51
|
-
readonly key: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
52
|
-
readonly id: import("effect/Schema").String;
|
|
53
|
-
readonly configId: import("effect/Schema").String;
|
|
54
|
-
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
55
|
-
readonly start: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
56
|
-
readonly prefix: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
57
|
-
readonly referenceId: import("effect/Schema").String;
|
|
58
|
-
readonly enabled: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
59
|
-
readonly expiresAt: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
60
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
61
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
62
|
-
readonly permissions: import("effect/Schema").NullOr<import("effect/Schema").$Record<import("effect/Schema").String, import("effect/Schema").$Array<import("effect/Schema").String>>>;
|
|
63
|
-
readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Unknown>;
|
|
64
|
-
}>>;
|
|
65
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./schema").ExtraBadRequest>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"verifyPassword", "POST", "/api/auth/verify-password", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
66
|
-
readonly password: import("effect/Schema").NonEmptyString;
|
|
67
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
68
|
-
readonly ok: import("effect/Schema").Boolean;
|
|
69
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("./schema").ExtraBadRequest>, never, never>, false>>;
|
|
70
|
-
export declare class ExtraApiClient extends ExtraApiClient_base {
|
|
71
|
-
}
|
|
72
|
-
export { AuthService } from "../service";
|
|
73
|
-
export { AuthClientConfig } from "../config";
|
|
74
|
-
export { ExtraApi, ExtraApiGroup } from "./api";
|
|
75
|
-
export * from "./schema";
|
|
76
|
-
export type { Organization, OrganizationMetadata } from "../schema";
|
package/dist/extra/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FetchHttpClient } from "effect/unstable/http";
|
|
2
|
-
import { AtomHttpApi } from "effect/unstable/reactivity";
|
|
3
|
-
import { defaultBaseUrl } from "../config";
|
|
4
|
-
import { ExtraApi } from "./api";
|
|
5
|
-
export class ExtraApiClient extends AtomHttpApi.Service()("ExtraApiClient", {
|
|
6
|
-
api: ExtraApi,
|
|
7
|
-
baseUrl: defaultBaseUrl(),
|
|
8
|
-
httpClient: FetchHttpClient.layer,
|
|
9
|
-
}) {
|
|
10
|
-
}
|
|
11
|
-
export { AuthService } from "../service";
|
|
12
|
-
export { AuthClientConfig } from "../config";
|
|
13
|
-
export { ExtraApi, ExtraApiGroup } from "./api";
|
|
14
|
-
export * from "./schema";
|