@idp.global/interfaces 11.0.0 → 12.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,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-16 - 12.0.0
4
+
5
+ ### Breaking Changes
6
+
7
+ - remove the public `data.IActivityLog` persistence shape, including raw user and target identifiers, caller-authored descriptions, IP addresses, user agents, and generic metadata
8
+ - replace `dto.IActivityEventDto` with the flat discriminated `dto.TActivityEventDto` union; activity responses now expose only finite actions, timestamps, outcomes, optional fixed reason codes, fixed target types, and allowlisted action-specific facts
9
+
10
+ ### Maintenance
11
+
12
+ - update Node.js type definitions to 26.1.1
13
+
3
14
  ## 2026-07-11 - 11.0.0
4
15
 
5
16
  ### Breaking Changes
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '11.0.0',
6
+ version: '12.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=
@@ -1,18 +1,16 @@
1
1
  export type TActivityAction = 'login' | 'logout' | 'session_created' | 'session_revoked' | 'passport_device_enrolled' | 'passport_device_revoked' | 'passport_challenge_approved' | 'passport_challenge_rejected' | 'org_created' | 'org_updated' | 'org_deleted' | 'org_ownership_transferred' | 'org_joined' | 'org_left' | 'role_changed' | 'org_app_role_mappings_updated' | 'profile_updated' | 'totp_enabled' | 'totp_disabled' | 'backup_codes_regenerated' | 'mfa_completed' | 'passkey_registered' | 'passkey_revoked' | 'passkey_login' | 'app_connected' | 'app_disconnected' | 'user_suspended' | 'user_unsuspended' | 'account_deletion_requested' | 'account_deletion_cancelled' | 'account_purged' | 'sso_connection_created' | 'sso_connection_updated' | 'sso_connection_deleted' | 'sso_domain_verified' | 'sso_login' | 'scim_token_created' | 'scim_token_revoked' | 'scim_user_provisioned' | 'scim_user_updated' | 'scim_user_deactivated' | 'scim_group_membership_changed' | 'oidc_authorization_granted' | 'oidc_code_exchanged' | 'oidc_refresh_rotated' | 'oidc_refresh_reuse_detected' | 'oidc_token_revoked' | 'oidc_logout' | 'oidc_client_created' | 'oidc_client_updated' | 'oidc_client_activation_changed' | 'oidc_client_deleted' | 'oidc_client_secret_rotated' | 'oidc_signing_key_rotated' | 'oidc_lifecycle_revoked' | 'org_suspended' | 'org_unsuspended';
