@lowdefy/plugin-aws 0.0.0-experimental-20260928105334 → 0.0.0-experimental-20260928120643

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.
@@ -23,7 +23,7 @@
23
23
  properties:
24
24
  s3PostPolicyRequestId: s3_upload_policy_request
25
25
  button:
26
- icon: UploadOutlined
26
+ icon: upload
27
27
  title: Choose File
28
28
  type: default
29
29
  - id: basic_custom_icon
@@ -31,7 +31,7 @@
31
31
  properties:
32
32
  s3PostPolicyRequestId: s3_upload_policy_request
33
33
  button:
34
- icon: AiOutlineCloudUpload
34
+ icon: CloudUpload
35
35
  title: Upload to Cloud
36
36
  type: default
37
37
 
@@ -43,7 +43,7 @@
43
43
  s3PostPolicyRequestId: s3_upload_policy_request
44
44
  accept: 'image/*'
45
45
  button:
46
- icon: AiOutlinePicture
46
+ icon: image
47
47
  title: Upload Image
48
48
  type: default
49
49
  - id: accept_pdf
@@ -52,7 +52,7 @@
52
52
  s3PostPolicyRequestId: s3_upload_policy_request
53
53
  accept: '.pdf'
54
54
  button:
55
- icon: AiOutlineFilePdf
55
+ icon: FileText
56
56
  title: Upload PDF
57
57
  type: default
58
58
  - id: accept_specific
@@ -61,7 +61,7 @@
61
61
  s3PostPolicyRequestId: s3_upload_policy_request
62
62
  accept: '.jpg,.png,.gif'
63
63
  button:
64
- icon: AiOutlinePicture
64
+ icon: image
65
65
  title: Upload JPG, PNG, or GIF
66
66
  type: default
67
67
 
@@ -73,7 +73,7 @@
73
73
  s3PostPolicyRequestId: s3_upload_policy_request
74
74
  singleFile: true
75
75
  button:
76
- icon: UploadOutlined
76
+ icon: upload
77
77
  title: Upload Single File
78
78
  type: default
79
79
  - id: limit_max_three
@@ -82,7 +82,7 @@
82
82
  s3PostPolicyRequestId: s3_upload_policy_request
83
83
  maxCount: 3
84
84
  button:
85
- icon: UploadOutlined
85
+ icon: upload
86
86
  title: Upload (Max 3)
87
87
  type: default
88
88
  - id: limit_single_images
@@ -92,7 +92,7 @@
92
92
  singleFile: true
93
93
  accept: 'image/*'
94
94
  button:
95
- icon: AiOutlinePicture
95
+ icon: image
96
96
  title: Upload One Image
97
97
  type: default
98
98
 
@@ -103,7 +103,7 @@
103
103
  properties:
104
104
  s3PostPolicyRequestId: s3_upload_policy_request
105
105
  button:
106
- icon: UploadOutlined
106
+ icon: upload
107
107
  title: Upload
108
108
  type: primary
109
109
  - id: button_large
@@ -111,7 +111,7 @@
111
111
  properties:
112
112
  s3PostPolicyRequestId: s3_upload_policy_request
113
113
  button:
114
- icon: UploadOutlined
114
+ icon: upload
115
115
  title: Upload Files
116
116
  type: default
117
117
  size: large
@@ -120,7 +120,7 @@
120
120
  properties:
121
121
  s3PostPolicyRequestId: s3_upload_policy_request
122
122
  button:
123
- icon: AiOutlinePaperClip
123
+ icon: attach
124
124
  title: Attach Files
125
125
  type: default
126
126
 
@@ -137,7 +137,7 @@
137
137
  s3PostPolicyRequestId: s3_upload_policy_request
138
138
  disabled: true
139
139
  button:
140
- icon: UploadOutlined
140
+ icon: upload
141
141
  title: Upload
142
142
  type: primary
143
143
  - id: disabled_hidden_list
@@ -155,7 +155,7 @@
155
155
  s3PostPolicyRequestId: s3_upload_policy_request
156
156
  showUploadList: true
157
157
  button:
158
- icon: UploadOutlined
158
+ icon: upload
159
159
  title: Upload (List Visible)
160
160
  type: default
161
161
  - id: list_hidden
@@ -164,7 +164,7 @@
164
164
  s3PostPolicyRequestId: s3_upload_policy_request
165
165
  showUploadList: false
166
166
  button:
167
- icon: UploadOutlined
167
+ icon: upload
168
168
  title: Upload (No List)
169
169
  type: default
170
170
  - id: list_single_hidden
