dev-classes 1.2.3 → 1.3.4

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 (81) hide show
  1. package/README.md +250 -0
  2. package/dist/classes/Color/Color.d.ts +28 -37
  3. package/dist/classes/Color/Color.js +167 -205
  4. package/dist/classes/Color/Color.types.d.ts +36 -0
  5. package/dist/classes/Color/Color.types.js +1 -0
  6. package/dist/classes/Color/index.d.ts +2 -0
  7. package/dist/classes/Color/index.js +4 -0
  8. package/dist/classes/DateProcessing/DateProcessing.d.ts +30 -78
  9. package/dist/classes/DateProcessing/DateProcessing.js +2 -1
  10. package/dist/classes/DateProcessing/DateProcessing.types.d.ts +50 -0
  11. package/dist/classes/DateProcessing/DateProcessing.types.js +5 -0
  12. package/dist/classes/DateProcessing/index.d.ts +2 -0
  13. package/dist/classes/DateProcessing/index.js +4 -0
  14. package/dist/classes/DelaysPromise/DelaysPromise.d.ts +8 -0
  15. package/dist/classes/DelaysPromise/DelaysPromise.js +69 -0
  16. package/dist/classes/DelaysPromise/DelaysPromise.types.d.ts +28 -0
  17. package/dist/classes/DelaysPromise/DelaysPromise.types.js +1 -0
  18. package/dist/classes/DelaysPromise/index.d.ts +2 -0
  19. package/dist/classes/DelaysPromise/index.js +4 -0
  20. package/dist/classes/File/File.d.ts +8 -0
  21. package/dist/classes/File/File.js +22 -0
  22. package/dist/classes/File/File.types.d.ts +7 -0
  23. package/dist/classes/File/File.types.js +1 -0
  24. package/dist/classes/File/index.d.ts +2 -0
  25. package/dist/classes/File/index.js +4 -0
  26. package/dist/classes/HTTPSApi/HTTPSApi.d.ts +14 -4
  27. package/dist/classes/HTTPSApi/HTTPSApi.js +61 -38
  28. package/dist/classes/HTTPSApi/HTTPSApi.types.d.ts +3 -0
  29. package/dist/classes/HTTPSApi/index.d.ts +2 -0
  30. package/dist/classes/HTTPSApi/index.js +4 -0
  31. package/dist/classes/Numbers/Numbers.d.ts +5 -3
  32. package/dist/classes/Numbers/Numbers.js +17 -20
  33. package/dist/classes/Numbers/Numbers.types.d.ts +5 -0
  34. package/dist/classes/Numbers/Numbers.types.js +1 -0
  35. package/dist/classes/Numbers/index.d.ts +2 -0
  36. package/dist/classes/Numbers/index.js +4 -0
  37. package/dist/classes/SocketApi/SocketApi.d.ts +25 -38
  38. package/dist/classes/SocketApi/SocketApi.js +112 -84
  39. package/dist/classes/SocketApi/SocketApi.types.d.ts +6 -0
  40. package/dist/classes/SocketApi/SocketApi.types.js +1 -0
  41. package/dist/classes/SocketApi/deps/WsApi/WsApi.d.ts +31 -26
  42. package/dist/classes/SocketApi/deps/WsApi/WsApi.js +91 -69
  43. package/dist/classes/SocketApi/deps/WsApi/WsApi.types.d.ts +7 -22
  44. package/dist/classes/SocketApi/deps/WsApi/index.d.ts +1 -1
  45. package/dist/classes/SocketApi/index.d.ts +2 -0
  46. package/dist/classes/SocketApi/index.js +4 -0
  47. package/dist/classes/Utils/EventSubscribers/EventSubscribers.d.ts +14 -0
  48. package/dist/classes/Utils/EventSubscribers/EventSubscribers.js +33 -0
  49. package/dist/classes/Utils/EventSubscribers/EventSubscribers.types.d.ts +9 -0
  50. package/dist/classes/Utils/EventSubscribers/EventSubscribers.types.js +1 -0
  51. package/dist/classes/Utils/EventSubscribers/index.d.ts +2 -0
  52. package/dist/classes/Utils/EventSubscribers/index.js +4 -0
  53. package/dist/classes/Utils/NetworkInformation/NetworkInformation.d.ts +9 -0
  54. package/dist/classes/Utils/NetworkInformation/NetworkInformation.js +24 -0
  55. package/dist/classes/Utils/NetworkInformation/classes/InternetWatchers.d.ts +6 -0
  56. package/dist/classes/Utils/NetworkInformation/classes/InternetWatchers.js +39 -0
  57. package/dist/classes/Utils/NetworkInformation/classes/NetworkInformationCordova.d.ts +11 -0
  58. package/dist/classes/Utils/NetworkInformation/classes/NetworkInformationCordova.js +26 -0
  59. package/dist/classes/Utils/NetworkInformation/classes/NetworkInformationPC.d.ts +11 -0
  60. package/dist/classes/Utils/NetworkInformation/classes/NetworkInformationPC.js +22 -0
  61. package/dist/classes/Utils/NetworkInformation/classes/index.d.ts +2 -0
  62. package/dist/classes/Utils/NetworkInformation/classes/index.js +6 -0
  63. package/dist/classes/Utils/NetworkInformation/classes/types/types.abscruct.d.ts +10 -0
  64. package/dist/classes/Utils/NetworkInformation/classes/types/types.abscruct.js +5 -0
  65. package/dist/classes/Utils/NetworkInformation/index.d.ts +4 -0
  66. package/dist/classes/Utils/NetworkInformation/index.js +10 -0
  67. package/dist/classes/Utils/Utils.d.ts +4 -4
  68. package/dist/classes/Utils/Utils.js +34 -39
  69. package/dist/classes/Utils/Utils.types.d.ts +17 -0
  70. package/dist/classes/Utils/Utils.types.js +1 -0
  71. package/dist/index.d.ts +9 -9
  72. package/dist/index.js +26 -20
  73. package/package.json +16 -2
  74. package/dist/classes/Delay/Delay.d.ts +0 -26
  75. package/dist/classes/Delay/Delay.js +0 -66
  76. package/dist/classes/DownloadFile/DownloadFile.d.ts +0 -8
  77. package/dist/classes/DownloadFile/DownloadFile.js +0 -23
  78. package/dist/classes/ProcessingWS/ProcessingWS.d.ts +0 -11
  79. package/dist/classes/ProcessingWS/ProcessingWS.js +0 -20
  80. package/dist/classes/SocketApi/deps/InternetWatcher/InternetWatcher.d.ts +0 -8
  81. package/dist/classes/SocketApi/deps/InternetWatcher/InternetWatcher.js +0 -24
