@aws-sdk/client-s3 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.
- package/dist-cjs/pagination/ListDirectoryBucketsPaginator.js +2 -24
- package/dist-cjs/pagination/ListObjectsV2Paginator.js +2 -24
- package/dist-cjs/pagination/ListPartsPaginator.js +2 -24
- package/dist-cjs/protocols/Aws_restXml.js +3603 -4456
- package/dist-es/pagination/ListDirectoryBucketsPaginator.js +2 -23
- package/dist-es/pagination/ListObjectsV2Paginator.js +2 -23
- package/dist-es/pagination/ListPartsPaginator.js +2 -23
- package/dist-es/protocols/Aws_restXml.js +3605 -4458
- package/dist-types/pagination/ListDirectoryBucketsPaginator.d.ts +1 -1
- package/dist-types/pagination/ListObjectsV2Paginator.d.ts +1 -1
- package/dist-types/pagination/ListPartsPaginator.d.ts +1 -1
- package/dist-types/ts3.4/pagination/ListDirectoryBucketsPaginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListObjectsV2Paginator.d.ts +3 -3
- package/dist-types/ts3.4/pagination/ListPartsPaginator.d.ts +3 -3
- package/package.json +7 -6
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListDirectoryBucketsCommand, } from "../commands/ListDirectoryBucketsCommand";
|
|
2
3
|
import { S3Client } from "../S3Client";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListDirectoryBucketsCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListDirectoryBuckets(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.ContinuationToken = token;
|
|
12
|
-
input["MaxDirectoryBuckets"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof S3Client) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected S3 | S3Client");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.ContinuationToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateListDirectoryBuckets = createPaginator(S3Client, ListDirectoryBucketsCommand, "ContinuationToken", "ContinuationToken", "MaxDirectoryBuckets");
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListObjectsV2Command, } from "../commands/ListObjectsV2Command";
|
|
2
3
|
import { S3Client } from "../S3Client";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListObjectsV2Command(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListObjectsV2(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.ContinuationToken = token;
|
|
12
|
-
input["MaxKeys"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof S3Client) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected S3 | S3Client");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.NextContinuationToken;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateListObjectsV2 = createPaginator(S3Client, ListObjectsV2Command, "ContinuationToken", "NextContinuationToken", "MaxKeys");
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
1
2
|
import { ListPartsCommand } from "../commands/ListPartsCommand";
|
|
2
3
|
import { S3Client } from "../S3Client";
|
|
3
|
-
const
|
|
4
|
-
return await client.send(new ListPartsCommand(input), ...args);
|
|
5
|
-
};
|
|
6
|
-
export async function* paginateListParts(config, input, ...additionalArguments) {
|
|
7
|
-
let token = config.startingToken || undefined;
|
|
8
|
-
let hasNext = true;
|
|
9
|
-
let page;
|
|
10
|
-
while (hasNext) {
|
|
11
|
-
input.PartNumberMarker = token;
|
|
12
|
-
input["MaxParts"] = config.pageSize;
|
|
13
|
-
if (config.client instanceof S3Client) {
|
|
14
|
-
page = await makePagedClientRequest(config.client, input, ...additionalArguments);
|
|
15
|
-
}
|
|
16
|
-
else {
|
|
17
|
-
throw new Error("Invalid client, expected S3 | S3Client");
|
|
18
|
-
}
|
|
19
|
-
yield page;
|
|
20
|
-
const prevToken = token;
|
|
21
|
-
token = page.NextPartNumberMarker;
|
|
22
|
-
hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
4
|
+
export const paginateListParts = createPaginator(S3Client, ListPartsCommand, "PartNumberMarker", "NextPartNumberMarker", "MaxParts");
|