@reventlessdev/rescript-aws-sdk 2.2.0-alpha.20

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +174 -0
  2. package/LICENSE +202 -0
  3. package/README.md +21 -0
  4. package/package.json +44 -0
  5. package/rescript.json +23 -0
  6. package/src/CloudWatchEvents.res +162 -0
  7. package/src/CloudWatchEvents.res.mjs +94 -0
  8. package/src/CognitoIdentityServiceProvider.res +117 -0
  9. package/src/CognitoIdentityServiceProvider.res.mjs +70 -0
  10. package/src/DynamoDb.res +3 -0
  11. package/src/DynamoDb.res.mjs +15 -0
  12. package/src/DynamoDb_DocumentClient.res +905 -0
  13. package/src/DynamoDb_DocumentClient.res.mjs +338 -0
  14. package/src/DynamoDb_DynamoDb.res +189 -0
  15. package/src/DynamoDb_DynamoDb.res.mjs +70 -0
  16. package/src/DynamoDb_Util.res +128 -0
  17. package/src/DynamoDb_Util.res.mjs +35 -0
  18. package/src/DynamoDb_Util_Helpers.res +7 -0
  19. package/src/DynamoDb_Util_Helpers.res.mjs +23 -0
  20. package/src/ECS.res +96 -0
  21. package/src/ECS.res.mjs +46 -0
  22. package/src/IAM.res +20 -0
  23. package/src/IAM.res.mjs +9 -0
  24. package/src/Kinesis.res +50 -0
  25. package/src/Kinesis.res.mjs +39 -0
  26. package/src/Metadata.res +9 -0
  27. package/src/Metadata.res.mjs +2 -0
  28. package/src/NodeHttpHandler.res +6 -0
  29. package/src/NodeHttpHandler.res.mjs +2 -0
  30. package/src/S3.res +152 -0
  31. package/src/S3.res.mjs +61 -0
  32. package/src/S3_Helpers.res +20 -0
  33. package/src/S3_Helpers.res.mjs +26 -0
  34. package/src/SES.res +113 -0
  35. package/src/SES.res.mjs +59 -0
  36. package/src/SNS.res +167 -0
  37. package/src/SNS.res.mjs +98 -0
  38. package/src/SNS_Helpers.res +45 -0
  39. package/src/SNS_Helpers.res.mjs +57 -0
  40. package/src/SQS.res +241 -0
  41. package/src/SQS.res.mjs +121 -0
  42. package/src/SQS_Helpers.res +267 -0
  43. package/src/SQS_Helpers.res.mjs +227 -0
  44. package/src/SecretsManager.res +61 -0
  45. package/src/SecretsManager.res.mjs +46 -0
  46. package/src/example/DynamoDbUtilExample.res +20 -0
  47. package/src/example/DynamoDbUtilExample.res.mjs +66 -0
