@wildix/wim-cache-client 1.0.0 → 1.0.2

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 (50) hide show
  1. package/dist-cjs/WimCache.js +2 -0
  2. package/dist-cjs/WimCacheClient.js +14 -8
  3. package/dist-cjs/commands/DeleteEntitiesFromGeneralCacheCommand.js +12 -32
  4. package/dist-cjs/commands/GetEntitiesByIdsCommand.js +12 -32
  5. package/dist-cjs/commands/PutEntitiesToGeneralCacheCommand.js +12 -32
  6. package/dist-cjs/commands/SearchEntitiesByListParamsCommand.js +12 -32
  7. package/dist-cjs/commands/SearchEntitiesByParamsCommand.js +12 -32
  8. package/dist-cjs/commands/SyncCacheCommand.js +12 -32
  9. package/dist-cjs/commands/UpdateEntitiesWeightCommand.js +21 -0
  10. package/dist-cjs/commands/index.js +1 -0
  11. package/dist-cjs/models/models_0.js +16 -3
  12. package/dist-cjs/protocols/Aws_restJson1.js +118 -233
  13. package/dist-cjs/runtimeConfig.browser.js +5 -1
  14. package/dist-cjs/runtimeConfig.js +8 -3
  15. package/dist-cjs/runtimeConfig.shared.js +13 -11
  16. package/dist-cjs/runtimeExtensions.js +2 -10
  17. package/dist-es/WimCache.js +2 -0
  18. package/dist-es/WimCacheClient.js +15 -9
  19. package/dist-es/commands/DeleteEntitiesFromGeneralCacheCommand.js +12 -32
  20. package/dist-es/commands/GetEntitiesByIdsCommand.js +12 -32
  21. package/dist-es/commands/PutEntitiesToGeneralCacheCommand.js +12 -32
  22. package/dist-es/commands/SearchEntitiesByListParamsCommand.js +12 -32
  23. package/dist-es/commands/SearchEntitiesByParamsCommand.js +12 -32
  24. package/dist-es/commands/SyncCacheCommand.js +12 -32
  25. package/dist-es/commands/UpdateEntitiesWeightCommand.js +17 -0
  26. package/dist-es/commands/index.js +1 -0
  27. package/dist-es/models/models_0.js +14 -2
  28. package/dist-es/protocols/Aws_restJson1.js +109 -226
  29. package/dist-es/runtimeConfig.browser.js +4 -1
  30. package/dist-es/runtimeConfig.js +7 -3
  31. package/dist-es/runtimeConfig.shared.js +13 -11
  32. package/dist-es/runtimeExtensions.js +2 -10
  33. package/dist-types/WimCache.d.ts +10 -0
  34. package/dist-types/WimCacheClient.d.ts +21 -15
  35. package/dist-types/commands/DeleteEntitiesFromGeneralCacheCommand.d.ts +24 -21
  36. package/dist-types/commands/GetEntitiesByIdsCommand.d.ts +25 -21
  37. package/dist-types/commands/PutEntitiesToGeneralCacheCommand.d.ts +24 -21
  38. package/dist-types/commands/SearchEntitiesByListParamsCommand.d.ts +25 -21
  39. package/dist-types/commands/SearchEntitiesByParamsCommand.d.ts +25 -21
  40. package/dist-types/commands/SyncCacheCommand.d.ts +24 -21
  41. package/dist-types/commands/UpdateEntitiesWeightCommand.d.ts +79 -0
  42. package/dist-types/commands/index.d.ts +1 -0
  43. package/dist-types/index.d.ts +2 -0
  44. package/dist-types/models/WimCacheServiceException.d.ts +2 -1
  45. package/dist-types/models/models_0.d.ts +104 -71
  46. package/dist-types/protocols/Aws_restJson1.d.ts +9 -0
  47. package/dist-types/runtimeConfig.browser.d.ts +8 -4
  48. package/dist-types/runtimeConfig.d.ts +8 -4
  49. package/dist-types/runtimeConfig.native.d.ts +8 -4
  50. package/package.json +42 -36
@@ -1,15 +1,22 @@
1
1
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
2
2
  import { resolveRuntimeExtensions, } from "./runtimeExtensions";
3
+ import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
4
+ import { getContentLengthPlugin } from "@smithy/middleware-content-length";
5
+ import { getRetryPlugin, resolveRetryConfig, } from "@smithy/middleware-retry";
3
6
  import { Client as __Client, } from "@smithy/smithy-client";
4
- import { authorizationMiddleware } from "@wildix/smithy-utils";
7
+ import { authorizationMiddleware } from '@wildix/smithy-utils';
5
8
  export { __Client };
