@krak-stack/auth 0.1.39 → 0.1.41
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 +196 -0
- package/dist/admin/api.js +158 -0
- package/dist/admin/index.d.ts +2 -0
- package/dist/admin/index.js +2 -0
- package/dist/admin/schema.d.ts +128 -0
- package/dist/admin/schema.js +190 -0
- package/dist/api.d.ts +278 -1
- package/dist/api.js +11 -2
- package/dist/components/admin-organization-form.d.ts +6 -0
- package/dist/components/admin-organization-form.js +126 -0
- package/dist/components/admin-organizations.d.ts +7 -0
- package/dist/components/admin-organizations.js +122 -0
- package/dist/components/admin-users.d.ts +8 -0
- package/dist/components/admin-users.js +282 -0
- package/dist/components/{auth-api-client.d.ts → auth-client-api.d.ts} +186 -196
- package/dist/components/auth-client-api.js +29 -0
- package/dist/components/auth-client.d.ts +2 -1
- package/dist/components/auth-forms.js +3 -3
- package/dist/components/auth-provider.d.ts +16 -15
- package/dist/components/auth-provider.js +30 -5
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/organization-switcher.js +4 -5
- package/dist/components/user-button.d.ts +11 -1
- package/dist/components/user-button.js +57 -6
- package/dist/components/utils.d.ts +11 -0
- package/dist/components/utils.js +24 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +4 -2
- package/dist/query.d.ts +49 -0
- package/dist/query.js +114 -0
- package/dist/server/api.d.ts +32 -0
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +2 -1
- package/dist/server/schema.d.ts +4 -0
- package/dist/server/schema.js +8 -0
- package/dist/service.d.ts +462 -434
- package/dist/service.js +2 -2
- package/package.json +9 -1
- package/dist/components/auth-api-client.js +0 -29
|
@@ -1,30 +1,198 @@
|
|
|
1
1
|
import { AtomHttpApi } from "effect/unstable/reactivity";
|
|
2
|
-
export declare const
|
|
3
|
-
readonly
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
export declare const authClientApi: (baseUrl?: string | undefined) => AtomHttpApi.AtomHttpApiClient<object, `AuthClientApi:${string}`, import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"admin", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"createDomain", "POST", "/api/admin/domains", 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 hostname: import("effect/Schema").NonEmptyString;
|
|
4
|
+
readonly rootHostname: import("effect/Schema").NonEmptyString;
|
|
5
|
+
readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
6
|
+
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
7
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
8
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
9
|
+
readonly id: import("effect/Schema").String;
|
|
10
|
+
readonly hostname: import("effect/Schema").String;
|
|
11
|
+
readonly rootHostname: import("effect/Schema").String;
|
|
12
|
+
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
13
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
14
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
15
|
+
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
16
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
17
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
18
|
+
readonly hostnameId: import("effect/Schema").String;
|
|
19
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
20
|
+
readonly active: import("effect/Schema").Boolean;
|
|
21
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
22
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
23
|
+
}>>, 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<"createOrganization", "POST", "/api/admin/organizations", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
24
|
+
readonly name: import("effect/Schema").NonEmptyString;
|
|
25
|
+
readonly slug: import("effect/Schema").NonEmptyString;
|
|
26
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
27
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
28
|
+
readonly id: import("effect/Schema").String;
|
|
29
|
+
readonly name: import("effect/Schema").String;
|
|
30
|
+
readonly slug: import("effect/Schema").String;
|
|
31
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
32
|
+
readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
33
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
34
|
+
}>>, 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<"dashboardStats", "GET", "/api/admin/dashboard-stats", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
35
|
+
readonly days: import("effect/Schema").optional<import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"7">, import("effect/Schema").Literal<"14">, import("effect/Schema").Literal<"30">, import("effect/Schema").Literal<"90">]>>;
|
|
36
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
37
|
+
readonly totalUsers: import("effect/Schema").Number;
|
|
38
|
+
readonly totalOrganizations: import("effect/Schema").Number;
|
|
39
|
+
readonly totalProjects: import("effect/Schema").Number;
|
|
40
|
+
readonly totalDomains: import("effect/Schema").Number;
|
|
41
|
+
readonly totalApiKeys: import("effect/Schema").Number;
|
|
42
|
+
readonly totalOauthClients: import("effect/Schema").Number;
|
|
43
|
+
readonly dailyActiveUsers: import("effect/Schema").Number;
|
|
44
|
+
readonly dailyActiveUsersByDay: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
45
|
+
readonly date: import("effect/Schema").String;
|
|
46
|
+
readonly count: import("effect/Schema").Number;
|
|
47
|
+
}>>;
|
|
48
|
+
readonly signupsByDay: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
49
|
+
readonly date: import("effect/Schema").String;
|
|
50
|
+
readonly count: import("effect/Schema").Number;
|
|
51
|
+
}>>;
|
|
52
|
+
readonly projectConnections: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
53
|
+
readonly projectId: import("effect/Schema").String;
|
|
54
|
+
readonly projectName: import("effect/Schema").String;
|
|
55
|
+
readonly users: import("effect/Schema").Number;
|
|
56
|
+
readonly organizations: import("effect/Schema").Number;
|
|
57
|
+
}>>;
|
|
58
|
+
}>>, 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<"deleteDomain", "DELETE", "/api/admin/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
59
|
+
readonly id: import("effect/Schema").NonEmptyString;
|
|
60
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
61
|
+
readonly id: import("effect/Schema").String;
|
|
62
|
+
readonly hostname: import("effect/Schema").String;
|
|
63
|
+
readonly rootHostname: import("effect/Schema").String;
|
|
64
|
+
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
65
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
66
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
67
|
+
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
68
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
69
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
70
|
+
readonly hostnameId: import("effect/Schema").String;
|
|
71
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
72
|
+
readonly active: import("effect/Schema").Boolean;
|
|
73
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
74
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
75
|
+
}>>, 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<"deleteOrganization", "DELETE", "/api/admin/organizations/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
76
|
+
readonly id: import("effect/Schema").String;
|
|
77
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
78
|
+
readonly id: import("effect/Schema").String;
|
|
79
|
+
readonly name: import("effect/Schema").String;
|
|
80
|
+
readonly slug: import("effect/Schema").String;
|
|
81
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
82
|
+
readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
83
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
84
|
+
}>>, 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/admin/domains/:id/records", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
85
|
+
readonly id: import("effect/Schema").NonEmptyString;
|
|
86
|
+
}>>, 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<{
|
|
87
|
+
readonly required: import("effect/Schema").Boolean;
|
|
88
|
+
readonly status: import("effect/Schema").String;
|
|
89
|
+
readonly type: import("effect/Schema").String;
|
|
90
|
+
readonly name: import("effect/Schema").String;
|
|
91
|
+
readonly value: import("effect/Schema").String;
|
|
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<"listDomains", "GET", "/api/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<{
|
|
93
|
+
readonly id: import("effect/Schema").String;
|
|
94
|
+
readonly hostname: import("effect/Schema").String;
|
|
95
|
+
readonly rootHostname: import("effect/Schema").String;
|
|
96
|
+
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
97
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
98
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
99
|
+
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
100
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
101
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
102
|
+
readonly hostnameId: import("effect/Schema").String;
|
|
103
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
104
|
+
readonly active: import("effect/Schema").Boolean;
|
|
105
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
106
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
107
|
+
}>>>, 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<"listOrganizations", "GET", "/api/admin/organizations", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
108
|
+
readonly page: import("effect/Schema").Int;
|
|
109
|
+
readonly pageSize: import("effect/Schema").Int;
|
|
110
|
+
readonly globalFilter: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
111
|
+
readonly sort: import("effect/Schema").optional<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").decodeTo<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
112
|
+
readonly id: import("effect/Schema").NonEmptyString;
|
|
113
|
+
readonly direction: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"asc">, import("effect/Schema").Literal<"desc">]>;
|
|
114
|
+
}>>, import("effect/Schema").String, never, never>, never, never>>;
|
|
115
|
+
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
116
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
117
|
+
readonly data: import("effect/Schema").$Array<import("effect/Schema").Schema<{
|
|
118
|
+
readonly id: string;
|
|
119
|
+
readonly name: string;
|
|
120
|
+
readonly slug: string;
|
|
121
|
+
readonly logo?: string | null | undefined;
|
|
122
|
+
readonly metadata?: string | null | undefined;
|
|
123
|
+
readonly createdAt: Date;
|
|
124
|
+
}>>;
|
|
125
|
+
readonly meta: import("effect/Schema").Struct<{
|
|
126
|
+
readonly page: import("effect/Schema").Int;
|
|
127
|
+
readonly pageSize: import("effect/Schema").Int;
|
|
128
|
+
readonly total: import("effect/Schema").Int;
|
|
129
|
+
readonly pageCount: import("effect/Schema").Int;
|
|
14
130
|
}>;
|
|
15
|
-
|
|
131
|
+
}>>, 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<"listUsers", "GET", "/api/admin/users", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
132
|
+
readonly page: import("effect/Schema").Int;
|
|
133
|
+
readonly pageSize: import("effect/Schema").Int;
|
|
134
|
+
readonly globalFilter: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
135
|
+
readonly sort: import("effect/Schema").optional<import("effect/Schema").decodeTo<import("effect/Schema").String, import("effect/Schema").decodeTo<import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
136
|
+
readonly id: import("effect/Schema").NonEmptyString;
|
|
137
|
+
readonly direction: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"asc">, import("effect/Schema").Literal<"desc">]>;
|
|
138
|
+
}>>, import("effect/Schema").String, never, never>, never, never>>;
|
|
139
|
+
readonly projectId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
140
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
141
|
+
readonly data: import("effect/Schema").$Array<import("effect/Schema").Schema<import("effect/Schema").Struct.ReadonlySide<{
|
|
16
142
|
readonly id: import("effect/Schema").String;
|
|
17
143
|
readonly name: import("effect/Schema").String;
|
|
18
144
|
readonly email: import("effect/Schema").String;
|
|
19
145
|
readonly emailVerified: import("effect/Schema").Boolean;
|
|
20
146
|
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
147
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
21
148
|
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
22
149
|
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
|
|
150
|
+
readonly banReason: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
151
|
+
readonly banExpires: import("effect/Schema").NullOr<import("effect/Schema").Date>;
|
|
152
|
+
}, "Type">>>;
|
|
153
|
+
readonly meta: import("effect/Schema").Struct<{
|
|
154
|
+
readonly page: import("effect/Schema").Int;
|
|
155
|
+
readonly pageSize: import("effect/Schema").Int;
|
|
156
|
+
readonly total: import("effect/Schema").Int;
|
|
157
|
+
readonly pageCount: import("effect/Schema").Int;
|
|
26
158
|
}>;
|
|
27
|
-
}
|
|
159
|
+
}>>, 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<"updateDomain", "PATCH", "/api/admin/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
160
|
+
readonly id: import("effect/Schema").NonEmptyString;
|
|
161
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
162
|
+
readonly hostname: import("effect/Schema").NonEmptyString;
|
|
163
|
+
readonly rootHostname: import("effect/Schema").NonEmptyString;
|
|
164
|
+
readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
165
|
+
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
166
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
167
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
168
|
+
readonly id: import("effect/Schema").String;
|
|
169
|
+
readonly hostname: import("effect/Schema").String;
|
|
170
|
+
readonly rootHostname: import("effect/Schema").String;
|
|
171
|
+
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
172
|
+
readonly projectName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
173
|
+
readonly projectLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
174
|
+
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
175
|
+
readonly organizationName: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
176
|
+
readonly organizationLogo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
177
|
+
readonly hostnameId: import("effect/Schema").String;
|
|
178
|
+
readonly managed: import("effect/Schema").Boolean;
|
|
179
|
+
readonly active: import("effect/Schema").Boolean;
|
|
180
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
181
|
+
readonly updatedAt: import("effect/Schema").Date;
|
|
182
|
+
}>>, 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<"updateOrganization", "PATCH", "/api/admin/organizations/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
183
|
+
readonly id: import("effect/Schema").String;
|
|
184
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
185
|
+
readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
186
|
+
readonly slug: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
187
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
188
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
189
|
+
readonly id: import("effect/Schema").String;
|
|
190
|
+
readonly name: import("effect/Schema").String;
|
|
191
|
+
readonly slug: import("effect/Schema").String;
|
|
192
|
+
readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
193
|
+
readonly metadata: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
194
|
+
readonly createdAt: import("effect/Schema").Date;
|
|
195
|
+
}>>, 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>, false> | 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<{
|
|
28
196
|
readonly configId: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"user">, import("effect/Schema").Literal<"organization">, import("effect/Schema").Literal<"service">]>;
|
|
29
197
|
readonly name: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
30
198
|
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").String>;
|
|
@@ -91,182 +259,4 @@ export declare const authApiClient: (baseUrl?: string | undefined) => AtomHttpAp
|
|
|
91
259
|
readonly password: import("effect/Schema").NonEmptyString;
|
|
92
260
|
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
93
261
|
readonly ok: import("effect/Schema").Boolean;
|
|
94
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra").ExtraBadRequest>, never, never>, false
|
|
95
|
-
readonly hostname: import("effect/Schema").NonEmptyString;
|
|
96
|
-
readonly rootHostname: import("effect/Schema").NonEmptyString;
|
|
97
|
-
readonly projectId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
98
|
-
readonly organizationId: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
99
|
-
readonly managed: import("effect/Schema").Boolean;
|
|
100
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
101
|
-
readonly id: import("effect/Schema").String;
|
|
102
|
-
readonly hostname: import("effect/Schema").String;
|
|
103
|
-
readonly rootHostname: import("effect/Schema").String;
|
|
104
|
-
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
105
|
-
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
106
|
-
readonly hostnameId: import("effect/Schema").String;
|
|
107
|
-
readonly managed: import("effect/Schema").Boolean;
|
|
108
|
-
readonly active: import("effect/Schema").Boolean;
|
|
109
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
110
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
111
|
-
}>>, 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").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"deleteDomain", "DELETE", "/api/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
112
|
-
readonly id: import("effect/Schema").NonEmptyString;
|
|
113
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
114
|
-
readonly id: import("effect/Schema").String;
|
|
115
|
-
readonly hostname: import("effect/Schema").String;
|
|
116
|
-
readonly rootHostname: import("effect/Schema").String;
|
|
117
|
-
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
118
|
-
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
119
|
-
readonly hostnameId: import("effect/Schema").String;
|
|
120
|
-
readonly managed: import("effect/Schema").Boolean;
|
|
121
|
-
readonly active: import("effect/Schema").Boolean;
|
|
122
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
123
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
124
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomain", "GET", "/api/domains/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
125
|
-
readonly id: import("effect/Schema").NonEmptyString;
|
|
126
|
-
}>>, 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").Struct<{
|
|
127
|
-
readonly id: import("effect/Schema").String;
|
|
128
|
-
readonly hostname: import("effect/Schema").String;
|
|
129
|
-
readonly rootHostname: import("effect/Schema").String;
|
|
130
|
-
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
131
|
-
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
132
|
-
readonly hostnameId: import("effect/Schema").String;
|
|
133
|
-
readonly managed: import("effect/Schema").Boolean;
|
|
134
|
-
readonly active: import("effect/Schema").Boolean;
|
|
135
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
136
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
137
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getDomainByHost", "GET", "/api/domains/by-host/:hostname", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
138
|
-
readonly hostname: import("effect/Schema").NonEmptyString;
|
|
139
|
-
}>>, 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").Struct<{
|
|
140
|
-
readonly id: import("effect/Schema").String;
|
|
141
|
-
readonly hostname: import("effect/Schema").String;
|
|
142
|
-
readonly rootHostname: import("effect/Schema").String;
|
|
143
|
-
readonly projectId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
144
|
-
readonly organizationId: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
145
|
-
readonly hostnameId: import("effect/Schema").String;
|
|
146
|
-
readonly managed: import("effect/Schema").Boolean;
|
|
147
|
-
readonly active: import("effect/Schema").Boolean;
|
|
148
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
149
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
150
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | 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/domains/:id/records", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
151
|
-
readonly id: import("effect/Schema").NonEmptyString;
|
|
152
|
-
}>>, 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<{
|
|
153
|
-
readonly required: import("effect/Schema").Boolean;
|
|
154
|
-
readonly status: import("effect/Schema").String;
|
|
155
|
-
readonly type: import("effect/Schema").String;
|
|
156
|
-
readonly name: import("effect/Schema").String;
|
|
157
|
-
readonly value: import("effect/Schema").String;
|
|
158
|
-
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"organizations", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getActiveMember", "GET", "/api/organizations/:organizationId/members/:userId", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
159
|
-
readonly organizationId: import("effect/Schema").NonEmptyString;
|
|
160
|
-
readonly userId: import("effect/Schema").NonEmptyString;
|
|
161
|
-
}>>, 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").Struct<{
|
|
162
|
-
readonly id: import("effect/Schema").String;
|
|
163
|
-
readonly organizationId: import("effect/Schema").String;
|
|
164
|
-
readonly userId: import("effect/Schema").String;
|
|
165
|
-
readonly role: import("effect/Schema").String;
|
|
166
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
167
|
-
readonly user: import("effect/Schema").Struct<{
|
|
168
|
-
readonly id: import("effect/Schema").String;
|
|
169
|
-
readonly name: import("effect/Schema").String;
|
|
170
|
-
readonly email: import("effect/Schema").String;
|
|
171
|
-
readonly emailVerified: import("effect/Schema").Boolean;
|
|
172
|
-
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
173
|
-
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
174
|
-
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
175
|
-
readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
176
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
177
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
178
|
-
}>;
|
|
179
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getOrganization", "GET", "/api/organizations/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
180
|
-
readonly id: import("effect/Schema").NonEmptyString;
|
|
181
|
-
}>>, 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").Struct<{
|
|
182
|
-
readonly id: import("effect/Schema").String;
|
|
183
|
-
readonly name: import("effect/Schema").String;
|
|
184
|
-
readonly slug: import("effect/Schema").String;
|
|
185
|
-
readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
186
|
-
readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
187
|
-
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
188
|
-
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
189
|
-
readonly name: import("effect/Schema").String;
|
|
190
|
-
readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
191
|
-
readonly icon: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
192
|
-
readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
193
|
-
readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
194
|
-
}>>;
|
|
195
|
-
}>>;
|
|
196
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
197
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listOrganizationMembers", "GET", "/api/organizations/:organizationId/members", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
198
|
-
readonly organizationId: import("effect/Schema").NonEmptyString;
|
|
199
|
-
}>>, 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<{
|
|
200
|
-
readonly id: import("effect/Schema").String;
|
|
201
|
-
readonly organizationId: import("effect/Schema").String;
|
|
202
|
-
readonly userId: import("effect/Schema").String;
|
|
203
|
-
readonly role: import("effect/Schema").String;
|
|
204
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
205
|
-
readonly user: import("effect/Schema").Struct<{
|
|
206
|
-
readonly id: import("effect/Schema").String;
|
|
207
|
-
readonly name: import("effect/Schema").String;
|
|
208
|
-
readonly email: import("effect/Schema").String;
|
|
209
|
-
readonly emailVerified: import("effect/Schema").Boolean;
|
|
210
|
-
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
211
|
-
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
212
|
-
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
213
|
-
readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
214
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
215
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
216
|
-
}>;
|
|
217
|
-
}>>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listOrganizations", "GET", "/api/organizations", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
218
|
-
readonly ids: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
219
|
-
readonly userId: import("effect/Schema").optional<import("effect/Schema").NonEmptyString>;
|
|
220
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
221
|
-
readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
222
|
-
readonly id: import("effect/Schema").String;
|
|
223
|
-
readonly name: import("effect/Schema").String;
|
|
224
|
-
readonly slug: import("effect/Schema").String;
|
|
225
|
-
readonly logo: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
226
|
-
readonly metadata: import("effect/Schema").NullOr<import("effect/Schema").Struct<{
|
|
227
|
-
readonly translations: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
228
|
-
readonly locale: import("effect/Schema").Union<readonly [import("effect/Schema").Literal<"en">, import("effect/Schema").Literal<"fr">]>;
|
|
229
|
-
readonly name: import("effect/Schema").String;
|
|
230
|
-
readonly logo: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
231
|
-
readonly icon: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
232
|
-
readonly contactEmail: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
233
|
-
readonly location: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
234
|
-
}>>;
|
|
235
|
-
}>>;
|
|
236
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
237
|
-
}>>;
|
|
238
|
-
readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
239
|
-
}>>, 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").InternalServerError>, never, never>, false> | import("effect/unstable/httpapi/HttpApiGroup").HttpApiGroup<"users", import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getUser", "GET", "/api/users/:id", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
240
|
-
readonly id: import("effect/Schema").NonEmptyString;
|
|
241
|
-
}>>, 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").Struct<{
|
|
242
|
-
readonly id: import("effect/Schema").String;
|
|
243
|
-
readonly name: import("effect/Schema").String;
|
|
244
|
-
readonly email: import("effect/Schema").String;
|
|
245
|
-
readonly emailVerified: import("effect/Schema").Boolean;
|
|
246
|
-
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
247
|
-
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
248
|
-
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
249
|
-
readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
250
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
251
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
252
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").NotFound | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"getUserActiveOrganization", "GET", "/api/organizations/user/:userId/active", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
253
|
-
readonly userId: import("effect/Schema").NonEmptyString;
|
|
254
|
-
}>>, 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").Struct<{
|
|
255
|
-
readonly id: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
256
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never> | import("effect/unstable/httpapi/HttpApiEndpoint").HttpApiEndpoint<"listUsersByIds", "GET", "/api/users", import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<import("effect/Schema").Struct<{
|
|
257
|
-
readonly ids: import("effect/Schema").NonEmptyString;
|
|
258
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").StringTree<never>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<import("effect/Schema").Struct<{
|
|
259
|
-
readonly data: import("effect/Schema").$Array<import("effect/Schema").Struct<{
|
|
260
|
-
readonly id: import("effect/Schema").String;
|
|
261
|
-
readonly name: import("effect/Schema").String;
|
|
262
|
-
readonly email: import("effect/Schema").String;
|
|
263
|
-
readonly emailVerified: import("effect/Schema").Boolean;
|
|
264
|
-
readonly image: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
265
|
-
readonly role: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
266
|
-
readonly banned: import("effect/Schema").NullOr<import("effect/Schema").Boolean>;
|
|
267
|
-
readonly lastLoginMethod: import("effect/Schema").optional<import("effect/Schema").NullOr<import("effect/Schema").String>>;
|
|
268
|
-
readonly createdAt: import("effect/Schema").Date;
|
|
269
|
-
readonly updatedAt: import("effect/Schema").Date;
|
|
270
|
-
}>>;
|
|
271
|
-
readonly missingIds: import("effect/Schema").$Array<import("effect/Schema").String>;
|
|
272
|
-
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("effect/unstable/httpapi/HttpApiError").Unauthorized | typeof import("effect/unstable/httpapi/HttpApiError").InternalServerError>, never, never>, false>>;
|
|
262
|
+
}>>, import("effect/unstable/httpapi/HttpApiEndpoint").Json<typeof import("../extra").ExtraBadRequest>, never, never>, false>>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Effect, Layer } from "effect";
|
|
2
|
+
import { FetchHttpClient, HttpClient } from "effect/unstable/http";
|
|
3
|
+
import { AtomHttpApi } from "effect/unstable/reactivity";
|
|
4
|
+
import { AuthClientApi } from "../api";
|
|
5
|
+
import { defaultBaseUrl } from "../config";
|
|
6
|
+
const fetchHttpClientLayer = FetchHttpClient.layer;
|
|
7
|
+
const authClientApiUrl = (baseUrl) => {
|
|
8
|
+
const url = baseUrl?.trim() ||
|
|
9
|
+
(typeof window === "undefined" ? defaultBaseUrl() : window.location.origin);
|
|
10
|
+
return url.replace(/\/$/, "");
|
|
11
|
+
};
|
|
12
|
+
const createAuthClientApiClient = (key) => AtomHttpApi.Service()(`AuthClientApi:${key}`, {
|
|
13
|
+
api: AuthClientApi,
|
|
14
|
+
baseUrl: key,
|
|
15
|
+
httpClient: fetchHttpClientLayer,
|
|
16
|
+
transformClient: (client) => HttpClient.makeWith((request) => client.postprocess(request).pipe(Effect.provideService(FetchHttpClient.RequestInit, {
|
|
17
|
+
credentials: "include",
|
|
18
|
+
})), client.preprocess),
|
|
19
|
+
});
|
|
20
|
+
const authClientApis = new Map();
|
|
21
|
+
export const authClientApi = (baseUrl) => {
|
|
22
|
+
const key = authClientApiUrl(baseUrl);
|
|
23
|
+
const existing = authClientApis.get(key);
|
|
24
|
+
if (existing)
|
|
25
|
+
return existing;
|
|
26
|
+
const client = createAuthClientApiClient(key);
|
|
27
|
+
authClientApis.set(key, client);
|
|
28
|
+
return client;
|
|
29
|
+
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { apiKeyClient } from "@better-auth/api-key/client";
|
|
2
|
-
import type { emailOTPClient, genericOAuthClient, lastLoginMethodClient, organizationClient, twoFactorClient } from "better-auth/client/plugins";
|
|
2
|
+
import type { adminClient, emailOTPClient, genericOAuthClient, lastLoginMethodClient, organizationClient, twoFactorClient } from "better-auth/client/plugins";
|
|
3
3
|
import type { createAuthClient } from "better-auth/react";
|
|
4
4
|
export type AuthUiClient = ReturnType<typeof createAuthClient<{
|
|
5
5
|
plugins: [
|
|
6
|
+
ReturnType<typeof adminClient>,
|
|
6
7
|
ReturnType<typeof emailOTPClient>,
|
|
7
8
|
ReturnType<typeof lastLoginMethodClient>,
|
|
8
9
|
ReturnType<typeof organizationClient>,
|
|
@@ -11,9 +11,9 @@ import { Card, CardContent, CardDescription, CardHeader, CardTitle, } from "@/co
|
|
|
11
11
|
import { Field, FieldLabel } from "@/components/ui/field";
|
|
12
12
|
import { FieldError, useAppForm } from "@/components/ui/form";
|
|
13
13
|
import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, } from "@/components/ui/input-otp";
|
|
14
|
-
import {
|
|
15
|
-
import { authApiClient } from "./auth-api-client";
|
|
14
|
+
import { authClientApi } from "./auth-client-api";
|
|
16
15
|
import { useKrakstackAuth } from "./auth-provider";
|
|
16
|
+
import { cn } from "./utils";
|
|
17
17
|
const EMAIL_OTP_RESEND_COOLDOWN_SECONDS = 60;
|
|
18
18
|
const defaultMessages = {
|
|
19
19
|
en: {
|
|
@@ -140,7 +140,7 @@ const useAuthProjectConfig = (baseUrl, searchString, projectConfig) => {
|
|
|
140
140
|
const clientId = getSearchParam(searchString, "client_id");
|
|
141
141
|
const host = getBrowserAuthHost();
|
|
142
142
|
const atom = projectConfig === undefined
|
|
143
|
-
?
|
|
143
|
+
? authClientApi(baseUrl).query("authExtra", "getProjectPublicConfig", {
|
|
144
144
|
query: {
|
|
145
145
|
...(projectId ? { projectId } : {}),
|
|
146
146
|
...(clientId ? { clientId } : {}),
|
|
@@ -12,23 +12,24 @@ export type KrakstackAuthProviderProps = {
|
|
|
12
12
|
export type KrakstackAuthContextValue = {
|
|
13
13
|
locale: KrakstackAuthLocale;
|
|
14
14
|
baseUrl?: string | undefined;
|
|
15
|
+
projectId?: string | null | undefined;
|
|
15
16
|
authClient: AuthUiClient;
|
|
16
17
|
projectConfig: ExtraProjectPublicConfig | null;
|
|
17
18
|
};
|
|
18
19
|
export declare function KrakstackAuthProvider({ children, locale, baseUrl, projectId, authClient, }: KrakstackAuthProviderProps): import("react").JSX.Element;
|
|
19
20
|
export declare const useKrakstackAuth: () => KrakstackAuthContextValue | null;
|
|
20
|
-
export declare const useKrakstackAuthProjectConfig: () => {
|
|
21
|
-
readonly projectKey:
|
|
22
|
-
readonly name:
|
|
23
|
-
readonly logoUrl:
|
|
24
|
-
readonly authDomain:
|
|
25
|
-
readonly rootDomain:
|
|
26
|
-
readonly themeCss:
|
|
27
|
-
readonly authOptions: {
|
|
28
|
-
readonly emailPassword:
|
|
29
|
-
readonly emailOtp:
|
|
30
|
-
readonly google:
|
|
31
|
-
readonly signUp:
|
|
32
|
-
readonly signUpName:
|
|
33
|
-
}
|
|
34
|
-
} | null;
|
|
21
|
+
export declare const useKrakstackAuthProjectConfig: () => import("effect/Schema").Struct.ReadonlySide<{
|
|
22
|
+
readonly projectKey: import("effect/Schema").String;
|
|
23
|
+
readonly name: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
24
|
+
readonly logoUrl: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
25
|
+
readonly authDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
26
|
+
readonly rootDomain: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
27
|
+
readonly themeCss: import("effect/Schema").NullOr<import("effect/Schema").String>;
|
|
28
|
+
readonly authOptions: import("effect/Schema").Struct<{
|
|
29
|
+
readonly emailPassword: import("effect/Schema").Boolean;
|
|
30
|
+
readonly emailOtp: import("effect/Schema").Boolean;
|
|
31
|
+
readonly google: import("effect/Schema").Boolean;
|
|
32
|
+
readonly signUp: import("effect/Schema").Boolean;
|
|
33
|
+
readonly signUpName: import("effect/Schema").Boolean;
|
|
34
|
+
}>;
|
|
35
|
+
}, "Type"> | null;
|