@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,63 @@
1
+ import * as plugins from '../plugins.js';
2
+ /**
3
+ * Request to get the public key for JWT validation.
4
+ *
5
+ * **Direction:** Client → idp.global
6
+ * **Requester:** Backend services that need to verify JWTs
7
+ * **Handler:** idp.global
8
+ *
9
+ * Use this to fetch the current public key for verifying JWT signatures.
10
+ * The backend token authenticates the requesting service.
11
+ */
12
+ export interface IReq_GetPublicKeyForValidation extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetPublicKeyForValidation> {
13
+ method: 'getPublicKeyForValidation';
14
+ request: {
15
+ backendToken: string;
16
+ };
17
+ response: {
18
+ publicKeyPem: string;
19
+ };
20
+ }
21
+ /**
22
+ * Push public key to connected backend services for JWT validation.
23
+ *
24
+ * **Direction:** idp.global → Client
25
+ * **Requester:** idp.global (pushes when the JWT signing key rotates)
26
+ * **Handler:** Backend services - must register a TypedHandler for this method
27
+ *
28
+ * Backend services should register a handler using `IdpClient.onPublicKeyPush()`
29
+ * to receive key rotation updates and update their local key cache.
30
+ */
31
+ export interface IReq_PushPublicKeyForValidation extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_PushPublicKeyForValidation> {
32
+ method: 'pushPublicKeyForValidation';
33
+ request: {
34
+ publicKeyPem: string;
35
+ };
36
+ response: {};
37
+ }
38
+ /**
39
+ * Push or get JWT ID blocklist for revoked tokens.
40
+ *
41
+ * **Bidirectional:**
42
+ * - **GET direction:** Client → idp.global - Client requests current blocklist
43
+ * - **PUSH direction:** idp.global → Client - Server pushes new blocklisted IDs
44
+ *
45
+ * **For GET (client fires):**
46
+ * - Fire with empty/undefined `blockedJwtIds` to request the full blocklist
47
+ * - Response contains the complete list of blocked JWT IDs
48
+ * - Use `IdpClient.requests.getJwtIdBlocklist` for this direction
49
+ *
50
+ * **For PUSH (idp.global fires):**
51
+ * - idp.global sends newly blocklisted JWT IDs to connected clients
52
+ * - Clients must register a handler using `IdpClient.onBlocklistPush()`
53
+ * - Store received IDs locally to reject revoked tokens
54
+ */
55
+ export interface IReq_PushOrGetJwtIdBlocklist extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_PushOrGetJwtIdBlocklist> {
56
+ method: 'pushOrGetJwtIdBlocklist';
57
+ request: {
58
+ blockedJwtIds?: string[];
59
+ };
60
+ response: {
61
+ blockedJwtIds?: string[];
62
+ };
63
+ }
@@ -0,0 +1,3 @@
1
+ import * as data from '../data/index.js';
2
+ import * as plugins from '../plugins.js';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiand0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdC9qd3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLElBQUksTUFBTSxrQkFBa0IsQ0FBQztBQUN6QyxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQyJ9
@@ -0,0 +1,126 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as data from '../data/index.js';
3
+ export interface IReq_LoginWithEmailOrUsernameAndPassword extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_LoginWithEmailOrUsernameAndPassword> {
4
+ method: 'loginWithEmailOrUsernameAndPassword';
5
+ request: {
6
+ username: string;
7
+ password: string;
8
+ };
9
+ response: {
10
+ refreshToken?: string;
11
+ twoFaNeeded: boolean;
12
+ };
13
+ }
14
+ export interface IReq_LoginWithEmail extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_LoginWithEmailOrUsernameAndPassword> {
15
+ method: 'loginWithEmail';
16
+ request: {
17
+ email: string;
18
+ };
19
+ response: {
20
+ status: 'ok' | 'not ok';
21
+ testOnlyToken?: string;
22
+ };
23
+ }
24
+ export interface IReq_LoginWithEmailAfterEmailTokenAquired extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_LoginWithEmailOrUsernameAndPassword> {
25
+ method: 'loginWithEmailAfterEmailTokenAquired';
26
+ request: {
27
+ email: string;
28
+ token: string;
29
+ };
30
+ response: {
31
+ refreshToken: string;
32
+ };
33
+ }
34
+ /**
35
+ * in case you authenticate with a long lived api token
36
+ */
37
+ export interface IReq_LoginWithApiToken extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_LoginWithApiToken> {
38
+ method: 'loginWithApiToken';
39
+ request: {
40
+ apiToken: string;
41
+ };
42
+ response: {
43
+ jwt?: string;
44
+ };
45
+ }
46
+ export interface ILogoutRequest extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, ILogoutRequest> {
47
+ method: 'logout';
48
+ request: {
49
+ refreshToken: string;
50
+ };
51
+ response: {};
52
+ }
53
+ export interface IReq_RefreshJwt extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_RefreshJwt> {
54
+ method: 'refreshJwt';
55
+ request: {
56
+ refreshToken: string;
57
+ };
58
+ response: {
59
+ status: data.TLoginStatus;
60
+ jwt?: string;
61
+ refreshToken?: string;
62
+ };
63
+ }
64
+ /**
65
+ * allows the exchange between refreshToken and transferTokens
66
+ */
67
+ export interface IReq_ExchangeRefreshTokenAndTransferToken extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_ExchangeRefreshTokenAndTransferToken> {
68
+ method: 'exchangeRefreshTokenAndTransferToken';
69
+ request: {
70
+ transferToken?: string;
71
+ refreshToken?: string;
72
+ appData: data.IAppLegacy;
73
+ };
74
+ response: {
75
+ refreshToken?: string;
76
+ transferToken?: string;
77
+ };
78
+ }
79
+ /**
80
+ * in case you authenticate with a long lived api token
81
+ */
82
+ export interface IReq_ResetPassword extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_ResetPassword> {
83
+ method: 'resetPassword';
84
+ request: {
85
+ email: string;
86
+ };
87
+ response: {
88
+ status: 'ok' | 'not ok';
89
+ };
90
+ }
91
+ /**
92
+ * in cse you authenticate with a long lived api token
93
+ */
94
+ export interface IReq_SetNewPassword extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_SetNewPassword> {
95
+ method: 'setNewPassword';
96
+ request: {
97
+ email: string;
98
+ oldPassword?: string;
99
+ tokenArg?: string;
100
+ newPassword: string;
101
+ };
102
+ response: {
103
+ status: 'ok' | 'not ok';
104
+ };
105
+ }
106
+ export interface IReq_ObtainDeviceId extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_ObtainDeviceId> {
107
+ method: 'obtainDeviceId';
108
+ request: {};
109
+ response: {
110
+ deviceId: data.IDevice;
111
+ };
112
+ }
113
+ /**
114
+ * allows attaching a device id to a login session
115
+ * to share a login session across contexts
116
+ */
117
+ export interface IReq_AttachDeviceId extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_AttachDeviceId> {
118
+ method: 'attachDeviceId';
119
+ request: {
120
+ jwt: string;
121
+ deviceId: string;
122
+ };
123
+ response: {
124
+ ok: boolean;
125
+ };
126
+ }
@@ -0,0 +1,3 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as data from '../data/index.js';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibG9naW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0L2xvZ2luLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxJQUFJLE1BQU0sa0JBQWtCLENBQUMifQ==
@@ -0,0 +1,96 @@
1
+ import * as data from '../data/index.js';
2
+ import * as plugins from '../plugins.js';
3
+ export interface IReq_GetOrganizationById extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetOrganizationById> {
4
+ method: 'getOrganizationById';
5
+ request: {
6
+ jwt: string;
7
+ id: string;
8
+ };
9
+ response: {
10
+ organization: data.IOrganization;
11
+ };
12
+ }
13
+ export interface IReq_CreateOrganization extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_CreateOrganization> {
14
+ method: 'createOrganization';
15
+ request: {
16
+ jwt: string;
17
+ userId: string;
18
+ organizationName: string;
19
+ organizationSlug: string;
20
+ action: 'checkAvailability' | 'manifest';
21
+ };
22
+ response: {
23
+ nameAvailable: boolean;
24
+ resultingOrganization?: data.IOrganization;
25
+ role?: data.IRole;
26
+ };
27
+ }
28
+ export interface IReq_UpdateOrganization extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_UpdateOrganization> {
29
+ method: 'updateOrganization';
30
+ request: {
31
+ jwt: string;
32
+ organizationId: string;
33
+ name?: string;
34
+ slug?: string;
35
+ confirmationText: string;
36
+ };
37
+ response: {
38
+ success: boolean;
39
+ organization: data.IOrganization;
40
+ message?: string;
41
+ };
42
+ }
43
+ export interface IReq_DeleteOrganization extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_DeleteOrganization> {
44
+ method: 'deleteOrganization';
45
+ request: {
46
+ jwt: string;
47
+ organizationId: string;
48
+ confirmationText: string;
49
+ };
50
+ response: {
51
+ success: boolean;
52
+ deletedOrganizationId: string;
53
+ message?: string;
54
+ };
55
+ }
56
+ export interface IReq_GetOrgRoleDefinitions extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetOrgRoleDefinitions> {
57
+ method: 'getOrgRoleDefinitions';
58
+ request: {
59
+ jwt: string;
60
+ organizationId: string;
61
+ };
62
+ response: {
63
+ roleDefinitions: data.IOrgRoleDefinition[];
64
+ };
65
+ }
66
+ export interface IReq_UpsertOrgRoleDefinition extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_UpsertOrgRoleDefinition> {
67
+ method: 'upsertOrgRoleDefinition';
68
+ request: {
69
+ jwt: string;
70
+ organizationId: string;
71
+ roleDefinition: {
72
+ key: string;
73
+ name: string;
74
+ description?: string;
75
+ };
76
+ };
77
+ response: {
78
+ success: boolean;
79
+ roleDefinitions: data.IOrgRoleDefinition[];
80
+ message?: string;
81
+ };
82
+ }
83
+ export interface IReq_DeleteOrgRoleDefinition extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_DeleteOrgRoleDefinition> {
84
+ method: 'deleteOrgRoleDefinition';
85
+ request: {
86
+ jwt: string;
87
+ organizationId: string;
88
+ roleKey: string;
89
+ confirmationText: string;
90
+ };
91
+ response: {
92
+ success: boolean;
93
+ roleDefinitions: data.IOrgRoleDefinition[];
94
+ message?: string;
95
+ };
96
+ }
@@ -0,0 +1,3 @@
1
+ import * as data from '../data/index.js';
2
+ import * as plugins from '../plugins.js';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3JnYW5pemF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdC9vcmdhbml6YXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLElBQUksTUFBTSxrQkFBa0IsQ0FBQztBQUN6QyxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQyJ9
@@ -0,0 +1,169 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as data from '../data/index.js';
3
+ export interface IPassportDeviceSignedRequest {
4
+ deviceId: string;
5
+ timestamp: number;
6
+ nonce: string;
7
+ signatureBase64: string;
8
+ signatureFormat?: data.TPassportSignatureFormat;
9
+ }
10
+ export interface IReq_CreatePassportEnrollmentChallenge extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_CreatePassportEnrollmentChallenge> {
11
+ method: 'createPassportEnrollmentChallenge';
12
+ request: {
13
+ jwt: string;
14
+ deviceLabel: string;
15
+ platform: data.TPassportDevicePlatform;
16
+ appVersion?: string;
17
+ capabilities?: Partial<data.IPassportCapabilities>;
18
+ };
19
+ response: {
20
+ challengeId: string;
21
+ pairingToken: string;
22
+ pairingPayload: string;
23
+ signingPayload: string;
24
+ expiresAt: number;
25
+ };
26
+ }
27
+ export interface IReq_CompletePassportEnrollment extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_CompletePassportEnrollment> {
28
+ method: 'completePassportEnrollment';
29
+ request: {
30
+ pairingToken: string;
31
+ deviceLabel: string;
32
+ platform: data.TPassportDevicePlatform;
33
+ publicKeyX963Base64: string;
34
+ signatureBase64: string;
35
+ signatureFormat?: data.TPassportSignatureFormat;
36
+ appVersion?: string;
37
+ capabilities?: Partial<data.IPassportCapabilities>;
38
+ };
39
+ response: {
40
+ device: data.IPassportDevice;
41
+ };
42
+ }
43
+ export interface IReq_GetPassportDevices extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetPassportDevices> {
44
+ method: 'getPassportDevices';
45
+ request: {
46
+ jwt: string;
47
+ };
48
+ response: {
49
+ devices: data.IPassportDevice[];
50
+ };
51
+ }
52
+ export interface IReq_RevokePassportDevice extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_RevokePassportDevice> {
53
+ method: 'revokePassportDevice';
54
+ request: {
55
+ jwt: string;
56
+ deviceId: string;
57
+ };
58
+ response: {
59
+ success: boolean;
60
+ };
61
+ }
62
+ export interface IReq_CreatePassportChallenge extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_CreatePassportChallenge> {
63
+ method: 'createPassportChallenge';
64
+ request: {
65
+ jwt: string;
66
+ type?: Exclude<data.TPassportChallengeType, 'device_enrollment'>;
67
+ preferredDeviceId?: string;
68
+ audience?: string;
69
+ notificationTitle?: string;
70
+ requireLocation?: boolean;
71
+ requireNfc?: boolean;
72
+ locationPolicy?: data.IPassportLocationPolicy;
73
+ };
74
+ response: {
75
+ challengeId: string;
76
+ challenge: string;
77
+ signingPayload: string;
78
+ deviceId: string;
79
+ expiresAt: number;
80
+ };
81
+ }
82
+ export interface IReq_ApprovePassportChallenge extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_ApprovePassportChallenge> {
83
+ method: 'approvePassportChallenge';
84
+ request: {
85
+ challengeId: string;
86
+ deviceId: string;
87
+ signatureBase64: string;
88
+ signatureFormat?: data.TPassportSignatureFormat;
89
+ location?: data.IPassportLocationEvidence;
90
+ nfc?: data.IPassportNfcEvidence;
91
+ };
92
+ response: {
93
+ success: boolean;
94
+ challenge: data.IPassportChallenge;
95
+ };
96
+ }
97
+ export interface IReq_RejectPassportChallenge extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_RejectPassportChallenge> {
98
+ method: 'rejectPassportChallenge';
99
+ request: IPassportDeviceSignedRequest & {
100
+ challengeId: string;
101
+ };
102
+ response: {
103
+ success: boolean;
104
+ challenge: data.IPassportChallenge;
105
+ };
106
+ }
107
+ export interface IReq_RegisterPassportPushToken extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_RegisterPassportPushToken> {
108
+ method: 'registerPassportPushToken';
109
+ request: IPassportDeviceSignedRequest & {
110
+ provider: data.TPassportPushProvider;
111
+ token: string;
112
+ topic: string;
113
+ environment: data.TPassportPushEnvironment;
114
+ };
115
+ response: {
116
+ success: boolean;
117
+ };
118
+ }
119
+ export interface IReq_ListPendingPassportChallenges extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_ListPendingPassportChallenges> {
120
+ method: 'listPendingPassportChallenges';
121
+ request: IPassportDeviceSignedRequest;
122
+ response: {
123
+ challenges: data.IPassportChallenge[];
124
+ };
125
+ }
126
+ export interface IReq_GetPassportChallengeByHint extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetPassportChallengeByHint> {
127
+ method: 'getPassportChallengeByHint';
128
+ request: IPassportDeviceSignedRequest & {
129
+ hintId: string;
130
+ };
131
+ response: {
132
+ challenge?: {
133
+ challenge: data.IPassportChallenge;
134
+ signingPayload: string;
135
+ };
136
+ };
137
+ }
138
+ export interface IReq_MarkPassportChallengeSeen extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_MarkPassportChallengeSeen> {
139
+ method: 'markPassportChallengeSeen';
140
+ request: IPassportDeviceSignedRequest & {
141
+ hintId: string;
142
+ };
143
+ response: {
144
+ success: boolean;
145
+ };
146
+ }
147
+ export interface IReq_GetPassportDashboard extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetPassportDashboard> {
148
+ method: 'getPassportDashboard';
149
+ request: IPassportDeviceSignedRequest;
150
+ 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[];
168
+ };
169
+ }
@@ -0,0 +1,3 @@
1
+ import * as plugins from '../plugins.js';
2
+ import * as data from '../data/index.js';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFzc3BvcnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0L3Bhc3Nwb3J0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sS0FBSyxJQUFJLE1BQU0sa0JBQWtCLENBQUMifQ==
@@ -0,0 +1,12 @@
1
+ import * as data from '../data/index.js';
2
+ import * as plugins from '../plugins.js';
3
+ export interface IReq_GetPlansForOrganizationId extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetPlansForOrganizationId> {
4
+ method: 'getBillingPlansForOrganizationId';
5
+ request: {
6
+ jwt: string;
7
+ organizationId: string;
8
+ };
9
+ response: {
10
+ billingPlans: data.IBillingPlan[];
11
+ };
12
+ }
@@ -0,0 +1,3 @@
1
+ import * as data from '../data/index.js';
2
+ import * as plugins from '../plugins.js';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGxhbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3QvcGxhbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssSUFBSSxNQUFNLGtCQUFrQixDQUFDO0FBQ3pDLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDIn0=
@@ -0,0 +1,65 @@
1
+ import * as plugins from '../plugins.js';
2
+ import { type IUser } from '../data/index.js';
3
+ export interface IReq_FirstRegistration extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_FirstRegistration> {
4
+ method: 'firstRegistrationRequest';
5
+ request: {
6
+ email: string;
7
+ productSlugOfInterest: string;
8
+ };
9
+ response: {
10
+ status: 'ok' | 'not ok';
11
+ testOnlyToken?: string;
12
+ };
13
+ }
14
+ export interface IReq_AfterRegistrationEmailClicked extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_AfterRegistrationEmailClicked> {
15
+ method: 'afterRegistrationEmailClicked';
16
+ request: {
17
+ /**
18
+ * the token that has been sent with the registation email to verify access
19
+ */
20
+ token: string;
21
+ };
22
+ response: {
23
+ status: 'ok' | 'not ok';
24
+ /**
25
+ * the email thats associated with the given request token
26
+ */
27
+ email: string;
28
+ };
29
+ }
30
+ export interface IReq_SetDataForRegistration extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_SetDataForRegistration> {
31
+ method: 'setDataForRegistration';
32
+ request: {
33
+ token: string;
34
+ userData: IUser['data'];
35
+ };
36
+ response: {
37
+ status: 'ok' | 'not ok';
38
+ };
39
+ }
40
+ /**
41
+ * Should be used to verify a mobile number for an verifcation
42
+ */
43
+ export interface IReq_MobileVerificationForRegistration extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_MobileVerificationForRegistration> {
44
+ method: 'mobileVerificationForRegistration';
45
+ request: {
46
+ token: string;
47
+ mobileNumber?: string;
48
+ verificationCode?: string;
49
+ };
50
+ response: {
51
+ messageSent?: boolean;
52
+ verficationCodeOk?: boolean;
53
+ testOnlySmsCode?: string;
54
+ };
55
+ }
56
+ export interface IReq_FinishRegistration extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_FinishRegistration> {
57
+ method: 'finishRegistration';
58
+ request: {
59
+ token: string;
60
+ };
61
+ response: {
62
+ status: 'ok' | 'not ok';
63
+ userData?: IUser['data'];
64
+ };
65
+ }
@@ -0,0 +1,3 @@
1
+ import * as plugins from '../plugins.js';
2
+ import {} from '../data/index.js';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVnaXN0cmF0aW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdHMvcmVxdWVzdC9yZWdpc3RyYXRpb24udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFjLE1BQU0sa0JBQWtCLENBQUMifQ==
@@ -0,0 +1,101 @@
1
+ import * as data from '../data/index.js';
2
+ import * as plugins from '../plugins.js';
3
+ export interface IReq_GetUserData extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetUserData> {
4
+ method: 'getUserData';
5
+ request: {
6
+ refreshToken: string;
7
+ };
8
+ response: {
9
+ jwt: string;
10
+ };
11
+ }
12
+ export interface IReq_SetUserData extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_SetUserData> {
13
+ method: 'setUserData';
14
+ request: {
15
+ refreshToken: string;
16
+ };
17
+ response: {
18
+ oneTimeTransferCode: string;
19
+ };
20
+ }
21
+ export interface IReq_SuspendUser extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_SuspendUser> {
22
+ method: 'suspendUser';
23
+ request: {
24
+ jwt: string;
25
+ userId: string;
26
+ };
27
+ response: {
28
+ publicKeyPem: string;
29
+ };
30
+ }
31
+ export interface IDeleteSuspendedUser extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IDeleteSuspendedUser> {
32
+ method: 'deleteSuspendedUser';
33
+ request: {
34
+ backendToken: string;
35
+ };
36
+ response: {
37
+ ok: boolean;
38
+ errorText?: string;
39
+ };
40
+ }
41
+ export interface IReq_GetRolesAndOrganizationsForUserId extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetRolesAndOrganizationsForUserId> {
42
+ method: 'getRolesAndOrganizationsForUserId';
43
+ request: {
44
+ jwt: string;
45
+ userId: string;
46
+ };
47
+ response: {
48
+ roles: data.IRole[];
49
+ organizations: data.IOrganization[];
50
+ };
51
+ }
52
+ export interface IReq_WhoIs {
53
+ method: 'whoIs';
54
+ request: {
55
+ jwt: string;
56
+ };
57
+ response: {
58
+ user: data.IUser;
59
+ };
60
+ }
61
+ export interface IReq_GetUserSessions extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetUserSessions> {
62
+ method: 'getUserSessions';
63
+ request: {
64
+ jwt: string;
65
+ };
66
+ response: {
67
+ sessions: Array<{
68
+ id: string;
69
+ deviceId: string;
70
+ deviceName: string;
71
+ browser: string;
72
+ os: string;
73
+ ip: string;
74
+ lastActive: number;
75
+ createdAt: number;
76
+ isCurrent: boolean;
77
+ }>;
78
+ };
79
+ }
80
+ export interface IReq_RevokeSession extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_RevokeSession> {
81
+ method: 'revokeSession';
82
+ request: {
83
+ jwt: string;
84
+ sessionId: string;
85
+ };
86
+ response: {
87
+ success: boolean;
88
+ };
89
+ }
90
+ export interface IReq_GetUserActivity extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetUserActivity> {
91
+ method: 'getUserActivity';
92
+ request: {
93
+ jwt: string;
94
+ limit?: number;
95
+ offset?: number;
96
+ };
97
+ response: {
98
+ activities: data.IActivityLog[];
99
+ total: number;
100
+ };
101
+ }
@@ -0,0 +1,3 @@
1
+ import * as data from '../data/index.js';
2
+ import * as plugins from '../plugins.js';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3QvdXNlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssSUFBSSxNQUFNLGtCQUFrQixDQUFDO0FBQ3pDLE9BQU8sS0FBSyxPQUFPLE1BQU0sZUFBZSxDQUFDIn0=