6
9
  export class WimCacheClient extends __Client {
10
+ config;
7
11
  constructor(...[configuration]) {
8
12
  let _config_0 = __getRuntimeConfig(configuration || {});
9
- let _config_1 = resolveRuntimeExtensions(_config_0, configuration?.extensions || []);
13
+ super(_config_0);
14
+ this.initConfig = _config_0;
15
+ let _config_1 = resolveUserAgentConfig(_config_0);
16
+ let _config_2 = resolveRetryConfig(_config_1);
17
+ let _config_3 = resolveRuntimeExtensions(_config_2, configuration?.extensions || []);
18
+ const hostname = ['stable', 'stage'].includes(configuration.env || '') ? `wim-${configuration.env}.wildix.com` : 'wim.wildix.com';
10
19
  const endpoint = () => {
11
- let env = configuration.env && configuration.env !== 'prod' ? '-' + configuration.env : '';
12
- const hostname = `wim${env}.wildix.com`;
13
20
  return {
14
21
  hostname,
15
22
  protocol: "https",
@@ -17,13 +24,12 @@ export class WimCacheClient extends __Client {
17
24
  path: ''
18
25
  };
19
26
  };
20
- const config = {
21
- ..._config_1,
22
- endpoint,
23
- };
24
- super(config);
27
+ const config = { ..._config_3, endpoint };
25
28
  this.config = config;
26
29
  this.middlewareStack.add(authorizationMiddleware.bind(this, configuration.token), { step: "build" });
30
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
31
+ this.middlewareStack.use(getRetryPlugin(this.config));
32
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
27
33
  }
28
34
  destroy() {
29
35
  super.destroy();
@@ -1,37 +1,17 @@
1
1
  import { de_DeleteEntitiesFromGeneralCacheCommand, se_DeleteEntitiesFromGeneralCacheCommand, } from "../protocols/Aws_restJson1";
2
2
  import { getSerdePlugin } from "@smithy/middleware-serde";
3
3
  import { Command as $Command } from "@smithy/smithy-client";
4
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
4
  export { $Command };
6
- export class DeleteEntitiesFromGeneralCacheCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
- resolveMiddleware(clientStack, configuration, options) {
12
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
13
- const stack = clientStack.concat(this.middlewareStack);
14
- const { logger } = configuration;
15
- const clientName = "WimCacheClient";
16
- const commandName = "DeleteEntitiesFromGeneralCacheCommand";
17
- const handlerExecutionContext = {
18
- logger,
19
- clientName,
20
- commandName,
21
- inputFilterSensitiveLog: (_) => _,
22
- outputFilterSensitiveLog: (_) => _,
23
- [SMITHY_CONTEXT_KEY]: {
24
- service: "WimCache",
25
- operation: "DeleteEntitiesFromGeneralCache",
26
- },
27
- };
28
- const { requestHandler } = configuration;
29
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
30
- }
31
- serialize(input, context) {
32
- return se_DeleteEntitiesFromGeneralCacheCommand(input, context);
33
- }
34
- deserialize(output, context) {
35
- return de_DeleteEntitiesFromGeneralCacheCommand(output, context);
36
- }
5
+ export class DeleteEntitiesFromGeneralCacheCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WimCache", "DeleteEntitiesFromGeneralCache", {})
12
+ .n("WimCacheClient", "DeleteEntitiesFromGeneralCacheCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_DeleteEntitiesFromGeneralCacheCommand)
15
+ .de(de_DeleteEntitiesFromGeneralCacheCommand)
16
+ .build() {
37
17
  }
@@ -1,37 +1,17 @@
1
1
  import { de_GetEntitiesByIdsCommand, se_GetEntitiesByIdsCommand, } from "../protocols/Aws_restJson1";
2
2
  import { getSerdePlugin } from "@smithy/middleware-serde";
3
3
  import { Command as $Command } from "@smithy/smithy-client";
4
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
4
  export { $Command };
6
- export class GetEntitiesByIdsCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
- resolveMiddleware(clientStack, configuration, options) {
12
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
13
- const stack = clientStack.concat(this.middlewareStack);
14
- const { logger } = configuration;
15
- const clientName = "WimCacheClient";
16
- const commandName = "GetEntitiesByIdsCommand";
17
- const handlerExecutionContext = {
18
- logger,
19
- clientName,
20
- commandName,
21
- inputFilterSensitiveLog: (_) => _,
22
- outputFilterSensitiveLog: (_) => _,
23
- [SMITHY_CONTEXT_KEY]: {
24
- service: "WimCache",
25
- operation: "GetEntitiesByIds",
26
- },
27
- };
28
- const { requestHandler } = configuration;
29
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
30
- }
31
- serialize(input, context) {
32
- return se_GetEntitiesByIdsCommand(input, context);
33
- }
34
- deserialize(output, context) {
35
- return de_GetEntitiesByIdsCommand(output, context);
36
- }
5
+ export class GetEntitiesByIdsCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WimCache", "GetEntitiesByIds", {})
12
+ .n("WimCacheClient", "GetEntitiesByIdsCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_GetEntitiesByIdsCommand)
15
+ .de(de_GetEntitiesByIdsCommand)
16
+ .build() {
37
17
  }
@@ -1,37 +1,17 @@
1
1
  import { de_PutEntitiesToGeneralCacheCommand, se_PutEntitiesToGeneralCacheCommand, } from "../protocols/Aws_restJson1";
2
2
  import { getSerdePlugin } from "@smithy/middleware-serde";
3
3
  import { Command as $Command } from "@smithy/smithy-client";
4
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
4
  export { $Command };
6
- export class PutEntitiesToGeneralCacheCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
- resolveMiddleware(clientStack, configuration, options) {
12
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
13
- const stack = clientStack.concat(this.middlewareStack);
14
- const { logger } = configuration;
15
- const clientName = "WimCacheClient";
16
- const commandName = "PutEntitiesToGeneralCacheCommand";
17
- const handlerExecutionContext = {
18
- logger,
19
- clientName,
20
- commandName,
21
- inputFilterSensitiveLog: (_) => _,
22
- outputFilterSensitiveLog: (_) => _,
23
- [SMITHY_CONTEXT_KEY]: {
24
- service: "WimCache",
25
- operation: "PutEntitiesToGeneralCache",
26
- },
27
- };
28
- const { requestHandler } = configuration;
29
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
30
- }
31
- serialize(input, context) {
32
- return se_PutEntitiesToGeneralCacheCommand(input, context);
33
- }
34
- deserialize(output, context) {
35
- return de_PutEntitiesToGeneralCacheCommand(output, context);
36
- }
5
+ export class PutEntitiesToGeneralCacheCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WimCache", "PutEntitiesToGeneralCache", {})
12
+ .n("WimCacheClient", "PutEntitiesToGeneralCacheCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_PutEntitiesToGeneralCacheCommand)
15
+ .de(de_PutEntitiesToGeneralCacheCommand)
16
+ .build() {
37
17
  }
@@ -1,37 +1,17 @@
1
1
  import { de_SearchEntitiesByListParamsCommand, se_SearchEntitiesByListParamsCommand, } from "../protocols/Aws_restJson1";
2
2
  import { getSerdePlugin } from "@smithy/middleware-serde";
3
3
  import { Command as $Command } from "@smithy/smithy-client";
4
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
4
  export { $Command };
6
- export class SearchEntitiesByListParamsCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
- resolveMiddleware(clientStack, configuration, options) {
12
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
13
- const stack = clientStack.concat(this.middlewareStack);
14
- const { logger } = configuration;
15
- const clientName = "WimCacheClient";
16
- const commandName = "SearchEntitiesByListParamsCommand";
17
- const handlerExecutionContext = {
18
- logger,
19
- clientName,
20
- commandName,
21
- inputFilterSensitiveLog: (_) => _,
22
- outputFilterSensitiveLog: (_) => _,
23
- [SMITHY_CONTEXT_KEY]: {
24
- service: "WimCache",
25
- operation: "SearchEntitiesByListParams",
26
- },
27
- };
28
- const { requestHandler } = configuration;
29
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
30
- }
31
- serialize(input, context) {
32
- return se_SearchEntitiesByListParamsCommand(input, context);
33
- }
34
- deserialize(output, context) {
35
- return de_SearchEntitiesByListParamsCommand(output, context);
36
- }
5
+ export class SearchEntitiesByListParamsCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WimCache", "SearchEntitiesByListParams", {})
12
+ .n("WimCacheClient", "SearchEntitiesByListParamsCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_SearchEntitiesByListParamsCommand)
15
+ .de(de_SearchEntitiesByListParamsCommand)
16
+ .build() {
37
17
  }
@@ -1,37 +1,17 @@
1
1
  import { de_SearchEntitiesByParamsCommand, se_SearchEntitiesByParamsCommand, } from "../protocols/Aws_restJson1";
2
2
  import { getSerdePlugin } from "@smithy/middleware-serde";
3
3
  import { Command as $Command } from "@smithy/smithy-client";
4
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
4
  export { $Command };
6
- export class SearchEntitiesByParamsCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
- resolveMiddleware(clientStack, configuration, options) {
12
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
13
- const stack = clientStack.concat(this.middlewareStack);
14
- const { logger } = configuration;
15
- const clientName = "WimCacheClient";
16
- const commandName = "SearchEntitiesByParamsCommand";
17
- const handlerExecutionContext = {
18
- logger,
19
- clientName,
20
- commandName,
21
- inputFilterSensitiveLog: (_) => _,
22
- outputFilterSensitiveLog: (_) => _,
23
- [SMITHY_CONTEXT_KEY]: {
24
- service: "WimCache",
25
- operation: "SearchEntitiesByParams",
26
- },
27
- };
28
- const { requestHandler } = configuration;
29
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
30
- }
31
- serialize(input, context) {
32
- return se_SearchEntitiesByParamsCommand(input, context);
33
- }
34
- deserialize(output, context) {
35
- return de_SearchEntitiesByParamsCommand(output, context);
36
- }
5
+ export class SearchEntitiesByParamsCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WimCache", "SearchEntitiesByParams", {})
12
+ .n("WimCacheClient", "SearchEntitiesByParamsCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_SearchEntitiesByParamsCommand)
15
+ .de(de_SearchEntitiesByParamsCommand)
16
+ .build() {
37
17
  }
@@ -1,37 +1,17 @@
1
1
  import { de_SyncCacheCommand, se_SyncCacheCommand, } from "../protocols/Aws_restJson1";
2
2
  import { getSerdePlugin } from "@smithy/middleware-serde";
3
3
  import { Command as $Command } from "@smithy/smithy-client";
4
- import { SMITHY_CONTEXT_KEY, } from "@smithy/types";
5
4
  export { $Command };
6
- export class SyncCacheCommand extends $Command {
7
- constructor(input) {
8
- super();
9
- this.input = input;
10
- }
11
- resolveMiddleware(clientStack, configuration, options) {
12
- this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
13
- const stack = clientStack.concat(this.middlewareStack);
14
- const { logger } = configuration;
15
- const clientName = "WimCacheClient";
16
- const commandName = "SyncCacheCommand";
17
- const handlerExecutionContext = {
18
- logger,
19
- clientName,
20
- commandName,
21
- inputFilterSensitiveLog: (_) => _,
22
- outputFilterSensitiveLog: (_) => _,
23
- [SMITHY_CONTEXT_KEY]: {
24
- service: "WimCache",
25
- operation: "SyncCache",
26
- },
27
- };
28
- const { requestHandler } = configuration;
29
- return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
30
- }
31
- serialize(input, context) {
32
- return se_SyncCacheCommand(input, context);
33
- }
34
- deserialize(output, context) {
35
- return de_SyncCacheCommand(output, context);
36
- }
5
+ export class SyncCacheCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WimCache", "SyncCache", {})
12
+ .n("WimCacheClient", "SyncCacheCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_SyncCacheCommand)
15
+ .de(de_SyncCacheCommand)
16
+ .build() {
37
17
  }
@@ -0,0 +1,17 @@
1
+ import { de_UpdateEntitiesWeightCommand, se_UpdateEntitiesWeightCommand, } from "../protocols/Aws_restJson1";
2
+ import { getSerdePlugin } from "@smithy/middleware-serde";
3
+ import { Command as $Command } from "@smithy/smithy-client";
4
+ export { $Command };
5
+ export class UpdateEntitiesWeightCommand extends $Command.classBuilder()
6
+ .m(function (Command, cs, config, o) {
7
+ return [
8
+ getSerdePlugin(config, this.serialize, this.deserialize),
9
+ ];
10
+ })
11
+ .s("WimCache", "UpdateEntitiesWeight", {})
12
+ .n("WimCacheClient", "UpdateEntitiesWeightCommand")
13
+ .f(void 0, void 0)
14
+ .ser(se_UpdateEntitiesWeightCommand)
15
+ .de(de_UpdateEntitiesWeightCommand)
16
+ .build() {
17
+ }
@@ -4,3 +4,4 @@ export * from "./PutEntitiesToGeneralCacheCommand";
4
4
  export * from "./SearchEntitiesByListParamsCommand";
5
5
  export * from "./SearchEntitiesByParamsCommand";
6
6
  export * from "./SyncCacheCommand";
7
+ export * from "./UpdateEntitiesWeightCommand";
@@ -1,13 +1,25 @@
1
1
  import { WimCacheServiceException as __BaseException } from "./WimCacheServiceException";
2
2
  export class ValidationException extends __BaseException {
3
+ name = "ValidationException";
4
+ $fault = "client";
3
5
  constructor(opts) {
4
6
  super({
5
7
  name: "ValidationException",
6
8
  $fault: "client",
7
9
  ...opts
8
10
  });
9
- this.name = "ValidationException";
10
- this.$fault = "client";
11
11
  Object.setPrototypeOf(this, ValidationException.prototype);
12
12
  }
13
13
  }
14
+ export class ForbiddenException extends __BaseException {
15
+ name = "ForbiddenException";
16
+ $fault = "client";
17
+ constructor(opts) {
18
+ super({
19
+ name: "ForbiddenException",
20
+ $fault: "client",
21
+ ...opts
22
+ });
23
+ Object.setPrototypeOf(this, ForbiddenException.prototype);
24
+ }
25
+ }