@factset/frontgate-js-sdk 7.0.11 → 7.1.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.
Files changed (52) hide show
  1. package/CHANGELOG.md +74 -242
  2. package/dist/lib/esnext/connection/util/Compressor.js +2 -0
  3. package/dist/lib/esnext/logger/AbstractLogger.js +1 -0
  4. package/dist/lib/esnext/logger/WinstonLogger.js +3 -1
  5. package/dist/lib/esnext/mixins/MessageCompressorMixin.js +1 -1
  6. package/dist/lib/esnext/mixins/auth/FetchAuthenticationWithOptionalCompressionMixin.js +165 -0
  7. package/dist/lib/esnext/mixins/auth/SessionAuthMixin.js +19 -21
  8. package/dist/lib/esnext/mixins/auth/UserPasswordAuthMixin.js +2 -4
  9. package/dist/lib/esnext/mixins/auth/index.js +1 -0
  10. package/dist/lib/esnext/mixins/connection/FrontgateWSMixin.js +1 -1
  11. package/dist/lib/esnext/mixins/subscription/EndpointSubscriptionMixin.js +1 -1
  12. package/dist/lib/esnext/version.js +1 -1
  13. package/dist/lib/node/connection/util/Compressor.js +2 -0
  14. package/dist/lib/node/logger/AbstractLogger.js +1 -0
  15. package/dist/lib/node/logger/WinstonLogger.js +3 -1
  16. package/dist/lib/node/mixins/MessageCompressorMixin.js +1 -1
  17. package/dist/lib/node/mixins/auth/FetchAuthenticationWithOptionalCompressionMixin.js +169 -0
  18. package/dist/lib/node/mixins/auth/SessionAuthMixin.js +19 -21
  19. package/dist/lib/node/mixins/auth/UserPasswordAuthMixin.js +2 -4
  20. package/dist/lib/node/mixins/auth/index.js +1 -0
  21. package/dist/lib/node/mixins/connection/FrontgateWSMixin.js +1 -1
  22. package/dist/lib/node/mixins/subscription/EndpointSubscriptionMixin.js +1 -1
  23. package/dist/lib/node/version.js +1 -1
  24. package/dist/lib/types/authentication/util/SecretGenerator.d.ts +4 -2
  25. package/dist/lib/types/mixins/AuthTokenRequestMixin.d.ts +1 -14
  26. package/dist/lib/types/mixins/EndpointRequestMixin.d.ts +2 -12
  27. package/dist/lib/types/mixins/HTTPProxyRequestMixin.d.ts +2 -11
  28. package/dist/lib/types/mixins/LoggerMixin.d.ts +1 -9
  29. package/dist/lib/types/mixins/MessageCompressorMixin.d.ts +1 -11
  30. package/dist/lib/types/mixins/OpenTelemetryMixin.d.ts +1 -16
  31. package/dist/lib/types/mixins/PingMixin.d.ts +1 -10
  32. package/dist/lib/types/mixins/ReconnectMixin.d.ts +1 -13
  33. package/dist/lib/types/mixins/RemoteLoggerMixin.d.ts +1 -10
  34. package/dist/lib/types/mixins/RequestMixin.d.ts +1 -10
  35. package/dist/lib/types/mixins/auth/AppAuthMixin.d.ts +2 -20
  36. package/dist/lib/types/mixins/auth/CookieTokenAuthMixin.d.ts +1 -10
  37. package/dist/lib/types/mixins/auth/FetchAuthenticationMixin.d.ts +2 -49
  38. package/dist/lib/types/mixins/auth/FetchAuthenticationWithOptionalCompressionMixin.d.ts +4 -0
  39. package/dist/lib/types/mixins/auth/SessionAuthMixin.d.ts +2 -57
  40. package/dist/lib/types/mixins/auth/TokenAuthMixin.d.ts +1 -12
  41. package/dist/lib/types/mixins/auth/UserCredentialAuthMixin.d.ts +2 -20
  42. package/dist/lib/types/mixins/auth/UserPasswordAuthMixin.d.ts +2 -20
  43. package/dist/lib/types/mixins/auth/index.d.ts +1 -0
  44. package/dist/lib/types/mixins/connection/FrontgateWSMixin.d.ts +2 -42
  45. package/dist/lib/types/mixins/connection/index.d.ts +1 -1
  46. package/dist/lib/types/mixins/index.d.ts +2 -2
  47. package/dist/lib/types/mixins/subscription/DataObserver.d.ts +1 -1
  48. package/dist/lib/types/mixins/subscription/EndpointSubscriptionMixin.d.ts +2 -15
  49. package/dist/lib/types/mixins/subscription/RawSubscriptionMixin.d.ts +1 -18
  50. package/dist/lib/umd/mdg2.client.min.umd.js +1 -1
  51. package/dist/lib/umd/mdg2.client.umd.js +4517 -4839
  52. package/package.json +5 -5
