@descope/nextjs-sdk 0.2.11 → 0.3.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.md CHANGED
@@ -422,6 +422,23 @@ import { UserProfile } from '@descope/nextjs-sdk';
422
422
  Example:
423
423
  [User Profile](./examples/app-router/app/my-user-profile/page.tsx)
424
424
 
425
+ #### Applications Portal
426
+
427
+ The `ApplicationsPortal` lets you embed an applications portal component in your app and allows the logged-in user to open applications they are assigned to.
428
+
429
+ ###### Usage
430
+
431
+ ```js
432
+ import { ApplicationsPortal } from '@descope/nextjs-sdk';
433
+ ...
434
+ <ApplicationsPortal
435
+ widgetId="applications-portal-widget"
436
+ />
437
+ ```
438
+
439
+ Example:
440
+ [User Profile](./examples/app-router/app/my-applications-portal/page.tsx)
441
+
425
442
  ## Code Example
426
443
 
427
444
  You can find an example react app in the [examples folder](./examples). - [App Router](/examples/app-router/) - [Pages Router](/examples/pages-router/)
@@ -15,7 +15,12 @@ export declare const Descope: _1.ComponentType<{
15
15
  retryAfter?: string;
16
16
  }>) => void;
17
17
  onReady?: (e: CustomEvent<{}>) => void;
18
- logger?: _2.ILogger;
18
+ logger?: Partial<{
19
+ error(...data: any[]): void;
20
+ warn(...data: any[]): void;
21
+ info(...data: any[]): void;
22
+ debug(...data: any[]): void;
23
+ }>;
19
24
  tenant?: string;
20
25
  theme?: _2.ThemeOptions;
21
26
  locale?: string;
@@ -42,7 +47,12 @@ export declare const SignInFlow: _1.ComponentType<{
42
47
  retryAfter?: string;
43
48
  }>) => void;
44
49
  onReady?: (e: CustomEvent<{}>) => void;
45
- logger?: _2.ILogger;
50
+ logger?: Partial<{
51
+ error(...data: any[]): void;
52
+ warn(...data: any[]): void;
53
+ info(...data: any[]): void;
54
+ debug(...data: any[]): void;
55
+ }>;
46
56
  tenant?: string;
47
57
  theme?: _2.ThemeOptions;
48
58
  locale?: string;
@@ -68,7 +78,12 @@ export declare const SignUpFlow: _1.ComponentType<{
68
78
  retryAfter?: string;
69
79
  }>) => void;
70
80
  onReady?: (e: CustomEvent<{}>) => void;
71
- logger?: _2.ILogger;
81
+ logger?: Partial<{
82
+ error(...data: any[]): void;
83
+ warn(...data: any[]): void;
84
+ info(...data: any[]): void;
85
+ debug(...data: any[]): void;
86
+ }>;
72
87
  tenant?: string;
73
88
  theme?: _2.ThemeOptions;
74
89
  locale?: string;
@@ -94,7 +109,12 @@ export declare const SignUpOrInFlow: _1.ComponentType<{
94
109
  retryAfter?: string;
95
110
  }>) => void;
96
111
  onReady?: (e: CustomEvent<{}>) => void;
97
- logger?: _2.ILogger;
112
+ logger?: Partial<{
113
+ error(...data: any[]): void;
114
+ warn(...data: any[]): void;
115
+ info(...data: any[]): void;
116
+ debug(...data: any[]): void;
117
+ }>;
98
118
  tenant?: string;
99
119
  theme?: _2.ThemeOptions;
100
120
  locale?: string;
@@ -1,35 +1,74 @@
1
1
  /// <reference types="react" />
2
2
  import type * as _1 from '@descope/react-sdk/node_modules/@types/react';
3
3
  export declare const UserManagement: _1.ComponentType<{
4
- logger?: import("@descope/web-component").ILogger;
4
+ logger?: Partial<{
5
+ error(...data: any[]): void;
6
+ warn(...data: any[]): void;
7
+ info(...data: any[]): void;
8
+ debug(...data: any[]): void;
9
+ }>;
5
10
  tenant: string;
6
11
  widgetId: string;
7
12
  theme?: import("@descope/web-component").ThemeOptions;
8
13
  debug?: boolean;
9
14
  } & _1.RefAttributes<HTMLElement>>;
