@reventlessdev/rescript-aws-sdk 3.0.0-alpha.1 → 3.0.0-alpha.3

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
+ # 3.0.0-alpha.3 (2026-08-03)
7
+
8
+ ### Features
9
+
10
+ * **outbound:** let an outbound slice read an aggregate, and geocode addresses with it ([867e63e](https://github.com/ReventlessDev/reventless-core/commit/867e63e774ebc8b78b2b19c78645c8a12a8d06f6))
11
+
12
+
13
+ # 3.0.0-alpha.2 (2026-08-02)
14
+
15
+ ### Features
16
+
17
+ * **aws:** S3 GetObject->string binding + structure offload resolver ([1274bcc](https://github.com/ReventlessDev/reventless-core/commit/1274bcce29f8a1b70db362a10585c508710e7b56))
18
+
19
+
6
20
  # 3.0.0-alpha.1 (2026-08-02)
7
21
 
8
22
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reventlessdev/rescript-aws-sdk",
3
- "version": "3.0.0-alpha.1",
3
+ "version": "3.0.0-alpha.3",
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-location": "^3.970.0",
12
13
  "@aws-sdk/client-resource-groups-tagging-api": "^3.1033.0",
13
14
  "@aws-sdk/client-s3": "^3.1033.0",
14
15
  "@aws-sdk/client-secrets-manager": "^3.1033.0",
@@ -18,7 +19,7 @@
18
19
  "@aws-sdk/lib-dynamodb": "^3.1033.0",
19
20
  "@aws-sdk/lib-storage": "^3.1033.0",
20
21
  "@smithy/node-http-handler": "^4.5.3",
21
- "@reventlessdev/rescript-node": "2.0.0-alpha.0"
22
+ "@reventlessdev/rescript-node": "2.0.0-alpha.1"
22
23
  },
23
24
  "devDependencies": {
24
25
  "rescript": "12.3.0"
@@ -0,0 +1,80 @@
1
+ // Bindings for Amazon Location Service (`@aws-sdk/client-location`).
2
+ //
3
+ // Both callers of this service want different things from the same call, which
4
+ // is why the bindings live here rather than inside either of them: the browser's
5
+ // geocoder Function URL wants a best-effort list to show a human, and an
6
+ // unattended translator wants to know *how sure* the service is before it writes
7
+ // a coordinate into an event log.
8
+
9
+ type client
10
+
11
+ module Raw = {
12
+ @module("@aws-sdk/client-location") @new
13
+ external client: unit => client = "LocationClient"
14
+ }
15
+
16
+ let clientInstance = ref(None)
17
+
18
+ let client = () => {
19
+ switch clientInstance.contents {
20
+ | None =>
21
+ let c = Raw.client()
22
+ clientInstance := Some(c)
23
+ c
24
+ | Some(c) => c
25
+ }
26
+ }
27
+
28
+ module SearchPlaceIndexForTextCommand = {
29
+ /*** see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/location/command/SearchPlaceIndexForTextCommand/ */
30
+
31
+ type t
32
+
33
+ /** GeoJSON order — `[lng, lat]`, longitude first. Read it through
34
+ `Geometry.point` rather than indexing it at a call site; the order is the
35
+ single most reliable source of wrong-hemisphere markers in this domain. */
36
+ type point = array<float>
37
+
38
+ type geometry = {@as("Point") point?: point}
39
+
40
+ type place = {
41
+ @as("Label") label?: string,
42
+ @as("Geometry") geometry?: geometry,
43
+ @as("Country") country?: string,
44
+ @as("PostalCode") postalCode?: string,
45
+ @as("Municipality") municipality?: string,
46
+ }
47
+
48
+ type result = {
49
+ @as("Place") place?: place,
50
+ /** How well this result matches the query, 0…1 — present on results from
51
+ Esri and HERE index configurations and absent on some others, which is
52
+ why it is optional rather than defaulted. A caller that treats an absent
53
+ relevance as a perfect match is asserting something the service did not
54
+ say. */
55
+ @as("Relevance") relevance?: float,
56
+ }
57
+
58
+ type input = {
59
+ @as("IndexName") indexName: string,
60
+ @as("Text") text: string,
61
+ @as("MaxResults") maxResults?: int,
62
+ @as("Language") language?: string,
63
+ @as("FilterCountries") filterCountries?: array<string>,
64
+ }
65
+
66
+ type output = {
67
+ @as("$metadata") metadata: Metadata.t,
68
+ @as("Results") results?: array<result>,
69
+ }
70
+
71
+ @new @module("@aws-sdk/client-location")
72
+ external make: input => t = "SearchPlaceIndexForTextCommand"
73
+
74
+ module Raw = {
75
+ @send
76
+ external send: (client, t) => promise<output> = "send"
77
+ }
78
+
79
+ let send: t => promise<output> = input => Raw.send(client(), input)
80
+ }
@@ -0,0 +1,39 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+ import * as Primitive_option from "@rescript/runtime/lib/es6/Primitive_option.js";
4
+ import * as ClientLocation from "@aws-sdk/client-location";
5
+
6
+ let Raw = {};
7
+
8
+ let clientInstance = {
9
+ contents: undefined
10
+ };
11
+
12
+ function client() {
13
+ let c = clientInstance.contents;
14
+ if (c !== undefined) {
15
+ return Primitive_option.valFromOption(c);
16
+ }
17
+ let c$1 = new ClientLocation.LocationClient();
18
+ clientInstance.contents = Primitive_option.some(c$1);
19
+ return c$1;
20
+ }
21
+
22
+ let Raw$1 = {};
23
+
24
+ function send(input) {
25
+ return client().send(input);
26
+ }
27
+
28
+ let SearchPlaceIndexForTextCommand = {
29
+ Raw: Raw$1,
30
+ send: send
31
+ };
32
+
33
+ export {
34
+ Raw,
35
+ clientInstance,
36
+ client,
37
+ SearchPlaceIndexForTextCommand,
38
+ }
39
+ /* @aws-sdk/client-location Not a pure module */
package/src/S3.res CHANGED
@@ -46,6 +46,16 @@ module GetObjectCommand = {
46
46
  }
47
47
 
48
48
  let send: t => promise<output> = input => Raw.send(client(), input)
49
+
50
+ // AWS SDK v3 returns the object body as an SdkStream that adds
51
+ // `transformToString()` (UTF-8 by default) on top of the Node Readable the
52
+ // output type reflects. Bind the method here rather than inline at the call site.
53
+ @send
54
+ external transformToString: NodeStreams.Readable.t => promise<string> = "transformToString"
55
+
56
+ /** Fetch an object and return its body as a UTF-8 string. */
57
+ let getString: (~bucket: string, ~key: string) => promise<string> = (~bucket, ~key) =>
58
+ make({bucket, key})->send->Promise.then(output => output.body->transformToString)
49
59
  }
50
60
 
51
61
  module ListObjectVersionsCommand = {
package/src/S3.res.mjs CHANGED
@@ -25,9 +25,18 @@ function send(input) {
25
25
  return client().send(input);
26
26
  }
27
27
 
28
+ function getString(bucket, key) {
29
+ let input = new ClientS3.GetObjectCommand({
30
+ Bucket: bucket,
31
+ Key: key
32
+ });
33
+ return client().send(input).then(output => output.Body.transformToString());
34
+ }
35
+
28
36
  let GetObjectCommand = {
29
37
  Raw: Raw$1,
30
- send: send
38
+ send: send,
39
+ getString: getString
31
40
  };
32
41
 
33
42
  let Raw$2 = {};