@aws-sdk/client-kendra-ranking 3.247.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +207 -0
  3. package/dist-cjs/KendraRanking.js +142 -0
  4. package/dist-cjs/KendraRankingClient.js +40 -0
  5. package/dist-cjs/commands/CreateRescoreExecutionPlanCommand.js +45 -0
  6. package/dist-cjs/commands/DeleteRescoreExecutionPlanCommand.js +45 -0
  7. package/dist-cjs/commands/DescribeRescoreExecutionPlanCommand.js +45 -0
  8. package/dist-cjs/commands/ListRescoreExecutionPlansCommand.js +45 -0
  9. package/dist-cjs/commands/ListTagsForResourceCommand.js +45 -0
  10. package/dist-cjs/commands/RescoreCommand.js +45 -0
  11. package/dist-cjs/commands/TagResourceCommand.js +45 -0
  12. package/dist-cjs/commands/UntagResourceCommand.js +45 -0
  13. package/dist-cjs/commands/UpdateRescoreExecutionPlanCommand.js +45 -0
  14. package/dist-cjs/commands/index.js +12 -0
  15. package/dist-cjs/endpoint/EndpointParameters.js +11 -0
  16. package/dist-cjs/endpoint/endpointResolver.js +12 -0
  17. package/dist-cjs/endpoint/ruleset.js +7 -0
  18. package/dist-cjs/index.js +11 -0
  19. package/dist-cjs/models/KendraRankingServiceException.js +11 -0
  20. package/dist-cjs/models/index.js +4 -0
  21. package/dist-cjs/models/models_0.js +208 -0
  22. package/dist-cjs/pagination/Interfaces.js +2 -0
  23. package/dist-cjs/pagination/ListRescoreExecutionPlansPaginator.js +36 -0
  24. package/dist-cjs/pagination/index.js +5 -0
  25. package/dist-cjs/protocols/Aws_json1_0.js +928 -0
  26. package/dist-cjs/runtimeConfig.browser.js +42 -0
  27. package/dist-cjs/runtimeConfig.js +51 -0
  28. package/dist-cjs/runtimeConfig.native.js +15 -0
  29. package/dist-cjs/runtimeConfig.shared.js +18 -0
  30. package/dist-es/KendraRanking.js +138 -0
  31. package/dist-es/KendraRankingClient.js +36 -0
  32. package/dist-es/commands/CreateRescoreExecutionPlanCommand.js +41 -0
  33. package/dist-es/commands/DeleteRescoreExecutionPlanCommand.js +41 -0
  34. package/dist-es/commands/DescribeRescoreExecutionPlanCommand.js +41 -0
  35. package/dist-es/commands/ListRescoreExecutionPlansCommand.js +41 -0
  36. package/dist-es/commands/ListTagsForResourceCommand.js +41 -0
  37. package/dist-es/commands/RescoreCommand.js +41 -0
  38. package/dist-es/commands/TagResourceCommand.js +41 -0
  39. package/dist-es/commands/UntagResourceCommand.js +41 -0
  40. package/dist-es/commands/UpdateRescoreExecutionPlanCommand.js +41 -0
  41. package/dist-es/commands/index.js +9 -0
  42. package/dist-es/endpoint/EndpointParameters.js +7 -0
  43. package/dist-es/endpoint/endpointResolver.js +8 -0
  44. package/dist-es/endpoint/ruleset.js +4 -0
  45. package/dist-es/index.js +6 -0
  46. package/dist-es/models/KendraRankingServiceException.js +7 -0
  47. package/dist-es/models/index.js +1 -0
  48. package/dist-es/models/models_0.js +176 -0
  49. package/dist-es/pagination/Interfaces.js +1 -0
  50. package/dist-es/pagination/ListRescoreExecutionPlansPaginator.js +32 -0
  51. package/dist-es/pagination/index.js +2 -0
  52. package/dist-es/protocols/Aws_json1_0.js +907 -0
  53. package/dist-es/runtimeConfig.browser.js +37 -0
  54. package/dist-es/runtimeConfig.js +46 -0
  55. package/dist-es/runtimeConfig.native.js +11 -0
  56. package/dist-es/runtimeConfig.shared.js +14 -0
  57. package/dist-types/KendraRanking.d.ts +104 -0
  58. package/dist-types/KendraRankingClient.d.ts +152 -0
  59. package/dist-types/commands/CreateRescoreExecutionPlanCommand.d.ts +46 -0
  60. package/dist-types/commands/DeleteRescoreExecutionPlanCommand.d.ts +39 -0
  61. package/dist-types/commands/DescribeRescoreExecutionPlanCommand.d.ts +39 -0
  62. package/dist-types/commands/ListRescoreExecutionPlansCommand.d.ts +39 -0
  63. package/dist-types/commands/ListTagsForResourceCommand.d.ts +39 -0
  64. package/dist-types/commands/RescoreCommand.d.ts +40 -0
  65. package/dist-types/commands/TagResourceCommand.d.ts +41 -0
  66. package/dist-types/commands/UntagResourceCommand.d.ts +40 -0
  67. package/dist-types/commands/UpdateRescoreExecutionPlanCommand.d.ts +42 -0
  68. package/dist-types/commands/index.d.ts +9 -0
  69. package/dist-types/endpoint/EndpointParameters.d.ts +17 -0
  70. package/dist-types/endpoint/endpointResolver.d.ts +5 -0
  71. package/dist-types/endpoint/ruleset.d.ts +2 -0
  72. package/dist-types/index.d.ts +6 -0
  73. package/dist-types/models/KendraRankingServiceException.d.ts +10 -0
  74. package/dist-types/models/index.d.ts +1 -0
  75. package/dist-types/models/models_0.d.ts +600 -0
  76. package/dist-types/pagination/Interfaces.d.ts +6 -0
  77. package/dist-types/pagination/ListRescoreExecutionPlansPaginator.d.ts +4 -0
  78. package/dist-types/pagination/index.d.ts +2 -0
  79. package/dist-types/protocols/Aws_json1_0.d.ts +29 -0
  80. package/dist-types/runtimeConfig.browser.d.ts +42 -0
  81. package/dist-types/runtimeConfig.d.ts +42 -0
  82. package/dist-types/runtimeConfig.native.d.ts +41 -0
  83. package/dist-types/runtimeConfig.shared.d.ts +16 -0
  84. package/dist-types/ts3.4/KendraRanking.d.ts +157 -0
  85. package/dist-types/ts3.4/KendraRankingClient.d.ts +166 -0
  86. package/dist-types/ts3.4/commands/CreateRescoreExecutionPlanCommand.d.ts +41 -0
  87. package/dist-types/ts3.4/commands/DeleteRescoreExecutionPlanCommand.d.ts +37 -0
  88. package/dist-types/ts3.4/commands/DescribeRescoreExecutionPlanCommand.d.ts +41 -0
  89. package/dist-types/ts3.4/commands/ListRescoreExecutionPlansCommand.d.ts +41 -0
  90. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +38 -0
  91. package/dist-types/ts3.4/commands/RescoreCommand.d.ts +32 -0
  92. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +34 -0
  93. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +37 -0
  94. package/dist-types/ts3.4/commands/UpdateRescoreExecutionPlanCommand.d.ts +37 -0
  95. package/dist-types/ts3.4/commands/index.d.ts +9 -0
  96. package/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +32 -0
  97. package/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
  98. package/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
  99. package/dist-types/ts3.4/index.d.ts +6 -0
  100. package/dist-types/ts3.4/models/KendraRankingServiceException.d.ts +7 -0
  101. package/dist-types/ts3.4/models/index.d.ts +1 -0
  102. package/dist-types/ts3.4/models/models_0.d.ts +224 -0
  103. package/dist-types/ts3.4/pagination/Interfaces.d.ts +7 -0
  104. package/dist-types/ts3.4/pagination/ListRescoreExecutionPlansPaginator.d.ts +11 -0
  105. package/dist-types/ts3.4/pagination/index.d.ts +2 -0
  106. package/dist-types/ts3.4/protocols/Aws_json1_0.d.ts +113 -0
  107. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +91 -0
  108. package/dist-types/ts3.4/runtimeConfig.d.ts +91 -0
  109. package/dist-types/ts3.4/runtimeConfig.native.d.ts +80 -0
  110. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +16 -0
  111. package/package.json +105 -0
