@aws-sdk/client-location 3.476.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 (43) hide show
  1. package/dist-cjs/pagination/GetDevicePositionHistoryPaginator.js +2 -24
  2. package/dist-cjs/pagination/ListDevicePositionsPaginator.js +2 -24
  3. package/dist-cjs/pagination/ListGeofenceCollectionsPaginator.js +2 -24
  4. package/dist-cjs/pagination/ListGeofencesPaginator.js +2 -24
  5. package/dist-cjs/pagination/ListKeysPaginator.js +2 -24
  6. package/dist-cjs/pagination/ListMapsPaginator.js +2 -24
  7. package/dist-cjs/pagination/ListPlaceIndexesPaginator.js +2 -24
  8. package/dist-cjs/pagination/ListRouteCalculatorsPaginator.js +2 -24
  9. package/dist-cjs/pagination/ListTrackerConsumersPaginator.js +2 -24
  10. package/dist-cjs/pagination/ListTrackersPaginator.js +2 -24
  11. package/dist-cjs/protocols/Aws_restJson1.js +380 -754
  12. package/dist-es/pagination/GetDevicePositionHistoryPaginator.js +2 -23
  13. package/dist-es/pagination/ListDevicePositionsPaginator.js +2 -23
  14. package/dist-es/pagination/ListGeofenceCollectionsPaginator.js +2 -23
  15. package/dist-es/pagination/ListGeofencesPaginator.js +2 -23
  16. package/dist-es/pagination/ListKeysPaginator.js +2 -23
  17. package/dist-es/pagination/ListMapsPaginator.js +2 -23
  18. package/dist-es/pagination/ListPlaceIndexesPaginator.js +2 -23
  19. package/dist-es/pagination/ListRouteCalculatorsPaginator.js +2 -23
  20. package/dist-es/pagination/ListTrackerConsumersPaginator.js +2 -23
  21. package/dist-es/pagination/ListTrackersPaginator.js +2 -23
  22. package/dist-es/protocols/Aws_restJson1.js +382 -756
  23. package/dist-types/pagination/GetDevicePositionHistoryPaginator.d.ts +1 -1
  24. package/dist-types/pagination/ListDevicePositionsPaginator.d.ts +1 -1
  25. package/dist-types/pagination/ListGeofenceCollectionsPaginator.d.ts +1 -1
  26. package/dist-types/pagination/ListGeofencesPaginator.d.ts +1 -1
  27. package/dist-types/pagination/ListKeysPaginator.d.ts +1 -1
  28. package/dist-types/pagination/ListMapsPaginator.d.ts +1 -1
  29. package/dist-types/pagination/ListPlaceIndexesPaginator.d.ts +1 -1
  30. package/dist-types/pagination/ListRouteCalculatorsPaginator.d.ts +1 -1
  31. package/dist-types/pagination/ListTrackerConsumersPaginator.d.ts +1 -1
  32. package/dist-types/pagination/ListTrackersPaginator.d.ts +1 -1
  33. package/dist-types/ts3.4/pagination/GetDevicePositionHistoryPaginator.d.ts +3 -3
  34. package/dist-types/ts3.4/pagination/ListDevicePositionsPaginator.d.ts +3 -3
  35. package/dist-types/ts3.4/pagination/ListGeofenceCollectionsPaginator.d.ts +3 -3
  36. package/dist-types/ts3.4/pagination/ListGeofencesPaginator.d.ts +3 -3
  37. package/dist-types/ts3.4/pagination/ListKeysPaginator.d.ts +3 -3
  38. package/dist-types/ts3.4/pagination/ListMapsPaginator.d.ts +3 -3
  39. package/dist-types/ts3.4/pagination/ListPlaceIndexesPaginator.d.ts +3 -3
  40. package/dist-types/ts3.4/pagination/ListRouteCalculatorsPaginator.d.ts +3 -3
  41. package/dist-types/ts3.4/pagination/ListTrackerConsumersPaginator.d.ts +3 -3
  42. package/dist-types/ts3.4/pagination/ListTrackersPaginator.d.ts +3 -3
  43. package/package.json +7 -6
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { GetDevicePositionHistoryCommand, } from "../commands/GetDevicePositionHistoryCommand";
2
3
  import { LocationClient } from "../LocationClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new GetDevicePositionHistoryCommand(input), ...args);
