UNPKG

@xmobitea/gn-typescript-client

Version:

GearN Typescript Client SDK by XmobiTea (Pro)

123 lines (122 loc) 16.3 kB
import { GNNetwork } from "./GNNetwork"; import { OperationRequest } from "./entity/OperationRequest"; import { AuthenticateRequestModels } from "./entity/models/AuthenticateRequestModels"; import { AuthenticateResponseModels } from "./entity/models/AuthenticateResponseModels"; export class AuthenticateApi { constructor() { this.server = new ServerAuthenticateApi(); this.admin = new AdminAuthenticateApi(); } loginByAccount(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByAccountOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAccountOperationResponse); } async loginByAccountAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByAccountOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAccountOperationResponse); } loginByAndroidDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByAndroidDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAndroidDeviceIdOperationResponse); } async loginByAndroidDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByAndroidDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAndroidDeviceIdOperationResponse); } loginByApple(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByAppleOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAppleOperationResponse); } async loginByAppleAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByAppleOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByAppleOperationResponse); } loginByCustomDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByCustomDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomDeviceIdOperationResponse); } async loginByCustomDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByCustomDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomDeviceIdOperationResponse); } loginByCustomId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByCustomIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomIdOperationResponse); } async loginByCustomIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByCustomIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByCustomIdOperationResponse); } loginByEditorDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByEditorDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByEditorDeviceIdOperationResponse); } async loginByEditorDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByEditorDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByEditorDeviceIdOperationResponse); } loginByFacebook(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByFacebookOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByFacebookOperationResponse); } async loginByFacebookAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByFacebookOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByFacebookOperationResponse); } loginByGenericService(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGenericServiceOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGenericServiceOperationResponse); } async loginByGenericServiceAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGenericServiceOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGenericServiceOperationResponse); } loginByGoogle(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGoogleOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGoogleOperationResponse); } async loginByGoogleAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGoogleOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGoogleOperationResponse); } loginByGooglePlayGameService(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGooglePlayGameServiceOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGooglePlayGameServiceOperationResponse); } async loginByGooglePlayGameServiceAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGooglePlayGameServiceOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGooglePlayGameServiceOperationResponse); } loginByGameCenter(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByGameCenterOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGameCenterOperationResponse); } async loginByGameCenterAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByGameCenterOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByGameCenterOperationResponse); } loginByiOSDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByiOSDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByiOSDeviceIdOperationResponse); } async loginByiOSDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByiOSDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByiOSDeviceIdOperationResponse); } loginByLinuxDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByLinuxDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByLinuxDeviceIdOperationResponse); } async loginByLinuxDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByLinuxDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByLinuxDeviceIdOperationResponse); } loginByMacOSDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByMacOSDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByMacOSDeviceIdOperationResponse); } async loginByMacOSDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByMacOSDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByMacOSDeviceIdOperationResponse); } loginByWindowsDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByWindowsDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsDeviceIdOperationResponse); } async loginByWindowsDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByWindowsDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsDeviceIdOperationResponse); } loginByWindowsPhoneDeviceId(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.LoginByWindowsPhoneDeviceIdOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsPhoneDeviceIdOperationResponse); } async loginByWindowsPhoneDeviceIdAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.LoginByWindowsPhoneDeviceIdOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.LoginByWindowsPhoneDeviceIdOperationResponse); } registerAccount(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.RegisterAccountOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RegisterAccountOperationResponse); } async registerAccountAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.RegisterAccountOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RegisterAccountOperationResponse); } refreshAuthToken(requestData, onResponse = null, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { GNNetwork.sendViaHttpTRequestTResponse(new AuthenticateRequestModels.RefreshAuthTokenOperationRequest(requestData, timeout), onResponse, overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RefreshAuthTokenOperationResponse); } async refreshAuthTokenAsync(requestData, overrideAuthToken = null, overrideSecretKey = null, customTags = null, timeout = OperationRequest.defaultTimeOut) { return GNNetwork.sendViaHttpTRequestTResponseAsync(new AuthenticateRequestModels.RefreshAuthTokenOperationRequest(requestData, timeout), overrideAuthToken, overrideSecretKey, customTags, AuthenticateResponseModels.RefreshAuthTokenOperationResponse); } } export class ServerAuthenticateApi { } export class AdminAuthenticateApi { }