@descope/nextjs-sdk 0.0.14 → 0.0.16
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/client/dts/src/shared/DescopeFlows.d.ts +64 -24
- package/dist/dts/src/shared/DescopeFlows.d.ts +64 -24
- package/dist/index.d.ts +65 -24
- package/dist/server/constants.js +1 -1
- package/dist/server/dts/src/shared/DescopeFlows.d.ts +64 -24
- package/dist/shared/constants.js +1 -1
- package/package.json +2 -2
|
@@ -5,9 +5,14 @@ type AdditionalProps = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const Descope: React.ComponentType<(({
|
|
7
7
|
flowId: string;
|
|
8
|
-
onSuccess?: (
|
|
9
|
-
onError?:
|
|
10
|
-
|
|
8
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
9
|
+
onError?: (e: CustomEvent<{
|
|
10
|
+
errorCode: string;
|
|
11
|
+
errorDescription: string;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
retryAfter?: string;
|
|
14
|
+
}>) => void;
|
|
15
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
11
16
|
logger?: import("@descope/web-component").ILogger;
|
|
12
17
|
tenant?: string;
|
|
13
18
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -25,9 +30,14 @@ export declare const Descope: React.ComponentType<(({
|
|
|
25
30
|
client?: Record<string, any>;
|
|
26
31
|
} & React.RefAttributes<HTMLElement>) | ({
|
|
27
32
|
flowId: string;
|
|
28
|
-
onSuccess?: (
|
|
29
|
-
onError?:
|
|
30
|
-
|
|
33
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
34
|
+
onError?: (e: CustomEvent<{
|
|
35
|
+
errorCode: string;
|
|
36
|
+
errorDescription: string;
|
|
37
|
+
errorMessage?: string;
|
|
38
|
+
retryAfter?: string;
|
|
39
|
+
}>) => void;
|
|
40
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
31
41
|
logger?: import("@descope/web-component").ILogger;
|
|
32
42
|
tenant?: string;
|
|
33
43
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -48,9 +58,14 @@ export declare const Descope: React.ComponentType<(({
|
|
|
48
58
|
})) & AdditionalProps>;
|
|
49
59
|
export declare const SignInFlow: React.ComponentType<({
|
|
50
60
|
form?: Record<string, any>;
|
|
51
|
-
onSuccess?: (
|
|
52
|
-
onError?:
|
|
53
|
-
|
|
61
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
62
|
+
onError?: (e: CustomEvent<{
|
|
63
|
+
errorCode: string;
|
|
64
|
+
errorDescription: string;
|
|
65
|
+
errorMessage?: string;
|
|
66
|
+
retryAfter?: string;
|
|
67
|
+
}>) => void;
|
|
68
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
54
69
|
logger?: import("@descope/web-component").ILogger;
|
|
55
70
|
tenant?: string;
|
|
56
71
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -67,9 +82,14 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
67
82
|
client?: Record<string, any>;
|
|
68
83
|
} | ({
|
|
69
84
|
form?: Record<string, any>;
|
|
70
|
-
onSuccess?: (
|
|
71
|
-
onError?:
|
|
72
|
-
|
|
85
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
86
|
+
onError?: (e: CustomEvent<{
|
|
87
|
+
errorCode: string;
|
|
88
|
+
errorDescription: string;
|
|
89
|
+
errorMessage?: string;
|
|
90
|
+
retryAfter?: string;
|
|
91
|
+
}>) => void;
|
|
92
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
73
93
|
logger?: import("@descope/web-component").ILogger;
|
|
74
94
|
tenant?: string;
|
|
75
95
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -89,9 +109,14 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
89
109
|
})) & AdditionalProps>;
|
|
90
110
|
export declare const SignUpFlow: React.ComponentType<({
|
|
91
111
|
form?: Record<string, any>;
|
|
92
|
-
onSuccess?: (
|
|
93
|
-
onError?:
|
|
94
|
-
|
|
112
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
113
|
+
onError?: (e: CustomEvent<{
|
|
114
|
+
errorCode: string;
|
|
115
|
+
errorDescription: string;
|
|
116
|
+
errorMessage?: string;
|
|
117
|
+
retryAfter?: string;
|
|
118
|
+
}>) => void;
|
|
119
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
95
120
|
logger?: import("@descope/web-component").ILogger;
|
|
96
121
|
tenant?: string;
|
|
97
122
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -108,9 +133,14 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
108
133
|
client?: Record<string, any>;
|
|
109
134
|
} | ({
|
|
110
135
|
form?: Record<string, any>;
|
|
111
|
-
onSuccess?: (
|
|
112
|
-
onError?:
|
|
113
|
-
|
|
136
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
137
|
+
onError?: (e: CustomEvent<{
|
|
138
|
+
errorCode: string;
|
|
139
|
+
errorDescription: string;
|
|
140
|
+
errorMessage?: string;
|
|
141
|
+
retryAfter?: string;
|
|
142
|
+
}>) => void;
|
|
143
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
114
144
|
logger?: import("@descope/web-component").ILogger;
|
|
115
145
|
tenant?: string;
|
|
116
146
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -130,9 +160,14 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
130
160
|
})) & AdditionalProps>;
|
|
131
161
|
export declare const SignUpOrInFlow: React.ComponentType<({
|
|
132
162
|
form?: Record<string, any>;
|
|
133
|
-
onSuccess?: (
|
|
134
|
-
onError?:
|
|
135
|
-
|
|
163
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
164
|
+
onError?: (e: CustomEvent<{
|
|
165
|
+
errorCode: string;
|
|
166
|
+
errorDescription: string;
|
|
167
|
+
errorMessage?: string;
|
|
168
|
+
retryAfter?: string;
|
|
169
|
+
}>) => void;
|
|
170
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
136
171
|
logger?: import("@descope/web-component").ILogger;
|
|
137
172
|
tenant?: string;
|
|
138
173
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -149,9 +184,14 @@ export declare const SignUpOrInFlow: React.ComponentType<({
|
|
|
149
184
|
client?: Record<string, any>;
|
|
150
185
|
} | ({
|
|
151
186
|
form?: Record<string, any>;
|
|
152
|
-
onSuccess?: (
|
|
153
|
-
onError?:
|
|
154
|
-
|
|
187
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
188
|
+
onError?: (e: CustomEvent<{
|
|
189
|
+
errorCode: string;
|
|
190
|
+
errorDescription: string;
|
|
191
|
+
errorMessage?: string;
|
|
192
|
+
retryAfter?: string;
|
|
193
|
+
}>) => void;
|
|
194
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
155
195
|
logger?: import("@descope/web-component").ILogger;
|
|
156
196
|
tenant?: string;
|
|
157
197
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -5,9 +5,14 @@ type AdditionalProps = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const Descope: React.ComponentType<(({
|
|
7
7
|
flowId: string;
|
|
8
|
-
onSuccess?: (
|
|
9
|
-
onError?:
|
|
10
|
-
|
|
8
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
9
|
+
onError?: (e: CustomEvent<{
|
|
10
|
+
errorCode: string;
|
|
11
|
+
errorDescription: string;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
retryAfter?: string;
|
|
14
|
+
}>) => void;
|
|
15
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
11
16
|
logger?: import("@descope/web-component").ILogger;
|
|
12
17
|
tenant?: string;
|
|
13
18
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -25,9 +30,14 @@ export declare const Descope: React.ComponentType<(({
|
|
|
25
30
|
client?: Record<string, any>;
|
|
26
31
|
} & React.RefAttributes<HTMLElement>) | ({
|
|
27
32
|
flowId: string;
|
|
28
|
-
onSuccess?: (
|
|
29
|
-
onError?:
|
|
30
|
-
|
|
33
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
34
|
+
onError?: (e: CustomEvent<{
|
|
35
|
+
errorCode: string;
|
|
36
|
+
errorDescription: string;
|
|
37
|
+
errorMessage?: string;
|
|
38
|
+
retryAfter?: string;
|
|
39
|
+
}>) => void;
|
|
40
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
31
41
|
logger?: import("@descope/web-component").ILogger;
|
|
32
42
|
tenant?: string;
|
|
33
43
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -48,9 +58,14 @@ export declare const Descope: React.ComponentType<(({
|
|
|
48
58
|
})) & AdditionalProps>;
|
|
49
59
|
export declare const SignInFlow: React.ComponentType<({
|
|
50
60
|
form?: Record<string, any>;
|
|
51
|
-
onSuccess?: (
|
|
52
|
-
onError?:
|
|
53
|
-
|
|
61
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
62
|
+
onError?: (e: CustomEvent<{
|
|
63
|
+
errorCode: string;
|
|
64
|
+
errorDescription: string;
|
|
65
|
+
errorMessage?: string;
|
|
66
|
+
retryAfter?: string;
|
|
67
|
+
}>) => void;
|
|
68
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
54
69
|
logger?: import("@descope/web-component").ILogger;
|
|
55
70
|
tenant?: string;
|
|
56
71
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -67,9 +82,14 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
67
82
|
client?: Record<string, any>;
|
|
68
83
|
} | ({
|
|
69
84
|
form?: Record<string, any>;
|
|
70
|
-
onSuccess?: (
|
|
71
|
-
onError?:
|
|
72
|
-
|
|
85
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
86
|
+
onError?: (e: CustomEvent<{
|
|
87
|
+
errorCode: string;
|
|
88
|
+
errorDescription: string;
|
|
89
|
+
errorMessage?: string;
|
|
90
|
+
retryAfter?: string;
|
|
91
|
+
}>) => void;
|
|
92
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
73
93
|
logger?: import("@descope/web-component").ILogger;
|
|
74
94
|
tenant?: string;
|
|
75
95
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -89,9 +109,14 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
89
109
|
})) & AdditionalProps>;
|
|
90
110
|
export declare const SignUpFlow: React.ComponentType<({
|
|
91
111
|
form?: Record<string, any>;
|
|
92
|
-
onSuccess?: (
|
|
93
|
-
onError?:
|
|
94
|
-
|
|
112
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
113
|
+
onError?: (e: CustomEvent<{
|
|
114
|
+
errorCode: string;
|
|
115
|
+
errorDescription: string;
|
|
116
|
+
errorMessage?: string;
|
|
117
|
+
retryAfter?: string;
|
|
118
|
+
}>) => void;
|
|
119
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
95
120
|
logger?: import("@descope/web-component").ILogger;
|
|
96
121
|
tenant?: string;
|
|
97
122
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -108,9 +133,14 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
108
133
|
client?: Record<string, any>;
|
|
109
134
|
} | ({
|
|
110
135
|
form?: Record<string, any>;
|
|
111
|
-
onSuccess?: (
|
|
112
|
-
onError?:
|
|
113
|
-
|
|
136
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
137
|
+
onError?: (e: CustomEvent<{
|
|
138
|
+
errorCode: string;
|
|
139
|
+
errorDescription: string;
|
|
140
|
+
errorMessage?: string;
|
|
141
|
+
retryAfter?: string;
|
|
142
|
+
}>) => void;
|
|
143
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
114
144
|
logger?: import("@descope/web-component").ILogger;
|
|
115
145
|
tenant?: string;
|
|
116
146
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -130,9 +160,14 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
130
160
|
})) & AdditionalProps>;
|
|
131
161
|
export declare const SignUpOrInFlow: React.ComponentType<({
|
|
132
162
|
form?: Record<string, any>;
|
|
133
|
-
onSuccess?: (
|
|
134
|
-
onError?:
|
|
135
|
-
|
|
163
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
164
|
+
onError?: (e: CustomEvent<{
|
|
165
|
+
errorCode: string;
|
|
166
|
+
errorDescription: string;
|
|
167
|
+
errorMessage?: string;
|
|
168
|
+
retryAfter?: string;
|
|
169
|
+
}>) => void;
|
|
170
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
136
171
|
logger?: import("@descope/web-component").ILogger;
|
|
137
172
|
tenant?: string;
|
|
138
173
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -149,9 +184,14 @@ export declare const SignUpOrInFlow: React.ComponentType<({
|
|
|
149
184
|
client?: Record<string, any>;
|
|
150
185
|
} | ({
|
|
151
186
|
form?: Record<string, any>;
|
|
152
|
-
onSuccess?: (
|
|
153
|
-
onError?:
|
|
154
|
-
|
|
187
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
188
|
+
onError?: (e: CustomEvent<{
|
|
189
|
+
errorCode: string;
|
|
190
|
+
errorDescription: string;
|
|
191
|
+
errorMessage?: string;
|
|
192
|
+
retryAfter?: string;
|
|
193
|
+
}>) => void;
|
|
194
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
155
195
|
logger?: import("@descope/web-component").ILogger;
|
|
156
196
|
tenant?: string;
|
|
157
197
|
theme?: import("@descope/web-component").ThemeOptions;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import React__default, { ComponentProps, ComponentType } from 'react';
|
|
3
3
|
import { AuthProvider as AuthProvider$1 } from '@descope/react-sdk';
|
|
4
4
|
import * as _descope_web_component from '@descope/web-component';
|
|
5
|
+
import * as _descope_core_js_sdk from '@descope/core-js-sdk';
|
|
5
6
|
|
|
6
7
|
declare const AuthProvider: (props: ComponentProps<typeof AuthProvider$1>) => React__default.JSX.Element;
|
|
7
8
|
|
|
@@ -11,9 +12,14 @@ type AdditionalProps = {
|
|
|
11
12
|
};
|
|
12
13
|
declare const Descope: React__default.ComponentType<(({
|
|
13
14
|
flowId: string;
|
|
14
|
-
onSuccess?: (
|
|
15
|
-
onError?:
|
|
16
|
-
|
|
15
|
+
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
16
|
+
onError?: (e: CustomEvent<{
|
|
17
|
+
errorCode: string;
|
|
18
|
+
errorDescription: string;
|
|
19
|
+
errorMessage?: string;
|
|
20
|
+
retryAfter?: string;
|
|
21
|
+
}>) => void;
|
|
22
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
17
23
|
logger?: _descope_web_component.ILogger;
|
|
18
24
|
tenant?: string;
|
|
19
25
|
theme?: _descope_web_component.ThemeOptions;
|
|
@@ -31,9 +37,14 @@ declare const Descope: React__default.ComponentType<(({
|
|
|
31
37
|
client?: Record<string, any>;
|
|
32
38
|
} & React__default.RefAttributes<HTMLElement>) | ({
|
|
33
39
|
flowId: string;
|
|
34
|
-
onSuccess?: (
|
|
35
|
-
onError?:
|
|
36
|
-
|
|
40
|
+
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
41
|
+
onError?: (e: CustomEvent<{
|
|
42
|
+
errorCode: string;
|
|
43
|
+
errorDescription: string;
|
|
44
|
+
errorMessage?: string;
|
|
45
|
+
retryAfter?: string;
|
|
46
|
+
}>) => void;
|
|
47
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
37
48
|
logger?: _descope_web_component.ILogger;
|
|
38
49
|
tenant?: string;
|
|
39
50
|
theme?: _descope_web_component.ThemeOptions;
|
|
@@ -54,9 +65,14 @@ declare const Descope: React__default.ComponentType<(({
|
|
|
54
65
|
})) & AdditionalProps>;
|
|
55
66
|
declare const SignInFlow: React__default.ComponentType<({
|
|
56
67
|
form?: Record<string, any>;
|
|
57
|
-
onSuccess?: (
|
|
58
|
-
onError?:
|
|
59
|
-
|
|
68
|
+
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
69
|
+
onError?: (e: CustomEvent<{
|
|
70
|
+
errorCode: string;
|
|
71
|
+
errorDescription: string;
|
|
72
|
+
errorMessage?: string;
|
|
73
|
+
retryAfter?: string;
|
|
74
|
+
}>) => void;
|
|
75
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
60
76
|
logger?: _descope_web_component.ILogger;
|
|
61
77
|
tenant?: string;
|
|
62
78
|
theme?: _descope_web_component.ThemeOptions;
|
|
@@ -73,9 +89,14 @@ declare const SignInFlow: React__default.ComponentType<({
|
|
|
73
89
|
client?: Record<string, any>;
|
|
74
90
|
} | ({
|
|
75
91
|
form?: Record<string, any>;
|
|
76
|
-
onSuccess?: (
|
|
77
|
-
onError?:
|
|
78
|
-
|
|
92
|
+
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
93
|
+
onError?: (e: CustomEvent<{
|
|
94
|
+
errorCode: string;
|
|
95
|
+
errorDescription: string;
|
|
96
|
+
errorMessage?: string;
|
|
97
|
+
retryAfter?: string;
|
|
98
|
+
}>) => void;
|
|
99
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
79
100
|
logger?: _descope_web_component.ILogger;
|
|
80
101
|
tenant?: string;
|
|
81
102
|
theme?: _descope_web_component.ThemeOptions;
|
|
@@ -95,9 +116,14 @@ declare const SignInFlow: React__default.ComponentType<({
|
|
|
95
116
|
})) & AdditionalProps>;
|
|
96
117
|
declare const SignUpFlow: React__default.ComponentType<({
|
|
97
118
|
form?: Record<string, any>;
|
|
98
|
-
onSuccess?: (
|
|
99
|
-
onError?:
|
|
100
|
-
|
|
119
|
+
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
120
|
+
onError?: (e: CustomEvent<{
|
|
121
|
+
errorCode: string;
|
|
122
|
+
errorDescription: string;
|
|
123
|
+
errorMessage?: string;
|
|
124
|
+
retryAfter?: string;
|
|
125
|
+
}>) => void;
|
|
126
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
101
127
|
logger?: _descope_web_component.ILogger;
|
|
102
128
|
tenant?: string;
|
|
103
129
|
theme?: _descope_web_component.ThemeOptions;
|
|
@@ -114,9 +140,14 @@ declare const SignUpFlow: React__default.ComponentType<({
|
|
|
114
140
|
client?: Record<string, any>;
|
|
115
141
|
} | ({
|
|
116
142
|
form?: Record<string, any>;
|
|
117
|
-
onSuccess?: (
|
|
118
|
-
onError?:
|
|
119
|
-
|
|
143
|
+
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
144
|
+
onError?: (e: CustomEvent<{
|
|
145
|
+
errorCode: string;
|
|
146
|
+
errorDescription: string;
|
|
147
|
+
errorMessage?: string;
|
|
148
|
+
retryAfter?: string;
|
|
149
|
+
}>) => void;
|
|
150
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
120
151
|
logger?: _descope_web_component.ILogger;
|
|
121
152
|
tenant?: string;
|
|
122
153
|
theme?: _descope_web_component.ThemeOptions;
|
|
@@ -136,9 +167,14 @@ declare const SignUpFlow: React__default.ComponentType<({
|
|
|
136
167
|
})) & AdditionalProps>;
|
|
137
168
|
declare const SignUpOrInFlow: React__default.ComponentType<({
|
|
138
169
|
form?: Record<string, any>;
|
|
139
|
-
onSuccess?: (
|
|
140
|
-
onError?:
|
|
141
|
-
|
|
170
|
+
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
171
|
+
onError?: (e: CustomEvent<{
|
|
172
|
+
errorCode: string;
|
|
173
|
+
errorDescription: string;
|
|
174
|
+
errorMessage?: string;
|
|
175
|
+
retryAfter?: string;
|
|
176
|
+
}>) => void;
|
|
177
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
142
178
|
logger?: _descope_web_component.ILogger;
|
|
143
179
|
tenant?: string;
|
|
144
180
|
theme?: _descope_web_component.ThemeOptions;
|
|
@@ -155,9 +191,14 @@ declare const SignUpOrInFlow: React__default.ComponentType<({
|
|
|
155
191
|
client?: Record<string, any>;
|
|
156
192
|
} | ({
|
|
157
193
|
form?: Record<string, any>;
|
|
158
|
-
onSuccess?: (
|
|
159
|
-
onError?:
|
|
160
|
-
|
|
194
|
+
onSuccess?: (e: CustomEvent<_descope_core_js_sdk.JWTResponse>) => void;
|
|
195
|
+
onError?: (e: CustomEvent<{
|
|
196
|
+
errorCode: string;
|
|
197
|
+
errorDescription: string;
|
|
198
|
+
errorMessage?: string;
|
|
199
|
+
retryAfter?: string;
|
|
200
|
+
}>) => void;
|
|
201
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
161
202
|
logger?: _descope_web_component.ILogger;
|
|
162
203
|
tenant?: string;
|
|
163
204
|
theme?: _descope_web_component.ThemeOptions;
|
package/dist/server/constants.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const DESCOPE_SESSION_HEADER = 'x-descope-session';
|
|
2
2
|
const baseHeaders = {
|
|
3
3
|
'x-descope-sdk-name': 'nextjs',
|
|
4
|
-
'x-descope-sdk-version': "0.0.
|
|
4
|
+
'x-descope-sdk-version': "0.0.16"
|
|
5
5
|
};
|
|
6
6
|
const DEFAULT_PUBLIC_ROUTES = {
|
|
7
7
|
signIn: process.env.SIGN_IN_ROUTE || '/sign-in',
|
|
@@ -5,9 +5,14 @@ type AdditionalProps = {
|
|
|
5
5
|
};
|
|
6
6
|
export declare const Descope: React.ComponentType<(({
|
|
7
7
|
flowId: string;
|
|
8
|
-
onSuccess?: (
|
|
9
|
-
onError?:
|
|
10
|
-
|
|
8
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
9
|
+
onError?: (e: CustomEvent<{
|
|
10
|
+
errorCode: string;
|
|
11
|
+
errorDescription: string;
|
|
12
|
+
errorMessage?: string;
|
|
13
|
+
retryAfter?: string;
|
|
14
|
+
}>) => void;
|
|
15
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
11
16
|
logger?: import("@descope/web-component").ILogger;
|
|
12
17
|
tenant?: string;
|
|
13
18
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -25,9 +30,14 @@ export declare const Descope: React.ComponentType<(({
|
|
|
25
30
|
client?: Record<string, any>;
|
|
26
31
|
} & React.RefAttributes<HTMLElement>) | ({
|
|
27
32
|
flowId: string;
|
|
28
|
-
onSuccess?: (
|
|
29
|
-
onError?:
|
|
30
|
-
|
|
33
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
34
|
+
onError?: (e: CustomEvent<{
|
|
35
|
+
errorCode: string;
|
|
36
|
+
errorDescription: string;
|
|
37
|
+
errorMessage?: string;
|
|
38
|
+
retryAfter?: string;
|
|
39
|
+
}>) => void;
|
|
40
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
31
41
|
logger?: import("@descope/web-component").ILogger;
|
|
32
42
|
tenant?: string;
|
|
33
43
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -48,9 +58,14 @@ export declare const Descope: React.ComponentType<(({
|
|
|
48
58
|
})) & AdditionalProps>;
|
|
49
59
|
export declare const SignInFlow: React.ComponentType<({
|
|
50
60
|
form?: Record<string, any>;
|
|
51
|
-
onSuccess?: (
|
|
52
|
-
onError?:
|
|
53
|
-
|
|
61
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
62
|
+
onError?: (e: CustomEvent<{
|
|
63
|
+
errorCode: string;
|
|
64
|
+
errorDescription: string;
|
|
65
|
+
errorMessage?: string;
|
|
66
|
+
retryAfter?: string;
|
|
67
|
+
}>) => void;
|
|
68
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
54
69
|
logger?: import("@descope/web-component").ILogger;
|
|
55
70
|
tenant?: string;
|
|
56
71
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -67,9 +82,14 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
67
82
|
client?: Record<string, any>;
|
|
68
83
|
} | ({
|
|
69
84
|
form?: Record<string, any>;
|
|
70
|
-
onSuccess?: (
|
|
71
|
-
onError?:
|
|
72
|
-
|
|
85
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
86
|
+
onError?: (e: CustomEvent<{
|
|
87
|
+
errorCode: string;
|
|
88
|
+
errorDescription: string;
|
|
89
|
+
errorMessage?: string;
|
|
90
|
+
retryAfter?: string;
|
|
91
|
+
}>) => void;
|
|
92
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
73
93
|
logger?: import("@descope/web-component").ILogger;
|
|
74
94
|
tenant?: string;
|
|
75
95
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -89,9 +109,14 @@ export declare const SignInFlow: React.ComponentType<({
|
|
|
89
109
|
})) & AdditionalProps>;
|
|
90
110
|
export declare const SignUpFlow: React.ComponentType<({
|
|
91
111
|
form?: Record<string, any>;
|
|
92
|
-
onSuccess?: (
|
|
93
|
-
onError?:
|
|
94
|
-
|
|
112
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
113
|
+
onError?: (e: CustomEvent<{
|
|
114
|
+
errorCode: string;
|
|
115
|
+
errorDescription: string;
|
|
116
|
+
errorMessage?: string;
|
|
117
|
+
retryAfter?: string;
|
|
118
|
+
}>) => void;
|
|
119
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
95
120
|
logger?: import("@descope/web-component").ILogger;
|
|
96
121
|
tenant?: string;
|
|
97
122
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -108,9 +133,14 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
108
133
|
client?: Record<string, any>;
|
|
109
134
|
} | ({
|
|
110
135
|
form?: Record<string, any>;
|
|
111
|
-
onSuccess?: (
|
|
112
|
-
onError?:
|
|
113
|
-
|
|
136
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
137
|
+
onError?: (e: CustomEvent<{
|
|
138
|
+
errorCode: string;
|
|
139
|
+
errorDescription: string;
|
|
140
|
+
errorMessage?: string;
|
|
141
|
+
retryAfter?: string;
|
|
142
|
+
}>) => void;
|
|
143
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
114
144
|
logger?: import("@descope/web-component").ILogger;
|
|
115
145
|
tenant?: string;
|
|
116
146
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -130,9 +160,14 @@ export declare const SignUpFlow: React.ComponentType<({
|
|
|
130
160
|
})) & AdditionalProps>;
|
|
131
161
|
export declare const SignUpOrInFlow: React.ComponentType<({
|
|
132
162
|
form?: Record<string, any>;
|
|
133
|
-
onSuccess?: (
|
|
134
|
-
onError?:
|
|
135
|
-
|
|
163
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
164
|
+
onError?: (e: CustomEvent<{
|
|
165
|
+
errorCode: string;
|
|
166
|
+
errorDescription: string;
|
|
167
|
+
errorMessage?: string;
|
|
168
|
+
retryAfter?: string;
|
|
169
|
+
}>) => void;
|
|
170
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
136
171
|
logger?: import("@descope/web-component").ILogger;
|
|
137
172
|
tenant?: string;
|
|
138
173
|
theme?: import("@descope/web-component").ThemeOptions;
|
|
@@ -149,9 +184,14 @@ export declare const SignUpOrInFlow: React.ComponentType<({
|
|
|
149
184
|
client?: Record<string, any>;
|
|
150
185
|
} | ({
|
|
151
186
|
form?: Record<string, any>;
|
|
152
|
-
onSuccess?: (
|
|
153
|
-
onError?:
|
|
154
|
-
|
|
187
|
+
onSuccess?: (e: CustomEvent<import("@descope/core-js-sdk").JWTResponse>) => void;
|
|
188
|
+
onError?: (e: CustomEvent<{
|
|
189
|
+
errorCode: string;
|
|
190
|
+
errorDescription: string;
|
|
191
|
+
errorMessage?: string;
|
|
192
|
+
retryAfter?: string;
|
|
193
|
+
}>) => void;
|
|
194
|
+
onReady?: (e: CustomEvent<{}>) => void;
|
|
155
195
|
logger?: import("@descope/web-component").ILogger;
|
|
156
196
|
tenant?: string;
|
|
157
197
|
theme?: import("@descope/web-component").ThemeOptions;
|
package/dist/shared/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/nextjs-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "Descope NextJS SDK",
|
|
5
5
|
"author": "Descope Team <info@descope.com>",
|
|
6
6
|
"homepage": "https://github.com/descope/nextjs-sdk",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"dependencies": {
|
|
76
76
|
"@descope/node-sdk": "1.6.8",
|
|
77
|
-
"@descope/react-sdk": "2.0.
|
|
77
|
+
"@descope/react-sdk": "2.0.39"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@babel/core": "7.23.9",
|