@@ -5,8 +5,10 @@ export declare class SecretGenerator {
5
5
  private static readonly BCRYPT_KEY_B;
6
6
  private static readonly ALGORITHM;
7
7
  static createEncryptedSecret(salt: Buffer, sharedSecret: Buffer, clientSecret: Buffer): number[];
8
- static generateClientSecret(username: string, password: string, callback?: (err: Error, encrypted: string) => void): string | undefined;
9
- static generateSharedSecret(username: string, password: string, callback?: (err: Error, encrypted: string) => void): string | undefined;
8
+ static generateClientSecret(username: string, password: string): string;
9
+ static generateClientSecret(username: string, password: string, callback: (err: Error | null, encrypted: string | undefined) => void): undefined;
10
+ static generateSharedSecret(username: string, password: string): string;
11
+ static generateSharedSecret(username: string, password: string, callback: (err: Error | null, encrypted: string | undefined) => void): undefined;
10
12
  static getEncryptionKey(salt: Buffer, secret: Buffer): Buffer;
11
13
  private static generateSalt;
12
14
  private static create128bitSeed;
@@ -9,17 +9,4 @@ export interface AuthTokenRequestable {
9
9
  requestAuthenticationTokenForCookieTokenAuthentication: (lifetimeSeconds?: number, idUser?: number, idApplication?: number, timeOutInMs?: number) => Promise<CookieTokenAuthenticationFactors>;
10
10
  }
11
11
  export type usedHooksByAuthTokenRequest = CalledHooksByConnection;
12
- export declare const authTokenRequest: () => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByAuthTokenRequest & DefaultFrontgateClientHooks>>>(Base: T) => {
13
- new (...args: any[]): {
14
- requestAuthenticationToken(lifetimeSeconds?: number, idUser?: number, idApplication?: number, timeOutInMs?: number): Promise<{
15
- token: string;
16
- expiry: number;
17
- }>;
18
- requestAuthenticationTokenForCookieTokenAuthentication(lifetimeSeconds?: number, idUser?: number, idApplication?: number, timeOutInMs?: number): Promise<CookieTokenAuthenticationFactors>;
19
- logger: import("..").LoggerInterface | undefined;
20
- hooks: import("hookable").Hookable<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase>>;
21
- readonly "__#private@#defaultTimeoutInMs": number;
22
- get defaultTimeoutInMs(): number;
23
- log(level: import("..").LogLevel, ...args: unknown[]): void;
24
- };
25
- } & T) & import(".").ExtendendMixinFactoryOptions;
12
+ export declare const authTokenRequest: () => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByAuthTokenRequest & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base & AConstructorTypeOf<AuthTokenRequestable>) & import(".").ExtendendMixinFactoryOptions;
@@ -1,6 +1,6 @@
1
1
  import { type AConstructorTypeOf, type CalledHooksByConnection } from '.';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../FrontgateClient';
3
- import type { HighLevelRequestResult, PtlMessage } from '../common/interfaces';
3
+ import type { HighLevelRequestResult } from '../common/interfaces';
4
4
  import { type HighLevelRequestMethod, type HighLevelRequestOptions } from '../message';
5
5
  export interface EndpointRequestable {
6
6
  requestEndpoint: <ResponseData = any>(method: HighLevelRequestMethod, path: string, data?: Record<string, unknown>, options?: HighLevelRequestOptions, timeOutInMs?: number) => Promise<HighLevelRequestResult<ResponseData>>;
@@ -10,14 +10,4 @@ export interface EndpointRequestMixinOptions {
10
10
  disableChunkedResponse?: boolean;
11
11
  allowPermissionDeniedResponse?: boolean;
12
12
  }
13
- export declare const endpointRequest: (config?: EndpointRequestMixinOptions) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByEndpointRequest & DefaultFrontgateClientHooks>>>(Base: T) => {
14
- new (...args: any[]): {
15
- requestEndpoint<ResponseData = any>(method: HighLevelRequestMethod, path: string, data?: Record<string, unknown>, options?: HighLevelRequestOptions, timeOutInMs?: number): Promise<HighLevelRequestResult<ResponseData>>;
16
- "__#private@#hasNextChunk"(msg: PtlMessage): boolean;
17
- logger: import("..").LoggerInterface | undefined;
18
- hooks: import("hookable").Hookable<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase>>;
19
- readonly "__#private@#defaultTimeoutInMs": number;
20
- get defaultTimeoutInMs(): number;
21
- log(level: import("..").LogLevel, ...args: unknown[]): void;
22
- };
23
- } & T) & import(".").ExtendendMixinFactoryOptions;
13
+ export declare const endpointRequest: (config?: EndpointRequestMixinOptions) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByEndpointRequest & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base & AConstructorTypeOf<EndpointRequestable>) & import(".").ExtendendMixinFactoryOptions;
@@ -1,18 +1,9 @@
1
1
  import { type AConstructorTypeOf, type CalledHooksByConnection } from '.';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../FrontgateClient';
3
3
  import type { HTTPProxyRequestResult } from '../common/interfaces/result/HTTPProxyRequestResult';
4
- import type { HTTPProxyRequestBody, HTTPMethod, HTTPProxyRequestOptions } from '../message';
4
+ import type { HTTPMethod, HTTPProxyRequestOptions } from '../message';
5
5
  export interface HTTPProxyRequestable {
6
6
  requestProxyEndpoint: (method: HTTPMethod, path: string, body?: Record<string, unknown>, options?: HTTPProxyRequestOptions, timeOutInMs?: number) => Promise<HTTPProxyRequestResult>;
7
7
  }
8
8
  export type usedHooksByHTTPProxyRequest = CalledHooksByConnection;
9
- export declare const httpProxyRequest: () => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByHTTPProxyRequest & DefaultFrontgateClientHooks>>>(Base: T) => {
10
- new (...args: any[]): {
11
- requestProxyEndpoint(method: HTTPMethod, path: string, body?: HTTPProxyRequestBody, options?: HTTPProxyRequestOptions, timeOutInMs?: number): Promise<HTTPProxyRequestResult>;
12
- logger: import("..").LoggerInterface | undefined;
13
- hooks: import("hookable").Hookable<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase>>;
14
- readonly "__#private@#defaultTimeoutInMs": number;
15
- get defaultTimeoutInMs(): number;
16
- log(level: import("..").LogLevel, ...args: unknown[]): void;
17
- };
18
- } & T) & import(".").ExtendendMixinFactoryOptions;
9
+ export declare const httpProxyRequest: () => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByHTTPProxyRequest & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base & AConstructorTypeOf<HTTPProxyRequestable>) & import(".").ExtendendMixinFactoryOptions;
@@ -1,12 +1,4 @@
1
1
  import { type AConstructorTypeOf } from '.';
2
2
  import type { FrontgateClient } from '../FrontgateClient';
3
3
  import type { LogLevel, LoggerInterface } from '../logger';
4
- export declare const logger: (loggerInstance: LoggerInterface, logLevel?: LogLevel) => (<T extends AConstructorTypeOf<FrontgateClient>>(Base: T) => {
5
- new (...args: any[]): {
6
- logger: LoggerInterface | undefined;
7
- hooks: import("hookable").Hookable<import("../FrontgateClient").CalledHooksByBase, "base:log">;
8
- readonly "__#private@#defaultTimeoutInMs": number;
9
- get defaultTimeoutInMs(): number;
10
- log(level: LogLevel, ...args: unknown[]): void;
11
- };
12
- } & T) & import(".").ExtendendMixinFactoryOptions;
4
+ export declare const logger: (loggerInstance: LoggerInterface, logLevel?: LogLevel) => (<T extends AConstructorTypeOf<FrontgateClient>>(Base: T) => typeof Base) & import(".").ExtendendMixinFactoryOptions;
@@ -1,14 +1,4 @@
1
1
  import { type AConstructorTypeOf, type CalledHooksByConnection } from '.';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../FrontgateClient';
