Skip to content

Commit

Permalink
Merge pull request #4216 from jeclrsg/bump-ws-account-1.06
Browse files Browse the repository at this point in the history
chore(comms): bump WsAccount wsdl to 1.06
  • Loading branch information
GordonSmith authored Jul 29, 2024
2 parents ac825f8 + c5e010d commit 16752be
Show file tree
Hide file tree
Showing 2 changed files with 116 additions and 100 deletions.
107 changes: 7 additions & 100 deletions packages/comms/src/services/wsAccount.ts
Original file line number Diff line number Diff line change
@@ -1,105 +1,11 @@
import { IConnection, IOptions } from "../connection";
import { ESPConnection, ESPExceptions } from "../espConnection";
import { AccountServiceBase, WsAccount } from "./wsdl/ws_account/v1.06/ws_account";
import { ESPExceptions } from "../espConnection";

/*
Response structures generated via:
* http://localhost:8010/Ws_Account/?reqjson_
* http://localhost:8010/Ws_Account/?respjson_
* http://json2ts.com/
*/
export namespace WsAccount {
export {
WsAccount
};

export interface MyAccountRequest {
}

export interface WsAccountPingRequest {
}

export interface UpdateUserRequest {
username: string;
oldpass: string;
newpass1: string;
newpass2: string;
}

export interface UpdateUserInputRequest {
}

export interface VerifyUserRequest {
application: string;
version: string;
}

export interface Exception {
Code: string;
Audience: string;
Source: string;
Message: string;
}

export interface Exceptions {
Source: string;
Exception: Exception[];
}

export interface MyAccountResponse {
Exceptions: Exceptions;
username: string;
firstName: string;
lastName: string;
passwordExpiration: string;
passwordDaysRemaining: number;
passwordExpirationWarningDays: number;
employeeID: string;
distinguishedName: string;
accountType: string;
passwordNeverExpires: boolean;
passwordIsExpired: boolean;
accountStatus: number;
}

export interface WsAccountPingResponse {
}

export interface UpdateUserResponse {
Exceptions: Exceptions;
retcode: number;
message: string;
}

export interface UpdateUserInputResponse {
Exceptions: Exceptions;
username: string;
}

export interface VerifyUserResponse {
Exceptions: Exceptions;
retcode: number;
}
}

export class AccountService {
private _connection: ESPConnection;

constructor(optsConnection: IOptions | IConnection) {
this._connection = new ESPConnection(optsConnection, "Ws_Account", "1.05");
}

connectionOptions(): IOptions {
return this._connection.opts();
}

MyAccount(request: WsAccount.MyAccountRequest): Promise<WsAccount.MyAccountResponse> {
return this._connection.send("MyAccount", request);
}

UpdateUser(request: WsAccount.UpdateUserRequest): Promise<WsAccount.UpdateUserResponse> {
return this._connection.send("UpdateUser", request);
}

UpdateUserInput(request: WsAccount.UpdateUserInputRequest): Promise<WsAccount.UpdateUserInputResponse> {
return this._connection.send("UpdateUserInput", request);
}
export class AccountService extends AccountServiceBase {

VerifyUser(request: WsAccount.VerifyUserRequest): Promise<WsAccount.VerifyUserResponse> {
return this._connection.send("VerifyUser", request)
Expand All @@ -117,4 +23,5 @@ export class AccountService {
throw e;
});
}

}
109 changes: 109 additions & 0 deletions packages/comms/src/services/wsdl/ws_account/v1.06/ws_account.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
import { IConnection, IOptions } from "../../../../connection";
import { Service } from "../../../../espConnection";

export namespace WsAccount {

export type int = number;

export interface MyAccountRequest {

}

export interface Exception {
Code: string;
Audience: string;
Source: string;
Message: string;
}

export interface Exceptions {
Source: string;
Exception: Exception[];
}

export interface MyAccountResponse {
Exceptions: Exceptions;
username: string;
firstName: string;
lastName: string;
passwordExpiration: string;
passwordDaysRemaining: int;
passwordExpirationWarningDays: int;
employeeID: string;
distinguishedName: string;
accountType: string;
passwordNeverExpires: boolean;
passwordIsExpired: boolean;
CanUpdatePassword: boolean;
accountStatus: int;
}

export interface ws_accountPingRequest {

}

export interface ws_accountPingResponse {

}

export interface UpdateUserRequest {
username?: string;
oldpass?: string;
newpass1?: string;
newpass2?: string;
}

export interface UpdateUserResponse {
Exceptions: Exceptions;
retcode: int;
message: string;
}

export interface UpdateUserInputRequest {

}

export interface UpdateUserInputResponse {
Exceptions: Exceptions;
username: string;
}

export interface VerifyUserRequest {
application?: string;
version?: string;
}

export interface VerifyUserResponse {
Exceptions: Exceptions;
retcode: int;
}

}

export class AccountServiceBase extends Service {

constructor(optsConnection: IOptions | IConnection) {
super(optsConnection, "ws_account", "1.06");
}

MyAccount(request: Partial<WsAccount.MyAccountRequest>): Promise<WsAccount.MyAccountResponse> {
return this._connection.send("MyAccount", request, "json", false, undefined, "MyAccountResponse");
}

Ping(request: Partial<WsAccount.ws_accountPingRequest>): Promise<WsAccount.ws_accountPingResponse> {
return this._connection.send("Ping", request, "json", false, undefined, "ws_accountPingResponse");
}

UpdateUser(request: Partial<WsAccount.UpdateUserRequest>): Promise<WsAccount.UpdateUserResponse> {
return this._connection.send("UpdateUser", request, "json", false, undefined, "UpdateUserResponse");
}

UpdateUserInput(request: Partial<WsAccount.UpdateUserInputRequest>): Promise<WsAccount.UpdateUserInputResponse> {
return this._connection.send("UpdateUserInput", request, "json", false, undefined, "UpdateUserInputResponse");
}

VerifyUser(request: Partial<WsAccount.VerifyUserRequest>): Promise<WsAccount.VerifyUserResponse> {
return this._connection.send("VerifyUser", request, "json", false, undefined, "VerifyUserResponse");
}

}

0 comments on commit 16752be

Please sign in to comment.