@idp.global/interfaces 1.0.1

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 (131) hide show
  1. package/changelog.md +16 -0
  2. package/dist_ts/00_commitinfo_data.d.ts +8 -0
  3. package/dist_ts/00_commitinfo_data.js +9 -0
  4. package/dist_ts/data/abusewindow.d.ts +13 -0
  5. package/dist_ts/data/abusewindow.js +2 -0
  6. package/dist_ts/data/activity.d.ts +16 -0
  7. package/dist_ts/data/activity.js +2 -0
  8. package/dist_ts/data/alert.d.ts +31 -0
  9. package/dist_ts/data/alert.js +2 -0
  10. package/dist_ts/data/alertrule.d.ts +19 -0
  11. package/dist_ts/data/alertrule.js +2 -0
  12. package/dist_ts/data/app.d.ts +86 -0
  13. package/dist_ts/data/app.js +2 -0
  14. package/dist_ts/data/appconnection.d.ts +16 -0
  15. package/dist_ts/data/appconnection.js +2 -0
  16. package/dist_ts/data/billingplan.d.ts +43 -0
  17. package/dist_ts/data/billingplan.js +2 -0
  18. package/dist_ts/data/device.d.ts +3 -0
  19. package/dist_ts/data/device.js +2 -0
  20. package/dist_ts/data/emailactiontoken.d.ts +11 -0
  21. package/dist_ts/data/emailactiontoken.js +2 -0
  22. package/dist_ts/data/index.d.ts +21 -0
  23. package/dist_ts/data/index.js +22 -0
  24. package/dist_ts/data/jwt.d.ts +38 -0
  25. package/dist_ts/data/jwt.js +2 -0
  26. package/dist_ts/data/loginsession.d.ts +38 -0
  27. package/dist_ts/data/loginsession.js +2 -0
  28. package/dist_ts/data/oidc.d.ts +248 -0
  29. package/dist_ts/data/oidc.js +5 -0
  30. package/dist_ts/data/organization.d.ts +11 -0
  31. package/dist_ts/data/organization.js +4 -0
  32. package/dist_ts/data/paddlecheckoutdata.d.ts +316 -0
  33. package/dist_ts/data/paddlecheckoutdata.js +2 -0
  34. package/dist_ts/data/passportchallenge.d.ts +68 -0
  35. package/dist_ts/data/passportchallenge.js +2 -0
  36. package/dist_ts/data/passportdevice.d.ts +34 -0
  37. package/dist_ts/data/passportdevice.js +2 -0
  38. package/dist_ts/data/passportnonce.d.ts +9 -0
  39. package/dist_ts/data/passportnonce.js +2 -0
  40. package/dist_ts/data/property.d.ts +10 -0
  41. package/dist_ts/data/property.js +3 -0
  42. package/dist_ts/data/registrationsession.d.ts +25 -0
  43. package/dist_ts/data/registrationsession.js +2 -0
  44. package/dist_ts/data/role.d.ts +28 -0
  45. package/dist_ts/data/role.js +2 -0
  46. package/dist_ts/data/user.d.ts +32 -0
  47. package/dist_ts/data/user.js +3 -0
  48. package/dist_ts/data/userinvitation.d.ts +45 -0
  49. package/dist_ts/data/userinvitation.js +2 -0
  50. package/dist_ts/index.d.ts +4 -0
  51. package/dist_ts/index.js +6 -0
  52. package/dist_ts/plugins.d.ts +4 -0
  53. package/dist_ts/plugins.js +7 -0
  54. package/dist_ts/request/admin.d.ts +100 -0
  55. package/dist_ts/request/admin.js +3 -0
  56. package/dist_ts/request/alert.d.ts +78 -0
  57. package/dist_ts/request/alert.js +3 -0
  58. package/dist_ts/request/apitoken.d.ts +1 -0
  59. package/dist_ts/request/apitoken.js +2 -0
  60. package/dist_ts/request/app.d.ts +48 -0
  61. package/dist_ts/request/app.js +3 -0
  62. package/dist_ts/request/authorization.d.ts +57 -0
  63. package/dist_ts/request/authorization.js +4 -0
  64. package/dist_ts/request/billingplan.d.ts +40 -0
  65. package/dist_ts/request/billingplan.js +3 -0
  66. package/dist_ts/request/index.d.ts +14 -0
  67. package/dist_ts/request/index.js +15 -0
  68. package/dist_ts/request/jwt.d.ts +63 -0
  69. package/dist_ts/request/jwt.js +3 -0
  70. package/dist_ts/request/login.d.ts +126 -0
  71. package/dist_ts/request/login.js +3 -0
  72. package/dist_ts/request/organization.d.ts +96 -0
  73. package/dist_ts/request/organization.js +3 -0
  74. package/dist_ts/request/passport.d.ts +169 -0
  75. package/dist_ts/request/passport.js +3 -0
  76. package/dist_ts/request/plan.d.ts +12 -0
  77. package/dist_ts/request/plan.js +3 -0
  78. package/dist_ts/request/registration.d.ts +65 -0
  79. package/dist_ts/request/registration.js +3 -0
  80. package/dist_ts/request/user.d.ts +101 -0
  81. package/dist_ts/request/user.js +3 -0
  82. package/dist_ts/request/userinvitation.d.ts +193 -0
  83. package/dist_ts/request/userinvitation.js +3 -0
  84. package/dist_ts/tags/index.d.ts +7 -0
  85. package/dist_ts/tags/index.js +2 -0
  86. package/license +21 -0
  87. package/package.json +57 -0
  88. package/readme.md +101 -0
  89. package/ts/00_commitinfo_data.ts +8 -0
  90. package/ts/data/abusewindow.ts +13 -0
  91. package/ts/data/activity.ts +36 -0
  92. package/ts/data/alert.ts +35 -0
  93. package/ts/data/alertrule.ts +22 -0
  94. package/ts/data/app.ts +99 -0
  95. package/ts/data/appconnection.ts +18 -0
  96. package/ts/data/billingplan.ts +47 -0
  97. package/ts/data/device.ts +3 -0
  98. package/ts/data/emailactiontoken.ts +12 -0
  99. package/ts/data/index.ts +21 -0
  100. package/ts/data/jwt.ts +43 -0
  101. package/ts/data/loginsession.ts +38 -0
  102. package/ts/data/oidc.ts +281 -0
  103. package/ts/data/organization.ts +14 -0
  104. package/ts/data/paddlecheckoutdata.ts +316 -0
  105. package/ts/data/passportchallenge.ts +80 -0
  106. package/ts/data/passportdevice.ts +46 -0
  107. package/ts/data/passportnonce.ts +9 -0
  108. package/ts/data/property.ts +12 -0
  109. package/ts/data/registrationsession.ts +31 -0
  110. package/ts/data/role.ts +33 -0
  111. package/ts/data/user.ts +36 -0
  112. package/ts/data/userinvitation.ts +58 -0
  113. package/ts/index.ts +6 -0
  114. package/ts/plugins.ts +9 -0
  115. package/ts/readme.md +133 -0
  116. package/ts/request/admin.ts +130 -0
  117. package/ts/request/alert.ts +113 -0
  118. package/ts/request/apitoken.ts +1 -0
  119. package/ts/request/app.ts +71 -0
  120. package/ts/request/authorization.ts +72 -0
  121. package/ts/request/billingplan.ts +55 -0
  122. package/ts/request/index.ts +14 -0
  123. package/ts/request/jwt.ts +79 -0
  124. package/ts/request/login.ts +181 -0
  125. package/ts/request/organization.ts +131 -0
  126. package/ts/request/passport.ts +227 -0
  127. package/ts/request/plan.ts +17 -0
  128. package/ts/request/registration.ts +90 -0
  129. package/ts/request/user.ts +142 -0
  130. package/ts/request/userinvitation.ts +248 -0
  131. package/ts/tags/index.ts +12 -0
