@thunderid/javascript 0.3.6 → 0.3.8
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/ThunderIDJavaScriptClient.d.ts +0 -5
- package/dist/ThunderIDJavaScriptClient.d.ts.map +1 -1
- package/dist/api/getOrganizationUnitChildren.d.ts +65 -22
- package/dist/api/getOrganizationUnitChildren.d.ts.map +1 -1
- package/dist/cjs/index.cjs +551 -1344
- package/dist/edge/index.js +552 -1336
- package/dist/errors/exception.d.ts +1 -3
- package/dist/errors/exception.d.ts.map +1 -1
- package/dist/index.d.ts +1 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +552 -1336
- package/dist/models/client.d.ts +0 -25
- package/dist/models/client.d.ts.map +1 -1
- package/dist/models/config.d.ts +0 -15
- package/dist/models/config.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/api/createOrganization.d.ts +0 -130
- package/dist/api/createOrganization.d.ts.map +0 -1
- package/dist/api/getAllOrganizations.d.ts +0 -104
- package/dist/api/getAllOrganizations.d.ts.map +0 -1
- package/dist/api/getBrandingPreference.d.ts +0 -104
- package/dist/api/getBrandingPreference.d.ts.map +0 -1
- package/dist/api/getMeOrganizations.d.ts +0 -120
- package/dist/api/getMeOrganizations.d.ts.map +0 -1
- package/dist/api/getOrganization.d.ts +0 -110
- package/dist/api/getOrganization.d.ts.map +0 -1
- package/dist/api/updateOrganization.d.ts +0 -119
- package/dist/api/updateOrganization.d.ts.map +0 -1
- package/dist/models/branding-preference.d.ts +0 -249
- package/dist/models/branding-preference.d.ts.map +0 -1
- package/dist/models/organization-unit.d.ts +0 -103
- package/dist/models/organization-unit.d.ts.map +0 -1
- package/dist/models/organization.d.ts +0 -34
- package/dist/models/organization.d.ts.map +0 -1
- package/dist/utils/deriveOrganizationHandleFromBaseUrl.d.ts +0 -40
- package/dist/utils/deriveOrganizationHandleFromBaseUrl.d.ts.map +0 -1
- package/dist/utils/transformBrandingPreferenceToTheme.d.ts +0 -49
- package/dist/utils/transformBrandingPreferenceToTheme.d.ts.map +0 -1
package/dist/models/client.d.ts
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import type { CIBAInitiateOptions, CIBAInitiateResponse, CIBAPollOptions } from './ciba';
|
|
19
19
|
import { SignInOptions, SignOutOptions, SignUpOptions } from './config';
|
|
20
|
-
import { Organization, AllOrganizationsApiResponse } from './organization';
|
|
21
20
|
import { Storage } from './store';
|
|
22
21
|
import { TokenExchangeRequestConfig, TokenResponse } from './token';
|
|
23
22
|
import { User, UserProfile } from './user';
|
|
@@ -55,29 +54,11 @@ export interface ThunderIDClient<T> {
|
|
|
55
54
|
* @returns A promise that resolves to the access token string.
|
|
56
55
|
*/
|
|
57
56
|
getAccessToken(sessionId?: string): Promise<string>;
|
|
58
|
-
/**
|
|
59
|
-
* Gets all organizations available to the user.
|
|
60
|
-
* @param options - Optional parameters for the request.
|
|
61
|
-
* @param sessionId - Optional session ID to be used for the request.
|
|
62
|
-
*/
|
|
63
|
-
getAllOrganizations(options?: any, sessionId?: string): Promise<AllOrganizationsApiResponse>;
|
|
64
57
|
/**
|
|
65
58
|
* Gets the client configuration.
|
|
66
59
|
* @returns The client configuration.
|
|
67
60
|
*/
|
|
68
61
|
getConfiguration(): T;
|
|
69
|
-
/**
|
|
70
|
-
* Gets the current organization of the user.
|
|
71
|
-
*
|
|
72
|
-
* @returns The current organization if available, otherwise null.
|
|
73
|
-
*/
|
|
74
|
-
getCurrentOrganization(sessionId?: string): Promise<Organization | null>;
|
|
75
|
-
/**
|
|
76
|
-
* Gets the current signed-in user's associated organizations.
|
|
77
|
-
*
|
|
78
|
-
* @returns Associated organizations.
|
|
79
|
-
*/
|
|
80
|
-
getMyOrganizations(options?: any, sessionId?: string): Promise<Organization[]>;
|
|
81
62
|
/**
|
|
82
63
|
* Gets user information from the session.
|
|
83
64
|
*
|
|
@@ -187,12 +168,6 @@ export interface ThunderIDClient<T> {
|
|
|
187
168
|
* @returns Promise resolving when sign-up is complete.
|
|
188
169
|
*/
|
|
189
170
|
signUp(options?: SignUpOptions): Promise<void>;
|
|
190
|
-
/**
|
|
191
|
-
* Switches the current organization to the specified one.
|
|
192
|
-
* @param organization - The organization to switch to.
|
|
193
|
-
* @returns A promise that resolves when the switch is complete.
|
|
194
|
-
*/
|
|
195
|
-
switchOrganization(organization: Organization, sessionId?: string): Promise<TokenResponse | Response>;
|
|
196
171
|
/**
|
|
197
172
|
* Updates the user profile with the provided payload.
|
|
198
173
|
* @param payload - The new user profile data.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/models/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAC,mBAAmB,EAAE,oBAAoB,EAAE,eAAe,EAAC,MAAM,QAAQ,CAAC;AACvF,OAAO,EAAC,aAAa,EAAE,cAAc,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AACtE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/models/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAC,mBAAmB,EAAE,oBAAoB,EAAE,eAAe,EAAC,MAAM,QAAQ,CAAC;AACvF,OAAO,EAAC,aAAa,EAAE,cAAc,EAAE,aAAa,EAAC,MAAM,UAAU,CAAC;AACtE,OAAO,EAAC,OAAO,EAAC,MAAM,SAAS,CAAC;AAChC,OAAO,EAAC,0BAA0B,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AAClE,OAAO,EAAC,IAAI,EAAE,WAAW,EAAC,MAAM,QAAQ,CAAC;AAEzC;;;;;;;;;GASG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC;;;OAGG;IACH,YAAY,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEvC;;;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**
|
|
415
|
-
* Inherit branding from WSO2 Identity Server or ThunderID.
|
|
416
|
-
* When set to `true`, the SDK will fetch and apply branding preferences from the server.
|
|
417
|
-
* Defaults to `false` — branding is not fetched unless explicitly enabled.
|
|
418
|
-
* @default false
|
|
419
|
-
*/
|
|
420
|
-
inheritFromBranding?: boolean;
|
|
421
414
|
/**
|
|
422
415
|
* The theme mode to use. Defaults to 'system'.
|
|
423
416
|
*/
|
|
@@ -484,14 +477,6 @@ export interface I18nPreferences {
|
|
|
484
477
|
urlParam?: string | false;
|
|
485
478
|
}
|
|
486
479
|
export interface UserPreferences {
|
|
487
|
-
/**
|
|
488
|
-
* Whether to automatically fetch the user's associated organizations after sign-in.
|
|
489
|
-
* When set to false, the SDK will not make API calls to `/api/users/v1/me/organizations`.
|
|
490
|
-
* @default true
|
|
491
|
-
* @remarks Disabling this will improve performance if you don't need organization information.
|
|
492
|
-
* You can manually call `getMyOrganizations()` when needed if this is disabled.
|
|
493
|
-
*/
|
|
494
|
-
fetchOrganizations?: boolean;
|
|
495
480
|
/**
|
|
496
481
|
* Whether to automatically fetch the user profile from SCIM2 endpoints after sign-in.
|
|
497
482
|
* When set to false, the SDK will not make API calls to `/scim2/Me` and `/scim2/Schemas`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/models/config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAC,uBAAuB,EAAC,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAC,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAC/C,OA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M,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,MAAM,GAAG;IAAC,SAAS,CAAC,EAAE;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAC,CAAA;CAAC,CAAC;AAEpF;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,GAAG;IAAC,SAAS,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { Organization } from '../models/organization';
|
|
19
|
-
/**
|
|
20
|
-
* Interface for organization creation payload.
|
|
21
|
-
*/
|
|
22
|
-
export interface CreateOrganizationPayload {
|
|
23
|
-
/**
|
|
24
|
-
* Organization description.
|
|
25
|
-
*/
|
|
26
|
-
description: string;
|
|
27
|
-
/**
|
|
28
|
-
* Organization name.
|
|
29
|
-
*/
|
|
30
|
-
name: string;
|
|
31
|
-
/**
|
|
32
|
-
* Organization handle/slug.
|
|
33
|
-
*/
|
|
34
|
-
orgHandle?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Parent organization ID.
|
|
37
|
-
*/
|
|
38
|
-
parentId: string;
|
|
39
|
-
/**
|
|
40
|
-
* Organization type.
|
|
41
|
-
*/
|
|
42
|
-
type: 'TENANT';
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Configuration for the createOrganization request
|
|
46
|
-
*/
|
|
47
|
-
export interface CreateOrganizationConfig extends Omit<RequestInit, 'method' | 'body'> {
|
|
48
|
-
/**
|
|
49
|
-
* The base URL for the API endpoint.
|
|
50
|
-
*/
|
|
51
|
-
baseUrl: string;
|
|
52
|
-
/**
|
|
53
|
-
* Optional custom fetcher function.
|
|
54
|
-
* If not provided, native fetch will be used
|
|
55
|
-
*/
|
|
56
|
-
fetcher?: (url: string, config: RequestInit) => Promise<Response>;
|
|
57
|
-
/**
|
|
58
|
-
* Organization creation payload
|
|
59
|
-
*/
|
|
60
|
-
payload: CreateOrganizationPayload;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Creates a new organization.
|
|
64
|
-
*
|
|
65
|
-
* @param config - Configuration object containing baseUrl, payload and optional request config.
|
|
66
|
-
* @returns A promise that resolves with the created organization information.
|
|
67
|
-
* @example
|
|
68
|
-
* ```typescript
|
|
69
|
-
* // Using default fetch
|
|
70
|
-
* try {
|
|
71
|
-
* const organization = await createOrganization({
|
|
72
|
-
* baseUrl: "https://localhost:8090",
|
|
73
|
-
* payload: {
|
|
74
|
-
* description: "Share your screens",
|
|
75
|
-
* name: "Team Viewer",
|
|
76
|
-
* orgHandle: "team-viewer",
|
|
77
|
-
* parentId: "f4825104-4948-40d9-ab65-a960eee3e3d5",
|
|
78
|
-
* type: "TENANT"
|
|
79
|
-
* }
|
|
80
|
-
* });
|
|
81
|
-
* console.log(organization);
|
|
82
|
-
* } catch (error) {
|
|
83
|
-
* if (error instanceof ThunderIDAPIError) {
|
|
84
|
-
* console.error('Failed to create organization:', error.message);
|
|
85
|
-
* }
|
|
86
|
-
* }
|
|
87
|
-
* ```
|
|
88
|
-
*
|
|
89
|
-
* @example
|
|
90
|
-
* ```typescript
|
|
91
|
-
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
92
|
-
* try {
|
|
93
|
-
* const organization = await createOrganization({
|
|
94
|
-
* baseUrl: "https://localhost:8090",
|
|
95
|
-
* payload: {
|
|
96
|
-
* description: "Share your screens",
|
|
97
|
-
* name: "Team Viewer",
|
|
98
|
-
* orgHandle: "team-viewer",
|
|
99
|
-
* parentId: "f4825104-4948-40d9-ab65-a960eee3e3d5",
|
|
100
|
-
* type: "TENANT"
|
|
101
|
-
* },
|
|
102
|
-
* fetcher: async (url, config) => {
|
|
103
|
-
* const response = await httpClient({
|
|
104
|
-
* url,
|
|
105
|
-
* method: config.method,
|
|
106
|
-
* headers: config.headers,
|
|
107
|
-
* data: config.body,
|
|
108
|
-
* ...config
|
|
109
|
-
* });
|
|
110
|
-
* // Convert axios-like response to fetch-like Response
|
|
111
|
-
* return {
|
|
112
|
-
* ok: response.status >= 200 && response.status < 300,
|
|
113
|
-
* status: response.status,
|
|
114
|
-
* statusText: response.statusText,
|
|
115
|
-
* json: () => Promise.resolve(response.data),
|
|
116
|
-
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
117
|
-
* } as Response;
|
|
118
|
-
* }
|
|
119
|
-
* });
|
|
120
|
-
* console.log(organization);
|
|
121
|
-
* } catch (error) {
|
|
122
|
-
* if (error instanceof ThunderIDAPIError) {
|
|
123
|
-
* console.error('Failed to create organization:', error.message);
|
|
124
|
-
* }
|
|
125
|
-
* }
|
|
126
|
-
* ```
|
|
127
|
-
*/
|
|
128
|
-
declare const createOrganization: ({ baseUrl, payload, fetcher, ...requestConfig }: CreateOrganizationConfig) => Promise<Organization>;
|
|
129
|
-
export default createOrganization;
|
|
130
|
-
//# sourceMappingURL=createOrganization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createOrganization.d.ts","sourceRoot":"","sources":["../../src/api/createOrganization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,MAAM,CAAC;IACpF;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,OAAO,EAAE,yBAAyB,CAAC;CACpC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AACH,QAAA,MAAM,kBAAkB,GAAU,iDAK/B,wBAAwB,KAAG,OAAO,CAAC,YAAY,CA0EjD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { AllOrganizationsApiResponse } from '../models/organization';
|
|
19
|
-
/**
|
|
20
|
-
* Configuration for the getAllOrganizations request
|
|
21
|
-
*/
|
|
22
|
-
export interface GetAllOrganizationsConfig extends Omit<RequestInit, 'method'> {
|
|
23
|
-
/**
|
|
24
|
-
* The base URL for the API endpoint.
|
|
25
|
-
*/
|
|
26
|
-
baseUrl: string;
|
|
27
|
-
/**
|
|
28
|
-
* Optional custom fetcher function.
|
|
29
|
-
* If not provided, native fetch will be used
|
|
30
|
-
*/
|
|
31
|
-
fetcher?: (url: string, config: RequestInit) => Promise<Response>;
|
|
32
|
-
/**
|
|
33
|
-
* Filter expression for organizations
|
|
34
|
-
*/
|
|
35
|
-
filter?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Maximum number of organizations to return
|
|
38
|
-
*/
|
|
39
|
-
limit?: number;
|
|
40
|
-
/**
|
|
41
|
-
* Whether to include child organizations recursively
|
|
42
|
-
*/
|
|
43
|
-
recursive?: boolean;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Retrieves all organizations with pagination support.
|
|
47
|
-
*
|
|
48
|
-
* @param config - Configuration object containing baseUrl, optional query parameters, and request config.
|
|
49
|
-
* @returns A promise that resolves with the paginated organizations information.
|
|
50
|
-
* @example
|
|
51
|
-
* ```typescript
|
|
52
|
-
* // Using default fetch
|
|
53
|
-
* try {
|
|
54
|
-
* const response = await getAllOrganizations({
|
|
55
|
-
* baseUrl: "https://localhost:8090",
|
|
56
|
-
* filter: "",
|
|
57
|
-
* limit: 10,
|
|
58
|
-
* recursive: false
|
|
59
|
-
* });
|
|
60
|
-
* console.log(response.organizations);
|
|
61
|
-
* } catch (error) {
|
|
62
|
-
* if (error instanceof ThunderIDAPIError) {
|
|
63
|
-
* console.error('Failed to get organizations:', error.message);
|
|
64
|
-
* }
|
|
65
|
-
* }
|
|
66
|
-
* ```
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```typescript
|
|
70
|
-
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
71
|
-
* try {
|
|
72
|
-
* const response = await getAllOrganizations({
|
|
73
|
-
* baseUrl: "https://localhost:8090",
|
|
74
|
-
* filter: "",
|
|
75
|
-
* limit: 10,
|
|
76
|
-
* recursive: false,
|
|
77
|
-
* fetcher: async (url, config) => {
|
|
78
|
-
* const response = await httpClient({
|
|
79
|
-
* url,
|
|
80
|
-
* method: config.method,
|
|
81
|
-
* headers: config.headers,
|
|
82
|
-
* ...config
|
|
83
|
-
* });
|
|
84
|
-
* // Convert axios-like response to fetch-like Response
|
|
85
|
-
* return {
|
|
86
|
-
* ok: response.status >= 200 && response.status < 300,
|
|
87
|
-
* status: response.status,
|
|
88
|
-
* statusText: response.statusText,
|
|
89
|
-
* json: () => Promise.resolve(response.data),
|
|
90
|
-
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
91
|
-
* } as Response;
|
|
92
|
-
* }
|
|
93
|
-
* });
|
|
94
|
-
* console.log(response.organizations);
|
|
95
|
-
* } catch (error) {
|
|
96
|
-
* if (error instanceof ThunderIDAPIError) {
|
|
97
|
-
* console.error('Failed to get organizations:', error.message);
|
|
98
|
-
* }
|
|
99
|
-
* }
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
declare const getAllOrganizations: ({ baseUrl, filter, limit, recursive, fetcher, ...requestConfig }: GetAllOrganizationsConfig) => Promise<AllOrganizationsApiResponse>;
|
|
103
|
-
export default getAllOrganizations;
|
|
104
|
-
//# sourceMappingURL=getAllOrganizations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAllOrganizations.d.ts","sourceRoot":"","sources":["../../src/api/getAllOrganizations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC;IAC5E;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,QAAA,MAAM,mBAAmB,GAAU,kEAOhC,yBAAyB,KAAG,OAAO,CAAC,2BAA2B,CA0EjE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { BrandingPreference } from '../models/branding-preference';
|
|
19
|
-
/**
|
|
20
|
-
* Configuration for the getBrandingPreference request
|
|
21
|
-
*/
|
|
22
|
-
export interface GetBrandingPreferenceConfig extends Omit<RequestInit, 'method'> {
|
|
23
|
-
/**
|
|
24
|
-
* The base URL for the API endpoint.
|
|
25
|
-
*/
|
|
26
|
-
baseUrl: string;
|
|
27
|
-
/**
|
|
28
|
-
* Optional custom fetcher function.
|
|
29
|
-
* If not provided, native fetch will be used
|
|
30
|
-
*/
|
|
31
|
-
fetcher?: (url: string, config: RequestInit) => Promise<Response>;
|
|
32
|
-
/**
|
|
33
|
-
* Locale for the branding preference
|
|
34
|
-
*/
|
|
35
|
-
locale?: string;
|
|
36
|
-
/**
|
|
37
|
-
* Name of the branding preference
|
|
38
|
-
*/
|
|
39
|
-
name?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Type of the branding preference
|
|
42
|
-
*/
|
|
43
|
-
type?: string;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Retrieves branding preference configuration.
|
|
47
|
-
*
|
|
48
|
-
* @param config - Configuration object containing baseUrl, optional query parameters, and request config.
|
|
49
|
-
* @returns A promise that resolves with the branding preference information.
|
|
50
|
-
* @example
|
|
51
|
-
* ```typescript
|
|
52
|
-
* // Using default fetch
|
|
53
|
-
* try {
|
|
54
|
-
* const response = await getBrandingPreference({
|
|
55
|
-
* baseUrl: "https://localhost:8090",
|
|
56
|
-
* locale: "en-US",
|
|
57
|
-
* name: "my-branding",
|
|
58
|
-
* type: "org"
|
|
59
|
-
* });
|
|
60
|
-
* console.log(response.theme);
|
|
61
|
-
* } catch (error) {
|
|
62
|
-
* if (error instanceof ThunderIDAPIError) {
|
|
63
|
-
* console.error('Failed to get branding preference:', error.message);
|
|
64
|
-
* }
|
|
65
|
-
* }
|
|
66
|
-
* ```
|
|
67
|
-
*
|
|
68
|
-
* @example
|
|
69
|
-
* ```typescript
|
|
70
|
-
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
71
|
-
* try {
|
|
72
|
-
* const response = await getBrandingPreference({
|
|
73
|
-
* baseUrl: "https://localhost:8090",
|
|
74
|
-
* locale: "en-US",
|
|
75
|
-
* name: "my-branding",
|
|
76
|
-
* type: "org",
|
|
77
|
-
* fetcher: async (url, config) => {
|
|
78
|
-
* const response = await httpClient({
|
|
79
|
-
* url,
|
|
80
|
-
* method: config.method,
|
|
81
|
-
* headers: config.headers,
|
|
82
|
-
* ...config
|
|
83
|
-
* });
|
|
84
|
-
* // Convert axios-like response to fetch-like Response
|
|
85
|
-
* return {
|
|
86
|
-
* ok: response.status >= 200 && response.status < 300,
|
|
87
|
-
* status: response.status,
|
|
88
|
-
* statusText: response.statusText,
|
|
89
|
-
* json: () => Promise.resolve(response.data),
|
|
90
|
-
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
91
|
-
* } as Response;
|
|
92
|
-
* }
|
|
93
|
-
* });
|
|
94
|
-
* console.log(response.theme);
|
|
95
|
-
* } catch (error) {
|
|
96
|
-
* if (error instanceof ThunderIDAPIError) {
|
|
97
|
-
* console.error('Failed to get branding preference:', error.message);
|
|
98
|
-
* }
|
|
99
|
-
* }
|
|
100
|
-
* ```
|
|
101
|
-
*/
|
|
102
|
-
declare const getBrandingPreference: ({ baseUrl, locale, name, type, fetcher, ...requestConfig }: GetBrandingPreferenceConfig) => Promise<BrandingPreference>;
|
|
103
|
-
export default getBrandingPreference;
|
|
104
|
-
//# sourceMappingURL=getBrandingPreference.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getBrandingPreference.d.ts","sourceRoot":"","sources":["../../src/api/getBrandingPreference.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,kBAAkB,EAAC,MAAM,+BAA+B,CAAC;AAGjE;;GAEG;AACH,MAAM,WAAW,2BAA4B,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC;IAC9E;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,QAAA,MAAM,qBAAqB,GAAU,4DAOlC,2BAA2B,KAAG,OAAO,CAAC,kBAAkB,CAqF1D,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { Organization } from '../models/organization';
|
|
19
|
-
/**
|
|
20
|
-
* Configuration for the getMeOrganizations request
|
|
21
|
-
*/
|
|
22
|
-
export interface GetMeOrganizationsConfig extends Omit<RequestInit, 'method'> {
|
|
23
|
-
/**
|
|
24
|
-
* Base64 encoded cursor value for forward pagination
|
|
25
|
-
*/
|
|
26
|
-
after?: string;
|
|
27
|
-
/**
|
|
28
|
-
* Authorized application name filter
|
|
29
|
-
*/
|
|
30
|
-
authorizedAppName?: string;
|
|
31
|
-
/**
|
|
32
|
-
* The base URL for the API endpoint.
|
|
33
|
-
*/
|
|
34
|
-
baseUrl: string;
|
|
35
|
-
/**
|
|
36
|
-
* Base64 encoded cursor value for backward pagination
|
|
37
|
-
*/
|
|
38
|
-
before?: string;
|
|
39
|
-
/**
|
|
40
|
-
* Optional custom fetcher function.
|
|
41
|
-
* If not provided, native fetch will be used
|
|
42
|
-
*/
|
|
43
|
-
fetcher?: (url: string, config: RequestInit) => Promise<Response>;
|
|
44
|
-
/**
|
|
45
|
-
* Filter expression for organizations
|
|
46
|
-
*/
|
|
47
|
-
filter?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Maximum number of organizations to return
|
|
50
|
-
*/
|
|
51
|
-
limit?: number;
|
|
52
|
-
/**
|
|
53
|
-
* Whether to include child organizations recursively
|
|
54
|
-
*/
|
|
55
|
-
recursive?: boolean;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Retrieves the organizations associated with the current user.
|
|
59
|
-
*
|
|
60
|
-
* @param config - Configuration object containing baseUrl, optional query parameters, and request config.
|
|
61
|
-
* @returns A promise that resolves with the organizations information.
|
|
62
|
-
* @example
|
|
63
|
-
* ```typescript
|
|
64
|
-
* // Using default fetch
|
|
65
|
-
* try {
|
|
66
|
-
* const organizations = await getMeOrganizations({
|
|
67
|
-
* baseUrl: "https://localhost:8090",
|
|
68
|
-
* after: "",
|
|
69
|
-
* before: "",
|
|
70
|
-
* filter: "",
|
|
71
|
-
* limit: 10,
|
|
72
|
-
* recursive: false
|
|
73
|
-
* });
|
|
74
|
-
* console.log(organizations);
|
|
75
|
-
* } catch (error) {
|
|
76
|
-
* if (error instanceof ThunderIDAPIError) {
|
|
77
|
-
* console.error('Failed to get organizations:', error.message);
|
|
78
|
-
* }
|
|
79
|
-
* }
|
|
80
|
-
* ```
|
|
81
|
-
*
|
|
82
|
-
* @example
|
|
83
|
-
* ```typescript
|
|
84
|
-
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
85
|
-
* try {
|
|
86
|
-
* const organizations = await getMeOrganizations({
|
|
87
|
-
* baseUrl: "https://localhost:8090",
|
|
88
|
-
* after: "",
|
|
89
|
-
* before: "",
|
|
90
|
-
* filter: "",
|
|
91
|
-
* limit: 10,
|
|
92
|
-
* recursive: false,
|
|
93
|
-
* fetcher: async (url, config) => {
|
|
94
|
-
* const response = await httpClient({
|
|
95
|
-
* url,
|
|
96
|
-
* method: config.method,
|
|
97
|
-
* headers: config.headers,
|
|
98
|
-
* ...config
|
|
99
|
-
* });
|
|
100
|
-
* // Convert axios-like response to fetch-like Response
|
|
101
|
-
* return {
|
|
102
|
-
* ok: response.status >= 200 && response.status < 300,
|
|
103
|
-
* status: response.status,
|
|
104
|
-
* statusText: response.statusText,
|
|
105
|
-
* json: () => Promise.resolve(response.data),
|
|
106
|
-
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
107
|
-
* } as Response;
|
|
108
|
-
* }
|
|
109
|
-
* });
|
|
110
|
-
* console.log(organizations);
|
|
111
|
-
* } catch (error) {
|
|
112
|
-
* if (error instanceof ThunderIDAPIError) {
|
|
113
|
-
* console.error('Failed to get organizations:', error.message);
|
|
114
|
-
* }
|
|
115
|
-
* }
|
|
116
|
-
* ```
|
|
117
|
-
*/
|
|
118
|
-
declare const getMeOrganizations: ({ baseUrl, after, authorizedAppName, before, filter, limit, recursive, fetcher, ...requestConfig }: GetMeOrganizationsConfig) => Promise<Organization[]>;
|
|
119
|
-
export default getMeOrganizations;
|
|
120
|
-
//# sourceMappingURL=getMeOrganizations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getMeOrganizations.d.ts","sourceRoot":"","sources":["../../src/api/getMeOrganizations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,YAAY,EAAC,MAAM,wBAAwB,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC;IAC3E;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,QAAA,MAAM,kBAAkB,GAAU,oGAU/B,wBAAwB,KAAG,OAAO,CAAC,YAAY,EAAE,CAuEnD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|