@tiendanube/nexo 0.1.8 → 0.2.1
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/actions/actions.d.ts +10 -10
- package/core/nexoClient.d.ts +1 -1
- package/core/transporter.d.ts +5 -5
- package/core/utils.d.ts +1 -1
- package/helpers/helpers.js +1 -1
- package/package.json +16 -8
package/actions/actions.d.ts
CHANGED
|
@@ -3,28 +3,28 @@ export declare const ACTION_CONNECTED = "app/connected";
|
|
|
3
3
|
export declare const ACTION_NAVIGATE_EXIT = "app/navigate/exit";
|
|
4
4
|
export declare const ACTION_NAVIGATE_BACK = "app/navigate/back";
|
|
5
5
|
export declare const ACTION_NAVIGATE_GOTO = "app/navigate/goTo";
|
|
6
|
-
export
|
|
6
|
+
export type NavigateGoToRequest = {
|
|
7
7
|
pathname: string;
|
|
8
8
|
};
|
|
9
9
|
export declare const ACTION_NAVIGATE_PATHNAME = "app/navigate/pathname";
|
|
10
|
-
export
|
|
10
|
+
export type NavigatePathnameResponse = {
|
|
11
11
|
pathname: string | null;
|
|
12
12
|
};
|
|
13
13
|
export declare const ACTION_NAVIGATE_SYNC = "app/navigate/sync";
|
|
14
|
-
export
|
|
14
|
+
export type NavigateSyncResponse = {
|
|
15
15
|
path: string;
|
|
16
16
|
replace?: boolean;
|
|
17
17
|
};
|
|
18
18
|
export declare const ACTION_AUTH_SESSION_TOKEN = "app/auth/sessionToken";
|
|
19
|
-
export
|
|
19
|
+
export type AuthSessionTokenResponse = {
|
|
20
20
|
token: string;
|
|
21
21
|
};
|
|
22
22
|
export declare const ACTION_DEVICE = "app/device";
|
|
23
|
-
export
|
|
23
|
+
export type DeviceResponse = {
|
|
24
24
|
isMobile: boolean;
|
|
25
25
|
};
|
|
26
26
|
export declare const ACTION_STORE_INFO = "app/store/info";
|
|
27
|
-
export
|
|
27
|
+
export type StoreInfoResponse = {
|
|
28
28
|
id: string;
|
|
29
29
|
name: string;
|
|
30
30
|
url: string;
|
|
@@ -33,18 +33,18 @@ export declare type StoreInfoResponse = {
|
|
|
33
33
|
currency: string;
|
|
34
34
|
};
|
|
35
35
|
export declare const ACTION_UTILS_COPY_TO_CLIPBOARD = "app/utils/copyToClipboard";
|
|
36
|
-
export
|
|
36
|
+
export type CopyToClipboardRequest = {
|
|
37
37
|
text: string;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type CopyToClipboardResponse = {
|
|
40
40
|
success: boolean;
|
|
41
41
|
};
|
|
42
42
|
export declare const ACTION_NAVIGATE_GOTO_OLD_ADMIN = "app/navigate/goToOldAdmin";
|
|
43
|
-
export
|
|
43
|
+
export type NavigateGoToOldAdminRequest = {
|
|
44
44
|
pathToOldAdmin: string;
|
|
45
45
|
};
|
|
46
46
|
export declare const ACTION_NAVIGATE_HEADER = "app/navigate/header";
|
|
47
|
-
export
|
|
47
|
+
export type NavigateHeaderRequest = {
|
|
48
48
|
goTo?: 'back' | string;
|
|
49
49
|
goToAdmin?: string;
|
|
50
50
|
text?: string;
|
package/core/nexoClient.d.ts
CHANGED
package/core/transporter.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export type Dispatch = (event: Message) => void;
|
|
2
|
+
type Unsuscribe = () => void;
|
|
3
|
+
export type Suscribe = (type: string, callback: any) => Unsuscribe;
|
|
4
|
+
export type OnReady = () => void;
|
|
5
5
|
export interface Message<T = unknown> {
|
|
6
6
|
type: string;
|
|
7
7
|
payload?: T;
|
|
@@ -11,7 +11,7 @@ export interface MessageToSend extends Message {
|
|
|
11
11
|
host: string;
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
export
|
|
14
|
+
export type Handler = (message: Message) => void;
|
|
15
15
|
export declare const createHandler: (type: string, callback: (payload: unknown) => void) => Handler;
|
|
16
16
|
export declare const suscribeAndUnsuscribeHandlers: (handlers: Handler[], handler: Handler) => () => void;
|
|
17
17
|
export declare const registerIframe: (log?: boolean) => {
|
package/core/utils.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NexoClient } from './
|
|
1
|
+
import { NexoClient } from './nexoClient';
|
|
2
2
|
import { Message } from './transporter';
|
|
3
3
|
export declare const message: <TPayload = unknown>(type: string, payload?: TPayload | undefined) => Message;
|
|
4
4
|
export declare const asyncAction: <TResponse, TRequest = undefined>(nexo: NexoClient, action: string, payload?: TRequest | undefined) => Promise<TResponse>;
|
package/helpers/helpers.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/package.json
CHANGED
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tiendanube/nexo",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc",
|
|
9
|
+
"publish:release": "yarn bump:stable && yarn build && yarn npm publish --tolerate-republish --access public --tag next",
|
|
9
10
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
11
|
"lint": "eslint .",
|
|
11
12
|
"lint:fix": "eslint --fix",
|
|
12
|
-
"format": "prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc"
|
|
13
|
+
"format": "prettier --write './**/*.{js,jsx,ts,tsx,css,md,json}' --config ./.prettierrc",
|
|
14
|
+
"bump:stable": "yarn version apply --all",
|
|
15
|
+
"bump:check": "yarn version check"
|
|
13
16
|
},
|
|
14
17
|
"repository": {
|
|
15
18
|
"type": "git",
|
|
16
|
-
"url": "git+https://github.com/TiendaNube/
|
|
19
|
+
"url": "git+https://github.com/TiendaNube/admin-nexo.git"
|
|
17
20
|
},
|
|
18
21
|
"author": "",
|
|
19
22
|
"license": "ISC",
|
|
20
23
|
"bugs": {
|
|
21
|
-
"url": "https://github.com/TiendaNube/
|
|
24
|
+
"url": "https://github.com/TiendaNube/in-admin-app/issues"
|
|
22
25
|
},
|
|
23
|
-
"homepage": "https://github.com/TiendaNube/
|
|
26
|
+
"homepage": "https://github.com/TiendaNube/in-admin-app",
|
|
24
27
|
"devDependencies": {
|
|
25
28
|
"@typescript-eslint/eslint-plugin": "5.36.1",
|
|
26
29
|
"@typescript-eslint/parser": "5.36.1",
|
|
@@ -29,6 +32,11 @@
|
|
|
29
32
|
"eslint-plugin-prettier": "4.2.1",
|
|
30
33
|
"eslint-plugin-react": "7.31.1",
|
|
31
34
|
"prettier": "2.7.1",
|
|
32
|
-
"typescript": "4.
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
+
"typescript": "4.9.5"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=16.x <=18.x",
|
|
39
|
+
"yarn": ">=3.4.1"
|
|
40
|
+
},
|
|
41
|
+
"packageManager": "yarn@3.4.1"
|
|
42
|
+
}
|