@portkey/socket 2.0.1-alpha.0 → 2.0.1-alpha.2
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/commonjs/index.d.ts +1 -0
- package/dist/commonjs/index.js +1 -0
- package/dist/commonjs/openloginSignalr.d.ts +10 -0
- package/dist/commonjs/openloginSignalr.js +22 -0
- package/dist/commonjs/types/index.d.ts +1 -0
- package/dist/commonjs/types/index.js +1 -0
- package/dist/commonjs/types/openlogin.d.ts +11 -0
- package/dist/commonjs/types/openlogin.js +2 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/openloginSignalr.d.ts +10 -0
- package/dist/esm/openloginSignalr.js +18 -0
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/types/openlogin.d.ts +11 -0
- package/dist/esm/types/openlogin.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/openloginSignalr.d.ts +11 -0
- package/dist/types/openloginSignalr.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/openlogin.d.ts +12 -0
- package/dist/types/types/openlogin.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/commonjs/index.d.ts
CHANGED
package/dist/commonjs/index.js
CHANGED
@@ -17,4 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./didSignalr"), exports);
|
18
18
|
__exportStar(require("./signalr"), exports);
|
19
19
|
__exportStar(require("./sellSignalr"), exports);
|
20
|
+
__exportStar(require("./openloginSignalr"), exports);
|
20
21
|
__exportStar(require("./types"), exports);
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { BaseSignalr } from './signalr';
|
2
|
+
import { IOpenloginSignalr, TAuthFinishResult } from './types/openlogin';
|
3
|
+
export declare class OpenloginSignalr extends BaseSignalr implements IOpenloginSignalr {
|
4
|
+
onAuthStatusChanged({ requestId }: {
|
5
|
+
requestId: string;
|
6
|
+
}, callback: (data: TAuthFinishResult | null) => void): import("./types").IListen;
|
7
|
+
}
|
8
|
+
export declare const openloginListenList: readonly ["onAuthStatusChanged"];
|
9
|
+
export type TOpenloginListenList = (typeof openloginListenList)[number];
|
10
|
+
export declare const openloginSignal: BaseSignalr<readonly ["onAuthStatusChanged"]> & OpenloginSignalr;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.openloginSignal = exports.openloginListenList = exports.OpenloginSignalr = void 0;
|
4
|
+
const signalr_1 = require("./signalr");
|
5
|
+
class OpenloginSignalr extends signalr_1.BaseSignalr {
|
6
|
+
onAuthStatusChanged({ requestId }, callback) {
|
7
|
+
return this.listen('onAuthStatusChanged', (data) => {
|
8
|
+
console.log('onAuthStatusChanged:', data, requestId);
|
9
|
+
if ((data === null || data === void 0 ? void 0 : data.requestId) === requestId) {
|
10
|
+
callback(data.body);
|
11
|
+
}
|
12
|
+
else {
|
13
|
+
callback(null);
|
14
|
+
}
|
15
|
+
});
|
16
|
+
}
|
17
|
+
}
|
18
|
+
exports.OpenloginSignalr = OpenloginSignalr;
|
19
|
+
exports.openloginListenList = ['onAuthStatusChanged'];
|
20
|
+
exports.openloginSignal = new OpenloginSignalr({
|
21
|
+
listenList: exports.openloginListenList,
|
22
|
+
});
|
@@ -0,0 +1,11 @@
|
|
1
|
+
export type TAuthFinishResult = {
|
2
|
+
type: 'Google' | 'Apple' | 'Telegram' | 'Facebook' | 'Twitter';
|
3
|
+
status: 'success' | 'fail';
|
4
|
+
data: string;
|
5
|
+
};
|
6
|
+
export interface IOpenloginSignalr {
|
7
|
+
onAuthStatusChanged(params: {
|
8
|
+
requestId: string;
|
9
|
+
}, callback: (data: TAuthFinishResult | null) => void): any;
|
10
|
+
}
|
11
|
+
export type TIOpenloginSignalrHandler = keyof IOpenloginSignalr;
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
import { BaseSignalr } from './signalr.js';
|
2
|
+
import { IOpenloginSignalr, TAuthFinishResult } from './types/openlogin.js';
|
3
|
+
export declare class OpenloginSignalr extends BaseSignalr implements IOpenloginSignalr {
|
4
|
+
onAuthStatusChanged({ requestId }: {
|
5
|
+
requestId: string;
|
6
|
+
}, callback: (data: TAuthFinishResult | null) => void): import("./types").IListen;
|
7
|
+
}
|
8
|
+
export declare const openloginListenList: readonly ["onAuthStatusChanged"];
|
9
|
+
export type TOpenloginListenList = (typeof openloginListenList)[number];
|
10
|
+
export declare const openloginSignal: BaseSignalr<readonly ["onAuthStatusChanged"]> & OpenloginSignalr;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { BaseSignalr } from './signalr.js';
|
2
|
+
export class OpenloginSignalr extends BaseSignalr {
|
3
|
+
onAuthStatusChanged({ requestId }, callback) {
|
4
|
+
return this.listen('onAuthStatusChanged', (data) => {
|
5
|
+
console.log('onAuthStatusChanged:', data, requestId);
|
6
|
+
if ((data === null || data === void 0 ? void 0 : data.requestId) === requestId) {
|
7
|
+
callback(data.body);
|
8
|
+
}
|
9
|
+
else {
|
10
|
+
callback(null);
|
11
|
+
}
|
12
|
+
});
|
13
|
+
}
|
14
|
+
}
|
15
|
+
export const openloginListenList = ['onAuthStatusChanged'];
|
16
|
+
export const openloginSignal = new OpenloginSignalr({
|
17
|
+
listenList: openloginListenList,
|
18
|
+
});
|
package/dist/esm/types/index.js
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
export type TAuthFinishResult = {
|
2
|
+
type: 'Google' | 'Apple' | 'Telegram' | 'Facebook' | 'Twitter';
|
3
|
+
status: 'success' | 'fail';
|
4
|
+
data: string;
|
5
|
+
};
|
6
|
+
export interface IOpenloginSignalr {
|
7
|
+
onAuthStatusChanged(params: {
|
8
|
+
requestId: string;
|
9
|
+
}, callback: (data: TAuthFinishResult | null) => void): any;
|
10
|
+
}
|
11
|
+
export type TIOpenloginSignalrHandler = keyof IOpenloginSignalr;
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AAEnC,cAAc,SAAS,CAAC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { BaseSignalr } from './signalr';
|
2
|
+
import { IOpenloginSignalr, TAuthFinishResult } from './types/openlogin';
|
3
|
+
export declare class OpenloginSignalr extends BaseSignalr implements IOpenloginSignalr {
|
4
|
+
onAuthStatusChanged({ requestId }: {
|
5
|
+
requestId: string;
|
6
|
+
}, callback: (data: TAuthFinishResult | null) => void): import("./types").IListen;
|
7
|
+
}
|
8
|
+
export declare const openloginListenList: readonly ["onAuthStatusChanged"];
|
9
|
+
export type TOpenloginListenList = (typeof openloginListenList)[number];
|
10
|
+
export declare const openloginSignal: BaseSignalr<readonly ["onAuthStatusChanged"]> & OpenloginSignalr;
|
11
|
+
//# sourceMappingURL=openloginSignalr.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"openloginSignalr.d.ts","sourceRoot":"","sources":["../../src/openloginSignalr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEzE,qBAAa,gBAAiB,SAAQ,WAAY,YAAW,iBAAiB;IACrE,mBAAmB,CAAC,EAAE,SAAS,EAAE,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI;CAUpH;AAED,eAAO,MAAM,mBAAmB,kCAAmC,CAAC;AACpE,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE,eAAO,MAAM,eAAe,kEAEoC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
export type TAuthFinishResult = {
|
2
|
+
type: 'Google' | 'Apple' | 'Telegram' | 'Facebook' | 'Twitter';
|
3
|
+
status: 'success' | 'fail';
|
4
|
+
data: string;
|
5
|
+
};
|
6
|
+
export interface IOpenloginSignalr {
|
7
|
+
onAuthStatusChanged(params: {
|
8
|
+
requestId: string;
|
9
|
+
}, callback: (data: TAuthFinishResult | null) => void): any;
|
10
|
+
}
|
11
|
+
export type TIOpenloginSignalrHandler = keyof IOpenloginSignalr;
|
12
|
+
//# sourceMappingURL=openlogin.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"openlogin.d.ts","sourceRoot":"","sources":["../../../src/types/openlogin.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAAC;IAC/D,MAAM,EAAE,SAAS,GAAG,MAAM,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,mBAAmB,CACjB,MAAM,EAAE;QACN,SAAS,EAAE,MAAM,CAAC;KACnB,EACD,QAAQ,EAAE,CAAC,IAAI,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,OAClD;CACH;AAED,MAAM,MAAM,yBAAyB,GAAG,MAAM,iBAAiB,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@portkey/socket",
|
3
|
-
"version": "2.0.1-alpha.
|
3
|
+
"version": "2.0.1-alpha.2",
|
4
4
|
"description": "",
|
5
5
|
"main": "./dist/commonjs/index.js",
|
6
6
|
"module": "./dist/esm/index.js",
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"peerDependencies": {
|
47
47
|
"@portkey/utils": "^1.5.2-alpha.0"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "60f3e82fdfc4063073f55ef1193e0c08f42d9675"
|
50
50
|
}
|