@reventlessdev/rescript-aws-sdk 2.2.0-alpha.23 → 2.2.0-alpha.25

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 CHANGED
@@ -3,6 +3,20 @@
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
+ # 2.2.0-alpha.25 (2026-07-27)
7
+
8
+ ### Features
9
+
10
+ * **seed:** guarded AWS store reset (seed:reset) with per-project scope selection ([8446172](https://github.com/ReventlessDev/reventless-core/commit/8446172cbb53776a58f53220d19e96d96ce94508))
11
+
12
+
13
+ # 2.2.0-alpha.24 (2026-07-19)
14
+
15
+ ### Features
16
+
17
+ * **rescript-aws:** S3 ListObjectVersions + BucketNotification bindings ([f0d464a](https://github.com/ReventlessDev/reventless-core/commit/f0d464aedacea930c56aab4849637316fc151dc5))
18
+
19
+
6
20
  # 2.2.0-alpha.23 (2026-07-17)
7
21
 
8
22
  **Note:** Version bump only for package @reventlessdev/rescript-aws-sdk
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/rescript-aws-sdk",
3
- "version": "2.2.0-alpha.23",
3
+ "version": "2.2.0-alpha.25",
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",
@@ -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 UpdateTableCommand = {
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 UpdateTimeToLiveCommand = {
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 UpdateContinuousBackupsCommand = {
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
@@ -25,12 +25,16 @@ module GetObjectCommand = {
25
25
  type input = {
26
26
  @as("Bucket") bucket: string,
27
27
  @as("Key") key: string,
28
+ /** fetch a specific object version (requires a versioned bucket) */
29
+ @as("VersionId")
30
+ versionId?: string,
28
31
  }
29
32
 
30
33
  type output = {
31
34
  /** readable stream of the object */
32
35
  @as("Body")
33
36
  body: NodeStreams.Readable.t,
37
+ @as("VersionId") versionId?: string,
34
38
  }
35
39
 
36
40
  @new @module("@aws-sdk/client-s3")
@@ -44,6 +48,107 @@ module GetObjectCommand = {
44
48
  let send: t => promise<output> = input => Raw.send(client(), input)
45
49
  }
46
50
 
51
+ module ListObjectVersionsCommand = {
52
+ type t
53
+
54
+ type input = {
55
+ @as("Bucket") bucket: string,
56
+ @as("Prefix") prefix?: string,
57
+ @as("KeyMarker") keyMarker?: string,
58
+ @as("VersionIdMarker") versionIdMarker?: string,
59
+ @as("MaxKeys") maxKeys?: int,
60
+ @as("Delimiter") delimiter?: string,
61
+ }
62
+
63
+ /** A single object version. S3 returns versions newest-first per key, so the
64
+ entry with `isLatest: true` is the current object and the next entry for the
65
+ same key is the immediately-prior version. */
66
+ type objectVersion = {
67
+ @as("Key") key: string,
68
+ @as("VersionId") versionId: string,
69
+ @as("IsLatest") isLatest: bool,
70
+ @as("LastModified") lastModified?: Date.t,
71
+ @as("ETag") eTag?: string,
72
+ @as("Size") size?: int,
73
+ }
74
+
75
+ type output = {
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>,
82
+ @as("IsTruncated") isTruncated?: bool,
83
+ @as("NextKeyMarker") nextKeyMarker?: string,
84
+ @as("NextVersionIdMarker") nextVersionIdMarker?: string,
85
+ }
86
+
87
+ @new @module("@aws-sdk/client-s3")
88
+ external make: input => t = "ListObjectVersionsCommand"
89
+
90
+ module Raw = {
91
+ @send
92
+ external send: (client, t) => promise<output> = "send"
93
+ }
94
+
95
+ let send: t => promise<output> = input => Raw.send(client(), input)
96
+ }
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
+
47
152
  module PutObjectCommand = {
48
153
  type t
49
154
 
package/src/S3.res.mjs CHANGED
@@ -36,17 +36,39 @@ function send$1(input) {
36
36
  return client().send(input);
37
37
  }
38
38
 
39
- let PutObjectCommand = {
39
+ let ListObjectVersionsCommand = {
40
40
  Raw: Raw$2,
41
41
  send: send$1
42
42
  };
43
43
 
44
+ let Raw$3 = {};
45
+
46
+ function send$2(input) {
47
+ return client().send(input);
48
+ }
49
+
50
+ let DeleteObjectsCommand = {
51
+ Raw: Raw$3,
52
+ send: send$2
53
+ };
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
+
44
66
  let CompleteMultipartUploadCommand = {};
45
67
 
46
- let Raw$3 = {};
68
+ let Raw$5 = {};
47
69
 
48
70
  let Upload = {
49
- Raw: Raw$3
71
+ Raw: Raw$5
50
72
  };
51
73
 
52
74
  export {
@@ -54,6 +76,8 @@ export {
54
76
  Raw,
55
77
  client,
56
78
  GetObjectCommand,
79
+ ListObjectVersionsCommand,
80
+ DeleteObjectsCommand,
57
81
  PutObjectCommand,
58
82
  CompleteMultipartUploadCommand,
59
83
  Upload,