@descope/react-sdk 2.17.1 → 2.18.1

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.
@@ -1,6 +1,6 @@
1
1
  import type * as _1 from '@descope/core-js-sdk';
2
2
  import type * as _2 from 'oidc-client-ts';
3
- declare const createSdkWrapper: <P extends Omit<{
3
+ declare const createSdkWrapper: <P extends {
4
4
  projectId: string;
5
5
  logger?: {
6
6
  error: {
@@ -22,20 +22,14 @@ declare const createSdkWrapper: <P extends Omit<{
22
22
  };
23
23
  baseUrl?: string;
24
24
  hooks?: {
25
- beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
26
- afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
25
+ beforeRequest?: ((config: _1.RequestConfig) => _1.RequestConfig) | ((config: _1.RequestConfig) => _1.RequestConfig)[];
26
+ afterRequest?: ((req: _1.RequestConfig, res: Response) => void | Promise<void>) | ((req: _1.RequestConfig, res: Response) => void | Promise<void>)[];
27
27
  transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
28
28
  };
29
29
  cookiePolicy?: RequestCredentials;
30
30
  baseHeaders?: HeadersInit;
31
31
  refreshCookieName?: string;
32
32
  fetch?: typeof fetch;
33
- }, "hooks"> & {
34
- hooks?: {
35
- beforeRequest?: ((config: _1.RequestConfig) => _1.RequestConfig) | ((config: _1.RequestConfig) => _1.RequestConfig)[];
36
- afterRequest?: ((req: _1.RequestConfig, res: Response) => void | Promise<void>) | ((req: _1.RequestConfig, res: Response) => void | Promise<void>)[];
37
- transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
38
- };
39
33
  } & {
40
34
  oidcConfig?: import("@descope/web-js-sdk").OidcConfig;
41
35
  getExternalToken?: () => Promise<string>;
@@ -86,6 +80,7 @@ declare const createSdkWrapper: <P extends Omit<{
86
80
  locale?: string;
87
81
  oidcPrompt?: string;
88
82
  oidcErrorRedirectUri?: string;
83
+ oidcResource?: string;
89
84
  nativeOptions?: {
90
85
  platform: "ios" | "android";
91
86
  oauthProvider?: string;
@@ -95,7 +90,7 @@ declare const createSdkWrapper: <P extends Omit<{
95
90
  applicationScopes?: string;
96
91
  outboundAppId?: string;
97
92
  outboundAppScopes?: string[];
98
- }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
93
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
99
94
  lastAuth?: Omit<{
100
95
  authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
101
96
  oauthProvider?: string;
@@ -678,51 +673,7 @@ declare const createSdkWrapper: <P extends Omit<{
678
673
  getJwtPermissions: (token: string, tenant?: string) => string[];
679
674
  getJwtRoles: (token: string, tenant?: string) => string[];
680
675
  getCurrentTenant: (token: string) => string;
681
- httpClient: {
682
- get: (path: string, config?: {
683
- headers?: HeadersInit;
684
- queryParams?: {
685
- [key: string]: string;
686
- };
687
- token?: string;
688
- }) => Promise<Response>;
689
- post: (path: string, body?: any, config?: {
690
- headers?: HeadersInit;
691
- queryParams?: {
692
- [key: string]: string;
693
- };
694
- token?: string;
695
- }) => Promise<Response>;
696
- patch: (path: string, body?: any, config?: {
697
- headers?: HeadersInit;
698
- queryParams?: {
699
- [key: string]: string;
700
- };
701
- token?: string;
702
- }) => Promise<Response>;
703
- put: (path: string, body?: any, config?: {
704
- headers?: HeadersInit;
705
- queryParams?: {
706
- [key: string]: string;
707
- };
708
- token?: string;
709
- }) => Promise<Response>;
710
- delete: (path: string, config?: {
711
- headers?: HeadersInit;
712
- queryParams?: {
713
- [key: string]: string;
714
- };
715
- token?: string;
716
- }) => Promise<Response>;
717
- hooks?: {
718
- beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
719
- afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
720
- transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
721
- };
722
- buildUrl: (path: string, queryParams?: {
723
- [key: string]: string;
724
- }) => string;
725
- };
676
+ httpClient: _1.HttpClient;
726
677
  } | {
727
678
  refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
728
679
  logout: (token?: string) => Promise<_1.SdkResponse<never>>;
@@ -757,6 +708,7 @@ declare const createSdkWrapper: <P extends Omit<{
757
708
  locale?: string;
758
709
  oidcPrompt?: string;
759
710
  oidcErrorRedirectUri?: string;
711
+ oidcResource?: string;
760
712
  nativeOptions?: {
761
713
  platform: "ios" | "android";
762
714
  oauthProvider?: string;
@@ -766,7 +718,7 @@ declare const createSdkWrapper: <P extends Omit<{
766
718
  applicationScopes?: string;
767
719
  outboundAppId?: string;
768
720
  outboundAppScopes?: string[];
769
- }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
721
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
770
722
  lastAuth?: Omit<{
771
723
  authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
772
724
  oauthProvider?: string;
@@ -1349,51 +1301,7 @@ declare const createSdkWrapper: <P extends Omit<{
1349
1301
  getJwtPermissions: (token: string, tenant?: string) => string[];
1350
1302
  getJwtRoles: (token: string, tenant?: string) => string[];
1351
1303
  getCurrentTenant: (token: string) => string;
1352
- httpClient: {
1353
- get: (path: string, config?: {
1354
- headers?: HeadersInit;
1355
- queryParams?: {
1356
- [key: string]: string;
1357
- };
1358
- token?: string;
1359
- }) => Promise<Response>;
1360
- post: (path: string, body?: any, config?: {
1361
- headers?: HeadersInit;
1362
- queryParams?: {
1363
- [key: string]: string;
1364
- };
1365
- token?: string;
1366
- }) => Promise<Response>;
1367
- patch: (path: string, body?: any, config?: {
1368
- headers?: HeadersInit;
1369
- queryParams?: {
1370
- [key: string]: string;
1371
- };
1372
- token?: string;
1373
- }) => Promise<Response>;
1374
- put: (path: string, body?: any, config?: {
1375
- headers?: HeadersInit;
1376
- queryParams?: {
1377
- [key: string]: string;
1378
- };
1379
- token?: string;
1380
- }) => Promise<Response>;
1381
- delete: (path: string, config?: {
1382
- headers?: HeadersInit;
1383
- queryParams?: {
1384
- [key: string]: string;
1385
- };
1386
- token?: string;
1387
- }) => Promise<Response>;
1388
- hooks?: {
1389
- beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
1390
- afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
1391
- transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
1392
- };
1393
- buildUrl: (path: string, queryParams?: {
1394
- [key: string]: string;
1395
- }) => string;
1396
- };
1304
+ httpClient: _1.HttpClient;
1397
1305
  } | {
1398
1306
  refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
1399
1307
  logout: (token?: string) => Promise<_1.SdkResponse<never>>;
@@ -1428,6 +1336,7 @@ declare const createSdkWrapper: <P extends Omit<{
1428
1336
  locale?: string;
1429
1337
  oidcPrompt?: string;
1430
1338
  oidcErrorRedirectUri?: string;
1339
+ oidcResource?: string;
1431
1340
  nativeOptions?: {
1432
1341
  platform: "ios" | "android";
1433
1342
  oauthProvider?: string;
@@ -1437,7 +1346,7 @@ declare const createSdkWrapper: <P extends Omit<{
1437
1346
  applicationScopes?: string;
1438
1347
  outboundAppId?: string;
1439
1348
  outboundAppScopes?: string[];
1440
- }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
1349
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
1441
1350
  lastAuth?: Omit<{
1442
1351
  authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
1443
1352
  oauthProvider?: string;
@@ -2020,51 +1929,7 @@ declare const createSdkWrapper: <P extends Omit<{
2020
1929
  getJwtPermissions: (token: string, tenant?: string) => string[];
2021
1930
  getJwtRoles: (token: string, tenant?: string) => string[];
2022
1931
  getCurrentTenant: (token: string) => string;
2023
- httpClient: {
2024
- get: (path: string, config?: {
2025
- headers?: HeadersInit;
2026
- queryParams?: {
2027
- [key: string]: string;
2028
- };
2029
- token?: string;
2030
- }) => Promise<Response>;
2031
- post: (path: string, body?: any, config?: {
2032
- headers?: HeadersInit;
2033
- queryParams?: {
2034
- [key: string]: string;
2035
- };
2036
- token?: string;
2037
- }) => Promise<Response>;
2038
- patch: (path: string, body?: any, config?: {
2039
- headers?: HeadersInit;
2040
- queryParams?: {
2041
- [key: string]: string;
2042
- };
2043
- token?: string;
2044
- }) => Promise<Response>;
2045
- put: (path: string, body?: any, config?: {
2046
- headers?: HeadersInit;
2047
- queryParams?: {
2048
- [key: string]: string;
2049
- };
2050
- token?: string;
2051
- }) => Promise<Response>;
2052
- delete: (path: string, config?: {
2053
- headers?: HeadersInit;
2054
- queryParams?: {
2055
- [key: string]: string;
2056
- };
2057
- token?: string;
2058
- }) => Promise<Response>;
2059
- hooks?: {
2060
- beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
2061
- afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
2062
- transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
2063
- };
2064
- buildUrl: (path: string, queryParams?: {
2065
- [key: string]: string;
2066
- }) => string;
2067
- };
1932
+ httpClient: _1.HttpClient;
2068
1933
  }) & {
2069
1934
  onSessionTokenChange: (cb: (data: string) => void) => () => any[];
2070
1935
  onUserChange: (cb: (data: _1.UserResponse) => void) => () => any[];
@@ -2111,6 +1976,7 @@ export declare const createTempSdk: () => ((({
2111
1976
  locale?: string;
2112
1977
  oidcPrompt?: string;
2113
1978
  oidcErrorRedirectUri?: string;
1979
+ oidcResource?: string;
2114
1980
  nativeOptions?: {
2115
1981
  platform: "ios" | "android";
2116
1982
  oauthProvider?: string;
@@ -2120,7 +1986,7 @@ export declare const createTempSdk: () => ((({
2120
1986
  applicationScopes?: string;
2121
1987
  outboundAppId?: string;
2122
1988
  outboundAppScopes?: string[];
2123
- }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
1989
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
2124
1990
  lastAuth?: Omit<{
2125
1991
  authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
2126
1992
  oauthProvider?: string;
@@ -2703,51 +2569,7 @@ export declare const createTempSdk: () => ((({
2703
2569
  getJwtPermissions: (token: string, tenant?: string) => string[];
2704
2570
  getJwtRoles: (token: string, tenant?: string) => string[];
2705
2571
  getCurrentTenant: (token: string) => string;
2706
- httpClient: {
2707
- get: (path: string, config?: {
2708
- headers?: HeadersInit;
2709
- queryParams?: {
2710
- [key: string]: string;
2711
- };
2712
- token?: string;
2713
- }) => Promise<Response>;
2714
- post: (path: string, body?: any, config?: {
2715
- headers?: HeadersInit;
2716
- queryParams?: {
2717
- [key: string]: string;
2718
- };
2719
- token?: string;
2720
- }) => Promise<Response>;
2721
- patch: (path: string, body?: any, config?: {
2722
- headers?: HeadersInit;
2723
- queryParams?: {
2724
- [key: string]: string;
2725
- };
2726
- token?: string;
2727
- }) => Promise<Response>;
2728
- put: (path: string, body?: any, config?: {
2729
- headers?: HeadersInit;
2730
- queryParams?: {
2731
- [key: string]: string;
2732
- };
2733
- token?: string;
2734
- }) => Promise<Response>;
2735
- delete: (path: string, config?: {
2736
- headers?: HeadersInit;
2737
- queryParams?: {
2738
- [key: string]: string;
2739
- };
2740
- token?: string;
2741
- }) => Promise<Response>;
2742
- hooks?: {
2743
- beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
2744
- afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
2745
- transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
2746
- };
2747
- buildUrl: (path: string, queryParams?: {
2748
- [key: string]: string;
2749
- }) => string;
2750
- };
2572
+ httpClient: _1.HttpClient;
2751
2573
  } | {
2752
2574
  refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
2753
2575
  logout: (token?: string) => Promise<_1.SdkResponse<never>>;
@@ -2782,6 +2604,7 @@ export declare const createTempSdk: () => ((({
2782
2604
  locale?: string;
2783
2605
  oidcPrompt?: string;
2784
2606
  oidcErrorRedirectUri?: string;
2607
+ oidcResource?: string;
2785
2608
  nativeOptions?: {
2786
2609
  platform: "ios" | "android";
2787
2610
  oauthProvider?: string;
@@ -2791,7 +2614,7 @@ export declare const createTempSdk: () => ((({
2791
2614
  applicationScopes?: string;
2792
2615
  outboundAppId?: string;
2793
2616
  outboundAppScopes?: string[];
2794
- }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
2617
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
2795
2618
  lastAuth?: Omit<{
2796
2619
  authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
2797
2620
  oauthProvider?: string;
@@ -3374,51 +3197,7 @@ export declare const createTempSdk: () => ((({
3374
3197
  getJwtPermissions: (token: string, tenant?: string) => string[];
3375
3198
  getJwtRoles: (token: string, tenant?: string) => string[];
3376
3199
  getCurrentTenant: (token: string) => string;
3377
- httpClient: {
3378
- get: (path: string, config?: {
3379
- headers?: HeadersInit;
3380
- queryParams?: {
3381
- [key: string]: string;
3382
- };
3383
- token?: string;
3384
- }) => Promise<Response>;
3385
- post: (path: string, body?: any, config?: {
3386
- headers?: HeadersInit;
3387
- queryParams?: {
3388
- [key: string]: string;
3389
- };
3390
- token?: string;
3391
- }) => Promise<Response>;
3392
- patch: (path: string, body?: any, config?: {
3393
- headers?: HeadersInit;
3394
- queryParams?: {
3395
- [key: string]: string;
3396
- };
3397
- token?: string;
3398
- }) => Promise<Response>;
3399
- put: (path: string, body?: any, config?: {
3400
- headers?: HeadersInit;
3401
- queryParams?: {
3402
- [key: string]: string;
3403
- };
3404
- token?: string;
3405
- }) => Promise<Response>;
3406
- delete: (path: string, config?: {
3407
- headers?: HeadersInit;
3408
- queryParams?: {
3409
- [key: string]: string;
3410
- };
3411
- token?: string;
3412
- }) => Promise<Response>;
3413
- hooks?: {
3414
- beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
3415
- afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
3416
- transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
3417
- };
3418
- buildUrl: (path: string, queryParams?: {
3419
- [key: string]: string;
3420
- }) => string;
3421
- };
3200
+ httpClient: _1.HttpClient;
3422
3201
  } | {
3423
3202
  refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
3424
3203
  logout: (token?: string) => Promise<_1.SdkResponse<never>>;
@@ -3453,6 +3232,7 @@ export declare const createTempSdk: () => ((({
3453
3232
  locale?: string;
3454
3233
  oidcPrompt?: string;
3455
3234
  oidcErrorRedirectUri?: string;
3235
+ oidcResource?: string;
3456
3236
  nativeOptions?: {
3457
3237
  platform: "ios" | "android";
3458
3238
  oauthProvider?: string;
@@ -3462,7 +3242,7 @@ export declare const createTempSdk: () => ((({
3462
3242
  applicationScopes?: string;
3463
3243
  outboundAppId?: string;
3464
3244
  outboundAppScopes?: string[];
3465
- }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
3245
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
3466
3246
  lastAuth?: Omit<{
3467
3247
  authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
3468
3248
  oauthProvider?: string;
@@ -4045,51 +3825,7 @@ export declare const createTempSdk: () => ((({
4045
3825
  getJwtPermissions: (token: string, tenant?: string) => string[];
4046
3826
  getJwtRoles: (token: string, tenant?: string) => string[];
4047
3827
  getCurrentTenant: (token: string) => string;
4048
- httpClient: {
4049
- get: (path: string, config?: {
4050
- headers?: HeadersInit;
4051
- queryParams?: {
4052
- [key: string]: string;
4053
- };
4054
- token?: string;
4055
- }) => Promise<Response>;
4056
- post: (path: string, body?: any, config?: {
4057
- headers?: HeadersInit;
4058
- queryParams?: {
4059
- [key: string]: string;
4060
- };
4061
- token?: string;
4062
- }) => Promise<Response>;
4063
- patch: (path: string, body?: any, config?: {
4064
- headers?: HeadersInit;
4065
- queryParams?: {
4066
- [key: string]: string;
4067
- };
4068
- token?: string;
4069
- }) => Promise<Response>;
4070
- put: (path: string, body?: any, config?: {
4071
- headers?: HeadersInit;
4072
- queryParams?: {
4073
- [key: string]: string;
4074
- };
4075
- token?: string;
4076
- }) => Promise<Response>;
4077
- delete: (path: string, config?: {
4078
- headers?: HeadersInit;
4079
- queryParams?: {
4080
- [key: string]: string;
4081
- };
4082
- token?: string;
4083
- }) => Promise<Response>;
4084
- hooks?: {
4085
- beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
4086
- afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
4087
- transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
4088
- };
4089
- buildUrl: (path: string, queryParams?: {
4090
- [key: string]: string;
4091
- }) => string;
4092
- };
3828
+ httpClient: _1.HttpClient;
4093
3829
  }) & {
4094
3830
  onSessionTokenChange: (cb: (data: string) => void) => () => any[];
4095
3831
  onUserChange: (cb: (data: _1.UserResponse) => void) => () => any[];
@@ -4144,6 +3880,7 @@ export declare const getGlobalSdk: () => ((({
4144
3880
  locale?: string;
4145
3881
  oidcPrompt?: string;
4146
3882
  oidcErrorRedirectUri?: string;
3883
+ oidcResource?: string;
4147
3884
  nativeOptions?: {
4148
3885
  platform: "ios" | "android";
4149
3886
  oauthProvider?: string;
@@ -4153,7 +3890,7 @@ export declare const getGlobalSdk: () => ((({
4153
3890
  applicationScopes?: string;
4154
3891
  outboundAppId?: string;
4155
3892
  outboundAppScopes?: string[];
4156
- }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
3893
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
4157
3894
  lastAuth?: Omit<{
4158
3895
  authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
4159
3896
  oauthProvider?: string;
@@ -4736,51 +4473,7 @@ export declare const getGlobalSdk: () => ((({
4736
4473
  getJwtPermissions: (token: string, tenant?: string) => string[];
4737
4474
  getJwtRoles: (token: string, tenant?: string) => string[];
4738
4475
  getCurrentTenant: (token: string) => string;
4739
- httpClient: {
4740
- get: (path: string, config?: {
4741
- headers?: HeadersInit;
4742
- queryParams?: {
4743
- [key: string]: string;
4744
- };
4745
- token?: string;
4746
- }) => Promise<Response>;
4747
- post: (path: string, body?: any, config?: {
4748
- headers?: HeadersInit;
4749
- queryParams?: {
4750
- [key: string]: string;
4751
- };
4752
- token?: string;
4753
- }) => Promise<Response>;
4754
- patch: (path: string, body?: any, config?: {
4755
- headers?: HeadersInit;
4756
- queryParams?: {
4757
- [key: string]: string;
4758
- };
4759
- token?: string;
4760
- }) => Promise<Response>;
4761
- put: (path: string, body?: any, config?: {
4762
- headers?: HeadersInit;
4763
- queryParams?: {
4764
- [key: string]: string;
4765
- };
4766
- token?: string;
4767
- }) => Promise<Response>;
4768
- delete: (path: string, config?: {
4769
- headers?: HeadersInit;
4770
- queryParams?: {
4771
- [key: string]: string;
4772
- };
4773
- token?: string;
4774
- }) => Promise<Response>;
4775
- hooks?: {
4776
- beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
4777
- afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
4778
- transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
4779
- };
4780
- buildUrl: (path: string, queryParams?: {
4781
- [key: string]: string;
4782
- }) => string;
4783
- };
4476
+ httpClient: _1.HttpClient;
4784
4477
  } | {
4785
4478
  refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
4786
4479
  logout: (token?: string) => Promise<_1.SdkResponse<never>>;
@@ -4815,6 +4508,7 @@ export declare const getGlobalSdk: () => ((({
4815
4508
  locale?: string;
4816
4509
  oidcPrompt?: string;
4817
4510
  oidcErrorRedirectUri?: string;
4511
+ oidcResource?: string;
4818
4512
  nativeOptions?: {
4819
4513
  platform: "ios" | "android";
4820
4514
  oauthProvider?: string;
@@ -4824,7 +4518,7 @@ export declare const getGlobalSdk: () => ((({
4824
4518
  applicationScopes?: string;
4825
4519
  outboundAppId?: string;
4826
4520
  outboundAppScopes?: string[];
4827
- }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
4521
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
4828
4522
  lastAuth?: Omit<{
4829
4523
  authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
4830
4524
  oauthProvider?: string;
@@ -5407,51 +5101,7 @@ export declare const getGlobalSdk: () => ((({
5407
5101
  getJwtPermissions: (token: string, tenant?: string) => string[];
5408
5102
  getJwtRoles: (token: string, tenant?: string) => string[];
5409
5103
  getCurrentTenant: (token: string) => string;
5410
- httpClient: {
5411
- get: (path: string, config?: {
5412
- headers?: HeadersInit;
5413
- queryParams?: {
5414
- [key: string]: string;
5415
- };
5416
- token?: string;
5417
- }) => Promise<Response>;
5418
- post: (path: string, body?: any, config?: {
5419
- headers?: HeadersInit;
5420
- queryParams?: {
5421
- [key: string]: string;
5422
- };
5423
- token?: string;
5424
- }) => Promise<Response>;
5425
- patch: (path: string, body?: any, config?: {
5426
- headers?: HeadersInit;
5427
- queryParams?: {
5428
- [key: string]: string;
5429
- };
5430
- token?: string;
5431
- }) => Promise<Response>;
5432
- put: (path: string, body?: any, config?: {
5433
- headers?: HeadersInit;
5434
- queryParams?: {
5435
- [key: string]: string;
5436
- };
5437
- token?: string;
5438
- }) => Promise<Response>;
5439
- delete: (path: string, config?: {
5440
- headers?: HeadersInit;
5441
- queryParams?: {
5442
- [key: string]: string;
5443
- };
5444
- token?: string;
5445
- }) => Promise<Response>;
5446
- hooks?: {
5447
- beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
5448
- afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
5449
- transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
5450
- };
5451
- buildUrl: (path: string, queryParams?: {
5452
- [key: string]: string;
5453
- }) => string;
5454
- };
5104
+ httpClient: _1.HttpClient;
5455
5105
  } | {
5456
5106
  refresh: (token?: string) => Promise<_1.SdkResponse<_1.JWTResponse>>;
5457
5107
  logout: (token?: string) => Promise<_1.SdkResponse<never>>;
@@ -5486,6 +5136,7 @@ export declare const getGlobalSdk: () => ((({
5486
5136
  locale?: string;
5487
5137
  oidcPrompt?: string;
5488
5138
  oidcErrorRedirectUri?: string;
5139
+ oidcResource?: string;
5489
5140
  nativeOptions?: {
5490
5141
  platform: "ios" | "android";
5491
5142
  oauthProvider?: string;
@@ -5495,7 +5146,7 @@ export declare const getGlobalSdk: () => ((({
5495
5146
  applicationScopes?: string;
5496
5147
  outboundAppId?: string;
5497
5148
  outboundAppScopes?: string[];
5498
- }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
5149
+ }, "tenant" | "redirectUrl" | "redirectAuth" | "oidcIdpStateId" | "samlIdpStateId" | "samlIdpUsername" | "ssoAppId" | "thirdPartyAppId" | "oidcLoginHint" | "preview" | "abTestingKey" | "client" | "locale" | "oidcPrompt" | "oidcErrorRedirectUri" | "oidcResource" | "nativeOptions" | "thirdPartyAppStateId" | "applicationScopes" | "outboundAppId" | "outboundAppScopes"> & {
5499
5150
  lastAuth?: Omit<{
5500
5151
  authMethod?: "webauthn" | "otp" | "oauth" | "saml" | "totp" | "magiclink" | "enchantedlink";
5501
5152
  oauthProvider?: string;
@@ -6078,51 +5729,7 @@ export declare const getGlobalSdk: () => ((({
6078
5729
  getJwtPermissions: (token: string, tenant?: string) => string[];
6079
5730
  getJwtRoles: (token: string, tenant?: string) => string[];
6080
5731
  getCurrentTenant: (token: string) => string;
6081
- httpClient: {
6082
- get: (path: string, config?: {
6083
- headers?: HeadersInit;
6084
- queryParams?: {
6085
- [key: string]: string;
6086
- };
6087
- token?: string;
6088
- }) => Promise<Response>;
6089
- post: (path: string, body?: any, config?: {
6090
- headers?: HeadersInit;
6091
- queryParams?: {
6092
- [key: string]: string;
6093
- };
6094
- token?: string;
6095
- }) => Promise<Response>;
6096
- patch: (path: string, body?: any, config?: {
6097
- headers?: HeadersInit;
6098
- queryParams?: {
6099
- [key: string]: string;
6100
- };
6101
- token?: string;
6102
- }) => Promise<Response>;
6103
- put: (path: string, body?: any, config?: {
6104
- headers?: HeadersInit;
6105
- queryParams?: {
6106
- [key: string]: string;
6107
- };
6108
- token?: string;
6109
- }) => Promise<Response>;
6110
- delete: (path: string, config?: {
6111
- headers?: HeadersInit;
6112
- queryParams?: {
6113
- [key: string]: string;
6114
- };
6115
- token?: string;
6116
- }) => Promise<Response>;
6117
- hooks?: {
6118
- beforeRequest?: (config: _1.RequestConfig) => _1.RequestConfig;
6119
- afterRequest?: (req: _1.RequestConfig, res: Response) => void | Promise<void>;
6120
- transformResponse?: (mutableResponse: _1.ExtendedResponse) => Promise<_1.ExtendedResponse>;
6121
- };
6122
- buildUrl: (path: string, queryParams?: {
6123
- [key: string]: string;
6124
- }) => string;
6125
- };
5732
+ httpClient: _1.HttpClient;
6126
5733
  }) & {
6127
5734
  onSessionTokenChange: (cb: (data: string) => void) => () => any[];
6128
5735
  onUserChange: (cb: (data: _1.UserResponse) => void) => () => any[];