/* Options: Date: 2024-12-03 17:15:04 Version: 8.53 Tip: To override a DTO option, remove "//" prefix before updating BaseUrl: https://chat.netcore.io //GlobalNamespace: //MakePropertiesOptional: False //AddServiceStackTypes: True //AddResponseStatus: False //AddImplicitVersion: //AddDescriptionAsComments: True //IncludeTypes: //ExcludeTypes: //DefaultImports: */ export interface IReturn { createResponse(): T; } export interface IReturnVoid { createResponse(): void; } export interface IHasSessionId { sessionId?: string; } export interface IHasBearerToken { bearerToken?: string; } export interface IGet { } export interface IPost { } export class CustomType { public id: number; public name: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class SetterType { public id: number; public name: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract export class ResponseError { // @DataMember(Order=1) public errorCode: string; // @DataMember(Order=2) public fieldName: string; // @DataMember(Order=3) public message: string; // @DataMember(Order=4) public meta: { [index:string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract export class ResponseStatus { // @DataMember(Order=1) public errorCode: string; // @DataMember(Order=2) public message: string; // @DataMember(Order=3) public stackTrace: string; // @DataMember(Order=4) public errors: ResponseError[]; // @DataMember(Order=5) public meta: { [index:string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class ChatMessage { public id: number; public channel: string; public fromUserId: string; public fromName: string; public displayName: string; public message: string; public userAuthId: string; public private: boolean; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class GetChatHistoryResponse { public results: ChatMessage[] = []; public responseStatus: ResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } export class GetUserDetailsResponse { public provider: string; public userId: string; public userName: string; public fullName: string; public displayName: string; public firstName: string; public lastName: string; public company: string; public email: string; public phoneNumber: string; public birthDate?: string; public birthDateRaw: string; public address: string; public address2: string; public city: string; public state: string; public country: string; public culture: string; public gender: string; public language: string; public mailAddress: string; public nickname: string; public postalCode: string; public timeZone: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract export class AuthenticateResponse implements IHasSessionId, IHasBearerToken { // @DataMember(Order=1) public userId: string; // @DataMember(Order=2) public sessionId: string; // @DataMember(Order=3) public userName: string; // @DataMember(Order=4) public displayName: string; // @DataMember(Order=5) public referrerUrl: string; // @DataMember(Order=6) public bearerToken: string; // @DataMember(Order=7) public refreshToken: string; // @DataMember(Order=8) public refreshTokenExpiry?: string; // @DataMember(Order=9) public profileUrl: string; // @DataMember(Order=10) public roles: string[]; // @DataMember(Order=11) public permissions: string[]; // @DataMember(Order=12) public authProvider: string; // @DataMember(Order=13) public responseStatus: ResponseStatus; // @DataMember(Order=14) public meta: { [index:string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract export class AssignRolesResponse { // @DataMember(Order=1) public allRoles: string[]; // @DataMember(Order=2) public allPermissions: string[]; // @DataMember(Order=3) public meta: { [index:string]: string; }; // @DataMember(Order=4) public responseStatus: ResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @DataContract export class UnAssignRolesResponse { // @DataMember(Order=1) public allRoles: string[]; // @DataMember(Order=2) public allPermissions: string[]; // @DataMember(Order=3) public meta: { [index:string]: string; }; // @DataMember(Order=4) public responseStatus: ResponseStatus; public constructor(init?: Partial) { (Object as any).assign(this, init); } } // @Route("/channels/{Channel}/raw") export class PostRawToChannel implements IReturnVoid { public from: string; public toUserId?: string; public channel: string; public message?: string; public selector?: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'PostRawToChannel'; } public getMethod() { return 'POST'; } public createResponse() {} } // @Route("/channels/{Channel}/chat") export class PostChatToChannel implements IReturn { public from: string; public toUserId: string; public channel: string; public message: string; public selector: string; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'PostChatToChannel'; } public getMethod() { return 'POST'; } public createResponse() { return new ChatMessage(); } } // @Route("/chathistory") export class GetChatHistory implements IReturn, IGet { public channels: string[] = []; public afterId?: number; public take?: number; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'GetChatHistory'; } public getMethod() { return 'GET'; } public createResponse() { return new GetChatHistoryResponse(); } } // @Route("/reset") export class ClearChatHistory implements IReturnVoid, IGet { public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'ClearChatHistory'; } public getMethod() { return 'GET'; } public createResponse() {} } // @Route("/reset-serverevents") export class ResetServerEvents implements IReturnVoid, IGet { public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'ResetServerEvents'; } public getMethod() { return 'GET'; } public createResponse() {} } // @Route("/channels/{Channel}/object") export class PostObjectToChannel implements IReturnVoid { public toUserId?: string; public channel: string; public selector?: string; public customType?: CustomType; public setterType?: SetterType; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'PostObjectToChannel'; } public getMethod() { return 'POST'; } public createResponse() {} } // @Route("/account") export class GetUserDetails implements IReturn, IGet { public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'GetUserDetails'; } public getMethod() { return 'GET'; } public createResponse() { return new GetUserDetailsResponse(); } } /** @description Sign In */ // @Route("/auth", "GET,POST") // @Route("/auth/{provider}", "GET,POST") // @Api(Description="Sign In") // @DataContract export class Authenticate implements IReturn, IPost { /** @description AuthProvider, e.g. credentials */ // @DataMember(Order=1) public provider: string; // @DataMember(Order=2) public userName: string; // @DataMember(Order=3) public password: string; // @DataMember(Order=4) public rememberMe?: boolean; // @DataMember(Order=5) public accessToken: string; // @DataMember(Order=6) public accessTokenSecret: string; // @DataMember(Order=7) public returnUrl: string; // @DataMember(Order=8) public errorView: string; // @DataMember(Order=9) public meta: { [index:string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'Authenticate'; } public getMethod() { return 'POST'; } public createResponse() { return new AuthenticateResponse(); } } // @Route("/assignroles", "POST") // @DataContract export class AssignRoles implements IReturn, IPost { // @DataMember(Order=1) public userName: string; // @DataMember(Order=2) public permissions: string[]; // @DataMember(Order=3) public roles: string[]; // @DataMember(Order=4) public meta: { [index:string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'AssignRoles'; } public getMethod() { return 'POST'; } public createResponse() { return new AssignRolesResponse(); } } // @Route("/unassignroles", "POST") // @DataContract export class UnAssignRoles implements IReturn, IPost { // @DataMember(Order=1) public userName: string; // @DataMember(Order=2) public permissions: string[]; // @DataMember(Order=3) public roles: string[]; // @DataMember(Order=4) public meta: { [index:string]: string; }; public constructor(init?: Partial) { (Object as any).assign(this, init); } public getTypeName() { return 'UnAssignRoles'; } public getMethod() { return 'POST'; } public createResponse() { return new UnAssignRolesResponse(); } }