@asgardeo/javascript 0.12.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.
@@ -52,6 +52,8 @@ export declare enum EmbeddedFlowComponentType {
52
52
  Image = "IMAGE",
53
53
  /** One-time password input field for multi-factor authentication */
54
54
  OtpInput = "OTP_INPUT",
55
+ /** Organization unit tree picker for selecting an OU */
56
+ OuSelect = "OU_SELECT",
55
57
  /** Password input field with masking for sensitive data */
56
58
  PasswordInput = "PASSWORD_INPUT",
57
59
  /** Phone number input field with country code support */
@@ -406,7 +408,7 @@ export interface ConsentPurposeDecision {
406
408
  /** Per-attribute decisions for this purpose */
407
409
  elements: ConsentAttributeElement[];
408
410
  /** The name of the consent purpose */
409
- purpose_name: string;
411
+ purposeName: string;
410
412
  }
411
413
  /**
412
414
  * Full consent decisions structure sent to the backend when user submits the consent form.
@@ -430,9 +432,9 @@ export interface ConsentPurposeData {
430
432
  /** Attributes that the user can optionally decline */
431
433
  optional: string[];
432
434
  /** Unique identifier for the purpose */
433
- purpose_id: string;
435
+ purposeId: string;
434
436
  /** Human-readable purpose name */
435
- purpose_name: string;
437
+ purposeName?: string;
436
438
  }
437
439
  /**
438
440
  * Consent prompt data structure stored in additionalData.consent_prompt.
@@ -44,13 +44,13 @@ export interface ApplicationMetadata {
44
44
  /** Application UUID */
45
45
  id: string;
46
46
  /** URL of the application logo */
47
- logo_url?: string;
47
+ logoUrl?: string;
48
48
  /** Human-readable application name */
49
49
  name: string;
50
50
  /** Privacy Policy URI */
51
- policy_uri?: string;
51
+ policyUri?: string;
52
52
  /** Terms of Service URI */
53
- tos_uri?: string;
53
+ tosUri?: string;
54
54
  /** Application home URL */
55
55
  url?: string;
56
56
  }
@@ -64,7 +64,7 @@ export interface ApplicationMetadata {
64
64
  */
65
65
  export interface OUMetadata {
66
66
  /** Cookie Policy URI */
67
- cookie_policy_uri?: string;
67
+ cookiePolicyUri?: string;
68
68
  /** Optional description of the organization unit */
69
69
  description?: string;
70
70
  /** Unique handle / slug for the organization unit */
@@ -72,13 +72,13 @@ export interface OUMetadata {
72
72
  /** Organization unit UUID */
73
73
  id: string;
74
74
  /** URL of the organization unit logo */
75
- logo_url?: string;
75
+ logoUrl?: string;
76
76
  /** Human-readable organization unit name */
77
77
  name: string;
78
78
  /** Privacy Policy URI */
79
- policy_uri?: string;
79
+ policyUri?: string;
80
80
  /** Terms of Service URI */
81
- tos_uri?: string;
81
+ tosUri?: string;
82
82
  }
83
83
  /**
84
84
  * A single color entry in the v2 theme color scheme.
@@ -235,7 +235,7 @@ export interface FlowMetadataResponse {
235
235
  /** Internationalisation metadata and translations */
236
236
  i18n: I18nMetadata;
237
237
  /** Indicates whether the registration flow is enabled for the entity */
238
- is_registration_flow_enabled: boolean;
238
+ isRegistrationFlowEnabled: boolean;
239
239
  /**
240
240
  * Organization unit metadata.
241
241
  * Always present when `type=OU`.
@@ -0,0 +1,102 @@
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
+ export interface OrganizationUnit {
19
+ description?: string;
20
+ handle: string;
21
+ id: string;
22
+ logoUrl?: string;
23
+ name: string;
24
+ parent?: {
25
+ id: string;
26
+ ref?: string;
27
+ };
28
+ }
29
+ export interface OrganizationUnitListResponse {
30
+ count: number;
31
+ organizationUnits: OrganizationUnit[];
32
+ startIndex: number;
33
+ totalResults: number;
34
+ }
35
+ /**
36
+ * Request configuration for fetching a single organization unit.
37
+ *
38
+ * @example
39
+ * ```typescript
40
+ * const config: GetOrganizationUnitConfig = {
41
+ * baseUrl: 'https://localhost:8090',
42
+ * organizationUnitId: '0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1',
43
+ * };
44
+ * ```
45
+ *
46
+ * @experimental This API may change in future versions
47
+ */
48
+ export interface GetOrganizationUnitConfig extends Omit<Partial<RequestInit>, 'method' | 'body'> {
49
+ /**
50
+ * Base URL of the API server.
51
+ * Either `baseUrl` or `url` must be provided.
52
+ */
53
+ baseUrl?: string;
54
+ /**
55
+ * The ID of the organization unit to retrieve.
56
+ */
57
+ organizationUnitId: string;
58
+ /**
59
+ * Fully qualified URL of the organization unit endpoint.
60
+ * When provided, `baseUrl` is ignored.
61
+ */
62
+ url?: string;
63
+ }
64
+ /**
65
+ * Request configuration for fetching child organization units.
66
+ *
67
+ * @example
68
+ * ```typescript
69
+ * const config: GetOrganizationUnitChildrenConfig = {
70
+ * baseUrl: 'https://localhost:8090',
71
+ * organizationUnitId: '0d5e071b-d3d3-475d-b3c6-1a20ee2fa9b1',
72
+ * limit: 10,
73
+ * offset: 0,
74
+ * };
75
+ * ```
76
+ *
77
+ * @experimental This API may change in future versions
78
+ */
79
+ export interface GetOrganizationUnitChildrenConfig extends Omit<Partial<RequestInit>, 'method' | 'body'> {
80
+ /**
81
+ * Base URL of the API server.
82
+ * Either `baseUrl` or `url` must be provided.
83
+ */
84
+ baseUrl?: string;
85
+ /**
86
+ * Maximum number of child OUs to return. Defaults to 10.
87
+ */
88
+ limit?: number;
89
+ /**
90
+ * Pagination offset. Defaults to 0.
91
+ */
92
+ offset?: number;
93
+ /**
94
+ * The ID of the parent organization unit.
95
+ */
96
+ organizationUnitId: string;
97
+ /**
98
+ * Fully qualified URL of the organization unit children endpoint.
99
+ * When provided, `baseUrl` is ignored.
100
+ */
101
+ url?: string;
102
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgardeo/javascript",
3
- "version": "0.12.0",
3
+ "version": "0.14.0",
4
4
  "description": "Framework agnostic JavaScript SDK for Asgardeo.",
5
5
  "keywords": [
6
6
  "asgardeo",