10
15
  export declare const RoleManagement: _1.ComponentType<{
11
- logger?: import("@descope/web-component").ILogger;
16
+ logger?: Partial<{
17
+ error(...data: any[]): void;
18
+ warn(...data: any[]): void;
19
+ info(...data: any[]): void;
20
+ debug(...data: any[]): void;
21
+ }>;
12
22
  tenant: string;
13
23
  widgetId: string;
14
24
  theme?: import("@descope/web-component").ThemeOptions;
15
25
  debug?: boolean;
16
26
  } & _1.RefAttributes<HTMLElement>>;
17
27
  export declare const AccessKeyManagement: _1.ComponentType<{
18
- logger?: import("@descope/web-component").ILogger;
28
+ logger?: Partial<{
29
+ error(...data: any[]): void;
30
+ warn(...data: any[]): void;
31
+ info(...data: any[]): void;
32
+ debug(...data: any[]): void;
33
+ }>;
19
34
  tenant: string;
20
35
  widgetId: string;
21
36
  theme?: import("@descope/web-component").ThemeOptions;
22
37
  debug?: boolean;
23
38
  } & _1.RefAttributes<HTMLElement>>;
24
39
  export declare const AuditManagement: _1.ComponentType<{
25
- logger?: import("@descope/web-component").ILogger;
40
+ logger?: Partial<{
41
+ error(...data: any[]): void;
42
+ warn(...data: any[]): void;
43
+ info(...data: any[]): void;
44
+ debug(...data: any[]): void;
45
+ }>;
26
46
  tenant: string;
27
47
  widgetId: string;
28
48
  theme?: import("@descope/web-component").ThemeOptions;
29
49
  debug?: boolean;
30
50
  } & _1.RefAttributes<HTMLElement>>;
31
51
  export declare const UserProfile: _1.ComponentType<Omit<{
32
- logger?: import("@descope/web-component").ILogger;
52
+ logger?: Partial<{
53
+ error(...data: any[]): void;
54
+ warn(...data: any[]): void;
55
+ info(...data: any[]): void;
56
+ debug(...data: any[]): void;
57
+ }>;
58
+ tenant: string;
59
+ widgetId: string;
60
+ theme?: import("@descope/web-component").ThemeOptions;
61
+ debug?: boolean;
62
+ }, "tenant"> & {
63
+ onLogout?: (e: CustomEvent<any>) => void;
64
+ } & _1.RefAttributes<HTMLElement>>;
65
+ export declare const ApplicationsPortal: _1.ComponentType<Omit<{
66
+ logger?: Partial<{
67
+ error(...data: any[]): void;
68
+ warn(...data: any[]): void;
69
+ info(...data: any[]): void;
70
+ debug(...data: any[]): void;
71
+ }>;
33
72
  tenant: string;
34
73
  widgetId: string;
35
74
  theme?: import("@descope/web-component").ThemeOptions;
@@ -15,7 +15,12 @@ export declare const Descope: _1.ComponentType<{
15
15
  retryAfter?: string;
16
16
  }>) => void;
17
17
  onReady?: (e: CustomEvent<{}>) => void;
18
- logger?: _2.ILogger;
18
+ logger?: Partial<{
19
+ error(...data: any[]): void;
20
+ warn(...data: any[]): void;
21
+ info(...data: any[]): void;
22
+ debug(...data: any[]): void;
23
+ }>;
19
24
  tenant?: string;
20
25
  theme?: _2.ThemeOptions;
21
26
  locale?: string;
@@ -42,7 +47,12 @@ export declare const SignInFlow: _1.ComponentType<{
42
47
  retryAfter?: string;
43
48
  }>) => void;
44
49
  onReady?: (e: CustomEvent<{}>) => void;
45
- logger?: _2.ILogger;
50
+ logger?: Partial<{
51
+ error(...data: any[]): void;
52
+ warn(...data: any[]): void;
53
+ info(...data: any[]): void;
54
+ debug(...data: any[]): void;
55
+ }>;
46
56
  tenant?: string;
47
57
  theme?: _2.ThemeOptions;
48
58
  locale?: string;
@@ -68,7 +78,12 @@ export declare const SignUpFlow: _1.ComponentType<{
68
78
  retryAfter?: string;
69
79
  }>) => void;
70
80
  onReady?: (e: CustomEvent<{}>) => void;
71
- logger?: _2.ILogger;
81
+ logger?: Partial<{
82
+ error(...data: any[]): void;
83
+ warn(...data: any[]): void;
84
+ info(...data: any[]): void;
85
+ debug(...data: any[]): void;
86
+ }>;
72
87
  tenant?: string;
73
88
  theme?: _2.ThemeOptions;
74
89
  locale?: string;
@@ -94,7 +109,12 @@ export declare const SignUpOrInFlow: _1.ComponentType<{
94
109
  retryAfter?: string;
95
110
  }>) => void;