3
- import { Compressor } from '../connection/util/Compressor';
4
3
  export type usedHooksByMessageCompressor = CalledHooksByConnection;
5
- export declare const messageCompressor: () => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByMessageCompressor & DefaultFrontgateClientHooks>>>(Base: T) => {
6
- new (...args: any[]): {
7
- readonly "__#private@#compressor": Compressor;
8
- logger: import("..").LoggerInterface | undefined;
9
- hooks: import("hookable").Hookable<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase>>;
10
- readonly "__#private@#defaultTimeoutInMs": number;
11
- get defaultTimeoutInMs(): number;
12
- log(level: import("..").LogLevel, ...args: unknown[]): void;
13
- };
14
- } & T) & import(".").ExtendendMixinFactoryOptions;
4
+ export declare const messageCompressor: () => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByMessageCompressor & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base) & import(".").ExtendendMixinFactoryOptions;
@@ -1,20 +1,5 @@
1
1
  import { type SpanContext } from '@opentelemetry/api';
2
2
  import { type AConstructorTypeOf, type CalledHooksByConnection } from '.';
3
3
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../FrontgateClient';
4
- export declare const openTelemetry: () => (<T extends AConstructorTypeOf<FrontgateClient<CalledHooksByConnection & DefaultFrontgateClientHooks>>>(Base: T) => {
5
- new (...args: any[]): {
6
- "__#private@#createSpanHeader"(tracing: SpanContext): {
7
- tracing: {
8
- value: {
9
- value: number[];
10
- };
11
- };
12
- } | undefined;
13
- logger: import("..").LoggerInterface | undefined;
14
- hooks: import("hookable").Hookable<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase>>;
15
- readonly "__#private@#defaultTimeoutInMs": number;
16
- get defaultTimeoutInMs(): number;
17
- log(level: import("..").LogLevel, ...args: unknown[]): void;
18
- };
19
- } & T) & import(".").ExtendendMixinFactoryOptions;
4
+ export declare const openTelemetry: () => (<T extends AConstructorTypeOf<FrontgateClient<CalledHooksByConnection & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base) & import(".").ExtendendMixinFactoryOptions;
20
5
  export declare const encodeSpanContext: (spanContext: SpanContext) => number[];
@@ -5,13 +5,4 @@ export interface Pingable {
5
5
  ping: (timeOutInMs?: number) => Promise<PingResponse>;
6
6
  }
7
7
  export type usedHooksByPingRequest = CalledHooksByConnection;
8
- export declare const pingRequests: () => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByPingRequest & DefaultFrontgateClientHooks>>>(Base: T) => {
9
- new (...args: any[]): {
10
- ping(timeOutInMs?: number): Promise<PingResponse>;
11
- logger: import("..").LoggerInterface | undefined;
12
- hooks: import("hookable").Hookable<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase>>;
13
- readonly "__#private@#defaultTimeoutInMs": number;
14
- get defaultTimeoutInMs(): number;
15
- log(level: import("..").LogLevel, ...args: unknown[]): void;
16
- };
17
- } & T) & import(".").ExtendendMixinFactoryOptions;
8
+ export declare const pingRequests: () => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByPingRequest & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base & AConstructorTypeOf<Pingable>) & import(".").ExtendendMixinFactoryOptions;
@@ -1,22 +1,10 @@
1
1
  import type { CloseEvent } from 'ws';
2
2
  import { type AConstructorTypeOf, type CalledHooksByConnection } from '.';
3
3
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../FrontgateClient';
4
- import { LogLevel } from '../logger';
5
4
  export type usedHooksByReconnect = CalledHooksByConnection;
6
5
  export interface CalledHooksByReconnect {
7
6
  'reconnect:attempt': (error: CloseEvent) => void;
8
7
  'reconnect:failed': (error: CloseEvent) => void;
9
8
  'reconnect:success': () => void;
10
9
  }
11
- export declare const reconnect: (reconnectDelaysInMs?: number[]) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByReconnect & CalledHooksByReconnect & DefaultFrontgateClientHooks>>>(Base: T) => {
12
- new (...args: any[]): {
13
- "__#private@#reconnectAttempts": number;
14
- readonly "__#private@#reconnectDelays": number[];
15
- "__#private@#reconnectTimer": NodeJS.Timeout | undefined;
16
- logger: import("../logger").LoggerInterface | undefined;
17
- hooks: import("hookable").Hookable<CalledHooksByConnection & CalledHooksByReconnect & import("../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & CalledHooksByReconnect & import("../FrontgateClient").CalledHooksByBase>>;
18
- readonly "__#private@#defaultTimeoutInMs": number;
19
- get defaultTimeoutInMs(): number;
20
- log(level: LogLevel, ...args: unknown[]): void;
21
- };
22
- } & T) & import(".").ExtendendMixinFactoryOptions;
10
+ export declare const reconnect: (reconnectDelaysInMs?: number[]) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByReconnect & CalledHooksByReconnect & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base) & import(".").ExtendendMixinFactoryOptions;
@@ -4,13 +4,4 @@ export interface RemoteLoggable {
4
4
  logRemotely: (msg: string) => Promise<void>;
5
5
  }
6
6
  export type usedHooksByRemoteLogger = CalledHooksByConnection;
