@idp.global/interfaces 4.0.0 → 5.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.
Files changed (73) hide show
  1. package/changelog.md +9 -0
  2. package/dist_ts/00_commitinfo_data.js +1 -1
  3. package/dist_ts/dto/activity.d.ts +13 -0
  4. package/dist_ts/dto/activity.js +2 -0
  5. package/dist_ts/dto/alert.d.ts +39 -0
  6. package/dist_ts/dto/alert.js +2 -0
  7. package/dist_ts/dto/app.d.ts +36 -0
  8. package/dist_ts/dto/app.js +2 -0
  9. package/dist_ts/dto/billing.d.ts +23 -0
  10. package/dist_ts/dto/billing.js +2 -0
  11. package/dist_ts/dto/index.d.ts +9 -0
  12. package/dist_ts/dto/index.js +10 -0
  13. package/dist_ts/dto/invitation.d.ts +18 -0
  14. package/dist_ts/dto/invitation.js +2 -0
  15. package/dist_ts/dto/mfa.d.ts +21 -0
  16. package/dist_ts/dto/mfa.js +2 -0
  17. package/dist_ts/dto/organization.d.ts +30 -0
  18. package/dist_ts/dto/organization.js +2 -0
  19. package/dist_ts/dto/passport.d.ts +70 -0
  20. package/dist_ts/dto/passport.js +2 -0
  21. package/dist_ts/dto/user.d.ts +25 -0
  22. package/dist_ts/dto/user.js +2 -0
  23. package/dist_ts/index.d.ts +2 -1
  24. package/dist_ts/index.js +3 -2
  25. package/dist_ts/request/admin.d.ts +4 -4
  26. package/dist_ts/request/admin.js +2 -2
  27. package/dist_ts/request/alert.d.ts +5 -4
  28. package/dist_ts/request/alert.js +2 -1
  29. package/dist_ts/request/app.d.ts +5 -4
  30. package/dist_ts/request/app.js +2 -1
  31. package/dist_ts/request/authorization.d.ts +0 -13
  32. package/dist_ts/request/authorization.js +1 -2
  33. package/dist_ts/request/billingplan.d.ts +4 -7
  34. package/dist_ts/request/billingplan.js +2 -2
  35. package/dist_ts/request/mfa.d.ts +3 -2
  36. package/dist_ts/request/mfa.js +2 -1
  37. package/dist_ts/request/organization.d.ts +8 -8
  38. package/dist_ts/request/organization.js +2 -1
  39. package/dist_ts/request/passport.d.ts +11 -26
  40. package/dist_ts/request/passport.js +2 -1
  41. package/dist_ts/request/plan.d.ts +2 -2
  42. package/dist_ts/request/plan.js +2 -2
  43. package/dist_ts/request/registration.d.ts +2 -1
  44. package/dist_ts/request/registration.js +2 -1
  45. package/dist_ts/request/user.d.ts +6 -6
  46. package/dist_ts/request/user.js +2 -1
  47. package/dist_ts/request/userinvitation.d.ts +8 -11
  48. package/dist_ts/request/userinvitation.js +2 -1
  49. package/package.json +1 -1
  50. package/ts/00_commitinfo_data.ts +1 -1
  51. package/ts/dto/activity.ts +14 -0
  52. package/ts/dto/alert.ts +46 -0
  53. package/ts/dto/app.ts +39 -0
  54. package/ts/dto/billing.ts +26 -0
  55. package/ts/dto/index.ts +9 -0
  56. package/ts/dto/invitation.ts +19 -0
  57. package/ts/dto/mfa.ts +27 -0
  58. package/ts/dto/organization.ts +34 -0
  59. package/ts/dto/passport.ts +82 -0
  60. package/ts/dto/user.ts +27 -0
  61. package/ts/index.ts +2 -1
  62. package/ts/request/admin.ts +4 -4
  63. package/ts/request/alert.ts +5 -4
  64. package/ts/request/app.ts +5 -4
  65. package/ts/request/authorization.ts +0 -18
  66. package/ts/request/billingplan.ts +4 -7
  67. package/ts/request/mfa.ts +3 -2
  68. package/ts/request/organization.ts +8 -7
  69. package/ts/request/passport.ts +11 -23
  70. package/ts/request/plan.ts +2 -2
  71. package/ts/request/registration.ts +2 -1
  72. package/ts/request/user.ts +10 -5
  73. package/ts/request/userinvitation.ts +8 -10
