@idp.global/interfaces 4.0.0 → 6.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 (75) hide show
  1. package/changelog.md +17 -0
  2. package/dist_ts/00_commitinfo_data.js +1 -1
  3. package/dist_ts/data/activity.d.ts +1 -1
  4. package/dist_ts/dto/activity.d.ts +13 -0
  5. package/dist_ts/dto/activity.js +2 -0
  6. package/dist_ts/dto/alert.d.ts +39 -0
  7. package/dist_ts/dto/alert.js +2 -0
  8. package/dist_ts/dto/app.d.ts +36 -0
  9. package/dist_ts/dto/app.js +2 -0
  10. package/dist_ts/dto/billing.d.ts +23 -0
  11. package/dist_ts/dto/billing.js +2 -0
  12. package/dist_ts/dto/index.d.ts +9 -0
  13. package/dist_ts/dto/index.js +10 -0
  14. package/dist_ts/dto/invitation.d.ts +18 -0
  15. package/dist_ts/dto/invitation.js +2 -0
  16. package/dist_ts/dto/mfa.d.ts +21 -0
  17. package/dist_ts/dto/mfa.js +2 -0
  18. package/dist_ts/dto/organization.d.ts +30 -0
  19. package/dist_ts/dto/organization.js +2 -0
  20. package/dist_ts/dto/passport.d.ts +70 -0
  21. package/dist_ts/dto/passport.js +2 -0
  22. package/dist_ts/dto/user.d.ts +25 -0
  23. package/dist_ts/dto/user.js +2 -0
  24. package/dist_ts/index.d.ts +2 -1
  25. package/dist_ts/index.js +3 -2
  26. package/dist_ts/request/admin.d.ts +4 -4
  27. package/dist_ts/request/admin.js +2 -2
  28. package/dist_ts/request/alert.d.ts +5 -4
  29. package/dist_ts/request/alert.js +2 -1
  30. package/dist_ts/request/app.d.ts +5 -4
  31. package/dist_ts/request/app.js +2 -1
  32. package/dist_ts/request/authorization.d.ts +0 -13
  33. package/dist_ts/request/authorization.js +1 -2
  34. package/dist_ts/request/billingplan.d.ts +4 -7
  35. package/dist_ts/request/billingplan.js +2 -2
  36. package/dist_ts/request/mfa.d.ts +3 -2
  37. package/dist_ts/request/mfa.js +2 -1
  38. package/dist_ts/request/organization.d.ts +8 -8
  39. package/dist_ts/request/organization.js +2 -1
  40. package/dist_ts/request/passport.d.ts +11 -26
  41. package/dist_ts/request/passport.js +2 -1
  42. package/dist_ts/request/plan.d.ts +2 -2
  43. package/dist_ts/request/plan.js +2 -2
  44. package/dist_ts/request/registration.d.ts +2 -1
  45. package/dist_ts/request/registration.js +2 -1
  46. package/dist_ts/request/user.d.ts +6 -34
  47. package/dist_ts/request/user.js +2 -1
  48. package/dist_ts/request/userinvitation.d.ts +8 -11
  49. package/dist_ts/request/userinvitation.js +2 -1
  50. package/package.json +1 -1
  51. package/ts/00_commitinfo_data.ts +1 -1
  52. package/ts/data/activity.ts +2 -1
  53. package/ts/dto/activity.ts +14 -0
  54. package/ts/dto/alert.ts +46 -0
  55. package/ts/dto/app.ts +39 -0
  56. package/ts/dto/billing.ts +26 -0
  57. package/ts/dto/index.ts +9 -0
  58. package/ts/dto/invitation.ts +19 -0
  59. package/ts/dto/mfa.ts +27 -0
  60. package/ts/dto/organization.ts +34 -0
  61. package/ts/dto/passport.ts +82 -0
  62. package/ts/dto/user.ts +27 -0
  63. package/ts/index.ts +2 -1
  64. package/ts/request/admin.ts +4 -4
  65. package/ts/request/alert.ts +5 -4
  66. package/ts/request/app.ts +5 -4
  67. package/ts/request/authorization.ts +0 -18
  68. package/ts/request/billingplan.ts +4 -7
  69. package/ts/request/mfa.ts +3 -2
  70. package/ts/request/organization.ts +8 -7
  71. package/ts/request/passport.ts +11 -23
  72. package/ts/request/plan.ts +2 -2
  73. package/ts/request/registration.ts +2 -1
  74. package/ts/request/user.ts +10 -48
  75. package/ts/request/userinvitation.ts +8 -10