7
- export declare const remotelogger: (identifier?: number) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByRemoteLogger & DefaultFrontgateClientHooks>>>(Base: T) => {
8
- new (...args: any[]): {
9
- logRemotely(message: string): Promise<any>;
10
- logger: import("..").LoggerInterface | undefined;
11
- hooks: import("hookable").Hookable<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase>>;
12
- readonly "__#private@#defaultTimeoutInMs": number;
13
- get defaultTimeoutInMs(): number;
14
- log(level: import("..").LogLevel, ...args: unknown[]): void;
15
- };
16
- } & T) & import(".").ExtendendMixinFactoryOptions;
7
+ export declare const remotelogger: (identifier?: number) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByRemoteLogger & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base & AConstructorTypeOf<RemoteLoggable>) & import(".").ExtendendMixinFactoryOptions;
@@ -5,13 +5,4 @@ export interface Requestable {
5
5
  request: (msg: AbstractMdg2Request, timeOutInMs?: number) => Promise<Mdg2Response>;
6
6
  }
7
7
  export type usedHooksByRequest = CalledHooksByConnection;
8
- export declare const requests: () => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByRequest & DefaultFrontgateClientHooks>>>(Base: T) => {
9
- new (...args: any[]): {
10
- request(request: AbstractMdg2Request, timeOutInMs?: number): Promise<Mdg2Response>;
11
- logger: import("..").LoggerInterface | undefined;
12
- hooks: import("hookable").Hookable<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & import("../FrontgateClient").CalledHooksByBase>>;
13
- readonly "__#private@#defaultTimeoutInMs": number;
14
- get defaultTimeoutInMs(): number;
15
- log(level: import("..").LogLevel, ...args: unknown[]): void;
16
- };
17
- } & T) & import(".").ExtendendMixinFactoryOptions;
8
+ export declare const requests: () => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByRequest & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base & AConstructorTypeOf<Requestable>) & import(".").ExtendendMixinFactoryOptions;
@@ -1,23 +1,5 @@
1
- import type { AConstructorTypeOf, FrontgateClientWSConnectionConfig, CalledHooksByAuth, CalledHooksByConnection } from '../.';
1
+ import type { AConstructorTypeOf, CalledHooksByAuth, CalledHooksByConnection } from '../.';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../../FrontgateClient';
3
- import type { PtlMessage } from '../../common/interfaces';
4
- import { AuthenticationRequest, ConfigurationRequest } from '../../compat';
5
3
  import { type DeploymentStage } from '../../connection';
6
- import { LogLevel } from '../../logger';
7
- import type { AuthenticationResponse } from '../../message/response/AuthenticationResponse';
8
4
  export type usedHooksByAppAuth = CalledHooksByConnection;
9
- export declare const appAuth: (idApplication: number, idUser: number, clientCredentials: string, deploymentStage: DeploymentStage) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByAppAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => {
10
- new (...args: any[]): {
11
- readonly "__#private@#sharedSecret": Buffer;
12
- readonly "__#private@#clientSecret": Buffer;
13
- "__#private@#createAuthenticationRequest"(): AuthenticationRequest;
14
- "__#private@#createConfigurationRequest"(msg: AuthenticationResponse, conf: FrontgateClientWSConnectionConfig): ConfigurationRequest;
15
- "__#private@#createTransportLayerRequestHeaderConfigurationRequest"(): PtlMessage;
16
- "__#private@#submit"<M extends PtlMessage>(message: PtlMessage): Promise<M>;
17
- logger: import("../../logger").LoggerInterface | undefined;
18
- hooks: import("hookable").Hookable<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase>>;
19
- readonly "__#private@#defaultTimeoutInMs": number;
20
- get defaultTimeoutInMs(): number;
21
- log(level: LogLevel, ...args: unknown[]): void;
22
- };
23
- } & T) & import("../.").ExtendendMixinFactoryOptions;
5
+ export declare const appAuth: (idApplication: number, idUser: number, clientCredentials: string, deploymentStage: DeploymentStage) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByAppAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base) & import("../.").ExtendendMixinFactoryOptions;
@@ -1,13 +1,4 @@
1
1
  import { type AConstructorTypeOf, type CalledHooksByAuth, type CalledHooksByConnection } from '../.';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../../FrontgateClient';
3
- import { LogLevel } from '../../logger';
4
3
  export type usedHooksByCookieTokenAuth = CalledHooksByConnection;
5
- export declare const cookieTokenAuth: (secondFactor: string) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByCookieTokenAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => {
6
- new (...args: any[]): {
7
- logger: import("../../logger").LoggerInterface | undefined;
8
- hooks: import("hookable").Hookable<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase>>;
9
- readonly "__#private@#defaultTimeoutInMs": number;
10
- get defaultTimeoutInMs(): number;
11
- log(level: LogLevel, ...args: unknown[]): void;
12
- };
13
- } & T) & import("../.").ExtendendMixinFactoryOptions;
4
+ export declare const cookieTokenAuth: (secondFactor: string) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByCookieTokenAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base) & import("../.").ExtendendMixinFactoryOptions;
@@ -1,54 +1,7 @@
1
- import type { AConstructorTypeOf, FrontgateClientWSConnectionConfig, FrontgateMessage, CalledHooksByAuth, CalledHooksByConnection } from '../.';
1
+ import type { AConstructorTypeOf, CalledHooksByAuth, CalledHooksByConnection } from '../.';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../../FrontgateClient';
3
- import type { PtlMessage } from '../../common/interfaces/PtlMessage';
4
- import { LogLevel } from '../../logger';
5
3
  export type usedHooksByFetchAuth = CalledHooksByConnection;
