@krak-stack/auth 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -14
- package/dist/better-auth/api.d.ts +53 -0
- package/dist/better-auth/api.js +26 -0
- package/dist/better-auth/index.d.ts +31 -0
- package/dist/better-auth/index.js +12 -0
- package/dist/better-auth/schema.d.ts +35 -0
- package/dist/better-auth/schema.js +53 -0
- package/dist/client.d.ts +307 -109
- package/dist/client.js +44 -10
- package/dist/extra/api.d.ts +109 -0
- package/dist/extra/api.js +70 -0
- package/dist/extra/index.d.ts +60 -0
- package/dist/{frontend → extra}/index.js +5 -4
- package/dist/extra/schema.d.ts +90 -0
- package/dist/extra/schema.js +162 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +3 -2
- package/dist/schema.d.ts +13 -0
- package/dist/schema.js +30 -0
- package/dist/{backend → server}/api.d.ts +13 -12
- package/dist/{backend → server}/api.js +23 -17
- package/dist/server/index.d.ts +4 -0
- package/dist/server/index.js +2 -0
- package/dist/{backend → server}/schema.d.ts +14 -14
- package/dist/server/schema.js +81 -0
- package/package.json +11 -7
- package/dist/backend/index.d.ts +0 -4
- package/dist/backend/index.js +0 -2
- package/dist/backend/schema.js +0 -81
- package/dist/frontend/api.d.ts +0 -16
- package/dist/frontend/api.js +0 -21
- package/dist/frontend/index.d.ts +0 -14
- package/dist/frontend/schema.d.ts +0 -11
- package/dist/frontend/schema.js +0 -18
package/dist/client.d.ts
CHANGED
|
@@ -14,51 +14,8 @@ export declare class AuthClientConfig extends AuthClientConfig_base {
|
|
|
14
14
|
static readonly layer: Layer.Layer<AuthClientConfig, import("effect/Config").ConfigError, never>;
|
|
15
15
|
}
|
|
16
16
|
declare const AuthClient_base: Context.ServiceClass<AuthClient, "@krak-stack/auth/AuthClient", {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
readonly query: {
|
|
20
|
-
readonly ids: string;
|
|
21
|
-
};
|
|
22
|
-
readonly responseMode?: Mode;
|
|
23
|
-
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
24
|
-
readonly data: readonly {
|
|
25
|
-
readonly id: string;
|
|
26
|
-
readonly name: string;
|
|
27
|
-
readonly email: string;
|
|
28
|
-
readonly emailVerified: boolean;
|
|
29
|
-
readonly image: string | null;
|
|
30
|
-
readonly role: string | null;
|
|
31
|
-
readonly banned: boolean | null;
|
|
32
|
-
readonly createdAt: Date;
|
|
33
|
-
readonly updatedAt: Date;
|
|
34
|
-
}[];
|
|
35
|
-
readonly missingIds: readonly string[];
|
|
36
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
37
|
-
readonly getUser: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
38
|
-
readonly params: {
|
|
39
|
-
readonly id: string;
|
|
40
|
-
};
|
|
41
|
-
readonly responseMode?: Mode;
|
|
42
|
-
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
43
|
-
readonly id: string;
|
|
44
|
-
readonly name: string;
|
|
45
|
-
readonly email: string;
|
|
46
|
-
readonly emailVerified: boolean;
|
|
47
|
-
readonly image: string | null;
|
|
48
|
-
readonly role: string | null;
|
|
49
|
-
readonly banned: boolean | null;
|
|
50
|
-
readonly createdAt: Date;
|
|
51
|
-
readonly updatedAt: Date;
|
|
52
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").NotFound), [Mode] extends ["response-only"] ? never : never>;
|
|
53
|
-
readonly getUserActiveOrganization: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
54
|
-
readonly params: {
|
|
55
|
-
readonly userId: string;
|
|
56
|
-
};
|
|
57
|
-
readonly responseMode?: Mode;
|
|
58
|
-
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
59
|
-
readonly id: string | null;
|
|
60
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
61
|
-
readonly listOrganizations: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
17
|
+
server: {
|
|
18
|
+
listOrganizations: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
62
19
|
readonly query: {
|
|
63
20
|
readonly ids?: string | undefined;
|
|
64
21
|
readonly userId?: string | undefined;
|
|
@@ -82,8 +39,8 @@ declare const AuthClient_base: Context.ServiceClass<AuthClient, "@krak-stack/aut
|
|
|
82
39
|
readonly createdAt: Date;
|
|
83
40
|
}[];
|
|
84
41
|
readonly missingIds: readonly string[];
|
|
85
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").
|
|
86
|
-
|
|
42
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
43
|
+
getOrganization: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
87
44
|
readonly params: {
|
|
88
45
|
readonly id: string;
|
|
89
46
|
};
|
|
@@ -103,8 +60,8 @@ declare const AuthClient_base: Context.ServiceClass<AuthClient, "@krak-stack/aut
|
|
|
103
60
|
}[];
|
|
104
61
|
} | null;
|
|
105
62
|
readonly createdAt: Date;
|
|
106
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").
|
|
107
|
-
|
|
63
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
64
|
+
getActiveMember: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
108
65
|
readonly params: {
|
|
109
66
|
readonly organizationId: string;
|
|
110
67
|
readonly userId: string;
|
|
@@ -127,8 +84,8 @@ declare const AuthClient_base: Context.ServiceClass<AuthClient, "@krak-stack/aut
|
|
|
127
84
|
readonly createdAt: Date;
|
|
128
85
|
readonly updatedAt: Date;
|
|
129
86
|
};
|
|
130
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").
|
|
131
|
-
|
|
87
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
88
|
+
listOrganizationMembers: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
132
89
|
readonly params: {
|
|
133
90
|
readonly organizationId: string;
|
|
134
91
|
};
|
|
@@ -151,47 +108,13 @@ declare const AuthClient_base: Context.ServiceClass<AuthClient, "@krak-stack/aut
|
|
|
151
108
|
readonly updatedAt: Date;
|
|
152
109
|
};
|
|
153
110
|
}[], Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
readonly payload: {
|
|
158
|
-
readonly fileName: string;
|
|
159
|
-
readonly contentType: string;
|
|
111
|
+
listUsersByIds: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
112
|
+
readonly query: {
|
|
113
|
+
readonly ids: string;
|
|
160
114
|
};
|
|
161
115
|
readonly responseMode?: Mode;
|
|
162
116
|
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
163
|
-
readonly
|
|
164
|
-
readonly url: string;
|
|
165
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").Forbidden), [Mode] extends ["response-only"] ? never : never>;
|
|
166
|
-
};
|
|
167
|
-
}> & {
|
|
168
|
-
readonly make: Effect.Effect<{
|
|
169
|
-
backend: {
|
|
170
|
-
readonly listUsersByIds: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
171
|
-
readonly query: {
|
|
172
|
-
readonly ids: string;
|
|
173
|
-
};
|
|
174
|
-
readonly responseMode?: Mode;
|
|
175
|
-
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
176
|
-
readonly data: readonly {
|
|
177
|
-
readonly id: string;
|
|
178
|
-
readonly name: string;
|
|
179
|
-
readonly email: string;
|
|
180
|
-
readonly emailVerified: boolean;
|
|
181
|
-
readonly image: string | null;
|
|
182
|
-
readonly role: string | null;
|
|
183
|
-
readonly banned: boolean | null;
|
|
184
|
-
readonly createdAt: Date;
|
|
185
|
-
readonly updatedAt: Date;
|
|
186
|
-
}[];
|
|
187
|
-
readonly missingIds: readonly string[];
|
|
188
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
189
|
-
readonly getUser: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
190
|
-
readonly params: {
|
|
191
|
-
readonly id: string;
|
|
192
|
-
};
|
|
193
|
-
readonly responseMode?: Mode;
|
|
194
|
-
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
117
|
+
readonly data: readonly {
|
|
195
118
|
readonly id: string;
|
|
196
119
|
readonly name: string;
|
|
197
120
|
readonly email: string;
|
|
@@ -201,16 +124,149 @@ declare const AuthClient_base: Context.ServiceClass<AuthClient, "@krak-stack/aut
|
|
|
201
124
|
readonly banned: boolean | null;
|
|
202
125
|
readonly createdAt: Date;
|
|
203
126
|
readonly updatedAt: Date;
|
|
204
|
-
}
|
|
205
|
-
readonly
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
readonly
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
readonly
|
|
127
|
+
}[];
|
|
128
|
+
readonly missingIds: readonly string[];
|
|
129
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
130
|
+
getUser: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
131
|
+
readonly params: {
|
|
132
|
+
readonly id: string;
|
|
133
|
+
};
|
|
134
|
+
readonly responseMode?: Mode;
|
|
135
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
136
|
+
readonly id: string;
|
|
137
|
+
readonly name: string;
|
|
138
|
+
readonly email: string;
|
|
139
|
+
readonly emailVerified: boolean;
|
|
140
|
+
readonly image: string | null;
|
|
141
|
+
readonly role: string | null;
|
|
142
|
+
readonly banned: boolean | null;
|
|
143
|
+
readonly createdAt: Date;
|
|
144
|
+
readonly updatedAt: Date;
|
|
145
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
146
|
+
getUserActiveOrganization: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
147
|
+
readonly params: {
|
|
148
|
+
readonly userId: string;
|
|
149
|
+
};
|
|
150
|
+
readonly responseMode?: Mode;
|
|
151
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
152
|
+
readonly id: string | null;
|
|
153
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
154
|
+
};
|
|
155
|
+
extra: {
|
|
156
|
+
readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
157
|
+
readonly payload: {
|
|
158
|
+
readonly newPassword: string;
|
|
159
|
+
};
|
|
160
|
+
readonly responseMode?: Mode;
|
|
161
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
162
|
+
readonly ok: boolean;
|
|
163
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("./extra").ExtraBadRequest), [Mode] extends ["response-only"] ? never : never>;
|
|
164
|
+
readonly verifyPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
165
|
+
readonly payload: {
|
|
166
|
+
readonly password: string;
|
|
167
|
+
};
|
|
168
|
+
readonly responseMode?: Mode;
|
|
169
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
170
|
+
readonly ok: boolean;
|
|
171
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("./extra").ExtraBadRequest), [Mode] extends ["response-only"] ? never : never>;
|
|
172
|
+
readonly createApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
173
|
+
readonly payload: {
|
|
174
|
+
readonly configId: "user" | "organization" | "service";
|
|
175
|
+
readonly name?: string | undefined;
|
|
176
|
+
readonly organizationId?: string | undefined;
|
|
177
|
+
readonly permissions?: {
|
|
178
|
+
readonly [x: string]: readonly string[];
|
|
179
|
+
} | undefined;
|
|
180
|
+
};
|
|
181
|
+
readonly responseMode?: Mode;
|
|
182
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
183
|
+
readonly id: string;
|
|
184
|
+
readonly key: string;
|
|
185
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("./extra").ExtraBadRequest), [Mode] extends ["response-only"] ? never : never>;
|
|
186
|
+
readonly verifyApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
187
|
+
readonly payload: {
|
|
188
|
+
readonly key: string;
|
|
189
|
+
readonly configId?: "user" | "organization" | "service" | undefined;
|
|
190
|
+
readonly permissions?: {
|
|
191
|
+
readonly [x: string]: readonly string[];
|
|
192
|
+
} | undefined;
|
|
193
|
+
};
|
|
194
|
+
readonly responseMode?: Mode;
|
|
195
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
196
|
+
readonly valid: boolean;
|
|
197
|
+
readonly error: {
|
|
198
|
+
readonly message: string;
|
|
199
|
+
readonly code: string;
|
|
200
|
+
} | null;
|
|
201
|
+
readonly key: {
|
|
202
|
+
readonly id: string;
|
|
203
|
+
readonly configId: string;
|
|
204
|
+
readonly name: string | null;
|
|
205
|
+
readonly start: string | null;
|
|
206
|
+
readonly prefix: string | null;
|
|
207
|
+
readonly referenceId: string;
|
|
208
|
+
readonly enabled: boolean | null;
|
|
209
|
+
readonly expiresAt: Date | null;
|
|
210
|
+
readonly createdAt: Date;
|
|
211
|
+
readonly updatedAt: Date;
|
|
212
|
+
readonly permissions: {
|
|
213
|
+
readonly [x: string]: readonly string[];
|
|
214
|
+
} | null;
|
|
215
|
+
readonly metadata: unknown;
|
|
216
|
+
} | null;
|
|
217
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("./extra").ExtraBadRequest), [Mode] extends ["response-only"] ? never : never>;
|
|
218
|
+
readonly presignUserImageUpload: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
219
|
+
readonly payload: {
|
|
220
|
+
readonly fileName: string;
|
|
221
|
+
readonly contentType: string;
|
|
222
|
+
};
|
|
223
|
+
readonly responseMode?: Mode;
|
|
224
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
225
|
+
readonly uploadUrl: string;
|
|
226
|
+
readonly url: string;
|
|
227
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("./extra").ExtraBadRequest), [Mode] extends ["response-only"] ? never : never>;
|
|
228
|
+
readonly presign: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
229
|
+
readonly payload: {
|
|
230
|
+
readonly fileName: string;
|
|
231
|
+
readonly contentType: string;
|
|
232
|
+
};
|
|
233
|
+
readonly responseMode?: Mode;
|
|
234
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
235
|
+
readonly uploadUrl: string;
|
|
236
|
+
readonly url: string;
|
|
237
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").Forbidden | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
238
|
+
};
|
|
239
|
+
getSession: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: void | {
|
|
240
|
+
readonly responseMode?: Mode;
|
|
241
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
242
|
+
readonly session: {
|
|
243
|
+
readonly id: string;
|
|
244
|
+
readonly expiresAt: Date;
|
|
245
|
+
readonly token: string;
|
|
246
|
+
readonly createdAt: Date;
|
|
247
|
+
readonly updatedAt: Date;
|
|
248
|
+
readonly userId: string;
|
|
249
|
+
readonly ipAddress?: string | null | undefined;
|
|
250
|
+
readonly userAgent?: string | null | undefined;
|
|
251
|
+
readonly impersonatedBy?: string | null | undefined;
|
|
252
|
+
readonly activeOrganizationId?: string | null | undefined;
|
|
253
|
+
};
|
|
254
|
+
readonly user: {
|
|
255
|
+
readonly id: string;
|
|
256
|
+
readonly name: string;
|
|
257
|
+
readonly email: string;
|
|
258
|
+
readonly emailVerified: boolean;
|
|
259
|
+
readonly image: string | null;
|
|
260
|
+
readonly role: string | null;
|
|
261
|
+
readonly banned: boolean | null;
|
|
262
|
+
readonly createdAt: Date;
|
|
263
|
+
readonly updatedAt: Date;
|
|
264
|
+
};
|
|
265
|
+
} | null, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("./better-auth").TooManyRequests | import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").Forbidden | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
266
|
+
}> & {
|
|
267
|
+
readonly make: Effect.Effect<{
|
|
268
|
+
server: {
|
|
269
|
+
listOrganizations: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
214
270
|
readonly query: {
|
|
215
271
|
readonly ids?: string | undefined;
|
|
216
272
|
readonly userId?: string | undefined;
|
|
@@ -234,8 +290,8 @@ declare const AuthClient_base: Context.ServiceClass<AuthClient, "@krak-stack/aut
|
|
|
234
290
|
readonly createdAt: Date;
|
|
235
291
|
}[];
|
|
236
292
|
readonly missingIds: readonly string[];
|
|
237
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").
|
|
238
|
-
|
|
293
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
294
|
+
getOrganization: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
239
295
|
readonly params: {
|
|
240
296
|
readonly id: string;
|
|
241
297
|
};
|
|
@@ -255,8 +311,8 @@ declare const AuthClient_base: Context.ServiceClass<AuthClient, "@krak-stack/aut
|
|
|
255
311
|
}[];
|
|
256
312
|
} | null;
|
|
257
313
|
readonly createdAt: Date;
|
|
258
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").
|
|
259
|
-
|
|
314
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
315
|
+
getActiveMember: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
260
316
|
readonly params: {
|
|
261
317
|
readonly organizationId: string;
|
|
262
318
|
readonly userId: string;
|
|
@@ -279,8 +335,8 @@ declare const AuthClient_base: Context.ServiceClass<AuthClient, "@krak-stack/aut
|
|
|
279
335
|
readonly createdAt: Date;
|
|
280
336
|
readonly updatedAt: Date;
|
|
281
337
|
};
|
|
282
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").
|
|
283
|
-
|
|
338
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
339
|
+
listOrganizationMembers: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
284
340
|
readonly params: {
|
|
285
341
|
readonly organizationId: string;
|
|
286
342
|
};
|
|
@@ -303,9 +359,124 @@ declare const AuthClient_base: Context.ServiceClass<AuthClient, "@krak-stack/aut
|
|
|
303
359
|
readonly updatedAt: Date;
|
|
304
360
|
};
|
|
305
361
|
}[], Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
362
|
+
listUsersByIds: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
363
|
+
readonly query: {
|
|
364
|
+
readonly ids: string;
|
|
365
|
+
};
|
|
366
|
+
readonly responseMode?: Mode;
|
|
367
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
368
|
+
readonly data: readonly {
|
|
369
|
+
readonly id: string;
|
|
370
|
+
readonly name: string;
|
|
371
|
+
readonly email: string;
|
|
372
|
+
readonly emailVerified: boolean;
|
|
373
|
+
readonly image: string | null;
|
|
374
|
+
readonly role: string | null;
|
|
375
|
+
readonly banned: boolean | null;
|
|
376
|
+
readonly createdAt: Date;
|
|
377
|
+
readonly updatedAt: Date;
|
|
378
|
+
}[];
|
|
379
|
+
readonly missingIds: readonly string[];
|
|
380
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
381
|
+
getUser: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
382
|
+
readonly params: {
|
|
383
|
+
readonly id: string;
|
|
384
|
+
};
|
|
385
|
+
readonly responseMode?: Mode;
|
|
386
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
387
|
+
readonly id: string;
|
|
388
|
+
readonly name: string;
|
|
389
|
+
readonly email: string;
|
|
390
|
+
readonly emailVerified: boolean;
|
|
391
|
+
readonly image: string | null;
|
|
392
|
+
readonly role: string | null;
|
|
393
|
+
readonly banned: boolean | null;
|
|
394
|
+
readonly createdAt: Date;
|
|
395
|
+
readonly updatedAt: Date;
|
|
396
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
397
|
+
getUserActiveOrganization: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
398
|
+
readonly params: {
|
|
399
|
+
readonly userId: string;
|
|
400
|
+
};
|
|
401
|
+
readonly responseMode?: Mode;
|
|
402
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
403
|
+
readonly id: string | null;
|
|
404
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
306
405
|
};
|
|
307
|
-
|
|
308
|
-
|
|
406
|
+
extra: {
|
|
407
|
+
readonly setPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
408
|
+
readonly payload: {
|
|
409
|
+
readonly newPassword: string;
|
|
410
|
+
};
|
|
411
|
+
readonly responseMode?: Mode;
|
|
412
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
413
|
+
readonly ok: boolean;
|
|
414
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("./extra").ExtraBadRequest), [Mode] extends ["response-only"] ? never : never>;
|
|
415
|
+
readonly verifyPassword: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
416
|
+
readonly payload: {
|
|
417
|
+
readonly password: string;
|
|
418
|
+
};
|
|
419
|
+
readonly responseMode?: Mode;
|
|
420
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
421
|
+
readonly ok: boolean;
|
|
422
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("./extra").ExtraBadRequest), [Mode] extends ["response-only"] ? never : never>;
|
|
423
|
+
readonly createApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
424
|
+
readonly payload: {
|
|
425
|
+
readonly configId: "user" | "organization" | "service";
|
|
426
|
+
readonly name?: string | undefined;
|
|
427
|
+
readonly organizationId?: string | undefined;
|
|
428
|
+
readonly permissions?: {
|
|
429
|
+
readonly [x: string]: readonly string[];
|
|
430
|
+
} | undefined;
|
|
431
|
+
};
|
|
432
|
+
readonly responseMode?: Mode;
|
|
433
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
434
|
+
readonly id: string;
|
|
435
|
+
readonly key: string;
|
|
436
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("./extra").ExtraBadRequest), [Mode] extends ["response-only"] ? never : never>;
|
|
437
|
+
readonly verifyApiKey: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
438
|
+
readonly payload: {
|
|
439
|
+
readonly key: string;
|
|
440
|
+
readonly configId?: "user" | "organization" | "service" | undefined;
|
|
441
|
+
readonly permissions?: {
|
|
442
|
+
readonly [x: string]: readonly string[];
|
|
443
|
+
} | undefined;
|
|
444
|
+
};
|
|
445
|
+
readonly responseMode?: Mode;
|
|
446
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
447
|
+
readonly valid: boolean;
|
|
448
|
+
readonly error: {
|
|
449
|
+
readonly message: string;
|
|
450
|
+
readonly code: string;
|
|
451
|
+
} | null;
|
|
452
|
+
readonly key: {
|
|
453
|
+
readonly id: string;
|
|
454
|
+
readonly configId: string;
|
|
455
|
+
readonly name: string | null;
|
|
456
|
+
readonly start: string | null;
|
|
457
|
+
readonly prefix: string | null;
|
|
458
|
+
readonly referenceId: string;
|
|
459
|
+
readonly enabled: boolean | null;
|
|
460
|
+
readonly expiresAt: Date | null;
|
|
461
|
+
readonly createdAt: Date;
|
|
462
|
+
readonly updatedAt: Date;
|
|
463
|
+
readonly permissions: {
|
|
464
|
+
readonly [x: string]: readonly string[];
|
|
465
|
+
} | null;
|
|
466
|
+
readonly metadata: unknown;
|
|
467
|
+
} | null;
|
|
468
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("./extra").ExtraBadRequest), [Mode] extends ["response-only"] ? never : never>;
|
|
469
|
+
readonly presignUserImageUpload: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
470
|
+
readonly payload: {
|
|
471
|
+
readonly fileName: string;
|
|
472
|
+
readonly contentType: string;
|
|
473
|
+
};
|
|
474
|
+
readonly responseMode?: Mode;
|
|
475
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
476
|
+
readonly uploadUrl: string;
|
|
477
|
+
readonly url: string;
|
|
478
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").InternalServerError | import("./extra").ExtraBadRequest), [Mode] extends ["response-only"] ? never : never>;
|
|
479
|
+
readonly presign: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: {
|
|
309
480
|
readonly payload: {
|
|
310
481
|
readonly fileName: string;
|
|
311
482
|
readonly contentType: string;
|
|
@@ -314,11 +485,38 @@ declare const AuthClient_base: Context.ServiceClass<AuthClient, "@krak-stack/aut
|
|
|
314
485
|
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
315
486
|
readonly uploadUrl: string;
|
|
316
487
|
readonly url: string;
|
|
317
|
-
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").
|
|
488
|
+
}, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").Forbidden | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
318
489
|
};
|
|
490
|
+
getSession: <Mode extends HttpApiClient.Client.ResponseMode = import("effect/unstable/httpapi/HttpApiEndpoint").ClientResponseMode>(request: void | {
|
|
491
|
+
readonly responseMode?: Mode;
|
|
492
|
+
}) => Effect.Effect<HttpApiClient.Client.Response<{
|
|
493
|
+
readonly session: {
|
|
494
|
+
readonly id: string;
|
|
495
|
+
readonly expiresAt: Date;
|
|
496
|
+
readonly token: string;
|
|
497
|
+
readonly createdAt: Date;
|
|
498
|
+
readonly updatedAt: Date;
|
|
499
|
+
readonly userId: string;
|
|
500
|
+
readonly ipAddress?: string | null | undefined;
|
|
501
|
+
readonly userAgent?: string | null | undefined;
|
|
502
|
+
readonly impersonatedBy?: string | null | undefined;
|
|
503
|
+
readonly activeOrganizationId?: string | null | undefined;
|
|
504
|
+
};
|
|
505
|
+
readonly user: {
|
|
506
|
+
readonly id: string;
|
|
507
|
+
readonly name: string;
|
|
508
|
+
readonly email: string;
|
|
509
|
+
readonly emailVerified: boolean;
|
|
510
|
+
readonly image: string | null;
|
|
511
|
+
readonly role: string | null;
|
|
512
|
+
readonly banned: boolean | null;
|
|
513
|
+
readonly createdAt: Date;
|
|
514
|
+
readonly updatedAt: Date;
|
|
515
|
+
};
|
|
516
|
+
} | null, Mode>, import("effect/unstable/http/HttpClientError").HttpClientError | ([Mode] extends ["response-only"] ? never : import("effect/Schema").SchemaError | import("./better-auth").TooManyRequests | import("effect/unstable/httpapi/HttpApiError").BadRequest | import("effect/unstable/httpapi/HttpApiError").Unauthorized | import("effect/unstable/httpapi/HttpApiError").Forbidden | import("effect/unstable/httpapi/HttpApiError").NotFound | import("effect/unstable/httpapi/HttpApiError").InternalServerError), [Mode] extends ["response-only"] ? never : never>;
|
|
319
517
|
}, never, AuthClientConfig | HttpClient.HttpClient>;
|
|
320
518
|
};
|
|
321
519
|
export declare class AuthClient extends AuthClient_base {
|
|
322
|
-
static readonly layer: Layer.Layer<AuthClient, import("effect/Config").ConfigError, never>;
|
|
520
|
+
static readonly layer: (headers?: Record<string, string>) => Layer.Layer<AuthClient, import("effect/Config").ConfigError, never>;
|
|
323
521
|
}
|
|
324
522
|
export {};
|
package/dist/client.js
CHANGED
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
import { Context, Effect, Layer, Redacted } from "effect";
|
|
2
2
|
import { FetchHttpClient, HttpClient, HttpClientRequest, } from "effect/unstable/http";
|
|
3
3
|
import { HttpApiClient } from "effect/unstable/httpapi";
|
|
4
|
-
import {
|
|
4
|
+
import { BetterAuthApi } from "./better-auth/api";
|
|
5
5
|
import { readClientConfig } from "./config";
|
|
6
|
-
import {
|
|
6
|
+
import { ExtraApi } from "./extra/api";
|
|
7
|
+
import { ServerApi } from "./server/api";
|
|
8
|
+
const forwardedAuthHeaderNames = [
|
|
9
|
+
"accept-language",
|
|
10
|
+
"baggage",
|
|
11
|
+
"cookie",
|
|
12
|
+
"traceparent",
|
|
13
|
+
"tracestate",
|
|
14
|
+
"user-agent",
|
|
15
|
+
];
|
|
16
|
+
const forwardedAuthHeaders = (headers) => {
|
|
17
|
+
const forwarded = {};
|
|
18
|
+
for (const name of forwardedAuthHeaderNames) {
|
|
19
|
+
const value = headers[name];
|
|
20
|
+
if (value)
|
|
21
|
+
forwarded[name] = value;
|
|
22
|
+
}
|
|
23
|
+
return forwarded;
|
|
24
|
+
};
|
|
25
|
+
const authHttpClientLayer = (headers) => Layer.effect(HttpClient.HttpClient, Effect.gen(function* () {
|
|
26
|
+
const http = yield* HttpClient.HttpClient;
|
|
27
|
+
return HttpClient.mapRequest(http, (request) => HttpClientRequest.setHeaders(request, forwardedAuthHeaders(headers)));
|
|
28
|
+
})).pipe(Layer.provide(FetchHttpClient.layer));
|
|
7
29
|
export class AuthClientConfig extends Context.Service()("@krak-stack/auth/AuthClientConfig", { make: readClientConfig }) {
|
|
8
30
|
static layer = Layer.effect(this, this.make);
|
|
9
31
|
}
|
|
@@ -12,23 +34,35 @@ export class AuthClient extends Context.Service()("@krak-stack/auth/AuthClient",
|
|
|
12
34
|
const config = yield* AuthClientConfig;
|
|
13
35
|
const http = yield* HttpClient.HttpClient;
|
|
14
36
|
const httpClient = HttpClient.mapRequest(http, (request) => HttpClientRequest.bearerToken(request, Redacted.value(config.apiKey)));
|
|
15
|
-
const
|
|
16
|
-
group: "
|
|
37
|
+
const serverUsers = yield* HttpApiClient.group(ServerApi, {
|
|
38
|
+
group: "serverUsers",
|
|
17
39
|
baseUrl: config.baseUrl,
|
|
18
40
|
httpClient,
|
|
19
41
|
});
|
|
20
|
-
const
|
|
21
|
-
group: "
|
|
42
|
+
const serverOrganizations = yield* HttpApiClient.group(ServerApi, {
|
|
43
|
+
group: "serverOrganizations",
|
|
22
44
|
baseUrl: config.baseUrl,
|
|
23
45
|
httpClient,
|
|
24
46
|
});
|
|
47
|
+
const extra = yield* HttpApiClient.group(ExtraApi, {
|
|
48
|
+
group: "extra",
|
|
49
|
+
baseUrl: config.baseUrl,
|
|
50
|
+
httpClient,
|
|
51
|
+
});
|
|
52
|
+
const betterAuth = yield* HttpApiClient.group(BetterAuthApi, {
|
|
53
|
+
group: "betterAuth",
|
|
54
|
+
baseUrl: config.baseUrl,
|
|
55
|
+
httpClient: http,
|
|
56
|
+
});
|
|
25
57
|
return {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
58
|
+
...betterAuth,
|
|
59
|
+
server: {
|
|
60
|
+
...serverUsers,
|
|
61
|
+
...serverOrganizations,
|
|
29
62
|
},
|
|
63
|
+
extra,
|
|
30
64
|
};
|
|
31
65
|
}),
|
|
32
66
|
}) {
|
|
33
|
-
static layer = Layer.effect(this, this.make).pipe(Layer.provide(AuthClientConfig.layer), Layer.provide(
|
|
67
|
+
static layer = (headers = {}) => Layer.effect(this, this.make).pipe(Layer.provide(AuthClientConfig.layer), Layer.provide(authHttpClientLayer(headers)));
|
|
34
68
|
}
|