Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat: upsert/read extensionless s3 keys with legacy support (#2039)

gbirmana2487ab72b99
diff --git a/rust/cloud-storage/Cargo.lock b/rust/cloud-storage/Cargo.lock
index 5ff58e7159..de8175ac1c 100644
--- a/rust/cloud-storage/Cargo.lock
+++ b/rust/cloud-storage/Cargo.lock
@@ -8833,6 +8833,7 @@ dependencies = [
"anyhow",
"aws-sdk-sqs",
"aws_lambda_events",
+ "document_storage_service_client",
"lambda_runtime",
"macro_aws_config",
"macro_entrypoint",
diff --git a/rust/cloud-storage/document_storage_service/src/api/documents/copy_document/copy_document_v2.rs b/rust/cloud-storage/document_storage_service/src/api/documents/copy_document/copy_document_v2.rs
index 859cc480df..e8eed9e028 100644
--- a/rust/cloud-storage/document_storage_service/src/api/documents/copy_document/copy_document_v2.rs
+++ b/rust/cloud-storage/document_storage_service/src/api/documents/copy_document/copy_document_v2.rs
@@ -1,4 +1,4 @@
-use crate::api::context::ApiContext;
+use crate::{api::context::ApiContext, service::s3::S3};
use axum::{http::StatusCode, response::Response};
use document_sub_type::DocumentSubType;
use macro_db_client::history::upsert_user_history;
@@ -9,13 +9,33 @@ use model::{document::FileTypeExt, sync_service::SyncServiceVersionID};
use model::{
document::{
BomPart, CONVERTED_DOCUMENT_FILE_NAME, DocumentMetadata, FileType,
- build_cloud_storage_bucket_document_key,
+ build_cloud_storage_bucket_document_key, build_extensionless_document_key,
},
response::GenericResponse,
};
use models_permissions::share_permission::SharePermissionV2;
use system_properties::SystemPropertiesService;
+async fn resolve_source_key(
+ s3_client: &S3,
+ owner: &str,
+ document_id: &str,
+ document_version_id: i64,
+ file_type_str: Option<&str>,
+) -> anyhow::Result<String> {
+ let extensionless = build_extensionless_document_key(owner, document_id, document_version_id);
+ if s3_client.exists(&extensionless).await? {
+ Ok(extensionless)
+ } else {
+ Ok(build_cloud_storage_bucket_document_key(
+ owner,
+ document_id,
+ document_version_id,
+ file_type_str,
+ ))
+ }
+}
+
#[tracing::instrument(skip(ctx))]
pub async fn copy_document<'a>(
ctx: &'a ApiContext,
@@ -133,24 +153,31 @@ pub async fn copy_document<'a>(
})?
.0;
- let url_encoded_owner = urlencoding::encode(original_document_metadata.owner.as_ref());
let file_type_str = file_type.map(|s| s.as_str());
- // Get the source document key
- let source_key = build_cloud_storage_bucket_document_key(
- &url_encoded_owner,
- &original_document_metadata.document_id,
- document_version_id,
- file_type_str,
- );
-
- let dest_key = build_cloud_storage_bucket_document_key(
+ let dest_key = build_extensionless_document_key(
user_id.as_ref(),
&updated_document_metadata.document_id,
updated_document_metadata.document_version_id,
- file_type_str,
);
+ let source_key = resolve_source_key(
+ &ctx.s3_client,
+ original_document_metadata.owner.as_ref(),
+ &original_document_metadata.document_id,
+ document_version_id,
+ file_type_str,
+ )
+ .await
+ .map_err(|e| {
+ tracing::error!(error=?e, "unable to resolve source key");
+ (
+ Some(updated_document_metadata.document_id.clone()),
+ e,
+ "unable to resolve source key",
+ )
+ })?;
+
let _ = ctx
.s3_client
.copy_document(&source_key, &dest_key)
@@ -211,24 +238,31 @@ pub async fn copy_document<'a>(
.0
};
- let url_encoded_owner = urlencoding::encode(original_document_metadata.owner.as_ref());
let file_type_str = file_type.map(|s| s.as_str());
- // Get the source document key
- let source_key = build_cloud_storage_bucket_document_key(
- &url_encoded_owner,
- &original_document_metadata.document_id,
- document_version_id,
- file_type_str,
- );
-
- let dest_key = build_cloud_storage_bucket_document_key(
+ let dest_key = build_extensionless_document_key(
user_id.as_ref(),
&updated_document_metadata.document_id,
updated_document_metadata.document_version_id,
- file_type_str,
);
+ let source_key = resolve_source_key(
+ &ctx.s3_client,
+ original_document_metadata.owner.as_ref(),
+ &original_document_metadata.document_id,
+ document_version_id,
+ file_type_str,
+ )
+ .await
+ .map_err(|e| {
+ tracing::error!(error=?e, "unable to resolve source key");
+ (
+ Some(updated_document_metadata.document_id.clone()),
+ e,
+ "unable to resolve source key",
+ )
+ })?;
+
// handle non live collab
ctx.s3_client
.copy_document(&source_key, &dest_key)
diff --git a/rust/cloud-storage/document_storage_service/src/api/documents/get_document_key.rs b/rust/cloud-storage/document_storage_service/src/api/documents/get_document_key.rs
index 6415bebc20..f44a5eeb93 100644
--- a/rust/cloud-storage/document_storage_service/src/api/documents/get_document_key.rs
+++ b/rust/cloud-storage/document_storage_service/src/api/documents/get_document_key.rs
@@ -1,16 +1,17 @@
use std::str::FromStr;
+use crate::api::context::ApiContext;
use crate::model::response::documents::get::{GetDocumentKeyResponse, GetDocumentKeyResponseData};
use axum::extract::State;
use axum::{Extension, extract::Path, http::StatusCode, response::IntoResponse};
use macro_middleware::cloud_storage::ensure_access::document::DocumentAccessExtractor;
use model::document::{
CONVERTED_DOCUMENT_FILE_NAME, FileType, build_cloud_storage_bucket_document_key,
+ build_extensionless_document_key,
};
use model::response::GenericErrorResponse;
use model::{document::DocumentBasic, response::GenericResponse, user::UserContext};
use models_permissions::share_permission::access_level::ViewAccessLevel;
-use sqlx::PgPool;
#[derive(serde::Deserialize)]
pub struct Params {
@@ -33,10 +34,10 @@ pub struct Params {
(status = 500, body=GenericErrorResponse),
)
)]
-#[tracing::instrument(skip(db, user_context, document_context, _access), fields(user_id=?user_context.user_id, file_type=?document_context.file_type))]
+#[tracing::instrument(skip(state, user_context, document_context, _access), fields(user_id=?user_context.user_id, file_type=?document_context.file_type))]
pub async fn get_document_key_handler(
_access: DocumentAccessExtractor<ViewAccessLevel>,
- State(db): State<PgPool>,
+ State(state): State<ApiContext>,
user_context: Extension<UserContext>,
document_context: Extension<DocumentBasic>,
Path(Params {
@@ -65,7 +66,9 @@ pub async fn get_document_key_handler(
let key = match file_type {
FileType::Pdf => {
let document_version_id =
- match macro_db_client::document::get_document_version_id(&db, &document_id).await {
+ match macro_db_client::document::get_document_version_id(&state.db, &document_id)
+ .await
+ {
Ok(document_version_id) => document_version_id.0,
Err(e) => {
tracing::error!(error=?e, "unable to get document version id");
@@ -76,12 +79,32 @@ pub async fn get_document_key_handler(
}
};
- build_cloud_storage_bucket_document_key(
+ // Try extensionless key first, fall back to legacy key with extension
+ let extensionless_key = build_extensionless_document_key(
document_context.owner.as_ref(),
&document_id,
document_version_id,
- Some(file_type.as_str()),
- )
+ );
+ let extensionless_exists = match state.s3_client.exists(&extensionless_key).await {
+ Ok(exists) => exists,
+ Err(e) => {
+ tracing::error!(error=?e, "unable to check if extensionless key exists");
+ return GenericResponse::builder()
+ .message("unable to check document key")
+ .is_error(true)
+ .send(StatusCode::INTERNAL_SERVER_ERROR);
+ }
+ };
+ if extensionless_exists {
+ extensionless_key
+ } else {
+ build_cloud_storage_bucket_document_key(
+ document_context.owner.as_ref(),
+ &document_id,
+ document_version_id,
+ Some(file_type.as_str()),
+ )
+ }
}
FileType::Docx => {
format!(
diff --git a/rust/cloud-storage/document_storage_service/src/api/documents/initialize_user_documents.rs b/rust/cloud-storage/document_storage_service/src/api/documents/initialize_user_documents.rs
index 66b35e858a..6f16b3fdee 100644
--- a/rust/cloud-storage/document_storage_service/src/api/documents/initialize_user_documents.rs
+++ b/rust/cloud-storage/document_storage_service/src/api/documents/initialize_user_documents.rs
@@ -6,7 +6,7 @@ use axum::{
use futures::StreamExt;
use macro_user_id::cowlike::CowLike;
use model::{
- document::{BasicDocument, build_cloud_storage_bucket_document_key},
+ document::{BasicDocument, build_extensionless_document_key},
response::{ErrorResponse, GenericErrorResponse, GenericSuccessResponse},
};
use model_user::axum_extractor::MacroUserExtractor;
@@ -168,11 +168,10 @@ pub async fn handler(
None => format!("{ONBOARDING_FOLDER_NAME}/{}", uri_document_name),
};
- let target_key = build_cloud_storage_bucket_document_key(
+ let target_key = build_extensionless_document_key(
user_id.as_ref(),
&document.document_id,
document.document_version_id,
- deref_file_type,
);
match deref_file_type {
diff --git a/rust/cloud-storage/document_storage_service/src/api/documents/location.rs b/rust/cloud-storage/document_storage_service/src/api/documents/location.rs
index 7b2c467a8f..43bd754b27 100644
--- a/rust/cloud-storage/document_storage_service/src/api/documents/location.rs
+++ b/rust/cloud-storage/document_storage_service/src/api/documents/location.rs
@@ -22,7 +22,8 @@ use cloudfront_sign::{SignedOptions, get_signed_url};
use model::{
document::{
CONVERTED_DOCUMENT_FILE_NAME, DocumentBasic, FileType, FileTypeExt,
- build_cloud_storage_bucket_document_key, response::LocationResponseData,
+ build_cloud_storage_bucket_document_key, build_extensionless_document_key,
+ response::LocationResponseData,
},
response::{GenericErrorResponse, GenericResponse, PresignedUrl},
user::UserContext,
@@ -127,25 +128,42 @@ async fn get_editable_url(
.0
};
- let document_key = build_cloud_storage_bucket_document_key(
- &url_encoded_owner,
- document_id,
- document_version_id,
- Some(file_type),
- );
+ // Try extensionless key first, fall back to legacy key with extension
+ let extensionless_key =
+ build_extensionless_document_key(owner, document_id, document_version_id);
+ let extensionless_exists = verify_file_exists(&state.s3_client, &extensionless_key).await?;
+ let document_key = if extensionless_exists {
+ build_extensionless_document_key(&url_encoded_owner, document_id, document_version_id)
+ } else {
+ build_cloud_storage_bucket_document_key(
+ &url_encoded_owner,
+ document_id,
+ document_version_id,
+ Some(file_type),
+ )
+ };
// Check if the item exists in s3
#[cfg(feature = "location_check")]
{
// NOTE: owner is not url encoded
- let document_key = build_cloud_storage_bucket_document_key(
- owner,
- document_id,
- document_version_id,
- Some(file_type),
- );
- tracing::trace!("checking if file exists in s3, key: {}", document_key);
- let exists = verify_file_exists(&state.s3_client, &document_key).await?;
+ let check_key = if verify_file_exists(
+ &state.s3_client,
+ &build_extensionless_document_key(owner, document_id, document_version_id),
+ )
+ .await?
+ {
+ build_extensionless_document_key(owner, document_id, document_version_id)
+ } else {
+ build_cloud_storage_bucket_document_key(
+ owner,
+ document_id,
+ document_version_id,
+ Some(file_type),
+ )
+ };
+ tracing::trace!("checking if file exists in s3, key: {}", check_key);
+ let exists = verify_file_exists(&state.s3_client, &check_key).await?;
if !exists {
anyhow::bail!(DOCUMENT_DOES_NOT_EXIST);
}
@@ -188,26 +206,43 @@ pub(in crate::api::documents) async fn get_static_url(
let (document_version_id, _) =
macro_db_client::document::get_document_version_id(&state.db, document_id).await?;
+ // Try extensionless key first, fall back to legacy key with extension
+ let extensionless_key =
+ build_extensionless_document_key(owner, document_id, document_version_id);
let file_type_str = file_type.as_ref().map(|s| s.as_str());
- let document_key = build_cloud_storage_bucket_document_key(
- &url_encoded_owner,
- document_id,
- document_version_id,
- file_type_str,
- );
+ let extensionless_exists = verify_file_exists(&state.s3_client, &extensionless_key).await?;
+ let document_key = if extensionless_exists {
+ build_extensionless_document_key(&url_encoded_owner, document_id, document_version_id)
+ } else {
+ build_cloud_storage_bucket_document_key(
+ &url_encoded_owner,
+ document_id,
+ document_version_id,
+ file_type_str,
+ )
+ };
// Check if the item exists in s3
#[cfg(feature = "location_check")]
{
// NOTE: owner is not url encoded
- let document_key = build_cloud_storage_bucket_document_key(
- owner,
- document_id,
- document_version_id,
- file_type_str,
- );
- tracing::trace!("checking if file exists in s3, key: {}", document_key);
- let exists = verify_file_exists(&state.s3_client, &document_key).await?;
+ let check_key = if verify_file_exists(
+ &state.s3_client,
+ &build_extensionless_document_key(owner, document_id, document_version_id),
+ )
+ .await?
+ {
+ build_extensionless_document_key(owner, document_id, document_version_id)
+ } else {
+ build_cloud_storage_bucket_document_key(
+ owner,
+ document_id,
+ document_version_id,
+ file_type_str,
+ )
+ };
+ tracing::trace!("checking if file exists in s3, key: {}", check_key);
+ let exists = verify_file_exists(&state.s3_client, &check_key).await?;
if !exists {
anyhow::bail!(DOCUMENT_DOES_NOT_EXIST);
}
diff --git a/rust/cloud-storage/document_storage_service/src/api/documents/save_document/save_document_handler.rs b/rust/cloud-storage/document_storage_service/src/api/documents/save_document/save_document_handler.rs
index 398cefc396..a7af60f788 100644
--- a/rust/cloud-storage/document_storage_service/src/api/documents/save_document/save_document_handler.rs
+++ b/rust/cloud-storage/document_storage_service/src/api/documents/save_document/save_document_handler.rs
@@ -18,7 +18,7 @@ use macro_middleware::cloud_storage::ensure_access::{
};
use model::document::response::DocumentResponseMetadata;
use model::{
- document::{DocumentBasic, FileType, FileTypeExt, build_cloud_storage_bucket_document_key},
+ document::{DocumentBasic, FileType, FileTypeExt},
response::{ErrorResponse, GenericErrorResponse, GenericResponse},
user::UserContext,
};
@@ -124,8 +124,6 @@ pub async fn save_document_handler(
// a sha
}
- let sha = req.sha.clone();
-
let document_metadata: DocumentResponseMetadata = match save_document(
&ctx.db,
&ctx.redis_client,
@@ -156,46 +154,10 @@ pub async fn save_document_handler(
}
};
- // If the document is a monaco file, we will need to generate a presigned url to save the file
- let presigned_url: Option<String> = if file_type == FileType::Py || file_type == FileType::Js {
- let key = build_cloud_storage_bucket_document_key(
- document_metadata.owner.as_ref(),
- &document_metadata.document_id,
- document_metadata.document_version_id,
- Some(file_type.as_str()),
- );
- // We've already validated that the sha is present for monaco files
- let sha = sha.unwrap();
- match ctx
- .s3_client
- .put_document_storage_presigned_url(&key, &sha, file_type.into())
- .await
- {
- Ok(presigned_url) => Some(presigned_url),
- Err(e) => {
- tracing::error!(error=?e, "unable to generate presigned url");
- // Cleanup document version on error
- utils::cleanup_document_version_on_error(
- &ctx.db,
- &document_metadata.document_id,
- document_metadata.document_version_id,
- file_type.as_str(),
- )
- .await;
- return GenericResponse::builder()
- .message("unable to save document")
- .is_error(true)
- .send(StatusCode::INTERNAL_SERVER_ERROR);
- }
- }
- } else {
- None
- };
-
GenericResponse::builder()
.data(&SaveDocumentResponseData {
document_metadata,
- presigned_url,
+ presigned_url: None,
})
.send(StatusCode::OK)
}
diff --git a/rust/cloud-storage/document_storage_service/src/api/documents/simple_save.rs b/rust/cloud-storage/document_storage_service/src/api/documents/simple_save.rs
index 3d4af964c3..c2e628323f 100644
--- a/rust/cloud-storage/document_storage_service/src/api/documents/simple_save.rs
+++ b/rust/cloud-storage/document_storage_service/src/api/documents/simple_save.rs
@@ -14,7 +14,7 @@ use axum::{
use macro_middleware::cloud_storage::ensure_access::document::DocumentAccessExtractor;
use model::document::response::DocumentResponseMetadata;
use model::{
- document::{DocumentBasic, FileType, FileTypeExt, build_cloud_storage_bucket_document_key},
+ document::{DocumentBasic, FileType, FileTypeExt, build_extensionless_document_key},
response::{GenericErrorResponse, GenericResponse},
user::UserContext,
};
@@ -114,11 +114,10 @@ pub async fn handler(
}
};
- let key = build_cloud_storage_bucket_document_key(
+ let key = build_extensionless_document_key(
document.owner.as_ref(),
&document.document_id,
document.document_version_id,
- Some(file_type.as_str()),
);
if let Err(e) = state.s3_client.upload_document(&key, file_content).await {
diff --git a/rust/cloud-storage/document_storage_service/src/api/projects/upload_folder.rs b/rust/cloud-storage/document_storage_service/src/api/projects/upload_folder.rs
index d2b311e309..18cf7f50fa 100644
--- a/rust/cloud-storage/document_storage_service/src/api/projects/upload_folder.rs
+++ b/rust/cloud-storage/document_storage_service/src/api/projects/upload_folder.rs
@@ -12,8 +12,8 @@ use axum::{
use macro_user_id::user_id::MacroUserIdStr;
use model::{
document::{
- ContentType, DocumentMetadata, FileType, build_cloud_storage_bucket_document_key,
- build_docx_staging_bucket_document_key,
+ ContentType, DocumentMetadata, FileType, build_docx_staging_bucket_document_key,
+ build_extensionless_document_key,
},
folder::{
FileSystemNode, S3Destination, S3DestinationMap, UploadFolderRequest,
@@ -273,11 +273,10 @@ async fn build_documents(
.transpose()?;
let sha = document.sha.clone().context("document needs a sha")?;
if file_type != Some(FileType::Docx) {
- let key = build_cloud_storage_bucket_document_key(
+ let key = build_extensionless_document_key(
document.owner.as_ref(),
&document.document_id,
document.document_version_id,
- file_type.as_ref().map(|s| s.as_str()),
);
match internal {
diff --git a/rust/cloud-storage/document_storage_service/src/service/s3/exists.rs b/rust/cloud-storage/document_storage_service/src/service/s3/exists.rs
index 62da013194..7977830b15 100644
--- a/rust/cloud-storage/document_storage_service/src/service/s3/exists.rs
+++ b/rust/cloud-storage/document_storage_service/src/service/s3/exists.rs
@@ -2,15 +2,12 @@ use anyhow::Context;
use aws_sdk_s3::{self as s3};
/// Checks if a given key exists in the bucket
-#[tracing::instrument(skip(client))]
+#[tracing::instrument(skip(client), err)]
pub(in crate::service::s3) async fn exists(
client: &s3::Client,
bucket: &str,
key: &str,
) -> anyhow::Result<bool> {
- if cfg!(feature = "local") {
- return Ok(true);
- }
let resp = client.head_object().bucket(bucket).key(key).send().await;
match resp {
diff --git a/rust/cloud-storage/document_text_extractor/.sqlx/query-2c523a7a5cc018de790645eef920861ebc4fc1a28d0a6e14ee1aed1d472ff87a.json b/rust/cloud-storage/document_text_extractor/.sqlx/query-2c523a7a5cc018de790645eef920861ebc4fc1a28d0a6e14ee1aed1d472ff87a.json
new file mode 100644
index 0000000000..6f5cf33ea1
--- /dev/null
+++ b/rust/cloud-storage/document_text_extractor/.sqlx/query-2c523a7a5cc018de790645eef920861ebc4fc1a28d0a6e14ee1aed1d472ff87a.json
@@ -0,0 +1,22 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "SELECT \"fileType\" as \"file_type?\" FROM \"Document\" WHERE id = $1",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "file_type?",
+ "type_info": "Text"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "Text"
+ ]
+ },
+ "nullable": [
+ true
+ ]
+ },
+ "hash": "2c523a7a5cc018de790645eef920861ebc4fc1a28d0a6e14ee1aed1d472ff87a"
+}
diff --git a/rust/cloud-storage/document_text_extractor/.sqlx/query-e391a087b5f09e97e6c980046dd9c898b9eb41c7d144d81eae77c64bc354b44c.json b/rust/cloud-storage/document_text_extractor/.sqlx/query-e391a087b5f09e97e6c980046dd9c898b9eb41c7d144d81eae77c64bc354b44c.json
deleted file mode 100644
index eb110885a4..0000000000
--- a/rust/cloud-storage/document_text_extractor/.sqlx/query-e391a087b5f09e97e6c980046dd9c898b9eb41c7d144d81eae77c64bc354b44c.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n SELECT\n d.id as document_id,\n d.owner as owner,\n d.\"fileType\" as \"file_type!\",\n d.\"createdAt\"::timestamptz as \"created_at\",\n d.\"updatedAt\"::timestamptz as \"updated_at\",\n d.\"deletedAt\"::timestamptz as \"deleted_at\"\n FROM\n \"Document\" d\n WHERE\n d.id = $1\n ",
- "describe": {
- "columns": [
- {
- "ordinal": 0,
- "name": "document_id",
- "type_info": "Text"
- },
- {
- "ordinal": 1,
- "name": "owner",
- "type_info": "Text"
- },
- {
- "ordinal": 2,
- "name": "file_type!",
- "type_info": "Text"
- },
- {
- "ordinal": 3,
- "name": "created_at",
- "type_info": "Timestamptz"
- },
- {
- "ordinal": 4,
- "name": "updated_at",
- "type_info": "Timestamptz"
- },
- {
- "ordinal": 5,
- "name": "deleted_at",
- "type_info": "Timestamptz"
- }
- ],
- "parameters": {
- "Left": [
- "Text"
- ]
- },
- "nullable": [
- false,
- false,
- true,
- null,
- null,
- null
- ]
- },
- "hash": "e391a087b5f09e97e6c980046dd9c898b9eb41c7d144d81eae77c64bc354b44c"
-}
diff --git a/rust/cloud-storage/document_text_extractor/src/handler/extract_text_citations.rs b/rust/cloud-storage/document_text_extractor/src/handler/extract_text_citations.rs
index e7a30ac572..0a86eec537 100644
--- a/rust/cloud-storage/document_text_extractor/src/handler/extract_text_citations.rs
+++ b/rust/cloud-storage/document_text_extractor/src/handler/extract_text_citations.rs
@@ -150,18 +150,35 @@ pub async fn extract_text_from_document(
s3_client: Arc<service::s3::S3>,
db: Arc<service::db::DB>,
) -> Result<Option<DocumentKeyParts>, Error> {
- // If the key does not end with .pdf, we don't care about it
- // No need to error out, since this is the expected behavior
- if !key.ends_with(".pdf") {
- tracing::info!("skipping non-pdf file for extraction");
- return Ok(None);
- }
-
let document_key_parts = DocumentKeyParts::from_s3_key(key).map_err(|e| {
tracing::error!(error=?e, "invalid key format");
Error::from("invalid key format")
})?;
+ // For legacy keys with extension, check the extension directly
+ // For extensionless keys, look up file type from DB
+ if document_key_parts.has_extension {
+ if !key.ends_with(".pdf") {
+ tracing::info!("skipping non-pdf file for extraction");
+ return Ok(None);
+ }
+ } else {
+ let file_type = db
+ .get_document_file_type(&document_key_parts.document_id)
+ .await
+ .map_err(|e| {
+ tracing::error!(error=?e, "unable to get file type from db");
+ Error::from("unable to get file type from db")
+ })?;
+ match file_type {
+ Some(model::document::FileType::Pdf) => {}
+ _ => {
+ tracing::info!(file_type=?file_type, "skipping non-pdf file for extraction");
+ return Ok(None);
+ }
+ }
+ }
+
let document_id = &document_key_parts.document_id;
tracing::info!(document_id=%document_id, "starting extracting text process for document");
diff --git a/rust/cloud-storage/document_text_extractor/src/model/key.rs b/rust/cloud-storage/document_text_extractor/src/model/key.rs
index 250f5fa32a..05e78adc54 100644
--- a/rust/cloud-storage/document_text_extractor/src/model/key.rs
+++ b/rust/cloud-storage/document_text_extractor/src/model/key.rs
@@ -6,12 +6,14 @@ pub struct DocumentKeyParts {
pub user_id: String,
pub document_id: String,
pub document_version_id: String,
+ pub has_extension: bool,
}
impl DocumentKeyParts {
#[tracing::instrument]
pub fn from_s3_key(key: &str) -> Result<Self, anyhow::Error> {
- // user_id/document_id/document_bom_id.docx
+ // Supports both legacy keys (user_id/document_id/version.ext)
+ // and extensionless keys (user_id/document_id/version)
let split = key.split("/").collect::<Vec<&str>>();
if split.len() != 3 {
anyhow::bail!("invalid key format");
@@ -19,19 +21,33 @@ impl DocumentKeyParts {
let encoded_user_id = split[0].to_string();
let user_id = urlencoding::decode(&encoded_user_id).context("UTF-8")?;
- let document_bom_id = split[2].split(".").collect::<Vec<&str>>()[0];
+
+ let file_parts: Vec<&str> = split[2].split(".").collect();
+ let (document_version_id, has_extension) = if file_parts.len() == 2 {
+ (file_parts[0].to_string(), true)
+ } else {
+ (split[2].to_string(), false)
+ };
Ok(Self {
user_id: user_id.to_string(),
document_id: split[1].to_string(),
- document_version_id: document_bom_id.to_string(),
+ document_version_id,
+ has_extension,
})
}
pub fn to_key(&self) -> String {
- format!(
- "{}/{}/{}.pdf",
- self.user_id, self.document_id, self.document_version_id
- )
+ if self.has_extension {
+ format!(
+ "{}/{}/{}.pdf",
+ self.user_id, self.document_id, self.document_version_id
+ )
+ } else {
+ format!(
+ "{}/{}/{}",
+ self.user_id, self.document_id, self.document_version_id
+ )
+ }
}
}
diff --git a/rust/cloud-storage/document_text_extractor/src/service/db/get_document_file_type.rs b/rust/cloud-storage/document_text_extractor/src/service/db/get_document_file_type.rs
new file mode 100644
index 0000000000..e37ec6c667
--- /dev/null
+++ b/rust/cloud-storage/document_text_extractor/src/service/db/get_document_file_type.rs
@@ -0,0 +1,24 @@
+use anyhow::Result;
+use model::document::FileType;
+use sqlx::{Pool, Postgres};
+use std::str::FromStr;
+
+#[tracing::instrument(skip(db))]
+pub async fn get_document_file_type(
+ db: &Pool<Postgres>,
+ document_id: &str,
+) -> Result<Option<FileType>> {
+ let file_type: Option<String> = sqlx::query_scalar!(
+ r#"SELECT "fileType" as "file_type?" FROM "Document" WHERE id = $1"#,
+ document_id,
+ )
+ .fetch_one(db)
+ .await?;
+
+ match file_type {
+ None => Ok(None),
+ Some(ft) => FileType::from_str(&ft)
+ .map(Some)
+ .map_err(|e| anyhow::anyhow!("invalid fileType value '{}': {}", ft, e)),
+ }
+}
diff --git a/rust/cloud-storage/document_text_extractor/src/service/db/mod.rs b/rust/cloud-storage/document_text_extractor/src/service/db/mod.rs
index 792a6c7b6b..5e50ee9670 100644
--- a/rust/cloud-storage/document_text_extractor/src/service/db/mod.rs
+++ b/rust/cloud-storage/document_text_extractor/src/service/db/mod.rs
@@ -1,9 +1,11 @@
mod create_document_text;
pub mod document_text_parts;
+mod get_document_file_type;
use lambda_runtime::tracing;
#[allow(unused_imports)]
use mockall::automock;
+use model::document::FileType;
#[cfg(not(test))]
pub use DBClient as DB;
@@ -24,7 +26,7 @@ impl DBClient {
Self { inner }
}
- #[tracing::instrument(skip(self))]
+ #[tracing::instrument(skip(self), err)]
pub async fn create_document_text(
&self,
document_id: &str,
@@ -40,7 +42,7 @@ impl DBClient {
.await
}
- #[tracing::instrument(skip(self))]
+ #[tracing::instrument(skip(self), err)]
pub async fn insert_references(
&self,
references: &Vec<TextReference>,
@@ -49,6 +51,14 @@ impl DBClient {
document_text_parts::insert_pdf_references(self.inner.clone(), references, document_id)
.await
}
+
+ #[tracing::instrument(skip(self), err)]
+ pub async fn get_document_file_type(
+ &self,
+ document_id: &str,
+ ) -> anyhow::Result<Option<FileType>> {
+ get_document_file_type::get_document_file_type(&self.inner, document_id).await
+ }
}
#[cfg(test)]
@@ -60,7 +70,7 @@ mod tests {
async fn test_createdoc_text() {
let mock = DB::default();
let data = String::new();
- let r = mock
+ let _r = mock
.create_document_text("document-id", data.as_str(), 0)
.await;
}
diff --git a/rust/cloud-storage/documents/examples/documents_toolset.rs b/rust/cloud-storage/documents/examples/documents_toolset.rs
index 4ade7fb042..30367ecaeb 100644
--- a/rust/cloud-storage/documents/examples/documents_toolset.rs
+++ b/rust/cloud-storage/documents/examples/documents_toolset.rs
@@ -1,3 +1,4 @@
+#![recursion_limit = "256"]
//! CLI example for testing documents AI tools interactively.
//!
//! This example creates a CLI interface to test the documents toolset with real database connections.
diff --git a/rust/cloud-storage/documents/src/domain/ports.rs b/rust/cloud-storage/documents/src/domain/ports.rs
index 20ff68f327..b7e6653421 100644
--- a/rust/cloud-storage/documents/src/domain/ports.rs
+++ b/rust/cloud-storage/documents/src/domain/ports.rs
@@ -146,6 +146,9 @@ pub trait PresignedUploadUrlPort: Send + Sync + 'static {
sha: &str,
content_type: ContentType,
) -> impl Future<Output = anyhow::Result<String>> + Send;
+
+ /// Check if a document key exists in the storage bucket.
+ fn document_key_exists(&self, key: &str) -> impl Future<Output = anyhow::Result<bool>> + Send;
}
/// Port for attaching task system properties.
diff --git a/rust/cloud-storage/documents/src/domain/service.rs b/rust/cloud-storage/documents/src/domain/service.rs
index 1abdfaad5a..a7d31aa361 100644
--- a/rust/cloud-storage/documents/src/domain/service.rs
+++ b/rust/cloud-storage/documents/src/domain/service.rs
@@ -23,7 +23,8 @@ use model::document::response::{
};
use model::document::{
CONVERTED_DOCUMENT_FILE_NAME, ContentType, DocumentBasic, FileType, FileTypeExt,
- build_cloud_storage_bucket_document_key,
+ build_cloud_storage_bucket_document_key, build_docx_staging_bucket_document_key,
+ build_extensionless_document_key,
};
use model::response::PresignedUrl;
use tracing;
@@ -118,12 +119,23 @@ impl<R: DocumentRepo, U: PresignedUploadUrlPort, T: TaskPropertiesPort, C: Conne
.0
};
- let document_key = build_cloud_storage_bucket_document_key(
- &url_encoded_owner,
- document_id,
- document_version_id,
- Some(file_type),
- );
+ // Try extensionless key first, fall back to legacy key with extension
+ let extensionless_key =
+ build_extensionless_document_key(owner, document_id, document_version_id);
+ let document_key = if self
+ .upload_url_service
+ .document_key_exists(&extensionless_key)
+ .await?
+ {
+ build_extensionless_document_key(&url_encoded_owner, document_id, document_version_id)
+ } else {
+ build_cloud_storage_bucket_document_key(
+ &url_encoded_owner,
+ document_id,
+ document_version_id,
+ Some(file_type),
+ )
+ };
let signed_url = self.make_presigned_url(&document_key)?;
Ok(LocationResponseData::PresignedUrl(signed_url))
@@ -142,13 +154,24 @@ impl<R: DocumentRepo, U: PresignedUploadUrlPort, T: TaskPropertiesPort, C: Conne
.await
.map_err(Into::into)?;
+ // Try extensionless key first, fall back to legacy key with extension
+ let extensionless_key =
+ build_extensionless_document_key(owner, document_id, document_version_id);
let file_type_str = file_type.as_ref().map(|s| s.as_str());
- let document_key = build_cloud_storage_bucket_document_key(
- &url_encoded_owner,
- document_id,
- document_version_id,
- file_type_str,
- );
+ let document_key = if self
+ .upload_url_service
+ .document_key_exists(&extensionless_key)
+ .await?
+ {
+ build_extensionless_document_key(&url_encoded_owner, document_id, document_version_id)
+ } else {
+ build_cloud_storage_bucket_document_key(
+ &url_encoded_owner,
+ document_id,
+ document_version_id,
+ file_type_str,
+ )
+ };
let signed_url = self.make_presigned_url(&document_key)?;
Ok(LocationResponseData::PresignedUrl(signed_url))
@@ -508,14 +531,6 @@ impl<R: DocumentRepo, U: PresignedUploadUrlPort, T: TaskPropertiesPort, C: Conne
)));
}
- // Build the S3 key for upload
- let key = build_cloud_storage_bucket_document_key(
- document_metadata.owner.as_ref(),
- &document_id,
- document_metadata.document_version_id,
- file_type.as_ref().map(|s| s.as_str()),
- );
-
let content_type = match file_type {
Some(FileType::Docx) => ContentType::Docx,
_ => file_type.into(),
@@ -524,18 +539,32 @@ impl<R: DocumentRepo, U: PresignedUploadUrlPort, T: TaskPropertiesPort, C: Conne
let mime_type = content_type.mime_type().to_string();
// Generate presigned upload URL
+ // DOCX files go to the staging bucket with .docx extension (required by docx_unzip_handler)
+ // All other files use extensionless keys in the document storage bucket
let presigned_url = match file_type {
- Some(FileType::Docx) => self
- .upload_url_service
- .put_docx_upload_presigned_url(&key, &sha, content_type)
- .await,
- _ => self
- .upload_url_service
- .put_document_storage_presigned_url(&key, &sha, content_type)
- .await,
+ Some(FileType::Docx) => {
+ let docx_key = build_docx_staging_bucket_document_key(
+ document_metadata.owner.as_ref(),
+ &document_id,
+ document_metadata.document_version_id,
+ );
+ self.upload_url_service
+ .put_docx_upload_presigned_url(&docx_key, &sha, content_type)
+ .await
+ }
+ _ => {
+ let key = build_extensionless_document_key(
+ document_metadata.owner.as_ref(),
+ &document_id,
+ document_metadata.document_version_id,
+ );
+ self.upload_url_service
+ .put_document_storage_presigned_url(&key, &sha, content_type)
+ .await
+ }
}
.map_err(|e| {
- tracing::error!(error=?e, key=?key, document_id=?document_id, "unable to generate presigned url");
+ tracing::error!(error=?e, document_id=?document_id, "unable to generate presigned url");
DocumentError::Internal(anyhow!("unable to generate presigned url"))
})?;
diff --git a/rust/cloud-storage/documents/src/outbound/s3_upload_url.rs b/rust/cloud-storage/documents/src/outbound/s3_upload_url.rs
index d37b9beaac..b622b7621a 100644
--- a/rust/cloud-storage/documents/src/outbound/s3_upload_url.rs
+++ b/rust/cloud-storage/documents/src/outbound/s3_upload_url.rs
@@ -65,6 +65,28 @@ impl PresignedUploadUrlPort for S3UploadUrlAdapter {
)
.await
}
+
+ #[tracing::instrument(skip(self), err)]
+ async fn document_key_exists(&self, key: &str) -> anyhow::Result<bool> {
+ let result = self
+ .client
+ .head_object()
+ .bucket(&self.document_storage_bucket)
+ .key(key)
+ .send()
+ .await;
+
+ match result {
+ Ok(_) => Ok(true),
+ Err(err) => {
+ if err.as_service_error().is_some_and(|e| e.is_not_found()) {
+ Ok(false)
+ } else {
+ Err(err.into())
+ }
+ }
+ }
+ }
}
async fn put_presigned_url(
diff --git a/rust/cloud-storage/model/src/document/document_key.rs b/rust/cloud-storage/model/src/document/document_key.rs
index 7ede52b3b3..93290dfe73 100644
--- a/rust/cloud-storage/model/src/document/document_key.rs
+++ b/rust/cloud-storage/model/src/document/document_key.rs
@@ -1,8 +1,26 @@
pub static CONVERTED_DOCUMENT_FILE_NAME: &str = "converted";
+/// Builds an extensionless document key for a document in the cloud storage bucket.
+/// This is the new convention — document IDs are unique so extensions are unnecessary in S3 keys.
+pub fn build_extensionless_document_key<T: ToString>(
+ user_id: &str,
+ document_id: &str,
+ document_version_id: T,
+) -> String {
+ format!(
+ "{}/{}/{}",
+ user_id,
+ document_id,
+ document_version_id.to_string()
+ )
+}
+
/// Builds a document key for a document in the cloud storage bucket.
/// The document_version_id could be the document's version id (i64) or "converted" for files that
/// are converted.
+///
+/// DEPRECATED: Prefer `build_extensionless_document_key` for new writes.
+/// This function is kept for building legacy keys during the migration period.
pub fn build_cloud_storage_bucket_document_key<T: ToString>(
user_id: &str,
document_id: &str,
@@ -42,6 +60,12 @@ pub fn build_docx_staging_bucket_document_key(
mod tests {
use super::*;
+ #[test]
+ fn test_build_extensionless_document_key() {
+ let key = build_extensionless_document_key("owner", "document-id", 1);
+ assert_eq!(key, "owner/document-id/1");
+ }
+
#[test]
fn test_build_cloud_storage_bucket_document_key() {
let key = build_cloud_storage_bucket_document_key("owner", "document-id", 1, Some("pdf"));
diff --git a/rust/cloud-storage/search_processing_service/src/process/document/raw_document.rs b/rust/cloud-storage/search_processing_service/src/process/document/raw_document.rs
index 4c8f4b8fd3..1fb37cf192 100644
--- a/rust/cloud-storage/search_processing_service/src/process/document/raw_document.rs
+++ b/rust/cloud-storage/search_processing_service/src/process/document/raw_document.rs
@@ -4,7 +4,7 @@ use anyhow::Context;
use chrono::Utc;
use model::document::{
CONVERTED_DOCUMENT_FILE_NAME, DocumentMetadata, FileType,
- build_cloud_storage_bucket_document_key,
+ build_cloud_storage_bucket_document_key, build_extensionless_document_key,
};
use model_file_type::FileAssociation;
use models_search::document::MarkdownParseResult;
@@ -138,12 +138,26 @@ pub async fn update_search_with_raw_document(
}
}
- let key = build_cloud_storage_bucket_document_key(
+ // Try extensionless key first, fall back to legacy key with extension
+ // document_version_id will be "converted" or document version id
+ let extensionless_key = build_extensionless_document_key(
&search_extractor_message.user_id,
&search_extractor_message.document_id,
- document_version_id, // will be "converted" or document version id
- Some(search_extractor_message.file_type.as_str()),
+ &document_version_id,
);
+ let key = if s3_client
+ .exists(document_storage_bucket, &extensionless_key)
+ .await?
+ {
+ extensionless_key
+ } else {
+ build_cloud_storage_bucket_document_key(
+ &search_extractor_message.user_id,
+ &search_extractor_message.document_id,
+ document_version_id,
+ Some(search_extractor_message.file_type.as_str()),
+ )
+ };
let content = s3_client
.get(document_storage_bucket, &key)
diff --git a/rust/cloud-storage/search_upload_handler/Cargo.toml b/rust/cloud-storage/search_upload_handler/Cargo.toml
index d0058daf90..64ef5f9ddf 100644
--- a/rust/cloud-storage/search_upload_handler/Cargo.toml
+++ b/rust/cloud-storage/search_upload_handler/Cargo.toml
@@ -7,6 +7,7 @@ version = "0.1.0"
[dependencies]
anyhow = { workspace = true }
aws-sdk-sqs = { workspace = true }
+document_storage_service_client = { path = "../document_storage_service_client" }
macro_aws_config = { path = "../macro_aws_config" }
aws_lambda_events = { workspace = true, features = ["eventbridge"] }
lambda_runtime = { workspace = true }
diff --git a/rust/cloud-storage/search_upload_handler/src/handler.rs b/rust/cloud-storage/search_upload_handler/src/handler.rs
index 9d49693464..8059877adc 100644
--- a/rust/cloud-storage/search_upload_handler/src/handler.rs
+++ b/rust/cloud-storage/search_upload_handler/src/handler.rs
@@ -2,6 +2,7 @@ use std::str::FromStr;
use anyhow::Context;
use aws_lambda_events::event::eventbridge::EventBridgeEvent;
+use document_storage_service_client::DocumentStorageServiceClient;
use lambda_runtime::{
Error, LambdaEvent,
tracing::{self},
@@ -14,14 +15,15 @@ struct DocumentKeyParts {
pub user_id: String,
pub document_id: String,
pub document_version_id: String,
- pub file_type: String,
+ pub file_type: Option<String>,
}
impl TryFrom<String> for DocumentKeyParts {
type Error = anyhow::Error;
/// Tries to convert the document key into it's parts
- /// The document key is in the format of `user_id/document_id/document_version_id.file_type`
+ /// Supports both extensionless keys (`user_id/document_id/version_id`)
+ /// and legacy keys with extension (`user_id/document_id/version_id.file_type`)
fn try_from(value: String) -> Result<Self, Self::Error> {
let parts: Vec<&str> = value.split('/').collect();
@@ -31,23 +33,26 @@ impl TryFrom<String> for DocumentKeyParts {
let file: Vec<&str> = parts[2].split('.').collect::<Vec<&str>>();
- if file.len() != 2 {
- anyhow::bail!("expected 2 file parts, got {}", file.len());
- }
+ let (document_version_id, file_type) = if file.len() == 2 {
+ (file[0].to_string(), Some(file[1].to_string()))
+ } else {
+ (parts[2].to_string(), None)
+ };
Ok(Self {
user_id: parts[0].to_string(),
document_id: parts[1].to_string(),
- document_version_id: file[0].to_string(),
- file_type: file[1].to_string(),
+ document_version_id,
+ file_type,
})
}
}
/// Handles the Eventbridge event
-#[tracing::instrument(skip(sqs_client))]
+#[tracing::instrument(skip(sqs_client, dss_client), err)]
pub async fn handler(
sqs_client: &sqs_client::SQS,
+ dss_client: &DocumentStorageServiceClient,
event: LambdaEvent<EventBridgeEvent>,
) -> Result<(), Error> {
tracing::trace!("processing event");
@@ -85,8 +90,21 @@ pub async fn handler(
tracing::trace!(document_key_parts=?document_key_parts, "processing document key");
- let file_type = FileType::from_str(document_key_parts.file_type.as_str())
- .context("unable to parse file type")?;
+ // Resolve file type: use key extension if available (legacy), fall back to DSS lookup (extensionless)
+ let file_type = match &document_key_parts.file_type {
+ Some(ft) => FileType::from_str(ft).context("unable to parse file type")?,
+ None => {
+ let document_basic = dss_client
+ .get_document_basic(&document_key_parts.document_id)
+ .await
+ .context("Failed to fetch document basic info")?
+ .ok_or_else(|| anyhow::anyhow!("document not found"))?;
+
+ document_basic
+ .try_file_type()
+ .ok_or_else(|| anyhow::anyhow!("file type not found"))?
+ }
+ };
let search_extractor_message = SearchExtractorMessage {
user_id: document_key_parts.user_id,
diff --git a/rust/cloud-storage/search_upload_handler/src/main.rs b/rust/cloud-storage/search_upload_handler/src/main.rs
index 8a52afc438..6d94f582d8 100644
--- a/rust/cloud-storage/search_upload_handler/src/main.rs
+++ b/rust/cloud-storage/search_upload_handler/src/main.rs
@@ -1,5 +1,6 @@
use anyhow::Context;
use aws_lambda_events::eventbridge::EventBridgeEvent;
+use document_storage_service_client::DocumentStorageServiceClient;
use handler::handler;
use lambda_runtime::{Error, LambdaEvent, run, service_fn, tracing};
use macro_entrypoint::MacroEntrypoint;
@@ -16,17 +17,24 @@ async fn main() -> Result<(), Error> {
let search_event_queue =
std::env::var("SEARCH_EVENT_QUEUE").context("SEARCH_EVENT_QUEUE must be provided")?;
+ let dss_url = std::env::var("DOCUMENT_STORAGE_SERVICE_URL")
+ .context("DOCUMENT_STORAGE_SERVICE_URL must be provided")?;
+ let dss_auth_key = std::env::var("DOCUMENT_STORAGE_SERVICE_AUTH_KEY")
+ .context("DOCUMENT_STORAGE_SERVICE_AUTH_KEY must be provided")?;
+
let sqs_client = sqs_client::SQS::new(aws_sdk_sqs::Client::new(
&macro_aws_config::get_macro_aws_config().await,
))
.search_event_queue(&search_event_queue);
let shared_sqs_client = Arc::new(sqs_client);
+ let shared_dss_client = Arc::new(DocumentStorageServiceClient::new(dss_auth_key, dss_url));
let func = service_fn(move |event: LambdaEvent<EventBridgeEvent>| {
let sqs_client = shared_sqs_client.clone();
+ let dss_client = shared_dss_client.clone();
- async move { handler(&sqs_client, event).await }
+ async move { handler(&sqs_client, &dss_client, event).await }
});
run(func).await
diff --git a/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zip b/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zip
index ef3569b213..d0271916ba 100644
Binary files a/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zip and b/rust/cloud-storage/target/lambda/search_upload_handler/bootstrap.zip differ
diff --git a/scripts/migrate-s3-keys-extensionless/.gitignore b/scripts/migrate-s3-keys-extensionless/.gitignore
new file mode 100644
index 0000000000..c2658d7d1b
--- /dev/null
+++ b/scripts/migrate-s3-keys-extensionless/.gitignore
@@ -0,0 +1 @@
+node_modules/
diff --git a/scripts/migrate-s3-keys-extensionless/bun.lock b/scripts/migrate-s3-keys-extensionless/bun.lock
new file mode 100644
index 0000000000..78f8d25fed
--- /dev/null
+++ b/scripts/migrate-s3-keys-extensionless/bun.lock
@@ -0,0 +1,236 @@
+{
+ "lockfileVersion": 1,
+ "configVersion": 1,
+ "workspaces": {
+ "": {
+ "name": "migrate-s3-keys-extensionless",
+ "dependencies": {
+ "@aws-sdk/client-s3": "^3.700.0",
+ },
+ "devDependencies": {
+ "@types/bun": "latest",
+ },
+ },
+ },
+ "packages": {
+ "@aws-crypto/crc32": ["@aws-crypto/[email protected]", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-nLbCWqQNgUiwwtFsen1AdzAtvuLRsQS8rYgMuxCrdKf9kOssamGLuPwyTY9wyYblNr9+1XM8v6zoDTPPSIeANg=="],
+
+ "@aws-crypto/crc32c": ["@aws-crypto/[email protected]", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-+iWb8qaHLYKrNvGRbiYRHSdKRWhto5XlZUEBwDjYNf+ly5SVYG6zEoYIdxvf5R3zyeP16w4PLBn3rH1xc74Rag=="],
+
+ "@aws-crypto/sha1-browser": ["@aws-crypto/[email protected]", "", { "dependencies": { "@aws-crypto/supports-web-crypto": "^5.2.0", "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "@aws-sdk/util-locate-window": "^3.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-OH6lveCFfcDjX4dbAvCFSYUjJZjDr/3XJ3xHtjn3Oj5b9RjojQo8npoLeA/bNwkOkrSQ0wgrHzXk4tDRxGKJeg=="],
+
+ "@aws-crypto/sha256-browser": ["@aws-crypto/[email protected]", "", { "dependencies": { "@aws-crypto/sha256-js": "^5.2.0", "@aws-crypto/supports-web-crypto": "^5.2.0", "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "@aws-sdk/util-locate-window": "^3.0.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-AXfN/lGotSQwu6HNcEsIASo7kWXZ5HYWvfOmSNKDsEqC4OashTp8alTmaz+F7TC2L083SFv5RdB+qU3Vs1kZqw=="],
+
+ "@aws-crypto/sha256-js": ["@aws-crypto/[email protected]", "", { "dependencies": { "@aws-crypto/util": "^5.2.0", "@aws-sdk/types": "^3.222.0", "tslib": "^2.6.2" } }, "sha512-FFQQyu7edu4ufvIZ+OadFpHHOt+eSTBaYaki44c+akjg7qZg9oOQeLlk77F6tSYqjDAFClrHJk9tMf0HdVyOvA=="],
+
+ "@aws-crypto/supports-web-crypto": ["@aws-crypto/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-iAvUotm021kM33eCdNfwIN//F77/IADDSs58i+MDaOqFrVjZo9bAal0NK7HurRuWLLpF1iLX7gbWrjHjeo+YFg=="],
+
+ "@aws-crypto/util": ["@aws-crypto/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.222.0", "@smithy/util-utf8": "^2.0.0", "tslib": "^2.6.2" } }, "sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ=="],
+
+ "@aws-sdk/client-s3": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-crypto/sha1-browser": "5.2.0", "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.973.21", "@aws-sdk/credential-provider-node": "^3.972.22", "@aws-sdk/middleware-bucket-endpoint": "^3.972.8", "@aws-sdk/middleware-expect-continue": "^3.972.8", "@aws-sdk/middleware-flexible-checksums": "^3.974.1", "@aws-sdk/middleware-host-header": "^3.972.8", "@aws-sdk/middleware-location-constraint": "^3.972.8", "@aws-sdk/middleware-logger": "^3.972.8", "@aws-sdk/middleware-recursion-detection": "^3.972.8", "@aws-sdk/middleware-sdk-s3": "^3.972.21", "@aws-sdk/middleware-ssec": "^3.972.8", "@aws-sdk/middleware-user-agent": "^3.972.22", "@aws-sdk/region-config-resolver": "^3.972.8", "@aws-sdk/signature-v4-multi-region": "^3.996.9", "@aws-sdk/types": "^3.973.6", "@aws-sdk/util-endpoints": "^3.996.5", "@aws-sdk/util-user-agent-browser": "^3.972.8", "@aws-sdk/util-user-agent-node": "^3.973.8", "@smithy/config-resolver": "^4.4.11", "@smithy/core": "^3.23.12", "@smithy/eventstream-serde-browser": "^4.2.12", "@smithy/eventstream-serde-config-resolver": "^4.3.12", "@smithy/eventstream-serde-node": "^4.2.12", "@smithy/fetch-http-handler": "^5.3.15", "@smithy/hash-blob-browser": "^4.2.13", "@smithy/hash-node": "^4.2.12", "@smithy/hash-stream-node": "^4.2.12", "@smithy/invalid-dependency": "^4.2.12", "@smithy/md5-js": "^4.2.12", "@smithy/middleware-content-length": "^4.2.12", "@smithy/middleware-endpoint": "^4.4.26", "@smithy/middleware-retry": "^4.4.43", "@smithy/middleware-serde": "^4.2.15", "@smithy/middleware-stack": "^4.2.12", "@smithy/node-config-provider": "^4.3.12", "@smithy/node-http-handler": "^4.5.0", "@smithy/protocol-http": "^5.3.12", "@smithy/smithy-client": "^4.12.6", "@smithy/types": "^4.13.1", "@smithy/url-parser": "^4.2.12", "@smithy/util-base64": "^4.3.2", "@smithy/util-body-length-browser": "^4.2.2", "@smithy/util-body-length-node": "^4.2.3", "@smithy/util-defaults-mode-browser": "^4.3.42", "@smithy/util-defaults-mode-node": "^4.2.45", "@smithy/util-endpoints": "^3.3.3", "@smithy/util-middleware": "^4.2.12", "@smithy/util-retry": "^4.2.12", "@smithy/util-stream": "^4.5.20", "@smithy/util-utf8": "^4.2.2", "@smithy/util-waiter": "^4.2.13", "tslib": "^2.6.2" } }, "sha512-YB44c/NVLwyLw2x8hYSIdMFRwFJyZRuaq1HCTS2RiUWmHucSGxohuKwQdQn/XWh+NILugB+RnXrBkSqTlR3ypw=="],
+
+ "@aws-sdk/core": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.6", "@aws-sdk/xml-builder": "^3.972.12", "@smithy/core": "^3.23.12", "@smithy/node-config-provider": "^4.3.12", "@smithy/property-provider": "^4.2.12", "@smithy/protocol-http": "^5.3.12", "@smithy/signature-v4": "^5.3.12", "@smithy/smithy-client": "^4.12.6", "@smithy/types": "^4.13.1", "@smithy/util-base64": "^4.3.2", "@smithy/util-middleware": "^4.2.12", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-OTUcDX9Yfz/FLKbHjiMaP9D4Hs44lYJzN7zBcrK2nDmBt0Wr8D6nYt12QoBkZsW0nVMFsTIGaZCrsU9zCcIMXQ=="],
+
+ "@aws-sdk/crc64-nvme": ["@aws-sdk/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-2VbTstbjKdT+yKi8m7b3a9CiVac+pL/IY2PHJwsaGkkHmuuqkJZIErPck1h6P3T9ghQMLSdMPyW6Qp7Di5swFg=="],
+
+ "@aws-sdk/credential-provider-env": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.973.21", "@aws-sdk/types": "^3.973.6", "@smithy/property-provider": "^4.2.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-33NpkQtmnsjLr9QdZvL3w8bjy+WoBJ+jY8JwuzxIq38rDNi1kwpBWW7Yjh+8bMlksd+ZAWW0fH4S/6OeoAdU5A=="],
+
+ "@aws-sdk/credential-provider-http": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.973.21", "@aws-sdk/types": "^3.973.6", "@smithy/fetch-http-handler": "^5.3.15", "@smithy/node-http-handler": "^4.5.0", "@smithy/property-provider": "^4.2.12", "@smithy/protocol-http": "^5.3.12", "@smithy/smithy-client": "^4.12.6", "@smithy/types": "^4.13.1", "@smithy/util-stream": "^4.5.20", "tslib": "^2.6.2" } }, "sha512-xFke7yjbON4unNOG0TApQwz+o1LH5VhVLgWlUuiLRWNDyBfeHIFje2ck8qHybvJ8Fkm5m3SsN+pvHtVo6PGWlQ=="],
+
+ "@aws-sdk/credential-provider-ini": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.973.21", "@aws-sdk/credential-provider-env": "^3.972.19", "@aws-sdk/credential-provider-http": "^3.972.21", "@aws-sdk/credential-provider-login": "^3.972.21", "@aws-sdk/credential-provider-process": "^3.972.19", "@aws-sdk/credential-provider-sso": "^3.972.21", "@aws-sdk/credential-provider-web-identity": "^3.972.21", "@aws-sdk/nested-clients": "^3.996.11", "@aws-sdk/types": "^3.973.6", "@smithy/credential-provider-imds": "^4.2.12", "@smithy/property-provider": "^4.2.12", "@smithy/shared-ini-file-loader": "^4.4.7", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-fmJN7KhB7CoG65w9fC2LVOd2wZbR2d1yJIpZNe2J5CeDPu7nUHSmavuJAeGEoE3OL5UIBVPNhmK/fV/NQrs3Hw=="],
+
+ "@aws-sdk/credential-provider-login": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.973.21", "@aws-sdk/nested-clients": "^3.996.11", "@aws-sdk/types": "^3.973.6", "@smithy/property-provider": "^4.2.12", "@smithy/protocol-http": "^5.3.12", "@smithy/shared-ini-file-loader": "^4.4.7", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-ENU+YCiuQocQjfIf9bPxZ+ZY0wIBkl3SMH22optBQwy8UFpSfonHynXzGT27xQxer4cYTNOpwDqbfo57BusbpQ=="],
+
+ "@aws-sdk/credential-provider-node": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/credential-provider-env": "^3.972.19", "@aws-sdk/credential-provider-http": "^3.972.21", "@aws-sdk/credential-provider-ini": "^3.972.21", "@aws-sdk/credential-provider-process": "^3.972.19", "@aws-sdk/credential-provider-sso": "^3.972.21", "@aws-sdk/credential-provider-web-identity": "^3.972.21", "@aws-sdk/types": "^3.973.6", "@smithy/credential-provider-imds": "^4.2.12", "@smithy/property-provider": "^4.2.12", "@smithy/shared-ini-file-loader": "^4.4.7", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-VE6i8nkmrRyhKut7nnfCWRbdDf+CfyRr8ixSwdaPDguYlgvkAO2pHu9oK11XzbSuatB0io1ozI/vpYhelXn8Pg=="],
+
+ "@aws-sdk/credential-provider-process": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.973.21", "@aws-sdk/types": "^3.973.6", "@smithy/property-provider": "^4.2.12", "@smithy/shared-ini-file-loader": "^4.4.7", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-hjj5bFo4kf5/WzAMjDEFByVOMbq5gZiagIpJexf7Kp9nIDaGzhCphMsx03NCA8s9zUJzHlD1lXazd7MS+e03Lg=="],
+
+ "@aws-sdk/credential-provider-sso": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.973.21", "@aws-sdk/nested-clients": "^3.996.11", "@aws-sdk/token-providers": "3.1012.0", "@aws-sdk/types": "^3.973.6", "@smithy/property-provider": "^4.2.12", "@smithy/shared-ini-file-loader": "^4.4.7", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-9jWRCuMZpZKlqCZ46bvievqdfswsyB2yPAr9rOiN+FxaGgf8jrR5iYDqJgscvk1jrbAxiK4cIjHv3XjIAWAhzQ=="],
+
+ "@aws-sdk/credential-provider-web-identity": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.973.21", "@aws-sdk/nested-clients": "^3.996.11", "@aws-sdk/types": "^3.973.6", "@smithy/property-provider": "^4.2.12", "@smithy/shared-ini-file-loader": "^4.4.7", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-ShWQO/cQVZ+j3zUDK7Kj+m7grPzQCVA2iaZdJ+hJTGvVH5lR32Ip/rgZZ+zBdH6D6wczP9Upa4NMXoqJdGpK1g=="],
+
+ "@aws-sdk/middleware-bucket-endpoint": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.6", "@aws-sdk/util-arn-parser": "^3.972.3", "@smithy/node-config-provider": "^4.3.12", "@smithy/protocol-http": "^5.3.12", "@smithy/types": "^4.13.1", "@smithy/util-config-provider": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-WR525Rr2QJSETa9a050isktyWi/4yIGcmY3BQ1kpHqb0LqUglQHCS8R27dTJxxWNZvQ0RVGtEZjTCbZJpyF3Aw=="],
+
+ "@aws-sdk/middleware-expect-continue": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.6", "@smithy/protocol-http": "^5.3.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-5DTBTiotEES1e2jOHAq//zyzCjeMB78lEHd35u15qnrid4Nxm7diqIf9fQQ3Ov0ChH1V3Vvt13thOnrACmfGVQ=="],
+
+ "@aws-sdk/middleware-flexible-checksums": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-crypto/crc32": "5.2.0", "@aws-crypto/crc32c": "5.2.0", "@aws-crypto/util": "5.2.0", "@aws-sdk/core": "^3.973.21", "@aws-sdk/crc64-nvme": "^3.972.5", "@aws-sdk/types": "^3.973.6", "@smithy/is-array-buffer": "^4.2.2", "@smithy/node-config-provider": "^4.3.12", "@smithy/protocol-http": "^5.3.12", "@smithy/types": "^4.13.1", "@smithy/util-middleware": "^4.2.12", "@smithy/util-stream": "^4.5.20", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-1MQ8czTjW8b8SpM+ZoQ0k5yD4rd19G9ALPlGgbFdRS7bwlm9ArxXWu2M22mUgSjsGJwzDkpV8e9tjUnre6adAw=="],
+
+ "@aws-sdk/middleware-host-header": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.6", "@smithy/protocol-http": "^5.3.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-wAr2REfKsqoKQ+OkNqvOShnBoh+nkPurDKW7uAeVSu6kUECnWlSJiPvnoqxGlfousEY/v9LfS9sNc46hjSYDIQ=="],
+
+ "@aws-sdk/middleware-location-constraint": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.6", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-KaUoFuoFPziIa98DSQsTPeke1gvGXlc5ZGMhy+b+nLxZ4A7jmJgLzjEF95l8aOQN2T/qlPP3MrAyELm8ExXucw=="],
+
+ "@aws-sdk/middleware-logger": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.6", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-CWl5UCM57WUFaFi5kB7IBY1UmOeLvNZAZ2/OZ5l20ldiJ3TiIz1pC65gYj8X0BCPWkeR1E32mpsCk1L1I4n+lA=="],
+
+ "@aws-sdk/middleware-recursion-detection": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.6", "@aws/lambda-invoke-store": "^0.2.2", "@smithy/protocol-http": "^5.3.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-BnnvYs2ZEpdlmZ2PNlV2ZyQ8j8AEkMTjN79y/YA475ER1ByFYrkVR85qmhni8oeTaJcDqbx364wDpitDAA/wCA=="],
+
+ "@aws-sdk/middleware-sdk-s3": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.973.21", "@aws-sdk/types": "^3.973.6", "@aws-sdk/util-arn-parser": "^3.972.3", "@smithy/core": "^3.23.12", "@smithy/node-config-provider": "^4.3.12", "@smithy/protocol-http": "^5.3.12", "@smithy/signature-v4": "^5.3.12", "@smithy/smithy-client": "^4.12.6", "@smithy/types": "^4.13.1", "@smithy/util-config-provider": "^4.2.2", "@smithy/util-middleware": "^4.2.12", "@smithy/util-stream": "^4.5.20", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-SXkHy8OET88y4NaSui3gMfoTpg4jHvcbAVXYJuP74vsgsJKCv/vzWM+0hVJ1W+EBOghd+qFIud80ZiuPt2RXRw=="],
+
+ "@aws-sdk/middleware-ssec": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.6", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-wqlK0yO/TxEC2UsY9wIlqeeutF6jjLe0f96Pbm40XscTo57nImUk9lBcw0dPgsm0sppFtAkSlDrfpK+pC30Wqw=="],
+
+ "@aws-sdk/middleware-user-agent": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.973.21", "@aws-sdk/types": "^3.973.6", "@aws-sdk/util-endpoints": "^3.996.5", "@smithy/core": "^3.23.12", "@smithy/protocol-http": "^5.3.12", "@smithy/types": "^4.13.1", "@smithy/util-retry": "^4.2.12", "tslib": "^2.6.2" } }, "sha512-pZPNGWZVQvgUIO/P9PXZNz7ciq9mLYb/wQEurg3phKTa3DiBIunIRcgA0eBNwmog6S3oy0KR1bv4EJ4ld9A5sQ=="],
+
+ "@aws-sdk/nested-clients": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", "@aws-sdk/core": "^3.973.21", "@aws-sdk/middleware-host-header": "^3.972.8", "@aws-sdk/middleware-logger": "^3.972.8", "@aws-sdk/middleware-recursion-detection": "^3.972.8", "@aws-sdk/middleware-user-agent": "^3.972.22", "@aws-sdk/region-config-resolver": "^3.972.8", "@aws-sdk/types": "^3.973.6", "@aws-sdk/util-endpoints": "^3.996.5", "@aws-sdk/util-user-agent-browser": "^3.972.8", "@aws-sdk/util-user-agent-node": "^3.973.8", "@smithy/config-resolver": "^4.4.11", "@smithy/core": "^3.23.12", "@smithy/fetch-http-handler": "^5.3.15", "@smithy/hash-node": "^4.2.12", "@smithy/invalid-dependency": "^4.2.12", "@smithy/middleware-content-length": "^4.2.12", "@smithy/middleware-endpoint": "^4.4.26", "@smithy/middleware-retry": "^4.4.43", "@smithy/middleware-serde": "^4.2.15", "@smithy/middleware-stack": "^4.2.12", "@smithy/node-config-provider": "^4.3.12", "@smithy/node-http-handler": "^4.5.0", "@smithy/protocol-http": "^5.3.12", "@smithy/smithy-client": "^4.12.6", "@smithy/types": "^4.13.1", "@smithy/url-parser": "^4.2.12", "@smithy/util-base64": "^4.3.2", "@smithy/util-body-length-browser": "^4.2.2", "@smithy/util-body-length-node": "^4.2.3", "@smithy/util-defaults-mode-browser": "^4.3.42", "@smithy/util-defaults-mode-node": "^4.2.45", "@smithy/util-endpoints": "^3.3.3", "@smithy/util-middleware": "^4.2.12", "@smithy/util-retry": "^4.2.12", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-i7SwoSR4JB/79JoGDUACnFUQOZwXGLWNX35lIb1Pq72nUGlVV+RFZp+BLa8S+mog2pbXU9+6Kc5YwGiMi5bKhQ=="],
+
+ "@aws-sdk/region-config-resolver": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.6", "@smithy/config-resolver": "^4.4.11", "@smithy/node-config-provider": "^4.3.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-1eD4uhTDeambO/PNIDVG19A6+v4NdD7xzwLHDutHsUqz0B+i661MwQB2eYO4/crcCvCiQG4SRm1k81k54FEIvw=="],
+
+ "@aws-sdk/signature-v4-multi-region": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/middleware-sdk-s3": "^3.972.21", "@aws-sdk/types": "^3.973.6", "@smithy/protocol-http": "^5.3.12", "@smithy/signature-v4": "^5.3.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-2aAUwudVQ3uNkCfkBLQwNVD2jkfb299NSeDueXsT2NcNdFrWtHRkiQzX3wk47UFYbm87BkdxrsAJcQO7PdQOhA=="],
+
+ "@aws-sdk/token-providers": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/core": "^3.973.21", "@aws-sdk/nested-clients": "^3.996.11", "@aws-sdk/types": "^3.973.6", "@smithy/property-provider": "^4.2.12", "@smithy/shared-ini-file-loader": "^4.4.7", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-vzKwy020zjuiF4WTJzejx5nYcXJnRhHpb6i3lyZHIwfFwXG1yX4bzBVNMWYWF+bz1i2Pp2VhJbPyzpqj4VuJXQ=="],
+
+ "@aws-sdk/types": ["@aws-sdk/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-Atfcy4E++beKtwJHiDln2Nby8W/mam64opFPTiHEqgsthqeydFS1pY+OUlN1ouNOmf8ArPU/6cDS65anOP3KQw=="],
+
+ "@aws-sdk/util-arn-parser": ["@aws-sdk/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-HzSD8PMFrvgi2Kserxuff5VitNq2sgf3w9qxmskKDiDTThWfVteJxuCS9JXiPIPtmCrp+7N9asfIaVhBFORllA=="],
+
+ "@aws-sdk/util-endpoints": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.6", "@smithy/types": "^4.13.1", "@smithy/url-parser": "^4.2.12", "@smithy/util-endpoints": "^3.3.3", "tslib": "^2.6.2" } }, "sha512-Uh93L5sXFNbyR5sEPMzUU8tJ++Ku97EY4udmC01nB8Zu+xfBPwpIwJ6F7snqQeq8h2pf+8SGN5/NoytfKgYPIw=="],
+
+ "@aws-sdk/util-locate-window": ["@aws-sdk/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-WhlJNNINQB+9qtLtZJcpQdgZw3SCDCpXdUJP7cToGwHbCWCnRckGlc6Bx/OhWwIYFNAn+FIydY8SZ0QmVu3xTQ=="],
+
+ "@aws-sdk/util-user-agent-browser": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/types": "^3.973.6", "@smithy/types": "^4.13.1", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "sha512-B3KGXJviV2u6Cdw2SDY2aDhoJkVfY/Q/Trwk2CMSkikE1Oi6gRzxhvhIfiRpHfmIsAhV4EA54TVEX8K6CbHbkA=="],
+
+ "@aws-sdk/util-user-agent-node": ["@aws-sdk/[email protected]", "", { "dependencies": { "@aws-sdk/middleware-user-agent": "^3.972.22", "@aws-sdk/types": "^3.973.6", "@smithy/node-config-provider": "^4.3.12", "@smithy/types": "^4.13.1", "@smithy/util-config-provider": "^4.2.2", "tslib": "^2.6.2" }, "peerDependencies": { "aws-crt": ">=1.0.0" }, "optionalPeers": ["aws-crt"] }, "sha512-Kvb96TafGPLYo4Z2GRCzQTne77epXgiZEo0DDXwavzkWmgDV/1XD1tMA766gzRcHHFUraWsE+4T8DKtPTZUxgQ=="],
+
+ "@aws-sdk/xml-builder": ["@aws-sdk/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "fast-xml-parser": "5.5.6", "tslib": "^2.6.2" } }, "sha512-xjyucfn+F+kMf25c+LIUnvX3oyLSlj9T0Vncs5WMQI6G36JdnSwC8g0qf8RajfmSClXr660EpTz7FFKluZ4BqQ=="],
+
+ "@aws/lambda-invoke-store": ["@aws/[email protected]", "", {}, "sha512-iY8yvjE0y651BixKNPgmv1WrQc+GZ142sb0z4gYnChDDY2YqI4P/jsSopBWrKfAt7LOJAkOXt7rC/hms+WclQQ=="],
+
+ "@smithy/abort-controller": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-xolrFw6b+2iYGl6EcOL7IJY71vvyZ0DJ3mcKtpykqPe2uscwtzDZJa1uVQXyP7w9Dd+kGwYnPbMsJrGISKiY/Q=="],
+
+ "@smithy/chunked-blob-reader": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-St+kVicSyayWQca+I1rGitaOEH6uKgE8IUWoYnnEX26SWdWQcL6LvMSD19Lg+vYHKdT9B2Zuu7rd3i6Wnyb/iw=="],
+
+ "@smithy/chunked-blob-reader-native": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/util-base64": "^4.3.2", "tslib": "^2.6.2" } }, "sha512-jA5k5Udn7Y5717L86h4EIv06wIr3xn8GM1qHRi/Nf31annXcXHJjBKvgztnbn2TxH3xWrPBfgwHsOwZf0UmQWw=="],
+
+ "@smithy/config-resolver": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.12", "@smithy/types": "^4.13.1", "@smithy/util-config-provider": "^4.2.2", "@smithy/util-endpoints": "^3.3.3", "@smithy/util-middleware": "^4.2.12", "tslib": "^2.6.2" } }, "sha512-YxFiiG4YDAtX7WMN7RuhHZLeTmRRAOyCbr+zB8e3AQzHPnUhS8zXjB1+cniPVQI3xbWsQPM0X2aaIkO/ME0ymw=="],
+
+ "@smithy/core": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/protocol-http": "^5.3.12", "@smithy/types": "^4.13.1", "@smithy/url-parser": "^4.2.12", "@smithy/util-base64": "^4.3.2", "@smithy/util-body-length-browser": "^4.2.2", "@smithy/util-middleware": "^4.2.12", "@smithy/util-stream": "^4.5.20", "@smithy/util-utf8": "^4.2.2", "@smithy/uuid": "^1.1.2", "tslib": "^2.6.2" } }, "sha512-o9VycsYNtgC+Dy3I0yrwCqv9CWicDnke0L7EVOrZtJpjb2t0EjaEofmMrYc0T1Kn3yk32zm6cspxF9u9Bj7e5w=="],
+
+ "@smithy/credential-provider-imds": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.12", "@smithy/property-provider": "^4.2.12", "@smithy/types": "^4.13.1", "@smithy/url-parser": "^4.2.12", "tslib": "^2.6.2" } }, "sha512-cr2lR792vNZcYMriSIj+Um3x9KWrjcu98kn234xA6reOAFMmbRpQMOv8KPgEmLLtx3eldU6c5wALKFqNOhugmg=="],
+
+ "@smithy/eventstream-codec": ["@smithy/[email protected]", "", { "dependencies": { "@aws-crypto/crc32": "5.2.0", "@smithy/types": "^4.13.1", "@smithy/util-hex-encoding": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-FE3bZdEl62ojmy8x4FHqxq2+BuOHlcxiH5vaZ6aqHJr3AIZzwF5jfx8dEiU/X0a8RboyNDjmXjlbr8AdEyLgiA=="],
+
+ "@smithy/eventstream-serde-browser": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/eventstream-serde-universal": "^4.2.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-XUSuMxlTxV5pp4VpqZf6Sa3vT/Q75FVkLSpSSE3KkWBvAQWeuWt1msTv8fJfgA4/jcJhrbrbMzN1AC/hvPmm5A=="],
+
+ "@smithy/eventstream-serde-config-resolver": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-7epsAZ3QvfHkngz6RXQYseyZYHlmWXSTPOfPmXkiS+zA6TBNo1awUaMFL9vxyXlGdoELmCZyZe1nQE+imbmV+Q=="],
+
+ "@smithy/eventstream-serde-node": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/eventstream-serde-universal": "^4.2.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-D1pFuExo31854eAvg89KMn9Oab/wEeJR6Buy32B49A9Ogdtx5fwZPqBHUlDzaCDpycTFk2+fSQgX689Qsk7UGA=="],
+
+ "@smithy/eventstream-serde-universal": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/eventstream-codec": "^4.2.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-+yNuTiyBACxOJUTvbsNsSOfH9G9oKbaJE1lNL3YHpGcuucl6rPZMi3nrpehpVOVR2E07YqFFmtwpImtpzlouHQ=="],
+
+ "@smithy/fetch-http-handler": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/protocol-http": "^5.3.12", "@smithy/querystring-builder": "^4.2.12", "@smithy/types": "^4.13.1", "@smithy/util-base64": "^4.3.2", "tslib": "^2.6.2" } }, "sha512-T4jFU5N/yiIfrtrsb9uOQn7RdELdM/7HbyLNr6uO/mpkj1ctiVs7CihVr51w4LyQlXWDpXFn4BElf1WmQvZu/A=="],
+
+ "@smithy/hash-blob-browser": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/chunked-blob-reader": "^5.2.2", "@smithy/chunked-blob-reader-native": "^4.2.3", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-YrF4zWKh+ghLuquldj6e/RzE3xZYL8wIPfkt0MqCRphVICjyyjH8OwKD7LLlKpVEbk4FLizFfC1+gwK6XQdR3g=="],
+
+ "@smithy/hash-node": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "@smithy/util-buffer-from": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-QhBYbGrbxTkZ43QoTPrK72DoYviDeg6YKDrHTMJbbC+A0sml3kSjzFtXP7BtbyJnXojLfTQldGdUR0RGD8dA3w=="],
+
+ "@smithy/hash-stream-node": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-O3YbmGExeafuM/kP7Y8r6+1y0hIh3/zn6GROx0uNlB54K9oihAL75Qtc+jFfLNliTi6pxOAYZrRKD9A7iA6UFw=="],
+
+ "@smithy/invalid-dependency": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-/4F1zb7Z8LOu1PalTdESFHR0RbPwHd3FcaG1sI3UEIriQTWakysgJr65lc1jj6QY5ye7aFsisajotH6UhWfm/g=="],
+
+ "@smithy/is-array-buffer": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-n6rQ4N8Jj4YTQO3YFrlgZuwKodf4zUFs7EJIWH86pSCWBaAtAGBFfCM7Wx6D2bBJ2xqFNxGBSrUWswT3M0VJow=="],
+
+ "@smithy/md5-js": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-W/oIpHCpWU2+iAkfZYyGWE+qkpuf3vEXHLxQQDx9FPNZTTdnul0dZ2d/gUFrtQ5je1G2kp4cjG0/24YueG2LbQ=="],
+
+ "@smithy/middleware-content-length": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/protocol-http": "^5.3.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-YE58Yz+cvFInWI/wOTrB+DbvUVz/pLn5mC5MvOV4fdRUc6qGwygyngcucRQjAhiCEbmfLOXX0gntSIcgMvAjmA=="],
+
+ "@smithy/middleware-endpoint": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/core": "^3.23.12", "@smithy/middleware-serde": "^4.2.15", "@smithy/node-config-provider": "^4.3.12", "@smithy/shared-ini-file-loader": "^4.4.7", "@smithy/types": "^4.13.1", "@smithy/url-parser": "^4.2.12", "@smithy/util-middleware": "^4.2.12", "tslib": "^2.6.2" } }, "sha512-8Qfikvd2GVKSm8S6IbjfwFlRY9VlMrj0Dp4vTwAuhqbX7NhJKE5DQc2bnfJIcY0B+2YKMDBWfvexbSZeejDgeg=="],
+
+ "@smithy/middleware-retry": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.12", "@smithy/protocol-http": "^5.3.12", "@smithy/service-error-classification": "^4.2.12", "@smithy/smithy-client": "^4.12.6", "@smithy/types": "^4.13.1", "@smithy/util-middleware": "^4.2.12", "@smithy/util-retry": "^4.2.12", "@smithy/uuid": "^1.1.2", "tslib": "^2.6.2" } }, "sha512-ZwsifBdyuNHrFGmbc7bAfP2b54+kt9J2rhFd18ilQGAB+GDiP4SrawqyExbB7v455QVR7Psyhb2kjULvBPIhvA=="],
+
+ "@smithy/middleware-serde": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/core": "^3.23.12", "@smithy/protocol-http": "^5.3.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-ExYhcltZSli0pgAKOpQQe1DLFBLryeZ22605y/YS+mQpdNWekum9Ujb/jMKfJKgjtz1AZldtwA/wCYuKJgjjlg=="],
+
+ "@smithy/middleware-stack": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-kruC5gRHwsCOuyCd4ouQxYjgRAym2uDlCvQ5acuMtRrcdfg7mFBg6blaxcJ09STpt3ziEkis6bhg1uwrWU7txw=="],
+
+ "@smithy/node-config-provider": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/property-provider": "^4.2.12", "@smithy/shared-ini-file-loader": "^4.4.7", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-tr2oKX2xMcO+rBOjobSwVAkV05SIfUKz8iI53rzxEmgW3GOOPOv0UioSDk+J8OpRQnpnhsO3Af6IEBabQBVmiw=="],
+
+ "@smithy/node-http-handler": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/abort-controller": "^4.2.12", "@smithy/protocol-http": "^5.3.12", "@smithy/querystring-builder": "^4.2.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-Rnq9vQWiR1+/I6NZZMNzJHV6pZYyEHt2ZnuV3MG8z2NNenC4i/8Kzttz7CjZiHSmsN5frhXhg17z3Zqjjhmz1A=="],
+
+ "@smithy/property-provider": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-jqve46eYU1v7pZ5BM+fmkbq3DerkSluPr5EhvOcHxygxzD05ByDRppRwRPPpFrsFo5yDtCYLKu+kreHKVrvc7A=="],
+
+ "@smithy/protocol-http": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-fit0GZK9I1xoRlR4jXmbLhoN0OdEpa96ul8M65XdmXnxXkuMxM0Y8HDT0Fh0Xb4I85MBvBClOzgSrV1X2s1Hxw=="],
+
+ "@smithy/querystring-builder": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "@smithy/util-uri-escape": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-6wTZjGABQufekycfDGMEB84BgtdOE/rCVTov+EDXQ8NHKTUNIp/j27IliwP7tjIU9LR+sSzyGBOXjeEtVgzCHg=="],
+
+ "@smithy/querystring-parser": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-P2OdvrgiAKpkPNKlKUtWbNZKB1XjPxM086NeVhK+W+wI46pIKdWBe5QyXvhUm3MEcyS/rkLvY8rZzyUdmyDZBw=="],
+
+ "@smithy/service-error-classification": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1" } }, "sha512-LlP29oSQN0Tw0b6D0Xo6BIikBswuIiGYbRACy5ujw/JgWSzTdYj46U83ssf6Ux0GyNJVivs2uReU8pt7Eu9okQ=="],
+
+ "@smithy/shared-ini-file-loader": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-HrOKWsUb+otTeo1HxVWeEb99t5ER1XrBi/xka2Wv6NVmTbuCUC1dvlrksdvxFtODLBjsC+PHK+fuy2x/7Ynyiw=="],
+
+ "@smithy/signature-v4": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/is-array-buffer": "^4.2.2", "@smithy/protocol-http": "^5.3.12", "@smithy/types": "^4.13.1", "@smithy/util-hex-encoding": "^4.2.2", "@smithy/util-middleware": "^4.2.12", "@smithy/util-uri-escape": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-B/FBwO3MVOL00DaRSXfXfa/TRXRheagt/q5A2NM13u7q+sHS59EOVGQNfG7DkmVtdQm5m3vOosoKAXSqn/OEgw=="],
+
+ "@smithy/smithy-client": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/core": "^3.23.12", "@smithy/middleware-endpoint": "^4.4.26", "@smithy/middleware-stack": "^4.2.12", "@smithy/protocol-http": "^5.3.12", "@smithy/types": "^4.13.1", "@smithy/util-stream": "^4.5.20", "tslib": "^2.6.2" } }, "sha512-aib3f0jiMsJ6+cvDnXipBsGDL7ztknYSVqJs1FdN9P+u9tr/VzOR7iygSh6EUOdaBeMCMSh3N0VdyYsG4o91DQ=="],
+
+ "@smithy/types": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-787F3yzE2UiJIQ+wYW1CVg2odHjmaWLGksnKQHUrK/lYZSEcy1msuLVvxaR/sI2/aDe9U+TBuLsXnr3vod1g0g=="],
+
+ "@smithy/url-parser": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/querystring-parser": "^4.2.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-wOPKPEpso+doCZGIlr+e1lVI6+9VAKfL4kZWFgzVgGWY2hZxshNKod4l2LXS3PRC9otH/JRSjtEHqQ/7eLciRA=="],
+
+ "@smithy/util-base64": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/util-buffer-from": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-XRH6b0H/5A3SgblmMa5ErXQ2XKhfbQB+Fm/oyLZ2O2kCUrwgg55bU0RekmzAhuwOjA9qdN5VU2BprOvGGUkOOQ=="],
+
+ "@smithy/util-body-length-browser": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-JKCrLNOup3OOgmzeaKQwi4ZCTWlYR5H4Gm1r2uTMVBXoemo1UEghk5vtMi1xSu2ymgKVGW631e2fp9/R610ZjQ=="],
+
+ "@smithy/util-body-length-node": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-ZkJGvqBzMHVHE7r/hcuCxlTY8pQr1kMtdsVPs7ex4mMU+EAbcXppfo5NmyxMYi2XU49eqaz56j2gsk4dHHPG/g=="],
+
+ "@smithy/util-buffer-from": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/is-array-buffer": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-FDXD7cvUoFWwN6vtQfEta540Y/YBe5JneK3SoZg9bThSoOAC/eGeYEua6RkBgKjGa/sz6Y+DuBZj3+YEY21y4Q=="],
+
+ "@smithy/util-config-provider": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-dWU03V3XUprJwaUIFVv4iOnS1FC9HnMHDfUrlNDSh4315v0cWyaIErP8KiqGVbf5z+JupoVpNM7ZB3jFiTejvQ=="],
+
+ "@smithy/util-defaults-mode-browser": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/property-provider": "^4.2.12", "@smithy/smithy-client": "^4.12.6", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-0vjwmcvkWAUtikXnWIUOyV6IFHTEeQUYh3JUZcDgcszF+hD/StAsQ3rCZNZEPHgI9kVNcbnyc8P2CBHnwgmcwg=="],
+
+ "@smithy/util-defaults-mode-node": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/config-resolver": "^4.4.11", "@smithy/credential-provider-imds": "^4.2.12", "@smithy/node-config-provider": "^4.3.12", "@smithy/property-provider": "^4.2.12", "@smithy/smithy-client": "^4.12.6", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-q5dOqqfTgUcLe38TAGiFn9srToKj2YCHJ34QGOLzM+xYLLA+qRZv7N+33kl1MERVusue36ZHnlNaNEvY/PzSrw=="],
+
+ "@smithy/util-endpoints": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/node-config-provider": "^4.3.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-VACQVe50j0HZPjpwWcjyT51KUQ4AnsvEaQ2lKHOSL4mNLD0G9BjEniQ+yCt1qqfKfiAHRAts26ud7hBjamrwig=="],
+
+ "@smithy/util-hex-encoding": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-Qcz3W5vuHK4sLQdyT93k/rfrUwdJ8/HZ+nMUOyGdpeGA1Wxt65zYwi3oEl9kOM+RswvYq90fzkNDahPS8K0OIg=="],
+
+ "@smithy/util-middleware": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-Er805uFUOvgc0l8nv0e0su0VFISoxhJ/AwOn3gL2NWNY2LUEldP5WtVcRYSQBcjg0y9NfG8JYrCJaYDpupBHJQ=="],
+
+ "@smithy/util-retry": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/service-error-classification": "^4.2.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-1zopLDUEOwumjcHdJ1mwBHddubYF8GMQvstVCLC54Y46rqoHwlIU+8ZzUeaBcD+WCJHyDGSeZ2ml9YSe9aqcoQ=="],
+
+ "@smithy/util-stream": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/fetch-http-handler": "^5.3.15", "@smithy/node-http-handler": "^4.5.0", "@smithy/types": "^4.13.1", "@smithy/util-base64": "^4.3.2", "@smithy/util-buffer-from": "^4.2.2", "@smithy/util-hex-encoding": "^4.2.2", "@smithy/util-utf8": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-4yXLm5n/B5SRBR2p8cZ90Sbv4zL4NKsgxdzCzp/83cXw2KxLEumt5p+GAVyRNZgQOSrzXn9ARpO0lUe8XSlSDw=="],
+
+ "@smithy/util-uri-escape": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-2kAStBlvq+lTXHyAZYfJRb/DfS3rsinLiwb+69SstC9Vb0s9vNWkRwpnj918Pfi85mzi42sOqdV72OLxWAISnw=="],
+
+ "@smithy/util-utf8": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/util-buffer-from": "^4.2.2", "tslib": "^2.6.2" } }, "sha512-75MeYpjdWRe8M5E3AW0O4Cx3UadweS+cwdXjwYGBW5h/gxxnbeZ877sLPX/ZJA9GVTlL/qG0dXP29JWFCD1Ayw=="],
+
+ "@smithy/util-waiter": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/abort-controller": "^4.2.12", "@smithy/types": "^4.13.1", "tslib": "^2.6.2" } }, "sha512-2zdZ9DTHngRtcYxJK1GUDxruNr53kv5W2Lupe0LMU+Imr6ohQg8M2T14MNkj1Y0wS3FFwpgpGQyvuaMF7CiTmQ=="],
+
+ "@smithy/uuid": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-O/IEdcCUKkubz60tFbGA7ceITTAJsty+lBjNoorP4Z6XRqaFb/OjQjZODophEcuq68nKm6/0r+6/lLQ+XVpk8g=="],
+
+ "@types/bun": ["@types/[email protected]", "", { "dependencies": { "bun-types": "1.3.11" } }, "sha512-5vPne5QvtpjGpsGYXiFyycfpDF2ECyPcTSsFBMa0fraoxiQyMJ3SmuQIGhzPg2WJuWxVBoxWJ2kClYTcw/4fAg=="],
+
+ "@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~7.18.0" } }, "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw=="],
+
+ "bowser": ["[email protected]", "", {}, "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg=="],
+
+ "bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "*" } }, "sha512-1KGPpoxQWl9f6wcZh57LvrPIInQMn2TQ7jsgxqpRzg+l0QPOFvJVH7HmvHo/AiPgwXy+/Thf6Ov3EdVn1vOabg=="],
+
+ "fast-xml-builder": ["[email protected]", "", { "dependencies": { "path-expression-matcher": "^1.1.3" } }, "sha512-f2jhpN4Eccy0/Uz9csxh3Nu6q4ErKxf0XIsasomfOihuSUa3/xw6w8dnOtCDgEItQFJG8KyXPzQXzcODDrrbOg=="],
+
+ "fast-xml-parser": ["[email protected]", "", { "dependencies": { "fast-xml-builder": "^1.1.4", "path-expression-matcher": "^1.1.3", "strnum": "^2.1.2" }, "bin": { "fxparser": "src/cli/cli.js" } }, "sha512-3+fdZyBRVg29n4rXP0joHthhcHdPUHaIC16cuyyd1iLsuaO6Vea36MPrxgAzbZna8lhvZeRL8Bc9GP56/J9xEw=="],
+
+ "path-expression-matcher": ["[email protected]", "", {}, "sha512-qdVgY8KXmVdJZRSS1JdEPOKPdTiEK/pi0RkcT2sw1RhXxohdujUlJFPuS1TSkevZ9vzd3ZlL7ULl1MHGTApKzQ=="],
+
+ "strnum": ["[email protected]", "", {}, "sha512-Y7Bj8XyJxnPAORMZj/xltsfo55uOiyHcU2tnAVzHUnSJR/KsEX+9RoDeXEnsXtl/CX4fAcrt64gZ13aGaWPeBg=="],
+
+ "tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
+
+ "undici-types": ["[email protected]", "", {}, "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w=="],
+
+ "@aws-crypto/sha1-browser/@smithy/util-utf8": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="],
+
+ "@aws-crypto/sha256-browser/@smithy/util-utf8": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="],
+
+ "@aws-crypto/util/@smithy/util-utf8": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/util-buffer-from": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-R8Rdn8Hy72KKcebgLiv8jQcQkXoLMOGGv5uI1/k0l+snqkOzQ1R0ChUBCxWMlBsFMekWjq0wRudIweFs7sKT5A=="],
+
+ "@aws-crypto/sha1-browser/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="],
+
+ "@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="],
+
+ "@aws-crypto/util/@smithy/util-utf8/@smithy/util-buffer-from": ["@smithy/[email protected]", "", { "dependencies": { "@smithy/is-array-buffer": "^2.2.0", "tslib": "^2.6.2" } }, "sha512-IJdWBbTcMQ6DA0gdNhh/BwrLkDR+ADW5Kr1aZmd4k3DIF6ezMV4R2NIAmT08wQJ3yUK82thHWmC/TnK/wpMMIA=="],
+
+ "@aws-crypto/sha1-browser/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="],
+
+ "@aws-crypto/sha256-browser/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="],
+
+ "@aws-crypto/util/@smithy/util-utf8/@smithy/util-buffer-from/@smithy/is-array-buffer": ["@smithy/[email protected]", "", { "dependencies": { "tslib": "^2.6.2" } }, "sha512-GGP3O9QFD24uGeAXYUjwSTXARoqpZykHadOmA8G5vfJPK0/DC67qa//0qvqrJzL1xc8WQWX7/yc7fwudjPHPhA=="],
+ }
+}
diff --git a/scripts/migrate-s3-keys-extensionless/index.ts b/scripts/migrate-s3-keys-extensionless/index.ts
new file mode 100644
index 0000000000..e4e974df13
--- /dev/null
+++ b/scripts/migrate-s3-keys-extensionless/index.ts
@@ -0,0 +1,176 @@
+import {
+ S3Client,
+ ListObjectsV2Command,
+ CopyObjectCommand,
+ HeadObjectCommand,
+} from "@aws-sdk/client-s3";
+
+const S3_BUCKET = process.env.S3_BUCKET;
+const DRY_RUN = process.env.DRY_RUN === "true";
+const PREFIX = process.env.PREFIX ?? "macro|";
+const CONCURRENCY = parseInt(process.env.CONCURRENCY ?? "20", 10);
+const PAGE_SIZE = parseInt(process.env.PAGE_SIZE ?? "100", 10);
+const LIMIT = process.env.LIMIT ? parseInt(process.env.LIMIT, 10) : undefined;
+const USER = process.env.USER_PREFIX;
+const DOCUMENT_ID = process.env.DOCUMENT_ID;
+
+if (!S3_BUCKET) {
+ console.error("S3_BUCKET is required");
+ process.exit(1);
+}
+
+const s3 = new S3Client({});
+
+// Matches keys in the format: {owner}/{uuid_v4}/{version_id}.{extension}
+// e.g. macro|[email protected]/12f9a0ac-d445-45e3-94c1-5e8c02f0a6d8/564457.pdf
+const UUID_V4 = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
+const VERSION_WITH_EXT_REGEX = new RegExp(
+ `${UUID_V4}/(\\d+)\\..+$`
+);
+const SKIP_PATTERNS = [/converted\.pdf$/, /^temp_files\//, /^ONBOARDING_DOCUMENTS\//];
+
+interface Stats {
+ scanned: number;
+ copied: number;
+ skipped: number;
+ missing: number;
+ errors: number;
+}
+
+const stats: Stats = { scanned: 0, copied: 0, skipped: 0, missing: 0, errors: 0 };
+
+function buildPrefix(): string | undefined {
+ if (USER && DOCUMENT_ID) return `${USER}/${DOCUMENT_ID}/`;
+ if (USER) return `${USER}/`;
+ return PREFIX || undefined;
+}
+
+function stripExtension(key: string): string {
+ // Strip everything after the version_id (handles multipart extensions like .js.map)
+ return key.replace(/(\d+)\..+$/, "$1");
+}
+
+function shouldProcess(key: string): boolean {
+ if (!VERSION_WITH_EXT_REGEX.test(key)) return false;
+ return !SKIP_PATTERNS.some((p) => p.test(key));
+}
+
+async function exists(key: string): Promise<boolean> {
+ try {
+ await s3.send(new HeadObjectCommand({ Bucket: S3_BUCKET, Key: key }));
+ return true;
+ } catch (err: any) {
+ if (err?.$metadata?.httpStatusCode === 404 || err?.name === "NotFound") {
+ return false;
+ }
+ throw err;
+ }
+}
+
+async function copyKey(oldKey: string, newKey: string): Promise<void> {
+ if (await exists(newKey)) {
+ if (DRY_RUN) console.log(` [dry run] SKIP (exists): ${newKey}`);
+ stats.skipped++;
+ return;
+ }
+
+ if (!(await exists(oldKey))) {
+ console.warn(` WARNING: source missing: ${oldKey}`);
+ stats.missing++;
+ return;
+ }
+
+ if (DRY_RUN) {
+ console.log(` [dry run] ${oldKey} -> ${newKey}`);
+ stats.copied++;
+ return;
+ }
+
+ try {
+ await s3.send(
+ new CopyObjectCommand({
+ Bucket: S3_BUCKET,
+ CopySource: `${S3_BUCKET}/${oldKey}`,
+ Key: newKey,
+ })
+ );
+ console.log(` Copied: ${oldKey} -> ${newKey}`);
+ stats.copied++;
+ } catch (err) {
+ console.error(` ERROR copying ${oldKey}:`, err);
+ stats.errors++;
+ }
+}
+
+async function processBatch(keys: string[]): Promise<void> {
+ const tasks = keys.map((key) => copyKey(key, stripExtension(key)));
+ await Promise.all(tasks);
+}
+
+async function main() {
+ console.log("=== Migrating S3 keys to extensionless convention ===");
+ console.log(` Bucket: ${S3_BUCKET}`);
+ console.log(` Prefix: ${PREFIX || "<all>"}`);
+ console.log(` Concurrency: ${CONCURRENCY}`);
+ if (USER) console.log(` User: ${USER}`);
+ if (DOCUMENT_ID) console.log(` Document: ${DOCUMENT_ID}`);
+ if (DRY_RUN) console.log(` === DRY RUN MODE ===${LIMIT ? ` (limit: ${LIMIT})` : ""}`);
+
+ console.log();
+
+ let continuationToken: string | undefined;
+
+ do {
+ const response = await s3.send(
+ new ListObjectsV2Command({
+ Bucket: S3_BUCKET,
+ Prefix: buildPrefix(),
+ MaxKeys: PAGE_SIZE,
+ ContinuationToken: continuationToken,
+ })
+ );
+
+ const keys = (response.Contents ?? [])
+ .filter((obj) => obj.Key)
+ .map((obj) => obj.Key!);
+
+ stats.scanned += keys.length;
+
+ let toMigrate = keys.filter(shouldProcess);
+
+ if (LIMIT !== undefined) {
+ const remaining = LIMIT - stats.copied - stats.skipped - stats.missing;
+ if (remaining <= 0) break;
+ toMigrate = toMigrate.slice(0, remaining);
+ }
+
+ // Process in concurrent batches
+ for (let i = 0; i < toMigrate.length; i += CONCURRENCY) {
+ const batch = toMigrate.slice(i, i + CONCURRENCY);
+ await processBatch(batch);
+ }
+
+ continuationToken = response.IsTruncated
+ ? response.NextContinuationToken
+ : undefined;
+
+ if (continuationToken) {
+ console.log(
+ ` ... scanned=${stats.scanned} copied=${stats.copied} skipped=${stats.skipped}`
+ );
+ }
+ } while (continuationToken);
+
+ console.log();
+ console.log("=== Migration complete ===");
+ console.log(` Scanned: ${stats.scanned}`);
+ console.log(` Copied: ${stats.copied}`);
+ console.log(` Skipped: ${stats.skipped} (extensionless key already exists)`);
+ console.log(` Missing: ${stats.missing} (source key not found)`);
+ console.log(` Errors: ${stats.errors}`);
+}
+
+main().catch((err) => {
+ console.error("Fatal error:", err);
+ process.exit(1);
+});
diff --git a/scripts/migrate-s3-keys-extensionless/package.json b/scripts/migrate-s3-keys-extensionless/package.json
new file mode 100644
index 0000000000..baf2b7cfee
--- /dev/null
+++ b/scripts/migrate-s3-keys-extensionless/package.json
@@ -0,0 +1,14 @@
+{
+ "name": "migrate-s3-keys-extensionless",
+ "private": true,
+ "type": "module",
+ "scripts": {
+ "migrate": "bun run index.ts"
+ },
+ "dependencies": {
+ "@aws-sdk/client-s3": "^3.700.0"
+ },
+ "devDependencies": {
+ "@types/bun": "latest"
+ }
+}