cozy-external-bridge 1.2.0 → 1.2.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.
@@ -0,0 +1,25 @@
1
+ import { IOCozyContact } from 'cozy-client/types/types';
2
+ export declare class CozyBridge {
3
+ private availableMethods?;
4
+ private originalPushState;
5
+ private originalReplaceState;
6
+ private onPopstate;
7
+ startHistorySyncing: () => void;
8
+ stopHistorySyncing: () => void;
9
+ getContacts: () => Promise<IOCozyContact[]>;
10
+ getLang: () => Promise<string>;
11
+ getFlag: (key: string) => Promise<string | boolean>;
12
+ createDocs: (data: object) => Promise<object>;
13
+ updateDocs: (data: object) => Promise<object>;
14
+ search: (searchQuery: string) => Promise<object[]>;
15
+ requestNotificationPermission: () => Promise<NotificationPermission>;
16
+ sendNotification: (data: {
17
+ title: string;
18
+ body: string;
19
+ }) => Promise<void>;
20
+ requestParentOrigin: () => Promise<string | undefined>;
21
+ isInIframe: () => boolean;
22
+ isInsideCozy: (targetOrigin: string) => boolean;
23
+ setupBridge: (targetOrigin: string) => boolean;
24
+ }
25
+ export default CozyBridge;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cozy-external-bridge",
3
3
  "description": "Library allows communication between a container app and an app embedded in an iframe",
4
- "version": "1.2.0",
4
+ "version": "1.2.2",
5
5
  "author": {
6
6
  "name": "Cozy Cloud",
7
7
  "url": "https://github.com/cozy"
@@ -19,7 +19,7 @@
19
19
  "@rspack/core": "^1.2.7",
20
20
  "babel-plugin-module-resolver": "^4.0.0",
21
21
  "babel-plugin-tsconfig-paths": "^1.0.3",
22
- "babel-preset-cozy-app": "^2.8.3",
22
+ "babel-preset-cozy-app": "^2.8.4",
23
23
  "cozy-client": "^54.0.0",
24
24
  "typescript": "5.5.2"
25
25
  },
@@ -40,11 +40,11 @@
40
40
  "scripts": {
41
41
  "build": "yarn build:clean && yarn build:types && babel --extensions .ts,.tsx,.js,.jsx --ignore '**/*.spec.tsx','**/*.spec.ts','**/*.d.ts' ./src -d ./dist --copy-files && yarn build:lib",
42
42
  "build:clean": "rm -rf ./dist",
43
- "build:types": "tsc -p tsconfig-build.json",
43
+ "build:types": "tsc",
44
44
  "build:lib": "rspack build",
45
45
  "prepublishOnly": "yarn build",
46
46
  "lint": "cd ../.. && yarn eslint --ext js,jsx,ts packages/cozy-external-bridge"
47
47
  },
48
48
  "types": "dist/index.d.ts",
49
- "gitHead": "74e4743a3ba8e57a3031f0127af06339d688e21f"
49
+ "gitHead": "46d6951cb22a17ac26c3b00c28caf47d405d6683"
50
50
  }