@@ -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
+ }
package/ts/dto/user.ts ADDED
@@ -0,0 +1,27 @@
1
+ export interface IUserDataDto {
2
+ name: string;
3
+ username: string;
4
+ email: string;
5
+ mobileNumber?: string;
6
+ status: 'new' | 'active' | 'deleted' | 'suspended';
7
+ connectedOrgs: string[];
8
+ isGlobalAdmin?: boolean;
9
+ }
10
+
11
+ export interface IUserDto {
12
+ id: string;
13
+ data: IUserDataDto;
14
+ }
15
+
16
+ export interface ICurrentUserDto extends IUserDto {}
17
+
18
+ export interface IUserProfileDto {
19
+ id: string;
20
+ data: {
21
+ name: string;
22
+ username: string;
23
+ email: string;
24
+ mobileNumber?: string;
25
+ status?: IUserDataDto['status'];
26
+ };
27
+ }
package/ts/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  // requests
2
2
  import * as request from './request/index.js';
3
3
  import * as data from './data/index.js';
4
+ import * as dto from './dto/index.js';
4
5
  import * as tags from './tags/index.js';
5
6
 
6
- export { request, data, tags };
7
+ export { request, data, dto, tags };
@@ -1,5 +1,5 @@
1
1
  import * as plugins from '../plugins.js';
2
- import * as data from '../data/index.js';
2
+ import * as dto from '../dto/index.js';
3
3
 
