@wildix/wim-knowledge-base-client 0.0.8 → 0.0.9

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.
@@ -19,14 +19,14 @@ class KnowledgeBaseClient extends smithy_client_1.Client {
19
19
  let _config_2 = (0, middleware_retry_1.resolveRetryConfig)(_config_1);
20
20
  let _config_3 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_2, configuration?.extensions || []);
21
21
  const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `kb.wim-${configuration.env}.wildix.com` : 'kb.wim.wildix.com';
22
- const endpoint = () => {
22
+ const endpoint = configuration.endpoint || (() => {
23
23
  return {
24
24
  hostname,
25
25
  protocol: "https",
26
26
  port: '443',
27
27
  path: ''
28
28
  };
29
- };
29
+ });
30
30
  const config = { ..._config_3, endpoint };
31
31
  this.config = config;
32
32
  this.middlewareStack.add(smithy_utils_1.authorizationMiddleware.bind(this, configuration.token), { step: "build" });
@@ -16,14 +16,14 @@ export class KnowledgeBaseClient extends __Client {
16
16
  let _config_2 = resolveRetryConfig(_config_1);
17
17
  let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
18
18
  const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `kb.wim-${configuration.env}.wildix.com` : 'kb.wim.wildix.com';
19
- const endpoint = () => {
19
+ const endpoint = configuration.endpoint || (() => {
20
20
  return {
21
21
  hostname,
22
22
  protocol: "https",
23
23
  port: '443',
24
24
  path: ''
25
25
  };
26
- };
26
+ });
27
27
  const config = { ..._config_3, endpoint };
28
28
  this.config = config;
29
29
  this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
@@ -137,6 +137,7 @@ export type KnowledgeBaseClientConfigType = Partial<__SmithyConfiguration<__Http
137
137
  export interface KnowledgeBaseClientConfig extends KnowledgeBaseClientConfigType {
138
138
  env?: 'stage' | 'stable' | 'prod';
139
139
  token: TokenProvider;
140
+ endpoint?: () => Record<string, string>;
140
141
  }
141
142
  /**
142
143
  * @public
@@ -15,6 +15,7 @@ export declare const getRuntimeConfig: (config: KnowledgeBaseClientConfig) => {
15
15
  streamCollector: import("@smithy/types").StreamCollector;
16
16
  env?: "stage" | "stable" | "prod" | undefined;
17
17
  token: import("@wildix/smithy-utils").TokenProvider;
18
+ endpoint?: (() => Record<string, string>) | undefined;
18
19
  apiVersion: string;
19
20
  cacheMiddleware?: boolean | undefined;
20
21
  urlParser: import("@smithy/types").UrlParser;
@@ -16,6 +16,7 @@ export declare const getRuntimeConfig: (config: KnowledgeBaseClientConfig) => {
16
16
  userAgentAppId: string | import("@smithy/types").Provider<string | undefined>;
17
17
  env?: "stage" | "stable" | "prod" | undefined;
18
18
  token: import("@wildix/smithy-utils").TokenProvider;
19
+ endpoint?: (() => Record<string, string>) | undefined;
19
20
  apiVersion: string;
20
21
  cacheMiddleware?: boolean | undefined;
21
22
  urlParser: import("@smithy/types").UrlParser;
@@ -7,6 +7,7 @@ export declare const getRuntimeConfig: (config: KnowledgeBaseClientConfig) => {
7
7
  sha256: import("@smithy/types").HashConstructor;
8
8
  env?: "stage" | "stable" | "prod" | undefined;
9
9
  token: import("@wildix/smithy-utils").TokenProvider;
10
+ endpoint?: (() => Record<string, string>) | undefined;
10
11
  requestHandler: import("@smithy/types").NodeHttpHandlerOptions | import("@smithy/types").FetchHttpHandlerOptions | Record<string, unknown> | import("@smithy/protocol-http").HttpHandler<any> | import("@smithy/fetch-http-handler").FetchHttpHandler;
11
12
  apiVersion: string;
12
13
  cacheMiddleware?: boolean | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wildix/wim-knowledge-base-client",
3
3
  "description": "@wildix/wim-knowledge-base-client client",
4
- "version": "0.0.8",
4
+ "version": "0.0.9",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",