6
- export declare const fetchAuth: (config: FrontgateClientFetchWSConnectionConfig, input: RequestInfo, init?: RequestInit) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByFetchAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => {
7
- new (...args: any[]): {
8
- "__#private@#token": string;
9
- "__#private@#secondFactor": string;
10
- readonly "__#private@#requestInfo": RequestInfo;
11
- readonly "__#private@#requestInit": RequestInit | undefined;
12
- "__#private@#fetchConnectionConfiguration"(): Promise<{
13
- url: string;
14
- authtenticationType: string | null;
15
- authenticationToken: string | null;
16
- splitAuthenticationTokenSecondFactor: string | null;
17
- }>;
18
- "__#private@#ws": import("ws") | undefined;
19
- "__#private@#wsConf": import("../.").InternalFrontgateClientWSConnectionConfig | undefined;
20
- "__#private@#wsStateInternal": "connecting" | "connected" | "authenticated" | "disconnected";
21
- "__#private@#keepAliveTimer": NodeJS.Timeout | undefined;
22
- "__#private@#jobId": number;
23
- "__#private@#idApplication": number;
24
- "__#private@#idUser": number;
25
- get "__#private@#wsState"(): "connecting" | "connected" | "authenticated" | "disconnected";
26
- "__#private@#message_buffer_size": number;
27
- readonly "__#private@#msgBuffer": FrontgateMessage[];
28
- set conf(newConf: FrontgateClientWSConnectionConfig);
29
- connect(): Promise<void>;
30
- disconnect(): Promise<void>;
31
- "__#private@#getDisconnectMessage"(): import("../..").DisconnectionMessage;
32
- "__#private@#getKeepAliveMessage"(): {
33
- Message: string;
34
- Version: number;
35
- };
36
- "__#private@#sendMessage"(msg: PtlMessage): Promise<void>;
37
- "__#private@#respondToMessage"(msgObj: PtlMessage): void;
38
- "__#private@#addJobIdToMessage"(msg: PtlMessage): number;
39
- "__#private@#prepareMessage"(msg: PtlMessage): void;
40
- "__#private@#createErrorMessage"(error: string, msg: PtlMessage): import("../..").ErrorResponse;
41
- "__#private@#applyDefaultsToConfig"(oldConf: FrontgateClientWSConnectionConfig): import("../.").InternalFrontgateClientWSConnectionConfig;
42
- isConnected(): boolean;
43
- isDisconnected(): boolean;
44
- isReadyToConnect(): boolean;
45
- logger: import("../../logger").LoggerInterface | undefined;
46
- hooks: import("hookable").Hookable<import("../ReconnectMixin").CalledHooksByReconnect & CalledHooksByAuth & CalledHooksByConnection & import("../../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<import("../ReconnectMixin").CalledHooksByReconnect & CalledHooksByAuth & CalledHooksByConnection & import("../../FrontgateClient").CalledHooksByBase>> & import("hookable").Hookable<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase>>;
47
- readonly "__#private@#defaultTimeoutInMs": number;
48
- get defaultTimeoutInMs(): number;
49
- log: ((level: LogLevel, ...args: unknown[]) => void) & ((level: LogLevel, ...args: unknown[]) => void);
50
- };
51
- } & T) & import("../.").ExtendendMixinFactoryOptions;
4
+ export declare const fetchAuth: (config: FrontgateClientFetchWSConnectionConfig, input: RequestInfo, init?: RequestInit) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByFetchAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base) & import("../.").ExtendendMixinFactoryOptions;
52
5
  export interface FrontgateClientFetchWSConnectionConfig {
53
6
  maximumIdleIntervalInS: number;
54
7
  [key: string]: unknown;
@@ -0,0 +1,4 @@
1
+ import type { AConstructorTypeOf, CalledHooksByAuth, CalledHooksByConnection, FrontgateClientFetchWSConnectionConfig } from '../.';
2
+ import type { DefaultFrontgateClientHooks, FrontgateClient } from '../../FrontgateClient';
3
+ export type usedHooksByFetchAuthWithOptionalCompressor = CalledHooksByConnection;
4
+ export declare const fetchAuthWithOptionalCompressor: (config: FrontgateClientFetchWSConnectionConfig, input: RequestInfo, init?: RequestInit) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByFetchAuthWithOptionalCompressor & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base) & import("../.").ExtendendMixinFactoryOptions;
@@ -1,64 +1,9 @@
1
- import type { AConstructorTypeOf, Connectable, FrontgateClientWSConnectionConfig, FrontgateMessage, CalledHooksByAuth, CalledHooksByConnection } from '../.';
1
+ import type { AConstructorTypeOf, Connectable, FrontgateClientWSConnectionConfig, CalledHooksByAuth, CalledHooksByConnection } from '../.';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../../FrontgateClient';
3
- import type { PtlMessage } from '../../common/interfaces';
4
- import { AuthenticationRequest, ConfigurationRequest } from '../../compat';
5
3
  import { type DeploymentStage } from '../../connection';
6
- import { LogLevel } from '../../logger';
7
- import type { AuthenticationResponse } from '../../message/response/AuthenticationResponse';
8
4
  export type usedHooksBySessionAuth = CalledHooksByConnection;
9
5
  export interface SessionConnectable extends Connectable {
10
6
  connectSession: () => Promise<void>;
11
7
  logout: () => Promise<void>;
12
8
  }
