Skip to content

Commit b5a5b05

Browse files
committed
Updating version and removing some any in types
1 parent 7a0c8ec commit b5a5b05

8 files changed

Lines changed: 15 additions & 17 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hds-lib",
3-
"version": "0.1.4",
3+
"version": "0.1.5",
44
"description": "Health Data Safe - Library",
55
"main": "src/index.js",
66
"scripts": {

types/HDSModel/HDSModel.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ declare class HDSModel {
2323
/**
2424
* Load model definitions
2525
*/
26-
load(modelUrl?: any): Promise<void>;
26+
load(modelUrl?: string): Promise<void>;
2727
/** RAW model data */
2828
get modelData(): any;
2929

types/HDSModel/HDSModelInitAndSingleton.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function getModel(): any;
1+
export function getModel(): HDSModel;
22
/**
33
* Initialized model singleton
44
* @returns {HDSModel}

types/appTemplates/AppClientAccount.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ declare class AppClientAccount extends Application {
2020
* @returns {AppClientAccount}
2121
*/
2222
static newFromConnection(baseStreamId: string, connection: pryv.Connection, appName?: string, features?: Application.ApplicationFeatures): AppClientAccount;
23-
constructor(baseStreamId: string, connection: pryv.Connection, appName: string, features: any, ...args: Application.ApplicationFeatures[]);
23+
constructor(baseStreamId: string, connection: pryv.Connection, appName: string, features: Application.ApplicationFeatures);
2424
get appSettings(): {
2525
canBePersonnal: boolean;
2626
mustBeMaster: boolean;
@@ -32,7 +32,7 @@ declare class AppClientAccount extends Application {
3232
* @returns {CollectorClient}
3333
*/
3434
handleIncomingRequest(apiEndpoint: string, incomingEventId?: string): CollectorClient;
35-
getCollectorClientByKey(collectorKey: any): Promise<CollectorClient>;
35+
getCollectorClientByKey(collectorKey: string): Promise<CollectorClient>;
3636
getCollectorClients(forceRefresh?: boolean): Promise<CollectorClient[]>;
3737
}
3838
import Application = require("./Application");

types/appTemplates/AppManagingAccount.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ declare class AppManagingAccount extends Application {
4343
appNameFromAccessInfo: boolean;
4444
};
4545
init(): Promise<this>;
46-
getCollectors(forceRefresh: any): Promise<any[]>;
47-
getCollectorById(id: any): Promise<any>;
46+
getCollectors(forceRefresh?: boolean): Promise<Collector[]>;
47+
getCollectorById(id: string): Promise<Collector>;
4848
/**
4949
* Create an iniatilized Collector
5050
* @param {string} name

types/appTemplates/Collector.d.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,20 @@ declare class Collector {
2727
*/
2828
constructor(appManaging: AppManagingAccount, streamData: pryv.Stream);
2929
appManaging: AppManagingAccount;
30-
streamId: any;
31-
name: any;
30+
streamId: string;
31+
name: string;
3232
/**
3333
* @property {string} id - shortcut for steamid
3434
*/
35-
get id(): any;
35+
get id(): string;
3636
/**
3737
* Payload that can be modified
3838
* */
3939
get statusData(): any;
4040
/**
4141
* @property {string} one of 'draft', 'active', 'deactivated'
4242
*/
43-
get statusCode(): any;
43+
get statusCode(): string;
4444
/**
4545
* Fetch online data
4646
*/
@@ -81,10 +81,8 @@ declare class Collector {
8181
* check if required streams are present, if not create them
8282
*/
8383
checkStreamStructure(): Promise<{
84-
created: any[];
85-
errors: any[];
86-
} | {
87-
created: any[];
84+
created: pryv.Stream[];
85+
errors?: any[];
8886
}>;
8987
/**
9088
* @param {string} suffix

types/appTemplates/CollectorInvite.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ declare class CollectorInvite {
1313
* @returns {string}
1414
*/
1515
static getKeyForEvent(eventData: pryv.Event): string;
16-
constructor(collector: any, eventData: any);
16+
constructor(collector: Collector, eventData: pryv.Event);
1717
/** @type {Collector} */
1818
collector: Collector;
1919
/** @type {Event} */

types/localizeText.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export function localizeText(textItem: {
99
en: string;
1010
fr?: string;
1111
es?: string;
12-
}): any;
12+
}): string;
1313
/**
1414
* Change prefferedLocal order
1515
* @param {Array<string>} arrayOfLocals of local codes

0 commit comments

Comments
 (0)