@fragno-dev/auth 0.0.14

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.
@@ -0,0 +1,122 @@
1
+ import { FragnoPublicClientConfig } from "@fragno-dev/core/client";
2
+ import * as zod0 from "zod";
3
+ import * as _fragno_dev_core_vue0 from "@fragno-dev/core/vue";
4
+ import * as _fragno_dev_core_api0 from "@fragno-dev/core/api";
5
+ import * as zod_v4_core0 from "zod/v4/core";
6
+
7
+ //#region src/client/vue.d.ts
8
+ declare function createAuthFragmentClient(config?: FragnoPublicClientConfig): {
9
+ useSignUp: _fragno_dev_core_vue0.FragnoVueMutator<_fragno_dev_core_api0.NonGetHTTPMethod, "/sign-up", zod0.ZodObject<{
10
+ email: zod0.ZodEmail;
11
+ password: zod0.ZodString;
12
+ }, zod_v4_core0.$strip> | undefined, zod0.ZodObject<{
13
+ sessionId: zod0.ZodString;
14
+ userId: zod0.ZodString;
15
+ email: zod0.ZodString;
16
+ role: zod0.ZodEnum<{
17
+ user: "user";
18
+ admin: "admin";
19
+ }>;
20
+ }, zod_v4_core0.$strip> | undefined, "invalid_input" | "email_already_exists", string>;
21
+ useSignIn: _fragno_dev_core_vue0.FragnoVueMutator<_fragno_dev_core_api0.NonGetHTTPMethod, "/sign-in", zod0.ZodObject<{
22
+ email: zod0.ZodEmail;
23
+ password: zod0.ZodString;
24
+ }, zod_v4_core0.$strip> | undefined, zod0.ZodObject<{
25
+ sessionId: zod0.ZodString;
26
+ userId: zod0.ZodString;
27
+ email: zod0.ZodString;
28
+ role: zod0.ZodEnum<{
29
+ user: "user";
30
+ admin: "admin";
31
+ }>;
32
+ }, zod_v4_core0.$strip> | undefined, "invalid_credentials", string>;
33
+ useSignOut: _fragno_dev_core_vue0.FragnoVueMutator<_fragno_dev_core_api0.NonGetHTTPMethod, "/sign-out", zod0.ZodOptional<zod0.ZodObject<{
34
+ sessionId: zod0.ZodOptional<zod0.ZodString>;
35
+ }, zod_v4_core0.$strip>> | undefined, zod0.ZodObject<{
36
+ success: zod0.ZodBoolean;
37
+ }, zod_v4_core0.$strip> | undefined, "session_not_found", string>;
38
+ useMe: _fragno_dev_core_vue0.FragnoVueHook<"GET", "/me", zod0.ZodObject<{
39
+ userId: zod0.ZodString;
40
+ email: zod0.ZodString;
41
+ role: zod0.ZodEnum<{
42
+ user: "user";
43
+ admin: "admin";
44
+ }>;
45
+ }, zod_v4_core0.$strip>, "session_invalid", "sessionId">;
46
+ useUsers: _fragno_dev_core_vue0.FragnoVueHook<"GET", "/users", zod0.ZodObject<{
47
+ users: zod0.ZodArray<zod0.ZodObject<{
48
+ id: zod0.ZodString;
49
+ email: zod0.ZodString;
50
+ role: zod0.ZodEnum<{
51
+ user: "user";
52
+ admin: "admin";
53
+ }>;
54
+ createdAt: zod0.ZodString;
55
+ }, zod_v4_core0.$strip>>;
56
+ cursor: zod0.ZodOptional<zod0.ZodString>;
57
+ hasNextPage: zod0.ZodBoolean;
58
+ sortBy: zod0.ZodEnum<{
59
+ createdAt: "createdAt";
60
+ email: "email";
61
+ }>;
62
+ }, zod_v4_core0.$strip>, "invalid_input", "pageSize" | "search" | "cursor" | "sortOrder" | "sortBy">;
63
+ useUpdateUserRole: _fragno_dev_core_vue0.FragnoVueMutator<_fragno_dev_core_api0.NonGetHTTPMethod, "/users/:userId/role", zod0.ZodObject<{
64
+ role: zod0.ZodEnum<{
65
+ user: "user";
66
+ admin: "admin";
67
+ }>;
68
+ }, zod_v4_core0.$strip> | undefined, zod0.ZodObject<{
69
+ success: zod0.ZodBoolean;
70
+ }, zod_v4_core0.$strip> | undefined, "invalid_input" | "session_invalid" | "permission_denied", string>;
71
+ useChangePassword: _fragno_dev_core_vue0.FragnoVueMutator<_fragno_dev_core_api0.NonGetHTTPMethod, "/change-password", zod0.ZodObject<{
72
+ newPassword: zod0.ZodString;
73
+ }, zod_v4_core0.$strip> | undefined, zod0.ZodObject<{
74
+ success: zod0.ZodBoolean;
75
+ }, zod_v4_core0.$strip> | undefined, "session_invalid", string>;
76
+ signIn: {
77
+ email: ({
78
+ email,
79
+ password,
80
+ rememberMe: _rememberMe
81
+ }: {
82
+ email: string;
83
+ password: string;
84
+ rememberMe?: boolean;
85
+ }) => Promise<{
86
+ sessionId: string;
87
+ userId: string;
88
+ email: string;
89
+ role: "user" | "admin";
90
+ } | undefined>;
91
+ };
92
+ signUp: {
93
+ email: ({
94
+ email,
95
+ password
96
+ }: {
97
+ email: string;
98
+ password: string;
99
+ }) => Promise<{
100
+ sessionId: string;
101
+ userId: string;
102
+ email: string;
103
+ role: "user" | "admin";
104
+ } | undefined>;
105
+ };
106
+ signOut: (params?: {
107
+ sessionId?: string;
108
+ }) => Promise<{
109
+ success: boolean;
110
+ } | undefined>;
111
+ me: (params?: {
112
+ sessionId?: string;
113
+ }) => Promise<{
114
+ userId: string;
115
+ email: string;
116
+ role: "user" | "admin";
117
+ }>;
118
+ };
119
+ //# sourceMappingURL=vue.d.ts.map
120
+ //#endregion
121
+ export { createAuthFragmentClient };
122
+ //# sourceMappingURL=vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue.d.ts","names":[],"sources":["../../../../src/client/vue.ts"],"sourcesContent":[],"mappings":";;;;;;;iBAIgB,wBAAA,UAAiC;oDAA6B,qBAAA,CAAA,gBAAA;;;;;IAA9D,MAAA,gBAAwB;IAAA,KAAA,gBAAA;IAAS,IAAA,cAAA,CAAA;MAA6B,IAAA,EAAA,MAAA"}
@@ -0,0 +1,11 @@
1
+ import { createAuthFragmentClients } from "../src-DNrh9CQq.js";
2
+ import { useFragno } from "@fragno-dev/core/vue";
3
+
4
+ //#region src/client/vue.ts
5
+ function createAuthFragmentClient(config = {}) {
6
+ return useFragno(createAuthFragmentClients(config));
7
+ }
8
+
9
+ //#endregion
10
+ export { createAuthFragmentClient };
11
+ //# sourceMappingURL=vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vue.js","names":["useFragno","createAuthFragmentClients","FragnoPublicClientConfig","createAuthFragmentClient","config"],"sources":["../../../src/client/vue.ts"],"sourcesContent":["import { useFragno } from \"@fragno-dev/core/vue\";\nimport { createAuthFragmentClients } from \"..\";\nimport type { FragnoPublicClientConfig } from \"@fragno-dev/core/client\";\n\nexport function createAuthFragmentClient(config: FragnoPublicClientConfig = {}) {\n return useFragno(createAuthFragmentClients(config));\n}\n"],"mappings":";;;;AAIA,SAAgBG,yBAAyBC,SAAmC,CAAE,GAAE;AAC9E,QAAOJ,UAAUC,0BAA0BG,OAAO,CAAC;AACrD"}