@lobehub/chat 1.61.3 → 1.61.5
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/CHANGELOG.md +50 -0
- package/changelog/v1.json +18 -0
- package/locales/ar/auth.json +10 -1
- package/locales/ar/models.json +3 -0
- package/locales/bg-BG/auth.json +10 -1
- package/locales/bg-BG/models.json +3 -0
- package/locales/de-DE/auth.json +10 -1
- package/locales/de-DE/models.json +3 -0
- package/locales/en-US/auth.json +10 -1
- package/locales/en-US/models.json +3 -0
- package/locales/es-ES/auth.json +10 -1
- package/locales/es-ES/models.json +3 -0
- package/locales/fa-IR/auth.json +10 -1
- package/locales/fa-IR/models.json +3 -0
- package/locales/fr-FR/auth.json +10 -1
- package/locales/fr-FR/models.json +3 -0
- package/locales/it-IT/auth.json +10 -1
- package/locales/it-IT/models.json +3 -0
- package/locales/ja-JP/auth.json +10 -1
- package/locales/ja-JP/models.json +3 -0
- package/locales/ko-KR/auth.json +10 -1
- package/locales/ko-KR/models.json +3 -0
- package/locales/nl-NL/auth.json +10 -1
- package/locales/nl-NL/models.json +3 -0
- package/locales/pl-PL/auth.json +10 -1
- package/locales/pl-PL/models.json +3 -0
- package/locales/pt-BR/auth.json +10 -1
- package/locales/pt-BR/models.json +3 -0
- package/locales/ru-RU/auth.json +10 -1
- package/locales/ru-RU/models.json +3 -0
- package/locales/tr-TR/auth.json +10 -1
- package/locales/tr-TR/models.json +3 -0
- package/locales/vi-VN/auth.json +10 -1
- package/locales/vi-VN/models.json +3 -0
- package/locales/zh-CN/auth.json +9 -0
- package/locales/zh-CN/models.json +3 -0
- package/locales/zh-TW/auth.json +10 -1
- package/locales/zh-TW/models.json +3 -0
- package/package.json +1 -1
- package/src/app/[variants]/(main)/profile/(home)/Client.tsx +9 -0
- package/src/app/[variants]/(main)/profile/(home)/features/SSOProvidersList/AuthIcons.tsx +37 -0
- package/src/app/[variants]/(main)/profile/(home)/features/SSOProvidersList/index.tsx +93 -0
- package/src/config/aiModels/perplexity.ts +16 -6
- package/src/config/modelProviders/perplexity.ts +9 -6
- package/src/database/server/models/user.ts +24 -1
- package/src/libs/agent-runtime/perplexity/index.test.ts +10 -222
- package/src/locales/default/auth.ts +10 -0
- package/src/server/routers/lambda/user.ts +32 -2
- package/src/services/user/_deprecated.ts +9 -0
- package/src/services/user/client.ts +9 -0
- package/src/services/user/server.ts +11 -0
- package/src/services/user/type.ts +3 -0
- package/src/types/user/index.ts +5 -0
@@ -37,6 +37,15 @@ export class ClientService implements IUserService {
|
|
37
37
|
};
|
38
38
|
}
|
39
39
|
|
40
|
+
getUserSSOProviders = async () => {
|
41
|
+
// Account not exist on next-auth in client mode, no need to implement this method
|
42
|
+
return [];
|
43
|
+
};
|
44
|
+
|
45
|
+
unlinkSSOProvider = async () => {
|
46
|
+
// Account not exist on next-auth in client mode, no need to implement this method
|
47
|
+
};
|
48
|
+
|
40
49
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
41
50
|
updateUserSettings = async (patch: DeepPartial<UserSettings>, _?: any) => {
|
42
51
|
return UserModel.updateSettings(patch);
|
@@ -54,6 +54,15 @@ export class ClientService extends BaseClientService implements IUserService {
|
|
54
54
|
};
|
55
55
|
};
|
56
56
|
|
57
|
+
getUserSSOProviders: IUserService['getUserSSOProviders'] = async () => {
|
58
|
+
// Account not exist on next-auth in client mode, no need to implement this method
|
59
|
+
return [];
|
60
|
+
};
|
61
|
+
|
62
|
+
unlinkSSOProvider: IUserService['unlinkSSOProvider'] = async () => {
|
63
|
+
// Account not exist on next-auth in client mode, no need to implement this method
|
64
|
+
};
|
65
|
+
|
57
66
|
updateUserSettings: IUserService['updateUserSettings'] = async (value) => {
|
58
67
|
const { keyVaults, ...res } = value;
|
59
68
|
|
@@ -10,6 +10,17 @@ export class ServerService implements IUserService {
|
|
10
10
|
return lambdaClient.user.getUserState.query();
|
11
11
|
};
|
12
12
|
|
13
|
+
getUserSSOProviders: IUserService['getUserSSOProviders'] = async () => {
|
14
|
+
return lambdaClient.user.getUserSSOProviders.query();
|
15
|
+
};
|
16
|
+
|
17
|
+
unlinkSSOProvider: IUserService['unlinkSSOProvider'] = async (
|
18
|
+
provider: string,
|
19
|
+
providerAccountId: string,
|
20
|
+
) => {
|
21
|
+
return lambdaClient.user.unlinkSSOProvider.mutate({ provider, providerAccountId });
|
22
|
+
};
|
23
|
+
|
13
24
|
makeUserOnboarded = async () => {
|
14
25
|
return lambdaClient.user.makeUserOnboarded.mutate();
|
15
26
|
};
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { AdapterAccount } from 'next-auth/adapters';
|
1
2
|
import { DeepPartial } from 'utility-types';
|
2
3
|
|
3
4
|
import { UserGuide, UserInitializationState, UserPreference } from '@/types/user';
|
@@ -9,8 +10,10 @@ export interface IUserService {
|
|
9
10
|
duration: number;
|
10
11
|
updatedAt: string;
|
11
12
|
}>;
|
13
|
+
getUserSSOProviders: () => Promise<AdapterAccount[]>;
|
12
14
|
getUserState: () => Promise<UserInitializationState>;
|
13
15
|
resetUserSettings: () => Promise<any>;
|
16
|
+
unlinkSSOProvider: (provider: string, providerAccountId: string) => Promise<any>;
|
14
17
|
updateGuide: (guide: Partial<UserGuide>) => Promise<any>;
|
15
18
|
updatePreference: (preference: Partial<UserPreference>) => Promise<any>;
|
16
19
|
updateUserSettings: (value: DeepPartial<UserSettings>, signal?: AbortSignal) => Promise<any>;
|
package/src/types/user/index.ts
CHANGED