@logto/js 4.1.3 → 4.1.5

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.
@@ -1,11 +1,10 @@
1
1
  import { Prompt } from '../consts/index.js';
2
2
  import type { FirstScreen, InteractionMode } from '../types/index.js';
3
- /** @experimental Don't use this type as it's under development. */
4
3
  export type DirectSignInOptions = {
5
4
  /**
6
5
  * The method to be used for the direct sign-in.
7
6
  */
8
- method: 'social';
7
+ method: 'social' | 'sso';
9
8
  /**
10
9
  * The target to be used for the direct sign-in.
11
10
  *
@@ -24,8 +23,6 @@ export type SignInUriParameters = {
24
23
  prompt?: Prompt | Prompt[];
25
24
  /**
26
25
  * The first screen to be shown in the sign-in experience.
27
- *
28
- * @experimental Don't use this field as it's under development.
29
26
  */
30
27
  firstScreen?: FirstScreen;
31
28
  /** The first screen to be shown in the sign-in experience. */
@@ -39,7 +36,7 @@ export type SignInUriParameters = {
39
36
  /**
40
37
  * Parameters for direct sign-in.
41
38
  *
42
- * @experimental Don't use this field as it's under development.
39
+ * @see {@link https://docs.logto.io/docs/references/openid-connect/authentication-parameters/#direct-sign-in Direct sign-in} for more information.
43
40
  */
44
41
  directSignIn?: DirectSignInOptions;
45
42
  /**
@@ -1,12 +1,19 @@
1
+ import { type Nullable } from 'vitest';
1
2
  import { type IdTokenClaims } from '../index.js';
2
3
  import type { Requester } from '../types/index.js';
3
4
  type Identity = {
4
5
  userId: string;
5
6
  details?: Record<string, unknown>;
6
7
  };
8
+ type OrganizationData = {
9
+ id: string;
10
+ name: string;
11
+ description: Nullable<string>;
12
+ };
7
13
  export type UserInfoResponse = IdTokenClaims & {
8
14
  custom_data?: unknown;
9
15
  identities?: Record<string, Identity>;
16
+ organization_data?: OrganizationData[];
10
17
  };
11
18
  export declare const fetchUserInfo: (userInfoEndpoint: string, accessToken: string, requester: Requester) => Promise<UserInfoResponse>;
12
19
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logto/js",
3
- "version": "4.1.3",
3
+ "version": "4.1.5",
4
4
  "type": "module",
5
5
  "main": "./lib/index.cjs",
6
6
  "module": "./lib/index.js",
@@ -27,8 +27,8 @@
27
27
  "@silverhand/eslint-config": "^6.0.1",
28
28
  "@silverhand/ts-config": "^6.0.0",
29
29
  "@types/node": "^20.11.19",
30
- "@vitest/coverage-v8": "^1.4.0",
31
- "angular-auth-oidc-client": "^17.0.0",
30
+ "@vitest/coverage-v8": "^1.6.0",
31
+ "angular-auth-oidc-client": "^18.0.0",
32
32
  "eslint": "^8.57.0",
33
33
  "happy-dom": "^14.0.0",
34
34
  "jose": "^5.2.2",
@@ -36,7 +36,7 @@
36
36
  "prettier": "^3.0.0",
37
37
  "rollup": "^4.0.0",
38
38
  "typescript": "^5.3.3",
39
- "vitest": "^1.4.0"
39
+ "vitest": "^1.6.0"
40
40
  },
41
41
  "eslintConfig": {
42
42
  "extends": "@silverhand"