13
- export declare const sessionAuth: (config: FrontgateClientWSConnectionConfig, idApplication: number, username: string, password: string, deploymentStage: DeploymentStage) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksBySessionAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => {
14
- new (...args: any[]): {
15
- "__#private@#tokenConnectionAttempt": boolean;
16
- "__#private@#logOut": boolean;
17
- "__#private@#mdg2wstoken": string | undefined;
18
- readonly "__#private@#sharedSecret": Buffer;
19
- readonly "__#private@#clientSecret": Buffer;
20
- disconnect: () => Promise<void>;
21
- isReadyToConnect: () => boolean;
22
- isConnected: () => boolean;
23
- isDisconnected: () => boolean;
24
- connect(): Promise<void>;
25
- connectSession(): Promise<void>;
26
- logout(): Promise<void>;
27
- "__#private@#requestOtpAuthenticationTokenForSessionHandling"(lifetimeSeconds?: number, idUser?: number, idApplicationOtp?: number, timeOutInMs?: number): Promise<{
28
- token: string;
29
- expiry: number;
30
- }>;
31
- "__#private@#toUrlBase64"(strInBase64: string): string;
32
- "__#private@#createAuthenticationRequest"(): AuthenticationRequest;
33
- "__#private@#createConfigurationRequest"(msg: AuthenticationResponse, conf: FrontgateClientWSConnectionConfig): ConfigurationRequest;
34
- "__#private@#createTransportLayerRequestHeaderConfigurationRequest"(): PtlMessage;
35
- "__#private@#submit"<M extends PtlMessage>(message: PtlMessage): Promise<M>;
36
- "__#private@#ws": import("ws") | undefined;
37
- "__#private@#wsConf": import("../.").InternalFrontgateClientWSConnectionConfig | undefined;
38
- "__#private@#wsStateInternal": "connecting" | "connected" | "authenticated" | "disconnected";
39
- "__#private@#keepAliveTimer": NodeJS.Timeout | undefined;
40
- "__#private@#jobId": number;
41
- "__#private@#idApplication": number;
42
- "__#private@#idUser": number;
43
- get "__#private@#wsState"(): "connecting" | "connected" | "authenticated" | "disconnected";
44
- "__#private@#message_buffer_size": number;
45
- readonly "__#private@#msgBuffer": FrontgateMessage[];
46
- set conf(newConf: FrontgateClientWSConnectionConfig);
47
- "__#private@#getDisconnectMessage"(): import("../../message").DisconnectionMessage;
48
- "__#private@#getKeepAliveMessage"(): {
49
- Message: string;
50
- Version: number;
51
- };
52
- "__#private@#sendMessage"(msg: PtlMessage): Promise<void>;
53
- "__#private@#respondToMessage"(msgObj: PtlMessage): void;
54
- "__#private@#addJobIdToMessage"(msg: PtlMessage): number;
55
- "__#private@#prepareMessage"(msg: PtlMessage): void;
56
- "__#private@#createErrorMessage"(error: string, msg: PtlMessage): import("../../message").ErrorResponse;
57
- "__#private@#applyDefaultsToConfig"(oldConf: FrontgateClientWSConnectionConfig): import("../.").InternalFrontgateClientWSConnectionConfig;
58
- logger: import("../../logger").LoggerInterface | undefined;
59
- hooks: import("hookable").Hookable<import("../ReconnectMixin").CalledHooksByReconnect & CalledHooksByAuth & CalledHooksByConnection & import("../../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<import("../ReconnectMixin").CalledHooksByReconnect & CalledHooksByAuth & CalledHooksByConnection & import("../../FrontgateClient").CalledHooksByBase>> & import("hookable").Hookable<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase>>;
60
- readonly "__#private@#defaultTimeoutInMs": number;
61
- get defaultTimeoutInMs(): number;
62
- log: ((level: LogLevel, ...args: unknown[]) => void) & ((level: LogLevel, ...args: unknown[]) => void);
63
- };
64
- } & T) & import("../.").ExtendendMixinFactoryOptions;
9
+ export declare const sessionAuth: (config: FrontgateClientWSConnectionConfig, idApplication: number, username: string, password: string, deploymentStage: DeploymentStage) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksBySessionAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base & AConstructorTypeOf<SessionConnectable>) & import("../.").ExtendendMixinFactoryOptions;
@@ -1,18 +1,7 @@
1
1
  import { type CalledHooksByAuth, type CalledHooksByConnection, type AConstructorTypeOf } from '../.';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../../FrontgateClient';
3
- import { LogLevel } from '../../logger';
4
3
  export type usedHooksByTokenAuth = CalledHooksByConnection;
5
4
  export interface TokenAuth {
6
5
  token: string;
7
6
  }
8
- export declare const tokenAuth: (token?: string) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByTokenAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => {
9
- new (...args: any[]): {
10
- "__#private@#token": string;
11
- set token(newToken: string);
12
- logger: import("../../logger").LoggerInterface | undefined;
13
- hooks: import("hookable").Hookable<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase>>;
14
- readonly "__#private@#defaultTimeoutInMs": number;
15
- get defaultTimeoutInMs(): number;
16
- log(level: LogLevel, ...args: unknown[]): void;
17
- };
18
- } & T) & import("../.").ExtendendMixinFactoryOptions;
7
+ export declare const tokenAuth: (token?: string) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByTokenAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base & AConstructorTypeOf<TokenAuth>) & import("../.").ExtendendMixinFactoryOptions;
@@ -1,23 +1,5 @@
1
- import type { AConstructorTypeOf, FrontgateClientWSConnectionConfig, CalledHooksByAuth, CalledHooksByConnection } from '../.';
1
+ import type { AConstructorTypeOf, CalledHooksByAuth, CalledHooksByConnection } from '../.';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../../FrontgateClient';
3
3
  import { type DeploymentStage } from '../../connection';
4
- import { AuthenticationRequest, ConfigurationRequest } from '../../compat';
5
- import type { PtlMessage } from '../../common/interfaces';
6
- import { LogLevel } from '../../logger';
7
- import type { AuthenticationResponse } from '../../message/response/AuthenticationResponse';
8
4
  export type usedHooksByUserCredentialAuth = CalledHooksByConnection;
9
- export declare const userCredentialAuth: (idApplication: number, username: string, credentials: string, deploymentStage: DeploymentStage) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByUserCredentialAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => {
10
- new (...args: any[]): {
11
- readonly "__#private@#sharedSecret": Buffer;
12
- readonly "__#private@#clientSecret": Buffer;
13
- "__#private@#createAuthenticationRequest"(): AuthenticationRequest;
14
- "__#private@#createConfigurationRequest"(msg: AuthenticationResponse, conf: FrontgateClientWSConnectionConfig): ConfigurationRequest;
15
- "__#private@#createTransportLayerRequestHeaderConfigurationRequest"(): PtlMessage;
16
- "__#private@#submit"<M extends PtlMessage>(message: PtlMessage): Promise<M>;
17
- logger: import("../../logger").LoggerInterface | undefined;
18
- hooks: import("hookable").Hookable<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase>>;
19
- readonly "__#private@#defaultTimeoutInMs": number;
20
- get defaultTimeoutInMs(): number;
21
- log(level: LogLevel, ...args: unknown[]): void;
22
- };
23
- } & T) & import("../.").ExtendendMixinFactoryOptions;
5
+ export declare const userCredentialAuth: (idApplication: number, username: string, credentials: string, deploymentStage: DeploymentStage) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByUserCredentialAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base) & import("../.").ExtendendMixinFactoryOptions;
@@ -1,23 +1,5 @@
1
- import type { AConstructorTypeOf, FrontgateClientWSConnectionConfig, CalledHooksByAuth, CalledHooksByConnection } from '../.';
1
+ import type { AConstructorTypeOf, CalledHooksByAuth, CalledHooksByConnection } from '../.';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../../FrontgateClient';
3
3
  import { type DeploymentStage } from '../../connection';