@@ -0,0 +1,181 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as data from '../data/index.js';
3
+
4
+ export interface IReq_LoginWithEmailOrUsernameAndPassword
5
+ extends plugins.typedRequestInterfaces.implementsTR<
6
+ plugins.typedRequestInterfaces.ITypedRequest,
7
+ IReq_LoginWithEmailOrUsernameAndPassword
8
+ > {
9
+ method: 'loginWithEmailOrUsernameAndPassword';
10
+ request: {
11
+ username: string;
12
+ password: string;
13
+ };
14
+ response: {
15
+ refreshToken?: string;
16
+ twoFaNeeded: boolean;
17
+ };
18
+ }
19
+
20
+ export interface IReq_LoginWithEmail
21
+ extends plugins.typedRequestInterfaces.implementsTR<
22
+ plugins.typedRequestInterfaces.ITypedRequest,
23
+ IReq_LoginWithEmailOrUsernameAndPassword
24
+ > {
25
+ method: 'loginWithEmail';
26
+ request: {
27
+ email: string;
28
+ };
29
+ response: {
30
+ status: 'ok' | 'not ok';
31
+ testOnlyToken?: string;
32
+ };
33
+ }
34
+
35
+ export interface IReq_LoginWithEmailAfterEmailTokenAquired
36
+ extends plugins.typedRequestInterfaces.implementsTR<
37
+ plugins.typedRequestInterfaces.ITypedRequest,
38
+ IReq_LoginWithEmailOrUsernameAndPassword
39
+ > {
40
+ method: 'loginWithEmailAfterEmailTokenAquired';
41
+ request: {
42
+ email: string;
43
+ token: string;
44
+ };
45
+ response: {
46
+ refreshToken: string;
47
+ };
48
+ }
49
+
50
+ /**
51
+ * in case you authenticate with a long lived api token
52
+ */
53
+ export interface IReq_LoginWithApiToken
54
+ extends plugins.typedRequestInterfaces.implementsTR<
55
+ plugins.typedRequestInterfaces.ITypedRequest,
56
+ IReq_LoginWithApiToken
57
+ > {
58
+ method: 'loginWithApiToken';
59
+ request: {
60
+ apiToken: string;
61
+ };
62
+ response: {
63
+ jwt?: string;
64
+ };
65
+ }
66
+
67
+ export interface ILogoutRequest
68
+ extends plugins.typedRequestInterfaces.implementsTR<
69
+ plugins.typedRequestInterfaces.ITypedRequest,
70
+ ILogoutRequest
71
+ > {
72
+ method: 'logout';
73
+ request: {
74
+ refreshToken: string;
75
+ };
76
+ response: {};
77
+ }
78
+
79
+ export interface IReq_RefreshJwt
80
+ extends plugins.typedRequestInterfaces.implementsTR<
81
+ plugins.typedRequestInterfaces.ITypedRequest,
82
+ IReq_RefreshJwt
83
+ > {
84
+ method: 'refreshJwt';
85
+ request: {
86
+ refreshToken: string;
87
+ };
88
+ response: {
89
+ status: data.TLoginStatus;
90
+ jwt?: string;
91
+ refreshToken?: string;
92
+ };
93
+ }
94
+
95
+ /**
96
+ * allows the exchange between refreshToken and transferTokens
97
+ */
98
+ export interface IReq_ExchangeRefreshTokenAndTransferToken
99
+ extends plugins.typedRequestInterfaces.implementsTR<
100
+ plugins.typedRequestInterfaces.ITypedRequest,
101
+ IReq_ExchangeRefreshTokenAndTransferToken
102
+ > {
103
+ method: 'exchangeRefreshTokenAndTransferToken';
104
+ request: {
105
+ transferToken?: string;
106
+ refreshToken?: string;
107
+ appData: data.IAppLegacy;
108
+ };
109
+ response: {
110
+ refreshToken?: string;
111
+ transferToken?: string;
112
+ };
113
+ }
114
+
115
+ /**
116
+ * in case you authenticate with a long lived api token
117
+ */
118
+ export interface IReq_ResetPassword
119
+ extends plugins.typedRequestInterfaces.implementsTR<
120
+ plugins.typedRequestInterfaces.ITypedRequest,
121
+ IReq_ResetPassword
122
+ > {
123
+ method: 'resetPassword';
124
+ request: {
125
+ email: string;
126
+ };
127
+ response: {
128
+ status: 'ok' | 'not ok';
129
+ };
130
+ }
131
+
132
+ /**
133
+ * in cse you authenticate with a long lived api token
134
+ */
135
+ export interface IReq_SetNewPassword
136
+ extends plugins.typedRequestInterfaces.implementsTR<
137
+ plugins.typedRequestInterfaces.ITypedRequest,
138
+ IReq_SetNewPassword
139
+ > {
140
+ method: 'setNewPassword';
141
+ request: {
142
+ email: string;
143
+ oldPassword?: string;
144
+ tokenArg?: string;
145
+ newPassword: string;
146
+ };
147
+ response: {
148
+ status: 'ok' | 'not ok';
149
+ };
150
+ }
151
+
152
+ export interface IReq_ObtainDeviceId
153
+ extends plugins.typedRequestInterfaces.implementsTR<
154
+ plugins.typedRequestInterfaces.ITypedRequest,
155
+ IReq_ObtainDeviceId
156
+ > {
157
+ method: 'obtainDeviceId';
158
+ request: {};
159
+ response: {
160
+ deviceId: data.IDevice;
161
+ };
162
+ }
163
+
164
+ /**
165
+ * allows attaching a device id to a login session
166
+ * to share a login session across contexts
167
+ */
168
+ export interface IReq_AttachDeviceId
169
+ extends plugins.typedRequestInterfaces.implementsTR<
170
+ plugins.typedRequestInterfaces.ITypedRequest,
171
+ IReq_AttachDeviceId
172
+ > {
173
+ method: 'attachDeviceId';
174
+ request: {
175
+ jwt: string;
176
+ deviceId: string;
177
+ };
178
+ response: {
179
+ ok: boolean;
180
+ };
181
+ }
@@ -0,0 +1,131 @@
1
+ import * as data from '../data/index.js';
2
+ import * as plugins from '../plugins.js';
3
+
4
+ export interface IReq_GetOrganizationById
5
+ extends plugins.typedRequestInterfaces.implementsTR<
6
+ plugins.typedRequestInterfaces.ITypedRequest,
7
+ IReq_GetOrganizationById
8
+ > {
9
+ method: 'getOrganizationById';
10
+ request: {
11
+ jwt: string;
12
+ id: string;
13
+ };
14
+ response: {
15
+ organization: data.IOrganization;
16
+ };
17
+ }
18
+
19
+ export interface IReq_CreateOrganization
20
+ extends plugins.typedRequestInterfaces.implementsTR<
21
+ plugins.typedRequestInterfaces.ITypedRequest,
22
+ IReq_CreateOrganization
23
+ > {
24
+ method: 'createOrganization';
25
+ request: {
26
+ jwt: string;
27
+ userId: string;
28
+ organizationName: string;
29
+ organizationSlug: string;
30
+ action: 'checkAvailability' | 'manifest';
31
+ };
32
+ response: {
33
+ nameAvailable: boolean;
34
+ resultingOrganization?: data.IOrganization;
35
+ role?: data.IRole;
36
+ };
37
+ }
38
+
39
+ export interface IReq_UpdateOrganization
40
+ extends plugins.typedRequestInterfaces.implementsTR<
41
+ plugins.typedRequestInterfaces.ITypedRequest,
42
+ IReq_UpdateOrganization
43
+ > {
44
+ method: 'updateOrganization';
45
+ request: {
46
+ jwt: string;
47
+ organizationId: string;
48
+ name?: string;
49
+ slug?: string;
50
+ confirmationText: string;
51
+ };
52
+ response: {
53
+ success: boolean;
54
+ organization: data.IOrganization;
55
+ message?: string;
56
+ };
57
+ }
58
+
59
+ export interface IReq_DeleteOrganization
60
+ extends plugins.typedRequestInterfaces.implementsTR<
61
+ plugins.typedRequestInterfaces.ITypedRequest,
62
+ IReq_DeleteOrganization
63
+ > {
64
+ method: 'deleteOrganization';
65
+ request: {
66
+ jwt: string;
67
+ organizationId: string;
68
+ confirmationText: string;
69
+ };
70
+ response: {
71
+ success: boolean;
72
+ deletedOrganizationId: string;
73
+ message?: string;
74
+ };
75
+ }
76
+
77
+ export interface IReq_GetOrgRoleDefinitions
78
+ extends plugins.typedRequestInterfaces.implementsTR<
79
+ plugins.typedRequestInterfaces.ITypedRequest,
80
+ IReq_GetOrgRoleDefinitions
81
+ > {
82
+ method: 'getOrgRoleDefinitions';
83
+ request: {
84
+ jwt: string;
85
+ organizationId: string;
86
+ };
87
+ response: {
88
+ roleDefinitions: data.IOrgRoleDefinition[];
89
+ };
90
+ }
91
+
92
+ export interface IReq_UpsertOrgRoleDefinition
93
+ extends plugins.typedRequestInterfaces.implementsTR<
94
+ plugins.typedRequestInterfaces.ITypedRequest,
95
+ IReq_UpsertOrgRoleDefinition
96
+ > {
97
+ method: 'upsertOrgRoleDefinition';
98
+ request: {
99
+ jwt: string;
100
+ organizationId: string;
101
+ roleDefinition: {
102
+ key: string;
103
+ name: string;
104
+ description?: string;
105
+ };
106
+ };
107
+ response: {
108
+ success: boolean;
109
+ roleDefinitions: data.IOrgRoleDefinition[];
110
+ message?: string;
111
+ };
112
+ }
113
+
114
+ export interface IReq_DeleteOrgRoleDefinition
115
+ extends plugins.typedRequestInterfaces.implementsTR<
116
+ plugins.typedRequestInterfaces.ITypedRequest,
117
+ IReq_DeleteOrgRoleDefinition
118
+ > {
119
+ method: 'deleteOrgRoleDefinition';
120
+ request: {
121
+ jwt: string;
122
+ organizationId: string;
123
+ roleKey: string;
124
+ confirmationText: string;
125
+ };
126
+ response: {
127
+ success: boolean;
128
+ roleDefinitions: data.IOrgRoleDefinition[];
129
+ message?: string;
130
+ };
131
+ }
@@ -0,0 +1,227 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as data from '../data/index.js';
3
+
4
+ export interface IPassportDeviceSignedRequest {
5
+ deviceId: string;
6
+ timestamp: number;
7
+ nonce: string;
8
+ signatureBase64: string;
9
+ signatureFormat?: data.TPassportSignatureFormat;
10
+ }
11
+
12
+ export interface IReq_CreatePassportEnrollmentChallenge
13
+ extends plugins.typedRequestInterfaces.implementsTR<
14
+ plugins.typedRequestInterfaces.ITypedRequest,
15
+ IReq_CreatePassportEnrollmentChallenge
16
+ > {
17
+ method: 'createPassportEnrollmentChallenge';
18
+ request: {
19
+ jwt: string;
20
+ deviceLabel: string;
21
+ platform: data.TPassportDevicePlatform;
22
+ appVersion?: string;
23
+ capabilities?: Partial<data.IPassportCapabilities>;
24
+ };
25
+ response: {
26
+ challengeId: string;
27
+ pairingToken: string;
28
+ pairingPayload: string;
29
+ signingPayload: string;
30
+ expiresAt: number;
31
+ };
32
+ }
33
+
34
+ export interface IReq_CompletePassportEnrollment
35
+ extends plugins.typedRequestInterfaces.implementsTR<
36
+ plugins.typedRequestInterfaces.ITypedRequest,
37
+ IReq_CompletePassportEnrollment
38
+ > {
39
+ method: 'completePassportEnrollment';
40
+ request: {
41
+ pairingToken: string;
42
+ deviceLabel: string;
43
+ platform: data.TPassportDevicePlatform;
44
+ publicKeyX963Base64: string;
45
+ signatureBase64: string;
46
+ signatureFormat?: data.TPassportSignatureFormat;
47
+ appVersion?: string;
48
+ capabilities?: Partial<data.IPassportCapabilities>;
49
+ };
50
+ response: {
51
+ device: data.IPassportDevice;
52
+ };
53
+ }
54
+
55
+ export interface IReq_GetPassportDevices
56
+ extends plugins.typedRequestInterfaces.implementsTR<
57
+ plugins.typedRequestInterfaces.ITypedRequest,
58
+ IReq_GetPassportDevices
59
+ > {
60
+ method: 'getPassportDevices';
61
+ request: {
62
+ jwt: string;
63
+ };
64
+ response: {
65
+ devices: data.IPassportDevice[];
66
+ };
67
+ }
68
+
69
+ export interface IReq_RevokePassportDevice
70
+ extends plugins.typedRequestInterfaces.implementsTR<
71
+ plugins.typedRequestInterfaces.ITypedRequest,
72
+ IReq_RevokePassportDevice
73
+ > {
74
+ method: 'revokePassportDevice';
75
+ request: {
76
+ jwt: string;
77
+ deviceId: string;
78
+ };
79
+ response: {
80
+ success: boolean;
81
+ };
82
+ }
83
+
84
+ export interface IReq_CreatePassportChallenge
85
+ extends plugins.typedRequestInterfaces.implementsTR<
86
+ plugins.typedRequestInterfaces.ITypedRequest,
87
+ IReq_CreatePassportChallenge
88
+ > {
89
+ method: 'createPassportChallenge';
90
+ request: {
91
+ jwt: string;
92
+ type?: Exclude<data.TPassportChallengeType, 'device_enrollment'>;
93
+ preferredDeviceId?: string;
94
+ audience?: string;
95
+ notificationTitle?: string;
96
+ requireLocation?: boolean;
97
+ requireNfc?: boolean;
98
+ locationPolicy?: data.IPassportLocationPolicy;
99
+ };
100
+ response: {
101
+ challengeId: string;
102
+ challenge: string;
103
+ signingPayload: string;
104
+ deviceId: string;
105
+ expiresAt: number;
106
+ };
107
+ }
108
+
109
+ export interface IReq_ApprovePassportChallenge
110
+ extends plugins.typedRequestInterfaces.implementsTR<
111
+ plugins.typedRequestInterfaces.ITypedRequest,
112
+ IReq_ApprovePassportChallenge
113
+ > {
114
+ method: 'approvePassportChallenge';
115
+ request: {
116
+ challengeId: string;
117
+ deviceId: string;
118
+ signatureBase64: string;
119
+ signatureFormat?: data.TPassportSignatureFormat;
120
+ location?: data.IPassportLocationEvidence;
121
+ nfc?: data.IPassportNfcEvidence;
122
+ };
123
+ response: {
124
+ success: boolean;
125
+ challenge: data.IPassportChallenge;
126
+ };
127
+ }
128
+
129
+ export interface IReq_RejectPassportChallenge
130
+ extends plugins.typedRequestInterfaces.implementsTR<
131
+ plugins.typedRequestInterfaces.ITypedRequest,
132
+ IReq_RejectPassportChallenge
133
+ > {
134
+ method: 'rejectPassportChallenge';
135
+ request: IPassportDeviceSignedRequest & {
136
+ challengeId: string;
137
+ };
138
+ response: {
139
+ success: boolean;
140
+ challenge: data.IPassportChallenge;
141
+ };
142
+ }
143
+
144
+ export interface IReq_RegisterPassportPushToken
145
+ extends plugins.typedRequestInterfaces.implementsTR<
146
+ plugins.typedRequestInterfaces.ITypedRequest,
147
+ IReq_RegisterPassportPushToken
148
+ > {
149
+ method: 'registerPassportPushToken';
150
+ request: IPassportDeviceSignedRequest & {
151
+ provider: data.TPassportPushProvider;
152
+ token: string;
153
+ topic: string;
154
+ environment: data.TPassportPushEnvironment;
155
+ };
156
+ response: {
157
+ success: boolean;
158
+ };
159
+ }
160
+
161
+ export interface IReq_ListPendingPassportChallenges
162
+ extends plugins.typedRequestInterfaces.implementsTR<
163
+ plugins.typedRequestInterfaces.ITypedRequest,
164
+ IReq_ListPendingPassportChallenges
165
+ > {
166
+ method: 'listPendingPassportChallenges';
167
+ request: IPassportDeviceSignedRequest;
168
+ response: {
169
+ challenges: data.IPassportChallenge[];
170
+ };
171
+ }
172
+
173
+ export interface IReq_GetPassportChallengeByHint
174
+ extends plugins.typedRequestInterfaces.implementsTR<
175
+ plugins.typedRequestInterfaces.ITypedRequest,
176
+ IReq_GetPassportChallengeByHint
177
+ > {
178
+ method: 'getPassportChallengeByHint';
179
+ request: IPassportDeviceSignedRequest & {
180
+ hintId: string;
181
+ };
182
+ response: {
183
+ challenge?: {
184
+ challenge: data.IPassportChallenge;
185
+ signingPayload: string;
186
+ };
187
+ };
188
+ }
189
+
190
+ export interface IReq_MarkPassportChallengeSeen
191
+ extends plugins.typedRequestInterfaces.implementsTR<
192
+ plugins.typedRequestInterfaces.ITypedRequest,
193
+ IReq_MarkPassportChallengeSeen
194
+ > {
195
+ method: 'markPassportChallengeSeen';
196
+ request: IPassportDeviceSignedRequest & {
197
+ hintId: string;
198
+ };
199
+ response: {
200
+ success: boolean;
201
+ };
202
+ }
203
+
204
+ export interface IReq_GetPassportDashboard
205
+ extends plugins.typedRequestInterfaces.implementsTR<
206
+ plugins.typedRequestInterfaces.ITypedRequest,
207
+ IReq_GetPassportDashboard
208
+ > {
209
+ method: 'getPassportDashboard';
210
+ request: IPassportDeviceSignedRequest;
211
+ 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[];
226
+ };
227
+ }
@@ -0,0 +1,17 @@
1
+ import * as data from '../data/index.js';
2
+ import * as plugins from '../plugins.js';
3
+
4
+ export interface IReq_GetPlansForOrganizationId
5
+ extends plugins.typedRequestInterfaces.implementsTR<
6
+ plugins.typedRequestInterfaces.ITypedRequest,
7
+ IReq_GetPlansForOrganizationId
8
+ > {
9
+ method: 'getBillingPlansForOrganizationId';
10
+ request: {
11
+ jwt: string;
12
+ organizationId: string;
13
+ };
14
+ response: {
15
+ billingPlans: data.IBillingPlan[];
16
+ };
17
+ }
@@ -0,0 +1,90 @@
1
+ import * as plugins from '../plugins.js';
2
+ import { type IUser } from '../data/index.js';
3
+
4
+ export interface IReq_FirstRegistration
5
+ extends plugins.typedRequestInterfaces.implementsTR<
6
+ plugins.typedRequestInterfaces.ITypedRequest,
7
+ IReq_FirstRegistration
8
+ > {
9
+ method: 'firstRegistrationRequest';
10
+ request: {
11
+ email: string;
12
+ productSlugOfInterest: string;
13
+ };
14
+ response: {
15
+ status: 'ok' | 'not ok';
16
+ testOnlyToken?: string;
17
+ };
18
+ }
19
+
20
+ export interface IReq_AfterRegistrationEmailClicked
21
+ extends plugins.typedRequestInterfaces.implementsTR<
22
+ plugins.typedRequestInterfaces.ITypedRequest,
23
+ IReq_AfterRegistrationEmailClicked
24
+ > {
25
+ method: 'afterRegistrationEmailClicked';
26
+ request: {
27
+ /**
28
+ * the token that has been sent with the registation email to verify access
29
+ */
30
+ token: string;
31
+ };
32
+ response: {
33
+ status: 'ok' | 'not ok';
34
+ /**
35
+ * the email thats associated with the given request token
36
+ */
37
+ email: string;
38
+ };
39
+ }
40
+
41
+ export interface IReq_SetDataForRegistration
42
+ extends plugins.typedRequestInterfaces.implementsTR<
43
+ plugins.typedRequestInterfaces.ITypedRequest,
44
+ IReq_SetDataForRegistration
45
+ > {
46
+ method: 'setDataForRegistration';
47
+ request: {
48
+ token: string;
49
+ userData: IUser['data'];
50
+ };
51
+ response: {
52
+ status: 'ok' | 'not ok';
53
+ };
54
+ }
55
+
56
+ /**
57
+ * Should be used to verify a mobile number for an verifcation
58
+ */
59
+ export interface IReq_MobileVerificationForRegistration
60
+ extends plugins.typedRequestInterfaces.implementsTR<
61
+ plugins.typedRequestInterfaces.ITypedRequest,
62
+ IReq_MobileVerificationForRegistration
63
+ > {
64
+ method: 'mobileVerificationForRegistration';
65
+ request: {
66
+ token: string;
67
+ mobileNumber?: string;
68
+ verificationCode?: string;
69
+ };
70
+ response: {
71
+ messageSent?: boolean;
72
+ verficationCodeOk?: boolean;
73
+ testOnlySmsCode?: string;
74
+ };
75
+ }
76
+
77
+ export interface IReq_FinishRegistration
78
+ extends plugins.typedRequestInterfaces.implementsTR<
79
+ plugins.typedRequestInterfaces.ITypedRequest,
80
+ IReq_FinishRegistration
81
+ > {
82
+ method: 'finishRegistration';
83
+ request: {
84
+ token: string;
85
+ };
86
+ response: {
87
+ status: 'ok' | 'not ok';
88
+ userData?: IUser['data'];
89
+ };
90
+ }