@@ -48,36 +48,26 @@ class Collector {
4848 }
4949
5050 /**
51- * @property {string } one of 'draft', 'active', 'deactivated'
51+ * @property {string } id - shortcut for steamid
5252 */
53- get statusCode ( ) {
54- if ( this . #cache. status == null ) throw new Error ( 'Init Collector first' ) ;
55- return this . #cache. status . content . status ;
53+ get id ( ) {
54+ return this . streamId ;
5655 }
5756
58- /**
59- * @typedef {RequestContent }
60- * @property {number } version
61- * @property {Localizable } description
62- * @property {Localizable } consent
63- * @property {Array<Permission> } permissions - Like Pryv permission request
64- * @property {Object } app
65- * @property {String } app.id
66- * @property {String } app.url
67- * @property {Object } app.data - to be finalized
68- */
69-
70- /**
71- * @typedef {StatusData }
72- * @property {RequestContent } requestContent
73- */
74-
7557 /** @type {StatusData } */
7658 get statusData ( ) {
7759 if ( this . #cache. status == null ) throw new Error ( 'Init Collector first' ) ;
7860 return this . #cache. status . content . data ;
7961 }
8062
63+ /**
64+ * @property {string } one of 'draft', 'active', 'deactivated'
65+ */
66+ get statusCode ( ) {
67+ if ( this . #cache. status == null ) throw new Error ( 'Init Collector first' ) ;
68+ return this . #cache. status . content . status ;
69+ }
70+
8171 /**
8272 * Fetch online data
8373 */
@@ -159,6 +149,11 @@ class Collector {
159149 return this . #cache. invites [ key ] ;
160150 }
161151
152+ /**
153+ * Retreive all invites
154+ * @param {boolean } [forceRefresh]
155+ * @returns {Array<CollectorInvite> }
156+ */
162157 async getInvites ( forceRefresh = false ) {
163158 while ( this . #cache. invitesInitializing ) ( await new Promise ( ( resolve ) => { setTimeout ( resolve , 100 ) ; } ) ) ;
164159 this . #cache. invitesInitializing = true ;
@@ -352,3 +347,20 @@ class Collector {
352347}
353348
354349module . exports = Collector ;
350+
351+ /**
352+ * @typedef {RequestContent }
353+ * @property {number } version
354+ * @property {Localizable } description
355+ * @property {Localizable } consent
356+ * @property {Array<Permission> } permissions - Like Pryv permission request
357+ * @property {Object } app
358+ * @property {String } app.id
359+ * @property {String } app.url
360+ * @property {Object } app.data - to be finalized
361+ */
362+
363+ /**
364+ * @typedef {StatusData }
365+ * @property {RequestContent } requestContent
366+ */
0 commit comments