2024-09-29 13:56:38 +02:00
|
|
|
import * as plugins from './plugins.js';
|
|
|
|
|
import type { IdpClient } from "./classes.idpclient.js";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* this class bundles all the typed requests that are used by the idp
|
2025-12-04 18:06:49 +00:00
|
|
|
* All requests use TypedSocket (WebSocket) transport
|
2024-09-29 13:56:38 +02:00
|
|
|
*/
|
|
|
|
|
export class IdpRequests {
|
|
|
|
|
idpClientArg: IdpClient;
|
|
|
|
|
constructor(idpClientArg: IdpClient) {
|
|
|
|
|
this.idpClientArg = idpClientArg;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get afterRegistrationEmailClicked () {
|
2025-12-04 18:06:49 +00:00
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_AfterRegistrationEmailClicked>(
|
2024-09-29 13:56:38 +02:00
|
|
|
'afterRegistrationEmailClicked'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get setData() {
|
2025-12-04 18:06:49 +00:00
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_SetDataForRegistration>(
|
2024-09-29 13:56:38 +02:00
|
|
|
'setDataForRegistration'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get mobileNumberVerification () {
|
2025-12-04 18:06:49 +00:00
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_MobileVerificationForRegistration>(
|
2024-09-29 13:56:38 +02:00
|
|
|
'mobileVerificationForRegistration'
|
|
|
|
|
);
|
|
|
|
|
}
|
2025-12-04 18:06:49 +00:00
|
|
|
|
2024-09-29 13:56:38 +02:00
|
|
|
|
|
|
|
|
public get finishRegistration() {
|
2025-12-04 18:06:49 +00:00
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_FinishRegistration>(
|
2024-09-29 13:56:38 +02:00
|
|
|
'finishRegistration'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get loginWithUserNameAndPassword () {
|
2025-12-04 18:06:49 +00:00
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_LoginWithEmailOrUsernameAndPassword>(
|
2024-09-29 13:56:38 +02:00
|
|
|
'loginWithEmailOrUsernameAndPassword'
|
|
|
|
|
);
|
2025-12-04 18:06:49 +00:00
|
|
|
}
|
2024-09-29 13:56:38 +02:00
|
|
|
|
|
|
|
|
public get obtainJwt () {
|
2025-12-04 18:06:49 +00:00
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_RefreshJwt>(
|
2024-09-29 13:56:38 +02:00
|
|
|
'refreshJwt'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get obtainOneTimeToken () {
|
2025-12-04 18:06:49 +00:00
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_ExchangeRefreshTokenAndTransferToken>(
|
2024-09-29 13:56:38 +02:00
|
|
|
'exchangeRefreshTokenAndTransferToken'
|
|
|
|
|
);
|
|
|
|
|
}
|
2025-12-14 10:58:46 +00:00
|
|
|
|
|
|
|
|
// ============================================
|
|
|
|
|
// Login & Authentication
|
|
|
|
|
// ============================================
|
|
|
|
|
|
|
|
|
|
public get loginWithEmail() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_LoginWithEmail>(
|
|
|
|
|
'loginWithEmail'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get loginWithEmailAfterToken() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_LoginWithEmailAfterEmailTokenAquired>(
|
|
|
|
|
'loginWithEmailAfterEmailTokenAquired'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get loginWithApiToken() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_LoginWithApiToken>(
|
|
|
|
|
'loginWithApiToken'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-20 09:46:13 +00:00
|
|
|
public get completeOidcAuthorization() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_CompleteOidcAuthorization>(
|
|
|
|
|
'completeOidcAuthorization'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get prepareOidcAuthorization() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_PrepareOidcAuthorization>(
|
|
|
|
|
'prepareOidcAuthorization'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-14 10:58:46 +00:00
|
|
|
public get resetPassword() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_ResetPassword>(
|
|
|
|
|
'resetPassword'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get setNewPassword() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_SetNewPassword>(
|
|
|
|
|
'setNewPassword'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get obtainDeviceId() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_ObtainDeviceId>(
|
|
|
|
|
'obtainDeviceId'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get attachDeviceId() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_AttachDeviceId>(
|
|
|
|
|
'attachDeviceId'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ============================================
|
|
|
|
|
// Registration
|
|
|
|
|
// ============================================
|
|
|
|
|
|
|
|
|
|
public get firstRegistration() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_FirstRegistration>(
|
|
|
|
|
'firstRegistrationRequest'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ============================================
|
|
|
|
|
// User Management
|
|
|
|
|
// ============================================
|
|
|
|
|
|
|
|
|
|
public get getUserData() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetUserData>(
|
|
|
|
|
'getUserData'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get setUserData() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_SetUserData>(
|
|
|
|
|
'setUserData'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get getUserSessions() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetUserSessions>(
|
|
|
|
|
'getUserSessions'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get revokeSession() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_RevokeSession>(
|
|
|
|
|
'revokeSession'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get getUserActivity() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetUserActivity>(
|
|
|
|
|
'getUserActivity'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ============================================
|
|
|
|
|
// Organization Management
|
|
|
|
|
// ============================================
|
|
|
|
|
|
|
|
|
|
public get getOrganizationById() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetOrganizationById>(
|
|
|
|
|
'getOrganizationById'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get updateOrganization() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_UpdateOrganization>(
|
|
|
|
|
'updateOrganization'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-07 15:35:37 +00:00
|
|
|
public get deleteOrganization() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_DeleteOrganization>(
|
|
|
|
|
'deleteOrganization'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get getOrgRoleDefinitions() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetOrgRoleDefinitions>(
|
|
|
|
|
'getOrgRoleDefinitions'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get upsertOrgRoleDefinition() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_UpsertOrgRoleDefinition>(
|
|
|
|
|
'upsertOrgRoleDefinition'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get deleteOrgRoleDefinition() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_DeleteOrgRoleDefinition>(
|
|
|
|
|
'deleteOrgRoleDefinition'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-14 10:58:46 +00:00
|
|
|
// ============================================
|
|
|
|
|
// Member & Invitation Management
|
|
|
|
|
// ============================================
|
|
|
|
|
|
|
|
|
|
public get createInvitation() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_CreateInvitation>(
|
|
|
|
|
'createInvitation'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get getOrgInvitations() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetOrgInvitations>(
|
|
|
|
|
'getOrgInvitations'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get getOrgMembers() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetOrgMembers>(
|
|
|
|
|
'getOrgMembers'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get cancelInvitation() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_CancelInvitation>(
|
|
|
|
|
'cancelInvitation'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get resendInvitation() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_ResendInvitation>(
|
|
|
|
|
'resendInvitation'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get removeMember() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_RemoveMember>(
|
|
|
|
|
'removeMember'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get updateMemberRoles() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_UpdateMemberRoles>(
|
|
|
|
|
'updateMemberRoles'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get transferOwnership() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_TransferOwnership>(
|
|
|
|
|
'transferOwnership'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get getInvitationByToken() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetInvitationByToken>(
|
|
|
|
|
'getInvitationByToken'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get acceptInvitation() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_AcceptInvitation>(
|
|
|
|
|
'acceptInvitation'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get bulkCreateInvitations() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_BulkCreateInvitations>(
|
|
|
|
|
'bulkCreateInvitations'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2026-05-07 15:35:37 +00:00
|
|
|
public get updateAppRoleMappings() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_UpdateAppRoleMappings>(
|
|
|
|
|
'updateAppRoleMappings'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2025-12-14 10:58:46 +00:00
|
|
|
// ============================================
|
|
|
|
|
// Billing
|
|
|
|
|
// ============================================
|
|
|
|
|
|
|
|
|
|
public get getBillingPlan() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetBillingPlan>(
|
|
|
|
|
'getBillingPlan'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get getPaddleConfig() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetPaddleConfig>(
|
|
|
|
|
'getPaddleConfig'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ============================================
|
|
|
|
|
// JWT Verification & Management
|
|
|
|
|
// ============================================
|
|
|
|
|
|
|
|
|
|
public get getPublicKeyForValidation() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetPublicKeyForValidation>(
|
|
|
|
|
'getPublicKeyForValidation'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get pushPublicKeyForValidation() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_PushPublicKeyForValidation>(
|
|
|
|
|
'pushPublicKeyForValidation'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get pushOrGetJwtIdBlocklist() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_PushOrGetJwtIdBlocklist>(
|
|
|
|
|
'pushOrGetJwtIdBlocklist'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ============================================
|
|
|
|
|
// User Suspension (Admin)
|
|
|
|
|
// ============================================
|
|
|
|
|
|
|
|
|
|
public get suspendUser() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_SuspendUser>(
|
|
|
|
|
'suspendUser'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get deleteSuspendedUser() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IDeleteSuspendedUser>(
|
|
|
|
|
'deleteSuspendedUser'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ============================================
|
|
|
|
|
// Admin (Global Admin Only)
|
|
|
|
|
// ============================================
|
|
|
|
|
|
|
|
|
|
public get checkGlobalAdmin() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_CheckGlobalAdmin>(
|
|
|
|
|
'checkGlobalAdmin'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get getGlobalAppStats() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_GetGlobalAppStats>(
|
|
|
|
|
'getGlobalAppStats'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get createGlobalApp() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_CreateGlobalApp>(
|
|
|
|
|
'createGlobalApp'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get updateGlobalApp() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_UpdateGlobalApp>(
|
|
|
|
|
'updateGlobalApp'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get deleteGlobalApp() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_DeleteGlobalApp>(
|
|
|
|
|
'deleteGlobalApp'
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public get regenerateAppCredentials() {
|
|
|
|
|
return this.idpClientArg.typedsocket.createTypedRequest<plugins.idpInterfaces.request.IReq_RegenerateAppCredentials>(
|
|
|
|
|
'regenerateAppCredentials'
|
|
|
|
|
);
|
|
|
|
|
}
|
2025-12-04 18:06:49 +00:00
|
|
|
}
|