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-04 18:06:49 +00:00
|
|
|
}
|