pryv 2.4.2 → 2.4.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.d.ts +11 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pryv",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "Pryv JavaScript library",
5
5
  "keywords": [
6
6
  "Pryv",
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 class AccessInfo extends Access {
563
+ export type AccessInfo = Access & {
564
564
  calls: KeyValue;
565
565
  user: KeyValue;
566
566
  }
@@ -570,7 +570,7 @@ declare module 'pryv' {
570
570
  } & PossibleError;
571
571
 
572
572
  export class Connection {
573
- constructor (apiEndpoint: string, service?: Service): Connection;
573
+ constructor (apiEndpoint: string, service?: Service);
574
574
  get service(): Service;
575
575
  username(): Promise<string>;
576
576
  api<Calls extends APICall[] = APICall[]>(
@@ -732,7 +732,7 @@ declare module 'pryv' {
732
732
  };
733
733
  };
734
734
 
735
- export type SetupAuth = (
735
+ export const SetupAuth: (
736
736
  settings: AuthSettings,
737
737
  serviceInfoUrl: string,
738
738
  serviceCustomizations?: serviceCustomizations,
@@ -783,23 +783,21 @@ declare module 'pryv' {
783
783
  get state(): AuthStatePayload;
784
784
  }
785
785
 
786
- export type Auth = {
786
+ export const Auth: {
787
787
  setupAuth: SetupAuth;
788
788
  AuthStates: AuthStates;
789
789
  AuthController: AuthController;
790
790
  }
791
791
 
792
- export type CookieUtils = {
793
- set(cookieKey: string, value: any, expireInDays: number): void;
794
- get(cookieKey: string): any;
795
- del(cookieKey: string): void;
796
- }
797
-
798
792
  export type getServiceInfoFromURL = (url: string) => string;
799
793
 
800
- export type Browser = {
794
+ export const Browser: {
801
795
  LoginButton: CustomLoginButton;
802
- CookieUtils: CookieUtils;
796
+ CookieUtils: {
797
+ set(cookieKey: string, value: any, expireInDays: number): void;
798
+ get(cookieKey: string): any;
799
+ del(cookieKey: string): void;
800
+ };
803
801
  AuthStates: AuthStates;
804
802
  setupAuth: SetupAuth;
805
803
  serviceInfoFromUrl: getServiceInfoFromURL;
@@ -810,7 +808,7 @@ declare module 'pryv' {
810
808
  token: string;
811
809
  };
812
810
 
813
- export type utils = {
811
+ export const utils: {
814
812
  isBrowser(): boolean;
815
813
  extractTokenAndAPIEndpoint(apiEndpoint: string): TokenAndAPIEndpoint;
816
814
  buildAPIEndpoint(tokenAndAPI: TokenAndAPIEndpoint): string;
@@ -822,11 +820,6 @@ declare module 'pryv' {
822
820
  type version = string;
823
821
 
824
822
  let pryv: {
825
- Service: Service;
826
- Connection: Connection;
827
- Auth: Auth;
828
- Browser: Browser;
829
- utils: utils;
830
823
  version: version;
831
824
  };
832
825