@aws-sdk/client-mturk 3.477.0 → 3.478.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 (41) hide show
  1. package/dist-cjs/pagination/ListAssignmentsForHITPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListBonusPaymentsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListHITsForQualificationTypePaginator.js +2 -24
  4. package/dist-cjs/pagination/ListHITsPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListQualificationRequestsPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListQualificationTypesPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListReviewPolicyResultsForHITPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListReviewableHITsPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListWorkerBlocksPaginator.js +2 -24
  10. package/dist-cjs/pagination/ListWorkersWithQualificationTypePaginator.js +2 -24
  11. package/dist-es/pagination/ListAssignmentsForHITPaginator.js +2 -23
  12. package/dist-es/pagination/ListBonusPaymentsPaginator.js +2 -23
  13. package/dist-es/pagination/ListHITsForQualificationTypePaginator.js +2 -23
  14. package/dist-es/pagination/ListHITsPaginator.js +2 -23
  15. package/dist-es/pagination/ListQualificationRequestsPaginator.js +2 -23
  16. package/dist-es/pagination/ListQualificationTypesPaginator.js +2 -23
  17. package/dist-es/pagination/ListReviewPolicyResultsForHITPaginator.js +2 -23
  18. package/dist-es/pagination/ListReviewableHITsPaginator.js +2 -23
  19. package/dist-es/pagination/ListWorkerBlocksPaginator.js +2 -23
  20. package/dist-es/pagination/ListWorkersWithQualificationTypePaginator.js +2 -23
  21. package/dist-types/pagination/ListAssignmentsForHITPaginator.d.ts +1 -1
  22. package/dist-types/pagination/ListBonusPaymentsPaginator.d.ts +1 -1
  23. package/dist-types/pagination/ListHITsForQualificationTypePaginator.d.ts +1 -1
  24. package/dist-types/pagination/ListHITsPaginator.d.ts +1 -1
  25. package/dist-types/pagination/ListQualificationRequestsPaginator.d.ts +1 -1
  26. package/dist-types/pagination/ListQualificationTypesPaginator.d.ts +1 -1
  27. package/dist-types/pagination/ListReviewPolicyResultsForHITPaginator.d.ts +1 -1
  28. package/dist-types/pagination/ListReviewableHITsPaginator.d.ts +1 -1
  29. package/dist-types/pagination/ListWorkerBlocksPaginator.d.ts +1 -1
  30. package/dist-types/pagination/ListWorkersWithQualificationTypePaginator.d.ts +1 -1
  31. package/dist-types/ts3.4/pagination/ListAssignmentsForHITPaginator.d.ts +3 -3
  32. package/dist-types/ts3.4/pagination/ListBonusPaymentsPaginator.d.ts +3 -3
  33. package/dist-types/ts3.4/pagination/ListHITsForQualificationTypePaginator.d.ts +3 -3
  34. package/dist-types/ts3.4/pagination/ListHITsPaginator.d.ts +3 -3
  35. package/dist-types/ts3.4/pagination/ListQualificationRequestsPaginator.d.ts +3 -3
  36. package/dist-types/ts3.4/pagination/ListQualificationTypesPaginator.d.ts +3 -3
  37. package/dist-types/ts3.4/pagination/ListReviewPolicyResultsForHITPaginator.d.ts +3 -3
  38. package/dist-types/ts3.4/pagination/ListReviewableHITsPaginator.d.ts +3 -3
  39. package/dist-types/ts3.4/pagination/ListWorkerBlocksPaginator.d.ts +3 -3
  40. package/dist-types/ts3.4/pagination/ListWorkersWithQualificationTypePaginator.d.ts +3 -3
  41. package/package.json +6 -5
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListAssignmentsForHIT = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListAssignmentsForHITCommand_1 = require("../commands/ListAssignmentsForHITCommand");
5
6
  const MTurkClient_1 = require("../MTurkClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListAssignmentsForHITCommand_1.ListAssignmentsForHITCommand(input), ...args);
8
- };
9
- async function* paginateListAssignmentsForHIT(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MTurkClient_1.MTurkClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MTurk | MTurkClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListAssignmentsForHIT = paginateListAssignmentsForHIT;
7
+ exports.paginateListAssignmentsForHIT = (0, core_1.createPaginator)(MTurkClient_1.MTurkClient, ListAssignmentsForHITCommand_1.ListAssignmentsForHITCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListBonusPayments = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListBonusPaymentsCommand_1 = require("../commands/ListBonusPaymentsCommand");
5
6
  const MTurkClient_1 = require("../MTurkClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListBonusPaymentsCommand_1.ListBonusPaymentsCommand(input), ...args);
8
- };
9
- async function* paginateListBonusPayments(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MTurkClient_1.MTurkClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MTurk | MTurkClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListBonusPayments = paginateListBonusPayments;
7
+ exports.paginateListBonusPayments = (0, core_1.createPaginator)(MTurkClient_1.MTurkClient, ListBonusPaymentsCommand_1.ListBonusPaymentsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListHITsForQualificationType = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListHITsForQualificationTypeCommand_1 = require("../commands/ListHITsForQualificationTypeCommand");
5
6
  const MTurkClient_1 = require("../MTurkClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListHITsForQualificationTypeCommand_1.ListHITsForQualificationTypeCommand(input), ...args);
8
- };
9
- async function* paginateListHITsForQualificationType(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MTurkClient_1.MTurkClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MTurk | MTurkClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListHITsForQualificationType = paginateListHITsForQualificationType;
7
+ exports.paginateListHITsForQualificationType = (0, core_1.createPaginator)(MTurkClient_1.MTurkClient, ListHITsForQualificationTypeCommand_1.ListHITsForQualificationTypeCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListHITs = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListHITsCommand_1 = require("../commands/ListHITsCommand");
5
6
  const MTurkClient_1 = require("../MTurkClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListHITsCommand_1.ListHITsCommand(input), ...args);
8
- };
9
- async function* paginateListHITs(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MTurkClient_1.MTurkClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MTurk | MTurkClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListHITs = paginateListHITs;
7
+ exports.paginateListHITs = (0, core_1.createPaginator)(MTurkClient_1.MTurkClient, ListHITsCommand_1.ListHITsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListQualificationRequests = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListQualificationRequestsCommand_1 = require("../commands/ListQualificationRequestsCommand");
5
6
  const MTurkClient_1 = require("../MTurkClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListQualificationRequestsCommand_1.ListQualificationRequestsCommand(input), ...args);
8
- };
9
- async function* paginateListQualificationRequests(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MTurkClient_1.MTurkClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MTurk | MTurkClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListQualificationRequests = paginateListQualificationRequests;
7
+ exports.paginateListQualificationRequests = (0, core_1.createPaginator)(MTurkClient_1.MTurkClient, ListQualificationRequestsCommand_1.ListQualificationRequestsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListQualificationTypes = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListQualificationTypesCommand_1 = require("../commands/ListQualificationTypesCommand");
5
6
  const MTurkClient_1 = require("../MTurkClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListQualificationTypesCommand_1.ListQualificationTypesCommand(input), ...args);
8
- };
9
- async function* paginateListQualificationTypes(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MTurkClient_1.MTurkClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MTurk | MTurkClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListQualificationTypes = paginateListQualificationTypes;
7
+ exports.paginateListQualificationTypes = (0, core_1.createPaginator)(MTurkClient_1.MTurkClient, ListQualificationTypesCommand_1.ListQualificationTypesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListReviewPolicyResultsForHIT = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListReviewPolicyResultsForHITCommand_1 = require("../commands/ListReviewPolicyResultsForHITCommand");
5
6
  const MTurkClient_1 = require("../MTurkClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListReviewPolicyResultsForHITCommand_1.ListReviewPolicyResultsForHITCommand(input), ...args);
8
- };
9
- async function* paginateListReviewPolicyResultsForHIT(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MTurkClient_1.MTurkClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MTurk | MTurkClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListReviewPolicyResultsForHIT = paginateListReviewPolicyResultsForHIT;
7
+ exports.paginateListReviewPolicyResultsForHIT = (0, core_1.createPaginator)(MTurkClient_1.MTurkClient, ListReviewPolicyResultsForHITCommand_1.ListReviewPolicyResultsForHITCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListReviewableHITs = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListReviewableHITsCommand_1 = require("../commands/ListReviewableHITsCommand");
5
6
  const MTurkClient_1 = require("../MTurkClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListReviewableHITsCommand_1.ListReviewableHITsCommand(input), ...args);
8
- };
9
- async function* paginateListReviewableHITs(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MTurkClient_1.MTurkClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MTurk | MTurkClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListReviewableHITs = paginateListReviewableHITs;
7
+ exports.paginateListReviewableHITs = (0, core_1.createPaginator)(MTurkClient_1.MTurkClient, ListReviewableHITsCommand_1.ListReviewableHITsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListWorkerBlocks = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListWorkerBlocksCommand_1 = require("../commands/ListWorkerBlocksCommand");
5
6
  const MTurkClient_1 = require("../MTurkClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListWorkerBlocksCommand_1.ListWorkerBlocksCommand(input), ...args);
8
- };
9
- async function* paginateListWorkerBlocks(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MTurkClient_1.MTurkClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MTurk | MTurkClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListWorkerBlocks = paginateListWorkerBlocks;
7
+ exports.paginateListWorkerBlocks = (0, core_1.createPaginator)(MTurkClient_1.MTurkClient, ListWorkerBlocksCommand_1.ListWorkerBlocksCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,29 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.paginateListWorkersWithQualificationType = void 0;
4
+ const core_1 = require("@smithy/core");
4
5
  const ListWorkersWithQualificationTypeCommand_1 = require("../commands/ListWorkersWithQualificationTypeCommand");
5
6
  const MTurkClient_1 = require("../MTurkClient");
6
- const makePagedClientRequest = async (client, input, ...args) => {
7
- return await client.send(new ListWorkersWithQualificationTypeCommand_1.ListWorkersWithQualificationTypeCommand(input), ...args);
8
- };
9
- async function* paginateListWorkersWithQualificationType(config, input, ...additionalArguments) {
10
- let token = config.startingToken || undefined;
11
- let hasNext = true;
12
- let page;
13
- while (hasNext) {
14
- input.NextToken = token;
15
- input["MaxResults"] = config.pageSize;
16
- if (config.client instanceof MTurkClient_1.MTurkClient) {
17
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
18
- }
19
- else {
20
- throw new Error("Invalid client, expected MTurk | MTurkClient");
21
- }
22
- yield page;
23
- const prevToken = token;
24
- token = page.NextToken;
25
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
26
- }
27
- return undefined;
28
- }
29
- exports.paginateListWorkersWithQualificationType = paginateListWorkersWithQualificationType;
7
+ exports.paginateListWorkersWithQualificationType = (0, core_1.createPaginator)(MTurkClient_1.MTurkClient, ListWorkersWithQualificationTypeCommand_1.ListWorkersWithQualificationTypeCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListAssignmentsForHITCommand, } from "../commands/ListAssignmentsForHITCommand";
2
3
  import { MTurkClient } from "../MTurkClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListAssignmentsForHITCommand(input), ...args);
5
- };
6
- export async function* paginateListAssignmentsForHIT(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MTurkClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MTurk | MTurkClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListAssignmentsForHIT = createPaginator(MTurkClient, ListAssignmentsForHITCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListBonusPaymentsCommand, } from "../commands/ListBonusPaymentsCommand";
2
3
  import { MTurkClient } from "../MTurkClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListBonusPaymentsCommand(input), ...args);
5
- };
6
- export async function* paginateListBonusPayments(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MTurkClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MTurk | MTurkClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListBonusPayments = createPaginator(MTurkClient, ListBonusPaymentsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListHITsForQualificationTypeCommand, } from "../commands/ListHITsForQualificationTypeCommand";
2
3
  import { MTurkClient } from "../MTurkClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListHITsForQualificationTypeCommand(input), ...args);
5
- };
6
- export async function* paginateListHITsForQualificationType(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MTurkClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MTurk | MTurkClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListHITsForQualificationType = createPaginator(MTurkClient, ListHITsForQualificationTypeCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListHITsCommand } from "../commands/ListHITsCommand";
2
3
  import { MTurkClient } from "../MTurkClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListHITsCommand(input), ...args);
5
- };
6
- export async function* paginateListHITs(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MTurkClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MTurk | MTurkClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListHITs = createPaginator(MTurkClient, ListHITsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListQualificationRequestsCommand, } from "../commands/ListQualificationRequestsCommand";
2
3
  import { MTurkClient } from "../MTurkClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListQualificationRequestsCommand(input), ...args);
5
- };
6
- export async function* paginateListQualificationRequests(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MTurkClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MTurk | MTurkClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListQualificationRequests = createPaginator(MTurkClient, ListQualificationRequestsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListQualificationTypesCommand, } from "../commands/ListQualificationTypesCommand";
2
3
  import { MTurkClient } from "../MTurkClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListQualificationTypesCommand(input), ...args);
5
- };
6
- export async function* paginateListQualificationTypes(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MTurkClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MTurk | MTurkClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListQualificationTypes = createPaginator(MTurkClient, ListQualificationTypesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListReviewPolicyResultsForHITCommand, } from "../commands/ListReviewPolicyResultsForHITCommand";
2
3
  import { MTurkClient } from "../MTurkClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListReviewPolicyResultsForHITCommand(input), ...args);
5
- };
6
- export async function* paginateListReviewPolicyResultsForHIT(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MTurkClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MTurk | MTurkClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListReviewPolicyResultsForHIT = createPaginator(MTurkClient, ListReviewPolicyResultsForHITCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListReviewableHITsCommand, } from "../commands/ListReviewableHITsCommand";
2
3
  import { MTurkClient } from "../MTurkClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListReviewableHITsCommand(input), ...args);
5
- };
6
- export async function* paginateListReviewableHITs(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MTurkClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MTurk | MTurkClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListReviewableHITs = createPaginator(MTurkClient, ListReviewableHITsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListWorkerBlocksCommand, } from "../commands/ListWorkerBlocksCommand";
2
3
  import { MTurkClient } from "../MTurkClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListWorkerBlocksCommand(input), ...args);
5
- };
6
- export async function* paginateListWorkerBlocks(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MTurkClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MTurk | MTurkClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListWorkerBlocks = createPaginator(MTurkClient, ListWorkerBlocksCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListWorkersWithQualificationTypeCommand, } from "../commands/ListWorkersWithQualificationTypeCommand";
2
3
  import { MTurkClient } from "../MTurkClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListWorkersWithQualificationTypeCommand(input), ...args);
5
- };
6
- export async function* paginateListWorkersWithQualificationType(config, input, ...additionalArguments) {
7
- let token = config.startingToken || undefined;
8
- let hasNext = true;
9
- let page;
10
- while (hasNext) {
11
- input.NextToken = token;
12
- input["MaxResults"] = config.pageSize;
13
- if (config.client instanceof MTurkClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected MTurk | MTurkClient");
18
- }
19
- yield page;
20
- const prevToken = token;
21
- token = page.NextToken;
22
- hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
23
- }
24
- return undefined;
25
- }
4
+ export const paginateListWorkersWithQualificationType = createPaginator(MTurkClient, ListWorkersWithQualificationTypeCommand, "NextToken", "NextToken", "MaxResults");
@@ -4,4 +4,4 @@ import { MTurkPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListAssignmentsForHIT(config: MTurkPaginationConfiguration, input: ListAssignmentsForHITCommandInput, ...additionalArguments: any): Paginator<ListAssignmentsForHITCommandOutput>;
7
+ export declare const paginateListAssignmentsForHIT: (config: MTurkPaginationConfiguration, input: ListAssignmentsForHITCommandInput, ...rest: any[]) => Paginator<ListAssignmentsForHITCommandOutput>;
@@ -4,4 +4,4 @@ import { MTurkPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListBonusPayments(config: MTurkPaginationConfiguration, input: ListBonusPaymentsCommandInput, ...additionalArguments: any): Paginator<ListBonusPaymentsCommandOutput>;
7
+ export declare const paginateListBonusPayments: (config: MTurkPaginationConfiguration, input: ListBonusPaymentsCommandInput, ...rest: any[]) => Paginator<ListBonusPaymentsCommandOutput>;
@@ -4,4 +4,4 @@ import { MTurkPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListHITsForQualificationType(config: MTurkPaginationConfiguration, input: ListHITsForQualificationTypeCommandInput, ...additionalArguments: any): Paginator<ListHITsForQualificationTypeCommandOutput>;
7
+ export declare const paginateListHITsForQualificationType: (config: MTurkPaginationConfiguration, input: ListHITsForQualificationTypeCommandInput, ...rest: any[]) => Paginator<ListHITsForQualificationTypeCommandOutput>;
@@ -4,4 +4,4 @@ import { MTurkPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListHITs(config: MTurkPaginationConfiguration, input: ListHITsCommandInput, ...additionalArguments: any): Paginator<ListHITsCommandOutput>;
7
+ export declare const paginateListHITs: (config: MTurkPaginationConfiguration, input: ListHITsCommandInput, ...rest: any[]) => Paginator<ListHITsCommandOutput>;
@@ -4,4 +4,4 @@ import { MTurkPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListQualificationRequests(config: MTurkPaginationConfiguration, input: ListQualificationRequestsCommandInput, ...additionalArguments: any): Paginator<ListQualificationRequestsCommandOutput>;
7
+ export declare const paginateListQualificationRequests: (config: MTurkPaginationConfiguration, input: ListQualificationRequestsCommandInput, ...rest: any[]) => Paginator<ListQualificationRequestsCommandOutput>;
@@ -4,4 +4,4 @@ import { MTurkPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListQualificationTypes(config: MTurkPaginationConfiguration, input: ListQualificationTypesCommandInput, ...additionalArguments: any): Paginator<ListQualificationTypesCommandOutput>;
7
+ export declare const paginateListQualificationTypes: (config: MTurkPaginationConfiguration, input: ListQualificationTypesCommandInput, ...rest: any[]) => Paginator<ListQualificationTypesCommandOutput>;
@@ -4,4 +4,4 @@ import { MTurkPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListReviewPolicyResultsForHIT(config: MTurkPaginationConfiguration, input: ListReviewPolicyResultsForHITCommandInput, ...additionalArguments: any): Paginator<ListReviewPolicyResultsForHITCommandOutput>;
7
+ export declare const paginateListReviewPolicyResultsForHIT: (config: MTurkPaginationConfiguration, input: ListReviewPolicyResultsForHITCommandInput, ...rest: any[]) => Paginator<ListReviewPolicyResultsForHITCommandOutput>;
@@ -4,4 +4,4 @@ import { MTurkPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListReviewableHITs(config: MTurkPaginationConfiguration, input: ListReviewableHITsCommandInput, ...additionalArguments: any): Paginator<ListReviewableHITsCommandOutput>;
7
+ export declare const paginateListReviewableHITs: (config: MTurkPaginationConfiguration, input: ListReviewableHITsCommandInput, ...rest: any[]) => Paginator<ListReviewableHITsCommandOutput>;
@@ -4,4 +4,4 @@ import { MTurkPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListWorkerBlocks(config: MTurkPaginationConfiguration, input: ListWorkerBlocksCommandInput, ...additionalArguments: any): Paginator<ListWorkerBlocksCommandOutput>;
7
+ export declare const paginateListWorkerBlocks: (config: MTurkPaginationConfiguration, input: ListWorkerBlocksCommandInput, ...rest: any[]) => Paginator<ListWorkerBlocksCommandOutput>;
@@ -4,4 +4,4 @@ import { MTurkPaginationConfiguration } from "./Interfaces";
4
4
  /**
5
5
  * @public
6
6
  */
7
- export declare function paginateListWorkersWithQualificationType(config: MTurkPaginationConfiguration, input: ListWorkersWithQualificationTypeCommandInput, ...additionalArguments: any): Paginator<ListWorkersWithQualificationTypeCommandOutput>;
7
+ export declare const paginateListWorkersWithQualificationType: (config: MTurkPaginationConfiguration, input: ListWorkersWithQualificationTypeCommandInput, ...rest: any[]) => Paginator<ListWorkersWithQualificationTypeCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListAssignmentsForHITCommandOutput,
5
5
  } from "../commands/ListAssignmentsForHITCommand";
6
6
  import { MTurkPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListAssignmentsForHIT(
7
+ export declare const paginateListAssignmentsForHIT: (
8
8
  config: MTurkPaginationConfiguration,
9
9
  input: ListAssignmentsForHITCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListAssignmentsForHITCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListAssignmentsForHITCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListBonusPaymentsCommandOutput,
5
5
  } from "../commands/ListBonusPaymentsCommand";
6
6
  import { MTurkPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListBonusPayments(
7
+ export declare const paginateListBonusPayments: (
8
8
  config: MTurkPaginationConfiguration,
9
9
  input: ListBonusPaymentsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListBonusPaymentsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListBonusPaymentsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListHITsForQualificationTypeCommandOutput,
5
5
  } from "../commands/ListHITsForQualificationTypeCommand";
6
6
  import { MTurkPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListHITsForQualificationType(
7
+ export declare const paginateListHITsForQualificationType: (
8
8
  config: MTurkPaginationConfiguration,
9
9
  input: ListHITsForQualificationTypeCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListHITsForQualificationTypeCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListHITsForQualificationTypeCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListHITsCommandOutput,
5
5
  } from "../commands/ListHITsCommand";
6
6
  import { MTurkPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListHITs(
7
+ export declare const paginateListHITs: (
8
8
  config: MTurkPaginationConfiguration,
9
9
  input: ListHITsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListHITsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListHITsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListQualificationRequestsCommandOutput,
5
5
  } from "../commands/ListQualificationRequestsCommand";
6
6
  import { MTurkPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListQualificationRequests(
7
+ export declare const paginateListQualificationRequests: (
8
8
  config: MTurkPaginationConfiguration,
9
9
  input: ListQualificationRequestsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListQualificationRequestsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListQualificationRequestsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListQualificationTypesCommandOutput,
5
5
  } from "../commands/ListQualificationTypesCommand";
6
6
  import { MTurkPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListQualificationTypes(
7
+ export declare const paginateListQualificationTypes: (
8
8
  config: MTurkPaginationConfiguration,
9
9
  input: ListQualificationTypesCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListQualificationTypesCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListQualificationTypesCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListReviewPolicyResultsForHITCommandOutput,
5
5
  } from "../commands/ListReviewPolicyResultsForHITCommand";
6
6
  import { MTurkPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListReviewPolicyResultsForHIT(
7
+ export declare const paginateListReviewPolicyResultsForHIT: (
8
8
  config: MTurkPaginationConfiguration,
9
9
  input: ListReviewPolicyResultsForHITCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListReviewPolicyResultsForHITCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListReviewPolicyResultsForHITCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListReviewableHITsCommandOutput,
5
5
  } from "../commands/ListReviewableHITsCommand";
6
6
  import { MTurkPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListReviewableHITs(
7
+ export declare const paginateListReviewableHITs: (
8
8
  config: MTurkPaginationConfiguration,
9
9
  input: ListReviewableHITsCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListReviewableHITsCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListReviewableHITsCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListWorkerBlocksCommandOutput,
5
5
  } from "../commands/ListWorkerBlocksCommand";
6
6
  import { MTurkPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListWorkerBlocks(
7
+ export declare const paginateListWorkerBlocks: (
8
8
  config: MTurkPaginationConfiguration,
9
9
  input: ListWorkerBlocksCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListWorkerBlocksCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListWorkerBlocksCommandOutput>;
@@ -4,8 +4,8 @@ import {
4
4
  ListWorkersWithQualificationTypeCommandOutput,
5
5
  } from "../commands/ListWorkersWithQualificationTypeCommand";
6
6
  import { MTurkPaginationConfiguration } from "./Interfaces";
7
- export declare function paginateListWorkersWithQualificationType(
7
+ export declare const paginateListWorkersWithQualificationType: (
8
8
  config: MTurkPaginationConfiguration,
9
9
  input: ListWorkersWithQualificationTypeCommandInput,
10
- ...additionalArguments: any
11
- ): Paginator<ListWorkersWithQualificationTypeCommandOutput>;
10
+ ...rest: any[]
11
+ ) => Paginator<ListWorkersWithQualificationTypeCommandOutput>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-mturk",
3
3
  "description": "AWS SDK for JavaScript Mturk Client for Node.js, Browser and React Native",
4
- "version": "3.477.0",
4
+ "version": "3.478.0",
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",
@@ -20,20 +20,21 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.477.0",
23
+ "@aws-sdk/client-sts": "3.478.0",
24
24
  "@aws-sdk/core": "3.477.0",
25
- "@aws-sdk/credential-provider-node": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.478.0",
26
26
  "@aws-sdk/middleware-host-header": "3.468.0",
27
27
  "@aws-sdk/middleware-logger": "3.468.0",
28
28
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
29
29
  "@aws-sdk/middleware-signing": "3.468.0",
30
- "@aws-sdk/middleware-user-agent": "3.470.0",
30
+ "@aws-sdk/middleware-user-agent": "3.478.0",
31
31
  "@aws-sdk/region-config-resolver": "3.470.0",
32
32
  "@aws-sdk/types": "3.468.0",
33
- "@aws-sdk/util-endpoints": "3.470.0",
33
+ "@aws-sdk/util-endpoints": "3.478.0",
34
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
35
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
36
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
37
38
  "@smithy/fetch-http-handler": "^2.3.1",
38
39
  "@smithy/hash-node": "^2.0.17",
39
40
  "@smithy/invalid-dependency": "^2.0.15",