@asgardeo/react 0.5.3 → 0.5.5

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.
@@ -15,7 +15,7 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { AsgardeoBrowserClient, UserProfile, SignInOptions, SignOutOptions, User, EmbeddedFlowExecuteResponse, SignUpOptions, EmbeddedFlowExecuteRequestPayload, EmbeddedSignInFlowHandleRequestPayload, Organization, EmbeddedFlowExecuteRequestConfig } from '@asgardeo/browser';
18
+ import { AsgardeoBrowserClient, UserProfile, SignInOptions, SignOutOptions, User, EmbeddedFlowExecuteResponse, SignUpOptions, EmbeddedFlowExecuteRequestPayload, EmbeddedSignInFlowHandleRequestPayload, Organization, IdToken, EmbeddedFlowExecuteRequestConfig, AllOrganizationsApiResponse, TokenResponse } from '@asgardeo/browser';
19
19
  import { AsgardeoReactConfig } from './models/config';
20
20
  /**
21
21
  * Client for mplementing Asgardeo in React applications.
@@ -27,11 +27,14 @@ declare class AsgardeoReactClient<T extends AsgardeoReactConfig = AsgardeoReactC
27
27
  private asgardeo;
28
28
  constructor();
29
29
  initialize(config: AsgardeoReactConfig): Promise<boolean>;
30
- getUser(): Promise<User>;
31
- getUserProfile(): Promise<UserProfile>;
32
- getOrganizations(): Promise<Organization[]>;
30
+ updateUserProfile(payload: any, userId?: string): Promise<User>;
31
+ getUser(options?: any): Promise<User>;
32
+ getDecodedIdToken(sessionId?: string): Promise<IdToken>;
33
+ getUserProfile(options?: any): Promise<UserProfile>;
34
+ getMyOrganizations(options?: any, sessionId?: string): Promise<Organization[]>;
35
+ getAllOrganizations(options?: any, sessionId?: string): Promise<AllOrganizationsApiResponse>;
33
36
  getCurrentOrganization(): Promise<Organization | null>;
34
- switchOrganization(organization: Organization): Promise<void>;
37
+ switchOrganization(organization: Organization, sessionId?: string): Promise<TokenResponse | Response>;
35
38
  isLoading(): boolean;
36
39
  isInitialized(): Promise<boolean>;
37
40
  isSignedIn(): Promise<boolean>;
@@ -135,7 +135,7 @@ declare class AuthAPI {
135
135
  * @return {Promise<DecodedIDTokenPayloadInterface>} - A Promise that resolves with
136
136
  * the decoded payload of the id token.
137
137
  */
138
- getDecodedIdToken(): Promise<IdToken>;
138
+ getDecodedIdToken(sessionId?: string): Promise<IdToken>;
139
139
  /**
140
140
  * This method decodes the payload of the idp id token and returns it.
141
141
  *
@@ -70,7 +70,7 @@ export interface AuthContextInterface {
70
70
  getOpenIDProviderEndpoints(): Promise<OIDCEndpoints>;
71
71
  getHttpClient(): Promise<HttpClientInstance>;
72
72
  getDecodedIDPIDToken(): Promise<IdToken>;
73
- getDecodedIdToken(): Promise<IdToken>;
73
+ getDecodedIdToken(sessionId?: string): Promise<IdToken>;
74
74
  getIdToken(): Promise<string>;
75
75
  getAccessToken(): Promise<string>;
76
76
  refreshAccessToken(): Promise<User>;
@@ -15,7 +15,7 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { GetAllOrganizationsConfig as BaseGetAllOrganizationsConfig, PaginatedOrganizationsResponse } from '@asgardeo/browser';
18
+ import { GetAllOrganizationsConfig as BaseGetAllOrganizationsConfig, AllOrganizationsApiResponse } from '@asgardeo/browser';
19
19
  /**
20
20
  * Configuration for the getAllOrganizations request (React-specific)
21
21
  */
@@ -69,5 +69,5 @@ export interface GetAllOrganizationsConfig extends Omit<BaseGetAllOrganizationsC
69
69
  * }
70
70
  * ```
71
71
  */
72
- declare const getAllOrganizations: ({ fetcher, ...requestConfig }: GetAllOrganizationsConfig) => Promise<PaginatedOrganizationsResponse>;
72
+ declare const getAllOrganizations: ({ fetcher, ...requestConfig }: GetAllOrganizationsConfig) => Promise<AllOrganizationsApiResponse>;
73
73
  export default getAllOrganizations;