pryv 2.4.1 → 2.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/index.d.ts +17 -17
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -560,7 +560,7 @@ declare module 'pryv' {
|
|
|
560
560
|
|
|
561
561
|
export type APICallProgressHandler = (percentage: number) => void;
|
|
562
562
|
|
|
563
|
-
export
|
|
563
|
+
export class AccessInfo extends Access {
|
|
564
564
|
calls: KeyValue;
|
|
565
565
|
user: KeyValue;
|
|
566
566
|
}
|
|
@@ -569,8 +569,8 @@ declare module 'pryv' {
|
|
|
569
569
|
event?: Event;
|
|
570
570
|
} & PossibleError;
|
|
571
571
|
|
|
572
|
-
export
|
|
573
|
-
|
|
572
|
+
export class Connection {
|
|
573
|
+
constructor (apiEndpoint: string, service?: Service): Connection;
|
|
574
574
|
get service(): Service;
|
|
575
575
|
username(): Promise<string>;
|
|
576
576
|
api<Calls extends APICall[] = APICall[]>(
|
|
@@ -650,11 +650,11 @@ declare module 'pryv' {
|
|
|
650
650
|
[key: string]: any;
|
|
651
651
|
};
|
|
652
652
|
|
|
653
|
-
export
|
|
654
|
-
|
|
653
|
+
export class Service {
|
|
654
|
+
constructor (
|
|
655
655
|
serviceInfoUrl: string,
|
|
656
656
|
serviceCustomizations?: serviceCustomizations,
|
|
657
|
-
)
|
|
657
|
+
);
|
|
658
658
|
info(forceFetch?: boolean): Promise<ServiceInfo>;
|
|
659
659
|
setServiceInfo(serviceInfo: Partial<ServiceInfo>): Promise<void>;
|
|
660
660
|
assets(forceFetch?: boolean): Promise<AssetsConfig>;
|
|
@@ -732,7 +732,7 @@ declare module 'pryv' {
|
|
|
732
732
|
};
|
|
733
733
|
};
|
|
734
734
|
|
|
735
|
-
type SetupAuth = (
|
|
735
|
+
export type SetupAuth = (
|
|
736
736
|
settings: AuthSettings,
|
|
737
737
|
serviceInfoUrl: string,
|
|
738
738
|
serviceCustomizations?: serviceCustomizations,
|
|
@@ -754,7 +754,7 @@ declare module 'pryv' {
|
|
|
754
754
|
message?: string;
|
|
755
755
|
};
|
|
756
756
|
|
|
757
|
-
export
|
|
757
|
+
export type CustomLoginButton = {
|
|
758
758
|
init?: () => Promise<void>;
|
|
759
759
|
getAuthorizationData(): string;
|
|
760
760
|
onStateChange(state: AuthStatePayload): Promise<void>;
|
|
@@ -763,12 +763,12 @@ declare module 'pryv' {
|
|
|
763
763
|
deleteAuthorizationData?: () => Promise<void>;
|
|
764
764
|
}
|
|
765
765
|
|
|
766
|
-
export
|
|
767
|
-
|
|
766
|
+
export class AuthController {
|
|
767
|
+
constructor (
|
|
768
768
|
authSettings: AuthSettings,
|
|
769
769
|
service: Service,
|
|
770
770
|
loginButton: CustomLoginButton,
|
|
771
|
-
)
|
|
771
|
+
);
|
|
772
772
|
init(): Promise<void>;
|
|
773
773
|
stopAuthRequest(msg: string): void;
|
|
774
774
|
handleClick(): Promise<void>;
|
|
@@ -783,21 +783,21 @@ declare module 'pryv' {
|
|
|
783
783
|
get state(): AuthStatePayload;
|
|
784
784
|
}
|
|
785
785
|
|
|
786
|
-
export
|
|
786
|
+
export type Auth = {
|
|
787
787
|
setupAuth: SetupAuth;
|
|
788
788
|
AuthStates: AuthStates;
|
|
789
789
|
AuthController: AuthController;
|
|
790
790
|
}
|
|
791
791
|
|
|
792
|
-
export
|
|
792
|
+
export type CookieUtils = {
|
|
793
793
|
set(cookieKey: string, value: any, expireInDays: number): void;
|
|
794
794
|
get(cookieKey: string): any;
|
|
795
795
|
del(cookieKey: string): void;
|
|
796
796
|
}
|
|
797
797
|
|
|
798
|
-
type getServiceInfoFromURL = (url: string) => string;
|
|
798
|
+
export type getServiceInfoFromURL = (url: string) => string;
|
|
799
799
|
|
|
800
|
-
export
|
|
800
|
+
export type Browser = {
|
|
801
801
|
LoginButton: CustomLoginButton;
|
|
802
802
|
CookieUtils: CookieUtils;
|
|
803
803
|
AuthStates: AuthStates;
|
|
@@ -805,12 +805,12 @@ declare module 'pryv' {
|
|
|
805
805
|
serviceInfoFromUrl: getServiceInfoFromURL;
|
|
806
806
|
}
|
|
807
807
|
|
|
808
|
-
type TokenAndAPIEndpoint = {
|
|
808
|
+
export type TokenAndAPIEndpoint = {
|
|
809
809
|
endpoint: string;
|
|
810
810
|
token: string;
|
|
811
811
|
};
|
|
812
812
|
|
|
813
|
-
export
|
|
813
|
+
export type utils = {
|
|
814
814
|
isBrowser(): boolean;
|
|
815
815
|
extractTokenAndAPIEndpoint(apiEndpoint: string): TokenAndAPIEndpoint;
|
|
816
816
|
buildAPIEndpoint(tokenAndAPI: TokenAndAPIEndpoint): string;
|