@reventlessdev/rescript-aws-sdk 3.0.0-alpha.2 → 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 +7 -0
- package/package.json +2 -1
- package/src/Location.res +80 -0
- package/src/Location.res.mjs +39 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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
|
+
|
|
6
13
|
# 3.0.0-alpha.2 (2026-08-02)
|
|
7
14
|
|
|
8
15
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reventlessdev/rescript-aws-sdk",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
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",
|
package/src/Location.res
ADDED
|
@@ -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 */
|