2
- export interface IActivityLog {
3
- id: string;
4
- data: {
5
- userId: string;
6
- action: TActivityAction;
7
- timestamp: number;
8
- metadata: {
9
- ip?: string;
10
- userAgent?: string;
11
- targetId?: string;
12
- targetType?: string;
13
- outcome?: 'pending' | 'success' | 'failure';
14
- reason?: string;
15
- description: string;
16
- };
17
- };
18
- }
2
+ export type TActivityOutcome = 'attempted' | 'succeeded' | 'denied' | 'failed';
3
+ /**
4
+ * Public failure reasons are deliberately finite and non-descriptive. They
5
+ * classify an outcome without carrying provider errors, account data, or
6
+ * caller-authored text across the public contract boundary.
7
+ */
8
+ export type TActivityReasonCode = 'account_inactive' | 'authentication_failed' | 'authorization_denied' | 'conflict' | 'expired' | 'invalid_request' | 'policy_denied' | 'rate_limited' | 'replay_detected' | 'revoked' | 'step_up_required' | 'upstream_unavailable' | 'user_cancelled';
9
+ export type TActivityTargetType = 'account' | 'application_connection' | 'mfa_method' | 'oidc_authorization' | 'oidc_client' | 'oidc_lifecycle' | 'oidc_signing_key' | 'oidc_token' | 'organization' | 'organization_membership' | 'organization_role_mapping' | 'passkey' | 'passport_challenge' | 'passport_device' | 'profile' | 'scim_group_membership' | 'scim_token' | 'scim_user' | 'session' | 'sso_connection' | 'sso_domain';
10
+ export type TActivityAuthenticationMethod = 'magic_link' | 'password';
11
+ export type TActivitySessionKind = 'browser' | 'oidc';
12
+ export type TActivityRevocationScope = 'account' | 'all_sessions' | 'application' | 'current_session' | 'organization' | 'token_family';
13
+ export type TActivityRoleChange = 'assigned' | 'removed' | 'replaced';
14
+ export type TActivityMfaFactor = 'backup_code' | 'passkey' | 'totp';
15
+ export type TActivityMembershipChange = 'added' | 'reconciled' | 'removed';
16
+ export type TActivityOidcTokenType = 'access_token' | 'refresh_token' | 'token_family';
@@ -1,13 +1,65 @@
1
- import type { TActivityAction } from '../data/activity.js';
2
- export interface IActivityEventDto {
3
- id: string;
4
- data: {
5
- action: TActivityAction;
6
- timestamp: number;
7
- metadata: {
8
- description: string;
9
- ip?: string;
10
- targetType?: string;
11
- };
12
- };
13
- }
1
+ import type { TActivityAction, TActivityAuthenticationMethod, TActivityMembershipChange, TActivityMfaFactor, TActivityOidcTokenType, TActivityOutcome, TActivityReasonCode, TActivityRevocationScope, TActivityRoleChange, TActivitySessionKind, TActivityTargetType } from '../data/activity.js';
2
+ import type { TOAuthClientType } from '../data/app.js';
3
+ type TActivityEventFor<TAction extends TActivityAction, TTargetType extends TActivityTargetType, TFacts> = TAction extends TActivityAction ? {
4
+ action: TAction;
5
+ timestamp: number;
6
+ outcome: TActivityOutcome;
7
+ reasonCode?: TActivityReasonCode;
8
+ targetType: TTargetType;
9
+ facts: TFacts;
10
+ } : never;
11
+ /**
12
+ * Browser-safe activity event. The action field discriminates the union, so
13
+ * every event has one fixed target type and only the explicitly allowlisted
14
+ * facts for that action. Internal event identities, actors, target identities,
15
+ * integrity data, delivery state, network data, and free text are excluded.
16
+ */
17
+ export type TActivityEventDto = TActivityEventFor<'login', 'account', {
18
+ authenticationMethod: TActivityAuthenticationMethod;
19
+ }> | TActivityEventFor<'logout', 'account', null> | TActivityEventFor<'session_created', 'session', {
20
+ sessionKind: TActivitySessionKind;
21
+ }> | TActivityEventFor<'session_revoked', 'session', {
22
+ revocationScope: TActivityRevocationScope;
23
+ }> | TActivityEventFor<'passport_device_enrolled', 'passport_device', null> | TActivityEventFor<'passport_device_revoked', 'passport_device', null> | TActivityEventFor<'passport_challenge_approved', 'passport_challenge', null> | TActivityEventFor<'passport_challenge_rejected', 'passport_challenge', null> | TActivityEventFor<'org_created', 'organization', null> | TActivityEventFor<'org_updated', 'organization', null> | TActivityEventFor<'org_deleted', 'organization', null> | TActivityEventFor<'org_ownership_transferred', 'organization', null> | TActivityEventFor<'org_joined', 'organization_membership', null> | TActivityEventFor<'org_left', 'organization_membership', null> | TActivityEventFor<'role_changed', 'organization_membership', {
24
+ roleChange: TActivityRoleChange;
25
+ }> | TActivityEventFor<'org_app_role_mappings_updated', 'organization_role_mapping', null> | TActivityEventFor<'profile_updated', 'profile', null> | TActivityEventFor<'totp_enabled', 'mfa_method', null> | TActivityEventFor<'totp_disabled', 'mfa_method', null> | TActivityEventFor<'backup_codes_regenerated', 'mfa_method', null> | TActivityEventFor<'mfa_completed', 'mfa_method', {
26
+ factor: TActivityMfaFactor;
27
+ }> | TActivityEventFor<'passkey_registered', 'passkey', null> | TActivityEventFor<'passkey_revoked', 'passkey', null> | TActivityEventFor<'passkey_login', 'passkey', null> | TActivityEventFor<'app_connected', 'application_connection', null> | TActivityEventFor<'app_disconnected', 'application_connection', null> | TActivityEventFor<'user_suspended', 'account', null> | TActivityEventFor<'user_unsuspended', 'account', null> | TActivityEventFor<'account_deletion_requested', 'account', null> | TActivityEventFor<'account_deletion_cancelled', 'account', null> | TActivityEventFor<'account_purged', 'account', null> | TActivityEventFor<'sso_connection_created', 'sso_connection', {
28
+ protocol: 'saml';
29
+ }> | TActivityEventFor<'sso_connection_updated', 'sso_connection', {
30
+ protocol: 'saml';
31
+ }> | TActivityEventFor<'sso_connection_deleted', 'sso_connection', {
32
+ protocol: 'saml';
33
+ }> | TActivityEventFor<'sso_domain_verified', 'sso_domain', {
34
+ protocol: 'saml';
35
+ }> | TActivityEventFor<'sso_login', 'session', {
36
+ protocol: 'saml';
37
+ }> | TActivityEventFor<'scim_token_created', 'scim_token', null> | TActivityEventFor<'scim_token_revoked', 'scim_token', null> | TActivityEventFor<'scim_user_provisioned', 'scim_user', null> | TActivityEventFor<'scim_user_updated', 'scim_user', null> | TActivityEventFor<'scim_user_deactivated', 'scim_user', null> | TActivityEventFor<'scim_group_membership_changed', 'scim_group_membership', {
38
+ membershipChange: TActivityMembershipChange;
39
+ }> | TActivityEventFor<'oidc_authorization_granted', 'oidc_authorization', {
40
+ grantType: 'authorization_code';
41
+ }> | TActivityEventFor<'oidc_code_exchanged', 'oidc_token', {
42
+ grantType: 'authorization_code';
43
+ }> | TActivityEventFor<'oidc_refresh_rotated', 'oidc_token', {
44
+ grantType: 'refresh_token';
45
+ }> | TActivityEventFor<'oidc_refresh_reuse_detected', 'oidc_token', {
46
+ grantType: 'refresh_token';
47
+ }> | TActivityEventFor<'oidc_token_revoked', 'oidc_token', {
48
+ tokenType: TActivityOidcTokenType;
49
+ }> | TActivityEventFor<'oidc_logout', 'session', {
50
+ revocationScope: TActivityRevocationScope;
51
+ }> | TActivityEventFor<'oidc_client_created', 'oidc_client', {
52
+ clientType: TOAuthClientType;
53
+ }> | TActivityEventFor<'oidc_client_updated', 'oidc_client', {
54
+ clientType: TOAuthClientType;
55
+ }> | TActivityEventFor<'oidc_client_activation_changed', 'oidc_client', {
56
+ clientType: TOAuthClientType;
57
+ isActive: boolean;
58
+ }> | TActivityEventFor<'oidc_client_deleted', 'oidc_client', {
59
+ clientType: TOAuthClientType;
60
+ }> | TActivityEventFor<'oidc_client_secret_rotated', 'oidc_client', {
61
+ clientType: 'confidential';
62
+ }> | TActivityEventFor<'oidc_signing_key_rotated', 'oidc_signing_key', null> | TActivityEventFor<'oidc_lifecycle_revoked', 'oidc_lifecycle', {
63
+ revocationScope: TActivityRevocationScope;
64
+ }> | TActivityEventFor<'org_suspended', 'organization', null> | TActivityEventFor<'org_unsuspended', 'organization', null>;
65
+ export {};
@@ -117,7 +117,7 @@ export type TOrgExportRecord = {
117
117
  payload: dto.IScimTokenDto;
118
118
  } | {
119
119
  kind: 'activity';
120
- payload: dto.IActivityEventDto;
120
+ payload: dto.TActivityEventDto;
121
121
  };
