@reventlessdev/rescript-aws-sdk 3.0.0-alpha.11 → 3.0.0-alpha.13

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,28 @@
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.13 (2026-08-23)
7
+
8
+ * feat(aws)!: scope the active-role store to the identity provider ([08e287d](https://github.com/ReventlessDev/reventless-core/commit/08e287db9721977b818bad76671ec4c62be6f9af))
9
+
10
+ ### BREAKING CHANGES
11
+
12
+ * platform:cognitoUserPoolId is now
13
+ platform:identityProviderId (REVENTLESS_IDENTITY_PROVIDER_ID). The old
14
+ spelling is still read and warns — do not drop it until the new secret
15
+ is in place, because an unset provider id is auto mode, and auto mode
16
+ creates a new user pool.
17
+
18
+
19
+
20
+ # 3.0.0-alpha.12 (2026-08-18)
21
+
22
+ **Note:** Version bump only for package @reventlessdev/rescript-aws-sdk
23
+
24
+
25
+
26
+
27
+
6
28
  # 3.0.0-alpha.11 (2026-08-15)
7
29
 
8
30
  **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": "3.0.0-alpha.11",
3
+ "version": "3.0.0-alpha.13",
4
4
  "description": "ReScript bindings for aws-sdk",
5
5
  "license": "Apache-2.0",
6
6
  "dependencies": {
@@ -20,7 +20,7 @@
20
20
  "@aws-sdk/lib-dynamodb": "^3.1033.0",
21
21
  "@aws-sdk/lib-storage": "^3.1033.0",
22
22
  "@smithy/node-http-handler": "^4.5.3",
23
- "@reventlessdev/rescript-node": "2.0.0-alpha.7"
23
+ "@reventlessdev/rescript-node": "2.0.0-alpha.8"
24
24
  },
25
25
  "devDependencies": {
26
26
  "rescript": "12.3.0"
@@ -151,3 +151,115 @@ module AdminListGroupsForUserCommand = {
151
151
 
152
152
  let send: t => promise<output> = command => Raw.send(client(), command)
153
153
  }
154
+
155
+ module CreateUserPoolCommand = {
156
+ type t
157
+
158
+ type passwordPolicy = {
159
+ @as("MinimumLength") minimumLength?: int,
160
+ @as("RequireLowercase") requireLowercase?: bool,
161
+ @as("RequireUppercase") requireUppercase?: bool,
162
+ @as("RequireNumbers") requireNumbers?: bool,
163
+ @as("RequireSymbols") requireSymbols?: bool,
164
+ }
165
+
166
+ type policies = {@as("PasswordPolicy") passwordPolicy?: passwordPolicy}
167
+
168
+ type adminCreateUserConfig = {
169
+ @as("AllowAdminCreateUserOnly") allowAdminCreateUserOnly?: bool,
170
+ }
171
+
172
+ /** Only the members a Reventless pool is provisioned with. The API accepts far
173
+ more; an operator wanting the rest edits the pool afterwards rather than
174
+ having every setting grow a parameter here. */
175
+ type input = {
176
+ @as("PoolName") poolName: string,
177
+ @as("UsernameAttributes") usernameAttributes?: array<string>,
178
+ @as("MfaConfiguration") mfaConfiguration?: string,
179
+ @as("Policies") policies?: policies,
180
+ @as("AdminCreateUserConfig") adminCreateUserConfig?: adminCreateUserConfig,
181
+ @as("UserPoolTags") userPoolTags?: Dict.t<string>,
182
+ }
183
+
184
+ type userPoolType = {
185
+ @as("Id") id?: string,
186
+ @as("Name") name?: string,
187
+ @as("Arn") arn?: string,
188
+ }
189
+
190
+ type output = {@as("UserPool") userPool?: userPoolType}
191
+
192
+ @new @module("@aws-sdk/client-cognito-identity-provider")
193
+ external make: input => t = "CreateUserPoolCommand"
194
+
195
+ module Raw = {
196
+ /**
197
+ see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/CreateUserPoolCommand/
198
+ */
199
+ @send
200
+ external send: (client, t) => promise<output> = "send"
201
+ }
202
+
203
+ let send: t => promise<output> = command => Raw.send(client(), command)
204
+ }
205
+
206
+ module ListUserPoolsCommand = {
207
+ type t
208
+
209
+ /** `MaxResults` caps at 60, so a caller looking for a pool by name has to page.
210
+ Cognito offers no lookup by name and does not enforce name uniqueness. */
211
+ type input = {
212
+ @as("MaxResults") maxResults: int,
213
+ @as("NextToken") nextToken?: string,
214
+ }
215
+
216
+ type userPoolDescription = {
217
+ @as("Id") id?: string,
218
+ @as("Name") name?: string,
219
+ }
220
+
221
+ type output = {
222
+ @as("UserPools") userPools?: array<userPoolDescription>,
223
+ @as("NextToken") nextToken?: string,
224
+ }
225
+
226
+ @new @module("@aws-sdk/client-cognito-identity-provider")
227
+ external make: input => t = "ListUserPoolsCommand"
228
+
229
+ module Raw = {
230
+ /**
231
+ see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/ListUserPoolsCommand/
232
+ */
233
+ @send
234
+ external send: (client, t) => promise<output> = "send"
235
+ }
236
+
237
+ let send: t => promise<output> = command => Raw.send(client(), command)
238
+ }
239
+
240
+ module DescribeUserPoolCommand = {
241
+ type t
242
+
243
+ type input = {@as("UserPoolId") userPoolId: string}
244
+
245
+ type userPoolType = {
246
+ @as("Id") id?: string,
247
+ @as("Name") name?: string,
248
+ @as("Arn") arn?: string,
249
+ }
250
+
251
+ type output = {@as("UserPool") userPool?: userPoolType}
252
+
253
+ @new @module("@aws-sdk/client-cognito-identity-provider")
254
+ external make: input => t = "DescribeUserPoolCommand"
255
+
256
+ module Raw = {
257
+ /**
258
+ see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/DescribeUserPoolCommand/
259
+ */
260
+ @send
261
+ external send: (client, t) => promise<output> = "send"
262
+ }
263
+
264
+ let send: t => promise<output> = command => Raw.send(client(), command)
265
+ }
@@ -70,6 +70,39 @@ let AdminListGroupsForUserCommand = {
70
70
  send: send$3
71
71
  };
72
72
 
73
+ let Raw$5 = {};
74
+
75
+ function send$4(command) {
76
+ return client().send(command);
77
+ }
78
+
79
+ let CreateUserPoolCommand = {
80
+ Raw: Raw$5,
81
+ send: send$4
82
+ };
83
+
84
+ let Raw$6 = {};
85
+
86
+ function send$5(command) {
87
+ return client().send(command);
88
+ }
89
+
90
+ let ListUserPoolsCommand = {
91
+ Raw: Raw$6,
92
+ send: send$5
93
+ };
94
+
95
+ let Raw$7 = {};
96
+
97
+ function send$6(command) {
98
+ return client().send(command);
99
+ }
100
+
101
+ let DescribeUserPoolCommand = {
102
+ Raw: Raw$7,
103
+ send: send$6
104
+ };
105
+
73
106
  export {
74
107
  Raw,
75
108
  clientInstance,
@@ -78,5 +111,8 @@ export {
78
111
  AdminAddUserToGroupCommand,
79
112
  AdminRemoveUserFromGroupCommand,
80
113
  AdminListGroupsForUserCommand,
114
+ CreateUserPoolCommand,
115
+ ListUserPoolsCommand,
116
+ DescribeUserPoolCommand,
81
117
  }
82
118
  /* @smithy/node-http-handler Not a pure module */
@@ -231,3 +231,70 @@ module UpdateContinuousBackupsCommand = {
231
231
 
232
232
  let send: t => promise<output> = command => Raw.send(client(), command)
233
233
  }
234
+
235
+ module CreateTableCommand = {
236
+ /*** create a table
237
+
238
+ this command is not available in document-client
239
+
240
+ see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/command/CreateTableCommand/ */
241
+
242
+ type t
243
+
244
+ type attributeDefinition = {
245
+ @as("AttributeName") attributeName: string,
246
+ /** "S" | "N" | "B" */
247
+ @as("AttributeType")
248
+ attributeType: string,
249
+ }
250
+
251
+ type input = {
252
+ @as("TableName") tableName: string,
253
+ @as("KeySchema") keySchema: array<DescribeTableCommand.keySchemaElement>,
254
+ @as("AttributeDefinitions") attributeDefinitions: array<attributeDefinition>,
255
+ /** "PROVISIONED" | "PAY_PER_REQUEST" */
256
+ @as("BillingMode")
257
+ billingMode?: string,
258
+ @as("Tags") tags?: array<Dict.t<string>>,
259
+ }
260
+
261
+ type output = {@as("$metadata") metadata: Metadata.t}
262
+
263
+ @new @module("@aws-sdk/client-dynamodb")
264
+ external make: input => t = "CreateTableCommand"
265
+
266
+ module Raw = {
267
+ @send
268
+ external send: (client, t) => promise<output> = "send"
269
+ }
270
+
271
+ let send: t => promise<output> = command => Raw.send(client(), command)
272
+ }
273
+
274
+ module TableExistsWaiter = {
275
+ /*** block until a table reports ACTIVE.
276
+
277
+ 🚨 **Does not reject on failure.** The SDK's waiters resolve with a `state` of
278
+ `"SUCCESS"`, `"FAILURE"`, `"TIMEOUT"` or `"RETRY"` — so a caller that only
279
+ awaits this treats a timeout as success. Check [result.state].
280
+
281
+ see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/dynamodb/#waiters */
282
+
283
+ type config = {
284
+ client: client,
285
+ /** seconds */
286
+ maxWaitTime: int,
287
+ }
288
+
289
+ type params = {@as("TableName") tableName: string}
290
+
291
+ type result = {state: string}
292
+
293
+ @module("@aws-sdk/client-dynamodb")
294
+ external waitUntilTableExists: (config, params) => promise<result> = "waitUntilTableExists"
295
+
296
+ let succeeded = (result: result): bool => result.state == "SUCCESS"
297
+
298
+ let wait = (~tableName: string, ~maxWaitTime: int=300): promise<result> =>
299
+ waitUntilTableExists({client: client(), maxWaitTime}, {tableName: tableName})
300
+ }
@@ -70,6 +70,36 @@ let UpdateContinuousBackupsCommand = {
70
70
  send: send$3
71
71
  };
72
72
 
73
+ let Raw$5 = {};
74
+
75
+ function send$4(command) {
76
+ return client().send(command);
77
+ }
78
+
79
+ let CreateTableCommand = {
80
+ Raw: Raw$5,
81
+ send: send$4
82
+ };
83
+
84
+ function succeeded(result) {
85
+ return result.state === "SUCCESS";
86
+ }
87
+
88
+ function wait(tableName, maxWaitTimeOpt) {
89
+ let maxWaitTime = maxWaitTimeOpt !== undefined ? maxWaitTimeOpt : 300;
90
+ return ClientDynamodb.waitUntilTableExists({
91
+ client: client(),
92
+ maxWaitTime: maxWaitTime
93
+ }, {
94
+ TableName: tableName
95
+ });
96
+ }
97
+
98
+ let TableExistsWaiter = {
99
+ succeeded: succeeded,
100
+ wait: wait
101
+ };
102
+
73
103
  export {
74
104
  Raw,
75
105
  clientInstance,
@@ -78,5 +108,7 @@ export {
78
108
  UpdateTableCommand,
79
109
  UpdateTimeToLiveCommand,
80
110
  UpdateContinuousBackupsCommand,
111
+ CreateTableCommand,
112
+ TableExistsWaiter,
81
113
  }
82
114
  /* @aws-sdk/client-dynamodb Not a pure module */