@podosoft/podokit-api-client 0.4.0 → 0.5.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/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { createAuthClient } from "better-auth/client";
2
- import { adminClient, twoFactorClient } from "better-auth/client/plugins";
2
+ import { adminClient, twoFactorClient, magicLinkClient, emailOTPClient, usernameClient, multiSessionClient, phoneNumberClient, organizationClient } from "better-auth/client/plugins";
3
+ import { apiKeyClient } from "@better-auth/api-key/client";
4
+ import { passkeyClient } from "@better-auth/passkey/client";
3
5
  /** Error thrown when the API returns the standard error envelope or a non-2xx status. */
4
6
  export class ApiError extends Error {
5
7
  code;
@@ -44,7 +46,7 @@ export function createApiClient(options = {}) {
44
46
  // (a bare ReturnType<typeof createAuthClient> would drop the plugin augmentation).
45
47
  const makeAuthClient = () => createAuthClient({
46
48
  baseURL: authOrigin,
47
- plugins: [adminClient(), twoFactorClient()],
49
+ plugins: [adminClient(), twoFactorClient(), magicLinkClient(), emailOTPClient(), usernameClient(), multiSessionClient(), phoneNumberClient(), apiKeyClient(), passkeyClient(), organizationClient()],
48
50
  fetchOptions: {
49
51
  credentials,
50
52
  ...(options.fetch ? { customFetchImpl: options.fetch } : {}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@podosoft/podokit-api-client",
3
- "version": "0.4.0",
3
+ "version": "0.5.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,10 @@
29
29
  "provenance": true
30
30
  },
31
31
  "dependencies": {
32
- "better-auth": "^1.6.23"
32
+ "@podosoft/podokit-contracts": "^0.1.0",
33
+ "better-auth": "^1.6.23",
34
+ "@better-auth/api-key": "^1.6.23",
35
+ "@better-auth/passkey": "^1.6.23"
33
36
  },
34
37
  "scripts": {
35
38
  "build": "tsc -p tsconfig.json",