96
111
  onReady?: (e: CustomEvent<{}>) => void;
97
- logger?: _2.ILogger;
112
+ logger?: Partial<{
113
+ error(...data: any[]): void;
114
+ warn(...data: any[]): void;
115
+ info(...data: any[]): void;
116
+ debug(...data: any[]): void;
117
+ }>;
98
118
  tenant?: string;
99
119
  theme?: _2.ThemeOptions;
100
120
  locale?: string;
@@ -1,35 +1,74 @@
1
1
  /// <reference types="react" />
2
2
  import type * as _1 from '@descope/react-sdk/node_modules/@types/react';
3
3
  export declare const UserManagement: _1.ComponentType<{
4
- logger?: import("@descope/web-component").ILogger;
4
+ logger?: Partial<{
5
+ error(...data: any[]): void;
6
+ warn(...data: any[]): void;
7
+ info(...data: any[]): void;
8
+ debug(...data: any[]): void;
9
+ }>;
5
10
  tenant: string;
6
11
  widgetId: string;
7
12
  theme?: import("@descope/web-component").ThemeOptions;
8
13
  debug?: boolean;
9
14
  } & _1.RefAttributes<HTMLElement>>;
10
15
  export declare const RoleManagement: _1.ComponentType<{
11
- logger?: import("@descope/web-component").ILogger;
16
+ logger?: Partial<{
17
+ error(...data: any[]): void;
18
+ warn(...data: any[]): void;
19
+ info(...data: any[]): void;
20
+ debug(...data: any[]): void;
21
+ }>;
12
22
  tenant: string;
13
23
  widgetId: string;
14
24
  theme?: import("@descope/web-component").ThemeOptions;
15
25
  debug?: boolean;
16
26
  } & _1.RefAttributes<HTMLElement>>;
17
27
  export declare const AccessKeyManagement: _1.ComponentType<{
18
- logger?: import("@descope/web-component").ILogger;
28
+ logger?: Partial<{
29
+ error(...data: any[]): void;
30
+ warn(...data: any[]): void;
31
+ info(...data: any[]): void;
32
+ debug(...data: any[]): void;
33
+ }>;
19
34
  tenant: string;
20
35
  widgetId: string;
21
36
  theme?: import("@descope/web-component").ThemeOptions;
22
37
  debug?: boolean;
23
38
  } & _1.RefAttributes<HTMLElement>>;
24
39
  export declare const AuditManagement: _1.ComponentType<{
25
- logger?: import("@descope/web-component").ILogger;
40
+ logger?: Partial<{
41
+ error(...data: any[]): void;
42
+ warn(...data: any[]): void;
43
+ info(...data: any[]): void;
44
+ debug(...data: any[]): void;
45
+ }>;
26
46
  tenant: string;
27
47
  widgetId: string;
28
48
  theme?: import("@descope/web-component").ThemeOptions;
29
49
  debug?: boolean;
30
50
  } & _1.RefAttributes<HTMLElement>>;
31
51
  export declare const UserProfile: _1.ComponentType<Omit<{
32
- logger?: import("@descope/web-component").ILogger;
52
+ logger?: Partial<{
53
+ error(...data: any[]): void;
54
+ warn(...data: any[]): void;
55
+ info(...data: any[]): void;
56
+ debug(...data: any[]): void;
57
+ }>;
58
+ tenant: string;
59
+ widgetId: string;
60
+ theme?: import("@descope/web-component").ThemeOptions;
61
+ debug?: boolean;
62
+ }, "tenant"> & {
63
+ onLogout?: (e: CustomEvent<any>) => void;
64
+ } & _1.RefAttributes<HTMLElement>>;
65
+ export declare const ApplicationsPortal: _1.ComponentType<Omit<{
66
+ logger?: Partial<{
67
+ error(...data: any[]): void;
68
+ warn(...data: any[]): void;
69
+ info(...data: any[]): void;
70
+ debug(...data: any[]): void;
71
+ }>;
33
72
  tenant: string;
34
73
  widgetId: string;
35
74
  theme?: import("@descope/web-component").ThemeOptions;
package/dist/index.d.ts CHANGED
@@ -21,7 +21,12 @@ declare const Descope: _1.ComponentType<{
21
21
  retryAfter?: string;
22
22
  }>) => void;
23
23
  onReady?: (e: CustomEvent<{}>) => void;
24
- logger?: _2.ILogger;
24
+ logger?: Partial<{
25
+ error(...data: any[]): void;
26
+ warn(...data: any[]): void;
27
+ info(...data: any[]): void;
28
+ debug(...data: any[]): void;
29
+ }>;
25
30
  tenant?: string;
