All Verbs | /user/organizations |
---|
"use strict";
export class OrganizationMember {
/** @param {{id?:number,organizationId?:number,userId?:number,userName?:string,isOwner?:boolean,isModerator?:boolean,denyAll?:boolean,denyPosts?:boolean,denyComments?:boolean,notes?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
organizationId;
/** @type {number} */
userId;
/** @type {string} */
userName;
/** @type {boolean} */
isOwner;
/** @type {boolean} */
isModerator;
/** @type {boolean} */
denyAll;
/** @type {boolean} */
denyPosts;
/** @type {boolean} */
denyComments;
/** @type {string} */
notes;
}
export class OrganizationMemberInvite {
/** @param {{id?:number,organizationId?:number,userId?:number,userName?:string,dismissed?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
organizationId;
/** @type {number} */
userId;
/** @type {string} */
userName;
/** @type {?string} */
dismissed;
}
export class OrganizationSubscription {
/** @param {{id?:number,organizationId?:number,userId?:number,userName?:string,postTypes?:string[],frequencyDays?:number,lastSyncedId?:number,lastSynced?:string,created?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
id;
/** @type {number} */
organizationId;
/** @type {number} */
userId;
/** @type {string} */
userName;
/** @type {string[]} */
postTypes;
/** @type {?number} */
frequencyDays;
/** @type {?number} */
lastSyncedId;
/** @type {?string} */
lastSynced;
/** @type {string} */
created;
}
export class GetUserOrganizationsResponse {
/** @param {{members?:OrganizationMember[],memberInvites?:OrganizationMemberInvite[],subscriptions?:OrganizationSubscription[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {OrganizationMember[]} */
members;
/** @type {OrganizationMemberInvite[]} */
memberInvites;
/** @type {OrganizationSubscription[]} */
subscriptions;
}
export class GetUserOrganizations {
constructor(init) { Object.assign(this, init) }
}
JavaScript GetUserOrganizations DTOs
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 /user/organizations HTTP/1.1
Host: techstacks.io
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { members: [ { id: 0, organizationId: 0, userId: 0, userName: String, isOwner: False, isModerator: False, denyAll: False, denyPosts: False, denyComments: False, notes: String } ], memberInvites: [ { id: 0, organizationId: 0, userId: 0, userName: String, dismissed: 0001-01-01 } ], subscriptions: [ { id: 0, organizationId: 0, userId: 0, userName: String, postTypes: [ String ], frequencyDays: 0, lastSyncedId: 0, lastSynced: 0001-01-01, created: 0001-01-01 } ] }