@asgardeo/javascript 0.1.2 → 0.1.3
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/AsgardeoJavaScriptClient.d.ts +5 -2
- package/dist/api/getAllOrganizations.d.ts +2 -11
- package/dist/cjs/index.js +536 -31
- package/dist/cjs/index.js.map +4 -4
- package/dist/index.d.ts +4 -1
- package/dist/index.js +534 -31
- package/dist/index.js.map +4 -4
- package/dist/models/client.d.ts +6 -3
- package/dist/models/i18n.d.ts +10 -0
- package/dist/models/organization.d.ts +9 -0
- package/dist/theme/createTheme.d.ts +17 -1
- package/dist/theme/types.d.ts +199 -0
- package/dist/utils/processUsername.d.ts +73 -0
- package/dist/utils/transformBrandingPreferenceToTheme.d.ts +48 -0
- package/package.json +1 -1
|
@@ -15,10 +15,12 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
+
import { AllOrganizationsApiResponse } from './models/organization';
|
|
18
19
|
import { AsgardeoClient, SignInOptions, SignOutOptions, SignUpOptions } from './models/client';
|
|
19
20
|
import { Config } from './models/config';
|
|
20
21
|
import { EmbeddedFlowExecuteRequestPayload, EmbeddedFlowExecuteResponse } from './models/embedded-flow';
|
|
21
22
|
import { EmbeddedSignInFlowHandleRequestPayload } from './models/embedded-signin-flow';
|
|
23
|
+
import { TokenResponse } from './models/token';
|
|
22
24
|
import { Organization } from './models/organization';
|
|
23
25
|
import { User, UserProfile } from './models/user';
|
|
24
26
|
/**
|
|
@@ -28,10 +30,11 @@ import { User, UserProfile } from './models/user';
|
|
|
28
30
|
* @typeParam T - Configuration type that extends Config.
|
|
29
31
|
*/
|
|
30
32
|
declare abstract class AsgardeoJavaScriptClient<T = Config> implements AsgardeoClient<T> {
|
|
31
|
-
abstract switchOrganization(organization: Organization): Promise<
|
|
33
|
+
abstract switchOrganization(organization: Organization, sessionId?: string): Promise<TokenResponse | Response>;
|
|
32
34
|
abstract initialize(config: T): Promise<boolean>;
|
|
33
35
|
abstract getUser(options?: any): Promise<User>;
|
|
34
|
-
abstract
|
|
36
|
+
abstract getAllOrganizations(options?: any, sessionId?: string): Promise<AllOrganizationsApiResponse>;
|
|
37
|
+
abstract getMyOrganizations(options?: any, sessionId?: string): Promise<Organization[]>;
|
|
35
38
|
abstract getCurrentOrganization(sessionId?: string): Promise<Organization | null>;
|
|
36
39
|
abstract getUserProfile(options?: any): Promise<UserProfile>;
|
|
37
40
|
abstract isLoading(): boolean;
|
|
@@ -15,16 +15,7 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import {
|
|
19
|
-
/**
|
|
20
|
-
* Interface for paginated organization response.
|
|
21
|
-
*/
|
|
22
|
-
export interface PaginatedOrganizationsResponse {
|
|
23
|
-
hasMore?: boolean;
|
|
24
|
-
nextCursor?: string;
|
|
25
|
-
organizations: Organization[];
|
|
26
|
-
totalCount?: number;
|
|
27
|
-
}
|
|
18
|
+
import { AllOrganizationsApiResponse } from '../models/organization';
|
|
28
19
|
/**
|
|
29
20
|
* Configuration for the getAllOrganizations request
|
|
30
21
|
*/
|
|
@@ -108,5 +99,5 @@ export interface GetAllOrganizationsConfig extends Omit<RequestInit, 'method'> {
|
|
|
108
99
|
* }
|
|
109
100
|
* ```
|
|
110
101
|
*/
|
|
111
|
-
declare const getAllOrganizations: ({ baseUrl, filter, limit, recursive, fetcher, ...requestConfig }: GetAllOrganizationsConfig) => Promise<
|
|
102
|
+
declare const getAllOrganizations: ({ baseUrl, filter, limit, recursive, fetcher, ...requestConfig }: GetAllOrganizationsConfig) => Promise<AllOrganizationsApiResponse>;
|
|
112
103
|
export default getAllOrganizations;
|