4
- import { AuthenticationRequest, ConfigurationRequest } from '../../compat';
5
- import type { PtlMessage } from '../../common/interfaces';
6
- import { LogLevel } from '../../logger';
7
- import type { AuthenticationResponse } from '../../message/response/AuthenticationResponse';
8
4
  export type usedHooksByUserPasswordAuth = CalledHooksByConnection;
9
- export declare const userPasswordAuth: (idApplication: number, username: string, password: string, deploymentStage: DeploymentStage) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByUserPasswordAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => {
10
- new (...args: any[]): {
11
- readonly "__#private@#sharedSecret": Buffer;
12
- readonly "__#private@#clientSecret": Buffer;
13
- "__#private@#createAuthenticationRequest"(): AuthenticationRequest;
14
- "__#private@#createConfigurationRequest"(msg: AuthenticationResponse, conf: FrontgateClientWSConnectionConfig): ConfigurationRequest;
15
- "__#private@#createTransportLayerRequestHeaderConfigurationRequest"(): PtlMessage;
16
- "__#private@#submit"<M extends PtlMessage>(message: PtlMessage): Promise<M>;
17
- logger: import("../../logger").LoggerInterface | undefined;
18
- hooks: import("hookable").Hookable<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & CalledHooksByAuth & import("../../FrontgateClient").CalledHooksByBase>>;
19
- readonly "__#private@#defaultTimeoutInMs": number;
20
- get defaultTimeoutInMs(): number;
21
- log(level: LogLevel, ...args: unknown[]): void;
22
- };
23
- } & T) & import("../.").ExtendendMixinFactoryOptions;
5
+ export declare const userPasswordAuth: (idApplication: number, username: string, password: string, deploymentStage: DeploymentStage) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByUserPasswordAuth & CalledHooksByAuth & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base) & import("../.").ExtendendMixinFactoryOptions;
@@ -1,6 +1,7 @@
1
1
  export * from './CookieTokenAuthMixin';
2
2
  export * from './TokenAuthMixin';
3
3
  export * from './FetchAuthenticationMixin';