@@ -0,0 +1,69 @@
1
+ var i = Object.defineProperty;
2
+ var o = (v, e, t) => e in v ? i(v, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : v[e] = t;
3
+ var I = (v, e, t) => (o(v, typeof e != "symbol" ? e + "" : e, t), t);
4
+ class h {
5
+ constructor() {
6
+ I(this, "defaultProps", {
7
+ interval: 5e3
8
+ });
9
+ I(this, "startActionEvery", (e, t = this.defaultProps) => {
10
+ const r = (s) => {
11
+ t != null && t.watchIdInterval && (t == null || t.watchIdInterval(s));
12
+ }, u = (s) => {
13
+ t != null && t.controlAction && (t == null || t.controlAction(s));
14
+ };
15
+ return new Promise((s, l) => {
16
+ let n = 0, m = 0;
17
+ const a = {
18
+ isActive: !0
19
+ }, A = setInterval(
20
+ () => {
21
+ if (n += t.interval, m += 1, t != null && t.cutoffTime && n > t.cutoffTime || t != null && t.countAction && (t == null ? void 0 : t.countAction) < m) {
22
+ a.isActive = !1, clearInterval(A), r(null), l({ status: !1, msg: Error("Время загрузки истекло") });
23
+ return;
24
+ }
25
+ e() && (a.isActive = !1, clearInterval(A), r(null), s({ status: !0, msg: "cb вернул true" }));
26
+ },
27
+ t.interval < 200 ? 200 : t.interval
28
+ );
29
+ r(A), u({
30
+ getIsActiveEvent: () => a.isActive,
31
+ stop: (p) => {
32
+ const d = "Ручное завершение startActionEvery";
33
+ a.isActive = !1, clearInterval(A), r(null), p === !1 ? l({ status: !1, msg: d + ": (false)" }) : s({ status: !0, msg: d + ": (true)" });
34
+ }
35
+ });
36
+ });
37
+ });
38
+ I(this, "oneOf", (e, t, { second: r }) => {
39
+ let u = 1;
40
+ e().then(() => {
41
+ u === 1 && (u = 0);
42
+ });
43
+ let s = setInterval(() => {
44
+ u === 1 && t(), clearInterval(s);
45
+ }, r * 1e3);
46
+ });
47
+ I(this, "oneOfPromise", (e, t, { second: r }) => new Promise((u, s) => {
48
+ let l = 1, n = { status: !1, msg: "" };
49
+ e().then((a) => {
50
+ l === 1 && (l = 0, u(a));
51
+ }).catch((a) => {
52
+ l === 1 && (l = 0, n.msg = a, s(a));
53
+ });
54
+ let m = setInterval(() => {
55
+ if (l === 1) {
56
+ if (l = 0, typeof t == "function") {
57
+ s({ status: !1, msg: "", ...t(n) });
58
+ return;
59
+ }
60
+ s({ status: !1, msg: "oneOfPromise reject" });
61
+ }
62
+ clearInterval(m);
63
+ }, r * 1e3);
64
+ }));
65
+ }
66
+ }
67
+ export {
68
+ h as DelaysPromise
69
+ };
@@ -0,0 +1,28 @@
1
+ export interface ControlAction {
2
+ stop(status?: boolean): void;
3
+ getIsActiveEvent(): boolean;
4
+ }
5
+ interface StartActionEveryConfigI {
6
+ interval: number;
7
+ cutoffTime?: number;
8
+ countAction?: number;
9
+ watchIdInterval?(id: number | null): void;
10
+ controlAction?(control: ControlAction): void;
11
+ }
12
+ interface OneOfPromiseReject {
13
+ status: boolean;
14
+ msg: string;
15
+ }
16
+ export interface DelaysPromiseProps {
17
+ startActionEvery: (cb: () => boolean, config: StartActionEveryConfigI) => Promise<{
18
+ status: boolean;
19
+ msg: string;
20
+ }>;
21
+ oneOf: (watchPromise: () => Promise<any>, potentialCaseCB: () => void, config: {
22
+ second: number;
23
+ }) => void;
24
+ oneOfPromise: (watchPromise: () => Promise<any>, cbPotentialReject: (p: OneOfPromiseReject) => OneOfPromiseReject, config: {
25
+ second: number;
26
+ }) => Promise<any>;
27
+ }
28
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './DelaysPromise';
2
+ export type { DelaysPromiseProps, ControlAction } from './DelaysPromise.types';
@@ -0,0 +1,4 @@
1
+ import { DelaysPromise as r } from "./DelaysPromise.js";
2
+ export {
3
+ r as DelaysPromise
4
+ };
@@ -0,0 +1,8 @@
1
+ import { FileProps } from './File.types';
2
+
3
+ export declare class File {
4
+ private static startSrt;
5
+ private static applications;
6
+ private static getDataApplication;
7
+ static download: FileProps['download'];
8
+ }
@@ -0,0 +1,22 @@
1
+ var l = Object.defineProperty;
2
+ var m = (c, t, a) => t in c ? l(c, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : c[t] = a;
3
+ var e = (c, t, a) => (m(c, typeof t != "symbol" ? t + "" : t, a), a);
4
+ const s = class s {
5
+ static getDataApplication(t) {
6
+ const { applications: a } = s;
7
+ return a[t] ? a[t] : a.pdf;
8
+ }
9
+ };
10
+ e(s, "startSrt", "data:application/"), e(s, "applications", {
11
+ xls: `${s.startSrt}vnd.ms-excel;`,
12
+ xlsx: `${s.startSrt}vnd.openxmlformats-officedocument.spreadsheetml.sheet;`,
13
+ pdf: `${s.startSrt}pdf;`,
14
+ csv: `${s.startSrt}vnd.ms-excel;`
15
+ }), e(s, "download", (t) => {
16
+ const { format: a, name: r, base64: d } = t, p = `${s.getDataApplication(a)}base64,${d}`, n = document.createElement("a"), i = `${r}.${a}`;
17
+ n.href = p, n.download = i, n.click();
18
+ });
19
+ let o = s;
20
+ export {
21
+ o as File
22
+ };
@@ -0,0 +1,7 @@
1
+ export type FileFormat_OR = 'xls' | 'xlsx' | 'pdf' | 'csv';
2
+ export type FileConfig_P = Record<FileFormat_OR, string>;
3
+ export interface FileProps {
4
+ download(attachment: Record<'name' | 'base64', string> & {
5
+ format: FileFormat_OR;
6
+ }): void;
7
+ }
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,2 @@
1
+ export * from './File';
2
+ export type { FileFormat_OR, FileProps } from './File.types';
@@ -0,0 +1,4 @@
1
+ import { File as r } from "./File.js";
2
+ export {
3
+ r as File
4
+ };
@@ -1,10 +1,20 @@
1
- import { FetchCommonPayloadHTTPSApi, RequestPayloadHTTPSApi } from './HTTPSApi.types';
1
+ import { FetchCommonPayloadHTTPSApi, HTTPSApi_Events, RequestPayloadHTTPSApi } from './HTTPSApi.types';
2
2
  import { ResolveRequestInServer_P } from './deps/apiRequest/apiRequest';
3
3
 
4
- export * from './HTTPSApi.types';
5
4
  export declare class HTTPSApi {
6
- private static options;
7
- static setOptions(options: Partial<typeof HTTPSApi.options>): void;
5
+ private static state;
6
+ private static internet;
7
+ private static events;
8
+ private static setState;
9
+ private static getState;
10
+ private static getIsNetwork;
11
+ private static online;
12
+ private static offline;
13
+ private static errorInit;
14
+ private static getIsInit;
15
+ static init: () => void;
16
+ static on: <K extends "fetch">(name: K, cb: HTTPSApi_Events[K]) => void;
17
+ static off: <K extends "fetch">(name: K, cb: HTTPSApi_Events[K]) => void;
8
18
  static request<Result, Req extends RequestPayloadHTTPSApi = RequestPayloadHTTPSApi>({ keyAction, request }: Req): Promise<FetchCommonPayloadHTTPSApi & ResolveRequestInServer_P<Result>>;
9
19
  static removeCookie(): void;
10
20
  }
@@ -1,59 +1,82 @@
1
- var q = Object.defineProperty;
2
- var g = (o, s, t) => s in o ? q(o, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[s] = t;
3
- var d = (o, s, t) => (g(o, typeof s != "symbol" ? s + "" : s, t), t);
4
- import { apiRequest as f } from "./deps/apiRequest/apiRequest.js";
5
- const e = class e {
6
- static setOptions(s) {
7
- e.options = { ...e.options, ...s };
1
+ var h = Object.defineProperty;
2
+ var v = (i, e, r) => e in i ? h(i, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : i[e] = r;
3
+ var s = (i, e, r) => (v(i, typeof e != "symbol" ? e + "" : e, r), r);
4
+ import { NetworkInformation as b } from "../Utils/NetworkInformation/NetworkInformation.js";
5
+ import { apiRequest as l } from "./deps/apiRequest/apiRequest.js";
6
+ import { NetworkInformationCordova as k } from "../Utils/NetworkInformation/classes/NetworkInformationCordova.js";
7
+ import { NetworkInformationPC as N } from "../Utils/NetworkInformation/classes/NetworkInformationPC.js";
8
+ import { EventSubscribers as g } from "../Utils/EventSubscribers/EventSubscribers.js";
9
+ const t = class t {
10
+ static setState(e) {
11
+ t.state = { ...t.state, ...e };
8
12
  }
9
- static request({ keyAction: s, request: t }) {
10
- const { url: l, ...m } = t;
11
- return new Promise((p, u) => {
12
- const { getIsNetwork: R, setStatusFetch: i } = e.options, r = R(), c = {
13
- url: l,
14
- keyAction: s,
15
- isErr: !r,
16
- msg: r ? "" : "Нет интернета",
17
- isReq: r,
18
- statusCode: r ? 0 : 520,
13
+ static getState() {
14
+ return t.state;
15
+ }
16
+ static getIsNetwork() {
17
+ return t.state.isNetworkStatus;
18
+ }
19
+ static request({ keyAction: e, request: r }) {
20
+ const { url: f, ...w } = r;
21
+ return new Promise((I, u) => {
22
+ if (!t.getIsInit())
23
+ throw new Error("Не вызван HTTPSApi.init()");
24
+ const o = t.getIsNetwork(), a = {
25
+ url: f,
26
+ keyAction: e,
27
+ isErr: !o,
28
+ msg: o ? "" : "Нет интернета",
29
+ isReq: o,
30
+ statusCode: o ? 0 : 520,
19
31
  isReload: !1
20
32
  };
21
- if (i(c), r) {
22
- f.requestInServer(l, m).then((n) => {
23
- const a = {
33
+ if (t.events.publish("fetch", a), o) {
34
+ l.requestInServer(f, w).then((c) => {
35
+ const n = {
24
36
  isReq: !1,
25
37
  isReload: !0,
26
38
  isErr: !1,
27
- keyAction: s,
39
+ keyAction: e,
28
40
  msg: "",
29
- ...n
41
+ ...c
30
42
  };
31
- i(a), p(a);
32
- }).catch((n) => {
33
- const a = {
43
+ t.events.publish("fetch", n), I(n);
44
+ }).catch((c) => {
45
+ const n = {
34
46
  isReq: !1,
35
47
  isReload: !1,
36
- keyAction: s,
37
- ...n
48
+ keyAction: e,
49
+ ...c
38
50
  };
39
- i(a), u(a);
51
+ t.events.publish("fetch", n), u(n);
40
52
  });
41
53
  return;
42
54
  }
43
- i(c), u(c);
55
+ t.events.publish("fetch", a), u(a);
44
56
  });
45
57
  }
46
58
  static removeCookie() {
47
- f.removeAuthCookie();
59
+ l.removeAuthCookie();
48
60
  }
49
61
  };
50
- d(e, "options", {
51
- getIsNetwork: () => !0,
52
- setStatusFetch: (s) => {
53
- s.keyAction == "";
54
- }
55
- });
56
- let h = e;
62
+ s(t, "state", {
63
+ isInit: !1,
64
+ isNetworkStatus: navigator.onLine
65
+ }), s(t, "internet", new b([new N(), new k()])), s(t, "events", new g(["fetch"])), s(t, "online", () => {
66
+ t.setState({ isNetworkStatus: !0 });
67
+ }), s(t, "offline", () => {
68
+ t.setState({ isNetworkStatus: !1 });
69
+ }), s(t, "errorInit", () => {
70
+ console.error("Не вызван HTTPSApi.init()");
71
+ }), s(t, "getIsInit", () => {
72
+ const { isInit: e } = t.getState();
73
+ return e || t.errorInit(), e;
74
+ }), s(t, "init", () => {
75
+ t.internet.run((e) => {
76
+ e ? t.online() : t.offline();
77
+ }), t.setState({ isInit: !0 });
78
+ }), s(t, "on", t.events.subscribe), s(t, "off", t.events.unsubscribe);
79
+ let m = t;
57
80
  export {
58
- h as HTTPSApi
81
+ m as HTTPSApi
59
82
  };
@@ -13,6 +13,9 @@ export interface RequestPayloadHTTPSApi {
13
13
  url: string;
14
14
  } & RequestOptions_P;
15
15
  }
16
+ export interface HTTPSApi_Events {
17
+ fetch(info: FetchCommonPayloadHTTPSApi & Pick<RejectRequestInServer_P, 'msg'>): void;
18
+ }
16
19
  declare global {
17
20
  interface Window {
18
21
  cordova: {
@@ -0,0 +1,2 @@
1
+ export * from './HTTPSApi';
2
+ export type { RequestPayloadHTTPSApi, ResponseErrorHTTPSApi } from './HTTPSApi.types';
@@ -0,0 +1,4 @@
1
+ import { HTTPSApi as r } from "./HTTPSApi.js";
2
+ export {
3
+ r as HTTPSApi
4
+ };
@@ -1,5 +1,7 @@
1
+ import { NumbersProps } from './Numbers.types';
2
+
1
3
  export declare class Numbers {
2
- static getOnlyTheStringNumbers(dirtyString: any): any;
3
- static isNumber(charStr: any): boolean | undefined;
4
- static randomNumber: () => number;
4
+ static getOnlyTheStringNumbers: NumbersProps['getOnlyTheStringNumbers'];
5
+ static isNumber: NumbersProps['isNumber'];
6
+ static randomNumber: NumbersProps['randomNumber'];
5
7
  }
@@ -1,24 +1,21 @@
1
- var a = Object.defineProperty;
2
- var s = (t, r, e) => r in t ? a(t, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[r] = e;
3
- var n = (t, r, e) => (s(t, typeof r != "symbol" ? r + "" : r, e), e);
4
- class o {
5
- static getOnlyTheStringNumbers(r) {
6
- return r.split("").filter((e) => !Number.isNaN(Number.parseInt(e))).join("");
7
- }
8
- static isNumber(r) {
9
- try {
10
- if (r.length > 1)
11
- throw new Error("Передали < 1 значения");
12
- return !Number.isNaN(Number.parseInt(r));
13
- } catch (e) {
14
- console.error(e);
15
- }
16
- }
1
+ var s = Object.defineProperty;
2
+ var i = (r, e, t) => e in r ? s(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var a = (r, e, t) => (i(r, typeof e != "symbol" ? e + "" : e, t), t);
4
+ class n {
17
5
  }
18
- n(o, "randomNumber", () => {
19
- const r = /* @__PURE__ */ new Date();
20
- return Math.floor(Math.random() * r.getTime());
6
+ a(n, "getOnlyTheStringNumbers", (e) => e.split("").filter((t) => !Number.isNaN(Number.parseInt(t))).join("")), a(n, "isNumber", (e) => {
7
+ switch (typeof e) {
8
+ case "string":
9
+ return [...e].every((t) => !Number.isNaN(Number(t)));
10
+ case "number":
11
+ return !0;
12
+ default:
13
+ return !1;
14
+ }
15
+ }), a(n, "randomNumber", () => {
16
+ const e = /* @__PURE__ */ new Date();
17
+ return Math.floor(Math.random() * e.getTime());
21
18
  });
22
19
  export {
23
- o as Numbers
20
+ n as Numbers
24
21
  };
@@ -0,0 +1,5 @@
1
+ export interface NumbersProps {
2
+ randomNumber: () => number;
3
+ getOnlyTheStringNumbers(dirtyString: string): string;
4
+ isNumber(charStr: string | number): boolean;
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from './Numbers';
2
+ export type { NumbersProps } from './Numbers.types';
@@ -0,0 +1,4 @@
1
+ import { Numbers as m } from "./Numbers.js";
2
+ export {
3
+ m as Numbers
4
+ };
@@ -1,47 +1,34 @@
1
- import { ConnectOptions_P, EventNames_OR, GetCbByKeyNameEvent } from './deps/WsApi';
1
+ import { WsApi_Options_P } from './deps/WsApi';
2
+ import { SocketApi_Options_P, SocketApi_State_P } from './SocketApi.types';
2
3
 
3
- interface WatchI {
4
- watchTimeOffReConnect(info: {
5
- status: boolean;
6
- msg: string;
7
- }): void;
8
- watchReConnect(status: boolean): void;
9
- }
10
4
  export declare class SocketApi {
5
+ #private;
6
+ private static state;
7
+ private static options;
11
8
  private static wsApi;
12
- private static watch;
13
- static state: {
14
- isDisconnect: boolean;
15
- initConnect: boolean;
16
- isReConnect: boolean;
17
- };
9
+ private static delay;
10
+ private static internet;
11
+ private static events;
18
12
  private static saveID;
19
13
  private static stateDefault;
20
- static on<K extends EventNames_OR>(eventName: K, cb: GetCbByKeyNameEvent<K>): () => void;
21
- static off<K extends EventNames_OR>(eventName: K, cb: GetCbByKeyNameEvent<K>): void;
22
- static setOptions: (option?: ConnectOptions_P) => void;
23
- static close(): void;
14
+ private static copyState;
15
+ private static setState;
16
+ private static resetState;
17
+ private static setOptions;
18
+ private static setStatusReConnect;
19
+ private static setInfoConnect;
20
+ private static online;
21
+ private static offline;
22
+ private static splitOptions;
23
+ static getState: () => SocketApi_State_P;
24
+ static on: typeof SocketApi.wsApi.on & typeof SocketApi.events.subscribe;
25
+ static off: typeof SocketApi.wsApi.on & typeof SocketApi.events.subscribe;
26
+ static getStatusSocket: () => import('./deps/WsApi').WsApiE_StatusConnect_OR;
27
+ static close: () => void;
28
+ static init: (options: WsApi_Options_P & SocketApi_Options_P) => void;
29
+ static connect(): void;
24
30
  static disconnect(): void;
25
31
  static send<ResType>(data: object, cb?: (data: ResType) => void): void;
26
- static connect(): void;
27
- static stopReConnect(): void;
28
- static resetState(): void;
29
- static getTimeRequest(): void;
30
- static getRequestSave: () => {
31
- payload: {
32
- [key: string]: any;
33
- action: string;
34
- };
35
- reqId: string;
36
- cb: any;
37
- }[];
38
- static watchReConnect(cb: WatchI["watchReConnect"]): void;
39
- static watchTimeOffReConnect(cb: WatchI["watchTimeOffReConnect"]): void;
40
- private static copyState;
41
- private static resetSocket;
42
- private static createConnect;
32
+ static stopReConnect(status?: boolean): void;
43
33
  static socketReConnect: () => void;
44
- private static setInfoConnect;
45
- static getStatus: () => import('./deps/WsApi').StatusConnect_OR;
46
34
  }
47
- export {};