11declare module 'pryv' {
22 type Timestamp = number ;
33 type Identifier = string ;
4- type Level = 'read' | 'contribute' | 'manage' | 'create-only' ;
5- type KeyValue = { [ key : string ] : string | number } ;
4+ export type Level = 'read' | 'contribute' | 'manage' | 'create-only' ;
5+ export type KeyValue = { [ key : string ] : string | number } ;
66
7- type Attachment = {
7+ export type Attachment = {
88 id : Identifier ;
99 fileName : string ;
1010 type : string ;
1111 size : number ;
1212 readToken : string ;
1313 } ;
1414
15- type Stream = {
15+ export type Stream = {
1616 id : Identifier ;
1717 name : string ;
1818 parentId ?: Identifier ;
@@ -25,7 +25,7 @@ declare module 'pryv' {
2525 modifiedBy : Identifier ;
2626 } ;
2727
28- type Event = {
28+ export type Event = {
2929 id : Identifier ;
3030 streamIds : Identifier [ ] ;
3131 streamId : Identifier ;
@@ -44,14 +44,14 @@ declare module 'pryv' {
4444 modifiedBy : Identifier ;
4545 } ;
4646
47- type Permission = {
47+ export type Permission = {
4848 streamId : Identifier ;
4949 level : Level ;
5050 feature ?: 'selfRevoke' ;
5151 setting ?: 'forbidden' ;
5252 } ;
5353
54- type Access = {
54+ export type Access = {
5555 id : Identifier ;
5656 token : string ;
5757 type ?: 'personal' | 'app' | 'shared' ;
@@ -77,7 +77,7 @@ declare module 'pryv' {
7777 accessToken : string ;
7878 } ;
7979
80- type AccountInformation = {
80+ export type AccountInformation = {
8181 username : string ;
8282 email : string ;
8383 language : string ;
@@ -101,7 +101,7 @@ declare module 'pryv' {
101101 errorId ?: string ;
102102 } ;
103103
104- type HFSeries = {
104+ export type HFSeries = {
105105 format : 'flatJSON' ;
106106 fields : string [ ] ;
107107 points : Array < number | string > ;
@@ -112,7 +112,7 @@ declare module 'pryv' {
112112 timestamp : Timestamp ;
113113 } ;
114114
115- type WebHook = {
115+ export type WebHook = {
116116 id : Identifier ;
117117 accessId : Identifier ;
118118 url : string ;
@@ -130,25 +130,25 @@ declare module 'pryv' {
130130 modifiedBy : Identifier ;
131131 } ;
132132
133- type ItemDeletion = {
133+ export type ItemDeletion = {
134134 id : Identifier ;
135135 deleted ?: Timestamp ;
136136 } ;
137137
138- type Error = {
138+ export type Error = {
139139 id : string ;
140140 message : string ;
141141 data ?: any ;
142142 subErrors ?: Error [ ] ;
143143 } ;
144144
145- type StreamsQuery = {
145+ export type StreamsQuery = {
146146 any ?: Identifier [ ] ;
147147 all ?: Identifier [ ] ;
148148 not ?: Identifier [ ] ;
149149 } ;
150150
151- type EventQueryParams = {
151+ export type EventQueryParams = {
152152 fromTime : Timestamp ;
153153 toTime : Timestamp ;
154154 streams : string [ ] ;
@@ -163,11 +163,11 @@ declare module 'pryv' {
163163 includeDeletion : boolean ;
164164 } ;
165165
166- type EventQueryParamsStreamQuery = Omit < EventQueryParams , 'streams' > & {
166+ export type EventQueryParamsStreamQuery = Omit < EventQueryParams , 'streams' > & {
167167 streams : string [ ] | StreamsQuery ;
168168 } ;
169169
170- type EditMetadata = 'created' | 'createdBy' | 'modified' | 'modifiedBy' ;
170+ export type EditMetadata = 'created' | 'createdBy' | 'modified' | 'modifiedBy' ;
171171
172172 export type APICallMethods = {
173173 // mfa
@@ -534,7 +534,7 @@ declare module 'pryv' {
534534 ) => Promise < any > ;
535535 export type StreamedEventsHandler = ( event : Event ) => void ;
536536
537- type StreamedEventsResult = {
537+ export type StreamedEventsResult = {
538538 eventsCount ?: number ;
539539 eventsDeletionsCount ?: number ;
540540 meta : {
@@ -560,12 +560,12 @@ declare module 'pryv' {
560560
561561 export type APICallProgressHandler = ( percentage : number ) => void ;
562562
563- interface AccessInfo extends Access {
563+ export interface AccessInfo extends Access {
564564 calls : KeyValue ;
565565 user : KeyValue ;
566566 }
567567
568- type EventAPICallRes = {
568+ export type EventAPICallRes = {
569569 event ?: Event ;
570570 } & PossibleError ;
571571
@@ -681,7 +681,7 @@ declare module 'pryv' {
681681 | 'ACCEPTED'
682682 | 'SIGNOUT' ;
683683
684- type StateChangeTypes = {
684+ export type StateChangeTypes = {
685685 LOADING : { } ;
686686 INITIALIZED : {
687687 serviceInfo : ServiceInfo ;
0 commit comments