@@ -1,4 +1,4 @@
1
- import * as data from '../data/index.js';
1
+ import * as dto from '../dto/index.js';
2
2
  import * as plugins from '../plugins.js';
3
3
  export interface IReq_GetOrganizationById extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetOrganizationById> {
4
4
  method: 'getOrganizationById';
@@ -7,7 +7,7 @@ export interface IReq_GetOrganizationById extends plugins.typedRequestInterfaces
7
7
  id: string;
8
8
  };
9
9
  response: {
10
- organization: data.IOrganization;
10
+ organization: dto.IOrganizationDto;
11
11
  };
12
12
  }
13
13
  export interface IReq_CreateOrganization extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_CreateOrganization> {
@@ -21,8 +21,8 @@ export interface IReq_CreateOrganization extends plugins.typedRequestInterfaces.
21
21
  };
22
22
  response: {
23
23
  nameAvailable: boolean;
24
- resultingOrganization?: data.IOrganization;
25
- role?: data.IRole;
24
+ resultingOrganization?: dto.IOrganizationDto;
25
+ role?: dto.IRoleDto;
26
26
  };
27
27
  }
28
28
  export interface IReq_UpdateOrganization extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_UpdateOrganization> {
@@ -36,7 +36,7 @@ export interface IReq_UpdateOrganization extends plugins.typedRequestInterfaces.
36
36
  };
37
37
  response: {
38
38
  success: boolean;
39
- organization: data.IOrganization;
39
+ organization: dto.IOrganizationDto;
40
40
  message?: string;
41
41
  };
42
42
  }
@@ -60,7 +60,7 @@ export interface IReq_GetOrgRoleDefinitions extends plugins.typedRequestInterfac
60
60
  organizationId: string;
61
61
  };
62
62
  response: {
63
- roleDefinitions: data.IOrgRoleDefinition[];
63
+ roleDefinitions: dto.IOrgRoleDefinitionDto[];
64
64
  };
65
65
  }
66
66
  export interface IReq_UpsertOrgRoleDefinition extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_UpsertOrgRoleDefinition> {
@@ -76,7 +76,7 @@ export interface IReq_UpsertOrgRoleDefinition extends plugins.typedRequestInterf
76
76
  };
77
77
  response: {
78
78
  success: boolean;
79
- roleDefinitions: data.IOrgRoleDefinition[];
79
+ roleDefinitions: dto.IOrgRoleDefinitionDto[];
80
80
  message?: string;
81
81
  };
82
82
  }
@@ -90,7 +90,7 @@ export interface IReq_DeleteOrgRoleDefinition extends plugins.typedRequestInterf
90
90
  };
91
91
  response: {
92
92
  success: boolean;
93
- roleDefinitions: data.IOrgRoleDefinition[];
93
+ roleDefinitions: dto.IOrgRoleDefinitionDto[];
94
94
  message?: string;
95
95
  };
96
96
  }
@@ -1,3 +1,4 @@
1
1
  import * as data from '../data/index.js';
2
+ import * as dto from '../dto/index.js';
2
3
  import * as plugins from '../plugins.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JnYW5pemF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdC9vcmdhbml6YXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLElBQUksTUFBTSxrQkFBa0IsQ0FBQztBQUN6QyxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQyJ9
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JnYW5pemF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdC9vcmdhbml6YXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLElBQUksTUFBTSxrQkFBa0IsQ0FBQztBQUN6QyxPQUFPLEtBQUssR0FBRyxNQUFNLGlCQUFpQixDQUFDO0FBQ3ZDLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDIn0=
@@ -1,5 +1,6 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import * as data from '../data/index.js';
3
+ import * as dto from '../dto/index.js';
3
4
  export interface IPassportDeviceSignedRequest {
4
5
  deviceId: string;
5
6
  timestamp: number;
@@ -37,7 +38,7 @@ export interface IReq_CompletePassportEnrollment extends plugins.typedRequestInt
37
38
  capabilities?: Partial<data.IPassportCapabilities>;
38
39
  };
39
40
  response: {
40
- device: data.IPassportDevice;
41
+ device: dto.IPassportDeviceDto;
41
42
  };
42
43
  }