122
122
  /**
123
123
  * Cursor-paged export of an organization's data (data portability /
@@ -73,7 +73,7 @@ export interface IReq_GetUserActivity extends plugins.typedRequestInterfaces.imp
73
73
  offset?: number;
74
74
  };
75
75
  response: {
76
- activities: dto.IActivityEventDto[];
76
+ activities: dto.TActivityEventDto[];
77
77
  total: number;
78
78
  };
79
79
  }
@@ -134,7 +134,7 @@ export interface IReq_ExportUserActivity extends plugins.typedRequestInterfaces.
134
134
  until?: number;
135
135
  };
136
136
  response: {
137
- activities: dto.IActivityEventDto[];
137
+ activities: dto.TActivityEventDto[];
138
138
  /** absent when the export is complete */
139
139
  nextCursor?: string;
140
140
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idp.global/interfaces",
3
- "version": "11.0.0",
3
+ "version": "12.0.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.",
6
6
  "exports": {
@@ -18,7 +18,7 @@
18
18
  "@git.zone/tsdoc": "^2.1.1",
19
19
  "@git.zone/tsrun": "^2.0.5",
20
20
  "@git.zone/tstest": "^3.6.6",
21
- "@types/node": "^26.1.0"
21
+ "@types/node": "^26.1.1"
22
22
  },
