@anvil-cloud/sdk 0.0.14 → 0.0.15
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/aws/cognitoAuth.ts +70 -0
- package/aws/cognitoUserPool.ts +132 -0
- package/aws/dynamoDB.ts +176 -0
- package/aws/eventBus.ts +91 -0
- package/aws/httpApi.ts +108 -0
- package/aws/index.ts +49 -0
- package/aws/lambda.ts +1 -1
- package/aws/oauthAuthorizer.ts +70 -0
- package/aws/queue.ts +156 -0
- package/aws/svelteKitSite.ts +14 -0
- package/aws/vpcEndpoint.ts +9 -4
- package/bin/aws/cognitoAuth.d.ts +36 -0
- package/bin/aws/cognitoAuth.js +53 -0
- package/bin/aws/cognitoAuth.js.map +1 -0
- package/bin/aws/cognitoUserPool.d.ts +82 -0
- package/bin/aws/cognitoUserPool.js +65 -0
- package/bin/aws/cognitoUserPool.js.map +1 -0
- package/bin/aws/dynamoDB.d.ts +115 -0
- package/bin/aws/dynamoDB.js +121 -0
- package/bin/aws/dynamoDB.js.map +1 -0
- package/bin/aws/eventBus.d.ts +47 -0
- package/bin/aws/eventBus.js +63 -0
- package/bin/aws/eventBus.js.map +1 -0
- package/bin/aws/httpApi.d.ts +66 -0
- package/bin/aws/httpApi.js +60 -0
- package/bin/aws/httpApi.js.map +1 -0
- package/bin/aws/index.d.ts +21 -0
- package/bin/aws/index.js +29 -1
- package/bin/aws/index.js.map +1 -1
- package/bin/aws/lambda.d.ts +1 -1
- package/bin/aws/oauthAuthorizer.d.ts +36 -0
- package/bin/aws/oauthAuthorizer.js +53 -0
- package/bin/aws/oauthAuthorizer.js.map +1 -0
- package/bin/aws/queue.d.ts +83 -0
- package/bin/aws/queue.js +103 -0
- package/bin/aws/queue.js.map +1 -0
- package/bin/aws/svelteKitSite.d.ts +9 -0
- package/bin/aws/svelteKitSite.js +3 -0
- package/bin/aws/svelteKitSite.js.map +1 -1
- package/bin/aws/vpcEndpoint.d.ts +9 -5
- package/bin/aws/vpcEndpoint.js +2 -1
- package/bin/aws/vpcEndpoint.js.map +1 -1
- package/bin/grants.js +4 -0
- package/bin/grants.js.map +1 -1
- package/bin/package.json +1 -1
- package/bin/types/enums/aws/index.d.ts +164 -36
- package/bin/types/enums/aws/index.js +149 -35
- package/bin/types/enums/aws/index.js.map +1 -1
- package/bin/types/input.d.ts +962 -10
- package/bin/types/output.d.ts +13 -0
- package/grants.ts +6 -1
- package/package.json +1 -1
- package/tsconfig.json +7 -0
- package/types/enums/aws/index.ts +186 -36
- package/types/input.ts +994 -10
- package/types/output.ts +14 -0
package/bin/types/output.d.ts
CHANGED
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
export declare namespace aws {
|
|
2
|
+
/**
|
|
3
|
+
* ACM certificate DNS validation CNAME record. Only populated when domain.dns: false and domain.certificateArn is omitted. Add this record in your DNS provider (e.g. Cloudflare) then re-run deploy — Anvil blocks until ACM confirms validation.
|
|
4
|
+
*/
|
|
5
|
+
interface HttpApiCertValidationCname {
|
|
6
|
+
/**
|
|
7
|
+
* The CNAME record name to add in your DNS provider.
|
|
8
|
+
*/
|
|
9
|
+
name: string;
|
|
10
|
+
/**
|
|
11
|
+
* The CNAME record value to point to.
|
|
12
|
+
*/
|
|
13
|
+
value: string;
|
|
14
|
+
}
|
|
2
15
|
}
|
|
3
16
|
export declare namespace gcp {
|
|
4
17
|
}
|
package/grants.ts
CHANGED
|
@@ -83,10 +83,15 @@ function sanitize(s: string): string {
|
|
|
83
83
|
*/
|
|
84
84
|
export function buildResourceArns(
|
|
85
85
|
baseArn: pulumi.Output<string>,
|
|
86
|
-
paths?: string[]
|
|
86
|
+
paths?: string[] | null
|
|
87
87
|
): pulumi.Output<string>[] {
|
|
88
88
|
const arns: pulumi.Output<string>[] = [baseArn];
|
|
89
89
|
|
|
90
|
+
if (paths === null) {
|
|
91
|
+
// Explicit null = base ARN only, no sub-paths (used by DynamoDB index grants)
|
|
92
|
+
return arns;
|
|
93
|
+
}
|
|
94
|
+
|
|
90
95
|
if (!paths || paths.length === 0) {
|
|
91
96
|
arns.push(pulumi.interpolate`${baseArn}/*`);
|
|
92
97
|
} else {
|
package/package.json
CHANGED
package/tsconfig.json
CHANGED
|
@@ -14,8 +14,15 @@
|
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"aws/bucket.ts",
|
|
17
|
+
"aws/cognitoAuth.ts",
|
|
18
|
+
"aws/cognitoUserPool.ts",
|
|
19
|
+
"aws/dynamoDB.ts",
|
|
20
|
+
"aws/eventBus.ts",
|
|
21
|
+
"aws/httpApi.ts",
|
|
17
22
|
"aws/index.ts",
|
|
18
23
|
"aws/lambda.ts",
|
|
24
|
+
"aws/oauthAuthorizer.ts",
|
|
25
|
+
"aws/queue.ts",
|
|
19
26
|
"aws/svelteKitSite.ts",
|
|
20
27
|
"aws/vpc.ts",
|
|
21
28
|
"aws/vpcEndpoint.ts",
|
package/types/enums/aws/index.ts
CHANGED
|
@@ -2,73 +2,211 @@
|
|
|
2
2
|
// *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
export const
|
|
5
|
+
export const CognitoUserPoolCustomAttributeType = {
|
|
6
|
+
String: "String",
|
|
7
|
+
Number: "Number",
|
|
8
|
+
DateTime: "DateTime",
|
|
9
|
+
Boolean: "Boolean",
|
|
10
|
+
} as const;
|
|
11
|
+
|
|
12
|
+
export type CognitoUserPoolCustomAttributeType = (typeof CognitoUserPoolCustomAttributeType)[keyof typeof CognitoUserPoolCustomAttributeType];
|
|
13
|
+
|
|
14
|
+
export const CognitoUserPoolIdentityProviderType = {
|
|
15
|
+
/**
|
|
16
|
+
* Google OAuth 2.0. Requires clientId and clientSecret.
|
|
17
|
+
*/
|
|
18
|
+
Google: "Google",
|
|
19
|
+
/**
|
|
20
|
+
* Facebook OAuth 2.0. Requires clientId and clientSecret.
|
|
21
|
+
*/
|
|
22
|
+
Facebook: "Facebook",
|
|
23
|
+
/**
|
|
24
|
+
* Login with Amazon. Requires clientId and clientSecret.
|
|
25
|
+
*/
|
|
26
|
+
LoginWithAmazon: "LoginWithAmazon",
|
|
27
|
+
/**
|
|
28
|
+
* Sign in with Apple. Requires clientId and clientSecret.
|
|
29
|
+
*/
|
|
30
|
+
SignInWithApple: "SignInWithApple",
|
|
31
|
+
/**
|
|
32
|
+
* Generic OIDC provider (Okta, Auth0, Microsoft Entra, etc.). Requires clientId, clientSecret, and oidcIssuer.
|
|
33
|
+
*/
|
|
34
|
+
OIDC: "OIDC",
|
|
35
|
+
/**
|
|
36
|
+
* SAML 2.0 provider (corporate SSO, Active Directory Federation Services etc.). Requires metadataUrl or metadataContent.
|
|
37
|
+
*/
|
|
38
|
+
SAML: "SAML",
|
|
39
|
+
} as const;
|
|
40
|
+
|
|
41
|
+
export type CognitoUserPoolIdentityProviderType = (typeof CognitoUserPoolIdentityProviderType)[keyof typeof CognitoUserPoolIdentityProviderType];
|
|
42
|
+
|
|
43
|
+
export const CognitoUserPoolMfaMethod = {
|
|
44
|
+
/**
|
|
45
|
+
* Time-based one-time password (authenticator app). No additional AWS resources required.
|
|
46
|
+
*/
|
|
47
|
+
TOTP: "TOTP",
|
|
6
48
|
/**
|
|
7
|
-
*
|
|
49
|
+
* SMS one-time password via SNS. Requires snsCallerArn.
|
|
8
50
|
*/
|
|
9
|
-
|
|
51
|
+
SMS: "SMS",
|
|
52
|
+
} as const;
|
|
53
|
+
|
|
54
|
+
export type CognitoUserPoolMfaMethod = (typeof CognitoUserPoolMfaMethod)[keyof typeof CognitoUserPoolMfaMethod];
|
|
55
|
+
|
|
56
|
+
export const CognitoUserPoolMfaMode = {
|
|
57
|
+
/**
|
|
58
|
+
* MFA disabled. Default.
|
|
59
|
+
*/
|
|
60
|
+
OFF: "OFF",
|
|
10
61
|
/**
|
|
11
|
-
*
|
|
62
|
+
* MFA available but not required. Users opt in.
|
|
12
63
|
*/
|
|
13
|
-
|
|
64
|
+
OPTIONAL: "OPTIONAL",
|
|
65
|
+
/**
|
|
66
|
+
* MFA required for all users.
|
|
67
|
+
*/
|
|
68
|
+
REQUIRED: "REQUIRED",
|
|
69
|
+
} as const;
|
|
70
|
+
|
|
71
|
+
export type CognitoUserPoolMfaMode = (typeof CognitoUserPoolMfaMode)[keyof typeof CognitoUserPoolMfaMode];
|
|
72
|
+
|
|
73
|
+
export const CognitoUserPoolOAuthFlow = {
|
|
14
74
|
/**
|
|
15
|
-
*
|
|
75
|
+
* Authorization code grant (PKCE). Most secure — use for all browser and server apps.
|
|
16
76
|
*/
|
|
17
|
-
|
|
77
|
+
Code: "code",
|
|
18
78
|
/**
|
|
19
|
-
*
|
|
79
|
+
* Implicit grant. Deprecated — tokens visible in browser URL. Avoid for new applications.
|
|
20
80
|
*/
|
|
21
|
-
|
|
81
|
+
Implicit: "implicit",
|
|
22
82
|
/**
|
|
23
|
-
*
|
|
83
|
+
* Client credentials grant. M2M only — no user interaction.
|
|
24
84
|
*/
|
|
25
|
-
|
|
85
|
+
Client_credentials: "client_credentials",
|
|
86
|
+
} as const;
|
|
87
|
+
|
|
88
|
+
export type CognitoUserPoolOAuthFlow = (typeof CognitoUserPoolOAuthFlow)[keyof typeof CognitoUserPoolOAuthFlow];
|
|
89
|
+
|
|
90
|
+
export const CognitoUserPoolUsernameAttribute = {
|
|
26
91
|
/**
|
|
27
|
-
*
|
|
92
|
+
* Users sign in with their email address.
|
|
28
93
|
*/
|
|
29
|
-
|
|
94
|
+
Email: "email",
|
|
30
95
|
/**
|
|
31
|
-
*
|
|
96
|
+
* Users sign in with their phone number.
|
|
32
97
|
*/
|
|
33
|
-
|
|
98
|
+
Phone_number: "phone_number",
|
|
99
|
+
} as const;
|
|
100
|
+
|
|
101
|
+
export type CognitoUserPoolUsernameAttribute = (typeof CognitoUserPoolUsernameAttribute)[keyof typeof CognitoUserPoolUsernameAttribute];
|
|
102
|
+
|
|
103
|
+
export const DynamoDBAttributeType = {
|
|
34
104
|
/**
|
|
35
|
-
*
|
|
105
|
+
* String
|
|
36
106
|
*/
|
|
37
|
-
|
|
107
|
+
S: "S",
|
|
38
108
|
/**
|
|
39
|
-
*
|
|
109
|
+
* Number
|
|
40
110
|
*/
|
|
41
|
-
|
|
111
|
+
N: "N",
|
|
42
112
|
/**
|
|
43
|
-
*
|
|
113
|
+
* Binary
|
|
44
114
|
*/
|
|
45
|
-
|
|
115
|
+
B: "B",
|
|
116
|
+
} as const;
|
|
117
|
+
|
|
118
|
+
export type DynamoDBAttributeType = (typeof DynamoDBAttributeType)[keyof typeof DynamoDBAttributeType];
|
|
119
|
+
|
|
120
|
+
export const DynamoDBProjectionType = {
|
|
46
121
|
/**
|
|
47
|
-
*
|
|
122
|
+
* All attributes are projected. Default.
|
|
48
123
|
*/
|
|
49
|
-
|
|
124
|
+
ALL: "ALL",
|
|
50
125
|
/**
|
|
51
|
-
*
|
|
126
|
+
* Only the table and GSI key attributes are projected.
|
|
52
127
|
*/
|
|
53
|
-
|
|
128
|
+
KEYS_ONLY: "KEYS_ONLY",
|
|
54
129
|
/**
|
|
55
|
-
*
|
|
130
|
+
* Only the specified nonKeyAttributes are projected in addition to keys.
|
|
56
131
|
*/
|
|
57
|
-
|
|
132
|
+
INCLUDE: "INCLUDE",
|
|
133
|
+
} as const;
|
|
134
|
+
|
|
135
|
+
export type DynamoDBProjectionType = (typeof DynamoDBProjectionType)[keyof typeof DynamoDBProjectionType];
|
|
136
|
+
|
|
137
|
+
export const DynamoDBStreamStartingPosition = {
|
|
138
|
+
/**
|
|
139
|
+
* Start reading from the oldest available record in the stream. Replays all existing records up to 24hr retention window. AWS default.
|
|
140
|
+
*/
|
|
141
|
+
TRIM_HORIZON: "TRIM_HORIZON",
|
|
142
|
+
/**
|
|
143
|
+
* Start reading from the most recent record. Only processes new events from the point of consumer creation.
|
|
144
|
+
*/
|
|
145
|
+
LATEST: "LATEST",
|
|
146
|
+
} as const;
|
|
147
|
+
|
|
148
|
+
export type DynamoDBStreamStartingPosition = (typeof DynamoDBStreamStartingPosition)[keyof typeof DynamoDBStreamStartingPosition];
|
|
149
|
+
|
|
150
|
+
export const DynamoDBStreamViewType = {
|
|
151
|
+
/**
|
|
152
|
+
* Only the new item image is written to the stream.
|
|
153
|
+
*/
|
|
154
|
+
NEW_IMAGE: "NEW_IMAGE",
|
|
155
|
+
/**
|
|
156
|
+
* Only the old item image is written to the stream.
|
|
157
|
+
*/
|
|
158
|
+
OLD_IMAGE: "OLD_IMAGE",
|
|
159
|
+
/**
|
|
160
|
+
* Both old and new item images are written to the stream.
|
|
161
|
+
*/
|
|
162
|
+
NEW_AND_OLD_IMAGES: "NEW_AND_OLD_IMAGES",
|
|
163
|
+
/**
|
|
164
|
+
* Only the key attributes are written to the stream.
|
|
165
|
+
*/
|
|
166
|
+
KEYS_ONLY: "KEYS_ONLY",
|
|
167
|
+
} as const;
|
|
168
|
+
|
|
169
|
+
export type DynamoDBStreamViewType = (typeof DynamoDBStreamViewType)[keyof typeof DynamoDBStreamViewType];
|
|
170
|
+
|
|
171
|
+
export const HttpApiMethod = {
|
|
172
|
+
/**
|
|
173
|
+
* HTTP GET — read operations.
|
|
174
|
+
*/
|
|
175
|
+
GET: "GET",
|
|
176
|
+
/**
|
|
177
|
+
* HTTP POST — create operations and async consumers (SQS, EventBridge, Step Functions).
|
|
178
|
+
*/
|
|
179
|
+
POST: "POST",
|
|
180
|
+
/**
|
|
181
|
+
* HTTP PUT — replace operations.
|
|
182
|
+
*/
|
|
183
|
+
PUT: "PUT",
|
|
184
|
+
/**
|
|
185
|
+
* HTTP PATCH — partial update operations.
|
|
186
|
+
*/
|
|
187
|
+
PATCH: "PATCH",
|
|
188
|
+
/**
|
|
189
|
+
* HTTP DELETE — delete operations.
|
|
190
|
+
*/
|
|
191
|
+
DELETE: "DELETE",
|
|
192
|
+
/**
|
|
193
|
+
* Matches all HTTP methods. Maps to the $default route key.
|
|
194
|
+
*/
|
|
195
|
+
ANY: "ANY",
|
|
58
196
|
} as const;
|
|
59
197
|
|
|
60
198
|
/**
|
|
61
|
-
*
|
|
199
|
+
* HTTP method for an API route.
|
|
62
200
|
*/
|
|
63
|
-
export type
|
|
201
|
+
export type HttpApiMethod = (typeof HttpApiMethod)[keyof typeof HttpApiMethod];
|
|
64
202
|
|
|
65
203
|
export const LambdaArchitecture = {
|
|
66
204
|
/**
|
|
67
|
-
* Graviton
|
|
205
|
+
* Graviton - 20% cheaper, better performance. Default.
|
|
68
206
|
*/
|
|
69
207
|
Arm64: "arm64",
|
|
70
208
|
/**
|
|
71
|
-
* Intel/AMD
|
|
209
|
+
* Intel/AMD - use for x86-specific native dependencies.
|
|
72
210
|
*/
|
|
73
211
|
X86_64: "x86_64",
|
|
74
212
|
} as const;
|
|
@@ -89,19 +227,19 @@ export const LambdaLogRetention = {
|
|
|
89
227
|
*/
|
|
90
228
|
LambdaLogRetention_90d: "90d",
|
|
91
229
|
/**
|
|
92
|
-
* 1 year (365 days)
|
|
230
|
+
* 1 year (365 days) - SOC 2 / ISO 27001 / PCI-DSS baseline. Default.
|
|
93
231
|
*/
|
|
94
232
|
LambdaLogRetention_1y: "1y",
|
|
95
233
|
/**
|
|
96
|
-
* 3 years (1095 days)
|
|
234
|
+
* 3 years (1095 days) - FedRAMP minimum
|
|
97
235
|
*/
|
|
98
236
|
LambdaLogRetention_3y: "3y",
|
|
99
237
|
/**
|
|
100
|
-
* 6 years (2190 days)
|
|
238
|
+
* 6 years (2190 days) - HIPAA minimum
|
|
101
239
|
*/
|
|
102
240
|
LambdaLogRetention_6y: "6y",
|
|
103
241
|
/**
|
|
104
|
-
* 7 years (2555 days)
|
|
242
|
+
* 7 years (2555 days) - IRAP minimum
|
|
105
243
|
*/
|
|
106
244
|
LambdaLogRetention_7y: "7y",
|
|
107
245
|
} as const;
|
|
@@ -110,7 +248,7 @@ export type LambdaLogRetention = (typeof LambdaLogRetention)[keyof typeof Lambda
|
|
|
110
248
|
|
|
111
249
|
export const LambdaRuntime = {
|
|
112
250
|
/**
|
|
113
|
-
* Node.js 24 (LTS)
|
|
251
|
+
* Node.js 24 (LTS) - recommended
|
|
114
252
|
*/
|
|
115
253
|
Nodejs24_x: "nodejs24.x",
|
|
116
254
|
/**
|
|
@@ -130,6 +268,18 @@ export const S3FlowLogLifecycle = {
|
|
|
130
268
|
|
|
131
269
|
export type S3FlowLogLifecycle = (typeof S3FlowLogLifecycle)[keyof typeof S3FlowLogLifecycle];
|
|
132
270
|
|
|
271
|
+
export const SiteOriginProtectionProvider = {
|
|
272
|
+
/**
|
|
273
|
+
* Cloudflare — inject x-origin-secret via a Cloudflare Transform Rule.
|
|
274
|
+
*/
|
|
275
|
+
Cloudflare: "cloudflare",
|
|
276
|
+
} as const;
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* The CDN/proxy provider sitting in front of CloudFront.
|
|
280
|
+
*/
|
|
281
|
+
export type SiteOriginProtectionProvider = (typeof SiteOriginProtectionProvider)[keyof typeof SiteOriginProtectionProvider];
|
|
282
|
+
|
|
133
283
|
export const VpcNatType = {
|
|
134
284
|
/**
|
|
135
285
|
* AWS managed NAT Gateway. One per AZ for true HA. ~$32/month per AZ plus $0.045/GB data processed.
|