Required role: | Moderator |
export class StatBase
{
public refId: string;
public appUserId?: number;
public rawUrl: string;
public remoteIp: string;
public createdDate: string;
public constructor(init?: Partial<StatBase>) { (Object as any).assign(this, init); }
}
export enum SignupType
{
Updates = 'Updates',
Beta = 'Beta',
}
export class Signup extends StatBase
{
public id: number;
public type: SignupType;
public email: string;
public name?: string;
public cancelledDate?: string;
public constructor(init?: Partial<Signup>) { super(init); (Object as any).assign(this, init); }
}
// @ValidateRequest(Validator="HasRole(`Moderator`)")
export class UpdateSignup implements IPatchDb<Signup>
{
public id: number;
public type?: SignupType;
// @Validate(Validator="Email")
public email?: string;
public name?: string;
public cancelledDate?: string;
public constructor(init?: Partial<UpdateSignup>) { (Object as any).assign(this, init); }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsv/reply/UpdateSignup HTTP/1.1
Host: blazordiffusion.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
id: 0,
type: Updates,
email: String,
name: String,
cancelledDate: 0001-01-01
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { id: 0, type: Updates, email: String, name: String, cancelledDate: 0001-01-01, refId: String, appUserId: 0, rawUrl: String, remoteIp: String, createdDate: 0001-01-01 }