26
31
  theme?: _2.ThemeOptions;
27
32
  locale?: string;
@@ -48,7 +53,12 @@ declare const SignInFlow: _1.ComponentType<{
48
53
  retryAfter?: string;
49
54
  }>) => void;
50
55
  onReady?: (e: CustomEvent<{}>) => void;
51
- logger?: _2.ILogger;
56
+ logger?: Partial<{
57
+ error(...data: any[]): void;
58
+ warn(...data: any[]): void;
59
+ info(...data: any[]): void;
60
+ debug(...data: any[]): void;
61
+ }>;
52
62
  tenant?: string;
53
63
  theme?: _2.ThemeOptions;
54
64
  locale?: string;
@@ -74,7 +84,12 @@ declare const SignUpFlow: _1.ComponentType<{
74
84
  retryAfter?: string;
75
85
  }>) => void;
76
86
  onReady?: (e: CustomEvent<{}>) => void;
77
- logger?: _2.ILogger;
87
+ logger?: Partial<{
88
+ error(...data: any[]): void;
89
+ warn(...data: any[]): void;
90
+ info(...data: any[]): void;
91
+ debug(...data: any[]): void;
92
+ }>;
78
93
  tenant?: string;
79
94
  theme?: _2.ThemeOptions;
80
95
  locale?: string;
@@ -100,7 +115,12 @@ declare const SignUpOrInFlow: _1.ComponentType<{
100
115
  retryAfter?: string;
101
116
  }>) => void;
102
117
  onReady?: (e: CustomEvent<{}>) => void;
103
- logger?: _2.ILogger;
118
+ logger?: Partial<{
119
+ error(...data: any[]): void;
120
+ warn(...data: any[]): void;
121
+ info(...data: any[]): void;
122
+ debug(...data: any[]): void;
123
+ }>;
104
124
  tenant?: string;
105
125
  theme?: _2.ThemeOptions;
106
126
  locale?: string;
@@ -118,35 +138,74 @@ declare const SignUpOrInFlow: _1.ComponentType<{
118
138
  } & AdditionalProps>;
119
139
 
120
140
  declare const UserManagement: _1.ComponentType<{
121
- logger?: _descope_web_component.ILogger;
141
+ logger?: Partial<{
142
+ error(...data: any[]): void;
143
+ warn(...data: any[]): void;
144
+ info(...data: any[]): void;
145
+ debug(...data: any[]): void;
146
+ }>;
122
147
  tenant: string;
123
148
  widgetId: string;
124
149
  theme?: _descope_web_component.ThemeOptions;
125
150
  debug?: boolean;
126
151
  } & _1.RefAttributes<HTMLElement>>;
127
152
  declare const RoleManagement: _1.ComponentType<{
128
- logger?: _descope_web_component.ILogger;
153
+ logger?: Partial<{
154
+ error(...data: any[]): void;
155
+ warn(...data: any[]): void;
156
+ info(...data: any[]): void;
157
+ debug(...data: any[]): void;
158
+ }>;
129
159
  tenant: string;
130
160
  widgetId: string;
131
161
  theme?: _descope_web_component.ThemeOptions;
132
162
  debug?: boolean;
133
163
  } & _1.RefAttributes<HTMLElement>>;
134
164
  declare const AccessKeyManagement: _1.ComponentType<{
135
- logger?: _descope_web_component.ILogger;
165
+ logger?: Partial<{
166
+ error(...data: any[]): void;
167
+ warn(...data: any[]): void;
168
+ info(...data: any[]): void;
169
+ debug(...data: any[]): void;
170
+ }>;
136
171
  tenant: string;
137
172
  widgetId: string;
138
173
  theme?: _descope_web_component.ThemeOptions;
139
174
  debug?: boolean;
140
175
  } & _1.RefAttributes<HTMLElement>>;
141
176
  declare const AuditManagement: _1.ComponentType<{
142
- logger?: _descope_web_component.ILogger;
177
+ logger?: Partial<{
178
+ error(...data: any[]): void;
179
+ warn(...data: any[]): void;
180
+ info(...data: any[]): void;
181
+ debug(...data: any[]): void;
182
+ }>;
143
183
  tenant: string;
144
184
  widgetId: string;
145
185
  theme?: _descope_web_component.ThemeOptions;
146
186
  debug?: boolean;
147
187
  } & _1.RefAttributes<HTMLElement>>;
