"use strict";
export class Likes {
/** @param {{artifactIds?:number[],albumIds?:number[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number[]} */
artifactIds = [];
/** @type {number[]} */
albumIds = [];
}
export class AlbumResult {
/** @param {{id?:number,name?:string,slug?:string,albumRef?:string,ownerRef?:string,primaryArtifactId?:number,score?:number,artifactIds?:number[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {string} */
name;
/** @type {string} */
slug;
/** @type {string} */
albumRef;
/** @type {string} */
ownerRef;
/** @type {?number} */
primaryArtifactId;
/** @type {number} */
score;
/** @type {number[]} */
artifactIds = [];
}
export class UserResult {
/** @param {{refId?:string,handle?:string,avatar?:string,profileUrl?:string,likes?:Likes,albums?:AlbumResult[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
refId;
/** @type {?string} */
handle;
/** @type {?string} */
avatar;
/** @type {?string} */
profileUrl;
/** @type {Likes} */
likes;
/** @type {AlbumResult[]} */
albums = [];
}
export class UserProfile {
/** @param {{displayName?:string,avatar?:string,handle?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
displayName;
/** @type {?string} */
avatar;
/** @type {?string} */
handle;
}
/** @typedef {'Updates'|'Beta'} */
export var SignupType;
(function (SignupType) {
SignupType["Updates"] = "Updates"
SignupType["Beta"] = "Beta"
})(SignupType || (SignupType = {}));
export class UserDataResponse {
/** @param {{user?:UserResult,profile?:UserProfile,signups?:SignupType[],roles?:string[],responseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {UserResult} */
user;
/** @type {UserProfile} */
profile;
/** @type {SignupType[]} */
signups = [];
/** @type {string[]} */
roles = [];
/** @type {ResponseStatus} */
responseStatus;
}
export class UserData {
constructor(init) { Object.assign(this, init) }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /jsonl/reply/UserData HTTP/1.1
Host: blazordiffusion.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"user":{"refId":"String","handle":"String","avatar":"String","profileUrl":"String","likes":{"artifactIds":[0],"albumIds":[0]},"albums":[{"id":0,"name":"String","slug":"String","albumRef":"String","ownerRef":"String","primaryArtifactId":0,"score":0,"artifactIds":[0]}]},"profile":{"displayName":"String","avatar":"String","handle":"String"},"signups":["Updates"],"roles":["String"],"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}