4
4
  /**
5
5
  * Check if the current user is a global admin
@@ -32,7 +32,7 @@ export interface IReq_GetGlobalAppStats
32
32
  };
33
33
  response: {
34
34
  apps: Array<{
35
- app: data.IGlobalApp;
35
+ app: dto.IGlobalAppDto;
36
36
  connectionCount: number;
37
37
  }>;
38
38
  };
@@ -58,7 +58,7 @@ export interface IReq_CreateGlobalApp
58
58
  allowedScopes: string[];
59
59
  };
60
60
  response: {
61
- app: data.IGlobalApp;
61
+ app: dto.IGlobalAppDto;
62
62
  clientSecret: string; // Only shown once on creation
63
63
  };
64
64
  }
@@ -87,7 +87,7 @@ export interface IReq_UpdateGlobalApp
87
87
  };
88
88
  };
89
89
  response: {
90
- app: data.IGlobalApp;
90
+ app: dto.IGlobalAppDto;
91
91
  };
92
92
  }
93
93
 
@@ -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
  import type { IPassportDeviceSignedRequest } from './passport.js';
4
5
 
5
6
  export interface IReq_ListPassportAlerts
@@ -12,7 +13,7 @@ export interface IReq_ListPassportAlerts
12
13
  includeDismissed?: boolean;
13
14
  };
14
15
  response: {
15
- alerts: data.IAlert[];
16
+ alerts: dto.IAlertDto[];
16
17
  };
17
18
  }
18
19
 
@@ -26,7 +27,7 @@ export interface IReq_GetPassportAlertByHint
26
27
  hintId: string;
27
28
  };
28
29
  response: {
29
- alert?: data.IAlert;
30
+ alert?: dto.IAlertDto;
30
31
  };
31
32
  }
32
33
 
@@ -77,7 +78,7 @@ export interface IReq_UpsertAlertRule
77
78
  enabled: boolean;
78
79
  };
79
80
  response: {
80
- rule: data.IAlertRule;
81
+ rule: dto.IAlertRuleDto;
81
82
  };
82
83
  }
83
84
 
@@ -93,7 +94,7 @@ export interface IReq_GetAlertRules
93
94
  organizationId?: string;
94
95
  };
95
96
  response: {
96
- rules: data.IAlertRule[];
97
+ rules: dto.IAlertRuleDto[];
97
98
  };
98
99
  }
99
100
 
package/ts/request/app.ts CHANGED
@@ -1,4 +1,5 @@
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
4
 
4
5
  // Get all global apps
@@ -12,7 +13,7 @@ export interface IReq_GetGlobalApps
12
13
  jwt: string;
13
14
  };
14
15
  response: {
15
- apps: data.IGlobalApp[];
16
+ apps: dto.IGlobalAppDto[];
16
17
  };
17
18
  }
18
19
 
@@ -28,7 +29,7 @@ export interface IReq_GetAppConnections
28
29
  organizationId: string;
29
30
  };
30
31
  response: {
31
- connections: data.IAppConnection[];
32
+ connections: dto.IAppConnectionDto[];
32
33
  };
33
34
  }
34
35
 
@@ -47,7 +48,7 @@ export interface IReq_ToggleAppConnection
47
48
  };
48
49
  response: {
49
50
  success: boolean;
50
- connection?: data.IAppConnection;
51
+ connection?: dto.IAppConnectionDto;
51
52
  };
52
53
  }
53
54
 
@@ -65,7 +66,7 @@ export interface IReq_UpdateAppRoleMappings
65
66
  };
66
67
  response: {
67
68
  success: boolean;
68
- connection: data.IAppConnection;
69
+ connection: dto.IAppConnectionDto;
69
70
  message?: string;
70
71
  };
71
72
  }
@@ -1,24 +1,6 @@
1
1
  import * as plugins from '../plugins.js';
2
- import { type IUser, type IRole } from '../data/index.js';
3
2
  import { type TOidcScope } from '../data/index.js';
4
3
 
5
- export interface IReq_InternalAuthorization
6
- extends plugins.typedRequestInterfaces.implementsTR<
7
- plugins.typedRequestInterfaces.ITypedRequest,
8
- IReq_InternalAuthorization
9
- > {
10
- method: '';
11
- request: {
12
- accountData: IUser;
13
- jwt: string;
14
- };
15
- response: {
16
- accountData: IUser;
17
- jwt: string;
18
- relevantRoles: IRole[];
19
- };
20
- }
21
-
22
4
  export interface IReq_CompleteOidcAuthorization
23
5
  extends plugins.typedRequestInterfaces.implementsTR<
24
6
  plugins.typedRequestInterfaces.ITypedRequest,
@@ -1,5 +1,5 @@
1
1
  import * as plugins from '../plugins.js';
2
- import * as data from '../data/index.js';
2
+ import * as dto from '../dto/index.js';
3
3
 
4
4
  export interface IReq_UpdatePaymentMethod
5
5
  extends plugins.typedRequestInterfaces.implementsTR<
@@ -15,7 +15,7 @@ export interface IReq_UpdatePaymentMethod
15
15
  };
16
16
  };
17
17
  response: {
18
- billingPlan: plugins.tsclass.typeFest.PartialDeep<data.IBillingPlan>;
18
+ billingPlan: dto.IBillingPlanDto;
19
19
  };
20
20
  }
21
21
 
@@ -34,7 +34,7 @@ export interface IReq_GetBillingPlan
34
34
  billingPlanId: string;
35
35
  };
36
36
  response: {
37
- billingPlan: data.IBillingPlan;
37
+ billingPlan: dto.IBillingPlanDto;
38
38
  };
39
39
  }
40
40
 
@@ -48,8 +48,5 @@ export interface IReq_GetPaddleConfig
48
48
  > {
49
49
  method: 'getPaddleConfig';
50
50
  request: {};
51
- response: {
52
- paddleToken: string;
53
- paddlePriceId: string;
54
- };
51
+ response: dto.IPaddlePublicConfigDto;
55
52
  }
package/ts/request/mfa.ts CHANGED
@@ -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
 
4
5
  export interface IReq_GetMfaStatus
5
6
  extends plugins.typedRequestInterfaces.implementsTR<
@@ -13,7 +14,7 @@ export interface IReq_GetMfaStatus
13
14
  response: {
14
15
  totpEnabled: boolean;
15
16
  backupCodesRemaining: number;
16
- passkeys: data.IPasskeyCredential[];
17
+ passkeys: dto.IPasskeyCredentialDto[];
17
18
  availableMethods: data.TMfaMethod[];
18
19
  };
19
20
  }
@@ -127,7 +128,7 @@ export interface IReq_FinishPasskeyRegistration
127
128
  };
128
129
  response: {
129
130
  success: boolean;
130
- passkey: data.IPasskeyCredential;
131
+ passkey: dto.IPasskeyCredentialDto;
131
132
  };
132
133
  }
133
134
 
@@ -1,4 +1,5 @@
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
4
 
4
5
  export interface IReq_GetOrganizationById
@@ -12,7 +13,7 @@ export interface IReq_GetOrganizationById
12
13
  id: string;
13
14
  };
14
15
  response: {
15
- organization: data.IOrganization;
16
+ organization: dto.IOrganizationDto;
16
17
  };
17
18
  }
18
19
 
@@ -31,8 +32,8 @@ export interface IReq_CreateOrganization
31
32
  };
32
33
  response: {
33
34
  nameAvailable: boolean;
34
- resultingOrganization?: data.IOrganization;
35
- role?: data.IRole;
35
+ resultingOrganization?: dto.IOrganizationDto;
36
+ role?: dto.IRoleDto;
36
37
  };
37
38
  }
38
39
 
@@ -51,7 +52,7 @@ export interface IReq_UpdateOrganization
51
52
  };
52
53
  response: {
53
54
  success: boolean;
54
- organization: data.IOrganization;
55
+ organization: dto.IOrganizationDto;
55
56
  message?: string;
56
57
  };
57
58
  }
@@ -85,7 +86,7 @@ export interface IReq_GetOrgRoleDefinitions
85
86
  organizationId: string;
86
87
  };
87
88
  response: {
88
- roleDefinitions: data.IOrgRoleDefinition[];
89
+ roleDefinitions: dto.IOrgRoleDefinitionDto[];
89
90
  };
90
91
  }
91
92
 
@@ -106,7 +107,7 @@ export interface IReq_UpsertOrgRoleDefinition
106
107
  };
107
108
  response: {
108
109
  success: boolean;
109
- roleDefinitions: data.IOrgRoleDefinition[];
110
+ roleDefinitions: dto.IOrgRoleDefinitionDto[];
110
111
  message?: string;
111
112
  };
112
113
  }
@@ -125,7 +126,7 @@ export interface IReq_DeleteOrgRoleDefinition
125
126
  };
126
127
  response: {
127
128
  success: boolean;
128
- roleDefinitions: data.IOrgRoleDefinition[];
129
+ roleDefinitions: dto.IOrgRoleDefinitionDto[];
129
130
  message?: string;
130
131
  };
131
132
  }
@@ -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
 
4
5
  export interface IPassportDeviceSignedRequest {
5
6
  deviceId: string;
@@ -48,7 +49,7 @@ export interface IReq_CompletePassportEnrollment
48
49
  capabilities?: Partial<data.IPassportCapabilities>;
49
50
  };
50
51
  response: {
51
- device: data.IPassportDevice;
52
+ device: dto.IPassportDeviceDto;
52
53
  };
53
54
  }
54
55
 
@@ -62,7 +63,7 @@ export interface IReq_GetPassportDevices
62
63
  jwt: string;
63
64
  };
64
65
  response: {
65
- devices: data.IPassportDevice[];
66
+ devices: dto.IPassportDeviceDto[];
66
67
  };
67
68
  }
68
69
 
@@ -122,7 +123,7 @@ export interface IReq_ApprovePassportChallenge
122
123
  };
123
124
  response: {
124
125
  success: boolean;
125
- challenge: data.IPassportChallenge;
126
+ challenge: dto.IPassportChallengeDto;
126
127
  };
127
128
  }
128
129
 
@@ -137,7 +138,7 @@ export interface IReq_RejectPassportChallenge
137
138
  };
138
139
  response: {
139
140
  success: boolean;
140
- challenge: data.IPassportChallenge;
141
+ challenge: dto.IPassportChallengeDto;
141
142
  };
142
143
  }
143
144
 
@@ -166,7 +167,7 @@ export interface IReq_ListPendingPassportChallenges
166
167
  method: 'listPendingPassportChallenges';
167
168
  request: IPassportDeviceSignedRequest;
168
169
  response: {
169
- challenges: data.IPassportChallenge[];
170
+ challenges: dto.IPassportChallengeDto[];
170
171
  };
171
172
  }
172
173
 
@@ -180,10 +181,7 @@ export interface IReq_GetPassportChallengeByHint
180
181
  hintId: string;
181
182
  };
182
183
  response: {
183
- challenge?: {
184
- challenge: data.IPassportChallenge;
185
- signingPayload: string;
186
- };
184
+ challenge?: dto.IPassportChallengeSigningDto;
187
185
  };
188
186
  }
189
187
 
@@ -209,19 +207,9 @@ export interface IReq_GetPassportDashboard
209
207
  method: 'getPassportDashboard';
210
208
  request: IPassportDeviceSignedRequest;
211
209
  response: {
212
- profile: {
213
- userId: string;
214
- name: string;
215
- handle: string;
216
- organizations: Array<{ id: string; name: string }>;
217
- deviceCount: number;
218
- recoverySummary: string;
219
- };
220
- devices: data.IPassportDevice[];
221
- challenges: Array<{
222
- challenge: data.IPassportChallenge;
223
- signingPayload: string;
224
- }>;
225
- alerts: data.IAlert[];
210
+ profile: dto.IPassportDashboardDto['profile'];
211
+ devices: dto.IPassportDashboardDto['devices'];
212
+ challenges: dto.IPassportDashboardDto['challenges'];
213
+ alerts: dto.IPassportDashboardDto['alerts'];
226
214
  };
227
215
  }
@@ -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
  export interface IReq_GetPlansForOrganizationId
@@ -12,6 +12,6 @@ export interface IReq_GetPlansForOrganizationId
12
12
  organizationId: string;
13
13
  };
14
14
  response: {
15
- billingPlans: data.IBillingPlan[];
15
+ billingPlans: dto.IBillingPlanDto[];
16
16
  };
17
17
  }
@@ -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
 
4
5
  export interface IReq_FirstRegistration
@@ -85,6 +86,6 @@ export interface IReq_FinishRegistration
85
86
  };
86
87
  response: {
87
88
  status: 'ok' | 'not ok';
88
- userData?: IUser['data'];
89
+ accountData?: dto.IUserProfileDto;
89
90
  };
90
91
  }
@@ -1,34 +1,7 @@
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
4
 
4
- export interface IReq_GetUserData
5
- extends plugins.typedRequestInterfaces.implementsTR<
6
- plugins.typedRequestInterfaces.ITypedRequest,
7
- IReq_GetUserData
8
- > {
9
- method: 'getUserData';
10
- request: {
11
- refreshToken: string;
12
- };
13
- response: {
14
- jwt: string;
15
- };
16
- }
17
-
18
- export interface IReq_SetUserData
19
- extends plugins.typedRequestInterfaces.implementsTR<
20
- plugins.typedRequestInterfaces.ITypedRequest,
21
- IReq_SetUserData
22
- > {
23
- method: 'setUserData';
24
- request: {
25
- refreshToken: string;
26
- };
27
- response: {
28
- oneTimeTransferCode: string;
29
- };
30
- }
31
-
32
5
  export interface IReq_SuspendUser
33
6
  extends plugins.typedRequestInterfaces.implementsTR<
34
7
  plugins.typedRequestInterfaces.ITypedRequest,
@@ -44,21 +17,6 @@ export interface IReq_SuspendUser
44
17
  };
45
18
  }
46
19
 
47
- export interface IDeleteSuspendedUser
48
- extends plugins.typedRequestInterfaces.implementsTR<
49
- plugins.typedRequestInterfaces.ITypedRequest,
50
- IDeleteSuspendedUser
51
- > {
52
- method: 'deleteSuspendedUser';
53
- request: {
54
- backendToken: string;
55
- };
56
- response: {
57
- ok: boolean;
58
- errorText?: string;
59
- };
60
- }
61
-
62
20
  export interface IReq_GetRolesAndOrganizationsForUserId
63
21
  extends plugins.typedRequestInterfaces.implementsTR<
64
22
  plugins.typedRequestInterfaces.ITypedRequest,
@@ -70,18 +28,22 @@ export interface IReq_GetRolesAndOrganizationsForUserId
70
28
  userId: string;
71
29
  };
72
30
  response: {
73
- roles: data.IRole[];
74
- organizations: data.IOrganization[];
31
+ roles: dto.IRoleDto[];
32
+ organizations: dto.IOrganizationDto[];
75
33
  };
76
34
  }
77
35
 
78
- export interface IReq_WhoIs {
36
+ export interface IReq_WhoIs
37
+ extends plugins.typedRequestInterfaces.implementsTR<
38
+ plugins.typedRequestInterfaces.ITypedRequest,
39
+ IReq_WhoIs
40
+ > {
79
41
  method: 'whoIs';
80
42
  request: {
81
43
  jwt: string;
82
44
  };
83
45
  response: {
84
- user: data.IUser;
46
+ user: dto.ICurrentUserDto;
85
47
  };
86
48
  }
87
49
 
@@ -136,7 +98,7 @@ export interface IReq_GetUserActivity
136
98
  offset?: number;
137
99
  };
138
100
  response: {
139
- activities: data.IActivityLog[];
101
+ activities: dto.IActivityEventDto[];
140
102
  total: number;
141
103
  };
142
104
  }
@@ -1,4 +1,5 @@
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
4
 
4
5
  /**
@@ -18,7 +19,7 @@ export interface IReq_CreateInvitation
18
19
  };
19
20
  response: {
20
21
  success: boolean;
21
- invitation?: data.IUserInvitation;
22
+ invitation?: dto.IUserInvitationDto;
22
23
  message?: string;
23
24
  /** True if a new invitation was created, false if email was added to existing */