43
44
  export interface IReq_GetPassportDevices extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetPassportDevices> {
@@ -46,7 +47,7 @@ export interface IReq_GetPassportDevices extends plugins.typedRequestInterfaces.
46
47
  jwt: string;
47
48
  };
48
49
  response: {
49
- devices: data.IPassportDevice[];
50
+ devices: dto.IPassportDeviceDto[];
50
51
  };
51
52
  }
52
53
  export interface IReq_RevokePassportDevice extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_RevokePassportDevice> {
@@ -91,7 +92,7 @@ export interface IReq_ApprovePassportChallenge extends plugins.typedRequestInter
91
92
  };
92
93
  response: {
93
94
  success: boolean;
94
- challenge: data.IPassportChallenge;
95
+ challenge: dto.IPassportChallengeDto;
95
96
  };
96
97
  }
97
98
  export interface IReq_RejectPassportChallenge extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_RejectPassportChallenge> {
@@ -101,7 +102,7 @@ export interface IReq_RejectPassportChallenge extends plugins.typedRequestInterf
101
102
  };
102
103
  response: {
103
104
  success: boolean;
104
- challenge: data.IPassportChallenge;
105
+ challenge: dto.IPassportChallengeDto;
105
106
  };
106
107
  }
107
108
  export interface IReq_RegisterPassportPushToken extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_RegisterPassportPushToken> {
@@ -120,7 +121,7 @@ export interface IReq_ListPendingPassportChallenges extends plugins.typedRequest
120
121
  method: 'listPendingPassportChallenges';
121
122
  request: IPassportDeviceSignedRequest;
122
123
  response: {
123
- challenges: data.IPassportChallenge[];
124
+ challenges: dto.IPassportChallengeDto[];
124
125
  };
125
126
  }
126
127
  export interface IReq_GetPassportChallengeByHint extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetPassportChallengeByHint> {
@@ -129,10 +130,7 @@ export interface IReq_GetPassportChallengeByHint extends plugins.typedRequestInt
129
130
  hintId: string;
130
131
  };
131
132
  response: {
132
- challenge?: {
133
- challenge: data.IPassportChallenge;
134
- signingPayload: string;
135
- };
133
+ challenge?: dto.IPassportChallengeSigningDto;
136
134
  };
137
135
  }
138
136
  export interface IReq_MarkPassportChallengeSeen extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_MarkPassportChallengeSeen> {
@@ -148,22 +146,9 @@ export interface IReq_GetPassportDashboard extends plugins.typedRequestInterface
148
146
  method: 'getPassportDashboard';
149
147
  request: IPassportDeviceSignedRequest;
150
148
  response: {
151
- profile: {
152
- userId: string;
153
- name: string;
154
- handle: string;
155
- organizations: Array<{
156
- id: string;
157
- name: string;
158
- }>;
159
- deviceCount: number;
160
- recoverySummary: string;
161
- };
162
- devices: data.IPassportDevice[];
163
- challenges: Array<{
164
- challenge: data.IPassportChallenge;
165
- signingPayload: string;
166
- }>;
167
- alerts: data.IAlert[];
149
+ profile: dto.IPassportDashboardDto['profile'];
150
+ devices: dto.IPassportDashboardDto['devices'];
151
+ challenges: dto.IPassportDashboardDto['challenges'];
152
+ alerts: dto.IPassportDashboardDto['alerts'];
168
153
  };
169
154
  }
@@ -1,3 +1,4 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import * as data from '../data/index.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFzc3BvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0L3Bhc3Nwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxJQUFJLE1BQU0sa0JBQWtCLENBQUMifQ==
3
+ import * as dto from '../dto/index.js';
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFzc3BvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0L3Bhc3Nwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxJQUFJLE1BQU0sa0JBQWtCLENBQUM7QUFDekMsT0FBTyxLQUFLLEdBQUcsTUFBTSxpQkFBaUIsQ0FBQyJ9
@@ -1,4 +1,4 @@
1
- import * as data from '../data/index.js';
1
+ import * as dto from '../dto/index.js';
2
2
  import * as plugins from '../plugins.js';
3
3
  export interface IReq_GetPlansForOrganizationId extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetPlansForOrganizationId> {
4
4
  method: 'getBillingPlansForOrganizationId';
@@ -7,6 +7,6 @@ export interface IReq_GetPlansForOrganizationId extends plugins.typedRequestInte
7
7
  organizationId: string;
8
8
  };
