@thunderid/javascript 0.0.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.
- package/LICENSE +201 -0
- package/dist/DefaultCacheStore.d.ts +31 -0
- package/dist/DefaultCacheStore.d.ts.map +1 -0
- package/dist/DefaultCrypto.d.ts +30 -0
- package/dist/DefaultCrypto.d.ts.map +1 -0
- package/dist/HttpClient.d.ts +65 -0
- package/dist/HttpClient.d.ts.map +1 -0
- package/dist/IsomorphicCrypto.d.ts +64 -0
- package/dist/IsomorphicCrypto.d.ts.map +1 -0
- package/dist/StorageManager.d.ts +66 -0
- package/dist/StorageManager.d.ts.map +1 -0
- package/dist/ThunderIDJavaScriptClient.d.ts +66 -0
- package/dist/ThunderIDJavaScriptClient.d.ts.map +1 -0
- package/dist/__legacy__/client.d.ts +485 -0
- package/dist/__legacy__/client.d.ts.map +1 -0
- package/dist/__legacy__/helpers/authentication-helper.d.ts +38 -0
- package/dist/__legacy__/helpers/authentication-helper.d.ts.map +1 -0
- package/dist/__legacy__/helpers/index.d.ts +19 -0
- package/dist/__legacy__/helpers/index.d.ts.map +1 -0
- package/dist/__legacy__/models/client-config.d.ts +106 -0
- package/dist/__legacy__/models/client-config.d.ts.map +1 -0
- package/dist/__legacy__/models/index.d.ts +19 -0
- package/dist/__legacy__/models/index.d.ts.map +1 -0
- package/dist/api/createOrganization.d.ts +130 -0
- package/dist/api/createOrganization.d.ts.map +1 -0
- package/dist/api/executeEmbeddedSignInFlow.d.ts +22 -0
- package/dist/api/executeEmbeddedSignInFlow.d.ts.map +1 -0
- package/dist/api/executeEmbeddedSignUpFlow.d.ts +45 -0
- package/dist/api/executeEmbeddedSignUpFlow.d.ts.map +1 -0
- package/dist/api/getAllOrganizations.d.ts +104 -0
- package/dist/api/getAllOrganizations.d.ts.map +1 -0
- package/dist/api/getBrandingPreference.d.ts +104 -0
- package/dist/api/getBrandingPreference.d.ts.map +1 -0
- package/dist/api/getMeOrganizations.d.ts +120 -0
- package/dist/api/getMeOrganizations.d.ts.map +1 -0
- package/dist/api/getOrganization.d.ts +110 -0
- package/dist/api/getOrganization.d.ts.map +1 -0
- package/dist/api/getSchemas.d.ts +90 -0
- package/dist/api/getSchemas.d.ts.map +1 -0
- package/dist/api/getScim2Me.d.ts +90 -0
- package/dist/api/getScim2Me.d.ts.map +1 -0
- package/dist/api/getUserInfo.d.ts +38 -0
- package/dist/api/getUserInfo.d.ts.map +1 -0
- package/dist/api/initializeEmbeddedSignInFlow.d.ts +52 -0
- package/dist/api/initializeEmbeddedSignInFlow.d.ts.map +1 -0
- package/dist/api/updateMeProfile.d.ts +83 -0
- package/dist/api/updateMeProfile.d.ts.map +1 -0
- package/dist/api/updateOrganization.d.ts +119 -0
- package/dist/api/updateOrganization.d.ts.map +1 -0
- package/dist/api/v2/executeEmbeddedRecoveryFlowV2.d.ts +57 -0
- package/dist/api/v2/executeEmbeddedRecoveryFlowV2.d.ts.map +1 -0
- package/dist/api/v2/executeEmbeddedSignInFlowV2.d.ts +22 -0
- package/dist/api/v2/executeEmbeddedSignInFlowV2.d.ts.map +1 -0
- package/dist/api/v2/executeEmbeddedSignUpFlowV2.d.ts +22 -0
- package/dist/api/v2/executeEmbeddedSignUpFlowV2.d.ts.map +1 -0
- package/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts +89 -0
- package/dist/api/v2/executeEmbeddedUserOnboardingFlowV2.d.ts.map +1 -0
- package/dist/api/v2/getFlowMetaV2.d.ts +56 -0
- package/dist/api/v2/getFlowMetaV2.d.ts.map +1 -0
- package/dist/api/v2/getOrganizationUnitChildren.d.ts +43 -0
- package/dist/api/v2/getOrganizationUnitChildren.d.ts.map +1 -0
- package/dist/cjs/index.cjs +7693 -0
- package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts +40 -0
- package/dist/constants/ApplicationNativeAuthenticationConstants.d.ts.map +1 -0
- package/dist/constants/OIDCDiscoveryConstants.d.ts +65 -0
- package/dist/constants/OIDCDiscoveryConstants.d.ts.map +1 -0
- package/dist/constants/OIDCRequestConstants.d.ts +43 -0
- package/dist/constants/OIDCRequestConstants.d.ts.map +1 -0
- package/dist/constants/PKCEConstants.d.ts +45 -0
- package/dist/constants/PKCEConstants.d.ts.map +1 -0
- package/dist/constants/ScopeConstants.d.ts +43 -0
- package/dist/constants/ScopeConstants.d.ts.map +1 -0
- package/dist/constants/TokenConstants.d.ts +48 -0
- package/dist/constants/TokenConstants.d.ts.map +1 -0
- package/dist/constants/TokenExchangeConstants.d.ts +44 -0
- package/dist/constants/TokenExchangeConstants.d.ts.map +1 -0
- package/dist/constants/VendorConstants.d.ts +32 -0
- package/dist/constants/VendorConstants.d.ts.map +1 -0
- package/dist/constants/v2/OIDCDiscoveryConstants.d.ts +40 -0
- package/dist/constants/v2/OIDCDiscoveryConstants.d.ts.map +1 -0
- package/dist/edge/index.js +7568 -0
- package/dist/errors/ThunderIDAPIError.d.ts +59 -0
- package/dist/errors/ThunderIDAPIError.d.ts.map +1 -0
- package/dist/errors/ThunderIDError.d.ts +50 -0
- package/dist/errors/ThunderIDError.d.ts.map +1 -0
- package/dist/errors/ThunderIDRuntimeError.d.ts +51 -0
- package/dist/errors/ThunderIDRuntimeError.d.ts.map +1 -0
- package/dist/errors/exception.d.ts +27 -0
- package/dist/errors/exception.d.ts.map +1 -0
- package/dist/i18n/constants/TranslationBundleConstants.d.ts +35 -0
- package/dist/i18n/constants/TranslationBundleConstants.d.ts.map +1 -0
- package/dist/i18n/models/i18n.d.ts +127 -0
- package/dist/i18n/models/i18n.d.ts.map +1 -0
- package/dist/i18n/translations/en-US.d.ts +21 -0
- package/dist/i18n/translations/en-US.d.ts.map +1 -0
- package/dist/i18n/translations/fr-FR.d.ts +21 -0
- package/dist/i18n/translations/fr-FR.d.ts.map +1 -0
- package/dist/i18n/translations/hi-IN.d.ts +21 -0
- package/dist/i18n/translations/hi-IN.d.ts.map +1 -0
- package/dist/i18n/translations/index.d.ts +26 -0
- package/dist/i18n/translations/index.d.ts.map +1 -0
- package/dist/i18n/translations/ja-JP.d.ts +21 -0
- package/dist/i18n/translations/ja-JP.d.ts.map +1 -0
- package/dist/i18n/translations/pt-BR.d.ts +21 -0
- package/dist/i18n/translations/pt-BR.d.ts.map +1 -0
- package/dist/i18n/translations/pt-PT.d.ts +21 -0
- package/dist/i18n/translations/pt-PT.d.ts.map +1 -0
- package/dist/i18n/translations/si-LK.d.ts +21 -0
- package/dist/i18n/translations/si-LK.d.ts.map +1 -0
- package/dist/i18n/translations/ta-IN.d.ts +21 -0
- package/dist/i18n/translations/ta-IN.d.ts.map +1 -0
- package/dist/i18n/translations/te-IN.d.ts +21 -0
- package/dist/i18n/translations/te-IN.d.ts.map +1 -0
- package/dist/i18n/utils/getDefaultI18nBundles.d.ts +28 -0
- package/dist/i18n/utils/getDefaultI18nBundles.d.ts.map +1 -0
- package/dist/i18n/utils/normalizeTranslations.d.ts +42 -0
- package/dist/i18n/utils/normalizeTranslations.d.ts.map +1 -0
- package/dist/index.d.ts +143 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7568 -0
- package/dist/models/agent.d.ts +45 -0
- package/dist/models/agent.d.ts.map +1 -0
- package/dist/models/auth-code-response.d.ts +35 -0
- package/dist/models/auth-code-response.d.ts.map +1 -0
- package/dist/models/branding-preference.d.ts +249 -0
- package/dist/models/branding-preference.d.ts.map +1 -0
- package/dist/models/client.d.ts +213 -0
- package/dist/models/client.d.ts.map +1 -0
- package/dist/models/config.d.ts +483 -0
- package/dist/models/config.d.ts.map +1 -0
- package/dist/models/crypto.d.ts +101 -0
- package/dist/models/crypto.d.ts.map +1 -0
- package/dist/models/embedded-flow.d.ts +167 -0
- package/dist/models/embedded-flow.d.ts.map +1 -0
- package/dist/models/embedded-signin-flow.d.ts +100 -0
- package/dist/models/embedded-signin-flow.d.ts.map +1 -0
- package/dist/models/field.d.ts +32 -0
- package/dist/models/field.d.ts.map +1 -0
- package/dist/models/flow.d.ts +31 -0
- package/dist/models/flow.d.ts.map +1 -0
- package/dist/models/http.d.ts +46 -0
- package/dist/models/http.d.ts.map +1 -0
- package/dist/models/oauth-request.d.ts +24 -0
- package/dist/models/oauth-request.d.ts.map +1 -0
- package/dist/models/oauth-response.d.ts +19 -0
- package/dist/models/oauth-response.d.ts.map +1 -0
- package/dist/models/oidc-discovery.d.ts +370 -0
- package/dist/models/oidc-discovery.d.ts.map +1 -0
- package/dist/models/oidc-endpoints.d.ts +72 -0
- package/dist/models/oidc-endpoints.d.ts.map +1 -0
- package/dist/models/organization.d.ts +34 -0
- package/dist/models/organization.d.ts.map +1 -0
- package/dist/models/platforms.d.ts +38 -0
- package/dist/models/platforms.d.ts.map +1 -0
- package/dist/models/scim2-schema.d.ts +66 -0
- package/dist/models/scim2-schema.d.ts.map +1 -0
- package/dist/models/session.d.ts +32 -0
- package/dist/models/session.d.ts.map +1 -0
- package/dist/models/store.d.ts +84 -0
- package/dist/models/store.d.ts.map +1 -0
- package/dist/models/token-endpoint-auth.d.ts +30 -0
- package/dist/models/token-endpoint-auth.d.ts.map +1 -0
- package/dist/models/token.d.ts +181 -0
- package/dist/models/token.d.ts.map +1 -0
- package/dist/models/user.d.ts +34 -0
- package/dist/models/user.d.ts.map +1 -0
- package/dist/models/utility-types.d.ts +21 -0
- package/dist/models/utility-types.d.ts.map +1 -0
- package/dist/models/v2/embedded-flow-v2.d.ts +494 -0
- package/dist/models/v2/embedded-flow-v2.d.ts.map +1 -0
- package/dist/models/v2/embedded-recovery-flow-v2.d.ts +143 -0
- package/dist/models/v2/embedded-recovery-flow-v2.d.ts.map +1 -0
- package/dist/models/v2/embedded-signin-flow-v2.d.ts +340 -0
- package/dist/models/v2/embedded-signin-flow-v2.d.ts.map +1 -0
- package/dist/models/v2/embedded-signup-flow-v2.d.ts +272 -0
- package/dist/models/v2/embedded-signup-flow-v2.d.ts.map +1 -0
- package/dist/models/v2/extensions/components.d.ts +89 -0
- package/dist/models/v2/extensions/components.d.ts.map +1 -0
- package/dist/models/v2/flow-meta-v2.d.ts +299 -0
- package/dist/models/v2/flow-meta-v2.d.ts.map +1 -0
- package/dist/models/v2/organization-unit.d.ts +103 -0
- package/dist/models/v2/organization-unit.d.ts.map +1 -0
- package/dist/models/v2/translation.d.ts +35 -0
- package/dist/models/v2/translation.d.ts.map +1 -0
- package/dist/models/v2/vars.d.ts +36 -0
- package/dist/models/v2/vars.d.ts.map +1 -0
- package/dist/theme/createTheme.d.ts +23 -0
- package/dist/theme/createTheme.d.ts.map +1 -0
- package/dist/theme/types.d.ts +381 -0
- package/dist/theme/types.d.ts.map +1 -0
- package/dist/utils/arrayBufferToBase64url.d.ts +49 -0
- package/dist/utils/arrayBufferToBase64url.d.ts.map +1 -0
- package/dist/utils/base64Encode.d.ts +36 -0
- package/dist/utils/base64Encode.d.ts.map +1 -0
- package/dist/utils/base64urlToArrayBuffer.d.ts +56 -0
- package/dist/utils/base64urlToArrayBuffer.d.ts.map +1 -0
- package/dist/utils/bem.d.ts +47 -0
- package/dist/utils/bem.d.ts.map +1 -0
- package/dist/utils/deepMerge.d.ts +45 -0
- package/dist/utils/deepMerge.d.ts.map +1 -0
- package/dist/utils/deriveOrganizationHandleFromBaseUrl.d.ts +48 -0
- package/dist/utils/deriveOrganizationHandleFromBaseUrl.d.ts.map +1 -0
- package/dist/utils/extractPkceStorageKeyFromState.d.ts +33 -0
- package/dist/utils/extractPkceStorageKeyFromState.d.ts.map +1 -0
- package/dist/utils/extractTenantDomainFromIdTokenPayload.d.ts +32 -0
- package/dist/utils/extractTenantDomainFromIdTokenPayload.d.ts.map +1 -0
- package/dist/utils/extractUserClaimsFromIdToken.d.ts +47 -0
- package/dist/utils/extractUserClaimsFromIdToken.d.ts.map +1 -0
- package/dist/utils/flattenUserSchema.d.ts +65 -0
- package/dist/utils/flattenUserSchema.d.ts.map +1 -0
- package/dist/utils/formatDate.d.ts +34 -0
- package/dist/utils/formatDate.d.ts.map +1 -0
- package/dist/utils/generateFlattenedUserProfile.d.ts +54 -0
- package/dist/utils/generateFlattenedUserProfile.d.ts.map +1 -0
- package/dist/utils/generatePkceStorageKey.d.ts +35 -0
- package/dist/utils/generatePkceStorageKey.d.ts.map +1 -0
- package/dist/utils/generateStateParamForRequestCorrelation.d.ts +35 -0
- package/dist/utils/generateStateParamForRequestCorrelation.d.ts.map +1 -0
- package/dist/utils/generateUserProfile.d.ts +56 -0
- package/dist/utils/generateUserProfile.d.ts.map +1 -0
- package/dist/utils/get.d.ts +30 -0
- package/dist/utils/get.d.ts.map +1 -0
- package/dist/utils/getAuthorizeRequestUrlParams.d.ts +61 -0
- package/dist/utils/getAuthorizeRequestUrlParams.d.ts.map +1 -0
- package/dist/utils/getLatestStateParam.d.ts +41 -0
- package/dist/utils/getLatestStateParam.d.ts.map +1 -0
- package/dist/utils/getRedirectBasedSignUpUrl.d.ts +30 -0
- package/dist/utils/getRedirectBasedSignUpUrl.d.ts.map +1 -0
- package/dist/utils/identifyPlatform.d.ts +31 -0
- package/dist/utils/identifyPlatform.d.ts.map +1 -0
- package/dist/utils/isEmpty.d.ts +49 -0
- package/dist/utils/isEmpty.d.ts.map +1 -0
- package/dist/utils/isRecognizedBaseUrlPattern.d.ts +33 -0
- package/dist/utils/isRecognizedBaseUrlPattern.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +143 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/parseApiErrorMessage.d.ts +29 -0
- package/dist/utils/parseApiErrorMessage.d.ts.map +1 -0
- package/dist/utils/processOpenIDScopes.d.ts +42 -0
- package/dist/utils/processOpenIDScopes.d.ts.map +1 -0
- package/dist/utils/processUsername.d.ts +74 -0
- package/dist/utils/processUsername.d.ts.map +1 -0
- package/dist/utils/removeTrailingSlash.d.ts +32 -0
- package/dist/utils/removeTrailingSlash.d.ts.map +1 -0
- package/dist/utils/resolveFieldName.d.ts +20 -0
- package/dist/utils/resolveFieldName.d.ts.map +1 -0
- package/dist/utils/resolveFieldType.d.ts +21 -0
- package/dist/utils/resolveFieldType.d.ts.map +1 -0
- package/dist/utils/set.d.ts +31 -0
- package/dist/utils/set.d.ts.map +1 -0
- package/dist/utils/transformBrandingPreferenceToTheme.d.ts +49 -0
- package/dist/utils/transformBrandingPreferenceToTheme.d.ts.map +1 -0
- package/dist/utils/v2/containsMetaFlowTemplateLiteral.d.ts +57 -0
- package/dist/utils/v2/containsMetaFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/v2/countryCodeToFlagEmoji.d.ts +26 -0
- package/dist/utils/v2/countryCodeToFlagEmoji.d.ts.map +1 -0
- package/dist/utils/v2/extractEmojiFromUri.d.ts +32 -0
- package/dist/utils/v2/extractEmojiFromUri.d.ts.map +1 -0
- package/dist/utils/v2/isEmojiUri.d.ts +34 -0
- package/dist/utils/v2/isEmojiUri.d.ts.map +1 -0
- package/dist/utils/v2/isMetaFlowTemplateLiteral.d.ts +45 -0
- package/dist/utils/v2/isMetaFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/v2/isTranslationFlowTemplateLiteral.d.ts +45 -0
- package/dist/utils/v2/isTranslationFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/v2/parseFlowTemplateLiteral.d.ts +96 -0
- package/dist/utils/v2/parseFlowTemplateLiteral.d.ts.map +1 -0
- package/dist/utils/v2/resolveFlowTemplateLiterals.d.ts +42 -0
- package/dist/utils/v2/resolveFlowTemplateLiterals.d.ts.map +1 -0
- package/dist/utils/v2/resolveLocaleDisplayName.d.ts +30 -0
- package/dist/utils/v2/resolveLocaleDisplayName.d.ts.map +1 -0
- package/dist/utils/v2/resolveLocaleEmoji.d.ts +31 -0
- package/dist/utils/v2/resolveLocaleEmoji.d.ts.map +1 -0
- package/dist/utils/v2/resolveMeta.d.ts +35 -0
- package/dist/utils/v2/resolveMeta.d.ts.map +1 -0
- package/dist/utils/withVendorCSSClassPrefix.d.ts +33 -0
- package/dist/utils/withVendorCSSClassPrefix.d.ts.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getOrganization.d.ts","sourceRoot":"","sources":["../../src/api/getOrganization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC;IACxE;;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,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,QAAA,MAAM,eAAe,GAAU,wDAK5B,qBAAqB,KAAG,OAAO,CAAC,mBAAmB,CAmErD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { Schema } from '../models/scim2-schema';
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for the getSchemas request
|
|
21
|
+
*/
|
|
22
|
+
export interface GetSchemasConfig extends Omit<RequestInit, 'method'> {
|
|
23
|
+
/**
|
|
24
|
+
* The base path of 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
|
+
* The absolute API endpoint.
|
|
34
|
+
*/
|
|
35
|
+
url?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the SCIM2 schemas from the specified endpoint.
|
|
39
|
+
*
|
|
40
|
+
* @param config - Request configuration object.
|
|
41
|
+
* @returns A promise that resolves with the SCIM2 schemas information.
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* // Using default fetch
|
|
45
|
+
* try {
|
|
46
|
+
* const schemas = await getSchemas({
|
|
47
|
+
* url: "https://api.asgardeo.io/t/<ORGANIZATION>/scim2/Schemas",
|
|
48
|
+
* });
|
|
49
|
+
* console.log(schemas);
|
|
50
|
+
* } catch (error) {
|
|
51
|
+
* if (error instanceof ThunderIDAPIError) {
|
|
52
|
+
* console.error('Failed to get schemas:', error.message);
|
|
53
|
+
* }
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
60
|
+
* try {
|
|
61
|
+
* const schemas = await getSchemas({
|
|
62
|
+
* url: "https://api.asgardeo.io/t/<ORGANIZATION>/scim2/Schemas",
|
|
63
|
+
* fetcher: async (url, config) => {
|
|
64
|
+
* const response = await httpClient({
|
|
65
|
+
* url,
|
|
66
|
+
* method: config.method,
|
|
67
|
+
* headers: config.headers,
|
|
68
|
+
* ...config
|
|
69
|
+
* });
|
|
70
|
+
* // Convert axios-like response to fetch-like Response
|
|
71
|
+
* return {
|
|
72
|
+
* ok: response.status >= 200 && response.status < 300,
|
|
73
|
+
* status: response.status,
|
|
74
|
+
* statusText: response.statusText,
|
|
75
|
+
* json: () => Promise.resolve(response.data),
|
|
76
|
+
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
77
|
+
* } as Response;
|
|
78
|
+
* }
|
|
79
|
+
* });
|
|
80
|
+
* console.log(schemas);
|
|
81
|
+
* } catch (error) {
|
|
82
|
+
* if (error instanceof ThunderIDAPIError) {
|
|
83
|
+
* console.error('Failed to get schemas:', error.message);
|
|
84
|
+
* }
|
|
85
|
+
* }
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
declare const getSchemas: ({ url, baseUrl, fetcher, ...requestConfig }: GetSchemasConfig) => Promise<Schema[]>;
|
|
89
|
+
export default getSchemas;
|
|
90
|
+
//# sourceMappingURL=getSchemas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getSchemas.d.ts","sourceRoot":"","sources":["../../src/api/getSchemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,MAAM,EAAC,MAAM,wBAAwB,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC;IACnE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,QAAA,MAAM,UAAU,GAAU,6CAA2C,gBAAgB,KAAG,OAAO,CAAC,MAAM,EAAE,CAyDvG,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
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 { User } from '../models/user';
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for the getScim2Me request
|
|
21
|
+
*/
|
|
22
|
+
export interface GetScim2MeConfig extends Omit<RequestInit, 'method'> {
|
|
23
|
+
/**
|
|
24
|
+
* The base path of 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
|
+
* The absolute API endpoint.
|
|
34
|
+
*/
|
|
35
|
+
url?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Retrieves the user profile information from the specified SCIM2 /Me endpoint.
|
|
39
|
+
*
|
|
40
|
+
* @param config - Request configuration object.
|
|
41
|
+
* @returns A promise that resolves with the user profile information.
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* // Using default fetch
|
|
45
|
+
* try {
|
|
46
|
+
* const userProfile = await getScim2Me({
|
|
47
|
+
* url: "https://api.asgardeo.io/t/<ORGANIZATION>/scim2/Me",
|
|
48
|
+
* });
|
|
49
|
+
* console.log(userProfile);
|
|
50
|
+
* } catch (error) {
|
|
51
|
+
* if (error instanceof ThunderIDAPIError) {
|
|
52
|
+
* console.error('Failed to get user profile:', error.message);
|
|
53
|
+
* }
|
|
54
|
+
* }
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```typescript
|
|
59
|
+
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
60
|
+
* try {
|
|
61
|
+
* const userProfile = await getScim2Me({
|
|
62
|
+
* url: "https://api.asgardeo.io/t/<ORGANIZATION>/scim2/Me",
|
|
63
|
+
* fetcher: async (url, config) => {
|
|
64
|
+
* const response = await httpClient({
|
|
65
|
+
* url,
|
|
66
|
+
* method: config.method,
|
|
67
|
+
* headers: config.headers,
|
|
68
|
+
* ...config
|
|
69
|
+
* });
|
|
70
|
+
* // Convert axios-like response to fetch-like Response
|
|
71
|
+
* return {
|
|
72
|
+
* ok: response.status >= 200 && response.status < 300,
|
|
73
|
+
* status: response.status,
|
|
74
|
+
* statusText: response.statusText,
|
|
75
|
+
* json: () => Promise.resolve(response.data),
|
|
76
|
+
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
77
|
+
* } as Response;
|
|
78
|
+
* }
|
|
79
|
+
* });
|
|
80
|
+
* console.log(userProfile);
|
|
81
|
+
* } catch (error) {
|
|
82
|
+
* if (error instanceof ThunderIDAPIError) {
|
|
83
|
+
* console.error('Failed to get user profile:', error.message);
|
|
84
|
+
* }
|
|
85
|
+
* }
|
|
86
|
+
* ```
|
|
87
|
+
*/
|
|
88
|
+
declare const getScim2Me: ({ url, baseUrl, fetcher, ...requestConfig }: GetScim2MeConfig) => Promise<User>;
|
|
89
|
+
export default getScim2Me;
|
|
90
|
+
//# sourceMappingURL=getScim2Me.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getScim2Me.d.ts","sourceRoot":"","sources":["../../src/api/getScim2Me.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAGpC;;GAEG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC;IACnE;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDG;AACH,QAAA,MAAM,UAAU,GAAU,6CAA2C,gBAAgB,KAAG,OAAO,CAAC,IAAI,CA2DnG,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
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 { User } from '../models/user';
|
|
19
|
+
/**
|
|
20
|
+
* Retrieves the user information from the specified OIDC userinfo endpoint.
|
|
21
|
+
*
|
|
22
|
+
* @param requestConfig - Request configuration object.
|
|
23
|
+
* @returns A promise that resolves with the user information.
|
|
24
|
+
* @throw
|
|
25
|
+
* const userInfo = await getUserInfo({
|
|
26
|
+
* url: "https://api.asgardeo.io/t/<ORGANIZATION>/oauth2/userinfo",
|
|
27
|
+
* });
|
|
28
|
+
* console.log(userInfo);
|
|
29
|
+
* } catch (error) {
|
|
30
|
+
* if (error instanceof ThunderIDAPIError) {
|
|
31
|
+
* console.error('Failed to get user info:', error.message);
|
|
32
|
+
* }
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare const getUserInfo: ({ url, ...requestConfig }: Partial<Request>) => Promise<User>;
|
|
37
|
+
export default getUserInfo;
|
|
38
|
+
//# sourceMappingURL=getUserInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getUserInfo.d.ts","sourceRoot":"","sources":["../../src/api/getUserInfo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAEpC;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,WAAW,GAAU,2BAAyB,OAAO,CAAC,OAAO,CAAC,KAAG,OAAO,CAAC,IAAI,CAmDlF,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
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 { EmbeddedFlowExecuteRequestConfig } from '../models/embedded-flow';
|
|
19
|
+
import { EmbeddedSignInFlowInitiateResponse } from '../models/embedded-signin-flow';
|
|
20
|
+
/**
|
|
21
|
+
* Sends an authorization request to the specified OAuth2/OIDC authorization endpoint.
|
|
22
|
+
*
|
|
23
|
+
* @param requestConfig - Request configuration object containing URL and payload.
|
|
24
|
+
* @returns A promise that resolves with the authorization response.
|
|
25
|
+
* @throws ThunderIDAPIError when the request fails or URL is invalid.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```typescript
|
|
29
|
+
* try {
|
|
30
|
+
* const authResponse = await initializeEmbeddedSignInFlow({
|
|
31
|
+
* url: "https://api.asgardeo.io/t/<ORGANIZATION>/oauth2/authorize",
|
|
32
|
+
* payload: {
|
|
33
|
+
* response_type: "code",
|
|
34
|
+
* client_id: "your-client-id",
|
|
35
|
+
* redirect_uri: "https://your-app.com/callback",
|
|
36
|
+
* scope: "openid profile email",
|
|
37
|
+
* state: "random-state-value",
|
|
38
|
+
* code_challenge: "your-pkce-challenge",
|
|
39
|
+
* code_challenge_method: "S256"
|
|
40
|
+
* }
|
|
41
|
+
* });
|
|
42
|
+
* console.log(authResponse);
|
|
43
|
+
* } catch (error) {
|
|
44
|
+
* if (error instanceof ThunderIDAPIError) {
|
|
45
|
+
* console.error('Authorization failed:', error.message);
|
|
46
|
+
* }
|
|
47
|
+
* }
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare const initializeEmbeddedSignInFlow: ({ url, baseUrl, payload, ...requestConfig }: EmbeddedFlowExecuteRequestConfig) => Promise<EmbeddedSignInFlowInitiateResponse>;
|
|
51
|
+
export default initializeEmbeddedSignInFlow;
|
|
52
|
+
//# sourceMappingURL=initializeEmbeddedSignInFlow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initializeEmbeddedSignInFlow.d.ts","sourceRoot":"","sources":["../../src/api/initializeEmbeddedSignInFlow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,gCAAgC,EAAC,MAAM,yBAAyB,CAAC;AACzE,OAAO,EAAC,kCAAkC,EAAC,MAAM,gCAAgC,CAAC;AAElF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,QAAA,MAAM,4BAA4B,GAAU,6CAKzC,gCAAgC,KAAG,OAAO,CAAC,kCAAkC,CAsE/E,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
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 { User } from '../models/user';
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for the updateMeProfile request
|
|
21
|
+
*/
|
|
22
|
+
export interface UpdateMeProfileConfig extends Omit<RequestInit, 'method' | 'body'> {
|
|
23
|
+
/**
|
|
24
|
+
* The base path of 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
|
+
* The value object to patch (SCIM2 PATCH value)
|
|
34
|
+
*/
|
|
35
|
+
payload: any;
|
|
36
|
+
/**
|
|
37
|
+
* The absolute API endpoint.
|
|
38
|
+
*/
|
|
39
|
+
url?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Updates the user profile information at the specified SCIM2 Me endpoint.
|
|
43
|
+
*
|
|
44
|
+
* @param config - Configuration object with URL, payload and optional request config.
|
|
45
|
+
* @returns A promise that resolves with the updated user profile information.
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* // Using default fetch
|
|
49
|
+
* await updateMeProfile({
|
|
50
|
+
* url: "https://api.asgardeo.io/t/<ORG>/scim2/Me",
|
|
51
|
+
* payload: { "urn:scim:wso2:schema": { mobileNumbers: ["0777933830"] } }
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```typescript
|
|
57
|
+
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
58
|
+
* await updateMeProfile({
|
|
59
|
+
* url: "https://api.asgardeo.io/t/<ORG>/scim2/Me",
|
|
60
|
+
* payload: { "urn:scim:wso2:schema": { mobileNumbers: ["0777933830"] } },
|
|
61
|
+
* fetcher: async (url, config) => {
|
|
62
|
+
* const response = await httpClient({
|
|
63
|
+
* url,
|
|
64
|
+
* method: config.method,
|
|
65
|
+
* headers: config.headers,
|
|
66
|
+
* data: config.body,
|
|
67
|
+
* ...config
|
|
68
|
+
* });
|
|
69
|
+
* // Convert axios-like response to fetch-like Response
|
|
70
|
+
* return {
|
|
71
|
+
* ok: response.status >= 200 && response.status < 300,
|
|
72
|
+
* status: response.status,
|
|
73
|
+
* statusText: response.statusText,
|
|
74
|
+
* json: () => Promise.resolve(response.data),
|
|
75
|
+
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
76
|
+
* } as Response;
|
|
77
|
+
* }
|
|
78
|
+
* });
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
declare const updateMeProfile: ({ url, baseUrl, payload, fetcher, ...requestConfig }: UpdateMeProfileConfig) => Promise<User>;
|
|
82
|
+
export default updateMeProfile;
|
|
83
|
+
//# sourceMappingURL=updateMeProfile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateMeProfile.d.ts","sourceRoot":"","sources":["../../src/api/updateMeProfile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAgB,CAAC;AAGpC;;GAEG;AACH,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,WAAW,EAAE,QAAQ,GAAG,MAAM,CAAC;IACjF;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;IAClE;;OAEG;IACH,OAAO,EAAE,GAAG,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,QAAA,MAAM,eAAe,GAAU,sDAM5B,qBAAqB,KAAG,OAAO,CAAC,IAAI,CAwEtC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,119 @@
|
|
|
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 { OrganizationDetails } from './getOrganization';
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for the updateOrganization request
|
|
21
|
+
*/
|
|
22
|
+
export interface UpdateOrganizationConfig extends Omit<RequestInit, 'method' | 'body'> {
|
|
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
|
+
* Array of patch operations to apply
|
|
34
|
+
*/
|
|
35
|
+
operations: {
|
|
36
|
+
operation: 'REPLACE' | 'ADD' | 'REMOVE';
|
|
37
|
+
path: string;
|
|
38
|
+
value?: any;
|
|
39
|
+
}[];
|
|
40
|
+
/**
|
|
41
|
+
* The ID of the organization to update
|
|
42
|
+
*/
|
|
43
|
+
organizationId: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Updates the organization information using the Organizations Management API.
|
|
47
|
+
*
|
|
48
|
+
* @param config - Configuration object with baseUrl, organizationId, operations and optional request config.
|
|
49
|
+
* @returns A promise that resolves with the updated organization information.
|
|
50
|
+
* @example
|
|
51
|
+
* ```typescript
|
|
52
|
+
* // Using the helper function to create operations automatically
|
|
53
|
+
* const operations = createPatchOperations({
|
|
54
|
+
* name: "Updated Organization Name", // Will use REPLACE
|
|
55
|
+
* description: "", // Will use REMOVE (empty string)
|
|
56
|
+
* customField: "Some value" // Will use REPLACE
|
|
57
|
+
* });
|
|
58
|
+
*
|
|
59
|
+
* await updateOrganization({
|
|
60
|
+
* baseUrl: "https://api.asgardeo.io/t/<ORG>",
|
|
61
|
+
* organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
|
|
62
|
+
* operations
|
|
63
|
+
* });
|
|
64
|
+
*
|
|
65
|
+
* // Or manually specify operations
|
|
66
|
+
* await updateOrganization({
|
|
67
|
+
* baseUrl: "https://api.asgardeo.io/t/<ORG>",
|
|
68
|
+
* organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
|
|
69
|
+
* operations: [
|
|
70
|
+
* { operation: "REPLACE", path: "/name", value: "Updated Organization Name" },
|
|
71
|
+
* { operation: "REMOVE", path: "/description" }
|
|
72
|
+
* ]
|
|
73
|
+
* });
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* // Using custom fetcher (e.g., axios-based httpClient)
|
|
79
|
+
* await updateOrganization({
|
|
80
|
+
* baseUrl: "https://api.asgardeo.io/t/<ORG>",
|
|
81
|
+
* organizationId: "0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1",
|
|
82
|
+
* operations: [
|
|
83
|
+
* { operation: "REPLACE", path: "/name", value: "Updated Organization Name" }
|
|
84
|
+
* ],
|
|
85
|
+
* fetcher: async (url, config) => {
|
|
86
|
+
* const response = await httpClient({
|
|
87
|
+
* url,
|
|
88
|
+
* method: config.method,
|
|
89
|
+
* headers: config.headers,
|
|
90
|
+
* data: config.body,
|
|
91
|
+
* ...config
|
|
92
|
+
* });
|
|
93
|
+
* // Convert axios-like response to fetch-like Response
|
|
94
|
+
* return {
|
|
95
|
+
* ok: response.status >= 200 && response.status < 300,
|
|
96
|
+
* status: response.status,
|
|
97
|
+
* statusText: response.statusText,
|
|
98
|
+
* json: () => Promise.resolve(response.data),
|
|
99
|
+
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
100
|
+
* } as Response;
|
|
101
|
+
* }
|
|
102
|
+
* });
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
declare const updateOrganization: ({ baseUrl, organizationId, operations, fetcher, ...requestConfig }: UpdateOrganizationConfig) => Promise<OrganizationDetails>;
|
|
106
|
+
/**
|
|
107
|
+
* Helper function to convert field updates to patch operations format.
|
|
108
|
+
* Uses REMOVE operation when the value is empty, otherwise uses REPLACE.
|
|
109
|
+
*
|
|
110
|
+
* @param payload - Object containing field updates
|
|
111
|
+
* @returns Array of patch operations
|
|
112
|
+
*/
|
|
113
|
+
export declare const createPatchOperations: (payload: Record<string, any>) => {
|
|
114
|
+
operation: "REPLACE" | "REMOVE";
|
|
115
|
+
path: string;
|
|
116
|
+
value?: any;
|
|
117
|
+
}[];
|
|
118
|
+
export default updateOrganization;
|
|
119
|
+
//# sourceMappingURL=updateOrganization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateOrganization.d.ts","sourceRoot":"","sources":["../../src/api/updateOrganization.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,mBAAmB,EAAC,MAAM,mBAAmB,CAAC;AAItD;;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,UAAU,EAAE;QACV,SAAS,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC;QACxC,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,GAAG,CAAC;KACb,EAAE,CAAC;IACJ;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,QAAA,MAAM,kBAAkB,GAAU,oEAM/B,wBAAwB,KAAG,OAAO,CAAC,mBAAmB,CA8ExD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAChC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC3B;IACD,SAAS,EAAE,SAAS,GAAG,QAAQ,CAAC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,EAcG,CAAC;AAEL,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2026, 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 { EmbeddedFlowExecuteRequestConfig as EmbeddedFlowExecuteRequestConfigV2 } from '../../models/v2/embedded-flow-v2';
|
|
19
|
+
import { EmbeddedRecoveryFlowResponse } from '../../models/v2/embedded-recovery-flow-v2';
|
|
20
|
+
/**
|
|
21
|
+
* Executes an embedded recovery flow by sending a request to the flow execution endpoint.
|
|
22
|
+
*
|
|
23
|
+
* This function handles password-recovery and account-recovery flows driven by the
|
|
24
|
+
* ThunderID server. The server returns UI components for each step (e.g. username
|
|
25
|
+
* collection, OTP verification, password reset) and this function forwards the
|
|
26
|
+
* user's responses back to the server.
|
|
27
|
+
*
|
|
28
|
+
* @param requestConfig - Request configuration containing URL, payload, and optional headers.
|
|
29
|
+
* @returns A promise that resolves with the flow execution response.
|
|
30
|
+
* @throws ThunderIDAPIError when the request fails or a payload is missing.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```typescript
|
|
34
|
+
* // Initiate recovery flow
|
|
35
|
+
* const response = await executeEmbeddedRecoveryFlowV2({
|
|
36
|
+
* baseUrl: 'https://api.asgardeo.io/t/myorg',
|
|
37
|
+
* payload: {
|
|
38
|
+
* flowType: 'RECOVERY',
|
|
39
|
+
* applicationId: 'my-app-id',
|
|
40
|
+
* },
|
|
41
|
+
* });
|
|
42
|
+
*
|
|
43
|
+
* // Continue recovery flow with user input
|
|
44
|
+
* const nextResponse = await executeEmbeddedRecoveryFlowV2({
|
|
45
|
+
* baseUrl: 'https://api.asgardeo.io/t/myorg',
|
|
46
|
+
* payload: {
|
|
47
|
+
* executionId: response.executionId,
|
|
48
|
+
* action: 'submit',
|
|
49
|
+
* inputs: { username: 'user@example.com' },
|
|
50
|
+
* challengeToken: response.challengeToken,
|
|
51
|
+
* },
|
|
52
|
+
* });
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
declare const executeEmbeddedRecoveryFlowV2: ({ url, baseUrl, payload, ...requestConfig }: EmbeddedFlowExecuteRequestConfigV2) => Promise<EmbeddedRecoveryFlowResponse>;
|
|
56
|
+
export default executeEmbeddedRecoveryFlowV2;
|
|
57
|
+
//# sourceMappingURL=executeEmbeddedRecoveryFlowV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executeEmbeddedRecoveryFlowV2.d.ts","sourceRoot":"","sources":["../../../src/api/v2/executeEmbeddedRecoveryFlowV2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,gCAAgC,IAAI,kCAAkC,EAAC,MAAM,kCAAkC,CAAC;AACxH,OAAO,EAAC,4BAA4B,EAAC,MAAM,2CAA2C,CAAC;AAEvF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,QAAA,MAAM,6BAA6B,GAAU,6CAK1C,kCAAkC,KAAG,OAAO,CAAC,4BAA4B,CAqE3E,CAAC;AAEF,eAAe,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { EmbeddedFlowExecuteRequestConfig as EmbeddedFlowExecuteRequestConfigV2 } from '../../models/v2/embedded-flow-v2';
|
|
19
|
+
import { EmbeddedSignInFlowResponse as EmbeddedSignInFlowResponseV2 } from '../../models/v2/embedded-signin-flow-v2';
|
|
20
|
+
declare const executeEmbeddedSignInFlowV2: ({ url, baseUrl, payload, authId, ...requestConfig }: EmbeddedFlowExecuteRequestConfigV2) => Promise<EmbeddedSignInFlowResponseV2>;
|
|
21
|
+
export default executeEmbeddedSignInFlowV2;
|
|
22
|
+
//# sourceMappingURL=executeEmbeddedSignInFlowV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executeEmbeddedSignInFlowV2.d.ts","sourceRoot":"","sources":["../../../src/api/v2/executeEmbeddedSignInFlowV2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,gCAAgC,IAAI,kCAAkC,EAAC,MAAM,kCAAkC,CAAC;AACxH,OAAO,EACL,0BAA0B,IAAI,4BAA4B,EAE3D,MAAM,yCAAyC,CAAC;AAEjD,QAAA,MAAM,2BAA2B,GAAU,qDAMxC,kCAAkC,KAAG,OAAO,CAAC,4BAA4B,CAgH3E,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { EmbeddedFlowExecuteRequestConfig as EmbeddedFlowExecuteRequestConfigV2 } from '../../models/v2/embedded-flow-v2';
|
|
19
|
+
import { EmbeddedSignUpFlowResponse as EmbeddedSignUpFlowResponseV2 } from '../../models/v2/embedded-signup-flow-v2';
|
|
20
|
+
declare const executeEmbeddedSignUpFlowV2: ({ url, baseUrl, payload, authId, ...requestConfig }: EmbeddedFlowExecuteRequestConfigV2) => Promise<EmbeddedSignUpFlowResponseV2>;
|
|
21
|
+
export default executeEmbeddedSignUpFlowV2;
|
|
22
|
+
//# sourceMappingURL=executeEmbeddedSignUpFlowV2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executeEmbeddedSignUpFlowV2.d.ts","sourceRoot":"","sources":["../../../src/api/v2/executeEmbeddedSignUpFlowV2.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAC,gCAAgC,IAAI,kCAAkC,EAAC,MAAM,kCAAkC,CAAC;AACxH,OAAO,EACL,0BAA0B,IAAI,4BAA4B,EAE3D,MAAM,yCAAyC,CAAC;AAEjD,QAAA,MAAM,2BAA2B,GAAU,qDAMxC,kCAAkC,KAAG,OAAO,CAAC,4BAA4B,CAgH3E,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|