skyflow-js 1.1.1 → 1.2.0

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 (39) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.md +154 -5
  3. package/dist/sdkNodeBuild/index.js +2 -1
  4. package/dist/sdkNodeBuild/index.js.LICENSE.txt +27 -0
  5. package/dist/sdkNodeBuild/index.js.LICENSE.txt.gz +0 -0
  6. package/dist/sdkNodeBuild/index.js.gz +0 -0
  7. package/package.json +7 -1
  8. package/types/Skyflow.d.ts +23 -5
  9. package/types/client/index.d.ts +2 -3
  10. package/types/container/constants.d.ts +10 -5
  11. package/types/container/external/CollectContainer.d.ts +5 -5
  12. package/types/container/external/PureJsController.d.ts +5 -4
  13. package/types/container/external/RevealContainer.d.ts +4 -5
  14. package/types/container/external/element/index.d.ts +3 -0
  15. package/types/container/external/reveal/RevealElement.d.ts +4 -1
  16. package/types/container/internal/iFrameForm/index.d.ts +15 -15
  17. package/types/container/internal/index.d.ts +2 -2
  18. package/types/container/internal/pureJs/PureJsFrameController.d.ts +2 -0
  19. package/types/container/internal/reveal/RevealFrameController.d.ts +1 -1
  20. package/types/core/collect.d.ts +1 -1
  21. package/types/core/reveal.d.ts +5 -5
  22. package/types/event-emitter/index.d.ts +1 -1
  23. package/types/iframe-libs/iframer.d.ts +3 -3
  24. package/types/index-internal.d.ts +1 -2
  25. package/types/index-node.d.ts +1 -1
  26. package/types/index.d.ts +1 -1
  27. package/types/libs/Bus.d.ts +3 -3
  28. package/types/libs/element-options.d.ts +1 -1
  29. package/types/libs/jss-styles.d.ts +1 -1
  30. package/types/libs/objectParse.d.ts +2 -0
  31. package/types/libs/regex.d.ts +2 -1
  32. package/types/libs/strings.d.ts +1 -1
  33. package/types/libs/styles.d.ts +2 -2
  34. package/types/properties.d.ts +2 -1
  35. package/types/utils/busEvents/index.d.ts +3 -0
  36. package/types/utils/helpers/index.d.ts +5 -0
  37. package/types/utils/jwtUtils/index.d.ts +2 -1
  38. package/types/utils/validators/index.d.ts +4 -1
  39. package/types/libs/NewBus.d.ts +0 -13
@@ -0,0 +1,27 @@
1
+ /*!
2
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
3
+ *
4
+ * Copyright (c) 2014-2017, Jon Schlinkert.
5
+ * Released under the MIT License.
6
+ */
7
+
8
+ /*!
9
+ * is-primitive <https://github.com/jonschlinkert/is-primitive>
10
+ *
11
+ * Copyright (c) 2014-present, Jon Schlinkert.
12
+ * Released under the MIT License.
13
+ */
14
+
15
+ /*!
16
+ * isobject <https://github.com/jonschlinkert/isobject>
17
+ *
18
+ * Copyright (c) 2014-2017, Jon Schlinkert.
19
+ * Released under the MIT License.
20
+ */
21
+
22
+ /*!
23
+ * set-value <https://github.com/jonschlinkert/set-value>
24
+ *
25
+ * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
26
+ * Released under the MIT License.
27
+ */
Binary file
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "skyflow-js",
3
3
  "preferGlobal": true,
4
4
  "analyze": false,
5
- "version": "1.1.1",
5
+ "version": "1.2.0",
6
6
  "author": "Skyflow",
7
7
  "description": "Skyflow JavaScript SDK",
8
8
  "homepage": "https://github.com/skyflowapi/skyflow-js",
@@ -59,9 +59,15 @@
59
59
  "@types/jest": "^27.0.1",
60
60
  "@types/jquery-mask-plugin": "^1.14.3",
61
61
  "@types/node": "^14.0.5",
62
+ "@typescript-eslint/eslint-plugin": "^4.31.2",
63
+ "@typescript-eslint/parser": "^4.31.2",
62
64
  "babel-loader": "^8.1.0",
63
65
  "clean-webpack-plugin": "^4.0.0-alpha.0",
64
66
  "compression-webpack-plugin": "^8.0.1",