148
188
  declare const UserProfile: _1.ComponentType<Omit<{
149
- logger?: _descope_web_component.ILogger;
189
+ logger?: Partial<{
190
+ error(...data: any[]): void;
191
+ warn(...data: any[]): void;
192
+ info(...data: any[]): void;
193
+ debug(...data: any[]): void;
194
+ }>;
195
+ tenant: string;
196
+ widgetId: string;
197
+ theme?: _descope_web_component.ThemeOptions;
198
+ debug?: boolean;
199
+ }, "tenant"> & {
200
+ onLogout?: (e: CustomEvent<any>) => void;
201
+ } & _1.RefAttributes<HTMLElement>>;
202
+ declare const ApplicationsPortal: _1.ComponentType<Omit<{
203
+ logger?: Partial<{
204
+ error(...data: any[]): void;
205
+ warn(...data: any[]): void;
206
+ info(...data: any[]): void;
207
+ debug(...data: any[]): void;
208
+ }>;
150
209
  tenant: string;
151
210
  widgetId: string;
152
211
  theme?: _descope_web_component.ThemeOptions;
@@ -155,4 +214,4 @@ declare const UserProfile: _1.ComponentType<Omit<{
155
214
  onLogout?: (e: CustomEvent<any>) => void;
156
215
  } & _1.RefAttributes<HTMLElement>>;
157
216
 
158
- export { AccessKeyManagement, AuditManagement, AuthProvider, Descope, RoleManagement, SignInFlow, SignUpFlow, SignUpOrInFlow, UserManagement, UserProfile };
217
+ export { AccessKeyManagement, ApplicationsPortal, AuditManagement, AuthProvider, Descope, RoleManagement, SignInFlow, SignUpFlow, SignUpOrInFlow, UserManagement, UserProfile };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export { default as AuthProvider } from './shared/AuthProvider.js';
2
2
  export { Descope, SignInFlow, SignUpFlow, SignUpOrInFlow } from './shared/DescopeFlows.js';
3
- export { AccessKeyManagement, AuditManagement, RoleManagement, UserManagement, UserProfile } from './shared/DescopeWidgets.js';
3
+ export { AccessKeyManagement, ApplicationsPortal, AuditManagement, RoleManagement, UserManagement, UserProfile } from './shared/DescopeWidgets.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -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.2.11"
4
+ 'x-descope-sdk-version': "0.3.0"
5
5
  };
6
6
  const DEFAULT_PUBLIC_ROUTES = {
7
7
  signIn: process.env.SIGN_IN_ROUTE || '/sign-in',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../src/server/constants.ts"],"sourcesContent":["// Replaced in build time\ndeclare const BUILD_VERSION: string;\n\nexport const DESCOPE_SESSION_HEADER = 'x-descope-session';\n\nexport const baseHeaders = {\n\t'x-descope-sdk-name': 'nextjs',\n\t'x-descope-sdk-version': BUILD_VERSION\n};\n\nexport const DEFAULT_PUBLIC_ROUTES = {\n\tsignIn: process.env.SIGN_IN_ROUTE || '/sign-in',\n\tsignUp: process.env.SIGN_UP_ROUTE || '/sign-up'\n};\n"],"names":[],"mappings":"AAGO,MAAM,sBAAsB,GAAG,oBAAoB;AAE7C,MAAA,WAAW,GAAG;AAC1B,IAAA,oBAAoB,EAAE,QAAQ;AAC9B,IAAA,uBAAuB,EAAE,QAAa;EACrC;AAEW,MAAA,qBAAqB,GAAG;AACpC,IAAA,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,UAAU;AAC/C,IAAA,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,UAAU;;;;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../src/server/constants.ts"],"sourcesContent":["// Replaced in build time\ndeclare const BUILD_VERSION: string;\n\nexport const DESCOPE_SESSION_HEADER = 'x-descope-session';\n\nexport const baseHeaders = {\n\t'x-descope-sdk-name': 'nextjs',\n\t'x-descope-sdk-version': BUILD_VERSION\n};\n\nexport const DEFAULT_PUBLIC_ROUTES = {\n\tsignIn: process.env.SIGN_IN_ROUTE || '/sign-in',\n\tsignUp: process.env.SIGN_UP_ROUTE || '/sign-up'\n};\n"],"names":[],"mappings":"AAGO,MAAM,sBAAsB,GAAG,oBAAoB;AAE7C,MAAA,WAAW,GAAG;AAC1B,IAAA,oBAAoB,EAAE,QAAQ;AAC9B,IAAA,uBAAuB,EAAE,OAAa;EACrC;AAEW,MAAA,qBAAqB,GAAG;AACpC,IAAA,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,UAAU;AAC/C,IAAA,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,UAAU;;;;;"}
@@ -15,7 +15,12 @@ export declare const Descope: _1.ComponentType<{
15
15
  retryAfter?: string;
16
16
  }>) => void;
