@idp.global/interfaces 13.1.0 → 14.0.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/changelog.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-17 - 14.0.0
4
+
5
+ ### Breaking Changes
6
+
7
+ - represent ordinary nullable SmartData persistence values explicitly as
8
+ `null`, including app role mappings, rotated refresh-token hashes,
9
+ organization billing and role-definition data, and optional user profile,
10
+ credential, administrator, and external-identity state
11
+ - expose nullable organization billing-plan state in the organization DTO while
12
+ keeping absence-sensitive invitation, deletion-state, sparse-index, and
13
+ lifecycle contracts unchanged
14
+ - require current login-session ownership and timestamps plus user creation
15
+ timestamps, remove transient plaintext password and legacy embedded SCIM state
16
+ from persisted users, and give registration its own minimal input contract
17
+
3
18
  ## 2026-07-16 - 13.1.0
4
19
 
5
20
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '13.1.0',
6
+ version: '14.0.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
@@ -11,6 +11,6 @@ export interface IAppConnection {
11
11
  connectedAt: number;
12
12
  connectedByUserId: string;
13
13
  grantedScopes: string[];
14
- roleMappings?: IAppRoleMapping[];
14
+ roleMappings?: IAppRoleMapping[] | null;
15
15
  };
16
16
  }
@@ -1,11 +1,11 @@
1
1
  export interface ILoginSession {
2
2
  id: string;
3
3
  data: {
4
- userId: string | null;
4
+ userId: string;
5
5
  validUntil: number;
6
6
  invalidated: boolean;
7
7
  refreshTokenHash?: string | null;
8
- rotatedRefreshTokenHashes?: string[];
8
+ rotatedRefreshTokenHashes?: string[] | null;
9
9
  /**
10
10
  * Hash of the single outstanding opaque transfer token.
11
11
  *
@@ -45,10 +45,10 @@ export interface ILoginSession {
45
45
  /**
46
46
  * When this session was created
47
47
  */
48
- createdAt?: number;
48
+ createdAt: number;
49
49
  /**
50
50
  * Last time this session was active (e.g., refreshed)
51
51
  */
52
- lastActive?: number;
52
+ lastActive: number;
53
53
  };
54
54
  }
@@ -5,8 +5,8 @@ export interface IOrganization {
5
5
  name: string;
6
6
  slug: string;
7
7
  status: 'active' | 'suspended' | 'deleting';
8
- billingPlanId: string;
8
+ billingPlanId: string | null;
9
9
  roleIds: string[];
10
- roleDefinitions?: IOrgRoleDefinition[];
10
+ roleDefinitions?: IOrgRoleDefinition[] | null;
11
11
  };
12
12
  }
@@ -3,7 +3,7 @@ export type TStandardRole = 'owner' | 'admin' | 'editor' | 'guest' | 'viewer' |
3
3
  export interface IOrgRoleDefinition {
4
4
  key: string;
5
5
  name: string;
6
- description?: string;
6
+ description?: string | null;
7
7
  createdAt: number;
8
8
  updatedAt: number;
9
9
  }
@@ -7,21 +7,14 @@ export interface IUser {
7
7
  /**
8
8
  * mobile number used for verification
9
9
  */
10
- mobileNumber?: string;
11
- /**
12
- * only used during initial password setting
13
- */
14
- password?: string;
10
+ mobileNumber?: string | null;
15
11
  /**
16
12
  * used for validation of passwords
17
13
  */
18
- passwordHash?: string;
14
+ passwordHash?: string | null;
19
15
  status: 'new' | 'active' | 'deleted' | 'suspended';
20
- /**
21
- * epoch ms of account creation; absent on accounts created before this
22
- * field existed (derive from the Mongo ObjectId timestamp when missing)
23
- */
24
- createdAt?: number;
16
+ /** epoch ms of account creation */
17
+ createdAt: number;
25
18
  /**
26
19
  * present while an account deletion is pending: the account is locked
27
20
  * (status 'deleted') and housekeeping purges it after purgeAt.
@@ -41,7 +34,7 @@ export interface IUser {
41
34
  * Users with this flag can access the global admin panel
42
35
  * to manage global apps, view platform stats, etc.
43
36
  */
44
- isGlobalAdmin?: boolean;
37
+ isGlobalAdmin?: boolean | null;
45
38
  /**
46
39
  * Links to external identities established via enterprise SSO.
47
40
  * One entry per SSO connection the user has signed in through.
@@ -51,18 +44,6 @@ export interface IUser {
51
44
  connectionId: string;
52
45
  /** Stable subject identifier at the customer IdP (SAML NameID) */
53
46
  subjectId: string;
54
- }[];
55
- /**
56
- * SCIM provisioning state. Present when the user is managed by an
57
- * org's SCIM integration.
58
- */
59
- scim?: {
60
- /** externalId assigned by the provisioning IdP */
61
- externalId?: string;
62
- /** The ISsoConnection id whose SCIM integration manages this user */
63
- provisionedByConnectionId?: string;
64
- /** SCIM-side active flag; false after deprovisioning */
65
- active?: boolean;
66
- };
47
+ }[] | null;
67
48
  };