5
- };
6
- export async function* paginateGetDevicePositionHistory(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 LocationClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Location | LocationClient");
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 paginateGetDevicePositionHistory = createPaginator(LocationClient, GetDevicePositionHistoryCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListDevicePositionsCommand, } from "../commands/ListDevicePositionsCommand";
2
3
  import { LocationClient } from "../LocationClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListDevicePositionsCommand(input), ...args);
5
- };
6
- export async function* paginateListDevicePositions(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 LocationClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Location | LocationClient");
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 paginateListDevicePositions = createPaginator(LocationClient, ListDevicePositionsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListGeofenceCollectionsCommand, } from "../commands/ListGeofenceCollectionsCommand";
2
3
  import { LocationClient } from "../LocationClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListGeofenceCollectionsCommand(input), ...args);
5
- };
6
- export async function* paginateListGeofenceCollections(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 LocationClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Location | LocationClient");
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 paginateListGeofenceCollections = createPaginator(LocationClient, ListGeofenceCollectionsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListGeofencesCommand, } from "../commands/ListGeofencesCommand";
2
3
  import { LocationClient } from "../LocationClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListGeofencesCommand(input), ...args);
5
- };
6
- export async function* paginateListGeofences(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 LocationClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Location | LocationClient");
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 paginateListGeofences = createPaginator(LocationClient, ListGeofencesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListKeysCommand } from "../commands/ListKeysCommand";
2
3
  import { LocationClient } from "../LocationClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListKeysCommand(input), ...args);
5
- };
6
- export async function* paginateListKeys(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 LocationClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Location | LocationClient");
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 paginateListKeys = createPaginator(LocationClient, ListKeysCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListMapsCommand } from "../commands/ListMapsCommand";
2
3
  import { LocationClient } from "../LocationClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListMapsCommand(input), ...args);
5
- };
6
- export async function* paginateListMaps(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 LocationClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Location | LocationClient");
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 paginateListMaps = createPaginator(LocationClient, ListMapsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListPlaceIndexesCommand, } from "../commands/ListPlaceIndexesCommand";
2
3
  import { LocationClient } from "../LocationClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListPlaceIndexesCommand(input), ...args);
5
- };
6
- export async function* paginateListPlaceIndexes(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 LocationClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Location | LocationClient");
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 paginateListPlaceIndexes = createPaginator(LocationClient, ListPlaceIndexesCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListRouteCalculatorsCommand, } from "../commands/ListRouteCalculatorsCommand";
2
3
  import { LocationClient } from "../LocationClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListRouteCalculatorsCommand(input), ...args);
5
- };
6
- export async function* paginateListRouteCalculators(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 LocationClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Location | LocationClient");
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 paginateListRouteCalculators = createPaginator(LocationClient, ListRouteCalculatorsCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListTrackerConsumersCommand, } from "../commands/ListTrackerConsumersCommand";
2
3
  import { LocationClient } from "../LocationClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListTrackerConsumersCommand(input), ...args);
5
- };
6
- export async function* paginateListTrackerConsumers(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 LocationClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Location | LocationClient");
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 paginateListTrackerConsumers = createPaginator(LocationClient, ListTrackerConsumersCommand, "NextToken", "NextToken", "MaxResults");
@@ -1,25 +1,4 @@
1
+ import { createPaginator } from "@smithy/core";
1
2
  import { ListTrackersCommand, } from "../commands/ListTrackersCommand";
2
3
  import { LocationClient } from "../LocationClient";
3
- const makePagedClientRequest = async (client, input, ...args) => {
4
- return await client.send(new ListTrackersCommand(input), ...args);
5
- };
6
- export async function* paginateListTrackers(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 LocationClient) {
14
- page = await makePagedClientRequest(config.client, input, ...additionalArguments);
15
- }
16
- else {
17
- throw new Error("Invalid client, expected Location | LocationClient");
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 paginateListTrackers = createPaginator(LocationClient, ListTrackersCommand, "NextToken", "NextToken", "MaxResults");