17
17
  onReady?: (e: CustomEvent<{}>) => void;
18
- logger?: _2.ILogger;
18
+ logger?: Partial<{
19
+ error(...data: any[]): void;
20
+ warn(...data: any[]): void;
21
+ info(...data: any[]): void;
22
+ debug(...data: any[]): void;
23
+ }>;
19
24
  tenant?: string;
20
25
  theme?: _2.ThemeOptions;
21
26
  locale?: string;
@@ -42,7 +47,12 @@ export declare const SignInFlow: _1.ComponentType<{
42
47
  retryAfter?: string;
43
48
  }>) => void;
44
49
  onReady?: (e: CustomEvent<{}>) => void;
45
- logger?: _2.ILogger;
50
+ logger?: Partial<{
51
+ error(...data: any[]): void;
52
+ warn(...data: any[]): void;
53
+ info(...data: any[]): void;
54
+ debug(...data: any[]): void;
55
+ }>;
46
56
  tenant?: string;
47
57
  theme?: _2.ThemeOptions;
48
58
  locale?: string;
@@ -68,7 +78,12 @@ export declare const SignUpFlow: _1.ComponentType<{
68
78
  retryAfter?: string;
69
79
  }>) => void;
70
80
  onReady?: (e: CustomEvent<{}>) => void;
71
- logger?: _2.ILogger;
81
+ logger?: Partial<{
82
+ error(...data: any[]): void;
83
+ warn(...data: any[]): void;
84
+ info(...data: any[]): void;
85
+ debug(...data: any[]): void;
86
+ }>;
72
87
  tenant?: string;
73
88
  theme?: _2.ThemeOptions;
74
89
  locale?: string;
@@ -94,7 +109,12 @@ export declare const SignUpOrInFlow: _1.ComponentType<{
94
109
  retryAfter?: string;
95
110
  }>) => void;
96
111
  onReady?: (e: CustomEvent<{}>) => void;
97
- logger?: _2.ILogger;
112
+ logger?: Partial<{
113
+ error(...data: any[]): void;
114
+ warn(...data: any[]): void;
115
+ info(...data: any[]): void;
116
+ debug(...data: any[]): void;
117
+ }>;
98
118
  tenant?: string;
99
119
  theme?: _2.ThemeOptions;
100
120
  locale?: string;
@@ -1,35 +1,74 @@
1
1
  /// <reference types="react" />
2
2
  import type * as _1 from '@descope/react-sdk/node_modules/@types/react';
3
3
  export declare const UserManagement: _1.ComponentType<{
4
- logger?: import("@descope/web-component").ILogger;
4
+ logger?: Partial<{
5
+ error(...data: any[]): void;
6
+ warn(...data: any[]): void;
7
+ info(...data: any[]): void;
8
+ debug(...data: any[]): void;
9
+ }>;
5
10
  tenant: string;
6
11
  widgetId: string;
7
12
  theme?: import("@descope/web-component").ThemeOptions;
8
13
  debug?: boolean;
9
14
  } & _1.RefAttributes<HTMLElement>>;
10
15
  export declare const RoleManagement: _1.ComponentType<{
11
- logger?: import("@descope/web-component").ILogger;
16
+ logger?: Partial<{
17
+ error(...data: any[]): void;
18
+ warn(...data: any[]): void;
19
+ info(...data: any[]): void;
20
+ debug(...data: any[]): void;
21
+ }>;
12
22
  tenant: string;
13
23
  widgetId: string;
14
24
  theme?: import("@descope/web-component").ThemeOptions;
15
25
  debug?: boolean;
16
26
  } & _1.RefAttributes<HTMLElement>>;
17
27
  export declare const AccessKeyManagement: _1.ComponentType<{
18
- logger?: import("@descope/web-component").ILogger;
28
+ logger?: Partial<{
29
+ error(...data: any[]): void;
30
+ warn(...data: any[]): void;
31
+ info(...data: any[]): void;
32
+ debug(...data: any[]): void;
33
+ }>;
19
34
  tenant: string;
20
35
  widgetId: string;
21
36
  theme?: import("@descope/web-component").ThemeOptions;
22
37
  debug?: boolean;
23
38
  } & _1.RefAttributes<HTMLElement>>;
