nfx-ui 0.34.0 → 0.36.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.en.md +1 -1
- package/README.md +1 -1
- package/dist/events/system.d.ts +9 -0
- package/dist/events/system.d.ts.map +1 -1
- package/dist/events/system.js +9 -1
- package/dist/events/system.js.map +1 -1
- package/dist/hooks/auth.d.ts +33 -30
- package/dist/hooks/auth.d.ts.map +1 -1
- package/dist/hooks/auth.js +234 -227
- package/dist/hooks/auth.js.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +9 -8
- package/dist/hooks/toast.d.ts +12 -0
- package/dist/hooks/toast.d.ts.map +1 -0
- package/dist/hooks/toast.js +13 -0
- package/dist/hooks/toast.js.map +1 -0
- package/dist/languages/hooks/useLanguageLabel.d.ts.map +1 -1
- package/dist/languages/hooks/useLanguageLabel.js +11 -10
- package/dist/languages/hooks/useLanguageLabel.js.map +1 -1
- package/dist/languages/index.d.ts +0 -1
- package/dist/languages/index.d.ts.map +1 -1
- package/dist/languages/index.js +9 -10
- package/dist/languages/languages/i18n.d.ts.map +1 -1
- package/dist/languages/languages/i18n.js +30 -41
- package/dist/languages/languages/i18n.js.map +1 -1
- package/dist/schemas/loginSchema.d.ts +3 -3
- package/dist/schemas/loginSchema.d.ts.map +1 -1
- package/dist/schemas/loginSchema.js +22 -23
- package/dist/schemas/loginSchema.js.map +1 -1
- package/dist/schemas/profileEditSchema.d.ts +1 -1
- package/dist/schemas/profileEditSchema.d.ts.map +1 -1
- package/dist/schemas/profileEditSchema.js +18 -19
- package/dist/schemas/profileEditSchema.js.map +1 -1
- package/dist/schemas/signupSchema.d.ts +2 -2
- package/dist/schemas/signupSchema.d.ts.map +1 -1
- package/dist/schemas/signupSchema.js +16 -17
- package/dist/schemas/signupSchema.js.map +1 -1
- package/package.json +1 -1
- package/src/events/system.ts +16 -0
- package/src/hooks/auth.ts +100 -109
- package/src/hooks/index.ts +1 -0
- package/src/hooks/toast.ts +23 -0
- package/src/languages/hooks/useLanguageLabel.ts +2 -3
- package/src/languages/index.ts +0 -1
- package/src/languages/languages/i18n.ts +3 -17
- package/src/schemas/loginSchema.ts +3 -6
- package/src/schemas/profileEditSchema.ts +1 -3
- package/src/schemas/signupSchema.ts +2 -4
- package/dist/languages/resources/en/language.js +0 -52
- package/dist/languages/resources/en/language.js.map +0 -1
- package/dist/languages/resources/en/language.json.d.ts +0 -49
- package/dist/languages/resources/en/layout.js +0 -9
- package/dist/languages/resources/en/layout.js.map +0 -1
- package/dist/languages/resources/en/layout.json.d.ts +0 -9
- package/dist/languages/resources/en/preference.js +0 -50
- package/dist/languages/resources/en/preference.js.map +0 -1
- package/dist/languages/resources/en/preference.json.d.ts +0 -51
- package/dist/languages/resources/en/theme.js +0 -19
- package/dist/languages/resources/en/theme.js.map +0 -1
- package/dist/languages/resources/en/theme.json.d.ts +0 -17
- package/dist/languages/resources/fr/language.js +0 -52
- package/dist/languages/resources/fr/language.js.map +0 -1
- package/dist/languages/resources/fr/language.json.d.ts +0 -49
- package/dist/languages/resources/fr/layout.js +0 -9
- package/dist/languages/resources/fr/layout.js.map +0 -1
- package/dist/languages/resources/fr/layout.json.d.ts +0 -9
- package/dist/languages/resources/fr/preference.js +0 -50
- package/dist/languages/resources/fr/preference.js.map +0 -1
- package/dist/languages/resources/fr/preference.json.d.ts +0 -51
- package/dist/languages/resources/fr/theme.js +0 -19
- package/dist/languages/resources/fr/theme.js.map +0 -1
- package/dist/languages/resources/fr/theme.json.d.ts +0 -17
- package/dist/languages/resources/index.d.ts +0 -9
- package/dist/languages/resources/index.d.ts.map +0 -1
- package/dist/languages/resources/index.js +0 -54
- package/dist/languages/resources/index.js.map +0 -1
- package/dist/languages/resources/zh/language.js +0 -52
- package/dist/languages/resources/zh/language.js.map +0 -1
- package/dist/languages/resources/zh/language.json.d.ts +0 -49
- package/dist/languages/resources/zh/layout.js +0 -9
- package/dist/languages/resources/zh/layout.js.map +0 -1
- package/dist/languages/resources/zh/layout.json.d.ts +0 -9
- package/dist/languages/resources/zh/preference.js +0 -50
- package/dist/languages/resources/zh/preference.js.map +0 -1
- package/dist/languages/resources/zh/preference.json.d.ts +0 -51
- package/dist/languages/resources/zh/theme.js +0 -19
- package/dist/languages/resources/zh/theme.js.map +0 -1
- package/dist/languages/resources/zh/theme.json.d.ts +0 -17
- package/src/languages/resources/en/language.json +0 -47
- package/src/languages/resources/en/layout.json +0 -6
- package/src/languages/resources/en/preference.json +0 -49
- package/src/languages/resources/en/theme.json +0 -14
- package/src/languages/resources/fr/language.json +0 -47
- package/src/languages/resources/fr/layout.json +0 -6
- package/src/languages/resources/fr/preference.json +0 -49
- package/src/languages/resources/fr/theme.json +0 -14
- package/src/languages/resources/index.ts +0 -62
- package/src/languages/resources/zh/language.json +0 -47
- package/src/languages/resources/zh/layout.json +0 -6
- package/src/languages/resources/zh/preference.json +0 -49
- package/src/languages/resources/zh/theme.json +0 -14
package/README.en.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Shared React library for NebulaForgeX (theme, i18n, hooks). **Not** a standalone site. Hosts: Identity, Edge, News, Storages, Documentation.
|
|
6
6
|
|
|
7
|
-
Exports and host wiring: [NFX-Documentation chapter 7](https://github.com/NebulaForgeX/NFX-Documentation/blob/main/books/en/chapter-07-nfx-ui.md). Current **0.
|
|
7
|
+
Exports and host wiring: [NFX-Documentation chapter 7](https://github.com/NebulaForgeX/NFX-Documentation/blob/main/books/en/chapter-07-nfx-ui.md). Current **0.36.0**; hosts pin exactly `"nfx-ui": "0.36.0"`. No `file:` dual path.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npm install
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
NebulaForgeX 共享 React 库(主题、i18n、hooks)。**不是**独立站点。宿主:Identity、Edge、News、Storages、Documentation。
|
|
6
6
|
|
|
7
|
-
接入与真实导出:[NFX-Documentation 第七章](https://github.com/NebulaForgeX/NFX-Documentation/blob/main/books/zh/chapter-07-nfx-ui.md)。当前 **0.
|
|
7
|
+
接入与真实导出:[NFX-Documentation 第七章](https://github.com/NebulaForgeX/NFX-Documentation/blob/main/books/zh/chapter-07-nfx-ui.md)。当前 **0.36.0**,宿主精确钉 `"nfx-ui": "0.36.0"`。不要 `file:` 双路径。
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npm install
|
package/dist/events/system.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import { EventNamesOf, EventEmitter } from './EventEmitter';
|
|
|
5
5
|
export declare const systemEvents: import('./EventEmitter').DefinedEvents<{
|
|
6
6
|
SHOW_ERROR: string;
|
|
7
7
|
SHOW_SUCCESS: string;
|
|
8
|
+
SHOW_LOADING: string;
|
|
9
|
+
HIDE_LOADING: string;
|
|
8
10
|
}>;
|
|
9
11
|
type SystemEvent = EventNamesOf<typeof systemEvents>;
|
|
10
12
|
export type SystemShowErrorPayload = {
|
|
@@ -16,14 +18,21 @@ export type SystemShowSuccessPayload = string | {
|
|
|
16
18
|
title?: string;
|
|
17
19
|
onClick?: () => void;
|
|
18
20
|
};
|
|
21
|
+
export type SystemShowLoadingPayload = {
|
|
22
|
+
message?: string;
|
|
23
|
+
};
|
|
19
24
|
type SystemPayloadMap = {
|
|
20
25
|
"SYSTEM:SHOW_ERROR": SystemShowErrorPayload;
|
|
21
26
|
"SYSTEM:SHOW_SUCCESS": SystemShowSuccessPayload;
|
|
27
|
+
"SYSTEM:SHOW_LOADING": SystemShowLoadingPayload;
|
|
28
|
+
"SYSTEM:HIDE_LOADING": void;
|
|
22
29
|
};
|
|
23
30
|
declare class SystemEventEmitter extends EventEmitter<SystemEvent, SystemPayloadMap> {
|
|
24
31
|
constructor();
|
|
25
32
|
showError(message: string, title?: string): void;
|
|
26
33
|
showSuccess(props: SystemShowSuccessPayload): void;
|
|
34
|
+
showLoading(message?: string): void;
|
|
35
|
+
hideLoading(): void;
|
|
27
36
|
}
|
|
28
37
|
export declare const systemEventEmitter: SystemEventEmitter;
|
|
29
38
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/events/system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAgB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAGxE;;GAEG;AACH,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../src/events/system.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAgB,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAGxE;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;EAKvB,CAAC;AAEH,KAAK,WAAW,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AAErD,MAAM,MAAM,sBAAsB,GAAG;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAChC,MAAM,GACN;IACE,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEN,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,mBAAmB,EAAE,sBAAsB,CAAC;IAC5C,qBAAqB,EAAE,wBAAwB,CAAC;IAChD,qBAAqB,EAAE,wBAAwB,CAAC;IAChD,qBAAqB,EAAE,IAAI,CAAC;CAC7B,CAAC;AAEF,cAAM,kBAAmB,SAAQ,YAAY,CAAC,WAAW,EAAE,gBAAgB,CAAC;;IAK1E,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;IAIzC,WAAW,CAAC,KAAK,EAAE,wBAAwB;IAI3C,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM;IAI5B,WAAW;CAGZ;AAED,eAAO,MAAM,kBAAkB,oBAAwC,CAAC"}
|
package/dist/events/system.js
CHANGED
|
@@ -3,7 +3,9 @@ import { singleton as n } from "../utils/singleton.js";
|
|
|
3
3
|
//#region src/events/system.ts
|
|
4
4
|
var r = t({
|
|
5
5
|
SHOW_ERROR: "SYSTEM:SHOW_ERROR",
|
|
6
|
-
SHOW_SUCCESS: "SYSTEM:SHOW_SUCCESS"
|
|
6
|
+
SHOW_SUCCESS: "SYSTEM:SHOW_SUCCESS",
|
|
7
|
+
SHOW_LOADING: "SYSTEM:SHOW_LOADING",
|
|
8
|
+
HIDE_LOADING: "SYSTEM:HIDE_LOADING"
|
|
7
9
|
}), i = new (n(class extends e {
|
|
8
10
|
constructor() {
|
|
9
11
|
super(r);
|
|
@@ -17,6 +19,12 @@ var r = t({
|
|
|
17
19
|
showSuccess(e) {
|
|
18
20
|
this.emit(r.SHOW_SUCCESS, e);
|
|
19
21
|
}
|
|
22
|
+
showLoading(e) {
|
|
23
|
+
this.emit(r.SHOW_LOADING, { message: e });
|
|
24
|
+
}
|
|
25
|
+
hideLoading() {
|
|
26
|
+
this.emit(r.HIDE_LOADING);
|
|
27
|
+
}
|
|
20
28
|
}))();
|
|
21
29
|
//#endregion
|
|
22
30
|
export { i as systemEventEmitter, r as systemEvents };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.js","names":[],"sources":["../../src/events/system.ts"],"sourcesContent":["import type { EventNamesOf } from \"nfx-ui/events/EventEmitter\";\n\nimport { defineEvents, EventEmitter } from \"nfx-ui/events/EventEmitter\";\nimport { singleton } from \"nfx-ui/utils/singleton\";\n\n/**\n * Host-agnostic UI feedback. Package emits; WEB ModalProvider listens.\n */\nexport const systemEvents = defineEvents({\n SHOW_ERROR: \"SYSTEM:SHOW_ERROR\",\n SHOW_SUCCESS: \"SYSTEM:SHOW_SUCCESS\",\n});\n\ntype SystemEvent = EventNamesOf<typeof systemEvents>;\n\nexport type SystemShowErrorPayload = {\n message: string;\n title?: string;\n};\n\nexport type SystemShowSuccessPayload =\n | string\n | {\n message: string;\n title?: string;\n onClick?: () => void;\n };\n\ntype SystemPayloadMap = {\n \"SYSTEM:SHOW_ERROR\": SystemShowErrorPayload;\n \"SYSTEM:SHOW_SUCCESS\": SystemShowSuccessPayload;\n};\n\nclass SystemEventEmitter extends EventEmitter<SystemEvent, SystemPayloadMap> {\n constructor() {\n super(systemEvents);\n }\n\n showError(message: string, title?: string) {\n this.emit(systemEvents.SHOW_ERROR, { message, title });\n }\n\n showSuccess(props: SystemShowSuccessPayload) {\n this.emit(systemEvents.SHOW_SUCCESS, props);\n }\n}\n\nexport const systemEventEmitter = new (singleton(SystemEventEmitter))();\n"],"mappings":";;;AAQA,IAAa,IAAe,EAAa;CACvC,YAAY;CACZ,cAAc;AAChB,CAAC,
|
|
1
|
+
{"version":3,"file":"system.js","names":[],"sources":["../../src/events/system.ts"],"sourcesContent":["import type { EventNamesOf } from \"nfx-ui/events/EventEmitter\";\n\nimport { defineEvents, EventEmitter } from \"nfx-ui/events/EventEmitter\";\nimport { singleton } from \"nfx-ui/utils/singleton\";\n\n/**\n * Host-agnostic UI feedback. Package emits; WEB ModalProvider listens.\n */\nexport const systemEvents = defineEvents({\n SHOW_ERROR: \"SYSTEM:SHOW_ERROR\",\n SHOW_SUCCESS: \"SYSTEM:SHOW_SUCCESS\",\n SHOW_LOADING: \"SYSTEM:SHOW_LOADING\",\n HIDE_LOADING: \"SYSTEM:HIDE_LOADING\",\n});\n\ntype SystemEvent = EventNamesOf<typeof systemEvents>;\n\nexport type SystemShowErrorPayload = {\n message: string;\n title?: string;\n};\n\nexport type SystemShowSuccessPayload =\n | string\n | {\n message: string;\n title?: string;\n onClick?: () => void;\n };\n\nexport type SystemShowLoadingPayload = {\n message?: string;\n};\n\ntype SystemPayloadMap = {\n \"SYSTEM:SHOW_ERROR\": SystemShowErrorPayload;\n \"SYSTEM:SHOW_SUCCESS\": SystemShowSuccessPayload;\n \"SYSTEM:SHOW_LOADING\": SystemShowLoadingPayload;\n \"SYSTEM:HIDE_LOADING\": void;\n};\n\nclass SystemEventEmitter extends EventEmitter<SystemEvent, SystemPayloadMap> {\n constructor() {\n super(systemEvents);\n }\n\n showError(message: string, title?: string) {\n this.emit(systemEvents.SHOW_ERROR, { message, title });\n }\n\n showSuccess(props: SystemShowSuccessPayload) {\n this.emit(systemEvents.SHOW_SUCCESS, props);\n }\n\n showLoading(message?: string) {\n this.emit(systemEvents.SHOW_LOADING, { message });\n }\n\n hideLoading() {\n this.emit(systemEvents.HIDE_LOADING);\n }\n}\n\nexport const systemEventEmitter = new (singleton(SystemEventEmitter))();\n"],"mappings":";;;AAQA,IAAa,IAAe,EAAa;CACvC,YAAY;CACZ,cAAc;CACd,cAAc;CACd,cAAc;AAChB,CAAC,GAkDY,IAAqB,KAAK,EAAU,cAtBhB,EAA4C;CAC3E,cAAc;EACZ,MAAM,CAAY;CACpB;CAEA,UAAU,GAAiB,GAAgB;EACzC,KAAK,KAAK,EAAa,YAAY;GAAE;GAAS;EAAM,CAAC;CACvD;CAEA,YAAY,GAAiC;EAC3C,KAAK,KAAK,EAAa,cAAc,CAAK;CAC5C;CAEA,YAAY,GAAkB;EAC5B,KAAK,KAAK,EAAa,cAAc,EAAE,WAAQ,CAAC;CAClD;CAEA,cAAc;EACZ,KAAK,KAAK,EAAa,YAAY;CACrC;AACF,CAEmE,GAAG"}
|
package/dist/hooks/auth.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AxiosError } from 'axios';
|
|
|
2
2
|
import { CurrentProfileResult, Login, Profile, Signup } from '../types';
|
|
3
3
|
import { AuthSignupPlatformEnum, LanguageEnum, ProfileKindEnum } from '../enums';
|
|
4
4
|
import { AuthStore, hasSelectedProfile, useAuthStore } from '../stores/auth';
|
|
5
|
+
import { HookToastMessages } from './toast';
|
|
5
6
|
export declare function useAuthQueryScope(): {
|
|
6
7
|
aID: string;
|
|
7
8
|
pID: string;
|
|
@@ -10,21 +11,23 @@ export declare function useAuthQueryScope(): {
|
|
|
10
11
|
profileScope: ProfileKindEnum;
|
|
11
12
|
};
|
|
12
13
|
export declare function useCurrentProfile(): CurrentProfileResult;
|
|
13
|
-
export declare const useSendVerificationCode: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Signup.Request.SendVerificationCode, unknown>;
|
|
14
|
-
export declare const useSignupWithEmail: () => import('@tanstack/react-query').UseMutationResult<Signup.Response.SignupWithEmail, AxiosError<unknown, any, any>, {
|
|
14
|
+
export declare const useSendVerificationCode: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Signup.Request.SendVerificationCode, unknown>;
|
|
15
|
+
export declare const useSignupWithEmail: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<Signup.Response.SignupWithEmail, AxiosError<unknown, any, any>, {
|
|
15
16
|
rememberMe: boolean;
|
|
16
17
|
} & Omit<Signup.Request.SignupWithEmail, "deviceId">, unknown>;
|
|
17
|
-
export declare const useLoginWithEmail: () => import('@tanstack/react-query').UseMutationResult<Login.Response.LoginWithEmail, AxiosError<unknown, any, any>, {
|
|
18
|
+
export declare const useLoginWithEmail: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<Login.Response.LoginWithEmail, AxiosError<unknown, any, any>, {
|
|
18
19
|
email: string;
|
|
19
20
|
password: string;
|
|
20
21
|
rememberMe: boolean;
|
|
21
22
|
}, unknown>;
|
|
22
|
-
export declare const useLoginWithPhone: () => import('@tanstack/react-query').UseMutationResult<Login.Response.LoginWithEmail, AxiosError<unknown, any, any>, {
|
|
23
|
+
export declare const useLoginWithPhone: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<Login.Response.LoginWithEmail, AxiosError<unknown, any, any>, {
|
|
23
24
|
phone: string;
|
|
24
25
|
password: string;
|
|
25
26
|
rememberMe: boolean;
|
|
26
27
|
}, unknown>;
|
|
27
|
-
export type SelectProfileOptions = {
|
|
28
|
+
export type SelectProfileOptions = HookToastMessages & {
|
|
29
|
+
/** 已翻译的加载文案。Host-translated loading copy. */
|
|
30
|
+
switchingMsg?: string;
|
|
28
31
|
/** 与 token、档案同一次提交里执行(例如跳到该档案的首页)。Runs in the same commit as the token and profile. */
|
|
29
32
|
onCommit?: () => void;
|
|
30
33
|
};
|
|
@@ -32,59 +35,59 @@ export type SelectProfileOptions = {
|
|
|
32
35
|
export declare const useSelectProfile: (options?: SelectProfileOptions) => import('@tanstack/react-query').UseMutationResult<Login.Response.SelectProfile, AxiosError<unknown, any, any>, {
|
|
33
36
|
profileId: string;
|
|
34
37
|
kind: Login.ProfileKind;
|
|
35
|
-
},
|
|
38
|
+
}, void>;
|
|
36
39
|
export declare const usePatchProfile: (options?: {
|
|
37
40
|
silent?: boolean;
|
|
38
|
-
}) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Profile.Request.PatchProfile, unknown>;
|
|
39
|
-
export declare const useUpdateProfileSettings: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Profile.Request.PatchProfileSettings, unknown>;
|
|
40
|
-
export declare const useUpdatePreference: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
41
|
+
} & HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Profile.Request.PatchProfile, unknown>;
|
|
42
|
+
export declare const useUpdateProfileSettings: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Profile.Request.PatchProfileSettings, unknown>;
|
|
43
|
+
export declare const useUpdatePreference: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
41
44
|
export declare const useListProfiles: <K extends ProfileKindEnum>(kind: K) => import('@tanstack/react-query').UseQueryResult<import('../types').ListDTOWithTotalNumber<import('../types').ProfileItemsByKind<K>[number]>, AxiosError<unknown, any, any>>;
|
|
42
|
-
export declare const useCreateForgerProfile: () => import('@tanstack/react-query').UseMutationResult<Login.Response.CreateForgerProfile, AxiosError<unknown, any, any>, Login.Request.CreateForgerProfile, unknown>;
|
|
43
|
-
export declare const useCreateAuthorityProfile: () => import('@tanstack/react-query').UseMutationResult<Login.Response.CreateAuthorityProfile, AxiosError<unknown, any, any>, Login.Request.CreateAuthorityProfile, unknown>;
|
|
44
|
-
export declare const useDeleteProfile: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
45
|
+
export declare const useCreateForgerProfile: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<Login.Response.CreateForgerProfile, AxiosError<unknown, any, any>, Login.Request.CreateForgerProfile, unknown>;
|
|
46
|
+
export declare const useCreateAuthorityProfile: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<Login.Response.CreateAuthorityProfile, AxiosError<unknown, any, any>, Login.Request.CreateAuthorityProfile, unknown>;
|
|
47
|
+
export declare const useDeleteProfile: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
45
48
|
kind: ProfileKindEnum;
|
|
46
49
|
profileId: string;
|
|
47
50
|
}, unknown>;
|
|
48
|
-
export declare const useConfirmProfileAvatar: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Profile.Request.ConfirmProfileAvatar, unknown>;
|
|
49
|
-
export declare const useClearProfileAvatar: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, void, unknown>;
|
|
51
|
+
export declare const useConfirmProfileAvatar: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Profile.Request.ConfirmProfileAvatar, unknown>;
|
|
52
|
+
export declare const useClearProfileAvatar: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, void, unknown>;
|
|
50
53
|
export declare const useListEmails: () => import('@tanstack/react-query').UseQueryResult<import('../types').ListDTOWithTotalNumber<Login.EmailItem>, AxiosError<unknown, any, any>>;
|
|
51
54
|
export declare const useListPhones: () => import('@tanstack/react-query').UseQueryResult<import('../types').ListDTOWithTotalNumber<Login.PhoneItem>, AxiosError<unknown, any, any>>;
|
|
52
|
-
export declare const useCreateEmail: () => import('@tanstack/react-query').UseMutationResult<Login.Response.CreateEmail, AxiosError<unknown, any, any>, Login.Request.CreateEmail, unknown>;
|
|
53
|
-
export declare const useSendEmailVerificationCode: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
55
|
+
export declare const useCreateEmail: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<Login.Response.CreateEmail, AxiosError<unknown, any, any>, Login.Request.CreateEmail, unknown>;
|
|
56
|
+
export declare const useSendEmailVerificationCode: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
54
57
|
emailId: string;
|
|
55
58
|
lang?: LanguageEnum;
|
|
56
59
|
}, unknown>;
|
|
57
|
-
export declare const useVerifyEmail: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
60
|
+
export declare const useVerifyEmail: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
58
61
|
emailId: string;
|
|
59
62
|
verificationCode: string;
|
|
60
63
|
}, unknown>;
|
|
61
|
-
export declare const useUpdateEmail: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
64
|
+
export declare const useUpdateEmail: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
62
65
|
emailId: string;
|
|
63
66
|
email: string;
|
|
64
67
|
}, unknown>;
|
|
65
|
-
export declare const useSetPrimaryEmail: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
66
|
-
export declare const useDeleteEmail: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
67
|
-
export declare const useSendChangePasswordVerificationCode: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Login.Request.SendChangePasswordVerificationCode, unknown>;
|
|
68
|
-
export declare const useChangePassword: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Login.Request.ChangePassword, unknown>;
|
|
69
|
-
export declare const useConfirmProfileBackgrounds: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Profile.Request.ConfirmProfileBackgrounds, unknown>;
|
|
70
|
-
export declare const useCreatePhone: () => import('@tanstack/react-query').UseMutationResult<Login.Response.CreatePhone, AxiosError<unknown, any, any>, Login.Request.CreatePhone, unknown>;
|
|
71
|
-
export declare const useSendPhoneVerificationCode: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
72
|
-
export declare const useVerifyPhone: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
68
|
+
export declare const useSetPrimaryEmail: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
69
|
+
export declare const useDeleteEmail: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
70
|
+
export declare const useSendChangePasswordVerificationCode: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Login.Request.SendChangePasswordVerificationCode, unknown>;
|
|
71
|
+
export declare const useChangePassword: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Login.Request.ChangePassword, unknown>;
|
|
72
|
+
export declare const useConfirmProfileBackgrounds: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, Profile.Request.ConfirmProfileBackgrounds, unknown>;
|
|
73
|
+
export declare const useCreatePhone: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<Login.Response.CreatePhone, AxiosError<unknown, any, any>, Login.Request.CreatePhone, unknown>;
|
|
74
|
+
export declare const useSendPhoneVerificationCode: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
75
|
+
export declare const useVerifyPhone: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
73
76
|
phoneId: string;
|
|
74
77
|
verificationCode: string;
|
|
75
78
|
}, unknown>;
|
|
76
|
-
export declare const useUpdatePhone: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
79
|
+
export declare const useUpdatePhone: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
77
80
|
phoneId: string;
|
|
78
81
|
phone: string;
|
|
79
82
|
}, unknown>;
|
|
80
|
-
export declare const useSetPrimaryPhone: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
81
|
-
export declare const useDeletePhone: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
83
|
+
export declare const useSetPrimaryPhone: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
84
|
+
export declare const useDeletePhone: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, string, unknown>;
|
|
82
85
|
export declare const useSearchForgerProfiles: (query: string) => import('@tanstack/react-query').UseQueryResult<import('../types').ListDTOWithTotalNumber<Profile.Response.ForgerProfileItem>, AxiosError<unknown, any, any>>;
|
|
83
86
|
export declare const useSearchAuthorityProfiles: (query: string) => import('@tanstack/react-query').UseQueryResult<import('../types').ListDTOWithTotalNumber<Profile.Response.AuthorityProfileItem>, AxiosError<unknown, any, any>>;
|
|
84
87
|
export declare const useGetPublicProfileCard: (profileId: string) => import('@tanstack/react-query').UseQueryResult<Profile.Response.ForgerProfileItem, AxiosError<unknown, any, any>>;
|
|
85
88
|
export declare const useListOwnerForgerProfiles: (query?: string) => import('@tanstack/react-query').UseQueryResult<import('../types').ListDTOWithTotalNumber<Profile.Response.ForgerProfileItem>, AxiosError<unknown, any, any>>;
|
|
86
89
|
export declare const useListOwnerAuthorityProfiles: (query?: string) => import('@tanstack/react-query').UseQueryResult<import('../types').ListDTOWithTotalNumber<Profile.Response.AuthorityProfileItem>, AxiosError<unknown, any, any>>;
|
|
87
|
-
export declare const useUpdateAuthorityProfileRoles: () => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
90
|
+
export declare const useUpdateAuthorityProfileRoles: (options?: HookToastMessages) => import('@tanstack/react-query').UseMutationResult<void, AxiosError<unknown, any, any>, {
|
|
88
91
|
profileId: string;
|
|
89
92
|
authorityRoles: Profile.Request.UpdateAuthorityProfileRoles["authorityRoles"];
|
|
90
93
|
}, unknown>;
|
package/dist/hooks/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/hooks/auth.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,oBAAoB,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAOjF,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGrF,OAAO,EACL,SAAS,EAGT,kBAAkB,EAMlB,YAAY,EACb,MAAM,oBA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