@drmhse/authos-vue 0.1.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/chokidar-KYB2GOYG.mjs +1730 -0
- package/dist/chunk-6DZX6EAA.mjs +33 -0
- package/dist/chunk-C2J6NSID.mjs +103 -0
- package/dist/chunk-F6BPUSH3.mjs +452 -0
- package/dist/chunk-JLL4L3HM.mjs +66 -0
- package/dist/chunk-OGRUDANK.mjs +28 -0
- package/dist/chunk-QGSFJDIC.mjs +1272 -0
- package/dist/chunk-SW2YRXFK.mjs +408 -0
- package/dist/chunk-T2K7EIWY.mjs +18 -0
- package/dist/chunk-VCTSSS2F.mjs +741 -0
- package/dist/chunk-XLWXQZHO.mjs +3602 -0
- package/dist/chunk-Z2UOP6GF.mjs +986 -0
- package/dist/dist-CX347IU5.mjs +12545 -0
- package/dist/dist-KTGFCHLE.mjs +3 -0
- package/dist/index.d.mts +269 -0
- package/dist/index.d.ts +269 -0
- package/dist/index.js +562 -0
- package/dist/index.mjs +511 -0
- package/dist/json5-WAUASGCX.mjs +3 -0
- package/dist/jsonc-BXVTKCPI.mjs +3 -0
- package/dist/multipart-parser-ZINPIK62.mjs +173 -0
- package/dist/nuxt.d.mts +15 -0
- package/dist/nuxt.d.ts +15 -0
- package/dist/nuxt.js +10527 -0
- package/dist/nuxt.mjs +7988 -0
- package/dist/prompt-LQK3IVQK.mjs +751 -0
- package/dist/toml-EIVFNDS7.mjs +3 -0
- package/dist/utils-ITGQWSRY.mjs +94 -0
- package/dist/yaml-NCROZBG5.mjs +3 -0
- package/package.json +76 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { App, PropType, VNode } from 'vue';
|
|
3
|
+
import * as _drmhse_sso_sdk from '@drmhse/sso-sdk';
|
|
4
|
+
import { TokenStorage, UserProfile, OrganizationResponse, SsoClient } from '@drmhse/sso-sdk';
|
|
5
|
+
export { AuthErrorCodes, BrowserStorage, MemoryStorage, OrganizationResponse, SsoApiError, SsoClient, TokenStorage, UserProfile } from '@drmhse/sso-sdk';
|
|
6
|
+
|
|
7
|
+
interface AuthOSState {
|
|
8
|
+
user: UserProfile | null;
|
|
9
|
+
isAuthenticated: boolean;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
currentOrganization: OrganizationResponse | null;
|
|
12
|
+
organizations: OrganizationResponse[];
|
|
13
|
+
}
|
|
14
|
+
interface AuthOSContext {
|
|
15
|
+
client: SsoClient;
|
|
16
|
+
state: AuthOSState;
|
|
17
|
+
}
|
|
18
|
+
interface AuthOSPluginOptions {
|
|
19
|
+
baseUrl: string;
|
|
20
|
+
storage?: TokenStorage;
|
|
21
|
+
autoRefresh?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const AUTH_OS_INJECTION_KEY: unique symbol;
|
|
24
|
+
|
|
25
|
+
declare function createAuthOS(options: AuthOSPluginOptions): {
|
|
26
|
+
install(app: App): void;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
declare function useAuthOS(): {
|
|
30
|
+
client: SsoClient;
|
|
31
|
+
isLoading: vue.ComputedRef<boolean>;
|
|
32
|
+
isAuthenticated: vue.ComputedRef<boolean>;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
declare function useUser(): {
|
|
36
|
+
user: vue.Ref<null, null>;
|
|
37
|
+
isLoading: vue.ComputedRef<boolean>;
|
|
38
|
+
} | {
|
|
39
|
+
user: vue.ComputedRef<_drmhse_sso_sdk.UserProfile | null>;
|
|
40
|
+
isLoading: vue.ComputedRef<boolean>;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
declare function useOrganization(): {
|
|
44
|
+
currentOrganization: vue.Ref<null, null>;
|
|
45
|
+
organizations: vue.Ref<never[], never[]>;
|
|
46
|
+
switchOrganization: () => Promise<null>;
|
|
47
|
+
isSwitching: vue.Ref<boolean, boolean>;
|
|
48
|
+
} | {
|
|
49
|
+
currentOrganization: vue.ComputedRef<_drmhse_sso_sdk.OrganizationResponse | null>;
|
|
50
|
+
organizations: vue.ComputedRef<_drmhse_sso_sdk.OrganizationResponse[]>;
|
|
51
|
+
switchOrganization: (slug: string) => Promise<_drmhse_sso_sdk.OrganizationResponse | undefined>;
|
|
52
|
+
isSwitching: vue.Ref<boolean, boolean>;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
declare const AuthOSProvider: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
56
|
+
baseUrl: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
required: true;
|
|
59
|
+
};
|
|
60
|
+
storage: {
|
|
61
|
+
type: PropType<TokenStorage>;
|
|
62
|
+
default: undefined;
|
|
63
|
+
};
|
|
64
|
+
client: {
|
|
65
|
+
type: PropType<SsoClient>;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
69
|
+
[key: string]: any;
|
|
70
|
+
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
73
|
+
baseUrl: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
required: true;
|
|
76
|
+
};
|
|
77
|
+
storage: {
|
|
78
|
+
type: PropType<TokenStorage>;
|
|
79
|
+
default: undefined;
|
|
80
|
+
};
|
|
81
|
+
client: {
|
|
82
|
+
type: PropType<SsoClient>;
|
|
83
|
+
default: undefined;
|
|
84
|
+
};
|
|
85
|
+
}>> & Readonly<{}>, {
|
|
86
|
+
storage: TokenStorage;
|
|
87
|
+
client: SsoClient;
|
|
88
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
89
|
+
|
|
90
|
+
type SignInStep = 'credentials' | 'mfa';
|
|
91
|
+
interface SignInSlotProps {
|
|
92
|
+
email: string;
|
|
93
|
+
password: string;
|
|
94
|
+
mfaCode: string;
|
|
95
|
+
step: SignInStep;
|
|
96
|
+
error: string | null;
|
|
97
|
+
isSubmitting: boolean;
|
|
98
|
+
updateEmail: (value: string) => void;
|
|
99
|
+
updatePassword: (value: string) => void;
|
|
100
|
+
updateMfaCode: (value: string) => void;
|
|
101
|
+
submit: () => Promise<void>;
|
|
102
|
+
}
|
|
103
|
+
declare const SignIn: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
104
|
+
onSuccess: {
|
|
105
|
+
type: PropType<() => void>;
|
|
106
|
+
default: undefined;
|
|
107
|
+
};
|
|
108
|
+
onError: {
|
|
109
|
+
type: PropType<(error: Error) => void>;
|
|
110
|
+
default: undefined;
|
|
111
|
+
};
|
|
112
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
113
|
+
[key: string]: any;
|
|
114
|
+
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
115
|
+
[key: string]: any;
|
|
116
|
+
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("success" | "error")[], "success" | "error", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
117
|
+
onSuccess: {
|
|
118
|
+
type: PropType<() => void>;
|
|
119
|
+
default: undefined;
|
|
120
|
+
};
|
|
121
|
+
onError: {
|
|
122
|
+
type: PropType<(error: Error) => void>;
|
|
123
|
+
default: undefined;
|
|
124
|
+
};
|
|
125
|
+
}>> & Readonly<{
|
|
126
|
+
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
127
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
128
|
+
}>, {
|
|
129
|
+
onSuccess: () => void;
|
|
130
|
+
onError: (error: Error) => void;
|
|
131
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
132
|
+
|
|
133
|
+
interface SignUpSlotProps {
|
|
134
|
+
email: string;
|
|
135
|
+
password: string;
|
|
136
|
+
error: string | null;
|
|
137
|
+
isSubmitting: boolean;
|
|
138
|
+
updateEmail: (value: string) => void;
|
|
139
|
+
updatePassword: (value: string) => void;
|
|
140
|
+
submit: () => Promise<void>;
|
|
141
|
+
}
|
|
142
|
+
declare const SignUp: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
143
|
+
onSuccess: {
|
|
144
|
+
type: PropType<() => void>;
|
|
145
|
+
default: undefined;
|
|
146
|
+
};
|
|
147
|
+
onError: {
|
|
148
|
+
type: PropType<(error: Error) => void>;
|
|
149
|
+
default: undefined;
|
|
150
|
+
};
|
|
151
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
152
|
+
[key: string]: any;
|
|
153
|
+
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
154
|
+
[key: string]: any;
|
|
155
|
+
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("success" | "error")[], "success" | "error", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
156
|
+
onSuccess: {
|
|
157
|
+
type: PropType<() => void>;
|
|
158
|
+
default: undefined;
|
|
159
|
+
};
|
|
160
|
+
onError: {
|
|
161
|
+
type: PropType<(error: Error) => void>;
|
|
162
|
+
default: undefined;
|
|
163
|
+
};
|
|
164
|
+
}>> & Readonly<{
|
|
165
|
+
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
166
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
167
|
+
}>, {
|
|
168
|
+
onSuccess: () => void;
|
|
169
|
+
onError: (error: Error) => void;
|
|
170
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
171
|
+
|
|
172
|
+
interface OrganizationSwitcherSlotProps {
|
|
173
|
+
currentOrganization: OrganizationResponse | null;
|
|
174
|
+
organizations: OrganizationResponse[];
|
|
175
|
+
isSwitching: boolean;
|
|
176
|
+
switchTo: (slug: string) => Promise<void>;
|
|
177
|
+
}
|
|
178
|
+
declare const OrganizationSwitcher: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
179
|
+
onSwitch: {
|
|
180
|
+
type: PropType<(org: OrganizationResponse) => void>;
|
|
181
|
+
default: undefined;
|
|
182
|
+
};
|
|
183
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
184
|
+
[key: string]: any;
|
|
185
|
+
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
186
|
+
[key: string]: any;
|
|
187
|
+
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "switch"[], "switch", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
188
|
+
onSwitch: {
|
|
189
|
+
type: PropType<(org: OrganizationResponse) => void>;
|
|
190
|
+
default: undefined;
|
|
191
|
+
};
|
|
192
|
+
}>> & Readonly<{
|
|
193
|
+
onSwitch?: ((...args: any[]) => any) | undefined;
|
|
194
|
+
}>, {
|
|
195
|
+
onSwitch: (org: OrganizationResponse) => void;
|
|
196
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
197
|
+
|
|
198
|
+
interface UserButtonSlotProps {
|
|
199
|
+
user: ReturnType<typeof useUser>['user']['value'];
|
|
200
|
+
isLoading: boolean;
|
|
201
|
+
isLoggingOut: boolean;
|
|
202
|
+
logout: () => Promise<void>;
|
|
203
|
+
}
|
|
204
|
+
declare const UserButton: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
205
|
+
onLogout: {
|
|
206
|
+
type: PropType<() => void>;
|
|
207
|
+
default: undefined;
|
|
208
|
+
};
|
|
209
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
210
|
+
[key: string]: any;
|
|
211
|
+
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
212
|
+
[key: string]: any;
|
|
213
|
+
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "logout"[], "logout", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
214
|
+
onLogout: {
|
|
215
|
+
type: PropType<() => void>;
|
|
216
|
+
default: undefined;
|
|
217
|
+
};
|
|
218
|
+
}>> & Readonly<{
|
|
219
|
+
onLogout?: ((...args: any[]) => any) | undefined;
|
|
220
|
+
}>, {
|
|
221
|
+
onLogout: () => void;
|
|
222
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
223
|
+
|
|
224
|
+
declare const Protect: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
225
|
+
permission: {
|
|
226
|
+
type: StringConstructor;
|
|
227
|
+
default: undefined;
|
|
228
|
+
};
|
|
229
|
+
permissions: {
|
|
230
|
+
type: PropType<string[]>;
|
|
231
|
+
default: undefined;
|
|
232
|
+
};
|
|
233
|
+
requireAll: {
|
|
234
|
+
type: BooleanConstructor;
|
|
235
|
+
default: boolean;
|
|
236
|
+
};
|
|
237
|
+
fallback: {
|
|
238
|
+
type: PropType<VNode | (() => VNode)>;
|
|
239
|
+
default: undefined;
|
|
240
|
+
};
|
|
241
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
242
|
+
[key: string]: any;
|
|
243
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
244
|
+
permission: {
|
|
245
|
+
type: StringConstructor;
|
|
246
|
+
default: undefined;
|
|
247
|
+
};
|
|
248
|
+
permissions: {
|
|
249
|
+
type: PropType<string[]>;
|
|
250
|
+
default: undefined;
|
|
251
|
+
};
|
|
252
|
+
requireAll: {
|
|
253
|
+
type: BooleanConstructor;
|
|
254
|
+
default: boolean;
|
|
255
|
+
};
|
|
256
|
+
fallback: {
|
|
257
|
+
type: PropType<VNode | (() => VNode)>;
|
|
258
|
+
default: undefined;
|
|
259
|
+
};
|
|
260
|
+
}>> & Readonly<{}>, {
|
|
261
|
+
permissions: string[];
|
|
262
|
+
permission: string;
|
|
263
|
+
requireAll: boolean;
|
|
264
|
+
fallback: VNode<vue.RendererNode, vue.RendererElement, {
|
|
265
|
+
[key: string]: any;
|
|
266
|
+
}> | (() => VNode);
|
|
267
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
268
|
+
|
|
269
|
+
export { AUTH_OS_INJECTION_KEY, type AuthOSContext, type AuthOSPluginOptions, AuthOSProvider, type AuthOSState, OrganizationSwitcher, type OrganizationSwitcherSlotProps, Protect, SignIn, type SignInSlotProps, SignUp, type SignUpSlotProps, UserButton, type UserButtonSlotProps, createAuthOS, useAuthOS, useOrganization, useUser };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import * as vue from 'vue';
|
|
2
|
+
import { App, PropType, VNode } from 'vue';
|
|
3
|
+
import * as _drmhse_sso_sdk from '@drmhse/sso-sdk';
|
|
4
|
+
import { TokenStorage, UserProfile, OrganizationResponse, SsoClient } from '@drmhse/sso-sdk';
|
|
5
|
+
export { AuthErrorCodes, BrowserStorage, MemoryStorage, OrganizationResponse, SsoApiError, SsoClient, TokenStorage, UserProfile } from '@drmhse/sso-sdk';
|
|
6
|
+
|
|
7
|
+
interface AuthOSState {
|
|
8
|
+
user: UserProfile | null;
|
|
9
|
+
isAuthenticated: boolean;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
currentOrganization: OrganizationResponse | null;
|
|
12
|
+
organizations: OrganizationResponse[];
|
|
13
|
+
}
|
|
14
|
+
interface AuthOSContext {
|
|
15
|
+
client: SsoClient;
|
|
16
|
+
state: AuthOSState;
|
|
17
|
+
}
|
|
18
|
+
interface AuthOSPluginOptions {
|
|
19
|
+
baseUrl: string;
|
|
20
|
+
storage?: TokenStorage;
|
|
21
|
+
autoRefresh?: boolean;
|
|
22
|
+
}
|
|
23
|
+
declare const AUTH_OS_INJECTION_KEY: unique symbol;
|
|
24
|
+
|
|
25
|
+
declare function createAuthOS(options: AuthOSPluginOptions): {
|
|
26
|
+
install(app: App): void;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
declare function useAuthOS(): {
|
|
30
|
+
client: SsoClient;
|
|
31
|
+
isLoading: vue.ComputedRef<boolean>;
|
|
32
|
+
isAuthenticated: vue.ComputedRef<boolean>;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
declare function useUser(): {
|
|
36
|
+
user: vue.Ref<null, null>;
|
|
37
|
+
isLoading: vue.ComputedRef<boolean>;
|
|
38
|
+
} | {
|
|
39
|
+
user: vue.ComputedRef<_drmhse_sso_sdk.UserProfile | null>;
|
|
40
|
+
isLoading: vue.ComputedRef<boolean>;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
declare function useOrganization(): {
|
|
44
|
+
currentOrganization: vue.Ref<null, null>;
|
|
45
|
+
organizations: vue.Ref<never[], never[]>;
|
|
46
|
+
switchOrganization: () => Promise<null>;
|
|
47
|
+
isSwitching: vue.Ref<boolean, boolean>;
|
|
48
|
+
} | {
|
|
49
|
+
currentOrganization: vue.ComputedRef<_drmhse_sso_sdk.OrganizationResponse | null>;
|
|
50
|
+
organizations: vue.ComputedRef<_drmhse_sso_sdk.OrganizationResponse[]>;
|
|
51
|
+
switchOrganization: (slug: string) => Promise<_drmhse_sso_sdk.OrganizationResponse | undefined>;
|
|
52
|
+
isSwitching: vue.Ref<boolean, boolean>;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
declare const AuthOSProvider: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
56
|
+
baseUrl: {
|
|
57
|
+
type: StringConstructor;
|
|
58
|
+
required: true;
|
|
59
|
+
};
|
|
60
|
+
storage: {
|
|
61
|
+
type: PropType<TokenStorage>;
|
|
62
|
+
default: undefined;
|
|
63
|
+
};
|
|
64
|
+
client: {
|
|
65
|
+
type: PropType<SsoClient>;
|
|
66
|
+
default: undefined;
|
|
67
|
+
};
|
|
68
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
69
|
+
[key: string]: any;
|
|
70
|
+
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
71
|
+
[key: string]: any;
|
|
72
|
+
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
73
|
+
baseUrl: {
|
|
74
|
+
type: StringConstructor;
|
|
75
|
+
required: true;
|
|
76
|
+
};
|
|
77
|
+
storage: {
|
|
78
|
+
type: PropType<TokenStorage>;
|
|
79
|
+
default: undefined;
|
|
80
|
+
};
|
|
81
|
+
client: {
|
|
82
|
+
type: PropType<SsoClient>;
|
|
83
|
+
default: undefined;
|
|
84
|
+
};
|
|
85
|
+
}>> & Readonly<{}>, {
|
|
86
|
+
storage: TokenStorage;
|
|
87
|
+
client: SsoClient;
|
|
88
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
89
|
+
|
|
90
|
+
type SignInStep = 'credentials' | 'mfa';
|
|
91
|
+
interface SignInSlotProps {
|
|
92
|
+
email: string;
|
|
93
|
+
password: string;
|
|
94
|
+
mfaCode: string;
|
|
95
|
+
step: SignInStep;
|
|
96
|
+
error: string | null;
|
|
97
|
+
isSubmitting: boolean;
|
|
98
|
+
updateEmail: (value: string) => void;
|
|
99
|
+
updatePassword: (value: string) => void;
|
|
100
|
+
updateMfaCode: (value: string) => void;
|
|
101
|
+
submit: () => Promise<void>;
|
|
102
|
+
}
|
|
103
|
+
declare const SignIn: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
104
|
+
onSuccess: {
|
|
105
|
+
type: PropType<() => void>;
|
|
106
|
+
default: undefined;
|
|
107
|
+
};
|
|
108
|
+
onError: {
|
|
109
|
+
type: PropType<(error: Error) => void>;
|
|
110
|
+
default: undefined;
|
|
111
|
+
};
|
|
112
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
113
|
+
[key: string]: any;
|
|
114
|
+
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
115
|
+
[key: string]: any;
|
|
116
|
+
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("success" | "error")[], "success" | "error", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
117
|
+
onSuccess: {
|
|
118
|
+
type: PropType<() => void>;
|
|
119
|
+
default: undefined;
|
|
120
|
+
};
|
|
121
|
+
onError: {
|
|
122
|
+
type: PropType<(error: Error) => void>;
|
|
123
|
+
default: undefined;
|
|
124
|
+
};
|
|
125
|
+
}>> & Readonly<{
|
|
126
|
+
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
127
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
128
|
+
}>, {
|
|
129
|
+
onSuccess: () => void;
|
|
130
|
+
onError: (error: Error) => void;
|
|
131
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
132
|
+
|
|
133
|
+
interface SignUpSlotProps {
|
|
134
|
+
email: string;
|
|
135
|
+
password: string;
|
|
136
|
+
error: string | null;
|
|
137
|
+
isSubmitting: boolean;
|
|
138
|
+
updateEmail: (value: string) => void;
|
|
139
|
+
updatePassword: (value: string) => void;
|
|
140
|
+
submit: () => Promise<void>;
|
|
141
|
+
}
|
|
142
|
+
declare const SignUp: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
143
|
+
onSuccess: {
|
|
144
|
+
type: PropType<() => void>;
|
|
145
|
+
default: undefined;
|
|
146
|
+
};
|
|
147
|
+
onError: {
|
|
148
|
+
type: PropType<(error: Error) => void>;
|
|
149
|
+
default: undefined;
|
|
150
|
+
};
|
|
151
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
152
|
+
[key: string]: any;
|
|
153
|
+
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
154
|
+
[key: string]: any;
|
|
155
|
+
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, ("success" | "error")[], "success" | "error", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
156
|
+
onSuccess: {
|
|
157
|
+
type: PropType<() => void>;
|
|
158
|
+
default: undefined;
|
|
159
|
+
};
|
|
160
|
+
onError: {
|
|
161
|
+
type: PropType<(error: Error) => void>;
|
|
162
|
+
default: undefined;
|
|
163
|
+
};
|
|
164
|
+
}>> & Readonly<{
|
|
165
|
+
onSuccess?: ((...args: any[]) => any) | undefined;
|
|
166
|
+
onError?: ((...args: any[]) => any) | undefined;
|
|
167
|
+
}>, {
|
|
168
|
+
onSuccess: () => void;
|
|
169
|
+
onError: (error: Error) => void;
|
|
170
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
171
|
+
|
|
172
|
+
interface OrganizationSwitcherSlotProps {
|
|
173
|
+
currentOrganization: OrganizationResponse | null;
|
|
174
|
+
organizations: OrganizationResponse[];
|
|
175
|
+
isSwitching: boolean;
|
|
176
|
+
switchTo: (slug: string) => Promise<void>;
|
|
177
|
+
}
|
|
178
|
+
declare const OrganizationSwitcher: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
179
|
+
onSwitch: {
|
|
180
|
+
type: PropType<(org: OrganizationResponse) => void>;
|
|
181
|
+
default: undefined;
|
|
182
|
+
};
|
|
183
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
184
|
+
[key: string]: any;
|
|
185
|
+
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
186
|
+
[key: string]: any;
|
|
187
|
+
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "switch"[], "switch", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
188
|
+
onSwitch: {
|
|
189
|
+
type: PropType<(org: OrganizationResponse) => void>;
|
|
190
|
+
default: undefined;
|
|
191
|
+
};
|
|
192
|
+
}>> & Readonly<{
|
|
193
|
+
onSwitch?: ((...args: any[]) => any) | undefined;
|
|
194
|
+
}>, {
|
|
195
|
+
onSwitch: (org: OrganizationResponse) => void;
|
|
196
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
197
|
+
|
|
198
|
+
interface UserButtonSlotProps {
|
|
199
|
+
user: ReturnType<typeof useUser>['user']['value'];
|
|
200
|
+
isLoading: boolean;
|
|
201
|
+
isLoggingOut: boolean;
|
|
202
|
+
logout: () => Promise<void>;
|
|
203
|
+
}
|
|
204
|
+
declare const UserButton: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
205
|
+
onLogout: {
|
|
206
|
+
type: PropType<() => void>;
|
|
207
|
+
default: undefined;
|
|
208
|
+
};
|
|
209
|
+
}>, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
210
|
+
[key: string]: any;
|
|
211
|
+
}> | vue.VNode<vue.RendererNode, vue.RendererElement, {
|
|
212
|
+
[key: string]: any;
|
|
213
|
+
}>[], {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, "logout"[], "logout", vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
214
|
+
onLogout: {
|
|
215
|
+
type: PropType<() => void>;
|
|
216
|
+
default: undefined;
|
|
217
|
+
};
|
|
218
|
+
}>> & Readonly<{
|
|
219
|
+
onLogout?: ((...args: any[]) => any) | undefined;
|
|
220
|
+
}>, {
|
|
221
|
+
onLogout: () => void;
|
|
222
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
223
|
+
|
|
224
|
+
declare const Protect: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
225
|
+
permission: {
|
|
226
|
+
type: StringConstructor;
|
|
227
|
+
default: undefined;
|
|
228
|
+
};
|
|
229
|
+
permissions: {
|
|
230
|
+
type: PropType<string[]>;
|
|
231
|
+
default: undefined;
|
|
232
|
+
};
|
|
233
|
+
requireAll: {
|
|
234
|
+
type: BooleanConstructor;
|
|
235
|
+
default: boolean;
|
|
236
|
+
};
|
|
237
|
+
fallback: {
|
|
238
|
+
type: PropType<VNode | (() => VNode)>;
|
|
239
|
+
default: undefined;
|
|
240
|
+
};
|
|
241
|
+
}>, () => VNode<vue.RendererNode, vue.RendererElement, {
|
|
242
|
+
[key: string]: any;
|
|
243
|
+
}>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<vue.ExtractPropTypes<{
|
|
244
|
+
permission: {
|
|
245
|
+
type: StringConstructor;
|
|
246
|
+
default: undefined;
|
|
247
|
+
};
|
|
248
|
+
permissions: {
|
|
249
|
+
type: PropType<string[]>;
|
|
250
|
+
default: undefined;
|
|
251
|
+
};
|
|
252
|
+
requireAll: {
|
|
253
|
+
type: BooleanConstructor;
|
|
254
|
+
default: boolean;
|
|
255
|
+
};
|
|
256
|
+
fallback: {
|
|
257
|
+
type: PropType<VNode | (() => VNode)>;
|
|
258
|
+
default: undefined;
|
|
259
|
+
};
|
|
260
|
+
}>> & Readonly<{}>, {
|
|
261
|
+
permissions: string[];
|
|
262
|
+
permission: string;
|
|
263
|
+
requireAll: boolean;
|
|
264
|
+
fallback: VNode<vue.RendererNode, vue.RendererElement, {
|
|
265
|
+
[key: string]: any;
|
|
266
|
+
}> | (() => VNode);
|
|
267
|
+
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
268
|
+
|
|
269
|
+
export { AUTH_OS_INJECTION_KEY, type AuthOSContext, type AuthOSPluginOptions, AuthOSProvider, type AuthOSState, OrganizationSwitcher, type OrganizationSwitcherSlotProps, Protect, SignIn, type SignInSlotProps, SignUp, type SignUpSlotProps, UserButton, type UserButtonSlotProps, createAuthOS, useAuthOS, useOrganization, useUser };
|