9
9
  response: {
10
- billingPlans: data.IBillingPlan[];
10
+ billingPlans: dto.IBillingPlanDto[];
11
11
  };
12
12
  }
@@ -1,3 +1,3 @@
1
- import * as data from '../data/index.js';
1
+ import * as dto from '../dto/index.js';
2
2
  import * as plugins from '../plugins.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3QvcGxhbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssSUFBSSxNQUFNLGtCQUFrQixDQUFDO0FBQ3pDLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDIn0=
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3QvcGxhbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssR0FBRyxNQUFNLGlCQUFpQixDQUFDO0FBQ3ZDLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDIn0=
@@ -1,4 +1,5 @@
1
1
  import * as plugins from '../plugins.js';
2
+ import * as dto from '../dto/index.js';
2
3
  import { type IUser } from '../data/index.js';
3
4
  export interface IReq_FirstRegistration extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_FirstRegistration> {
4
5
  method: 'firstRegistrationRequest';
@@ -60,6 +61,6 @@ export interface IReq_FinishRegistration extends plugins.typedRequestInterfaces.
60
61
  };
61
62
  response: {
62
63
  status: 'ok' | 'not ok';
63
- userData?: IUser['data'];
64
+ accountData?: dto.IUserProfileDto;
64
65
  };
65
66
  }
@@ -1,3 +1,4 @@
1
1
  import * as plugins from '../plugins.js';
2
+ import * as dto from '../dto/index.js';
2
3
  import {} from '../data/index.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0cmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdC9yZWdpc3RyYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFjLE1BQU0sa0JBQWtCLENBQUMifQ==
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0cmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdC9yZWdpc3RyYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxLQUFLLEdBQUcsTUFBTSxpQkFBaUIsQ0FBQztBQUN2QyxPQUFPLEVBQWMsTUFBTSxrQkFBa0IsQ0FBQyJ9
@@ -1,4 +1,4 @@
1
- import * as data from '../data/index.js';
1
+ import * as dto from '../dto/index.js';
2
2
  import * as plugins from '../plugins.js';
3
3
  export interface IReq_GetUserData extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetUserData> {
4
4
  method: 'getUserData';
@@ -45,17 +45,17 @@ export interface IReq_GetRolesAndOrganizationsForUserId extends plugins.typedReq
45
45
  userId: string;
46
46
  };
47
47
  response: {
48
- roles: data.IRole[];
49
- organizations: data.IOrganization[];
48
+ roles: dto.IRoleDto[];
49
+ organizations: dto.IOrganizationDto[];
50
50
  };
51
51
  }
52
- export interface IReq_WhoIs {
52
+ export interface IReq_WhoIs extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_WhoIs> {
53
53
  method: 'whoIs';
54
54
  request: {
55
55
  jwt: string;
56
56
  };
57
57
  response: {
58
- user: data.IUser;
58
+ user: dto.ICurrentUserDto;
59
59
  };
60
60
  }
61
61
  export interface IReq_GetUserSessions extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetUserSessions> {
@@ -95,7 +95,7 @@ export interface IReq_GetUserActivity extends plugins.typedRequestInterfaces.imp
95
95
  offset?: number;
96
96
  };
97
97
  response: {
98
- activities: data.IActivityLog[];
98
+ activities: dto.IActivityEventDto[];
99
99
  total: number;
100
100
  };
101
101
  }
@@ -1,3 +1,4 @@
1
1
  import * as data from '../data/index.js';
2
+ import * as dto from '../dto/index.js';
2
3
  import * as plugins from '../plugins.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3QvdXNlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssSUFBSSxNQUFNLGtCQUFrQixDQUFDO0FBQ3pDLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDIn0=
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3QvdXNlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssSUFBSSxNQUFNLGtCQUFrQixDQUFDO0FBQ3pDLE9BQU8sS0FBSyxHQUFHLE1BQU0saUJBQWlCLENBQUM7QUFDdkMsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUMifQ==
@@ -1,4 +1,4 @@
1
- import * as data from '../data/index.js';
1
+ import * as dto from '../dto/index.js';
2
2
  import * as plugins from '../plugins.js';
