@portkey/socket 2.0.2 → 2.1.0-alpha.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,5 @@
1
1
  export * from './didSignalr';
2
2
  export * from './signalr';
3
3
  export * from './sellSignalr';
4
+ export * from './openloginSignalr';
4
5
  export * from './types';
@@ -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
+ });
@@ -1,3 +1,4 @@
1
1
  export * from './did';
2
2
  export * from './signalr';
3
3
  export * from './sell';
4
+ export * from './openlogin';
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./did"), exports);
18
18
  __exportStar(require("./signalr"), exports);
19
19
  __exportStar(require("./sell"), exports);
20
+ __exportStar(require("./openlogin"), exports);
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,5 @@
1
1
  export * from './didSignalr.js';
2
2
  export * from './signalr.js';
3
3
  export * from './sellSignalr.js';
4
+ export * from './openloginSignalr.js';
4
5
  export * from './types/index.js';
package/dist/esm/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './didSignalr.js';
2
2
  export * from './signalr.js';
3
3
  export * from './sellSignalr.js';
4
+ export * from './openloginSignalr.js';
4
5
  export * from './types/index.js';
@@ -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
+ });
@@ -1,3 +1,4 @@
1
1
  export * from './did.js';
2
2
  export * from './signalr.js';
3
3
  export * from './sell.js';
4
+ export * from './openlogin.js';
@@ -1,3 +1,4 @@
1
1
  export * from './did.js';
2
2
  export * from './signalr.js';
3
3
  export * from './sell.js';
4
+ export * from './openlogin.js';
@@ -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 {};
@@ -1,5 +1,6 @@
1
1
  export * from './didSignalr';
2
2
  export * from './signalr';
3
3
  export * from './sellSignalr';
4
+ export * from './openloginSignalr';
4
5
  export * from './types';
5
6
  //# sourceMappingURL=index.d.ts.map
@@ -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;AAE9B,cAAc,SAAS,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,4 +1,5 @@
1
1
  export * from './did';
2
2
  export * from './signalr';
3
3
  export * from './sell';
4
+ export * from './openlogin';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -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.2",
3
+ "version": "2.1.0-alpha.0",
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": "5483bd5253c9c889463555f64730cca63bfd8685"
49
+ "gitHead": "a9cc8f863b38b179773224e9c181a4a717122833"
50
50
  }