68
49
  }
@@ -12,7 +12,7 @@ export interface IOrganizationDto {
12
12
  name: string;
13
13
  slug: string;
14
14
  status: 'active' | 'suspended' | 'deleting';
15
- billingPlanId: string;
15
+ billingPlanId: string | null;
16
16
  roleIds: string[];
17
17
  roleDefinitions?: IOrgRoleDefinitionDto[];
18
18
  };
@@ -1,6 +1,9 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import * as dto from '../dto/index.js';
3
- import { type IUser } from '../data/index.js';
3
+ export interface IRegistrationUserDataInput {
4
+ name?: string;
5
+ password?: string;
6
+ }
4
7
  export interface IReq_FirstRegistration extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_FirstRegistration> {
5
8
  method: 'firstRegistrationRequest';
6
9
  request: {
@@ -32,7 +35,7 @@ export interface IReq_SetDataForRegistration extends plugins.typedRequestInterfa
32
35
  method: 'setDataForRegistration';
33
36
  request: {
34
37
  token: string;
35
- userData: IUser['data'];
38
+ userData: IRegistrationUserDataInput;
36
39
  };
37
40
  response: {
38
41
  status: 'ok' | 'not ok';
@@ -1,4 +1,3 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import * as dto from '../dto/index.js';
3
- import {} from '../data/index.js';
4
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0cmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdC9yZWdpc3RyYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxLQUFLLEdBQUcsTUFBTSxpQkFBaUIsQ0FBQztBQUN2QyxPQUFPLEVBQWMsTUFBTSxrQkFBa0IsQ0FBQyJ9
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0cmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdC9yZWdpc3RyYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxLQUFLLEdBQUcsTUFBTSxpQkFBaUIsQ0FBQyJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idp.global/interfaces",
3
- "version": "13.1.0",
3
+ "version": "14.0.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.",
6
6
  "exports": {
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '13.1.0',
6
+ version: '14.0.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  }
@@ -13,6 +13,6 @@ export interface IAppConnection {
13
13
  connectedAt: number;
14
14
  connectedByUserId: string;
15
15
  grantedScopes: string[];
16
- roleMappings?: IAppRoleMapping[];
16
+ roleMappings?: IAppRoleMapping[] | null;
17
17
  };
18
18
  }
@@ -1,11 +1,11 @@
1
1
  export interface ILoginSession {
2
2
  id: string;
3
3
  data: {
4
- userId: string | null;
4
+ userId: string;
5
5
  validUntil: number;
6
6
  invalidated: boolean;
7
7
  refreshTokenHash?: string | null;
8
- rotatedRefreshTokenHashes?: string[];
8
+ rotatedRefreshTokenHashes?: string[] | null;
9
9
  /**
10
10
  * Hash of the single outstanding opaque transfer token.
11
11
  *
@@ -45,10 +45,10 @@ export interface ILoginSession {
45
45
  /**
46
46
  * When this session was created
47
47
  */
48
- createdAt?: number;
48
+ createdAt: number;
49
49
  /**
50
50
  * Last time this session was active (e.g., refreshed)
51
51
  */
52
- lastActive?: number;
52
+ lastActive: number;
53
53
  };
54
54
  }
@@ -8,8 +8,8 @@ export interface IOrganization {
8
8
  name: string;
9
9
  slug: string;
10
10
  status: 'active' | 'suspended' | 'deleting';
11
- billingPlanId: string;
11
+ billingPlanId: string | null;
12
12
  roleIds: string[];
13
- roleDefinitions?: IOrgRoleDefinition[];
13
+ roleDefinitions?: IOrgRoleDefinition[] | null;
14
14
  };
15
15
  }
package/ts/data/role.ts CHANGED
@@ -6,7 +6,7 @@ export type TStandardRole = 'owner' | 'admin' | 'editor' | 'guest' | 'viewer' |
6
6
  export interface IOrgRoleDefinition {
7
7
  key: string;
8
8
  name: string;
9
- description?: string;
9
+ description?: string | null;
10
10
  createdAt: number;
11
11
  updatedAt: number;
12
12
  }
package/ts/data/user.ts CHANGED
@@ -11,21 +11,14 @@ export interface IUser {
11
11
  /**
12
12
  * mobile number used for verification
13
13
  */
14
- mobileNumber?: string;
15
- /**
16
- * only used during initial password setting
17
- */
18
- password?: string;
14
+ mobileNumber?: string | null;
19
15
  /**
20
16
  * used for validation of passwords
21
17
  */
22
- passwordHash?: string;
18
+ passwordHash?: string | null;
23
19
  status: 'new' | 'active' | 'deleted' | 'suspended';
24
- /**
25
- * epoch ms of account creation; absent on accounts created before this
26
- * field existed (derive from the Mongo ObjectId timestamp when missing)
27
- */
28
- createdAt?: number;
20
+ /** epoch ms of account creation */
21
+ createdAt: number;
29
22
  /**
30
23
  * present while an account deletion is pending: the account is locked
31
24
  * (status 'deleted') and housekeeping purges it after purgeAt.
@@ -45,7 +38,7 @@ export interface IUser {
45
38
  * Users with this flag can access the global admin panel
46
39
  * to manage global apps, view platform stats, etc.
47
40
  */
48
- isGlobalAdmin?: boolean;
41
+ isGlobalAdmin?: boolean | null;
49
42
  /**
50
43
  * Links to external identities established via enterprise SSO.
51
44
  * One entry per SSO connection the user has signed in through.
@@ -55,18 +48,6 @@ export interface IUser {
55
48
  connectionId: string;
56
49
  /** Stable subject identifier at the customer IdP (SAML NameID) */
57
50
  subjectId: string;
58
- }[];
59
- /**
60
- * SCIM provisioning state. Present when the user is managed by an
61
- * org's SCIM integration.
62
- */
63
- scim?: {
64
- /** externalId assigned by the provisioning IdP */
65
- externalId?: string;
66
- /** The ISsoConnection id whose SCIM integration manages this user */
67
- provisionedByConnectionId?: string;
68
- /** SCIM-side active flag; false after deprovisioning */
69
- active?: boolean;
70
- };
51
+ }[] | null;
71
52
  };
72
53
  }
@@ -14,7 +14,7 @@ export interface IOrganizationDto {
14
14
  name: string;
15
15
  slug: string;
16
16
  status: 'active' | 'suspended' | 'deleting';
17
- billingPlanId: string;
17
+ billingPlanId: string | null;
18
18
  roleIds: string[];
19
19
  roleDefinitions?: IOrgRoleDefinitionDto[];
20
20
  };
@@ -1,6 +1,10 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import * as dto from '../dto/index.js';
3
- import { type IUser } from '../data/index.js';
3
+
4
+ export interface IRegistrationUserDataInput {
5
+ name?: string;
6
+ password?: string;
7
+ }
4
8
 
5
9
  export interface IReq_FirstRegistration
6
10
  extends plugins.typedRequestInterfaces.implementsTR<
@@ -47,7 +51,7 @@ export interface IReq_SetDataForRegistration
47
51
  method: 'setDataForRegistration';
48
52
  request: {
49
53
  token: string;
50
- userData: IUser['data'];
54
+ userData: IRegistrationUserDataInput;
51
55
  };
52
56
  response: {
53
57
  status: 'ok' | 'not ok';