@@ -174,7 +174,7 @@
174
174
  singleFile: true
175
175
  showUploadList: false
176
176
  button:
177
- icon: UploadOutlined
177
+ icon: upload
178
178
  title: Upload Single (No List)
179
179
  type: default
180
180
 
@@ -214,7 +214,7 @@
214
214
  properties:
215
215
  s3PostPolicyRequestId: s3_upload_policy_request
216
216
  button:
217
- icon: UploadOutlined
217
+ icon: upload
218
218
  title: Upload
219
219
  type: default
220
220
  - id: style_label
@@ -232,7 +232,7 @@
232
232
  properties:
233
233
  s3PostPolicyRequestId: s3_upload_policy_request
234
234
  button:
235
- icon: UploadOutlined
235
+ icon: upload
236
236
  title: Upload
237
237
  type: default
238
238
 
@@ -274,7 +274,7 @@
274
274
  s3PostPolicyRequestId: s3_upload_policy_request
275
275
  accept: '.pdf,.docx,.xlsx'
276
276
  button:
277
- icon: AiOutlineFilePdf
277
+ icon: FileText
278
278
  title: Choose Document
279
279
  type: default
280
280
  label:
@@ -288,7 +288,7 @@
288
288
  title: Save Document
289
289
  color: primary
290
290
  variant: solid
291
- icon: AiOutlineSave
291
+ icon: save
292
292
  events:
293
293
  onClick:
294
294
  - id: save_validate
@@ -314,7 +314,7 @@
314
314
  singleFile: true
315
315
  accept: 'image/*'
316
316
  button:
317
- icon: AiOutlineCamera
317
+ icon: camera
318
318
  title: Choose Photo
319
319
  type: default
320
320
  label:
@@ -325,7 +325,7 @@
325
325
  required: true
326
326
  properties:
327
327
  title: Display Name
328
- prefixIcon: AiOutlineUser
328
+ prefixIcon: user
329
329
  placeholder: Enter your display name
330
330
  label:
331
331
  colon: false
@@ -337,7 +337,7 @@
337
337
  title: Update Profile
338
338
  color: primary
339
339
  variant: solid
340
- icon: AiOutlineCheck
340
+ icon: check
341
341
  events:
342
342
  onClick:
343
343
  - id: update_validate
