@reventlessdev/rescript-aws-sdk 2.2.0-alpha.24 → 3.0.0-alpha.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/CHANGELOG.md +19 -0
- package/package.json +3 -2
- package/rescript.json +1 -1
- package/src/DynamoDb_DynamoDb.res +44 -0
- package/src/DynamoDb_DynamoDb.res.mjs +15 -3
- package/src/ResourceGroupsTaggingApi.res +63 -0
- package/src/ResourceGroupsTaggingApi.res.mjs +20 -0
- package/src/S3.res +59 -0
- package/src/S3.res.mjs +15 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# 3.0.0-alpha.0 (2026-07-31)
|
|
7
|
+
|
|
8
|
+
* feat(rescript)!: one Node bindings package, not two ([1258d8c](https://github.com/ReventlessDev/reventless-core/commit/1258d8c2b2ff2636b36a849fc5bdf9005c6fb0eb))
|
|
9
|
+
|
|
10
|
+
### BREAKING CHANGES
|
|
11
|
+
|
|
12
|
+
* `@reventlessdev/rescript-node-streams` and
|
|
13
|
+
`@reventlessdev/rescript-node-zlib` are replaced by
|
|
14
|
+
`@reventlessdev/rescript-node`. Module names are unchanged.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
# 2.2.0-alpha.25 (2026-07-27)
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* **seed:** guarded AWS store reset (seed:reset) with per-project scope selection ([8446172](https://github.com/ReventlessDev/reventless-core/commit/8446172cbb53776a58f53220d19e96d96ce94508))
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# 2.2.0-alpha.24 (2026-07-19)
|
|
7
26
|
|
|
8
27
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/rescript-aws-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-alpha.0",
|
|
4
4
|
"description": "ReScript bindings for aws-sdk",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"dependencies": {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
"@aws-sdk/client-dynamodb": "^3.1033.0",
|
|
10
10
|
"@aws-sdk/client-ecs": "^3.1033.0",
|
|
11
11
|
"@aws-sdk/client-kinesis": "^3.1033.0",
|
|
12
|
+
"@aws-sdk/client-resource-groups-tagging-api": "^3.1033.0",
|
|
12
13
|
"@aws-sdk/client-s3": "^3.1033.0",
|
|
13
14
|
"@aws-sdk/client-secrets-manager": "^3.1033.0",
|
|
14
15
|
"@aws-sdk/client-sesv2": "^3.1033.0",
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
"@aws-sdk/lib-dynamodb": "^3.1033.0",
|
|
18
19
|
"@aws-sdk/lib-storage": "^3.1033.0",
|
|
19
20
|
"@smithy/node-http-handler": "^4.5.3",
|
|
20
|
-
"@reventlessdev/rescript-node
|
|
21
|
+
"@reventlessdev/rescript-node": "2.0.0-alpha.0"
|
|
21
22
|
},
|
|
22
23
|
"devDependencies": {
|
|
23
24
|
"rescript": "12.3.0"
|
package/rescript.json
CHANGED
|
@@ -50,6 +50,50 @@ let client: unit => client = () =>
|
|
|
50
50
|
| Some(client) => client
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
module DescribeTableCommand = {
|
|
54
|
+
/*** describe an existing table — used to read its KeySchema so a truncate can
|
|
55
|
+
build a delete key from each scanned item.
|
|
56
|
+
|
|
57
|
+
this command is not available in document-client
|
|
58
|
+
|
|
59
|
+
see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/DescribeTableCommand/ */
|
|
60
|
+
|
|
61
|
+
type t
|
|
62
|
+
|
|
63
|
+
type keySchemaElement = {
|
|
64
|
+
@as("AttributeName") attributeName: string,
|
|
65
|
+
/** "HASH" (partition key) or "RANGE" (sort key) */
|
|
66
|
+
@as("KeyType")
|
|
67
|
+
keyType: string,
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** only the fields a truncate needs; the real description carries far more */
|
|
71
|
+
type tableDescription = {
|
|
72
|
+
@as("TableName") tableName?: string,
|
|
73
|
+
@as("KeySchema") keySchema?: array<keySchemaElement>,
|
|
74
|
+
/** DynamoDB's own approximate row count (updated ~every 6h) */
|
|
75
|
+
@as("ItemCount")
|
|
76
|
+
itemCount?: float,
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
type input = {@as("TableName") tableName: string}
|
|
80
|
+
|
|
81
|
+
type output = {
|
|
82
|
+
@as("$metadata") metadata: Metadata.t,
|
|
83
|
+
@as("Table") table?: tableDescription,
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@new @module("@aws-sdk/client-dynamodb")
|
|
87
|
+
external make: input => t = "DescribeTableCommand"
|
|
88
|
+
|
|
89
|
+
module Raw = {
|
|
90
|
+
@send
|
|
91
|
+
external send: (client, t) => promise<output> = "send"
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
let send: t => promise<output> = command => Raw.send(client(), command)
|
|
95
|
+
}
|
|
96
|
+
|
|
53
97
|
module UpdateTableCommand = {
|
|
54
98
|
/*** modify an existing table
|
|
55
99
|
|
|
@@ -32,7 +32,7 @@ function send(command) {
|
|
|
32
32
|
return client().send(command);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
let
|
|
35
|
+
let DescribeTableCommand = {
|
|
36
36
|
Raw: Raw$1,
|
|
37
37
|
send: send
|
|
38
38
|
};
|
|
@@ -43,7 +43,7 @@ function send$1(command) {
|
|
|
43
43
|
return client().send(command);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
let
|
|
46
|
+
let UpdateTableCommand = {
|
|
47
47
|
Raw: Raw$2,
|
|
48
48
|
send: send$1
|
|
49
49
|
};
|
|
@@ -54,15 +54,27 @@ function send$2(command) {
|
|
|
54
54
|
return client().send(command);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
let
|
|
57
|
+
let UpdateTimeToLiveCommand = {
|
|
58
58
|
Raw: Raw$3,
|
|
59
59
|
send: send$2
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
+
let Raw$4 = {};
|
|
63
|
+
|
|
64
|
+
function send$3(command) {
|
|
65
|
+
return client().send(command);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
let UpdateContinuousBackupsCommand = {
|
|
69
|
+
Raw: Raw$4,
|
|
70
|
+
send: send$3
|
|
71
|
+
};
|
|
72
|
+
|
|
62
73
|
export {
|
|
63
74
|
Raw,
|
|
64
75
|
clientInstance,
|
|
65
76
|
client,
|
|
77
|
+
DescribeTableCommand,
|
|
66
78
|
UpdateTableCommand,
|
|
67
79
|
UpdateTimeToLiveCommand,
|
|
68
80
|
UpdateContinuousBackupsCommand,
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*** @aws-sdk/client-resource-groups-tagging-api
|
|
2
|
+
see: https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html
|
|
3
|
+
|
|
4
|
+
Discovers resources by tag within a region. The seed reset uses it to find the
|
|
5
|
+
exact DynamoDB tables and S3 buckets belonging to a stack via the
|
|
6
|
+
`reventless:environment` tag every framework resource carries — so the wipe's
|
|
7
|
+
blast radius is defined by that tag, not by name globbing.
|
|
8
|
+
|
|
9
|
+
Unlike the other clients here there is no memoised default: the caller passes a
|
|
10
|
+
client so the region is explicit. `GetResources` is paginated via
|
|
11
|
+
`PaginationToken` — an empty/absent token in the response means the last page.
|
|
12
|
+
*/
|
|
13
|
+
type client
|
|
14
|
+
|
|
15
|
+
module Raw = {
|
|
16
|
+
type options = {region?: string}
|
|
17
|
+
@module("@aws-sdk/client-resource-groups-tagging-api") @new
|
|
18
|
+
external client: (~options: options=?, unit) => client = "ResourceGroupsTaggingAPIClient"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
let client = (~region: option<string>=?, ()): client => Raw.client(~options={region: ?region}, ())
|
|
22
|
+
|
|
23
|
+
module GetResourcesCommand = {
|
|
24
|
+
/*** see: https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html */
|
|
25
|
+
|
|
26
|
+
type t
|
|
27
|
+
|
|
28
|
+
type tagFilter = {
|
|
29
|
+
@as("Key") key: string,
|
|
30
|
+
@as("Values") values?: array<string>,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
type input = {
|
|
34
|
+
@as("TagFilters") tagFilters?: array<tagFilter>,
|
|
35
|
+
/** e.g. "dynamodb:table", "s3" — service or service:resourceType */
|
|
36
|
+
@as("ResourceTypeFilters")
|
|
37
|
+
resourceTypeFilters?: array<string>,
|
|
38
|
+
@as("ResourcesPerPage") resourcesPerPage?: int,
|
|
39
|
+
/** empty on the first call; feed back the response token until it is absent */
|
|
40
|
+
@as("PaginationToken")
|
|
41
|
+
paginationToken?: string,
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
type tag = {@as("Key") key: string, @as("Value") value: string}
|
|
45
|
+
|
|
46
|
+
type resourceTagMapping = {
|
|
47
|
+
@as("ResourceARN") resourceARN: string,
|
|
48
|
+
@as("Tags") tags?: array<tag>,
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
type output = {
|
|
52
|
+
@as("$metadata") metadata: Metadata.t,
|
|
53
|
+
@as("ResourceTagMappingList") resourceTagMappingList?: array<resourceTagMapping>,
|
|
54
|
+
/** absent or "" on the final page */
|
|
55
|
+
@as("PaginationToken")
|
|
56
|
+
paginationToken?: string,
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@new @module("@aws-sdk/client-resource-groups-tagging-api")
|
|
60
|
+
external make: input => t = "GetResourcesCommand"
|
|
61
|
+
|
|
62
|
+
@send external send: (client, t) => promise<output> = "send"
|
|
63
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Generated by ReScript, PLEASE EDIT WITH CARE
|
|
2
|
+
|
|
3
|
+
import * as ClientResourceGroupsTaggingApi from "@aws-sdk/client-resource-groups-tagging-api";
|
|
4
|
+
|
|
5
|
+
let Raw = {};
|
|
6
|
+
|
|
7
|
+
function client(region, param) {
|
|
8
|
+
return new ClientResourceGroupsTaggingApi.ResourceGroupsTaggingAPIClient({
|
|
9
|
+
region: region
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let GetResourcesCommand = {};
|
|
14
|
+
|
|
15
|
+
export {
|
|
16
|
+
Raw,
|
|
17
|
+
client,
|
|
18
|
+
GetResourcesCommand,
|
|
19
|
+
}
|
|
20
|
+
/* @aws-sdk/client-resource-groups-tagging-api Not a pure module */
|
package/src/S3.res
CHANGED
|
@@ -74,6 +74,11 @@ module ListObjectVersionsCommand = {
|
|
|
74
74
|
|
|
75
75
|
type output = {
|
|
76
76
|
@as("Versions") versions?: array<objectVersion>,
|
|
77
|
+
/** Delete markers are separate from `versions`; a full empty must remove
|
|
78
|
+
these too, or the bucket keeps phantom keys. Shares the `objectVersion`
|
|
79
|
+
shape (Key + VersionId + IsLatest). */
|
|
80
|
+
@as("DeleteMarkers")
|
|
81
|
+
deleteMarkers?: array<objectVersion>,
|
|
77
82
|
@as("IsTruncated") isTruncated?: bool,
|
|
78
83
|
@as("NextKeyMarker") nextKeyMarker?: string,
|
|
79
84
|
@as("NextVersionIdMarker") nextVersionIdMarker?: string,
|
|
@@ -90,6 +95,60 @@ module ListObjectVersionsCommand = {
|
|
|
90
95
|
let send: t => promise<output> = input => Raw.send(client(), input)
|
|
91
96
|
}
|
|
92
97
|
|
|
98
|
+
module DeleteObjectsCommand = {
|
|
99
|
+
/*** delete up to 1000 objects (each by key, optionally a specific version) in
|
|
100
|
+
one call. Used by the seed reset to empty a bucket page by page.
|
|
101
|
+
see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/s3/command/DeleteObjectsCommand/ */
|
|
102
|
+
|
|
103
|
+
type t
|
|
104
|
+
|
|
105
|
+
type objectIdentifier = {
|
|
106
|
+
@as("Key") key: string,
|
|
107
|
+
/** target a specific version; omit on an unversioned bucket */
|
|
108
|
+
@as("VersionId")
|
|
109
|
+
versionId?: string,
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
type delete = {
|
|
113
|
+
@as("Objects") objects: array<objectIdentifier>,
|
|
114
|
+
/** suppress the per-object success list in the response */
|
|
115
|
+
@as("Quiet")
|
|
116
|
+
quiet?: bool,
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
type input = {
|
|
120
|
+
@as("Bucket") bucket: string,
|
|
121
|
+
@as("Delete") delete: delete,
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
type deletedObject = {
|
|
125
|
+
@as("Key") key?: string,
|
|
126
|
+
@as("VersionId") versionId?: string,
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
type deleteError = {
|
|
130
|
+
@as("Key") key?: string,
|
|
131
|
+
@as("VersionId") versionId?: string,
|
|
132
|
+
@as("Code") code?: string,
|
|
133
|
+
@as("Message") message?: string,
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
type output = {
|
|
137
|
+
@as("Deleted") deleted?: array<deletedObject>,
|
|
138
|
+
@as("Errors") errors?: array<deleteError>,
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@new @module("@aws-sdk/client-s3")
|
|
142
|
+
external make: input => t = "DeleteObjectsCommand"
|
|
143
|
+
|
|
144
|
+
module Raw = {
|
|
145
|
+
@send
|
|
146
|
+
external send: (client, t) => promise<output> = "send"
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
let send: t => promise<output> = input => Raw.send(client(), input)
|
|
150
|
+
}
|
|
151
|
+
|
|
93
152
|
module PutObjectCommand = {
|
|
94
153
|
type t
|
|
95
154
|
|
package/src/S3.res.mjs
CHANGED
|
@@ -47,17 +47,28 @@ function send$2(input) {
|
|
|
47
47
|
return client().send(input);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
let
|
|
50
|
+
let DeleteObjectsCommand = {
|
|
51
51
|
Raw: Raw$3,
|
|
52
52
|
send: send$2
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
+
let Raw$4 = {};
|
|
56
|
+
|
|
57
|
+
function send$3(input) {
|
|
58
|
+
return client().send(input);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
let PutObjectCommand = {
|
|
62
|
+
Raw: Raw$4,
|
|
63
|
+
send: send$3
|
|
64
|
+
};
|
|
65
|
+
|
|
55
66
|
let CompleteMultipartUploadCommand = {};
|
|
56
67
|
|
|
57
|
-
let Raw$
|
|
68
|
+
let Raw$5 = {};
|
|
58
69
|
|
|
59
70
|
let Upload = {
|
|
60
|
-
Raw: Raw$
|
|
71
|
+
Raw: Raw$5
|
|
61
72
|
};
|
|
62
73
|
|
|
63
74
|
export {
|
|
@@ -66,6 +77,7 @@ export {
|
|
|
66
77
|
client,
|
|
67
78
|
GetObjectCommand,
|
|
68
79
|
ListObjectVersionsCommand,
|
|
80
|
+
DeleteObjectsCommand,
|
|
69
81
|
PutObjectCommand,
|
|
70
82
|
CompleteMultipartUploadCommand,
|
|
71
83
|
Upload,
|