24
39
  export declare const AuditManagement: _1.ComponentType<{
25
- logger?: import("@descope/web-component").ILogger;
40
+ logger?: Partial<{
41
+ error(...data: any[]): void;
42
+ warn(...data: any[]): void;
43
+ info(...data: any[]): void;
44
+ debug(...data: any[]): void;
45
+ }>;
26
46
  tenant: string;
27
47
  widgetId: string;
28
48
  theme?: import("@descope/web-component").ThemeOptions;
29
49
  debug?: boolean;
30
50
  } & _1.RefAttributes<HTMLElement>>;
31
51
  export declare const UserProfile: _1.ComponentType<Omit<{
32
- logger?: import("@descope/web-component").ILogger;
52
+ logger?: Partial<{
53
+ error(...data: any[]): void;
54
+ warn(...data: any[]): void;
55
+ info(...data: any[]): void;
56
+ debug(...data: any[]): void;
57
+ }>;
58
+ tenant: string;
59
+ widgetId: string;
60
+ theme?: import("@descope/web-component").ThemeOptions;
61
+ debug?: boolean;
62
+ }, "tenant"> & {
63
+ onLogout?: (e: CustomEvent<any>) => void;
64
+ } & _1.RefAttributes<HTMLElement>>;
65
+ export declare const ApplicationsPortal: _1.ComponentType<Omit<{
66
+ logger?: Partial<{
67
+ error(...data: any[]): void;
68
+ warn(...data: any[]): void;
69
+ info(...data: any[]): void;
70
+ debug(...data: any[]): void;
71
+ }>;
33
72
  tenant: string;
34
73
  widgetId: string;
35
74
  theme?: import("@descope/web-component").ThemeOptions;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import dynamic from 'next/dynamic';
3
- import { UserManagement as UserManagement$1, RoleManagement as RoleManagement$1, AccessKeyManagement as AccessKeyManagement$1, AuditManagement as AuditManagement$1, UserProfile as UserProfile$1 } from '@descope/react-sdk';
3
+ import { UserManagement as UserManagement$1, RoleManagement as RoleManagement$1, AccessKeyManagement as AccessKeyManagement$1, AuditManagement as AuditManagement$1, UserProfile as UserProfile$1, ApplicationsPortal as ApplicationsPortal$1 } from '@descope/react-sdk';
4
4
 
5
5
  // a helper function to dynamically load the components
6
6
  // This function prevents Next.js from trying to server-side render these components
@@ -14,6 +14,7 @@ const RoleManagement = dynamicWidgetComponent(RoleManagement$1);
14
14
  const AccessKeyManagement = dynamicWidgetComponent(AccessKeyManagement$1);
15
15
  const AuditManagement = dynamicWidgetComponent(AuditManagement$1);
16
16
  const UserProfile = dynamicWidgetComponent(UserProfile$1);
17
+ const ApplicationsPortal = dynamicWidgetComponent(ApplicationsPortal$1);
17
18
 
18
- export { AccessKeyManagement, AuditManagement, RoleManagement, UserManagement, UserProfile };
19
+ export { AccessKeyManagement, ApplicationsPortal, AuditManagement, RoleManagement, UserManagement, UserProfile };
19
20
  //# sourceMappingURL=DescopeWidgets.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DescopeWidgets.js","sources":["../../src/shared/DescopeWidgets.tsx"],"sourcesContent":["'use client';\n\n// eslint-disable-next-line\nimport type * as _1 from '@descope/react-sdk/node_modules/@types/react';\n\nimport { ComponentType } from 'react';\nimport dynamic from 'next/dynamic';\nimport {\n\tUserManagement as UserManagementWC,\n\tRoleManagement as RoleManagementWC,\n\tAccessKeyManagement as AccessKeyManagementWC,\n\tAuditManagement as AuditManagementWC,\n\tUserProfile as UserProfileWc\n} from '@descope/react-sdk';\n\n// a helper function to dynamically load the components\n// This function prevents Next.js from trying to server-side render these components\n// Update the helper function to use generics for preserving component prop types\nconst dynamicWidgetComponent = <P extends {}>(Component: ComponentType<P>) =>\n\tdynamic<P>(() => Promise.resolve(Component), {\n\t\tssr: false // Disable server-side rendering for this component\n\t});\n\n// Use the helper function to create dynamically loaded components\nexport const UserManagement = dynamicWidgetComponent(UserManagementWC);\nexport const RoleManagement = dynamicWidgetComponent(RoleManagementWC);\nexport const AccessKeyManagement = dynamicWidgetComponent(\n\tAccessKeyManagementWC\n);\nexport const AuditManagement = dynamicWidgetComponent(AuditManagementWC);\nexport const UserProfile = dynamicWidgetComponent(UserProfileWc);\n"],"names":[],"mappings":";;;;AAeA;AACA;AACA;AACA;;AAGE;AAEF;;;;;;;"}
1
+ {"version":3,"file":"DescopeWidgets.js","sources":["../../src/shared/DescopeWidgets.tsx"],"sourcesContent":["'use client';\n\n// eslint-disable-next-line\nimport type * as _1 from '@descope/react-sdk/node_modules/@types/react';\n\nimport { ComponentType } from 'react';\nimport dynamic from 'next/dynamic';\nimport {\n\tUserManagement as UserManagementWC,\n\tRoleManagement as RoleManagementWC,\n\tAccessKeyManagement as AccessKeyManagementWC,\n\tAuditManagement as AuditManagementWC,\n\tUserProfile as UserProfileWc,\n\tApplicationsPortal as ApplicationsPortalWc\n} from '@descope/react-sdk';\n\n// a helper function to dynamically load the components\n// This function prevents Next.js from trying to server-side render these components\n// Update the helper function to use generics for preserving component prop types\nconst dynamicWidgetComponent = <P extends {}>(Component: ComponentType<P>) =>\n\tdynamic<P>(() => Promise.resolve(Component), {\n\t\tssr: false // Disable server-side rendering for this component\n\t});\n\n// Use the helper function to create dynamically loaded components\nexport const UserManagement = dynamicWidgetComponent(UserManagementWC);\nexport const RoleManagement = dynamicWidgetComponent(RoleManagementWC);\nexport const AccessKeyManagement = dynamicWidgetComponent(\n\tAccessKeyManagementWC\n);\nexport const AuditManagement = dynamicWidgetComponent(AuditManagementWC);\nexport const UserProfile = dynamicWidgetComponent(UserProfileWc);\nexport const ApplicationsPortal = dynamicWidgetComponent(ApplicationsPortalWc);\n"],"names":[],"mappings":";;;;AAgBA;AACA;AACA;AACA;;AAGE;AAEF;;;;;;;;"}
@@ -1,7 +1,7 @@
1
1
  // eslint-disable-next-line import/prefer-default-export
2
2
  const baseHeaders = {
3
3
  'x-descope-sdk-name': 'nextjs',
4
- 'x-descope-sdk-version': "0.2.11"
4
+ 'x-descope-sdk-version': "0.3.0"
5
5
  };
6
6
 
7
7
  export { baseHeaders };
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../src/shared/constants.ts"],"sourcesContent":["// Replaced in build time\ndeclare const BUILD_VERSION: string;\n\n// eslint-disable-next-line import/prefer-default-export\nexport const baseHeaders = {\n\t'x-descope-sdk-name': 'nextjs',\n\t'x-descope-sdk-version': BUILD_VERSION\n};\n"],"names":[],"mappings":"AAGA;AACa,MAAA,WAAW,GAAG;AAC1B,IAAA,oBAAoB,EAAE,QAAQ;AAC9B,IAAA,uBAAuB,EAAE,QAAa;;;;;"}
1
+ {"version":3,"file":"constants.js","sources":["../../src/shared/constants.ts"],"sourcesContent":["// Replaced in build time\ndeclare const BUILD_VERSION: string;\n\n// eslint-disable-next-line import/prefer-default-export\nexport const baseHeaders = {\n\t'x-descope-sdk-name': 'nextjs',\n\t'x-descope-sdk-version': BUILD_VERSION\n};\n"],"names":[],"mappings":"AAGA;AACa,MAAA,WAAW,GAAG;AAC1B,IAAA,oBAAoB,EAAE,QAAQ;AAC9B,IAAA,uBAAuB,EAAE,OAAa;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descope/nextjs-sdk",
3
- "version": "0.2.11",
3
+ "version": "0.3.0",
4
4
  "description": "Descope NextJS SDK",
5
5
  "author": "Descope Team <info@descope.com>",
6
6
  "homepage": "https://github.com/descope/descope-js",
@@ -61,9 +61,9 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "@descope/node-sdk": "1.6.9",
64
- "@descope/react-sdk": "2.0.77",
65
- "@descope/core-js-sdk": "2.26.0",
66
- "@descope/web-component": "3.25.2"
64
+ "@descope/react-sdk": "2.1.0",
65
+ "@descope/core-js-sdk": "2.27.0",
66
+ "@descope/web-component": "3.26.0"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@babel/core": "7.23.9",