@asgardeo/javascript 0.13.0 → 0.14.0
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/api/v2/getOrganizationUnitChildren.d.ts +42 -0
- package/dist/cjs/index.js +49 -0
- package/dist/cjs/index.js.map +3 -3
- package/dist/index.d.ts +2 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +3 -3
- package/dist/models/v2/embedded-flow-v2.d.ts +2 -0
- package/dist/models/v2/organization-unit.d.ts +102 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export { default as executeEmbeddedSignInFlowV2 } from './api/v2/executeEmbedded
|
|
|
35
35
|
export { default as executeEmbeddedSignUpFlowV2 } from './api/v2/executeEmbeddedSignUpFlowV2';
|
|
36
36
|
export { default as executeEmbeddedUserOnboardingFlowV2, EmbeddedUserOnboardingFlowResponse, } from './api/v2/executeEmbeddedUserOnboardingFlowV2';
|
|
37
37
|
export { default as getFlowMetaV2 } from './api/v2/getFlowMetaV2';
|
|
38
|
+
export { default as getOrganizationUnitChildren } from './api/v2/getOrganizationUnitChildren';
|
|
38
39
|
export { default as ApplicationNativeAuthenticationConstants } from './constants/ApplicationNativeAuthenticationConstants';
|
|
39
40
|
export { default as TokenConstants } from './constants/TokenConstants';
|
|
40
41
|
export { default as OIDCRequestConstants } from './constants/OIDCRequestConstants';
|
|
@@ -49,6 +50,7 @@ export { EmbeddedSignInFlowInitiateResponse, EmbeddedSignInFlowStatus, EmbeddedS
|
|
|
49
50
|
export { EmbeddedFlowComponentType as EmbeddedFlowComponentTypeV2, EmbeddedFlowActionVariant as EmbeddedFlowActionVariantV2, EmbeddedFlowTextVariant as EmbeddedFlowTextVariantV2, EmbeddedFlowEventType as EmbeddedFlowEventTypeV2, EmbeddedFlowComponent as EmbeddedFlowComponentV2, EmbeddedFlowResponseData as EmbeddedFlowResponseDataV2, EmbeddedFlowExecuteRequestConfig as EmbeddedFlowExecuteRequestConfigV2, ConsentAttributeElement as ConsentAttributeElementV2, ConsentPurposeDecision as ConsentPurposeDecisionV2, ConsentDecisions as ConsentDecisionsV2, ConsentPurposeData as ConsentPurposeDataV2, ConsentPromptData as ConsentPromptDataV2, } from './models/v2/embedded-flow-v2';
|
|
50
51
|
export { EmbeddedSignInFlowStatus as EmbeddedSignInFlowStatusV2, EmbeddedSignInFlowType as EmbeddedSignInFlowTypeV2, ExtendedEmbeddedSignInFlowResponse as ExtendedEmbeddedSignInFlowResponseV2, EmbeddedSignInFlowResponse as EmbeddedSignInFlowResponseV2, EmbeddedSignInFlowCompleteResponse as EmbeddedSignInFlowCompleteResponseV2, EmbeddedSignInFlowInitiateRequest as EmbeddedSignInFlowInitiateRequestV2, EmbeddedSignInFlowRequest as EmbeddedSignInFlowRequestV2, } from './models/v2/embedded-signin-flow-v2';
|
|
51
52
|
export { EmbeddedSignUpFlowStatus as EmbeddedSignUpFlowStatusV2, EmbeddedSignUpFlowType as EmbeddedSignUpFlowTypeV2, ExtendedEmbeddedSignUpFlowResponse as ExtendedEmbeddedSignUpFlowResponseV2, EmbeddedSignUpFlowResponse as EmbeddedSignUpFlowResponseV2, EmbeddedSignUpFlowCompleteResponse as EmbeddedSignUpFlowCompleteResponseV2, EmbeddedSignUpFlowInitiateRequest as EmbeddedSignUpFlowInitiateRequestV2, EmbeddedSignUpFlowRequest as EmbeddedSignUpFlowRequestV2, EmbeddedSignUpFlowErrorResponse as EmbeddedSignUpFlowErrorResponseV2, } from './models/v2/embedded-signup-flow-v2';
|
|
53
|
+
export { OrganizationUnit, OrganizationUnitListResponse, GetOrganizationUnitChildrenConfig, } from './models/v2/organization-unit';
|
|
52
54
|
export { FlowMetaType, ApplicationMetadata, OUMetadata, DesignMetadata, I18nMetadata, FlowMetadataResponse, GetFlowMetaRequestConfig, FlowMetaTheme, FlowMetaThemeColorSet, FlowMetaThemeBackground, FlowMetaThemeTextColors, FlowMetaThemeColors, FlowMetaThemeColorScheme, FlowMetaThemeShape, FlowMetaThemeTypography, } from './models/v2/flow-meta-v2';
|
|
53
55
|
export { EmbeddedFlowType, EmbeddedFlowStatus, EmbeddedFlowExecuteResponse, EmbeddedFlowResponseType, EmbeddedSignUpFlowData, EmbeddedFlowComponent, EmbeddedFlowComponentType, EmbeddedFlowExecuteRequestPayload, EmbeddedFlowExecuteRequestConfig, EmbeddedFlowExecuteErrorResponse, } from './models/embedded-flow';
|
|
54
56
|
export { FlowMode } from './models/flow';
|
package/dist/index.js
CHANGED
|
@@ -3282,6 +3282,52 @@ var getFlowMetaV2 = async ({
|
|
|
3282
3282
|
};
|
|
3283
3283
|
var getFlowMetaV2_default = getFlowMetaV2;
|
|
3284
3284
|
|
|
3285
|
+
// src/api/v2/getOrganizationUnitChildren.ts
|
|
3286
|
+
var getOrganizationUnitChildren = async ({
|
|
3287
|
+
url,
|
|
3288
|
+
baseUrl,
|
|
3289
|
+
organizationUnitId,
|
|
3290
|
+
limit = 10,
|
|
3291
|
+
offset = 0,
|
|
3292
|
+
...requestConfig
|
|
3293
|
+
}) => {
|
|
3294
|
+
if (!organizationUnitId) {
|
|
3295
|
+
throw new AsgardeoAPIError(
|
|
3296
|
+
"Organization Unit ID is required",
|
|
3297
|
+
"getOrganizationUnitChildren-ValidationError-001",
|
|
3298
|
+
"javascript",
|
|
3299
|
+
400,
|
|
3300
|
+
"If an organization unit ID is not provided, the request cannot be constructed correctly."
|
|
3301
|
+
);
|
|
3302
|
+
}
|
|
3303
|
+
const queryParams = new URLSearchParams({
|
|
3304
|
+
limit: String(limit),
|
|
3305
|
+
offset: String(offset)
|
|
3306
|
+
});
|
|
3307
|
+
const endpoint = url ?? `${baseUrl}/organization-units/${organizationUnitId}/ous?${queryParams.toString()}`;
|
|
3308
|
+
const response = await fetch(endpoint, {
|
|
3309
|
+
...requestConfig,
|
|
3310
|
+
headers: {
|
|
3311
|
+
Accept: "application/json",
|
|
3312
|
+
...requestConfig.headers
|
|
3313
|
+
},
|
|
3314
|
+
method: "GET"
|
|
3315
|
+
});
|
|
3316
|
+
if (!response.ok) {
|
|
3317
|
+
const errorText = await response.text();
|
|
3318
|
+
throw new AsgardeoAPIError(
|
|
3319
|
+
`Failed to fetch organization unit children: ${errorText}`,
|
|
3320
|
+
"getOrganizationUnitChildren-ResponseError-001",
|
|
3321
|
+
"javascript",
|
|
3322
|
+
response.status,
|
|
3323
|
+
response.statusText
|
|
3324
|
+
);
|
|
3325
|
+
}
|
|
3326
|
+
const listResponse = await response.json();
|
|
3327
|
+
return listResponse;
|
|
3328
|
+
};
|
|
3329
|
+
var getOrganizationUnitChildren_default = getOrganizationUnitChildren;
|
|
3330
|
+
|
|
3285
3331
|
// src/constants/ApplicationNativeAuthenticationConstants.ts
|
|
3286
3332
|
var ApplicationNativeAuthenticationConstants = {
|
|
3287
3333
|
SupportedAuthenticators: {
|
|
@@ -3356,6 +3402,7 @@ var EmbeddedFlowComponentType2 = /* @__PURE__ */ ((EmbeddedFlowComponentType3) =
|
|
|
3356
3402
|
EmbeddedFlowComponentType3["Icon"] = "ICON";
|
|
3357
3403
|
EmbeddedFlowComponentType3["Image"] = "IMAGE";
|
|
3358
3404
|
EmbeddedFlowComponentType3["OtpInput"] = "OTP_INPUT";
|
|
3405
|
+
EmbeddedFlowComponentType3["OuSelect"] = "OU_SELECT";
|
|
3359
3406
|
EmbeddedFlowComponentType3["PasswordInput"] = "PASSWORD_INPUT";
|
|
3360
3407
|
EmbeddedFlowComponentType3["PhoneInput"] = "PHONE_INPUT";
|
|
3361
3408
|
EmbeddedFlowComponentType3["RichText"] = "RICH_TEXT";
|
|
@@ -5288,6 +5335,7 @@ export {
|
|
|
5288
5335
|
getLatestStateParam_default as getLatestStateParam,
|
|
5289
5336
|
getMeOrganizations_default as getMeOrganizations,
|
|
5290
5337
|
getOrganization_default as getOrganization,
|
|
5338
|
+
getOrganizationUnitChildren_default as getOrganizationUnitChildren,
|
|
5291
5339
|
getRedirectBasedSignUpUrl_default as getRedirectBasedSignUpUrl,
|
|
5292
5340
|
getSchemas_default as getSchemas,
|
|
5293
5341
|
getScim2Me_default as getScim2Me,
|