@asgardeo/javascript 0.1.22 → 0.2.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.
@@ -94,7 +94,7 @@ export interface BaseConfig<T = unknown> extends WithPreferences {
94
94
  * The client ID obtained from the Asgardeo application registration.
95
95
  * This is used to identify your application during authentication.
96
96
  */
97
- clientId: string | undefined;
97
+ clientId?: string | undefined;
98
98
  /**
99
99
  * Optional client secret for the application.
100
100
  * Only required when using confidential client flows.
@@ -199,6 +199,11 @@ export interface WithPreferences {
199
199
  }
200
200
  export type Config<T = unknown> = BaseConfig<T>;
201
201
  export interface ThemePreferences {
202
+ /**
203
+ * The text direction for the UI.
204
+ * @default 'ltr'
205
+ */
206
+ direction?: 'ltr' | 'rtl';
202
207
  /**
203
208
  * Inherit from Branding from WSO2 Identity Server or Asgardeo.
204
209
  */
@@ -44,9 +44,9 @@ export interface EmbeddedSignUpFlowData {
44
44
  }
45
45
  export interface EmbeddedFlowComponent {
46
46
  components: EmbeddedFlowComponent[];
47
- config: Record<string, any>;
47
+ config: Record<string, unknown>;
48
48
  id: string;
49
- type: EmbeddedFlowComponentType;
49
+ type: EmbeddedFlowComponentType | string;
50
50
  variant?: string;
51
51
  }
52
52
  export declare enum EmbeddedFlowComponentType {
@@ -25,11 +25,22 @@ export declare enum EmbeddedSignInFlowTypeV2 {
25
25
  Redirection = "REDIRECTION",
26
26
  View = "VIEW"
27
27
  }
28
+ /**
29
+ * Extended response structure for the embedded sign-in flow V2.
30
+ * @remarks This response is only done from the SDK level.
31
+ * @experimental
32
+ */
33
+ export interface ExtendedEmbeddedSignInFlowResponseV2 {
34
+ /**
35
+ * The URL to redirect the user after completing the sign-in flow.
36
+ */
37
+ redirectUrl?: string;
38
+ }
28
39
  /**
29
40
  * Response structure for the new Asgardeo V2 embedded sign-in flow.
30
41
  * @experimental
31
42
  */
32
- export interface EmbeddedSignInFlowResponseV2 {
43
+ export interface EmbeddedSignInFlowResponseV2 extends ExtendedEmbeddedSignInFlowResponseV2 {
33
44
  flowId: string;
34
45
  flowStatus: EmbeddedSignInFlowStatusV2;
35
46
  type: EmbeddedSignInFlowTypeV2;
@@ -0,0 +1,89 @@
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, EmbeddedFlowResponseType, EmbeddedFlowType } from '../embedded-flow';
19
+ export declare enum EmbeddedSignUpFlowStatusV2 {
20
+ Complete = "COMPLETE",
21
+ Incomplete = "INCOMPLETE",
22
+ Error = "ERROR"
23
+ }
24
+ export declare enum EmbeddedSignUpFlowTypeV2 {
25
+ Redirection = "REDIRECTION",
26
+ View = "VIEW"
27
+ }
28
+ /**
29
+ * Extended response structure for the embedded sign-up flow V2.
30
+ * @remarks This response is only done from the SDK level.
31
+ * @experimental
32
+ */
33
+ export interface ExtendedEmbeddedSignUpFlowResponseV2 {
34
+ /**
35
+ * The URL to redirect the user after completing the sign-up flow.
36
+ */
37
+ redirectUrl?: string;
38
+ }
39
+ /**
40
+ * Response structure for the new Asgardeo V2 embedded sign-up flow.
41
+ * @experimental
42
+ */
43
+ export interface EmbeddedSignUpFlowResponseV2 extends ExtendedEmbeddedSignUpFlowResponseV2 {
44
+ flowId: string;
45
+ flowStatus: EmbeddedSignUpFlowStatusV2;
46
+ type: EmbeddedSignUpFlowTypeV2;
47
+ data: {
48
+ actions?: {
49
+ type: EmbeddedFlowResponseType;
50
+ id: string;
51
+ }[];
52
+ inputs?: {
53
+ name: string;
54
+ type: string;
55
+ required: boolean;
56
+ }[];
57
+ };
58
+ }
59
+ /**
60
+ * Response structure for the new Asgardeo V2 embedded sign-up flow when the flow is complete.
61
+ * @experimental
62
+ */
63
+ export interface EmbeddedSignUpFlowCompleteResponse {
64
+ redirect_uri: string;
65
+ }
66
+ /**
67
+ * Request payload for initiating the new Asgardeo V2 embedded sign-up flow.
68
+ * @experimental
69
+ */
70
+ export type EmbeddedSignUpFlowInitiateRequestV2 = {
71
+ applicationId: string;
72
+ flowType: EmbeddedFlowType;
73
+ };
74
+ /**
75
+ * Request payload for executing steps in the new Asgardeo V2 embedded sign-up flow.
76
+ * @experimental
77
+ */
78
+ export interface EmbeddedSignUpFlowRequestV2 extends Partial<EmbeddedSignUpFlowInitiateRequestV2> {
79
+ flowId?: string;
80
+ actionId?: string;
81
+ inputs?: Record<string, any>;
82
+ }
83
+ /**
84
+ * Request config for executing the new Asgardeo V2 embedded sign-up flow.
85
+ * @experimental
86
+ */
87
+ export interface EmbeddedFlowExecuteRequestConfigV2<T = any> extends EmbeddedFlowExecuteRequestConfig<T> {
88
+ sessionDataKey?: string;
89
+ }
@@ -142,6 +142,11 @@ export interface ThemeConfig {
142
142
  small: string;
143
143
  };
144
144
  colors: ThemeColors;
145
+ /**
146
+ * The text direction for the UI.
147
+ * @default 'ltr'
148
+ */
149
+ direction?: 'ltr' | 'rtl';
145
150
  shadows: {
146
151
  large: string;
147
152
  medium: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asgardeo/javascript",
3
- "version": "0.1.22",
3
+ "version": "0.2.0",
4
4
  "description": "Framework agnostic JavaScript SDK for Asgardeo.",
5
5
  "keywords": [
6
6
  "asgardeo",