24
25
  isNew: boolean;
@@ -39,7 +40,7 @@ export interface IReq_GetOrgInvitations
39
40
  organizationId: string;
40
41
  };
41
42
  response: {
42
- invitations: data.IUserInvitation[];
43
+ invitations: dto.IUserInvitationDto[];
43
44
  };
44
45
  }
45
46
 
@@ -57,10 +58,7 @@ export interface IReq_GetOrgMembers
57
58
  organizationId: string;
58
59
  };
59
60
  response: {
60
- members: Array<{
61
- user: data.IUser;
62
- role: data.IRole;
63
- }>;
61
+ members: dto.IOrgMemberDto[];
64
62
  };
65
63
  }
66
64
 
@@ -141,7 +139,7 @@ export interface IReq_UpdateMemberRoles
141
139
  };
142
140
  response: {
143
141
  success: boolean;
144
- role?: data.IRole;
142
+ role?: dto.IRoleDto;
145
143
  message?: string;
146
144
  };
147
145
  }
@@ -182,8 +180,8 @@ export interface IReq_AcceptInvitation
182
180
  };
183
181
  response: {
184
182
  success: boolean;
185
- organizations?: data.IOrganization[];
186
- roles?: data.IRole[];
183
+ organizations?: dto.IOrganizationDto[];
184
+ roles?: dto.IRoleDto[];
187
185
  message?: string;
188
186
  };
189
187
  }
@@ -201,7 +199,7 @@ export interface IReq_GetInvitationByToken
201
199
  token: string;
202
200
  };
203
201
  response: {
204
- invitation?: data.IUserInvitation;
202
+ invitation?: dto.IInvitationLandingDto;
205
203
  organizations?: Array<{
206
204
  id: string;
207
205
  name: string;