From 4b61f69669b819343cb44d8f88206d6f36226681 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Tue, 19 Aug 2025 12:38:22 +0200 Subject: [PATCH] feat: update satellite.did template as released in juno v0.0.54 --- .../eject/rust/src/satellite/satellite.did | 43 +++++++++++++++++-- 1 file changed, 39 insertions(+), 4 deletions(-) diff --git a/templates/eject/rust/src/satellite/satellite.did b/templates/eject/rust/src/satellite/satellite.did index 2b3f88a1..449e1e5e 100644 --- a/templates/eject/rust/src/satellite/satellite.did +++ b/templates/eject/rust/src/satellite/satellite.did @@ -21,12 +21,17 @@ type AssetNoContent = record { }; type AssetsUpgradeOptions = record { clear_existing_assets : opt bool }; type AuthenticationConfig = record { + updated_at : opt nat64; + created_at : opt nat64; + version : opt nat64; internet_identity : opt AuthenticationConfigInternetIdentity; + rules : opt AuthenticationRules; }; type AuthenticationConfigInternetIdentity = record { derivation_origin : opt text; external_alternative_origins : opt vec text; }; +type AuthenticationRules = record { allowed_callers : vec principal }; type CollectionType = variant { Db; Storage }; type CommitBatch = record { batch_id : nat; @@ -54,7 +59,12 @@ type CustomDomain = record { version : opt nat64; bn_id : opt text; }; -type DbConfig = record { max_memory_size : opt ConfigMaxMemorySize }; +type DbConfig = record { + updated_at : opt nat64; + created_at : opt nat64; + version : opt nat64; + max_memory_size : opt ConfigMaxMemorySize; +}; type DelDoc = record { version : opt nat64 }; type DelRule = record { version : opt nat64 }; type DeleteControllersArgs = record { controllers : vec principal }; @@ -182,6 +192,11 @@ type SegmentsDeploymentOptions = record { mission_control_version : opt text; satellite_version : opt text; }; +type SetAuthenticationConfig = record { + version : opt nat64; + internet_identity : opt AuthenticationConfigInternetIdentity; + rules : opt AuthenticationRules; +}; type SetController = record { metadata : vec record { text; text }; scope : ControllerScope; @@ -191,6 +206,10 @@ type SetControllersArgs = record { controller : SetController; controllers : vec principal; }; +type SetDbConfig = record { + version : opt nat64; + max_memory_size : opt ConfigMaxMemorySize; +}; type SetDoc = record { data : blob; description : opt text; @@ -207,10 +226,22 @@ type SetRule = record { write : Permission; max_changes_per_user : opt nat32; }; +type SetStorageConfig = record { + iframe : opt StorageConfigIFrame; + rewrites : vec record { text; text }; + headers : vec record { text; vec record { text; text } }; + version : opt nat64; + max_memory_size : opt ConfigMaxMemorySize; + raw_access : opt StorageConfigRawAccess; + redirects : opt vec record { text; StorageConfigRedirect }; +}; type StorageConfig = record { iframe : opt StorageConfigIFrame; + updated_at : opt nat64; rewrites : vec record { text; text }; headers : vec record { text; vec record { text; text } }; + created_at : opt nat64; + version : opt nat64; max_memory_size : opt ConfigMaxMemorySize; raw_access : opt StorageConfigRawAccess; redirects : opt vec record { text; StorageConfigRedirect }; @@ -253,6 +284,7 @@ service : () -> { commit_asset_upload : (CommitBatch) -> (); commit_proposal : (CommitProposal) -> (null); commit_proposal_asset_upload : (CommitBatch) -> (); + commit_proposal_many_assets_upload : (vec CommitBatch) -> (); count_assets : (text, ListParams) -> (nat64) query; count_collection_assets : (text) -> (nat64) query; count_collection_docs : (text) -> (nat64) query; @@ -294,6 +326,9 @@ service : () -> { init_asset_upload : (InitAssetKey) -> (InitUploadResult); init_proposal : (ProposalType) -> (nat, Proposal); init_proposal_asset_upload : (InitAssetKey, nat) -> (InitUploadResult); + init_proposal_many_assets_upload : (vec InitAssetKey, nat) -> ( + vec record { text; InitUploadResult }, + ); list_assets : (text, ListParams) -> (ListResults) query; list_controllers : () -> (vec record { principal; Controller }) query; list_custom_domains : () -> (vec record { text; CustomDomain }) query; @@ -302,18 +337,18 @@ service : () -> { list_rules : (CollectionType, ListRulesParams) -> (ListRulesResults) query; memory_size : () -> (MemorySize) query; reject_proposal : (CommitProposal) -> (null); - set_auth_config : (AuthenticationConfig) -> (); + set_auth_config : (SetAuthenticationConfig) -> (AuthenticationConfig); set_controllers : (SetControllersArgs) -> ( vec record { principal; Controller }, ); set_custom_domain : (text, opt text) -> (); - set_db_config : (DbConfig) -> (); + set_db_config : (SetDbConfig) -> (DbConfig); set_doc : (text, text, SetDoc) -> (Doc); set_many_docs : (vec record { text; text; SetDoc }) -> ( vec record { text; Doc }, ); set_rule : (CollectionType, text, SetRule) -> (Rule); - set_storage_config : (StorageConfig) -> (); + set_storage_config : (SetStorageConfig) -> (StorageConfig); submit_proposal : (nat) -> (nat, Proposal); upload_asset_chunk : (UploadChunk) -> (UploadChunkResult); upload_proposal_asset_chunk : (UploadChunk) -> (UploadChunkResult);