3
3
  /**
4
4
  * Create an invitation to join an organization
@@ -13,7 +13,7 @@ export interface IReq_CreateInvitation extends plugins.typedRequestInterfaces.im
13
13
  };
14
14
  response: {
15
15
  success: boolean;
16
- invitation?: data.IUserInvitation;
16
+ invitation?: dto.IUserInvitationDto;
17
17
  message?: string;
18
18
  /** True if a new invitation was created, false if email was added to existing */
19
19
  isNew: boolean;
@@ -29,7 +29,7 @@ export interface IReq_GetOrgInvitations extends plugins.typedRequestInterfaces.i
29
29
  organizationId: string;
30
30
  };
31
31
  response: {
32
- invitations: data.IUserInvitation[];
32
+ invitations: dto.IUserInvitationDto[];
33
33
  };
34
34
  }
35
35
  /**
@@ -42,10 +42,7 @@ export interface IReq_GetOrgMembers extends plugins.typedRequestInterfaces.imple
42
42
  organizationId: string;
43
43
  };
44
44
  response: {
45
- members: Array<{
46
- user: data.IUser;
47
- role: data.IRole;
48
- }>;
45
+ members: dto.IOrgMemberDto[];
49
46
  };
50
47
  }
51
48
  /**
@@ -106,7 +103,7 @@ export interface IReq_UpdateMemberRoles extends plugins.typedRequestInterfaces.i
106
103
  };
107
104
  response: {
108
105
  success: boolean;
109
- role?: data.IRole;
106
+ role?: dto.IRoleDto;
110
107
  message?: string;
111
108
  };
112
109
  }
@@ -137,8 +134,8 @@ export interface IReq_AcceptInvitation extends plugins.typedRequestInterfaces.im
137
134
  };
138
135
  response: {
139
136
  success: boolean;
140
- organizations?: data.IOrganization[];
141
- roles?: data.IRole[];
137
+ organizations?: dto.IOrganizationDto[];
138
+ roles?: dto.IRoleDto[];
142
139
  message?: string;
143
140
  };
144
141
  }
@@ -151,7 +148,7 @@ export interface IReq_GetInvitationByToken extends plugins.typedRequestInterface
151
148
  token: string;
152
149
  };
153
150
  response: {
154
- invitation?: data.IUserInvitation;
151
+ invitation?: dto.IInvitationLandingDto;
155
152
  organizations?: Array<{
156
153
  id: string;
157
154
  name: string;
@@ -1,3 +1,4 @@
1
1
  import * as data from '../data/index.js';
2
+ import * as dto from '../dto/index.js';
2
3
  import * as plugins from '../plugins.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlcmludml0YXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0L3VzZXJpbnZpdGF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxJQUFJLE1BQU0sa0JBQWtCLENBQUM7QUFDekMsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUMifQ==
4
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlcmludml0YXRpb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0L3VzZXJpbnZpdGF0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxJQUFJLE1BQU0sa0JBQWtCLENBQUM7QUFDekMsT0FBTyxLQUFLLEdBQUcsTUFBTSxpQkFBaUIsQ0FBQztBQUN2QyxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQyJ9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idp.global/interfaces",
3
- "version": "4.0.0",
3
+ "version": "5.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: '4.0.0',
6
+ version: '5.0.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  }
@@ -0,0 +1,14 @@
1
+ import type { TActivityAction } from '../data/activity.js';
2
+
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
+ }
@@ -0,0 +1,46 @@
1
+ import type {
2
+ TAlertCategory,
3
+ TAlertNotificationStatus,
4
+ TAlertSeverity,
5
+ TAlertStatus,
6
+ } from '../data/alert.js';
7
+ import type { TAlertRuleRecipientMode, TAlertRuleScope } from '../data/alertrule.js';
8
+
9
+ export interface IAlertDto {
10
+ id: string;
11
+ data: {
12
+ organizationId?: string;
13
+ category: TAlertCategory;
14
+ eventType: string;
15
+ severity: TAlertSeverity;
16
+ title: string;
17
+ body: string;
18
+ status: TAlertStatus;
19
+ relatedEntityType?: string;
20
+ notification: {
21
+ status: TAlertNotificationStatus;
22
+ createdAt: number;
23
+ deliveredAt?: number | null;
24
+ seenAt?: number | null;
25
+ };
26
+ createdAt: number;
27
+ seenAt?: number | null;
28
+ dismissedAt?: number | null;
29
+ };
30
+ }
31
+
32
+ export interface IAlertRuleDto {
33
+ id: string;
34
+ data: {
35
+ scope: TAlertRuleScope;
36
+ organizationId?: string;
37
+ eventType: string;
38
+ minimumSeverity: TAlertSeverity;
39
+ recipientMode: TAlertRuleRecipientMode;
40
+ recipientUserIds?: string[];
41
+ push: boolean;
42
+ enabled: boolean;
43
+ createdAt: number;
44
+ updatedAt: number;
45
+ };
46
+ }
package/ts/dto/app.ts ADDED
@@ -0,0 +1,39 @@
1
+ import type { IAppRoleMapping } from '../data/role.js';
2
+ import type { TAppType } from '../data/app.js';
3
+
4
+ export interface IOAuthClientDto {
5
+ clientId: string;
6
+ redirectUris: string[];
7
+ allowedScopes: string[];
8
+ grantTypes: ('authorization_code' | 'client_credentials' | 'refresh_token')[];
9
+ }
10
+
11
+ export interface IGlobalAppDto {
12
+ id: string;
13
+ type: 'global';
14
+ data: {
15
+ name: string;
16
+ description: string;
17
+ logoUrl: string;
18
+ appUrl: string;
19
+ oauthCredentials: IOAuthClientDto;
20
+ isActive: boolean;
21
+ category: string;
22
+ createdAt: number;
23
+ };
24
+ }
25
+
26
+ export interface IAppDto extends IGlobalAppDto {}
27
+
28
+ export interface IAppConnectionDto {
29
+ id: string;
30
+ data: {
31
+ organizationId: string;
32
+ appId: string;
33
+ appType: TAppType;
34
+ status: 'active' | 'disconnected';
35
+ connectedAt: number;
36
+ grantedScopes: string[];
37
+ roleMappings?: IAppRoleMapping[];
38
+ };
39
+ }
@@ -0,0 +1,26 @@
1
+ import type { IBillableItem, IBillingPlan, TSupportedCurrency } from '../data/billingplan.js';
2
+
3
+ export interface IBillingEventDto {
4
+ timestamp: number;
5
+ amount: number;
6
+ currency: TSupportedCurrency;
7
+ billedItems: IBillableItem[];
8
+ }
9
+
10
+ export interface IBillingPlanDto {
11
+ id: string;
12
+ data: {
13
+ type: IBillingPlan['data']['type'];
14
+ proEnabled: boolean;
15
+ organizationId: string;
16
+ seats?: number;
17
+ status?: IBillingPlan['data']['status'];
18
+ nextBilling?: IBillingPlan['data']['nextBilling'];
19
+ billingEvents?: IBillingEventDto[];
20
+ };
21
+ }
22
+
23
+ export interface IPaddlePublicConfigDto {
24
+ paddleToken: string;
25
+ paddlePriceId: string;
26
+ }
@@ -0,0 +1,9 @@
1
+ export * from './activity.js';
2
+ export * from './alert.js';
3
+ export * from './app.js';
4
+ export * from './billing.js';
5
+ export * from './invitation.js';
6
+ export * from './mfa.js';
7
+ export * from './organization.js';
8
+ export * from './passport.js';
9
+ export * from './user.js';
@@ -0,0 +1,19 @@
1
+ export interface IOrganizationInvitationRefDto {
2
+ organizationId: string;
3
+ invitedAt: number;
4
+ roles: string[];
5
+ }
6
+
7
+ export interface IUserInvitationDto {
8
+ id: string;
9
+ data: {
10
+ email: string;
11
+ status: 'pending' | 'accepted' | 'expired' | 'cancelled';
12
+ createdAt: number;
13
+ expiresAt: number;
14
+ organizationRefs: IOrganizationInvitationRefDto[];
15
+ acceptedAt?: number;
16
+ };
17
+ }
18
+
19
+ export interface IInvitationLandingDto extends IUserInvitationDto {}
package/ts/dto/mfa.ts ADDED
@@ -0,0 +1,27 @@
1
+ import type { TMfaMethod } from '../data/mfa.js';
2
+ import type {
3
+ TPasskeyCredentialStatus,
4
+ TPasskeyDeviceType,
5
+ TPasskeyTransport,
6
+ } from '../data/passkey.js';
7
+
8
+ export interface IPasskeyCredentialDto {
9
+ id: string;
10
+ data: {
11
+ label: string;
12
+ deviceType: TPasskeyDeviceType;
13
+ backedUp: boolean;
14
+ transports?: TPasskeyTransport[];
15
+ status: TPasskeyCredentialStatus;
16
+ createdAt: number;
17
+ lastUsedAt?: number | null;
18
+ revokedAt?: number | null;
19
+ };
20
+ }
21
+
22
+ export interface IMfaStatusDto {
23
+ totpEnabled: boolean;
24
+ backupCodesRemaining: number;
25
+ passkeys: IPasskeyCredentialDto[];
26
+ availableMethods: TMfaMethod[];
27
+ }
@@ -0,0 +1,34 @@
1
+ import type { IUserDto } from './user.js';
2
+
3
+ export interface IOrgRoleDefinitionDto {
4
+ key: string;
5
+ name: string;
6
+ description?: string;
7
+ createdAt: number;
8
+ updatedAt: number;
9
+ }
10
+
11
+ export interface IOrganizationDto {
12
+ id: string;
13
+ data: {
14
+ name: string;
15
+ slug: string;
16
+ billingPlanId: string;
17
+ roleIds: string[];
18
+ roleDefinitions?: IOrgRoleDefinitionDto[];
19
+ };
20
+ }
21
+
22
+ export interface IRoleDto {
23
+ id: string;
24
+ data: {
25
+ userId: string;
26
+ organizationId: string;
27
+ roles: string[];
28
+ };
29
+ }
30
+
31
+ export interface IOrgMemberDto {
32
+ user: IUserDto;
33
+ role: IRoleDto;
34
+ }
@@ -0,0 +1,82 @@
1
+ import type {
2
+ IPassportCapabilities,
3
+ TPassportDevicePlatform,
4
+ TPassportDeviceStatus,
5
+ TPassportPushEnvironment,
6
+ TPassportPushProvider,
7
+ } from '../data/passportdevice.js';
8
+ import type {
9
+ IPassportLocationPolicy,
10
+ TPassportChallengeDeliveryStatus,
11
+ TPassportChallengeStatus,
12
+ TPassportChallengeType,
13
+ } from '../data/passportchallenge.js';
14
+ import type { IAlertDto } from './alert.js';
15
+
16
+ export interface IPassportDeviceDto {
17
+ id: string;
18
+ data: {
19
+ label: string;
20
+ platform: TPassportDevicePlatform;
21
+ status: TPassportDeviceStatus;
22
+ capabilities: IPassportCapabilities;
23
+ pushRegistration?: {
24
+ provider: TPassportPushProvider;
25
+ topic: string;
26
+ environment: TPassportPushEnvironment;
27
+ registeredAt: number;
28
+ lastDeliveredAt?: number;
29
+ };
30
+ appVersion?: string;
31
+ createdAt: number;
32
+ lastSeenAt?: number;
33
+ lastChallengeAt?: number;
34
+ };
35
+ }
36
+
37
+ export interface IPassportChallengeDto {
38
+ id: string;
39
+ data: {
40
+ type: TPassportChallengeType;
41
+ status: TPassportChallengeStatus;
42
+ challenge?: string;
43
+ metadata: {
44
+ originHost?: string;
45
+ audience?: string;
46
+ notificationTitle?: string;
47
+ deviceLabel?: string;
48
+ requireLocation: boolean;
49
+ requireNfc: boolean;
50
+ locationPolicy?: IPassportLocationPolicy;
51
+ requestedCapabilities?: Partial<IPassportCapabilities>;
52
+ };
53
+ notification?: {
54
+ status: TPassportChallengeDeliveryStatus;
55
+ createdAt: number;
56
+ deliveredAt?: number | null;
57
+ seenAt?: number | null;
58
+ };
59
+ createdAt: number;
60
+ expiresAt: number;
61
+ completedAt?: number | null;
62
+ };
63
+ }
64
+
65
+ export interface IPassportChallengeSigningDto {
66
+ challenge: IPassportChallengeDto;
67
+ signingPayload: string;
68
+ }
69
+
70
+ export interface IPassportDashboardDto {
71
+ profile: {
72
+ userId: string;
73
+ name: string;
74
+ handle: string;
75
+ organizations: Array<{ id: string; name: string }>;
76
+ deviceCount: number;
77
+ recoverySummary: string;
78
+ };
79
+ devices: IPassportDeviceDto[];
80
+ challenges: IPassportChallengeSigningDto[];
81
+ alerts: IAlertDto[];
82
+ }