From a2c71867abc22151a9eed60937943693ce0f8d62 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Sun, 26 Apr 2026 07:37:08 +0200 Subject: [PATCH] feat: update Juno did declarations --- cli/src/declarations/console.d.ts | 77 ++++++++++++++----- cli/src/declarations/console.did | 61 ++++++++++----- cli/src/declarations/console.idl.js | 56 +++++++++++--- cli/src/declarations/mission_control.d.ts | 46 +++++++---- cli/src/declarations/mission_control.did | 42 ++++++---- cli/src/declarations/mission_control.idl.js | 43 ++++++++--- cli/src/declarations/observatory.d.ts | 28 ++++--- cli/src/declarations/observatory.did | 22 +++--- cli/src/declarations/observatory.idl.js | 23 +++--- cli/src/declarations/orbiter.d.ts | 33 ++++---- cli/src/declarations/orbiter.did | 31 ++++---- cli/src/declarations/orbiter.idl.js | 26 ++++--- cli/src/declarations/satellite.d.ts | 61 ++++++++++----- cli/src/declarations/satellite.did | 60 ++++++++++----- cli/src/declarations/satellite.idl.js | 68 +++++++++++----- cli/src/modules/satellite/satellite.config.ts | 4 +- .../services/modules/juno.module.services.ts | 4 +- .../services/server/controller.services.ts | 4 +- 18 files changed, 453 insertions(+), 236 deletions(-) diff --git a/cli/src/declarations/console.d.ts b/cli/src/declarations/console.d.ts index a96da6dd..20a6e532 100644 --- a/cli/src/declarations/console.d.ts +++ b/cli/src/declarations/console.d.ts @@ -2,7 +2,7 @@ // @ts-nocheck -// This file was automatically generated by @icp-sdk/bindgen@0.2.0. +// This file was automatically generated by @icp-sdk/bindgen@0.3.0. // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. @@ -10,6 +10,16 @@ import type {ActorMethod} from '@icp-sdk/core/agent'; import type {IDL} from '@icp-sdk/core/candid'; import type {Principal} from '@icp-sdk/core/principal'; +export interface AccessKey { + updated_at: bigint; + metadata: Array<[string, string]>; + kind: [] | [AccessKeyKind]; + created_at: bigint; + scope: AccessKeyScope; + expires_at: [] | [bigint]; +} +export type AccessKeyKind = {Emulator: null} | {Automation: null}; +export type AccessKeyScope = {Write: null} | {Admin: null} | {Submit: null}; export interface Account { updated_at: bigint; credits: Tokens; @@ -18,6 +28,12 @@ export interface Account { owner: Principal; created_at: bigint; } +export interface AccountConfig { + updated_at: [] | [bigint]; + init_credits: Tokens; + created_at: [] | [bigint]; + version: [] | [bigint]; +} export interface Account_1 { owner: Principal; subaccount: [] | [Uint8Array]; @@ -96,16 +112,6 @@ export interface ConfigMaxMemorySize { stable: [] | [bigint]; heap: [] | [bigint]; } -export interface Controller { - updated_at: bigint; - metadata: Array<[string, string]>; - kind: [] | [ControllerKind]; - created_at: bigint; - scope: ControllerScope; - expires_at: [] | [bigint]; -} -export type ControllerKind = {Emulator: null} | {Automation: null}; -export type ControllerScope = {Write: null} | {Admin: null} | {Submit: null}; export interface CreateMissionControlArgs { subnet_id: [] | [Principal]; } @@ -122,6 +128,15 @@ export interface CreateSatelliteArgs { name: [] | [string]; user: Principal; } +export type CreateSegmentArgs = + | {Ufo: CreateUfoArgs} + | {Orbiter: CreateOrbiterArgs} + | {MissionControl: CreateMissionControlArgs} + | {Satellite: CreateSatelliteArgs}; +export interface CreateUfoArgs { + subnet_id: [] | [Principal]; + name: [] | [string]; +} export interface CustomDomain { updated_at: bigint; created_at: bigint; @@ -367,26 +382,34 @@ export interface SegmentKey { segment_id: Principal; segment_kind: StorableSegmentKind; } -export type SegmentKind = {Orbiter: null} | {MissionControl: null} | {Satellite: null}; +export type SegmentKind = + | {Ufo: null} + | {Orbiter: null} + | {MissionControl: null} + | {Satellite: null}; export interface SegmentsDeploymentOptions { orbiter: [] | [string]; mission_control_version: [] | [string]; satellite_version: [] | [string]; } +export interface SetAccessKey { + metadata: Array<[string, string]>; + kind: [] | [AccessKeyKind]; + scope: AccessKeyScope; + expires_at: [] | [bigint]; +} +export interface SetAccountConfig { + init_credits: Tokens; + version: [] | [bigint]; +} export interface SetAuthenticationConfig { openid: [] | [AuthenticationConfigOpenId]; version: [] | [bigint]; internet_identity: [] | [AuthenticationConfigInternetIdentity]; rules: [] | [AuthenticationRules]; } -export interface SetController { - metadata: Array<[string, string]>; - kind: [] | [ControllerKind]; - scope: ControllerScope; - expires_at: [] | [bigint]; -} export interface SetControllersArgs { - controller: SetController; + controller: SetAccessKey; controllers: Array; } export interface SetSegmentMetadataArgs { @@ -412,7 +435,7 @@ export interface SignedDelegation { signature: Uint8Array; delegation: Delegation; } -export type StorableSegmentKind = {Orbiter: null} | {Satellite: null}; +export type StorableSegmentKind = {Ufo: null} | {Orbiter: null} | {Satellite: null}; export interface StorageConfig { iframe: [] | [StorageConfigIFrame]; updated_at: [] | [bigint]; @@ -469,6 +492,13 @@ export interface UploadChunk { export interface UploadChunkResult { chunk_id: bigint; } +export interface WithdrawArgs { + to: Principal; +} +export interface WithdrawResult { + block_index: bigint; + amount: bigint; +} export interface _SERVICE { add_credits: ActorMethod<[Principal, Tokens], undefined>; add_invitation_code: ActorMethod<[string], undefined>; @@ -481,10 +511,12 @@ export interface _SERVICE { create_mission_control: ActorMethod<[CreateMissionControlArgs], Principal>; create_orbiter: ActorMethod<[CreateOrbiterArgs], Principal>; create_satellite: ActorMethod<[CreateSatelliteArgs], Principal>; + create_segment: ActorMethod<[CreateSegmentArgs], Principal>; del_controllers: ActorMethod<[DeleteControllersArgs], undefined>; del_custom_domain: ActorMethod<[string], undefined>; delete_proposal_assets: ActorMethod<[DeleteProposalAssets], undefined>; get_account: ActorMethod<[], [] | [Account]>; + get_account_config: ActorMethod<[], [] | [AccountConfig]>; get_auth_config: ActorMethod<[], [] | [AuthenticationConfig]>; get_config: ActorMethod<[], Config>; get_create_orbiter_fee: ActorMethod<[GetCreateCanisterFeeArgs], [] | [Tokens]>; @@ -509,13 +541,14 @@ export interface _SERVICE { >; list_accounts: ActorMethod<[], Array<[Principal, Account]>>; list_assets: ActorMethod<[string, ListParams], ListResults>; - list_controllers: ActorMethod<[], Array<[Principal, Controller]>>; + list_controllers: ActorMethod<[], Array<[Principal, AccessKey]>>; list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>; list_icp_payments: ActorMethod<[], Array<[bigint, IcpPayment]>>; list_icrc_payments: ActorMethod<[], Array<[IcrcPaymentKey, IcrcPayment]>>; list_proposals: ActorMethod<[ListProposalsParams], ListProposalResults>; list_segments: ActorMethod<[ListSegmentsArgs], Array<[SegmentKey, Segment]>>; reject_proposal: ActorMethod<[CommitProposal], null>; + set_account_config: ActorMethod<[SetAccountConfig], AccountConfig>; set_auth_config: ActorMethod<[SetAuthenticationConfig], AuthenticationConfig>; set_controllers: ActorMethod<[SetControllersArgs], undefined>; set_custom_domain: ActorMethod<[string, [] | [string]], undefined>; @@ -529,6 +562,8 @@ export interface _SERVICE { unset_many_segments: ActorMethod<[Array], undefined>; unset_segment: ActorMethod<[UnsetSegmentsArgs], undefined>; upload_proposal_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>; + withdraw_icp: ActorMethod<[WithdrawArgs], WithdrawResult>; + withdraw_icrc: ActorMethod<[WithdrawArgs], WithdrawResult>; } export declare const idlFactory: IDL.InterfaceFactory; export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[]; diff --git a/cli/src/declarations/console.did b/cli/src/declarations/console.did index d22c37be..c9ec7ccc 100644 --- a/cli/src/declarations/console.did +++ b/cli/src/declarations/console.did @@ -1,3 +1,13 @@ +type AccessKey = record { + updated_at : nat64; + metadata : vec record { text; text }; + kind : opt AccessKeyKind; + created_at : nat64; + scope : AccessKeyScope; + expires_at : opt nat64; +}; +type AccessKeyKind = variant { Emulator; Automation }; +type AccessKeyScope = variant { Write; Admin; Submit }; type Account = record { updated_at : nat64; credits : Tokens; @@ -6,6 +16,12 @@ type Account = record { owner : principal; created_at : nat64; }; +type AccountConfig = record { + updated_at : opt nat64; + init_credits : Tokens; + created_at : opt nat64; + version : opt nat64; +}; type Account_1 = record { owner : principal; subaccount : opt blob }; type AssertMissionControlCenterArgs = record { mission_control_id : principal; @@ -70,16 +86,6 @@ type Config = record { storage : StorageConfig; }; type ConfigMaxMemorySize = record { stable : opt nat64; heap : opt nat64 }; -type Controller = record { - updated_at : nat64; - metadata : vec record { text; text }; - kind : opt ControllerKind; - created_at : nat64; - scope : ControllerScope; - expires_at : opt nat64; -}; -type ControllerKind = variant { Emulator; Automation }; -type ControllerScope = variant { Write; Admin; Submit }; type CreateMissionControlArgs = record { subnet_id : opt principal }; type CreateOrbiterArgs = record { block_index : opt nat64; @@ -94,6 +100,13 @@ type CreateSatelliteArgs = record { name : opt text; user : principal; }; +type CreateSegmentArgs = variant { + Ufo : CreateUfoArgs; + Orbiter : CreateOrbiterArgs; + MissionControl : CreateMissionControlArgs; + Satellite : CreateSatelliteArgs; +}; +type CreateUfoArgs = record { subnet_id : opt principal; name : opt text }; type CustomDomain = record { updated_at : nat64; created_at : nat64; @@ -304,26 +317,27 @@ type SegmentKey = record { segment_id : principal; segment_kind : StorableSegmentKind; }; -type SegmentKind = variant { Orbiter; MissionControl; Satellite }; +type SegmentKind = variant { Ufo; Orbiter; MissionControl; Satellite }; type SegmentsDeploymentOptions = record { orbiter : opt text; mission_control_version : opt text; satellite_version : opt text; }; +type SetAccessKey = record { + metadata : vec record { text; text }; + kind : opt AccessKeyKind; + scope : AccessKeyScope; + expires_at : opt nat64; +}; +type SetAccountConfig = record { init_credits : Tokens; version : opt nat64 }; type SetAuthenticationConfig = record { openid : opt AuthenticationConfigOpenId; version : opt nat64; internet_identity : opt AuthenticationConfigInternetIdentity; rules : opt AuthenticationRules; }; -type SetController = record { - metadata : vec record { text; text }; - kind : opt ControllerKind; - scope : ControllerScope; - expires_at : opt nat64; -}; type SetControllersArgs = record { - controller : SetController; + controller : SetAccessKey; controllers : vec principal; }; type SetSegmentMetadataArgs = record { @@ -346,7 +360,7 @@ type SetStorageConfig = record { redirects : opt vec record { text; StorageConfigRedirect }; }; type SignedDelegation = record { signature : blob; delegation : Delegation }; -type StorableSegmentKind = variant { Orbiter; Satellite }; +type StorableSegmentKind = variant { Ufo; Orbiter; Satellite }; type StorageConfig = record { iframe : opt StorageConfigIFrame; updated_at : opt nat64; @@ -397,6 +411,8 @@ type UploadChunk = record { order_id : opt nat; }; type UploadChunkResult = record { chunk_id : nat }; +type WithdrawArgs = record { to : principal }; +type WithdrawResult = record { block_index : nat64; amount : nat64 }; service : () -> { add_credits : (principal, Tokens) -> (); add_invitation_code : (text) -> (); @@ -409,10 +425,12 @@ service : () -> { create_mission_control : (CreateMissionControlArgs) -> (principal); create_orbiter : (CreateOrbiterArgs) -> (principal); create_satellite : (CreateSatelliteArgs) -> (principal); + create_segment : (CreateSegmentArgs) -> (principal); del_controllers : (DeleteControllersArgs) -> (); del_custom_domain : (text) -> (); delete_proposal_assets : (DeleteProposalAssets) -> (); get_account : () -> (opt Account) query; + get_account_config : () -> (opt AccountConfig) query; get_auth_config : () -> (opt AuthenticationConfig) query; get_config : () -> (Config) query; get_create_orbiter_fee : (GetCreateCanisterFeeArgs) -> (opt Tokens) query; @@ -435,7 +453,7 @@ service : () -> { ); list_accounts : () -> (vec record { principal; Account }) query; list_assets : (text, ListParams) -> (ListResults) query; - list_controllers : () -> (vec record { principal; Controller }) query; + list_controllers : () -> (vec record { principal; AccessKey }) query; list_custom_domains : () -> (vec record { text; CustomDomain }) query; list_icp_payments : () -> (vec record { nat64; IcpPayment }) query; list_icrc_payments : () -> (vec record { IcrcPaymentKey; IcrcPayment }) query; @@ -444,6 +462,7 @@ service : () -> { vec record { SegmentKey; Segment }, ) query; reject_proposal : (CommitProposal) -> (null); + set_account_config : (SetAccountConfig) -> (AccountConfig); set_auth_config : (SetAuthenticationConfig) -> (AuthenticationConfig); set_controllers : (SetControllersArgs) -> (); set_custom_domain : (text, opt text) -> (); @@ -457,4 +476,6 @@ service : () -> { unset_many_segments : (vec UnsetSegmentsArgs) -> (); unset_segment : (UnsetSegmentsArgs) -> (); upload_proposal_asset_chunk : (UploadChunk) -> (UploadChunkResult); + withdraw_icp : (WithdrawArgs) -> (WithdrawResult); + withdraw_icrc : (WithdrawArgs) -> (WithdrawResult); } diff --git a/cli/src/declarations/console.idl.js b/cli/src/declarations/console.idl.js index e7cffa9b..49895dc4 100644 --- a/cli/src/declarations/console.idl.js +++ b/cli/src/declarations/console.idl.js @@ -2,7 +2,7 @@ // @ts-nocheck -// This file was automatically generated by @icp-sdk/bindgen@0.2.0. +// This file was automatically generated by @icp-sdk/bindgen@0.3.0. // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. @@ -128,12 +128,28 @@ export const idlFactory = ({IDL}) => { name: IDL.Opt(IDL.Text), user: IDL.Principal }); + const CreateUfoArgs = IDL.Record({ + subnet_id: IDL.Opt(IDL.Principal), + name: IDL.Opt(IDL.Text) + }); + const CreateSegmentArgs = IDL.Variant({ + Ufo: CreateUfoArgs, + Orbiter: CreateOrbiterArgs, + MissionControl: CreateMissionControlArgs, + Satellite: CreateSatelliteArgs + }); const DeleteControllersArgs = IDL.Record({ controllers: IDL.Vec(IDL.Principal) }); const DeleteProposalAssets = IDL.Record({ proposal_ids: IDL.Vec(IDL.Nat) }); + const AccountConfig = IDL.Record({ + updated_at: IDL.Opt(IDL.Nat64), + init_credits: Tokens, + created_at: IDL.Opt(IDL.Nat64), + version: IDL.Opt(IDL.Nat64) + }); const OpenIdAuthProviderDelegationConfig = IDL.Record({ targets: IDL.Opt(IDL.Vec(IDL.Principal)), max_time_to_live: IDL.Opt(IDL.Nat64) @@ -224,6 +240,7 @@ export const idlFactory = ({IDL}) => { Err: GetDelegationError }); const SegmentKind = IDL.Variant({ + Ufo: IDL.Null, Orbiter: IDL.Null, MissionControl: IDL.Null, Satellite: IDL.Null @@ -366,21 +383,21 @@ export const idlFactory = ({IDL}) => { items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)), items_length: IDL.Nat64 }); - const ControllerKind = IDL.Variant({ + const AccessKeyKind = IDL.Variant({ Emulator: IDL.Null, Automation: IDL.Null }); - const ControllerScope = IDL.Variant({ + const AccessKeyScope = IDL.Variant({ Write: IDL.Null, Admin: IDL.Null, Submit: IDL.Null }); - const Controller = IDL.Record({ + const AccessKey = IDL.Record({ updated_at: IDL.Nat64, metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), - kind: IDL.Opt(ControllerKind), + kind: IDL.Opt(AccessKeyKind), created_at: IDL.Nat64, - scope: ControllerScope, + scope: AccessKeyScope, expires_at: IDL.Opt(IDL.Nat64) }); const CustomDomain = IDL.Record({ @@ -433,6 +450,7 @@ export const idlFactory = ({IDL}) => { items_length: IDL.Nat64 }); const StorableSegmentKind = IDL.Variant({ + Ufo: IDL.Null, Orbiter: IDL.Null, Satellite: IDL.Null }); @@ -451,20 +469,24 @@ export const idlFactory = ({IDL}) => { segment_id: IDL.Principal, created_at: IDL.Nat64 }); + const SetAccountConfig = IDL.Record({ + init_credits: Tokens, + version: IDL.Opt(IDL.Nat64) + }); const SetAuthenticationConfig = IDL.Record({ openid: IDL.Opt(AuthenticationConfigOpenId), version: IDL.Opt(IDL.Nat64), internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity), rules: IDL.Opt(AuthenticationRules) }); - const SetController = IDL.Record({ + const SetAccessKey = IDL.Record({ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), - kind: IDL.Opt(ControllerKind), - scope: ControllerScope, + kind: IDL.Opt(AccessKeyKind), + scope: AccessKeyScope, expires_at: IDL.Opt(IDL.Nat64) }); const SetControllersArgs = IDL.Record({ - controller: SetController, + controller: SetAccessKey, controllers: IDL.Vec(IDL.Principal) }); const FeesArgs = IDL.Record({ @@ -500,6 +522,11 @@ export const idlFactory = ({IDL}) => { order_id: IDL.Opt(IDL.Nat) }); const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat}); + const WithdrawArgs = IDL.Record({to: IDL.Principal}); + const WithdrawResult = IDL.Record({ + block_index: IDL.Nat64, + amount: IDL.Nat64 + }); return IDL.Service({ add_credits: IDL.Func([IDL.Principal, Tokens], [], []), @@ -513,10 +540,12 @@ export const idlFactory = ({IDL}) => { create_mission_control: IDL.Func([CreateMissionControlArgs], [IDL.Principal], []), create_orbiter: IDL.Func([CreateOrbiterArgs], [IDL.Principal], []), create_satellite: IDL.Func([CreateSatelliteArgs], [IDL.Principal], []), + create_segment: IDL.Func([CreateSegmentArgs], [IDL.Principal], []), del_controllers: IDL.Func([DeleteControllersArgs], [], []), del_custom_domain: IDL.Func([IDL.Text], [], []), delete_proposal_assets: IDL.Func([DeleteProposalAssets], [], []), get_account: IDL.Func([], [IDL.Opt(Account)], ['query']), + get_account_config: IDL.Func([], [IDL.Opt(AccountConfig)], ['query']), get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], ['query']), get_config: IDL.Func([], [Config], ['query']), get_create_orbiter_fee: IDL.Func([GetCreateCanisterFeeArgs], [IDL.Opt(Tokens)], ['query']), @@ -543,7 +572,7 @@ export const idlFactory = ({IDL}) => { ), list_accounts: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Account))], ['query']), list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], ['query']), - list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']), + list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, AccessKey))], ['query']), list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']), list_icp_payments: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Nat64, IcpPayment))], ['query']), list_icrc_payments: IDL.Func([], [IDL.Vec(IDL.Tuple(IcrcPaymentKey, IcrcPayment))], ['query']), @@ -554,6 +583,7 @@ export const idlFactory = ({IDL}) => { ['query'] ), reject_proposal: IDL.Func([CommitProposal], [IDL.Null], []), + set_account_config: IDL.Func([SetAccountConfig], [AccountConfig], []), set_auth_config: IDL.Func([SetAuthenticationConfig], [AuthenticationConfig], []), set_controllers: IDL.Func([SetControllersArgs], [], []), set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []), @@ -566,7 +596,9 @@ export const idlFactory = ({IDL}) => { submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []), unset_many_segments: IDL.Func([IDL.Vec(UnsetSegmentsArgs)], [], []), unset_segment: IDL.Func([UnsetSegmentsArgs], [], []), - upload_proposal_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []) + upload_proposal_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []), + withdraw_icp: IDL.Func([WithdrawArgs], [WithdrawResult], []), + withdraw_icrc: IDL.Func([WithdrawArgs], [WithdrawResult], []) }); }; diff --git a/cli/src/declarations/mission_control.d.ts b/cli/src/declarations/mission_control.d.ts index 94a78410..50433a10 100644 --- a/cli/src/declarations/mission_control.d.ts +++ b/cli/src/declarations/mission_control.d.ts @@ -2,7 +2,7 @@ // @ts-nocheck -// This file was automatically generated by @icp-sdk/bindgen@0.2.0. +// This file was automatically generated by @icp-sdk/bindgen@0.3.0. // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. @@ -10,6 +10,16 @@ import type {ActorMethod} from '@icp-sdk/core/agent'; import type {IDL} from '@icp-sdk/core/candid'; import type {Principal} from '@icp-sdk/core/principal'; +export interface AccessKey { + updated_at: bigint; + metadata: Array<[string, string]>; + kind: [] | [AccessKeyKind]; + created_at: bigint; + scope: AccessKeyScope; + expires_at: [] | [bigint]; +} +export type AccessKeyKind = {Emulator: null} | {Automation: null}; +export type AccessKeyScope = {Write: null} | {Admin: null} | {Submit: null}; export interface Account { owner: Principal; subaccount: [] | [Uint8Array]; @@ -17,14 +27,6 @@ export interface Account { export interface Config { monitoring: [] | [MonitoringConfig]; } -export interface Controller { - updated_at: bigint; - metadata: Array<[string, string]>; - created_at: bigint; - scope: ControllerScope; - expires_at: [] | [bigint]; -} -export type ControllerScope = {Write: null} | {Admin: null} | {Submit: null}; export interface CreateCanisterConfig { subnet_id: [] | [Principal]; name: [] | [string]; @@ -50,6 +52,7 @@ export interface CyclesMonitoringStartConfig { orbiters_strategy: [] | [SegmentsMonitoringStrategy]; mission_control_strategy: [] | [CyclesMonitoringStrategy]; satellites_strategy: [] | [SegmentsMonitoringStrategy]; + ufos_strategy: [] | [SegmentsMonitoringStrategy]; } export interface CyclesMonitoringStatus { monitored_ids: Array; @@ -59,6 +62,7 @@ export interface CyclesMonitoringStopConfig { satellite_ids: [] | [Array]; try_mission_control: [] | [boolean]; orbiter_ids: [] | [Array]; + ufo_ids: [] | [Array]; } export type CyclesMonitoringStrategy = {BelowThreshold: CyclesThreshold}; export interface CyclesThreshold { @@ -148,9 +152,10 @@ export interface SegmentsMonitoringStrategy { ids: Array; strategy: CyclesMonitoringStrategy; } -export interface SetController { +export interface SetAccessKey { metadata: Array<[string, string]>; - scope: ControllerScope; + kind: [] | [AccessKeyKind]; + scope: AccessKeyScope; expires_at: [] | [bigint]; } export interface Settings { @@ -197,6 +202,13 @@ export type TransferError_1 = | {CreatedInFuture: {ledger_time: bigint}} | {TooOld: null} | {InsufficientFunds: {balance: bigint}}; +export interface Ufo { + updated_at: bigint; + metadata: Array<[string, string]>; + created_at: bigint; + settings: [] | [Settings]; + ufo_id: Principal; +} export interface User { updated_at: bigint; metadata: Array<[string, string]>; @@ -227,29 +239,33 @@ export interface _SERVICE { get_user_data: ActorMethod<[], User>; icp_transfer: ActorMethod<[TransferArgs], Result>; icrc_transfer: ActorMethod<[Principal, TransferArg], Result_1>; - list_mission_control_controllers: ActorMethod<[], Array<[Principal, Controller]>>; + list_mission_control_controllers: ActorMethod<[], Array<[Principal, AccessKey]>>; list_orbiters: ActorMethod<[], Array<[Principal, Orbiter]>>; list_satellites: ActorMethod<[], Array<[Principal, Satellite]>>; + list_ufos: ActorMethod<[], Array<[Principal, Ufo]>>; set_config: ActorMethod<[[] | [Config]], undefined>; set_metadata: ActorMethod<[Array<[string, string]>], undefined>; - set_mission_control_controllers: ActorMethod<[Array, SetController], undefined>; + set_mission_control_controllers: ActorMethod<[Array, SetAccessKey], undefined>; set_orbiter: ActorMethod<[Principal, [] | [string]], Orbiter>; set_orbiter_metadata: ActorMethod<[Principal, Array<[string, string]>], Orbiter>; set_orbiters_controllers: ActorMethod< - [Array, Array, SetController], + [Array, Array, SetAccessKey], undefined >; set_satellite: ActorMethod<[Principal, [] | [string]], Satellite>; set_satellite_metadata: ActorMethod<[Principal, Array<[string, string]>], Satellite>; set_satellites_controllers: ActorMethod< - [Array, Array, SetController], + [Array, Array, SetAccessKey], undefined >; + set_ufo: ActorMethod<[Principal, [] | [string]], Ufo>; + set_ufo_metadata: ActorMethod<[Principal, Array<[string, string]>], Ufo>; start_monitoring: ActorMethod<[], undefined>; stop_monitoring: ActorMethod<[], undefined>; top_up: ActorMethod<[Principal, Tokens], undefined>; unset_orbiter: ActorMethod<[Principal], undefined>; unset_satellite: ActorMethod<[Principal], undefined>; + unset_ufo: ActorMethod<[Principal], undefined>; update_and_start_monitoring: ActorMethod<[MonitoringStartConfig], undefined>; update_and_stop_monitoring: ActorMethod<[MonitoringStopConfig], undefined>; } diff --git a/cli/src/declarations/mission_control.did b/cli/src/declarations/mission_control.did index 106bb932..4f9e0e91 100644 --- a/cli/src/declarations/mission_control.did +++ b/cli/src/declarations/mission_control.did @@ -1,13 +1,15 @@ -type Account = record { owner : principal; subaccount : opt blob }; -type Config = record { monitoring : opt MonitoringConfig }; -type Controller = record { +type AccessKey = record { updated_at : nat64; metadata : vec record { text; text }; + kind : opt AccessKeyKind; created_at : nat64; - scope : ControllerScope; + scope : AccessKeyScope; expires_at : opt nat64; }; -type ControllerScope = variant { Write; Admin; Submit }; +type AccessKeyKind = variant { Emulator; Automation }; +type AccessKeyScope = variant { Write; Admin; Submit }; +type Account = record { owner : principal; subaccount : opt blob }; +type Config = record { monitoring : opt MonitoringConfig }; type CreateCanisterConfig = record { subnet_id : opt principal; name : opt text; @@ -30,6 +32,7 @@ type CyclesMonitoringStartConfig = record { orbiters_strategy : opt SegmentsMonitoringStrategy; mission_control_strategy : opt CyclesMonitoringStrategy; satellites_strategy : opt SegmentsMonitoringStrategy; + ufos_strategy : opt SegmentsMonitoringStrategy; }; type CyclesMonitoringStatus = record { monitored_ids : vec principal; @@ -39,6 +42,7 @@ type CyclesMonitoringStopConfig = record { satellite_ids : opt vec principal; try_mission_control : opt bool; orbiter_ids : opt vec principal; + ufo_ids : opt vec principal; }; type CyclesMonitoringStrategy = variant { BelowThreshold : CyclesThreshold }; type CyclesThreshold = record { fund_cycles : nat; min_cycles : nat }; @@ -111,9 +115,10 @@ type SegmentsMonitoringStrategy = record { ids : vec principal; strategy : CyclesMonitoringStrategy; }; -type SetController = record { +type SetAccessKey = record { metadata : vec record { text; text }; - scope : ControllerScope; + kind : opt AccessKeyKind; + scope : AccessKeyScope; expires_at : opt nat64; }; type Settings = record { monitoring : opt Monitoring }; @@ -152,6 +157,13 @@ type TransferError_1 = variant { TooOld; InsufficientFunds : record { balance : nat }; }; +type Ufo = record { + updated_at : nat64; + metadata : vec record { text; text }; + created_at : nat64; + settings : opt Settings; + ufo_id : principal; +}; type User = record { updated_at : nat64; metadata : vec record { text; text }; @@ -182,20 +194,17 @@ service : (InitMissionControlArgs) -> { icp_transfer : (TransferArgs) -> (Result); icrc_transfer : (principal, TransferArg) -> (Result_1); list_mission_control_controllers : () -> ( - vec record { principal; Controller }, + vec record { principal; AccessKey }, ) query; list_orbiters : () -> (vec record { principal; Orbiter }) query; list_satellites : () -> (vec record { principal; Satellite }) query; + list_ufos : () -> (vec record { principal; Ufo }) query; set_config : (opt Config) -> (); set_metadata : (vec record { text; text }) -> (); - set_mission_control_controllers : (vec principal, SetController) -> (); + set_mission_control_controllers : (vec principal, SetAccessKey) -> (); set_orbiter : (principal, opt text) -> (Orbiter); set_orbiter_metadata : (principal, vec record { text; text }) -> (Orbiter); - set_orbiters_controllers : ( - vec principal, - vec principal, - SetController, - ) -> (); + set_orbiters_controllers : (vec principal, vec principal, SetAccessKey) -> (); set_satellite : (principal, opt text) -> (Satellite); set_satellite_metadata : (principal, vec record { text; text }) -> ( Satellite, @@ -203,13 +212,16 @@ service : (InitMissionControlArgs) -> { set_satellites_controllers : ( vec principal, vec principal, - SetController, + SetAccessKey, ) -> (); + set_ufo : (principal, opt text) -> (Ufo); + set_ufo_metadata : (principal, vec record { text; text }) -> (Ufo); start_monitoring : () -> (); stop_monitoring : () -> (); top_up : (principal, Tokens) -> (); unset_orbiter : (principal) -> (); unset_satellite : (principal) -> (); + unset_ufo : (principal) -> (); update_and_start_monitoring : (MonitoringStartConfig) -> (); update_and_stop_monitoring : (MonitoringStopConfig) -> (); } diff --git a/cli/src/declarations/mission_control.idl.js b/cli/src/declarations/mission_control.idl.js index 799846b0..3f6cc1d2 100644 --- a/cli/src/declarations/mission_control.idl.js +++ b/cli/src/declarations/mission_control.idl.js @@ -2,7 +2,7 @@ // @ts-nocheck -// This file was automatically generated by @icp-sdk/bindgen@0.2.0. +// This file was automatically generated by @icp-sdk/bindgen@0.3.0. // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. @@ -163,21 +163,34 @@ export const idlFactory = ({IDL}) => { InsufficientFunds: IDL.Record({balance: IDL.Nat}) }); const Result_1 = IDL.Variant({Ok: IDL.Nat, Err: TransferError_1}); - const ControllerScope = IDL.Variant({ + const AccessKeyKind = IDL.Variant({ + Emulator: IDL.Null, + Automation: IDL.Null + }); + const AccessKeyScope = IDL.Variant({ Write: IDL.Null, Admin: IDL.Null, Submit: IDL.Null }); - const Controller = IDL.Record({ + const AccessKey = IDL.Record({ updated_at: IDL.Nat64, metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), + kind: IDL.Opt(AccessKeyKind), created_at: IDL.Nat64, - scope: ControllerScope, + scope: AccessKeyScope, expires_at: IDL.Opt(IDL.Nat64) }); - const SetController = IDL.Record({ + const Ufo = IDL.Record({ + updated_at: IDL.Nat64, + metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), + created_at: IDL.Nat64, + settings: IDL.Opt(Settings), + ufo_id: IDL.Principal + }); + const SetAccessKey = IDL.Record({ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), - scope: ControllerScope, + kind: IDL.Opt(AccessKeyKind), + scope: AccessKeyScope, expires_at: IDL.Opt(IDL.Nat64) }); const SegmentsMonitoringStrategy = IDL.Record({ @@ -187,7 +200,8 @@ export const idlFactory = ({IDL}) => { const CyclesMonitoringStartConfig = IDL.Record({ orbiters_strategy: IDL.Opt(SegmentsMonitoringStrategy), mission_control_strategy: IDL.Opt(CyclesMonitoringStrategy), - satellites_strategy: IDL.Opt(SegmentsMonitoringStrategy) + satellites_strategy: IDL.Opt(SegmentsMonitoringStrategy), + ufos_strategy: IDL.Opt(SegmentsMonitoringStrategy) }); const MonitoringStartConfig = IDL.Record({ cycles_config: IDL.Opt(CyclesMonitoringStartConfig) @@ -195,7 +209,8 @@ export const idlFactory = ({IDL}) => { const CyclesMonitoringStopConfig = IDL.Record({ satellite_ids: IDL.Opt(IDL.Vec(IDL.Principal)), try_mission_control: IDL.Opt(IDL.Bool), - orbiter_ids: IDL.Opt(IDL.Vec(IDL.Principal)) + orbiter_ids: IDL.Opt(IDL.Vec(IDL.Principal)), + ufo_ids: IDL.Opt(IDL.Vec(IDL.Principal)) }); const MonitoringStopConfig = IDL.Record({ cycles_config: IDL.Opt(CyclesMonitoringStopConfig) @@ -227,14 +242,15 @@ export const idlFactory = ({IDL}) => { icrc_transfer: IDL.Func([IDL.Principal, TransferArg], [Result_1], []), list_mission_control_controllers: IDL.Func( [], - [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], + [IDL.Vec(IDL.Tuple(IDL.Principal, AccessKey))], ['query'] ), list_orbiters: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Orbiter))], ['query']), list_satellites: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Satellite))], ['query']), + list_ufos: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Ufo))], ['query']), set_config: IDL.Func([IDL.Opt(Config)], [], []), set_metadata: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []), - set_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal), SetController], [], []), + set_mission_control_controllers: IDL.Func([IDL.Vec(IDL.Principal), SetAccessKey], [], []), set_orbiter: IDL.Func([IDL.Principal, IDL.Opt(IDL.Text)], [Orbiter], []), set_orbiter_metadata: IDL.Func( [IDL.Principal, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], @@ -242,7 +258,7 @@ export const idlFactory = ({IDL}) => { [] ), set_orbiters_controllers: IDL.Func( - [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController], + [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetAccessKey], [], [] ), @@ -253,15 +269,18 @@ export const idlFactory = ({IDL}) => { [] ), set_satellites_controllers: IDL.Func( - [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetController], + [IDL.Vec(IDL.Principal), IDL.Vec(IDL.Principal), SetAccessKey], [], [] ), + set_ufo: IDL.Func([IDL.Principal, IDL.Opt(IDL.Text)], [Ufo], []), + set_ufo_metadata: IDL.Func([IDL.Principal, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [Ufo], []), start_monitoring: IDL.Func([], [], []), stop_monitoring: IDL.Func([], [], []), top_up: IDL.Func([IDL.Principal, Tokens], [], []), unset_orbiter: IDL.Func([IDL.Principal], [], []), unset_satellite: IDL.Func([IDL.Principal], [], []), + unset_ufo: IDL.Func([IDL.Principal], [], []), update_and_start_monitoring: IDL.Func([MonitoringStartConfig], [], []), update_and_stop_monitoring: IDL.Func([MonitoringStopConfig], [], []) }); diff --git a/cli/src/declarations/observatory.d.ts b/cli/src/declarations/observatory.d.ts index 3c42de54..2e3b505f 100644 --- a/cli/src/declarations/observatory.d.ts +++ b/cli/src/declarations/observatory.d.ts @@ -2,7 +2,7 @@ // @ts-nocheck -// This file was automatically generated by @icp-sdk/bindgen@0.2.0. +// This file was automatically generated by @icp-sdk/bindgen@0.3.0. // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. @@ -10,16 +10,16 @@ import type {ActorMethod} from '@icp-sdk/core/agent'; import type {IDL} from '@icp-sdk/core/candid'; import type {Principal} from '@icp-sdk/core/principal'; -export interface Controller { +export interface AccessKey { updated_at: bigint; metadata: Array<[string, string]>; - kind: [] | [ControllerKind]; + kind: [] | [AccessKeyKind]; created_at: bigint; - scope: ControllerScope; + scope: AccessKeyScope; expires_at: [] | [bigint]; } -export type ControllerKind = {Emulator: null} | {Automation: null}; -export type ControllerScope = {Write: null} | {Admin: null} | {Submit: null}; +export type AccessKeyKind = {Emulator: null} | {Automation: null}; +export type AccessKeyScope = {Write: null} | {Admin: null} | {Submit: null}; export interface CyclesBalance { timestamp: bigint; amount: bigint; @@ -119,15 +119,19 @@ export interface Segment { metadata: [] | [Array<[string, string]>]; kind: SegmentKind; } -export type SegmentKind = {Orbiter: null} | {MissionControl: null} | {Satellite: null}; -export interface SetController { +export type SegmentKind = + | {Ufo: null} + | {Orbiter: null} + | {MissionControl: null} + | {Satellite: null}; +export interface SetAccessKey { metadata: Array<[string, string]>; - kind: [] | [ControllerKind]; - scope: ControllerScope; + kind: [] | [AccessKeyKind]; + scope: AccessKeyScope; expires_at: [] | [bigint]; } export interface SetControllersArgs { - controller: SetController; + controller: SetAccessKey; controllers: Array; } export interface _SERVICE { @@ -135,7 +139,7 @@ export interface _SERVICE { get_notify_status: ActorMethod<[GetNotifications], NotifyStatus>; get_openid_certificate: ActorMethod<[GetOpenIdCertificateArgs], [] | [OpenIdCertificate]>; is_openid_monitoring_enabled: ActorMethod<[OpenIdProvider], boolean>; - list_controllers: ActorMethod<[], Array<[Principal, Controller]>>; + list_controllers: ActorMethod<[], Array<[Principal, AccessKey]>>; notify: ActorMethod<[NotifyArgs], undefined>; ping: ActorMethod<[NotifyArgs], undefined>; set_controllers: ActorMethod<[SetControllersArgs], undefined>; diff --git a/cli/src/declarations/observatory.did b/cli/src/declarations/observatory.did index f2058620..86bc1d16 100644 --- a/cli/src/declarations/observatory.did +++ b/cli/src/declarations/observatory.did @@ -1,13 +1,13 @@ -type Controller = record { +type AccessKey = record { updated_at : nat64; metadata : vec record { text; text }; - kind : opt ControllerKind; + kind : opt AccessKeyKind; created_at : nat64; - scope : ControllerScope; + scope : AccessKeyScope; expires_at : opt nat64; }; -type ControllerKind = variant { Emulator; Automation }; -type ControllerScope = variant { Write; Admin; Submit }; +type AccessKeyKind = variant { Emulator; Automation }; +type AccessKeyScope = variant { Write; Admin; Submit }; type CyclesBalance = record { timestamp : nat64; amount : nat }; type DeleteControllersArgs = record { controllers : vec principal }; type DepositedCyclesEmailNotification = record { @@ -78,15 +78,15 @@ type Segment = record { metadata : opt vec record { text; text }; kind : SegmentKind; }; -type SegmentKind = variant { Orbiter; MissionControl; Satellite }; -type SetController = record { +type SegmentKind = variant { Ufo; Orbiter; MissionControl; Satellite }; +type SetAccessKey = record { metadata : vec record { text; text }; - kind : opt ControllerKind; - scope : ControllerScope; + kind : opt AccessKeyKind; + scope : AccessKeyScope; expires_at : opt nat64; }; type SetControllersArgs = record { - controller : SetController; + controller : SetAccessKey; controllers : vec principal; }; service : () -> { @@ -96,7 +96,7 @@ service : () -> { opt OpenIdCertificate, ); is_openid_monitoring_enabled : (OpenIdProvider) -> (bool); - list_controllers : () -> (vec record { principal; Controller }) query; + list_controllers : () -> (vec record { principal; AccessKey }) query; notify : (NotifyArgs) -> (); ping : (NotifyArgs) -> (); set_controllers : (SetControllersArgs) -> (); diff --git a/cli/src/declarations/observatory.idl.js b/cli/src/declarations/observatory.idl.js index ee2de036..c5e1d9bb 100644 --- a/cli/src/declarations/observatory.idl.js +++ b/cli/src/declarations/observatory.idl.js @@ -2,7 +2,7 @@ // @ts-nocheck -// This file was automatically generated by @icp-sdk/bindgen@0.2.0. +// This file was automatically generated by @icp-sdk/bindgen@0.3.0. // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. @@ -59,21 +59,21 @@ export const idlFactory = ({IDL}) => { created_at: IDL.Nat64, version: IDL.Opt(IDL.Nat64) }); - const ControllerKind = IDL.Variant({ + const AccessKeyKind = IDL.Variant({ Emulator: IDL.Null, Automation: IDL.Null }); - const ControllerScope = IDL.Variant({ + const AccessKeyScope = IDL.Variant({ Write: IDL.Null, Admin: IDL.Null, Submit: IDL.Null }); - const Controller = IDL.Record({ + const AccessKey = IDL.Record({ updated_at: IDL.Nat64, metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), - kind: IDL.Opt(ControllerKind), + kind: IDL.Opt(AccessKeyKind), created_at: IDL.Nat64, - scope: ControllerScope, + scope: AccessKeyScope, expires_at: IDL.Opt(IDL.Nat64) }); const CyclesBalance = IDL.Record({ @@ -104,6 +104,7 @@ export const idlFactory = ({IDL}) => { FailedCyclesDepositEmail: FailedCyclesDepositEmailNotification }); const SegmentKind = IDL.Variant({ + Ufo: IDL.Null, Orbiter: IDL.Null, MissionControl: IDL.Null, Satellite: IDL.Null @@ -118,14 +119,14 @@ export const idlFactory = ({IDL}) => { user: IDL.Principal, segment: Segment }); - const SetController = IDL.Record({ + const SetAccessKey = IDL.Record({ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), - kind: IDL.Opt(ControllerKind), - scope: ControllerScope, + kind: IDL.Opt(AccessKeyKind), + scope: AccessKeyScope, expires_at: IDL.Opt(IDL.Nat64) }); const SetControllersArgs = IDL.Record({ - controller: SetController, + controller: SetAccessKey, controllers: IDL.Vec(IDL.Principal) }); const Env = IDL.Record({email_api_key: IDL.Opt(IDL.Text)}); @@ -140,7 +141,7 @@ export const idlFactory = ({IDL}) => { get_notify_status: IDL.Func([GetNotifications], [NotifyStatus], ['query']), get_openid_certificate: IDL.Func([GetOpenIdCertificateArgs], [IDL.Opt(OpenIdCertificate)], []), is_openid_monitoring_enabled: IDL.Func([OpenIdProvider], [IDL.Bool], []), - list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']), + list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, AccessKey))], ['query']), notify: IDL.Func([NotifyArgs], [], []), ping: IDL.Func([NotifyArgs], [], []), set_controllers: IDL.Func([SetControllersArgs], [], []), diff --git a/cli/src/declarations/orbiter.d.ts b/cli/src/declarations/orbiter.d.ts index 0c98a606..e1b026cb 100644 --- a/cli/src/declarations/orbiter.d.ts +++ b/cli/src/declarations/orbiter.d.ts @@ -2,7 +2,7 @@ // @ts-nocheck -// This file was automatically generated by @icp-sdk/bindgen@0.2.0. +// This file was automatically generated by @icp-sdk/bindgen@0.3.0. // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. @@ -10,6 +10,16 @@ import type {ActorMethod} from '@icp-sdk/core/agent'; import type {IDL} from '@icp-sdk/core/candid'; import type {Principal} from '@icp-sdk/core/principal'; +export interface AccessKey { + updated_at: bigint; + metadata: Array<[string, string]>; + kind: [] | [AccessKeyKind]; + created_at: bigint; + scope: AccessKeyScope; + expires_at: [] | [bigint]; +} +export type AccessKeyKind = {Emulator: null} | {Automation: null}; +export type AccessKeyScope = {Write: null} | {Admin: null} | {Submit: null}; export interface AnalyticKey { key: string; collected_at: bigint; @@ -75,14 +85,6 @@ export interface CalendarDate { month: number; year: number; } -export interface Controller { - updated_at: bigint; - metadata: Array<[string, string]>; - created_at: bigint; - scope: ControllerScope; - expires_at: [] | [bigint]; -} -export type ControllerScope = {Write: null} | {Admin: null} | {Submit: null}; export interface DelSatelliteConfig { version: [] | [bigint]; } @@ -191,13 +193,14 @@ export type Result = {Ok: PageView} | {Err: string}; export type Result_1 = {Ok: null} | {Err: Array<[AnalyticKey, string]>}; export type Result_2 = {Ok: PerformanceMetric} | {Err: string}; export type Result_3 = {Ok: TrackEvent} | {Err: string}; -export interface SetController { +export interface SetAccessKey { metadata: Array<[string, string]>; - scope: ControllerScope; + kind: [] | [AccessKeyKind]; + scope: AccessKeyScope; expires_at: [] | [bigint]; } export interface SetControllersArgs { - controller: SetController; + controller: SetAccessKey; controllers: Array; } export interface SetPageView { @@ -253,7 +256,7 @@ export interface WebVitalsMetric { delta: number; } export interface _SERVICE { - del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>; + del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, AccessKey]>>; del_satellite_config: ActorMethod<[Principal, DelSatelliteConfig], undefined>; deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>; get_page_views: ActorMethod<[GetAnalytics], Array<[AnalyticKey, PageView]>>; @@ -269,10 +272,10 @@ export interface _SERVICE { get_track_events_analytics: ActorMethod<[GetAnalytics], AnalyticsTrackEvents>; http_request: ActorMethod<[HttpRequest], HttpResponse>; http_request_update: ActorMethod<[HttpRequest], HttpResponse>; - list_controllers: ActorMethod<[], Array<[Principal, Controller]>>; + list_controllers: ActorMethod<[], Array<[Principal, AccessKey]>>; list_satellite_configs: ActorMethod<[], Array<[Principal, OrbiterSatelliteConfig]>>; memory_size: ActorMethod<[], MemorySize>; - set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>; + set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, AccessKey]>>; set_page_view: ActorMethod<[AnalyticKey, SetPageView], Result>; set_page_views: ActorMethod<[Array<[AnalyticKey, SetPageView]>], Result_1>; set_performance_metric: ActorMethod<[AnalyticKey, SetPerformanceMetric], Result_2>; diff --git a/cli/src/declarations/orbiter.did b/cli/src/declarations/orbiter.did index 94057e3e..308b8d0a 100644 --- a/cli/src/declarations/orbiter.did +++ b/cli/src/declarations/orbiter.did @@ -1,3 +1,13 @@ +type AccessKey = record { + updated_at : nat64; + metadata : vec record { text; text }; + kind : opt AccessKeyKind; + created_at : nat64; + scope : AccessKeyScope; + expires_at : opt nat64; +}; +type AccessKeyKind = variant { Emulator; Automation }; +type AccessKeyScope = variant { Write; Admin; Submit }; type AnalyticKey = record { key : text; collected_at : nat64 }; type AnalyticsBrowsersPageViews = record { safari : float64; @@ -54,14 +64,6 @@ type AnalyticsWebVitalsPerformanceMetrics = record { pages : vec record { text; AnalyticsWebVitalsPageMetrics }; }; type CalendarDate = record { day : nat8; month : nat8; year : int32 }; -type Controller = record { - updated_at : nat64; - metadata : vec record { text; text }; - created_at : nat64; - scope : ControllerScope; - expires_at : opt nat64; -}; -type ControllerScope = variant { Write; Admin; Submit }; type DelSatelliteConfig = record { version : opt nat64 }; type DeleteControllersArgs = record { controllers : vec principal }; type DepositCyclesArgs = record { cycles : nat; destination_id : principal }; @@ -150,13 +152,14 @@ type Result = variant { Ok : PageView; Err : text }; type Result_1 = variant { Ok; Err : vec record { AnalyticKey; text } }; type Result_2 = variant { Ok : PerformanceMetric; Err : text }; type Result_3 = variant { Ok : TrackEvent; Err : text }; -type SetController = record { +type SetAccessKey = record { metadata : vec record { text; text }; - scope : ControllerScope; + kind : opt AccessKeyKind; + scope : AccessKeyScope; expires_at : opt nat64; }; type SetControllersArgs = record { - controller : SetController; + controller : SetAccessKey; controllers : vec principal; }; type SetPageView = record { @@ -213,7 +216,7 @@ type WebVitalsMetric = record { }; service : (InitOrbiterArgs) -> { del_controllers : (DeleteControllersArgs) -> ( - vec record { principal; Controller }, + vec record { principal; AccessKey }, ); del_satellite_config : (principal, DelSatelliteConfig) -> (); deposit_cycles : (DepositCyclesArgs) -> (); @@ -241,13 +244,13 @@ service : (InitOrbiterArgs) -> { get_track_events_analytics : (GetAnalytics) -> (AnalyticsTrackEvents) query; http_request : (HttpRequest) -> (HttpResponse) query; http_request_update : (HttpRequest) -> (HttpResponse); - list_controllers : () -> (vec record { principal; Controller }) query; + list_controllers : () -> (vec record { principal; AccessKey }) query; list_satellite_configs : () -> ( vec record { principal; OrbiterSatelliteConfig }, ) query; memory_size : () -> (MemorySize) query; set_controllers : (SetControllersArgs) -> ( - vec record { principal; Controller }, + vec record { principal; AccessKey }, ); set_page_view : (AnalyticKey, SetPageView) -> (Result); set_page_views : (vec record { AnalyticKey; SetPageView }) -> (Result_1); diff --git a/cli/src/declarations/orbiter.idl.js b/cli/src/declarations/orbiter.idl.js index 0abd192d..73c6db45 100644 --- a/cli/src/declarations/orbiter.idl.js +++ b/cli/src/declarations/orbiter.idl.js @@ -2,7 +2,7 @@ // @ts-nocheck -// This file was automatically generated by @icp-sdk/bindgen@0.2.0. +// This file was automatically generated by @icp-sdk/bindgen@0.3.0. // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. @@ -13,16 +13,21 @@ export const idlFactory = ({IDL}) => { const DeleteControllersArgs = IDL.Record({ controllers: IDL.Vec(IDL.Principal) }); - const ControllerScope = IDL.Variant({ + const AccessKeyKind = IDL.Variant({ + Emulator: IDL.Null, + Automation: IDL.Null + }); + const AccessKeyScope = IDL.Variant({ Write: IDL.Null, Admin: IDL.Null, Submit: IDL.Null }); - const Controller = IDL.Record({ + const AccessKey = IDL.Record({ updated_at: IDL.Nat64, metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), + kind: IDL.Opt(AccessKeyKind), created_at: IDL.Nat64, - scope: ControllerScope, + scope: AccessKeyScope, expires_at: IDL.Opt(IDL.Nat64) }); const DelSatelliteConfig = IDL.Record({version: IDL.Opt(IDL.Nat64)}); @@ -200,13 +205,14 @@ export const idlFactory = ({IDL}) => { version: IDL.Opt(IDL.Nat64) }); const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64}); - const SetController = IDL.Record({ + const SetAccessKey = IDL.Record({ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), - scope: ControllerScope, + kind: IDL.Opt(AccessKeyKind), + scope: AccessKeyScope, expires_at: IDL.Opt(IDL.Nat64) }); const SetControllersArgs = IDL.Record({ - controller: SetController, + controller: SetAccessKey, controllers: IDL.Vec(IDL.Principal) }); const SetPageView = IDL.Record({ @@ -257,7 +263,7 @@ export const idlFactory = ({IDL}) => { return IDL.Service({ del_controllers: IDL.Func( [DeleteControllersArgs], - [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], + [IDL.Vec(IDL.Tuple(IDL.Principal, AccessKey))], [] ), del_satellite_config: IDL.Func([IDL.Principal, DelSatelliteConfig], [], []), @@ -296,7 +302,7 @@ export const idlFactory = ({IDL}) => { get_track_events_analytics: IDL.Func([GetAnalytics], [AnalyticsTrackEvents], ['query']), http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']), http_request_update: IDL.Func([HttpRequest], [HttpResponse], []), - list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']), + list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, AccessKey))], ['query']), list_satellite_configs: IDL.Func( [], [IDL.Vec(IDL.Tuple(IDL.Principal, OrbiterSatelliteConfig))], @@ -305,7 +311,7 @@ export const idlFactory = ({IDL}) => { memory_size: IDL.Func([], [MemorySize], ['query']), set_controllers: IDL.Func( [SetControllersArgs], - [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], + [IDL.Vec(IDL.Tuple(IDL.Principal, AccessKey))], [] ), set_page_view: IDL.Func([AnalyticKey, SetPageView], [Result], []), diff --git a/cli/src/declarations/satellite.d.ts b/cli/src/declarations/satellite.d.ts index e9e921cc..8dd41d7c 100644 --- a/cli/src/declarations/satellite.d.ts +++ b/cli/src/declarations/satellite.d.ts @@ -2,7 +2,7 @@ // @ts-nocheck -// This file was automatically generated by @icp-sdk/bindgen@0.2.0. +// This file was automatically generated by @icp-sdk/bindgen@0.3.0. // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. @@ -10,6 +10,16 @@ import type {ActorMethod} from '@icp-sdk/core/agent'; import type {IDL} from '@icp-sdk/core/candid'; import type {Principal} from '@icp-sdk/core/principal'; +export interface AccessKey { + updated_at: bigint; + metadata: Array<[string, string]>; + kind: [] | [AccessKeyKind]; + created_at: bigint; + scope: AccessKeyScope; + expires_at: [] | [bigint]; +} +export type AccessKeyKind = {Emulator: null} | {Automation: null}; +export type AccessKeyScope = {Write: null} | {Admin: null} | {Submit: null}; export interface AssetEncodingNoContent { modified: bigint; sha256: Uint8Array; @@ -94,6 +104,16 @@ export interface AutomationController { expires_at: bigint; } export type AutomationScope = {Write: null} | {Submit: null}; +export interface CertifyAssetsArgs { + cursor: CertifyAssetsCursor; + strategy: CertifyAssetsStrategy; + chunk_size: [] | [number]; +} +export type CertifyAssetsCursor = {Heap: {offset: bigint}} | {Stable: {key: [] | [AssetKey]}}; +export interface CertifyAssetsResult { + next_cursor: [] | [CertifyAssetsCursor]; +} +export type CertifyAssetsStrategy = {Append: null} | {Clear: null} | {AppendWithRouting: null}; export type CollectionType = {Db: null} | {Storage: null}; export interface CommitBatch { batch_id: bigint; @@ -114,16 +134,6 @@ export interface ConfigMaxMemorySize { stable: [] | [bigint]; heap: [] | [bigint]; } -export interface Controller { - updated_at: bigint; - metadata: Array<[string, string]>; - kind: [] | [ControllerKind]; - created_at: bigint; - scope: ControllerScope; - expires_at: [] | [bigint]; -} -export type ControllerKind = {Emulator: null} | {Automation: null}; -export type ControllerScope = {Write: null} | {Admin: null} | {Submit: null}; export interface CustomDomain { updated_at: bigint; created_at: bigint; @@ -403,6 +413,12 @@ export interface SegmentsDeploymentOptions { mission_control_version: [] | [string]; satellite_version: [] | [string]; } +export interface SetAccessKey { + metadata: Array<[string, string]>; + kind: [] | [AccessKeyKind]; + scope: AccessKeyScope; + expires_at: [] | [bigint]; +} export interface SetAuthenticationConfig { openid: [] | [AuthenticationConfigOpenId]; version: [] | [bigint]; @@ -413,14 +429,8 @@ export interface SetAutomationConfig { openid: [] | [AutomationConfigOpenId]; version: [] | [bigint]; } -export interface SetController { - metadata: Array<[string, string]>; - kind: [] | [ControllerKind]; - scope: ControllerScope; - expires_at: [] | [bigint]; -} export interface SetControllersArgs { - controller: SetController; + controller: SetAccessKey; controllers: Array; } export interface SetDbConfig { @@ -452,6 +462,13 @@ export interface SetStorageConfig { raw_access: [] | [StorageConfigRawAccess]; redirects: [] | [Array<[string, StorageConfigRedirect]>]; } +export interface SetStorageConfigOptions { + skip_certification: [] | [boolean]; +} +export interface SetStorageConfigWithOptions { + config: SetStorageConfig; + options: SetStorageConfigOptions; +} export interface SignedDelegation { signature: Uint8Array; delegation: Delegation; @@ -511,6 +528,7 @@ export interface _SERVICE { [AuthenticateAutomationArgs], AuthenticateAutomationResultResponse >; + certify_assets_chunk: ActorMethod<[CertifyAssetsArgs], CertifyAssetsResult>; commit_asset_upload: ActorMethod<[CommitBatch], undefined>; commit_proposal: ActorMethod<[CommitProposal], null>; commit_proposal_asset_upload: ActorMethod<[CommitBatch], undefined>; @@ -523,7 +541,7 @@ export interface _SERVICE { del_asset: ActorMethod<[string, string], undefined>; del_assets: ActorMethod<[string], undefined>; del_controller_self: ActorMethod<[], undefined>; - del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>; + del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, AccessKey]>>; del_custom_domain: ActorMethod<[string], undefined>; del_doc: ActorMethod<[string, string, DelDoc], undefined>; del_docs: ActorMethod<[string], undefined>; @@ -559,7 +577,7 @@ export interface _SERVICE { Array<[string, InitUploadResult]> >; list_assets: ActorMethod<[string, ListParams], ListResults>; - list_controllers: ActorMethod<[], Array<[Principal, Controller]>>; + list_controllers: ActorMethod<[], Array<[Principal, AccessKey]>>; list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>; list_docs: ActorMethod<[string, ListParams], ListResults_1>; list_proposals: ActorMethod<[ListProposalsParams], ListProposalResults>; @@ -569,13 +587,14 @@ export interface _SERVICE { set_asset_token: ActorMethod<[string, string, [] | [string]], undefined>; set_auth_config: ActorMethod<[SetAuthenticationConfig], AuthenticationConfig>; set_automation_config: ActorMethod<[SetAutomationConfig], AutomationConfig>; - set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>; + set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, AccessKey]>>; set_custom_domain: ActorMethod<[string, [] | [string]], undefined>; set_db_config: ActorMethod<[SetDbConfig], DbConfig>; set_doc: ActorMethod<[string, string, SetDoc], Doc>; set_many_docs: ActorMethod<[Array<[string, string, SetDoc]>], Array<[string, Doc]>>; set_rule: ActorMethod<[CollectionType, string, SetRule], Rule>; set_storage_config: ActorMethod<[SetStorageConfig], StorageConfig>; + set_storage_config_with_options: ActorMethod<[SetStorageConfigWithOptions], StorageConfig>; submit_proposal: ActorMethod<[bigint], [bigint, Proposal]>; switch_storage_system_memory: ActorMethod<[], undefined>; upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>; diff --git a/cli/src/declarations/satellite.did b/cli/src/declarations/satellite.did index 98f714f7..5e9d8825 100644 --- a/cli/src/declarations/satellite.did +++ b/cli/src/declarations/satellite.did @@ -1,5 +1,15 @@ import service "satellite_extension.did"; +type AccessKey = record { + updated_at : nat64; + metadata : vec record { text; text }; + kind : opt AccessKeyKind; + created_at : nat64; + scope : AccessKeyScope; + expires_at : opt nat64; +}; +type AccessKeyKind = variant { Emulator; Automation }; +type AccessKeyScope = variant { Write; Admin; Submit }; type AssetEncodingNoContent = record { modified : nat64; sha256 : blob; @@ -80,6 +90,17 @@ type AutomationController = record { expires_at : nat64; }; type AutomationScope = variant { Write; Submit }; +type CertifyAssetsArgs = record { + cursor : CertifyAssetsCursor; + strategy : CertifyAssetsStrategy; + chunk_size : opt nat32; +}; +type CertifyAssetsCursor = variant { + Heap : record { offset : nat64 }; + Stable : record { key : opt AssetKey }; +}; +type CertifyAssetsResult = record { next_cursor : opt CertifyAssetsCursor }; +type CertifyAssetsStrategy = variant { Append; Clear; AppendWithRouting }; type CollectionType = variant { Db; Storage }; type CommitBatch = record { batch_id : nat; @@ -94,16 +115,6 @@ type Config = record { automation : opt AutomationConfig; }; type ConfigMaxMemorySize = record { stable : opt nat64; heap : opt nat64 }; -type Controller = record { - updated_at : nat64; - metadata : vec record { text; text }; - kind : opt ControllerKind; - created_at : nat64; - scope : ControllerScope; - expires_at : opt nat64; -}; -type ControllerKind = variant { Emulator; Automation }; -type ControllerScope = variant { Write; Admin; Submit }; type CustomDomain = record { updated_at : nat64; created_at : nat64; @@ -341,6 +352,12 @@ type SegmentsDeploymentOptions = record { mission_control_version : opt text; satellite_version : opt text; }; +type SetAccessKey = record { + metadata : vec record { text; text }; + kind : opt AccessKeyKind; + scope : AccessKeyScope; + expires_at : opt nat64; +}; type SetAuthenticationConfig = record { openid : opt AuthenticationConfigOpenId; version : opt nat64; @@ -351,14 +368,8 @@ type SetAutomationConfig = record { openid : opt AutomationConfigOpenId; version : opt nat64; }; -type SetController = record { - metadata : vec record { text; text }; - kind : opt ControllerKind; - scope : ControllerScope; - expires_at : opt nat64; -}; type SetControllersArgs = record { - controller : SetController; + controller : SetAccessKey; controllers : vec principal; }; type SetDbConfig = record { @@ -390,6 +401,11 @@ type SetStorageConfig = record { raw_access : opt StorageConfigRawAccess; redirects : opt vec record { text; StorageConfigRedirect }; }; +type SetStorageConfigOptions = record { skip_certification : opt bool }; +type SetStorageConfigWithOptions = record { + config : SetStorageConfig; + options : SetStorageConfigOptions; +}; type SignedDelegation = record { signature : blob; delegation : Delegation }; type StorageConfig = record { iframe : opt StorageConfigIFrame; @@ -441,6 +457,7 @@ service : (InitSatelliteArgs) -> { authenticate_automation : (AuthenticateAutomationArgs) -> ( AuthenticateAutomationResultResponse, ); + certify_assets_chunk : (CertifyAssetsArgs) -> (CertifyAssetsResult); commit_asset_upload : (CommitBatch) -> (); commit_proposal : (CommitProposal) -> (null); commit_proposal_asset_upload : (CommitBatch) -> (); @@ -454,7 +471,7 @@ service : (InitSatelliteArgs) -> { del_assets : (text) -> (); del_controller_self : () -> (); del_controllers : (DeleteControllersArgs) -> ( - vec record { principal; Controller }, + vec record { principal; AccessKey }, ); del_custom_domain : (text) -> (); del_doc : (text, text, DelDoc) -> (); @@ -493,7 +510,7 @@ service : (InitSatelliteArgs) -> { vec record { text; InitUploadResult }, ); list_assets : (text, ListParams) -> (ListResults) query; - list_controllers : () -> (vec record { principal; Controller }) query; + list_controllers : () -> (vec record { principal; AccessKey }) query; list_custom_domains : () -> (vec record { text; CustomDomain }) query; list_docs : (text, ListParams) -> (ListResults_1) query; list_proposals : (ListProposalsParams) -> (ListProposalResults) query; @@ -504,7 +521,7 @@ service : (InitSatelliteArgs) -> { set_auth_config : (SetAuthenticationConfig) -> (AuthenticationConfig); set_automation_config : (SetAutomationConfig) -> (AutomationConfig); set_controllers : (SetControllersArgs) -> ( - vec record { principal; Controller }, + vec record { principal; AccessKey }, ); set_custom_domain : (text, opt text) -> (); set_db_config : (SetDbConfig) -> (DbConfig); @@ -514,6 +531,9 @@ service : (InitSatelliteArgs) -> { ); set_rule : (CollectionType, text, SetRule) -> (Rule); set_storage_config : (SetStorageConfig) -> (StorageConfig); + set_storage_config_with_options : (SetStorageConfigWithOptions) -> ( + StorageConfig, + ); submit_proposal : (nat) -> (nat, Proposal); switch_storage_system_memory : () -> (); upload_asset_chunk : (UploadChunk) -> (UploadChunkResult); diff --git a/cli/src/declarations/satellite.idl.js b/cli/src/declarations/satellite.idl.js index f3d11324..e790979d 100644 --- a/cli/src/declarations/satellite.idl.js +++ b/cli/src/declarations/satellite.idl.js @@ -2,7 +2,7 @@ // @ts-nocheck -// This file was automatically generated by @icp-sdk/bindgen@0.2.0. +// This file was automatically generated by @icp-sdk/bindgen@0.3.0. // You should NOT make any changes in this file as it will be overwritten. // Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified. @@ -111,6 +111,31 @@ export const idlFactory = ({IDL}) => { Ok: IDL.Tuple(IDL.Principal, AutomationController), Err: AuthenticationAutomationError }); + const AssetKey = IDL.Record({ + token: IDL.Opt(IDL.Text), + collection: IDL.Text, + owner: IDL.Principal, + name: IDL.Text, + description: IDL.Opt(IDL.Text), + full_path: IDL.Text + }); + const CertifyAssetsCursor = IDL.Variant({ + Heap: IDL.Record({offset: IDL.Nat64}), + Stable: IDL.Record({key: IDL.Opt(AssetKey)}) + }); + const CertifyAssetsStrategy = IDL.Variant({ + Append: IDL.Null, + Clear: IDL.Null, + AppendWithRouting: IDL.Null + }); + const CertifyAssetsArgs = IDL.Record({ + cursor: CertifyAssetsCursor, + strategy: CertifyAssetsStrategy, + chunk_size: IDL.Opt(IDL.Nat32) + }); + const CertifyAssetsResult = IDL.Record({ + next_cursor: IDL.Opt(CertifyAssetsCursor) + }); const CommitBatch = IDL.Record({ batch_id: IDL.Nat, headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), @@ -151,21 +176,21 @@ export const idlFactory = ({IDL}) => { const DeleteControllersArgs = IDL.Record({ controllers: IDL.Vec(IDL.Principal) }); - const ControllerKind = IDL.Variant({ + const AccessKeyKind = IDL.Variant({ Emulator: IDL.Null, Automation: IDL.Null }); - const ControllerScope = IDL.Variant({ + const AccessKeyScope = IDL.Variant({ Write: IDL.Null, Admin: IDL.Null, Submit: IDL.Null }); - const Controller = IDL.Record({ + const AccessKey = IDL.Record({ updated_at: IDL.Nat64, metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), - kind: IDL.Opt(ControllerKind), + kind: IDL.Opt(AccessKeyKind), created_at: IDL.Nat64, - scope: ControllerScope, + scope: AccessKeyScope, expires_at: IDL.Opt(IDL.Nat64) }); const DelDoc = IDL.Record({version: IDL.Opt(IDL.Nat64)}); @@ -178,14 +203,6 @@ export const idlFactory = ({IDL}) => { cycles: IDL.Nat, destination_id: IDL.Principal }); - const AssetKey = IDL.Record({ - token: IDL.Opt(IDL.Text), - collection: IDL.Text, - owner: IDL.Principal, - name: IDL.Text, - description: IDL.Opt(IDL.Text), - full_path: IDL.Text - }); const AssetEncodingNoContent = IDL.Record({ modified: IDL.Nat64, sha256: IDL.Vec(IDL.Nat8), @@ -469,14 +486,14 @@ export const idlFactory = ({IDL}) => { openid: IDL.Opt(AutomationConfigOpenId), version: IDL.Opt(IDL.Nat64) }); - const SetController = IDL.Record({ + const SetAccessKey = IDL.Record({ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)), - kind: IDL.Opt(ControllerKind), - scope: ControllerScope, + kind: IDL.Opt(AccessKeyKind), + scope: AccessKeyScope, expires_at: IDL.Opt(IDL.Nat64) }); const SetControllersArgs = IDL.Record({ - controller: SetController, + controller: SetAccessKey, controllers: IDL.Vec(IDL.Principal) }); const SetDbConfig = IDL.Record({ @@ -508,6 +525,13 @@ export const idlFactory = ({IDL}) => { raw_access: IDL.Opt(StorageConfigRawAccess), redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect))) }); + const SetStorageConfigOptions = IDL.Record({ + skip_certification: IDL.Opt(IDL.Bool) + }); + const SetStorageConfigWithOptions = IDL.Record({ + config: SetStorageConfig, + options: SetStorageConfigOptions + }); const UploadChunk = IDL.Record({ content: IDL.Vec(IDL.Nat8), batch_id: IDL.Nat, @@ -522,6 +546,7 @@ export const idlFactory = ({IDL}) => { [AuthenticateAutomationResultResponse], [] ), + certify_assets_chunk: IDL.Func([CertifyAssetsArgs], [CertifyAssetsResult], []), commit_asset_upload: IDL.Func([CommitBatch], [], []), commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []), commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []), @@ -536,7 +561,7 @@ export const idlFactory = ({IDL}) => { del_controller_self: IDL.Func([], [], []), del_controllers: IDL.Func( [DeleteControllersArgs], - [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], + [IDL.Vec(IDL.Tuple(IDL.Principal, AccessKey))], [] ), del_custom_domain: IDL.Func([IDL.Text], [], []), @@ -584,7 +609,7 @@ export const idlFactory = ({IDL}) => { [] ), list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], ['query']), - list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']), + list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, AccessKey))], ['query']), list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']), list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']), list_proposals: IDL.Func([ListProposalsParams], [ListProposalResults], ['query']), @@ -596,7 +621,7 @@ export const idlFactory = ({IDL}) => { set_automation_config: IDL.Func([SetAutomationConfig], [AutomationConfig], []), set_controllers: IDL.Func( [SetControllersArgs], - [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], + [IDL.Vec(IDL.Tuple(IDL.Principal, AccessKey))], [] ), set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []), @@ -609,6 +634,7 @@ export const idlFactory = ({IDL}) => { ), set_rule: IDL.Func([CollectionType, IDL.Text, SetRule], [Rule], []), set_storage_config: IDL.Func([SetStorageConfig], [StorageConfig], []), + set_storage_config_with_options: IDL.Func([SetStorageConfigWithOptions], [StorageConfig], []), submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []), switch_storage_system_memory: IDL.Func([], [], []), upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []), diff --git a/cli/src/modules/satellite/satellite.config.ts b/cli/src/modules/satellite/satellite.config.ts index 3ccfe584..c3075ce3 100644 --- a/cli/src/modules/satellite/satellite.config.ts +++ b/cli/src/modules/satellite/satellite.config.ts @@ -8,7 +8,7 @@ import { import type {SatelliteDid, SatelliteParameters} from '@junobuild/ic-client/actor'; import type {PrincipalText} from '@junobuild/schema'; import {MAIN_IDENTITY_KEY} from '../../constants/constants'; -import type {ControllerScope} from '../../declarations/satellite'; +import type {AccessKeyScope} from '../../declarations/satellite'; import type {CliContext} from '../../types/context'; import type {ModuleMetadata} from '../../types/module'; @@ -25,7 +25,7 @@ export type SatelliteConfigContext = CliContext & Pick { const controllerId = searchParams.get('id') ?? ''; - const scope: ControllerScope = + const scope: AccessKeyScope = searchParams.get('scope') === 'write' ? {Write: null} : {Admin: null}; switch (key) {