@podosoft/podokit-api-client 0.6.0 → 0.7.0
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 +2 -2
- package/dist/index.d.ts +5 -3
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -33,5 +33,5 @@ const session = await api.auth.getSession();
|
|
|
33
33
|
| `credentials` | `include` | Send cookies with requests. |
|
|
34
34
|
|
|
35
35
|
Errors are thrown as `ApiError` (`code`, `message`, `statusCode`, `details`).
|
|
36
|
-
`SIGNUP_APPROVAL_REQUIRED`
|
|
37
|
-
handling.
|
|
36
|
+
`PUBLIC_SIGNUP_DISABLED` and `SIGNUP_APPROVAL_REQUIRED` are re-exported for
|
|
37
|
+
provider-independent registration-policy handling.
|
package/dist/index.d.ts
CHANGED
|
@@ -19,8 +19,8 @@ export interface ApiClientOptions {
|
|
|
19
19
|
* for the shape — the backend controller and every SvelteKit loader import it.
|
|
20
20
|
*/
|
|
21
21
|
export type { Capabilities } from "@podosoft/podokit-contracts";
|
|
22
|
-
/** Stable
|
|
23
|
-
export
|
|
22
|
+
/** Stable authentication policy error codes re-exported for browser clients. */
|
|
23
|
+
export { PUBLIC_SIGNUP_DISABLED, SIGNUP_APPROVAL_REQUIRED, } from "@podosoft/podokit-contracts";
|
|
24
24
|
/** Error thrown when the API returns the standard error envelope or a non-2xx status. */
|
|
25
25
|
export declare class ApiError extends Error {
|
|
26
26
|
readonly code: string;
|
|
@@ -2577,7 +2577,9 @@ export declare function createApiClient(options?: ApiClientOptions): {
|
|
|
2577
2577
|
email: string;
|
|
2578
2578
|
emailVerified: boolean;
|
|
2579
2579
|
name: string;
|
|
2580
|
-
image
|
|
2580
|
+
image
|
|
2581
|
+
/** Error thrown when the API returns the standard error envelope or a non-2xx status. */
|
|
2582
|
+
? /** Error thrown when the API returns the standard error envelope or a non-2xx status. */: string | null | undefined;
|
|
2581
2583
|
};
|
|
2582
2584
|
}[]>;
|
|
2583
2585
|
setActiveSession: import("better-call").StrictEndpoint<"/multi-session/set-active", {
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import { createAuthClient } from "better-auth/client";
|
|
|
2
2
|
import { adminClient, twoFactorClient, magicLinkClient, emailOTPClient, usernameClient, multiSessionClient, phoneNumberClient, organizationClient, inferAdditionalFields } from "better-auth/client/plugins";
|
|
3
3
|
import { apiKeyClient } from "@better-auth/api-key/client";
|
|
4
4
|
import { passkeyClient } from "@better-auth/passkey/client";
|
|
5
|
-
/** Stable
|
|
6
|
-
export
|
|
5
|
+
/** Stable authentication policy error codes re-exported for browser clients. */
|
|
6
|
+
export { PUBLIC_SIGNUP_DISABLED, SIGNUP_APPROVAL_REQUIRED, } from "@podosoft/podokit-contracts";
|
|
7
7
|
/** Error thrown when the API returns the standard error envelope or a non-2xx status. */
|
|
8
8
|
export class ApiError extends Error {
|
|
9
9
|
code;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@podosoft/podokit-api-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Typed API client for PodoKit backends: better-auth (auth + admin) plus a standard error-envelope request layer.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"provenance": true
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@podosoft/podokit-contracts": "^0.
|
|
32
|
+
"@podosoft/podokit-contracts": "^0.3.0",
|
|
33
33
|
"better-auth": "^1.6.23",
|
|
34
34
|
"@better-auth/api-key": "^1.6.23",
|
|
35
35
|
"@better-auth/passkey": "^1.6.23"
|