23
23
  "files": [
24
24
  "ts/**/*",
package/readme.md CHANGED
@@ -35,7 +35,7 @@ export {
35
35
 
36
36
  Use `data` for durable and transportable idp.global object shapes.
37
37
 
38
- Common data contracts include users, JWTs, login sessions, registration sessions, organizations, roles, invitations, billing plans, apps, app connections, activity logs, alerts, alert rules, abuse windows, passport devices, passport challenges, passport nonces, and OIDC payloads.
38
+ Common data contracts include users, JWTs, login sessions, registration sessions, organizations, roles, invitations, billing plans, apps, app connections, finite activity classifications, alerts, alert rules, abuse windows, passport devices, passport challenges, passport nonces, and OIDC payloads.
39
39
 
40
40
  ```ts
41
41
  import { data } from '@idp.global/interfaces';
@@ -76,7 +76,19 @@ remain backend-internal; protocol request and response values remain public.
76
76
 
77
77
  ## DTO Contracts
78
78
 
79
- Use `dto` for normalized transfer objects grouped by activity, alerts, apps, billing, invitations, MFA, organizations, passport, and users. Public OIDC support includes `data.IOidcSettings` and redacted `data.IJwtVerificationKey` records.
79
+ Use `dto` for normalized transfer objects grouped by activity, alerts, apps, billing, invitations, MFA, organizations, passport, and users. `dto.TActivityEventDto` is a discriminated structured event: it exposes only a finite action, timestamp, outcome, optional reason code, fixed target type, and allowlisted action-specific facts. It never carries event, actor, or target identifiers; free text; network data; integrity material; or delivery state. Public OIDC support includes `data.IOidcSettings` and redacted `data.IJwtVerificationKey` records.
80
+
81
+ ```ts
82
+ const activity: dto.TActivityEventDto = {
83
+ action: 'login',
84
+ timestamp: Date.now(),
85
+ outcome: 'succeeded',
86
+ targetType: 'account',
87
+ facts: {
88
+ authenticationMethod: 'password',
89
+ },
90
+ };
91
+ ```
80
92
 
81
93
  ## Scope
82
94
 
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '11.0.0',
6
+ version: '12.0.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  }
@@ -57,20 +57,61 @@ export type TActivityAction =
57
57
  | 'org_suspended'
58
58
  | 'org_unsuspended';
59
59
 
60
- export interface IActivityLog {
61
- id: string;
62
- data: {
63
- userId: string;
64
- action: TActivityAction;
65
- timestamp: number;
66
- metadata: {
67
- ip?: string;
68
- userAgent?: string;
69
- targetId?: string;
70
- targetType?: string;
71
- outcome?: 'pending' | 'success' | 'failure';
72
- reason?: string;
73
- description: string;
74
- };
75
- };
76
- }
60
+ export type TActivityOutcome = 'attempted' | 'succeeded' | 'denied' | 'failed';
61
+
62
+ /**
63
+ * Public failure reasons are deliberately finite and non-descriptive. They
64
+ * classify an outcome without carrying provider errors, account data, or
65
+ * caller-authored text across the public contract boundary.
66
+ */
67
+ export type TActivityReasonCode =
68
+ | 'account_inactive'
69
+ | 'authentication_failed'
70
+ | 'authorization_denied'
71
+ | 'conflict'
72
+ | 'expired'
73
+ | 'invalid_request'
74
+ | 'policy_denied'
75
+ | 'rate_limited'
76
+ | 'replay_detected'
77
+ | 'revoked'
78
+ | 'step_up_required'
79
+ | 'upstream_unavailable'
80
+ | 'user_cancelled';
81
+
82
+ export type TActivityTargetType =
83
+ | 'account'
84
+ | 'application_connection'
85
+ | 'mfa_method'
86
+ | 'oidc_authorization'
87
+ | 'oidc_client'
88
+ | 'oidc_lifecycle'
89
+ | 'oidc_signing_key'
90
+ | 'oidc_token'
91
+ | 'organization'
92
+ | 'organization_membership'
93
+ | 'organization_role_mapping'
94
+ | 'passkey'
95
+ | 'passport_challenge'
96
+ | 'passport_device'
97
+ | 'profile'
98
+ | 'scim_group_membership'
99
+ | 'scim_token'
100
+ | 'scim_user'
101
+ | 'session'
102
+ | 'sso_connection'
103
+ | 'sso_domain';
104
+
105
+ export type TActivityAuthenticationMethod = 'magic_link' | 'password';
106
+ export type TActivitySessionKind = 'browser' | 'oidc';
107
+ export type TActivityRevocationScope =
108
+ | 'account'
109
+ | 'all_sessions'
110
+ | 'application'
111
+ | 'current_session'
112
+ | 'organization'
113
+ | 'token_family';
114
+ export type TActivityRoleChange = 'assigned' | 'removed' | 'replaced';
115
+ export type TActivityMfaFactor = 'backup_code' | 'passkey' | 'totp';
116
+ export type TActivityMembershipChange = 'added' | 'reconciled' | 'removed';
117
+ export type TActivityOidcTokenType = 'access_token' | 'refresh_token' | 'token_family';
@@ -1,14 +1,142 @@
1
- import type { TActivityAction } from '../data/activity.js';
1
+ import type {
2
+ TActivityAction,
3
+ TActivityAuthenticationMethod,
4
+ TActivityMembershipChange,
5
+ TActivityMfaFactor,
6
+ TActivityOidcTokenType,
7
+ TActivityOutcome,
8
+ TActivityReasonCode,
9
+ TActivityRevocationScope,
10
+ TActivityRoleChange,
11
+ TActivitySessionKind,
12
+ TActivityTargetType,
13
+ } from '../data/activity.js';
14
+ import type { TOAuthClientType } from '../data/app.js';
2
15
 
3
- export interface IActivityEventDto {
4
- id: string;
5
- data: {
6
- action: TActivityAction;
7
- timestamp: number;
8
- metadata: {
9
- description: string;
10
- ip?: string;
11
- targetType?: string;
12
- };
13
- };
14
- }
16
+ type TActivityEventFor<
17
+ TAction extends TActivityAction,
18
+ TTargetType extends TActivityTargetType,
19
+ TFacts,
20
+ > = TAction extends TActivityAction
21
+ ? {
22
+ action: TAction;
23
+ timestamp: number;
24
+ outcome: TActivityOutcome;
25
+ reasonCode?: TActivityReasonCode;
26
+ targetType: TTargetType;
27
+ facts: TFacts;
28
+ }
29
+ : never;
30
+
31
+ /**
32
+ * Browser-safe activity event. The action field discriminates the union, so
33
+ * every event has one fixed target type and only the explicitly allowlisted
34
+ * facts for that action. Internal event identities, actors, target identities,
35
+ * integrity data, delivery state, network data, and free text are excluded.
36
+ */
37
+ export type TActivityEventDto =
38
+ | TActivityEventFor<
39
+ 'login',
40
+ 'account',
41
+ { authenticationMethod: TActivityAuthenticationMethod }
42
+ >
43
+ | TActivityEventFor<'logout', 'account', null>
44
+ | TActivityEventFor<'session_created', 'session', { sessionKind: TActivitySessionKind }>
45
+ | TActivityEventFor<
46
+ 'session_revoked',
47
+ 'session',
48
+ { revocationScope: TActivityRevocationScope }
49
+ >
50
+ | TActivityEventFor<'passport_device_enrolled', 'passport_device', null>
51
+ | TActivityEventFor<'passport_device_revoked', 'passport_device', null>
52
+ | TActivityEventFor<'passport_challenge_approved', 'passport_challenge', null>
53
+ | TActivityEventFor<'passport_challenge_rejected', 'passport_challenge', null>
54
+ | TActivityEventFor<'org_created', 'organization', null>
55
+ | TActivityEventFor<'org_updated', 'organization', null>
56
+ | TActivityEventFor<'org_deleted', 'organization', null>
57
+ | TActivityEventFor<'org_ownership_transferred', 'organization', null>
58
+ | TActivityEventFor<'org_joined', 'organization_membership', null>
59
+ | TActivityEventFor<'org_left', 'organization_membership', null>
60
+ | TActivityEventFor<
61
+ 'role_changed',
62
+ 'organization_membership',
63
+ { roleChange: TActivityRoleChange }
64
+ >
65
+ | TActivityEventFor<'org_app_role_mappings_updated', 'organization_role_mapping', null>
66
+ | TActivityEventFor<'profile_updated', 'profile', null>
67
+ | TActivityEventFor<'totp_enabled', 'mfa_method', null>
68
+ | TActivityEventFor<'totp_disabled', 'mfa_method', null>
69
+ | TActivityEventFor<'backup_codes_regenerated', 'mfa_method', null>
70
+ | TActivityEventFor<'mfa_completed', 'mfa_method', { factor: TActivityMfaFactor }>
71
+ | TActivityEventFor<'passkey_registered', 'passkey', null>
72
+ | TActivityEventFor<'passkey_revoked', 'passkey', null>
73
+ | TActivityEventFor<'passkey_login', 'passkey', null>
74
+ | TActivityEventFor<'app_connected', 'application_connection', null>
75
+ | TActivityEventFor<'app_disconnected', 'application_connection', null>
76
+ | TActivityEventFor<'user_suspended', 'account', null>
77
+ | TActivityEventFor<'user_unsuspended', 'account', null>
78
+ | TActivityEventFor<'account_deletion_requested', 'account', null>
79
+ | TActivityEventFor<'account_deletion_cancelled', 'account', null>
80
+ | TActivityEventFor<'account_purged', 'account', null>
81
+ | TActivityEventFor<'sso_connection_created', 'sso_connection', { protocol: 'saml' }>
82
+ | TActivityEventFor<'sso_connection_updated', 'sso_connection', { protocol: 'saml' }>
83
+ | TActivityEventFor<'sso_connection_deleted', 'sso_connection', { protocol: 'saml' }>
84
+ | TActivityEventFor<'sso_domain_verified', 'sso_domain', { protocol: 'saml' }>
85
+ | TActivityEventFor<'sso_login', 'session', { protocol: 'saml' }>
86
+ | TActivityEventFor<'scim_token_created', 'scim_token', null>
87
+ | TActivityEventFor<'scim_token_revoked', 'scim_token', null>
88
+ | TActivityEventFor<'scim_user_provisioned', 'scim_user', null>
89
+ | TActivityEventFor<'scim_user_updated', 'scim_user', null>
90
+ | TActivityEventFor<'scim_user_deactivated', 'scim_user', null>
91
+ | TActivityEventFor<
92
+ 'scim_group_membership_changed',
93
+ 'scim_group_membership',
94
+ { membershipChange: TActivityMembershipChange }
95
+ >
96
+ | TActivityEventFor<
97
+ 'oidc_authorization_granted',
98
+ 'oidc_authorization',
99
+ { grantType: 'authorization_code' }
100
+ >
101
+ | TActivityEventFor<
102
+ 'oidc_code_exchanged',
103
+ 'oidc_token',
104
+ { grantType: 'authorization_code' }
105
+ >
106
+ | TActivityEventFor<'oidc_refresh_rotated', 'oidc_token', { grantType: 'refresh_token' }>
107
+ | TActivityEventFor<
108
+ 'oidc_refresh_reuse_detected',
109
+ 'oidc_token',
110
+ { grantType: 'refresh_token' }
111
+ >
112
+ | TActivityEventFor<
113
+ 'oidc_token_revoked',
114
+ 'oidc_token',
115
+ { tokenType: TActivityOidcTokenType }
116
+ >
117
+ | TActivityEventFor<
118
+ 'oidc_logout',
119
+ 'session',
120
+ { revocationScope: TActivityRevocationScope }
121
+ >
122
+ | TActivityEventFor<'oidc_client_created', 'oidc_client', { clientType: TOAuthClientType }>
123
+ | TActivityEventFor<'oidc_client_updated', 'oidc_client', { clientType: TOAuthClientType }>
124
+ | TActivityEventFor<
125
+ 'oidc_client_activation_changed',
126
+ 'oidc_client',
127
+ { clientType: TOAuthClientType; isActive: boolean }
128
+ >
129
+ | TActivityEventFor<'oidc_client_deleted', 'oidc_client', { clientType: TOAuthClientType }>
130
+ | TActivityEventFor<
131
+ 'oidc_client_secret_rotated',
132
+ 'oidc_client',
133
+ { clientType: 'confidential' }
134
+ >
135
+ | TActivityEventFor<'oidc_signing_key_rotated', 'oidc_signing_key', null>
136
+ | TActivityEventFor<
137
+ 'oidc_lifecycle_revoked',
138
+ 'oidc_lifecycle',
139
+ { revocationScope: TActivityRevocationScope }
140
+ >
141
+ | TActivityEventFor<'org_suspended', 'organization', null>
142
+ | TActivityEventFor<'org_unsuspended', 'organization', null>;
package/ts/readme.md CHANGED
@@ -48,7 +48,7 @@ The `data` export includes types for:
48
48
  - JWT payloads
49
49
  - login sessions
50
50
  - devices
51
- - activity logs
51
+ - finite activity classifications
52
52
  - alerts and alert rules
53
53
  - apps and app connections
54
54
  - billing plans and Paddle checkout data
@@ -73,7 +73,7 @@ The `request` export includes typed request contracts for:
73
73
 
74
74
  ### `dto`
75
75
 
76
- The `dto` export includes normalized transfer objects for activity, alerts, apps, billing, invitations, MFA, organizations, passport, and users.
76
+ The `dto` export includes normalized transfer objects for activity, alerts, apps, billing, invitations, MFA, organizations, passport, and users. Activity responses use the discriminated `TActivityEventDto` union, which contains only finite classifications and allowlisted per-action facts. Persistence identities, actor and target identities, free text, network data, integrity fields, and sink delivery state are backend-private.
77
77
 
78
78
  ### `tags`
79
79
 
@@ -140,7 +140,7 @@ export type TOrgExportRecord =
140
140
  | { kind: 'invitation'; payload: dto.IUserInvitationDto }
141
141
  | { kind: 'ssoConnection'; payload: dto.ISsoConnectionDto }
142
142
  | { kind: 'scimToken'; payload: dto.IScimTokenDto }
143
- | { kind: 'activity'; payload: dto.IActivityEventDto };
143
+ | { kind: 'activity'; payload: dto.TActivityEventDto };
144
144
 
145
145
  /**
146
146
  * Cursor-paged export of an organization's data (data portability /
@@ -104,7 +104,7 @@ export interface IReq_GetUserActivity
104
104
  offset?: number;
105
105
  };
106
106
  response: {
107
- activities: dto.IActivityEventDto[];
107
+ activities: dto.TActivityEventDto[];
108
108
  total: number;
109
109
  };
110
110
  }
@@ -180,7 +180,7 @@ export interface IReq_ExportUserActivity
180
180
  until?: number;
181
181
  };
182
182
  response: {
183
- activities: dto.IActivityEventDto[];
183
+ activities: dto.TActivityEventDto[];
184
184
  /** absent when the export is complete */
185
185
  nextCursor?: string;
186
186
  };