@@ -0,0 +1,94 @@
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 NodeHttpHandler from "@smithy/node-http-handler";
5
+ import * as ClientCloudwatchEvents from "@aws-sdk/client-cloudwatch-events";
6
+
7
+ let Raw = {};
8
+
9
+ let clientInstance = {
10
+ contents: undefined
11
+ };
12
+
13
+ function client() {
14
+ let client$1 = clientInstance.contents;
15
+ if (client$1 !== undefined) {
16
+ return Primitive_option.valFromOption(client$1);
17
+ }
18
+ let client$2 = new ClientCloudwatchEvents.CloudWatchEventsClient({
19
+ maxAttempts: 3,
20
+ requestHandler: Primitive_option.some(new NodeHttpHandler.NodeHttpHandler({
21
+ connectionTimeout: 1000,
22
+ requestTimeout: 5000
23
+ }))
24
+ });
25
+ clientInstance.contents = Primitive_option.some(client$2);
26
+ return client$2;
27
+ }
28
+
29
+ let Raw$1 = {};
30
+
31
+ function send(command) {
32
+ return client().send(command);
33
+ }
34
+
35
+ let PutRuleCommand = {
36
+ Raw: Raw$1,
37
+ send: send
38
+ };
39
+
40
+ let Raw$2 = {};
41
+
42
+ function send$1(command) {
43
+ return client().send(command);
44
+ }
45
+
46
+ let DeleteRuleCommand = {
47
+ Raw: Raw$2,
48
+ send: send$1
49
+ };
50
+
51
+ let Raw$3 = {};
52
+
53
+ function send$2(command) {
54
+ return client().send(command);
55
+ }
56
+
57
+ let PutTargetsCommand = {
58
+ Raw: Raw$3,
59
+ send: send$2
60
+ };
61
+
62
+ let Raw$4 = {};
63
+
64
+ function send$3(command) {
65
+ return client().send(command);
66
+ }
67
+
68
+ let RemoveTargetsCommand = {
69
+ Raw: Raw$4,
70
+ send: send$3
71
+ };
72
+
73
+ let Raw$5 = {};
74
+
75
+ function send$4(command) {
76
+ return client().send(command);
77
+ }
78
+
79
+ let PutEventsCommand = {
80
+ Raw: Raw$5,
81
+ send: send$4
82
+ };
83
+
84
+ export {
85
+ Raw,
86
+ clientInstance,
87
+ client,
88
+ PutRuleCommand,
89
+ DeleteRuleCommand,
90
+ PutTargetsCommand,
91
+ RemoveTargetsCommand,
92
+ PutEventsCommand,
93
+ }
94
+ /* @smithy/node-http-handler Not a pure module */
@@ -0,0 +1,117 @@
1
+ /*** @aws-sdk/client-cognito-identity-provider
2
+ see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/
3
+ */
4
+ type client
5
+
6
+ type options = {
7
+ maxAttempts?: int,
8
+ requestHandler?: NodeHttpHandler.t,
9
+ endpoint?: string,
10
+ region?: string,
11
+ }
12
+
13
+ module Raw = {
14
+ @module("@aws-sdk/client-cognito-identity-provider") @new
15
+ external client: (~options: options) => client = "CognitoIdentityProviderClient"
16
+ }
17
+
18
+ let clientInstance = ref(None)
19
+
20
+ /** create a CognitoIdentityProviderClient with default values:
21
+ - maxAttempts: 3,
22
+ - connectionTimeout: 1000ms
23
+ - requestTimeout: 5000ms
24
+
25
+ use `Raw.client` if you want to set alternative configuration
26
+ */
27
+ let client = () =>
28
+ switch clientInstance.contents {
29
+ | None =>
30
+ let client = Raw.client(
31
+ ~options={
32
+ maxAttempts: 3,
33
+ requestHandler: NodeHttpHandler.make({
34
+ connectionTimeout: 1000,
35
+ requestTimeout: 5000,
36
+ }),
37
+ },
38
+ )
39
+ clientInstance := Some(client)
40
+ client
41
+ | Some(client) => client
42
+ }
43
+
44
+ module SignUpCommand = {
45
+ type t
46
+
47
+ type input = {
48
+ @as("ClientId") clientId: string,
49
+ @as("Username") username: string,
50
+ @as("Password") password: string,
51
+ }
52
+
53
+ type output = {
54
+ @as("UserConfirmed") userConfirmed?: bool,
55
+ @as("UserSub") userSub?: string,
56
+ }
57
+
58
+ @new @module("@aws-sdk/client-cognito-identity-provider")
59
+ external make: input => t = "SignUpCommand"
60
+
61
+ module Raw = {
62
+ /**
63
+ see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/SignUpCommand/,
64
+ https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/
65
+ */
66
+ @send
67
+ external send: (client, t) => promise<output> = "send"
68
+ }
69
+
70
+ let send: t => promise<output> = command => Raw.send(client(), command)
71
+ }
72
+
73
+ module AdminAddUserToGroupCommand = {
74
+ type t
75
+
76
+ type input = {
77
+ @as("Username") username: string,
78
+ @as("GroupName") groupName: string,
79
+ @as("UserPoolId") userPoolId: string,
80
+ }
81
+
82
+ @new @module("@aws-sdk/client-cognito-identity-provider")
83
+ external make: input => t = "AdminAddUserToGroupCommand"
84
+
85
+ module Raw = {
86
+ /**
87
+ see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cognito-identity-provider/Class/AdminAddUserToGroupCommand/
88
+ */
89
+ @send
90
+ external send: (client, t) => promise<unit> = "send"
91
+ }
92
+
93
+ let send: t => promise<unit> = command => Raw.send(client(), command)
94
+ }
95
+
96
+ module AdminRemoveUserFromGroupCommand = {
97
+ type t
98
+
99
+ type input = {
100
+ @as("Username") username: string,
101
+ @as("GroupName") groupName: string,
102
+ @as("UserPoolId") userPoolId: string,
103
+ }
104
+
105
+ @new @module("@aws-sdk/client-cognito-identity-provider")
106
+ external make: input => t = "AdminRemoveUserFromGroupCommand"
107
+
108
+ module Raw = {
109
+ /**
110
+ see: https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/cognito-identity-provider/command/AdminRemoveUserFromGroupCommand/
111
+ */
112
+ @send
113
+ external send: (client, t) => promise<unit> = "send"
114
+ }
115
+
116
+ let send: t => promise<unit> = command => Raw.send(client(), command)
117
+ }
@@ -0,0 +1,70 @@
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 NodeHttpHandler from "@smithy/node-http-handler";
5
+ import * as ClientCognitoIdentityProvider from "@aws-sdk/client-cognito-identity-provider";
6
+
7
+ let Raw = {};
8
+
9
+ let clientInstance = {
10
+ contents: undefined
11
+ };
12
+
13
+ function client() {
14
+ let client$1 = clientInstance.contents;
15
+ if (client$1 !== undefined) {
16
+ return Primitive_option.valFromOption(client$1);
17
+ }
18
+ let client$2 = new ClientCognitoIdentityProvider.CognitoIdentityProviderClient({
19
+ maxAttempts: 3,
20
+ requestHandler: Primitive_option.some(new NodeHttpHandler.NodeHttpHandler({
21
+ connectionTimeout: 1000,
22
+ requestTimeout: 5000
23
+ }))
24
+ });
25
+ clientInstance.contents = Primitive_option.some(client$2);
26
+ return client$2;
27
+ }
28
+
29
+ let Raw$1 = {};
30
+
31
+ function send(command) {
32
+ return client().send(command);
33
+ }
34
+
35
+ let SignUpCommand = {
36
+ Raw: Raw$1,
37
+ send: send
38
+ };
39
+
40
+ let Raw$2 = {};
41
+
42
+ function send$1(command) {
43
+ return client().send(command);
44
+ }
45
+
46
+ let AdminAddUserToGroupCommand = {
47
+ Raw: Raw$2,
48
+ send: send$1
49
+ };
50
+
51
+ let Raw$3 = {};
52
+
53
+ function send$2(command) {
54
+ return client().send(command);
55
+ }
56
+
57
+ let AdminRemoveUserFromGroupCommand = {
58
+ Raw: Raw$3,
59
+ send: send$2
60
+ };
61
+
62
+ export {
63
+ Raw,
64
+ clientInstance,
65
+ client,
66
+ SignUpCommand,
67
+ AdminAddUserToGroupCommand,
68
+ AdminRemoveUserFromGroupCommand,
69
+ }
70
+ /* @smithy/node-http-handler Not a pure module */
@@ -0,0 +1,3 @@
1
+ module DocumentClient = DynamoDb_DocumentClient
2
+ module DynamoDb = DynamoDb_DynamoDb
3
+ module Util = DynamoDb_Util
@@ -0,0 +1,15 @@
1
+ // Generated by ReScript, PLEASE EDIT WITH CARE
2
+
3
+
4
+ let DocumentClient;
5
+
6
+ let DynamoDb;
7
+
8
+ let Util;
9
+
10
+ export {
11
+ DocumentClient,
12
+ DynamoDb,
13
+ Util,
14
+ }
15
+ /* No side effect */