@pmate/account-sdk 0.7.0 → 0.7.1
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/package.json +13 -13
- package/src/api/AccountService.ts +4 -2
- package/src/api/Api.ts +1 -1
- package/src/api/AppService.ts +2 -1
- package/src/api/EntityService.ts +1 -1
- package/src/api/ProfileService.ts +1 -1
- package/src/atoms/accountProfileAtom.ts +1 -1
- package/src/atoms/profileAtom.ts +1 -1
- package/src/atoms/profilesAtom.ts +1 -1
- package/src/atoms/switchProfileAtom.ts +1 -1
- package/src/atoms/userSettingsAtom.ts +4 -2
- package/src/components/AuthProvider.tsx +1 -1
- package/src/hooks/useProfileStepFlow.ts +2 -1
- package/src/utils/AccountManagerV2.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pmate/account-sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"src",
|
|
@@ -14,11 +14,6 @@
|
|
|
14
14
|
"publishConfig": {
|
|
15
15
|
"access": "public"
|
|
16
16
|
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"npm:publish": "npm publish --registry https://registry.npmjs.org/",
|
|
19
|
-
"test": "vitest run",
|
|
20
|
-
"test:watch": "vitest"
|
|
21
|
-
},
|
|
22
17
|
"peerDependencies": {
|
|
23
18
|
"jotai": "*",
|
|
24
19
|
"jotai-family": "*",
|
|
@@ -36,10 +31,10 @@
|
|
|
36
31
|
}
|
|
37
32
|
},
|
|
38
33
|
"dependencies": {
|
|
39
|
-
"@pmate/auth-widgets": "^0.1.
|
|
34
|
+
"@pmate/auth-widgets": "^0.1.1",
|
|
40
35
|
"@pmate/lang": "^1.0.2",
|
|
41
|
-
"@pmate/meta": "^1.1.
|
|
42
|
-
"@pmate/service-core": "^1.0.
|
|
36
|
+
"@pmate/meta": "^1.1.4",
|
|
37
|
+
"@pmate/service-core": "^1.0.1",
|
|
43
38
|
"@pmate/utils": "^1.0.3",
|
|
44
39
|
"browser-image-compression": "^2.0.2",
|
|
45
40
|
"elysia": "^1.4.19",
|
|
@@ -48,13 +43,18 @@
|
|
|
48
43
|
"react-use": "^17.6.0"
|
|
49
44
|
},
|
|
50
45
|
"devDependencies": {
|
|
51
|
-
"@types/react": "
|
|
52
|
-
"@types/react-dom": "
|
|
46
|
+
"@types/react": "^19.2.7",
|
|
47
|
+
"@types/react-dom": "^19.2.3",
|
|
53
48
|
"@vitejs/plugin-react": "^4.2.1",
|
|
54
49
|
"jsdom": "^26.1.0",
|
|
55
50
|
"react-dom": "*",
|
|
56
51
|
"typescript": "^5.2.2",
|
|
57
|
-
"vite": "
|
|
52
|
+
"vite": "^7.3.1",
|
|
58
53
|
"vitest": "^4.0.17"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"npm:publish": "npm publish --registry https://registry.npmjs.org/",
|
|
57
|
+
"test": "vitest run",
|
|
58
|
+
"test:watch": "vitest"
|
|
59
59
|
}
|
|
60
|
-
}
|
|
60
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type {
|
|
2
2
|
AuthLoginResponse,
|
|
3
3
|
AuthRequest,
|
|
4
4
|
AuthSession,
|
|
@@ -34,7 +34,9 @@ export class AccountService {
|
|
|
34
34
|
})
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
public static async login(
|
|
37
|
+
public static async login(
|
|
38
|
+
request: AuthRequest
|
|
39
|
+
): Promise<AuthLoginResponse> {
|
|
38
40
|
return AccountService.authRequest<AuthLoginResponse>("/login", {
|
|
39
41
|
method: "POST",
|
|
40
42
|
body: JSON.stringify(request),
|
package/src/api/Api.ts
CHANGED
package/src/api/AppService.ts
CHANGED
|
@@ -2,7 +2,8 @@ import { lru } from "@pmate/utils"
|
|
|
2
2
|
import type { AppConfig, AppThemePreset, ProfileStep } from "../types/app"
|
|
3
3
|
|
|
4
4
|
const APPS_ENDPOINT =
|
|
5
|
-
|
|
5
|
+
import.meta.env.VITE_PUBLIC_APPS_SERVER_ENDPOINT ||
|
|
6
|
+
"https://apps-api.pmate.chat"
|
|
6
7
|
const DEFAULT_ICON = "https://parrot-static.pmate.chat/parrot-logo.png"
|
|
7
8
|
const DEFAULT_THEME_PRESET: AppThemePreset = "default"
|
|
8
9
|
|
package/src/api/EntityService.ts
CHANGED
package/src/atoms/profileAtom.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { VoiceList } from "@pmate/meta"
|
|
2
|
-
import { Difficulty
|
|
3
|
-
import {
|
|
2
|
+
import { Difficulty } from "@pmate/meta"
|
|
3
|
+
import type { UserSettings } from "@pmate/meta"
|
|
4
|
+
import { atom } from "jotai"
|
|
5
|
+
import type { WritableAtom } from "jotai"
|
|
4
6
|
import { LSKEYS, localStorageJsonAtom } from "./localStorageAtom"
|
|
5
7
|
|
|
6
8
|
const defaultSettings: UserSettings = {
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
import { useSetAtom } from "jotai"
|
|
6
6
|
import {
|
|
7
7
|
Component,
|
|
8
|
-
PropsWithChildren,
|
|
9
8
|
useCallback,
|
|
10
9
|
useEffect,
|
|
11
10
|
useState,
|
|
12
11
|
} from "react"
|
|
12
|
+
import type { PropsWithChildren } from "react"
|
|
13
13
|
import { accountAtom } from "../atoms/accountAtom"
|
|
14
14
|
import { userLogoutAtom } from "../atoms/userLogoutAtom"
|
|
15
15
|
import { useAuthSnapshot } from "../hooks/useAuthSnapshot"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { useCallback, useMemo } from "react"
|
|
2
|
-
import { isProfileStepType
|
|
2
|
+
import { isProfileStepType } from "../utils/profileStep"
|
|
3
|
+
import type { ProfileStepType } from "../utils/profileStep"
|
|
3
4
|
import { useAppConfig } from "./useAppConfig"
|
|
4
5
|
|
|
5
6
|
type UseProfileStepFlowParams = {
|