@@ -0,0 +1,41 @@
1
+ import { getEndpointPlugin } from "@aws-sdk/middleware-endpoint";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { UpdateRescoreExecutionPlanRequestFilterSensitiveLog, } from "../models/models_0";
5
+ import { deserializeAws_json1_0UpdateRescoreExecutionPlanCommand, serializeAws_json1_0UpdateRescoreExecutionPlanCommand, } from "../protocols/Aws_json1_0";
6
+ export class UpdateRescoreExecutionPlanCommand extends $Command {
7
+ constructor(input) {
8
+ super();
9
+ this.input = input;
10
+ }
11
+ static getEndpointParameterInstructions() {
12
+ return {
13
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
14
+ Endpoint: { type: "builtInParams", name: "endpoint" },
15
+ Region: { type: "builtInParams", name: "region" },
16
+ };
17
+ }
18
+ resolveMiddleware(clientStack, configuration, options) {
19
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
20
+ this.middlewareStack.use(getEndpointPlugin(configuration, UpdateRescoreExecutionPlanCommand.getEndpointParameterInstructions()));
21
+ const stack = clientStack.concat(this.middlewareStack);
22
+ const { logger } = configuration;
23
+ const clientName = "KendraRankingClient";
24
+ const commandName = "UpdateRescoreExecutionPlanCommand";
25
+ const handlerExecutionContext = {
26
+ logger,
27
+ clientName,
28
+ commandName,
29
+ inputFilterSensitiveLog: UpdateRescoreExecutionPlanRequestFilterSensitiveLog,
30
+ outputFilterSensitiveLog: (output) => output,
31
+ };
32
+ const { requestHandler } = configuration;
33
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
34
+ }
35
+ serialize(input, context) {
36
+ return serializeAws_json1_0UpdateRescoreExecutionPlanCommand(input, context);
37
+ }
38
+ deserialize(output, context) {
39
+ return deserializeAws_json1_0UpdateRescoreExecutionPlanCommand(output, context);
40
+ }
41
+ }
@@ -0,0 +1,9 @@
1
+ export * from "./CreateRescoreExecutionPlanCommand";
2
+ export * from "./DeleteRescoreExecutionPlanCommand";
3
+ export * from "./DescribeRescoreExecutionPlanCommand";
4
+ export * from "./ListRescoreExecutionPlansCommand";
5
+ export * from "./ListTagsForResourceCommand";
6
+ export * from "./RescoreCommand";
7
+ export * from "./TagResourceCommand";
8
+ export * from "./UntagResourceCommand";
9
+ export * from "./UpdateRescoreExecutionPlanCommand";
@@ -0,0 +1,7 @@
1
+ export const resolveClientEndpointParameters = (options) => {
2
+ return {
3
+ ...options,
4
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
5
+ defaultSigningName: "kendra-ranking",
6
+ };
7
+ };
@@ -0,0 +1,8 @@
1
+ import { resolveEndpoint } from "@aws-sdk/util-endpoints";
2
+ import { ruleSet } from "./ruleset";
3
+ export const defaultEndpointResolver = (endpointParams, context = {}) => {
4
+ return resolveEndpoint(ruleSet, {
5
+ endpointParams: endpointParams,
6
+ logger: context.logger,
7
+ });
8
+ };
@@ -0,0 +1,4 @@
1
+ const p = "argv", q = "ref";
2
+ const a = true, b = false, c = "String", d = "PartitionResult", e = "tree", f = "booleanEquals", g = "error", h = "endpoint", i = "getAttr", j = { [q]: "Endpoint" }, k = {}, l = { [q]: d }, m = { [g]: "FIPS is enabled but this partition does not support FIPS", "type": g }, n = [{ "fn": f, [p]: [{ [q]: "UseFIPS" }, true] }], o = [{ "fn": f, [p]: [true, { "fn": i, [p]: [l, "supportsFIPS"] }] }];
3
+ const _data = { version: "1.0", parameters: { Region: { required: a, type: c }, UseFIPS: { required: a, default: b, type: "Boolean" }, Endpoint: { required: b, type: c } }, rules: [{ conditions: [{ fn: "aws.partition", [p]: [{ [q]: "Region" }], assign: d }], type: e, rules: [{ conditions: [{ fn: "isSet", [p]: [j] }], type: e, rules: [{ conditions: n, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: g }, { endpoint: { url: j, properties: k, headers: k }, type: h }] }, { type: e, rules: [{ conditions: [{ fn: f, [p]: [a, { fn: i, [p]: [l, "supportsDualStack"] }] }], type: e, rules: [{ conditions: n, type: e, rules: [{ conditions: o, type: e, rules: [{ endpoint: { url: "https://kendra-ranking-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: h }] }, m] }, { endpoint: { url: "https://kendra-ranking.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: k, headers: k }, type: h }] }, { type: e, rules: [{ conditions: n, type: e, rules: [{ conditions: o, type: e, rules: [{ endpoint: { url: "https://kendra-ranking-fips.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: h }] }, m] }, { endpoint: { url: "https://kendra-ranking.{Region}.{PartitionResult#dnsSuffix}", properties: k, headers: k }, type: h }] }] }] }] };
4
+ export const ruleSet = _data;
@@ -0,0 +1,6 @@
1
+ export * from "./KendraRanking";
2
+ export * from "./KendraRankingClient";
3
+ export * from "./commands";
4
+ export * from "./models";
5
+ export * from "./pagination";
6
+ export { KendraRankingServiceException } from "./models/KendraRankingServiceException";
@@ -0,0 +1,7 @@
1
+ import { ServiceException as __ServiceException, } from "@aws-sdk/smithy-client";
2
+ export class KendraRankingServiceException extends __ServiceException {
3
+ constructor(options) {
4
+ super(options);
5
+ Object.setPrototypeOf(this, KendraRankingServiceException.prototype);
6
+ }
7
+ }
@@ -0,0 +1 @@
1
+ export * from "./models_0";
@@ -0,0 +1,176 @@
1
+ import { KendraRankingServiceException as __BaseException } from "./KendraRankingServiceException";
2
+ export class AccessDeniedException extends __BaseException {
3
+ constructor(opts) {
4
+ super({
5
+ name: "AccessDeniedException",
6
+ $fault: "client",
7
+ ...opts,
8
+ });
9
+ this.name = "AccessDeniedException";
10
+ this.$fault = "client";
11
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
12
+ this.Message = opts.Message;
13
+ }
14
+ }
15
+ export class ConflictException extends __BaseException {
16
+ constructor(opts) {
17
+ super({
18
+ name: "ConflictException",
19
+ $fault: "client",
20
+ ...opts,
21
+ });
22
+ this.name = "ConflictException";
23
+ this.$fault = "client";
24
+ Object.setPrototypeOf(this, ConflictException.prototype);
25
+ this.Message = opts.Message;
26
+ }
27
+ }
28
+ export class InternalServerException extends __BaseException {
29
+ constructor(opts) {
30
+ super({
31
+ name: "InternalServerException",
32
+ $fault: "server",
33
+ ...opts,
34
+ });
35
+ this.name = "InternalServerException";
36
+ this.$fault = "server";
37
+ Object.setPrototypeOf(this, InternalServerException.prototype);
38
+ this.Message = opts.Message;
39
+ }
40
+ }
41
+ export class ServiceQuotaExceededException extends __BaseException {
42
+ constructor(opts) {
43
+ super({
44
+ name: "ServiceQuotaExceededException",
45
+ $fault: "client",
46
+ ...opts,
47
+ });
48
+ this.name = "ServiceQuotaExceededException";
49
+ this.$fault = "client";
50
+ Object.setPrototypeOf(this, ServiceQuotaExceededException.prototype);
51
+ this.Message = opts.Message;
52
+ }
53
+ }
54
+ export class ThrottlingException extends __BaseException {
55
+ constructor(opts) {
56
+ super({
57
+ name: "ThrottlingException",
58
+ $fault: "client",
59
+ ...opts,
60
+ });
61
+ this.name = "ThrottlingException";
62
+ this.$fault = "client";
63
+ Object.setPrototypeOf(this, ThrottlingException.prototype);
64
+ this.Message = opts.Message;
65
+ }
66
+ }
67
+ export class ValidationException extends __BaseException {
68
+ constructor(opts) {
69
+ super({
70
+ name: "ValidationException",
71
+ $fault: "client",
72
+ ...opts,
73
+ });
74
+ this.name = "ValidationException";
75
+ this.$fault = "client";
76
+ Object.setPrototypeOf(this, ValidationException.prototype);
77
+ this.Message = opts.Message;
78
+ }
79
+ }
80
+ export class ResourceNotFoundException extends __BaseException {
81
+ constructor(opts) {
82
+ super({
83
+ name: "ResourceNotFoundException",
84
+ $fault: "client",
85
+ ...opts,
86
+ });
87
+ this.name = "ResourceNotFoundException";
88
+ this.$fault = "client";
89
+ Object.setPrototypeOf(this, ResourceNotFoundException.prototype);
90
+ this.Message = opts.Message;
91
+ }
92
+ }
93
+ export var RescoreExecutionPlanStatus;
94
+ (function (RescoreExecutionPlanStatus) {
95
+ RescoreExecutionPlanStatus["ACTIVE"] = "ACTIVE";
96
+ RescoreExecutionPlanStatus["CREATING"] = "CREATING";
97
+ RescoreExecutionPlanStatus["DELETING"] = "DELETING";
98
+ RescoreExecutionPlanStatus["FAILED"] = "FAILED";
99
+ RescoreExecutionPlanStatus["UPDATING"] = "UPDATING";
100
+ })(RescoreExecutionPlanStatus || (RescoreExecutionPlanStatus = {}));
101
+ export class ResourceUnavailableException extends __BaseException {
102
+ constructor(opts) {
103
+ super({
104
+ name: "ResourceUnavailableException",
105
+ $fault: "client",
106
+ ...opts,
107
+ });
108
+ this.name = "ResourceUnavailableException";
109
+ this.$fault = "client";
110
+ Object.setPrototypeOf(this, ResourceUnavailableException.prototype);
111
+ this.Message = opts.Message;
112
+ }
113
+ }
114
+ export const CapacityUnitsConfigurationFilterSensitiveLog = (obj) => ({
115
+ ...obj,
116
+ });
117
+ export const TagFilterSensitiveLog = (obj) => ({
118
+ ...obj,
119
+ });
120
+ export const CreateRescoreExecutionPlanRequestFilterSensitiveLog = (obj) => ({
121
+ ...obj,
122
+ });
123
+ export const CreateRescoreExecutionPlanResponseFilterSensitiveLog = (obj) => ({
124
+ ...obj,
125
+ });
126
+ export const DeleteRescoreExecutionPlanRequestFilterSensitiveLog = (obj) => ({
127
+ ...obj,
128
+ });
129
+ export const DescribeRescoreExecutionPlanRequestFilterSensitiveLog = (obj) => ({
130
+ ...obj,
131
+ });
132
+ export const DescribeRescoreExecutionPlanResponseFilterSensitiveLog = (obj) => ({
133
+ ...obj,
134
+ });
135
+ export const ListRescoreExecutionPlansRequestFilterSensitiveLog = (obj) => ({
136
+ ...obj,
137
+ });
138
+ export const RescoreExecutionPlanSummaryFilterSensitiveLog = (obj) => ({
139
+ ...obj,
140
+ });
141
+ export const ListRescoreExecutionPlansResponseFilterSensitiveLog = (obj) => ({
142
+ ...obj,
143
+ });
144
+ export const ListTagsForResourceRequestFilterSensitiveLog = (obj) => ({
145
+ ...obj,
146
+ });
147
+ export const ListTagsForResourceResponseFilterSensitiveLog = (obj) => ({
148
+ ...obj,
149
+ });
150
+ export const DocumentFilterSensitiveLog = (obj) => ({
151
+ ...obj,
152
+ });
153
+ export const RescoreRequestFilterSensitiveLog = (obj) => ({
154
+ ...obj,
155
+ });
156
+ export const RescoreResultItemFilterSensitiveLog = (obj) => ({
157
+ ...obj,
158
+ });
159
+ export const RescoreResultFilterSensitiveLog = (obj) => ({
160
+ ...obj,
161
+ });
162
+ export const TagResourceRequestFilterSensitiveLog = (obj) => ({
163
+ ...obj,
164
+ });
165
+ export const TagResourceResponseFilterSensitiveLog = (obj) => ({
166
+ ...obj,
167
+ });
168
+ export const UntagResourceRequestFilterSensitiveLog = (obj) => ({
169
+ ...obj,
170
+ });
171
+ export const UntagResourceResponseFilterSensitiveLog = (obj) => ({
172
+ ...obj,
173
+ });
174
+ export const UpdateRescoreExecutionPlanRequestFilterSensitiveLog = (obj) => ({
175
+ ...obj,
176
+ });
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,32 @@
1
+ import { ListRescoreExecutionPlansCommand, } from "../commands/ListRescoreExecutionPlansCommand";
2
+ import { KendraRanking } from "../KendraRanking";
3
+ import { KendraRankingClient } from "../KendraRankingClient";
4
+ const makePagedClientRequest = async (client, input, ...args) => {
5
+ return await client.send(new ListRescoreExecutionPlansCommand(input), ...args);
6
+ };
7
+ const makePagedRequest = async (client, input, ...args) => {
8
+ return await client.listRescoreExecutionPlans(input, ...args);
9
+ };
10
+ export async function* paginateListRescoreExecutionPlans(config, input, ...additionalArguments) {
11
+ let token = config.startingToken || undefined;
12
+ let hasNext = true;
13
+ let page;
14
+ while (hasNext) {
15
+ input.NextToken = token;
16
+ input["MaxResults"] = config.pageSize;
17
+ if (config.client instanceof KendraRanking) {
18
+ page = await makePagedRequest(config.client, input, ...additionalArguments);
19
+ }
20
+ else if (config.client instanceof KendraRankingClient) {
21
+ page = await makePagedClientRequest(config.client, input, ...additionalArguments);
22
+ }
23
+ else {
24
+ throw new Error("Invalid client, expected KendraRanking | KendraRankingClient");
25
+ }
26
+ yield page;
27
+ const prevToken = token;
28
+ token = page.NextToken;
29
+ hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
30
+ }
31
+ return undefined;
32
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./Interfaces";
2
+ export * from "./ListRescoreExecutionPlansPaginator";