Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions templates/eject/rust/src/satellite/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ic-cdk = "0.17.1"
ic-cdk-macros = "0.17.1"
serde = "1.0.217"
serde_cbor = "0.11.2"
junobuild-satellite = "0.1.0"
junobuild-macros = "0.1.0"
junobuild-satellite = "0.2.0"
junobuild-macros = "0.2.0"
junobuild-utils = "0.1.0"

65 changes: 62 additions & 3 deletions templates/eject/rust/src/satellite/satellite.did
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type AssetNoContent = record {
created_at : nat64;
version : opt nat64;
};
type AssetsUpgradeOptions = record { clear_existing_assets : opt bool };
type AuthenticationConfig = record {
internet_identity : opt AuthenticationConfigInternetIdentity;
};
Expand All @@ -32,6 +33,7 @@ type CommitBatch = record {
headers : vec record { text; text };
chunk_ids : vec nat;
};
type CommitProposal = record { sha256 : blob; proposal_id : nat };
type Config = record {
db : opt DbConfig;
authentication : opt AuthenticationConfig;
Expand All @@ -45,7 +47,7 @@ type Controller = record {
scope : ControllerScope;
expires_at : opt nat64;
};
type ControllerScope = variant { Write; Admin };
type ControllerScope = variant { Write; Admin; Submit };
type CustomDomain = record {
updated_at : nat64;
created_at : nat64;
Expand All @@ -56,6 +58,7 @@ type DbConfig = record { max_memory_size : opt ConfigMaxMemorySize };
type DelDoc = record { version : opt nat64 };
type DelRule = record { version : opt nat64 };
type DeleteControllersArgs = record { controllers : vec principal };
type DeleteProposalAssets = record { proposal_ids : vec nat };
type DepositCyclesArgs = record { cycles : nat; destination_id : principal };
type Doc = record {
updated_at : nat64;
Expand Down Expand Up @@ -102,6 +105,17 @@ type ListParams = record {
matcher : opt ListMatcher;
paginate : opt ListPaginate;
};
type ListProposalResults = record {
matches_length : nat64;
items : vec record { ProposalKey; Proposal };
items_length : nat64;
};
type ListProposalsOrder = record { desc : bool };
type ListProposalsPaginate = record { start_after : opt nat; limit : opt nat };
type ListProposalsParams = record {
order : opt ListProposalsOrder;
paginate : opt ListProposalsPaginate;
};
type ListResults = record {
matches_pages : opt nat64;
matches_length : nat64;
Expand All @@ -116,9 +130,39 @@ type ListResults_1 = record {
items : vec record { text; Doc };
items_length : nat64;
};
type ListRulesMatcher = record { include_system : bool };
type ListRulesParams = record { matcher : opt ListRulesMatcher };
type ListRulesResults = record {
matches_length : nat64;
items : vec record { text; Rule };
items_length : nat64;
};
type Memory = variant { Heap; Stable };
type MemorySize = record { stable : nat64; heap : nat64 };
type Permission = variant { Controllers; Private; Public; Managed };
type Proposal = record {
status : ProposalStatus;
updated_at : nat64;
sha256 : opt blob;
executed_at : opt nat64;
owner : principal;
created_at : nat64;
version : opt nat64;
proposal_type : ProposalType;
};
type ProposalKey = record { proposal_id : nat };
type ProposalStatus = variant {
Initialized;
Failed;
Open;
Rejected;
Executed;
Accepted;
};
type ProposalType = variant {
AssetsUpgrade : AssetsUpgradeOptions;
SegmentsDeployment : SegmentsDeploymentOptions;
};
type RateConfig = record { max_tokens : nat64; time_per_token_ns : nat64 };
type Rule = record {
max_capacity : opt nat32;
Expand All @@ -133,6 +177,11 @@ type Rule = record {
write : Permission;
max_changes_per_user : opt nat32;
};
type SegmentsDeploymentOptions = record {
orbiter : opt text;
mission_control_version : opt text;
satellite_version : opt text;
};
type SetController = record {
metadata : vec record { text; text };
scope : ControllerScope;
Expand Down Expand Up @@ -202,10 +251,13 @@ type UploadChunk = record {
type UploadChunkResult = record { chunk_id : nat };
service : () -> {
commit_asset_upload : (CommitBatch) -> ();
commit_proposal : (CommitProposal) -> (null);
commit_proposal_asset_upload : (CommitBatch) -> ();
count_assets : (text, ListParams) -> (nat64) query;
count_collection_assets : (text) -> (nat64) query;
count_collection_docs : (text) -> (nat64) query;
count_docs : (text, ListParams) -> (nat64) query;
count_proposals : () -> (nat64) query;
del_asset : (text, text) -> ();
del_assets : (text) -> ();
del_controllers : (DeleteControllersArgs) -> (
Expand All @@ -219,6 +271,7 @@ service : () -> {
del_many_assets : (vec record { text; text }) -> ();
del_many_docs : (vec record { text; text; DelDoc }) -> ();
del_rule : (CollectionType, text, DelRule) -> ();
delete_proposal_assets : (DeleteProposalAssets) -> ();
deposit_cycles : (DepositCyclesArgs) -> ();
get_asset : (text, text) -> (opt AssetNoContent) query;
get_auth_config : () -> (opt AuthenticationConfig) query;
Expand All @@ -231,19 +284,24 @@ service : () -> {
get_many_docs : (vec record { text; text }) -> (
vec record { text; opt Doc },
) query;
get_proposal : (nat) -> (opt Proposal) query;
get_rule : (CollectionType, text) -> (opt Rule) query;
get_storage_config : () -> (StorageConfig) query;
http_request : (HttpRequest) -> (HttpResponse) query;
http_request_streaming_callback : (StreamingCallbackToken) -> (
StreamingCallbackHttpResponse,
) query;
init_asset_upload : (InitAssetKey) -> (InitUploadResult);
init_proposal : (ProposalType) -> (nat, Proposal);
init_proposal_asset_upload : (InitAssetKey, nat) -> (InitUploadResult);
list_assets : (text, ListParams) -> (ListResults) query;
list_controllers : () -> (vec record { principal; Controller }) query;
list_custom_domains : () -> (vec record { text; CustomDomain }) query;
list_docs : (text, ListParams) -> (ListResults_1) query;
list_rules : (CollectionType) -> (vec record { text; Rule }) query;
list_proposals : (ListProposalsParams) -> (ListProposalResults) query;
list_rules : (CollectionType, ListRulesParams) -> (ListRulesResults) query;
memory_size : () -> (MemorySize) query;
reject_proposal : (CommitProposal) -> (null);
set_auth_config : (AuthenticationConfig) -> ();
set_controllers : (SetControllersArgs) -> (
vec record { principal; Controller },
Expand All @@ -256,6 +314,7 @@ service : () -> {
);
set_rule : (CollectionType, text, SetRule) -> (Rule);
set_storage_config : (StorageConfig) -> ();
submit_proposal : (nat) -> (nat, Proposal);
upload_asset_chunk : (UploadChunk) -> (UploadChunkResult);
version : () -> (text) query;
upload_proposal_asset_chunk : (UploadChunk) -> (UploadChunkResult);
}