67
+ "eslint": "^7.32.0",
68
+ "eslint-config-airbnb-base": "^14.2.1",
69
+ "eslint-config-airbnb-typescript": "^14.0.0",
70
+ "eslint-plugin-import": "^2.24.2",
65
71
  "fork-ts-checker-webpack-plugin": "^6.3.2",
66
72
  "html-webpack-plugin": "^5.3.2",
67
73
  "jest": "^27.2.1",
@@ -1,6 +1,6 @@
1
- import CollectContainer from "./container/external/CollectContainer";
2
- import RevealContainer from "./container/external/RevealContainer";
3
- import { ElementType } from "./container/constants";
1
+ import CollectContainer from './container/external/CollectContainer';
2
+ import RevealContainer from './container/external/RevealContainer';
3
+ import { ElementType } from './container/constants';
4
4
  export interface IInsertRecord {
5
5
  table: string;
6
6
  fields: Record<string, any>;
@@ -28,7 +28,7 @@ export interface IRevealRecord {
28
28
  token: string;
29
29
  redaction: RedactionType;
30
30
  }
31
- export interface revealResponseType {
31
+ export interface IRevealResponseType {
32
32
  records?: Record<string, string>[];
33
33
  errors?: Record<string, any>[];
34
34
  }
@@ -43,16 +43,34 @@ export interface ISkyflowIdRecord {
43
43
  export interface IGetByIdInput {
44
44
  records: ISkyflowIdRecord[];
45
45
  }
46
+ export declare enum RequestMethod {
47
+ GET = "GET",
48
+ POST = "POST",
49
+ PUT = "PUT",
50
+ PATCH = "PATCH",
51
+ DELETE = "DELETE"
52
+ }
53
+ export interface IGatewayConfig {
54
+ gatewayURL: string;
55
+ methodName: RequestMethod;
56
+ pathParams?: any;
57
+ queryParams?: any;
58
+ requestBody?: any;
59
+ requestHeader?: any;
60
+ responseBody?: any;
61
+ }
46
62
  declare class Skyflow {
47
63
  #private;
48
64
  constructor(config: ISkyflow);
49
65
  static init(config: ISkyflow): Skyflow;
50
66
  container(type: ContainerType, options?: Record<string, any>): CollectContainer | RevealContainer;
51
67
  insert(records: IInsertRecordInput, options?: Record<string, any>): Promise<any>;
52
- detokenize(detokenizeInput: IDetokenizeInput, options?: any): Promise<revealResponseType>;
68
+ detokenize(detokenizeInput: IDetokenizeInput): Promise<IRevealResponseType>;
53
69
  getById(getByIdInput: IGetByIdInput): Promise<unknown>;
70
+ invokeGateway(config: IGatewayConfig): Promise<unknown>;
54
71
  static get ContainerType(): typeof ContainerType;
55
72
  static get ElementType(): typeof ElementType;
56
73
  static get RedactionType(): typeof RedactionType;
74
+ static get RequestMethod(): typeof RequestMethod;
57
75
  }
58
76
  export default Skyflow;
@@ -1,14 +1,13 @@
1
- import { ISkyflow } from "../Skyflow";
1
+ import { ISkyflow } from '../Skyflow';
2
2
  export interface IClientRequest {
3
3
  body?: Record<string, any>;
4
4
  headers?: Record<string, string>;
5
- requestMethod: "GET" | "HEAD" | "POST" | "PUT" | "DELETE" | "CONNECT" | "OPTIONS" | "PATCH";
5
+ requestMethod: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'CONNECT' | 'OPTIONS' | 'PATCH';
6
6
  url: string;
7
7
  }
8
8
  declare class Client {
9
9
  #private;
10
10
  config: ISkyflow;
11
- accessToken: string;
12
11
  constructor(config: ISkyflow, metadata: any);
13
12
  toJSON(): {
14
13
  config: ISkyflow;
@@ -7,6 +7,7 @@ export declare const PUREJS_TYPES: {
7
7
  INSERT: string;
8
8
  DETOKENIZE: string;
9
9
  GET_BY_SKYFLOWID: string;
10
+ INVOKE_GATEWAY: string;
10
11
  };
11
12
  export declare const ELEMENT_EVENTS_TO_CLIENT: {
12
13
  CHANGE: string;
@@ -34,6 +35,9 @@ export declare const ELEMENT_EVENTS_TO_IFRAME: {
34
35
  PUREJS_REQUEST: string;
35
36
  PUREJS_FRAME_READY: string;
36
37
  PUREJS_GET_ACCESS_TOKEN: string;
38
+ GET_BEARER_TOKEN: string;
39
+ GET_COLLECT_ELEMENT: string;
40
+ GET_REVEAL_ELEMENT: string;
37
41
  };
38
42
  export declare const ELEMENT_EVENTS_TO_CONTAINER: {
39
43
  ELEMENT_MOUNTED: string;
@@ -239,7 +243,7 @@ export declare const IFRAME_DEFAULT_STYLES: {
239
243
  position: string;
240
244
  top: number;
241
245
  left: number;
242
- "user-select": string;
246
+ 'user-select': string;
243
247
  };
244
248
  export declare const CONTROLLER_STYLES: {
245
249
  position: string;
@@ -248,7 +252,7 @@ export declare const CONTROLLER_STYLES: {
248
252
  height: number;
249
253
  visibility: string;
250
254
  left: string;
251
- "user-select": string;
255
+ 'user-select': string;
252
256
  };
253
257
  export declare const INPUT_STYLES: {
254
258
  width: string;
@@ -263,8 +267,8 @@ export declare const ERROR_TEXT_STYLES: {
263
267
  padding: string;
264
268
  };
265
269
  export declare const ALLOWED_ATTRIBUTES: {
266
- "aria-invalid": string;
267
- "aria-required": string;
270
+ 'aria-invalid': string;
271
+ 'aria-required': string;
268
272
  disabled: string;
269
273
  placeholder: string;
270
274
  };
@@ -288,7 +292,7 @@ export declare const REVEAL_ELEMENT_DIV_STYLE: {
288
292
  };
289
293
  export declare const REVEAL_ELEMENT_LABEL_DEFAULT_STYLES: {
290
294
  [x: string]: {
291
- "margin-bottom": string;
295
+ 'margin-bottom': string;
292
296
  };
293
297
  };
294
298
  export declare const REVEAL_ELEMENT_ERROR_TEXT_DEFAULT_STYLES: {
@@ -302,3 +306,4 @@ export declare const COLLECT_ELEMENT_LABEL_DEFAULT_STYLES: {
302
306
  marginBottom: string;
303
307
  };
304
308
  };
309
+ export declare const gatewayConfigParseKeys: string[];
@@ -1,9 +1,9 @@
1
- import { IInsertRecordInput } from "../../Skyflow";
2
- import { ElementType } from "../constants";
3
- import Element from "./element";
1
+ import { IInsertRecordInput } from '../../Skyflow';
2
+ import { ElementType } from '../constants';
3
+ import Element from './element';
4
4
  interface CollectElementInput {
5
- table: string;
6
- column: string;
5
+ table?: string;
6
+ column?: string;
7
7
  inputStyles?: object;
8
8
  label?: string;
9
9
  labelStyles?: object;
@@ -1,9 +1,10 @@
1
- import { IRevealRecord, ISkyflowIdRecord } from "../../Skyflow";
1
+ import { IGatewayConfig, IRevealRecord, ISkyflowIdRecord } from '../../Skyflow';
2
2
  declare class PureJsController {
3
3
  #private;
4
4
  constructor(client: any);
5
- _detokenize(records: IRevealRecord[]): Promise<any>;
6
- _insert(records: any, options: any): Promise<any>;
7
- _getById(records: ISkyflowIdRecord[]): Promise<unknown>;
5
+ detokenize(records: IRevealRecord[]): Promise<any>;
6
+ insert(records: any, options: any): Promise<any>;
7
+ getById(records: ISkyflowIdRecord[]): Promise<unknown>;
8
+ invokeGateway(config: IGatewayConfig): Promise<unknown>;
8
9
  }
9
10
  export default PureJsController;
@@ -1,8 +1,8 @@
1
- import { RedactionType } from "../../Skyflow";
2
- import RevealElement from "./reveal/RevealElement";
1
+ import { RedactionType } from '../../Skyflow';
2
+ import RevealElement from './reveal/RevealElement';
3
3
  export interface IRevealElementInput {
4
- token: string;
5
- redaction: RedactionType;
4
+ token?: string;
5
+ redaction?: RedactionType;
6
6
  inputStyles?: object;
7
7
  label?: string;
8
8
  labelStyles?: object;
@@ -14,6 +14,5 @@ declare class RevealContainer {
14
14
  constructor(metaData: any);
15
15
  create(record: IRevealElementInput): RevealElement;
16
16
  reveal(): Promise<unknown>;
17
- private validateRevealElementInput;
18
17
  }
19
18
  export default RevealContainer;
@@ -15,5 +15,8 @@ declare class Element {
15
15
  };
16
16
  getOptions: () => any;
17
17
  on(eventName: string, handler: any): void;
18
+ iframeName(): string;
19
+ isMounted(): boolean;
20
+ isValidElement(): boolean;
18
21
  }
19
22
  export default Element;
@@ -1,7 +1,10 @@
1
- import { IRevealElementInput } from "../RevealContainer";
1
+ import { IRevealElementInput } from '../RevealContainer';
2
2
  declare class RevealElement {
3
3
  #private;
4
4
  constructor(record: IRevealElementInput, metaData: any, containerId: string);
5
5
  mount(domElementSelector: any): void;
6
+ iframeName(): string;
7
+ isMounted(): boolean;
8
+ hasToken(): boolean;
6
9
  }
7
10
  export default RevealElement;
@@ -1,18 +1,4 @@
1
- import EventEmitter from "../../../event-emitter";
2
- export declare class IFrameForm {
3
- private iFrameFormElements;
4
- private client?;
5
- private clientMetaData?;
6
- private callbacks;
7
- private controllerId;
8
- private clientDomain;
9
- constructor(controllerId: string, clientDomain: string);
10
- setClient(client: any): void;
11
- setClientMetadata(clientMetaData: any): void;
12
- private getOrCreateIFrameFormElement;
13
- tokenize: (options: any) => Promise<unknown>;
14
- private initializeFrame;
15
- }
1
+ import EventEmitter from '../../../event-emitter';
16
2
  export declare class IFrameFormElement extends EventEmitter {
17
3
  state: {
18
4
  value: string | undefined;
@@ -54,3 +40,17 @@ export declare class IFrameFormElement extends EventEmitter {
54
40
  resetData(): void;
55
41
  destroy(): void;
56
42
  }
43
+ export declare class IFrameForm {
44
+ private iFrameFormElements;
45
+ private client?;
46
+ private clientMetaData?;
47
+ private callbacks;
48
+ private controllerId;
49
+ private clientDomain;
50
+ constructor(controllerId: string, clientDomain: string);
51
+ setClient(client: any): void;
52
+ setClientMetadata(clientMetaData: any): void;
53
+ private getOrCreateIFrameFormElement;
54
+ tokenize: (options: any) => Promise<unknown>;
55
+ private initializeFrame;
56
+ }
@@ -1,5 +1,5 @@
1
- import "jquery-mask-plugin/dist/jquery.mask.min";
2
- import { IFrameFormElement } from "./iFrameForm";
1
+ import 'jquery-mask-plugin/dist/jquery.mask.min';
2
+ import { IFrameFormElement } from './iFrameForm';
3
3
  export declare class FrameController {
4
4
  #private;
5
5
  controller?: FrameController;
@@ -1,7 +1,9 @@
1
+ import { IGatewayConfig } from '../../../Skyflow';
1
2
  declare class PureJsFrameController {
2
3
  #private;
3
4
  constructor();
4
5
  static init(): PureJsFrameController;
5
6
  insertData(records: any, options: any): Promise<unknown>;
7
+ sendInvokeGateWayRequest(config: IGatewayConfig): Promise<unknown>;
6
8
  }
7
9
  export default PureJsFrameController;
@@ -1,4 +1,4 @@
1
- import { IRevealRecord } from "../../../Skyflow";
1
+ import { IRevealRecord } from '../../../Skyflow';
2
2
  declare class RevealFrameController {
3
3
  #private;
4
4
  constructor(containerId: any);
@@ -1,4 +1,4 @@
1
- import { IInsertRecordInput, IInsertRecord } from "../Skyflow";
1
+ import { IInsertRecordInput, IInsertRecord } from '../Skyflow';
2
2
  export declare const constructInsertRecordRequest: (records: IInsertRecordInput, options?: Record<string, any>) => any;
3
3
  export declare const constructInsertRecordResponse: (responseBody: any, tokens: boolean, records: IInsertRecord[]) => {
4
4
  records: any;
@@ -1,8 +1,8 @@
1
- import Client from "../client";
2
- import { IRevealRecord, ISkyflowIdRecord, revealResponseType } from "../Skyflow";
3
- export declare const fetchRecordsByTokenId: (tokenIdRecords: IRevealRecord[], client: Client) => Promise<revealResponseType>;
4
- export declare const formatRecordsForIframe: (response: revealResponseType) => Record<string, string>;
5
- export declare const formatRecordsForClient: (response: revealResponseType) => {
1
+ import Client from '../client';
2
+ import { IRevealRecord, ISkyflowIdRecord, IRevealResponseType } from '../Skyflow';
3
+ export declare const fetchRecordsByTokenId: (tokenIdRecords: IRevealRecord[], client: Client) => Promise<IRevealResponseType>;
4
+ export declare const formatRecordsForIframe: (response: IRevealResponseType) => Record<string, string>;
5
+ export declare const formatRecordsForClient: (response: IRevealResponseType) => {
6
6
  success: {
7
7
  token: string;
8
8
  }[];
@@ -1,5 +1,5 @@
1
1
  declare class EventEmitter {
2
- _events: Record<string, {
2
+ events: Record<string, {
3
3
  priority: boolean;
4
4
  callback: Function;
5
5
  }[]>;
@@ -1,5 +1,3 @@
1
- declare const _default: (options?: {}) => HTMLIFrameElement;
2
- export default _default;
3
1
  export declare const iframeDefaultAttributes: {
4
2
  src: string;
5
3
  frameBorder: number;
@@ -7,6 +5,8 @@ export declare const iframeDefaultAttributes: {
7
5
  scrolling: string;
8
6
  style: string;
9
7
  };
10
- export declare const getIframeSrc: (uuid: any) => string;
11
8
  export declare const setAttributes: (element: any, attributes: any) => void;
9
+ declare const _default: (options?: {}) => HTMLIFrameElement;
10
+ export default _default;
11
+ export declare const getIframeSrc: () => string;
12
12
  export declare const setStyles: (element: HTMLElement, styles: any) => void;
@@ -1,2 +1 @@
1
- import "core-js/stable";
2
- import "core-js/stable";
1
+ import 'core-js/stable';
@@ -1,2 +1,2 @@
1
- import Skyflow from "./Skyflow";
1
+ import Skyflow from './Skyflow';
2
2
  export default Skyflow;
package/types/index.d.ts CHANGED
@@ -1 +1 @@
1
- import "core-js/stable";
1
+ import 'core-js/stable';
@@ -1,7 +1,7 @@
1
- import { FramebusOnHandler, FramebusReplyHandler } from "framebus/dist/lib/types";
1
+ import { FramebusOnHandler, FramebusReplyHandler } from 'framebus/dist/lib/types';
2
2
  declare class Bus {
3
- _listeners: any[];
4
- _isDestroyed: boolean;
3
+ listeners: any[];
4
+ isDestroyed: boolean;
5
5
  constructor();
6
6
  on(eventName: string, callback: FramebusOnHandler): void;
7
7
  off(eventName: string, callback: FramebusOnHandler): void;
@@ -1,4 +1,4 @@
1
- export declare function validateAndSetupGroupOptions(oldGroup: any, newGroup?: any, setup?: boolean): any;
2
1
  export declare function validateElementOptions(elementType: string, oldOptions: any, newOptions?: any): void;
2
+ export declare function validateAndSetupGroupOptions(oldGroup: any, newGroup?: any, setup?: boolean): any;
3
3
  export declare const getElements: (group: any) => string[];
4
4
  export declare const getValueAndItsUnit: (string?: string, defaultValue?: string, defaultUnit?: string) => string[];
@@ -1 +1 @@
1
- export declare function getCssClassesFromJss(styles: any, name: any): Record<string | number | symbol, string>;
1
+ export default function getCssClassesFromJss(styles: any, name: any): Record<string | number | symbol, string>;
@@ -0,0 +1,2 @@
1
+ export declare function gatewayConfigParser(data: any, configKey: any): void;
2
+ export declare function constructInvokeGatewayRequest(data: any): Promise<any>;
@@ -1 +1,2 @@
1
- export declare const regExFromString: (regExString: string) => RegExp;
1
+ declare const regExFromString: (regExString: string) => RegExp;
2
+ export default regExFromString;
@@ -1,4 +1,4 @@
1
- export declare const mask: (value: string | undefined, prevValue: string | undefined, maskObject: any, focus: any) => string;
2
1
  export declare const unMask: (value: string | undefined, maskObject: any) => string;
3
2
  export declare const splice: (string: string, index: number, removeCount: number, adder: string) => string;
4
3
  export declare const replaceAt: (str: string, index: number, replacer?: string) => string;
4
+ export declare const mask: (value: string | undefined, prevValue: string | undefined, maskObject: any, focus: any) => string;
@@ -1,8 +1,8 @@
1
1
  export declare function splitStyles(styles: any): {}[];
2
2
  export declare function buildStylesFromClassesAndStyles(classes: any, styles: any): void;
3
3
  export declare const getFlexGridStyles: (obj: any) => {
4
- "align-items": any;
5
- "justify-content": any;
4
+ 'align-items': any;
5
+ 'justify-content': any;
6
6
  height: string;
7
7
  width: string;
8
8
  margin: string;
@@ -1,4 +1,5 @@
1
- export declare const properties: {
1
+ declare const properties: {
2
2
  IFRAME_SECURE_SITE: string;
3
3
  IFRAME_SECURE_ORGIN: string;
4
4
  };
5
+ export default properties;
@@ -0,0 +1,3 @@
1
+ export declare function getCollectElementValue(key: any, elementIframename: any): Promise<unknown>;
2
+ export declare function getRevealElementValue(key: any, revealFrameName: any): Promise<unknown>;
3
+ export declare function getAccessToken(): Promise<unknown>;
@@ -0,0 +1,5 @@
1
+ export declare const flattenObject: (obj: any, roots?: any, sep?: string) => any;
2
+ export declare function deletePropertyPath(obj: any, path: any): void;
3
+ export declare function clearEmpties(o: any): void;
4
+ export declare function formatFrameNameToId(name: string): string;
5
+ export declare function fillUrlWithPathAndQueryParams(url: string, pathParams?: object, queryParams?: object): string;
@@ -1 +1,2 @@
1
- export declare const isTokenValid: (token: string) => boolean;
1
+ declare const isTokenValid: (token: string) => boolean;
2
+ export default isTokenValid;
@@ -1,7 +1,10 @@
1
- import { IDetokenizeInput, IGetByIdInput, IInsertRecordInput } from "../../Skyflow";
1
+ import { IRevealElementInput } from '../../container/external/RevealContainer';
2
+ import { IGatewayConfig, IDetokenizeInput, IGetByIdInput, IInsertRecordInput } from '../../Skyflow';
2
3
  export declare const validateCreditCardNumber: (cardNumber: string) => boolean;
3
4
  export declare const validateExpiryDate: (date: string) => boolean;
4
5
  export declare const validateInsertRecords: (recordObj: IInsertRecordInput) => void;
5
6
  export declare const validateDetokenizeInput: (detokenizeInput: IDetokenizeInput) => void;
6
7
  export declare const validateGetByIdInput: (getByIdInput: IGetByIdInput) => void;
8
+ export declare const validateRevealElementRecords: (records: IRevealElementInput[]) => void;
7
9
  export declare const isValidURL: (url: string) => boolean;
10
+ export declare const validateGatewayConfig: (config: IGatewayConfig) => void;
@@ -1,13 +0,0 @@
1
- import { FramebusOnHandler, FramebusReplyHandler } from "framebus/dist/lib/types";
2
- declare class NewBus {
3
- static _unlistnedEmitters: any[];
4
- static _listeners: any[];
5
- _isDestroyed: boolean;
6
- constructor();
7
- on(eventName: string, callback: FramebusOnHandler): void;
8
- off(eventName: string, callback: FramebusOnHandler): void;
9
- emit(eventName: string, data: Record<string, unknown> | undefined, callback?: FramebusReplyHandler | undefined): void;
10
- hasListener(eventName: string): boolean;
11
- hasUnListened(eventName: string): boolean;
12
- }
13
- export default NewBus;