4
+ export * from './FetchAuthenticationWithOptionalCompressionMixin';
4
5
  export interface CalledHooksByAuth {
5
6
  'frontgateConnection:setIdApp': (idApp: number) => void;
6
7
  'frontgateConnection:setIdUser': (idUser: number) => void;
@@ -1,11 +1,6 @@
1
- import { type CalledHooksByReconnect, type AConstructorTypeOf, type FrontgateMessage, type CalledHooksByAuth, type CalledHooksByConnection } from '../';
1
+ import { type CalledHooksByReconnect, type AConstructorTypeOf, type Connectable, type CalledHooksByAuth, type CalledHooksByConnection } from '../';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../../FrontgateClient';
3
- import WebSocket from 'isomorphic-ws';
4
3
  import type { ClientOptions } from 'ws';
5
- import { LogLevel } from '../../logger';
6
- import type { DisconnectionMessage } from '../../message/response/DisconnectionMessage';
7
- import type { PtlMessage } from '../../common/interfaces';
8
- import { ErrorResponse } from '../../message';
9
4
  export interface FrontgateClientWSConnectionConfig {
10
5
  host: string;
11
6
  port: number;
@@ -29,39 +24,4 @@ export interface InternalFrontgateClientWSConnectionConfig {
29
24
  messageBufferSize: number;
30
25
  }
31
26
  export type usedHooksByConnection = CalledHooksByReconnect & CalledHooksByAuth;
32
- export declare const wsConnection: (conf?: FrontgateClientWSConnectionConfig) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByConnection & CalledHooksByReconnect & CalledHooksByConnection & DefaultFrontgateClientHooks>>>(Base: T) => {
33
- new (...args: any[]): {
34
- "__#private@#ws": WebSocket | undefined;
35
- "__#private@#wsConf": InternalFrontgateClientWSConnectionConfig | undefined;
36
- "__#private@#wsStateInternal": "connecting" | "connected" | "authenticated" | "disconnected";
37
- "__#private@#keepAliveTimer": NodeJS.Timeout | undefined;
38
- "__#private@#jobId": number;
39
- "__#private@#idApplication": number;
40
- "__#private@#idUser": number;
41
- get "__#private@#wsState"(): "connecting" | "connected" | "authenticated" | "disconnected";
42
- "__#private@#message_buffer_size": number;
43
- readonly "__#private@#msgBuffer": FrontgateMessage[];
44
- set conf(newConf: FrontgateClientWSConnectionConfig);
45
- connect(): Promise<void>;
46
- disconnect(): Promise<void>;
47
- "__#private@#getDisconnectMessage"(): DisconnectionMessage;
48
- "__#private@#getKeepAliveMessage"(): {
49
- Message: string;
50
- Version: number;
51
- };
52
- "__#private@#sendMessage"(msg: PtlMessage): Promise<void>;
53
- "__#private@#respondToMessage"(msgObj: PtlMessage): void;
54
- "__#private@#addJobIdToMessage"(msg: PtlMessage): number;
55
- "__#private@#prepareMessage"(msg: PtlMessage): void;
56
- "__#private@#createErrorMessage"(error: string, msg: PtlMessage): ErrorResponse;
57
- "__#private@#applyDefaultsToConfig"(oldConf: FrontgateClientWSConnectionConfig): InternalFrontgateClientWSConnectionConfig;
58
- isConnected(): boolean;
59
- isDisconnected(): boolean;
60
- isReadyToConnect(): boolean;
61
- logger: import("../../logger").LoggerInterface | undefined;
62
- hooks: import("hookable").Hookable<CalledHooksByReconnect & CalledHooksByAuth & CalledHooksByConnection & import("../../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByReconnect & CalledHooksByAuth & CalledHooksByConnection & import("../../FrontgateClient").CalledHooksByBase>>;
63
- readonly "__#private@#defaultTimeoutInMs": number;
64
- get defaultTimeoutInMs(): number;
65
- log(level: LogLevel, ...args: unknown[]): void;
66
- };
67
- } & T) & import("../").ExtendendMixinFactoryOptions;
27
+ export declare const wsConnection: (conf?: FrontgateClientWSConnectionConfig) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByConnection & CalledHooksByReconnect & CalledHooksByConnection & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base & AConstructorTypeOf<Connectable>) & import("../").ExtendendMixinFactoryOptions;
@@ -8,7 +8,7 @@ export interface Connectable<Config = FrontgateClientWSConnectionConfig> {
8
8
  isReadyToConnect: () => boolean;
9
9
  isConnected: () => boolean;
10
10
  isDisconnected: () => boolean;
11
- conf: Config;
11
+ conf?: Config;
12
12
  }
13
13
  export interface CalledHooksByConnection {
14
14
  'frontgateConnection:sendMessage': (msg: FrontgateMessage) => void;
@@ -11,8 +11,8 @@ export * from './OpenTelemetryMixin';
11
11
  export * from './HTTPProxyRequestMixin';
12
12
  export * from './PingMixin';
13
13
  export * from './RemoteLoggerMixin';
14
- export type FeatureName = 'AppAuth' | 'CookieTokenAuth' | 'FetchAuth' | 'SessionAuth' | 'TokenAuth' | 'UserCredentialAuth' | 'UserPasswordAuth' | 'WSConnection' | 'TCPConnection' | 'AuthTokenRequest' | 'EndpointRequest' | 'HTTPProxyRequest' | 'Logger' | 'MessageCompressor' | 'OpenTelemetry' | 'Reconnect' | 'Request' | 'EndpointSubscriptions' | 'Pingable' | 'RawSubscriptions' | 'RemoteLogger' | 'Custom';
15
- export type FeatureGroup = 'Auth' | 'Connection' | 'Misc';
14
+ export type FeatureName = 'AppAuth' | 'CookieTokenAuth' | 'FetchAuth' | 'SessionAuth' | 'TokenAuth' | 'UserCredentialAuth' | 'UserPasswordAuth' | 'WSConnection' | 'TCPConnection' | 'AuthTokenRequest' | 'EndpointRequest' | 'HTTPProxyRequest' | 'Logger' | 'MessageCompressor' | 'OpenTelemetry' | 'Reconnect' | 'Request' | 'EndpointSubscriptions' | 'Pingable' | 'RawSubscriptions' | 'RemoteLogger' | 'FetchAuthWithOptionalCompressor' | 'Custom';
15
+ export type FeatureGroup = 'Auth' | 'Connection' | 'Compression' | 'Misc';
16
16
  export type AConstructorTypeOf<T> = new (...args: any[]) => T;
17
17
  export type MixinFactory<TBase, TMixin> = (Base: AConstructorTypeOf<TBase>) => AConstructorTypeOf<TBase & TMixin>;
18
18
  export type ExtendedMixinFactory<TBase, TMixin> = ((Base: AConstructorTypeOf<TBase>) => AConstructorTypeOf<TBase & TMixin>) & {
@@ -29,7 +29,7 @@ export declare class FrontgateClientDataObserver<ResponseData extends object = o
29
29
  idJob: number;
30
30
  get data(): ResponseData;
31
31
  constructor(idJob: number, data: ResponseData);
32
- unsubscribe: () => void;
32
+ unsubscribe: (() => void) | undefined;
33
33
  subscribe({ next, error }: {
34
34
  next: (data: ResponseData) => void;
35
35
  error?: (error: ErrorResponse) => void;
@@ -1,7 +1,6 @@
1
1
  import { type AConstructorTypeOf, type CalledHooksByConnection, FrontgateClientEndpointDataObserver } from '../';
2
2
  import type { DefaultFrontgateClientHooks, FrontgateClient } from '../../FrontgateClient';
3
- import { LogLevel } from '../../logger';
4
- import { type HighLevelRequestMethod, type HighLevelResponseData, type HighLevelRequestOptions } from '../../message';
3
+ import { type HighLevelRequestMethod, type HighLevelRequestOptions } from '../../message';
5
4
  export interface EndpointSubscribable {
6
5
  observeEndpoint: (method: HighLevelRequestMethod, path: string, data: Record<string, unknown>, requestOptions?: HighLevelRequestOptions) => Promise<FrontgateClientEndpointDataObserver>;
7
6
  }
@@ -10,16 +9,4 @@ export interface EndpointSubscriptionsConfig {
10
9
  timeout?: number;
11
10
  subscriptionResubscribeTimeout?: number;
12
11
  }
13
- export declare const endpointSubscriptions: (originalConfig?: EndpointSubscriptionsConfig) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByEndpointSubscribable & DefaultFrontgateClientHooks>>>(Base: T) => {
14
- new (...args: any[]): {
15
- readonly "__#private@#subscriptions": Map<string, FrontgateClientEndpointDataObserver>;
16
- readonly "__#private@#subscriptionCounts": Map<string, number>;
17
- readonly "__#private@#inFlights": Map<string, Promise<FrontgateClientEndpointDataObserver<HighLevelResponseData<unknown>>>>;
18
- observeEndpoint<ResponseData extends Record<string, any> = Record<string, any>>(method: HighLevelRequestMethod, path: string, data: Record<string, unknown>, requestOptions?: HighLevelRequestOptions): Promise<FrontgateClientEndpointDataObserver<HighLevelResponseData<any>>>;
19
- logger: import("../../logger").LoggerInterface | undefined;
20
- hooks: import("hookable").Hookable<CalledHooksByConnection & import("../../FrontgateClient").CalledHooksByBase, import("hookable").HookKeys<CalledHooksByConnection & import("../../FrontgateClient").CalledHooksByBase>>;
21
- readonly "__#private@#defaultTimeoutInMs": number;
22
- get defaultTimeoutInMs(): number;
23
- log(level: LogLevel, ...args: unknown[]): void;
24
- };
25
- } & T) & import("../").ExtendendMixinFactoryOptions;
12
+ export declare const endpointSubscriptions: (originalConfig?: EndpointSubscriptionsConfig) => (<T extends AConstructorTypeOf<FrontgateClient<usedHooksByEndpointSubscribable & DefaultFrontgateClientHooks>>>(Base: T) => typeof Base & AConstructorTypeOf<EndpointSubscribable>) & import("../").ExtendendMixinFactoryOptions;