@@ -16,7 +16,7 @@
16
16
  export default {
17
17
  category: 'input',
18
18
  icons: [
19
- 'AiOutlineUpload'
19
+ 'upload'
20
20
  ],
21
21
  valueType: 'object',
22
22
  cssKeys: {
@@ -77,7 +77,7 @@ export default {
77
77
  type: 'object',
78
78
  description: 'Button block properties. See <a href="/Button">Button</a> for all properties.',
79
79
  default: {
80
- icon: 'UploadOutlined',
80
+ icon: 'upload',
81
81
  title: 'Upload',
82
82
  type: 'default'
83
83
  },
@@ -219,7 +219,7 @@
219
219
  title: Submit
220
220
  color: primary
221
221
  variant: solid
222
- icon: AiOutlineUpload
222
+ icon: upload
223
223
  events:
224
224
  onClick:
225
225
  - id: submit_validate
@@ -265,7 +265,7 @@
265
265
  title: Upload Photos
266
266
  color: primary
267
267
  variant: solid
268
- icon: AiOutlineCloudUpload
268
+ icon: CloudUpload
269
269
  events:
270
270
  onClick:
271
271
  - id: gallery_msg
@@ -169,20 +169,20 @@
169
169
  properties:
170
170
  title: Full Name
171
171
  placeholder: Enter your name
172
- prefixIcon: AiOutlineUser
172
+ prefixIcon: user
173
173
  - id: profile_email
174
174
  type: TextInput
175
175
  properties:
176
176
  title: Email
177
177
  placeholder: you@example.com
178
- prefixIcon: AiOutlineMail
178
+ prefixIcon: mail
179
179
  - id: profile_save
180
180
  type: Button
181
181
  properties:
182
182
  title: Save Profile
183
183
  color: primary
184
184
  variant: solid
185
- icon: AiOutlineSave
185
+ icon: save
186
186
  events:
187
187
  onClick:
188
188
  - id: validate_profile
@@ -246,7 +246,7 @@
246
246
  title: List Product
247
247
  color: primary
248
248
  variant: solid
249
- icon: AiOutlineCheck
249
+ icon: check
250
250
  block: true
251
251
  events:
252
252
  onClick:
@@ -16,8 +16,8 @@
16
16
  export default {
17
17
  category: 'input',
18
18
  icons: [
19
- 'AiOutlineLoading',
20
- 'AiOutlineCamera'
19
+ 'loading',
20
+ 'camera'
21
21
  ],
22
22
  valueType: 'object',
23
23
  cssKeys: {
@@ -13,6 +13,7 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ import AwsS3GetObject from './AwsS3GetObject/AwsS3GetObject.js';
16
+ import AwsS3HeadObject from './AwsS3HeadObject/AwsS3HeadObject.js';
16
17
  import AwsS3PresignedGetObject from './AwsS3PresignedGetObject/AwsS3PresignedGetObject.js';
17
18
  import AwsS3PresignedPostPolicy from './AwsS3PresignedPostPolicy/AwsS3PresignedPostPolicy.js';
18
19
  import AwsS3PutObject from './AwsS3PutObject/AwsS3PutObject.js';
@@ -21,6 +22,7 @@ export default {
21
22
  schema,
22
23
  requests: {
23
24
  AwsS3GetObject,
25
+ AwsS3HeadObject,
24
26
  AwsS3PresignedGetObject,
25
27
  AwsS3PresignedPostPolicy,
26
28
  AwsS3PutObject
@@ -0,0 +1,69 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ import { HeadObjectCommand } from '@aws-sdk/client-s3';
16
+ import { type } from '@lowdefy/helpers';
17
+ import createS3Client from '../createS3Client.js';
18
+ import schema from './schema.js';
19
+ // A missing object is an expected answer (e.g. checking a browser upload arrived), so it is
20
+ // returned as data for the routine to act on rather than thrown. A HEAD response has no body,
21
+ // so S3 reports a missing object only through the 404 status.
22
+ async function AwsS3HeadObject({ request, connection }) {
23
+ const { bucket } = connection;
24
+ const { key, versionId } = request;
25
+ const params = {
26
+ Bucket: bucket,
27
+ Key: key
28
+ };
29
+ if (versionId) {
30
+ params.VersionId = versionId;
31
+ }
32
+ const s3 = createS3Client({
33
+ connection
34
+ });
35
+ let response;
36
+ try {
37
+ response = await s3.send(new HeadObjectCommand(params));
38
+ } catch (error) {
39
+ if (error.$metadata?.httpStatusCode === 404) {
40
+ return {
41
+ exists: false,
42
+ bucket,
43
+ key
44
+ };
45
+ }
46
+ throw error;
47
+ }
48
+ const result = {
49
+ exists: true,
50
+ bucket,
51
+ key,
52
+ size: response.ContentLength,
53
+ etag: response.ETag,
54
+ lastModified: response.LastModified
55
+ };
56
+ if (!type.isNone(response.ContentType)) {
57
+ result.contentType = response.ContentType;
58
+ }
59
+ if (!type.isNone(response.VersionId)) {
60
+ result.versionId = response.VersionId;
61
+ }
62
+ return result;
63
+ }
64
+ AwsS3HeadObject.schema = schema;
65
+ AwsS3HeadObject.meta = {
66
+ checkRead: true,
67
+ checkWrite: false
68
+ };
69
+ export default AwsS3HeadObject;
@@ -0,0 +1,42 @@
1
+ /*
2
+ Copyright 2020-2026 Lowdefy, Inc
3
+
4
+ Licensed under the Apache License, Version 2.0 (the "License");
5
+ you may not use this file except in compliance with the License.
6
+ You may obtain a copy of the License at
7
+
8
+ http://www.apache.org/licenses/LICENSE-2.0
9
+
10
+ Unless required by applicable law or agreed to in writing, software
11
+ distributed under the License is distributed on an "AS IS" BASIS,
12
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ See the License for the specific language governing permissions and
14
+ limitations under the License.
15
+ */ export default {
16
+ $schema: 'http://json-schema.org/draft-07/schema#',
17
+ title: 'Lowdefy Request Schema - AwsS3HeadObject',
18
+ type: 'object',
19
+ required: [
20
+ 'key'
21
+ ],
22
+ properties: {
23
+ key: {
24
+ type: 'string',
25
+ description: 'Key under which the object is stored.',
26
+ errorMessage: {
27
+ type: 'AwsS3HeadObject request property "key" should be a string.'
28
+ }
29
+ },
30
+ versionId: {
31
+ type: 'string',
32
+ description: 'VersionId used to reference a specific version of the object.',
33
+ errorMessage: {
34
+ type: 'AwsS3HeadObject request property "versionId" should be a string.'
35
+ }
36
+ }
37
+ },
38
+ errorMessage: {
39
+ type: 'AwsS3HeadObject request properties should be an object.',
40
+ required: 'AwsS3HeadObject request should have required property "key".'
41
+ }
42
+ };
@@ -13,6 +13,7 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ import { createPresignedPost } from '@aws-sdk/s3-presigned-post';
16
+ import { ConfigError } from '@lowdefy/errors';
16
17
  import { type } from '@lowdefy/helpers';
17
18
  import createS3Client from '../createS3Client.js';
18
19
  import schema from './schema.js';
@@ -34,7 +35,7 @@ async function AwsS3PresignedPostPolicy({ request, connection }) {
34
35
  params.Fields.acl = acl;
35
36
  }
36
37
  if (type.isObject(fields) === false) {
37
- throw new Error(`properties.fields must be an object. Received ${JSON.stringify(fields)}.`);
38
+ throw new ConfigError('AwsS3PresignedPostPolicy request "fields" must be an object.');
38
39
  }
39
40
  Object.keys(fields).forEach((field)=>{
40
41
  if (fields[field]) {
package/dist/types.js CHANGED
@@ -19,8 +19,16 @@ export default {
19
19
  connections: [
20
20
  'AwsS3Bucket'
21
21
  ],
22
+ // Non-scopable: the tenant wall does not cover object storage, so its
23
+ // connections are never scoped and accept no tenant: declaration.
24
+ connectionMetas: {
25
+ AwsS3Bucket: {
26
+ tenant: false
27
+ }
28
+ },
22
29
  requests: [
23
30
  'AwsS3GetObject',
31
+ 'AwsS3HeadObject',
24
32
  'AwsS3PresignedGetObject',
25
33
  'AwsS3PresignedPostPolicy',
26
34
  'AwsS3PutObject'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/plugin-aws",
3
- "version": "0.0.0-experimental-20260928105334",
3
+ "version": "0.0.0-experimental-20260928120643",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -35,6 +35,9 @@
35
35
  "url": "https://github.com/lowdefy/lowdefy.git"
36
36
  },
37
37
  "type": "module",
38
+ "sideEffects": [
39
+ "**/*.css"
40
+ ],
38
41
  "exports": {
39
42
  "./connections": "./dist/connections.js",
40
43
  "./blocks": "./dist/blocks.js",
@@ -47,14 +50,14 @@
47
50
  "dist/*"
48
51
  ],
49
52
  "dependencies": {
50
- "@lowdefy/block-utils": "0.0.0-experimental-20260928105334",
51
- "@lowdefy/blocks-antd": "0.0.0-experimental-20260928105334",
52
- "@lowdefy/blocks-files": "0.0.0-experimental-20260928105334",
53
- "@lowdefy/errors": "0.0.0-experimental-20260928105334",
54
- "@lowdefy/helpers": "0.0.0-experimental-20260928105334",
55
- "@aws-sdk/client-s3": "3.797.0",
56
- "@aws-sdk/s3-presigned-post": "3.797.0",
57
- "@aws-sdk/s3-request-presigner": "3.797.0"
53
+ "@lowdefy/block-utils": "0.0.0-experimental-20260928120643",
54
+ "@lowdefy/blocks-antd": "0.0.0-experimental-20260928120643",
55
+ "@lowdefy/blocks-files": "0.0.0-experimental-20260928120643",
56
+ "@lowdefy/errors": "0.0.0-experimental-20260928120643",
57
+ "@lowdefy/helpers": "0.0.0-experimental-20260928120643",
58
+ "@aws-sdk/client-s3": "3.1141.0",
59
+ "@aws-sdk/s3-presigned-post": "3.1141.0",
60
+ "@aws-sdk/s3-request-presigner": "3.1141.0"
58
61
  },
59
62
  "peerDependencies": {
60
63
  "antd": ">=6",
@@ -62,9 +65,10 @@
62
65
  "react-dom": ">=18"
63
66
  },
64
67
  "devDependencies": {
65
- "@lowdefy/ajv": "0.0.0-experimental-20260928105334",
66
- "@lowdefy/block-dev": "0.0.0-experimental-20260928105334",
67
- "@lowdefy/jest-yaml-transform": "0.0.0-experimental-20260928105334",
68
+ "@jest/globals": "28.1.3",
69
+ "@lowdefy/ajv": "0.0.0-experimental-20260928120643",
70
+ "@lowdefy/block-dev": "0.0.0-experimental-20260928120643",
71
+ "@lowdefy/jest-yaml-transform": "0.0.0-experimental-20260928120643",
68
72
  "@swc/cli": "0.8.1",
69
73
  "@swc/core": "1.15.32",
70
74
  "@swc/jest": "0.2.39",