@junobuild/admin 0.0.57-next-2024-10-28.2 → 0.0.58-next-2024-11-22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.js +7 -7
- package/dist/browser/index.js.map +4 -4
- package/dist/declarations/mission_control/mission_control.did.d.ts +59 -7
- package/dist/declarations/mission_control/mission_control.factory.did.js +63 -8
- package/dist/declarations/satellite/satellite.did.d.ts +10 -1
- package/dist/declarations/satellite/satellite.factory.did.js +28 -19
- package/dist/declarations/satellite/satellite.factory.did.mjs +28 -19
- package/dist/node/index.mjs +7 -7
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/api/actor.api.d.ts +0 -2
- package/dist/types/api/ic.api.d.ts +1 -1
- package/dist/types/api/satellite.api.d.ts +1 -1
- package/dist/types/constants/rules.constants.d.ts +1 -0
- package/dist/types/index.d.ts +16 -4
- package/dist/types/services/{mission-control.services.d.ts → mission-control.controllers.services.d.ts} +0 -21
- package/dist/types/services/mission-control.upgrade.services.d.ts +13 -0
- package/dist/types/services/mission-control.version.services.d.ts +10 -0
- package/dist/types/services/orbiter.controllers.services.d.ts +12 -0
- package/dist/types/services/orbiter.memory.services.d.ts +11 -0
- package/dist/types/services/orbiter.upgrade.services.d.ts +15 -0
- package/dist/types/services/orbiter.version.services.d.ts +10 -0
- package/dist/types/services/satellite.assets.services.d.ts +23 -0
- package/dist/types/services/satellite.config.services.d.ts +48 -0
- package/dist/types/services/satellite.controllers.services.d.ts +25 -0
- package/dist/types/services/satellite.docs.services.d.ts +23 -0
- package/dist/types/services/satellite.domains.services.d.ts +22 -0
- package/dist/types/services/satellite.memory.services.d.ts +11 -0
- package/dist/types/services/satellite.rules.services.d.ts +26 -0
- package/dist/types/services/satellite.upgrade.services.d.ts +18 -0
- package/dist/types/services/satellite.version.services.d.ts +29 -0
- package/dist/types/types/controllers.types.d.ts +2 -2
- package/dist/types/utils/actor.utils.d.ts +2 -3
- package/dist/types/utils/rule.utils.d.ts +1 -1
- package/package.json +2 -1
- package/dist/declarations/ic/ic.did.d.ts +0 -344
- package/dist/declarations/ic/ic.factory.did.js +0 -378
- package/dist/declarations/ic/ic.factory.did.mjs +0 -378
- package/dist/types/services/orbiter.services.d.ts +0 -45
- package/dist/types/services/satellite.services.d.ts +0 -215
- package/dist/types/types/ic.types.d.ts +0 -14
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { IDL } from '@dfinity/candid';
|
|
2
|
-
import type { _SERVICE as ICActor } from '../../declarations/ic/ic.did';
|
|
3
2
|
import type { _SERVICE as MissionControlActor } from '../../declarations/mission_control/mission_control.did';
|
|
4
3
|
import type { _SERVICE as OrbiterActor } from '../../declarations/orbiter/orbiter.did';
|
|
5
4
|
import type { _SERVICE as DeprecatedSatelliteNoScopeActor } from '../../declarations/satellite/satellite-deprecated-no-scope.did';
|
|
@@ -15,4 +14,3 @@ export declare const getActor: <T>({ canisterId, idlFactory, ...rest }: ActorPar
|
|
|
15
14
|
canisterId: string | undefined;
|
|
16
15
|
idlFactory: IDL.InterfaceFactory;
|
|
17
16
|
}) => Promise<T>;
|
|
18
|
-
export declare const getICActor: (params: ActorParameters) => Promise<ICActor>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CanisterStatus } from '@dfinity/agent';
|
|
2
|
+
import { InstallCodeParams } from '@dfinity/ic-management';
|
|
2
3
|
import type { ActorParameters } from '../types/actor.types';
|
|
3
|
-
import type { InstallCodeParams } from '../types/ic.types';
|
|
4
4
|
export declare const upgradeCode: ({ actor, code }: {
|
|
5
5
|
actor: ActorParameters;
|
|
6
6
|
code: InstallCodeParams;
|
|
@@ -31,7 +31,7 @@ export declare const setRule: ({ type, collection, rule, satellite }: {
|
|
|
31
31
|
collection: string;
|
|
32
32
|
rule: SetRule;
|
|
33
33
|
satellite: SatelliteParameters;
|
|
34
|
-
}) => Promise<
|
|
34
|
+
}) => Promise<Rule>;
|
|
35
35
|
export declare const version: ({ satellite }: {
|
|
36
36
|
satellite: SatelliteParameters;
|
|
37
37
|
}) => Promise<string>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
export * from './services/mission-control.services';
|
|
2
|
-
export * from './services/
|
|
1
|
+
export * from './services/mission-control.controllers.services';
|
|
2
|
+
export * from './services/mission-control.upgrade.services';
|
|
3
|
+
export * from './services/mission-control.version.services';
|
|
4
|
+
export * from './services/orbiter.controllers.services';
|
|
5
|
+
export * from './services/orbiter.memory.services';
|
|
6
|
+
export * from './services/orbiter.upgrade.services';
|
|
7
|
+
export * from './services/orbiter.version.services';
|
|
3
8
|
export * from './services/releases.services';
|
|
4
|
-
export * from './services/satellite.services';
|
|
9
|
+
export * from './services/satellite.assets.services';
|
|
10
|
+
export * from './services/satellite.config.services';
|
|
11
|
+
export * from './services/satellite.controllers.services';
|
|
12
|
+
export * from './services/satellite.docs.services';
|
|
13
|
+
export * from './services/satellite.domains.services';
|
|
14
|
+
export * from './services/satellite.memory.services';
|
|
15
|
+
export * from './services/satellite.rules.services';
|
|
16
|
+
export * from './services/satellite.upgrade.services';
|
|
17
|
+
export * from './services/satellite.version.services';
|
|
5
18
|
export type * from './types/actor.types';
|
|
6
19
|
export type * from './types/build.types';
|
|
7
20
|
export type * from './types/controllers.types';
|
|
8
21
|
export type * from './types/customdomain.types';
|
|
9
|
-
export type * from './types/ic.types';
|
|
10
22
|
export type * from './types/releases.types';
|
|
@@ -2,27 +2,6 @@ import { Principal } from '@dfinity/principal';
|
|
|
2
2
|
import type { Controller } from '../../declarations/mission_control/mission_control.did';
|
|
3
3
|
import type { MissionControlParameters } from '../types/actor.types';
|
|
4
4
|
import type { SetControllerParams } from '../types/controllers.types';
|
|
5
|
-
/**
|
|
6
|
-
* Retrieves the version of Mission Control.
|
|
7
|
-
* @param {Object} params - The parameters for Mission Control.
|
|
8
|
-
* @param {MissionControlParameters} params.missionControl - The Mission Control parameters.
|
|
9
|
-
* @returns {Promise<string>} A promise that resolves to the version of Mission Control.
|
|
10
|
-
*/
|
|
11
|
-
export declare const missionControlVersion: (params: {
|
|
12
|
-
missionControl: MissionControlParameters;
|
|
13
|
-
}) => Promise<string>;
|
|
14
|
-
/**
|
|
15
|
-
* Upgrades the Mission Control with the provided WASM module.
|
|
16
|
-
* @param {Object} params - The parameters for upgrading Mission Control.
|
|
17
|
-
* @param {MissionControlParameters} params.missionControl - The Mission Control parameters.
|
|
18
|
-
* @param {Uint8Array} params.wasm_module - The WASM module for the upgrade.
|
|
19
|
-
* @throws Will throw an error if no mission control principal is defined.
|
|
20
|
-
* @returns {Promise<void>} A promise that resolves when the upgrade is complete.
|
|
21
|
-
*/
|
|
22
|
-
export declare const upgradeMissionControl: ({ missionControl, wasm_module }: {
|
|
23
|
-
missionControl: MissionControlParameters;
|
|
24
|
-
wasm_module: Uint8Array;
|
|
25
|
-
}) => Promise<void>;
|
|
26
5
|
/**
|
|
27
6
|
* Sets the controller for the specified satellites.
|
|
28
7
|
* @param {Object} params - The parameters for setting the satellites controller.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { MissionControlParameters } from '../types/actor.types';
|
|
2
|
+
/**
|
|
3
|
+
* Upgrades the Mission Control with the provided WASM module.
|
|
4
|
+
* @param {Object} params - The parameters for upgrading Mission Control.
|
|
5
|
+
* @param {MissionControlParameters} params.missionControl - The Mission Control parameters.
|
|
6
|
+
* @param {Uint8Array} params.wasm_module - The WASM module for the upgrade.
|
|
7
|
+
* @throws Will throw an error if no mission control principal is defined.
|
|
8
|
+
* @returns {Promise<void>} A promise that resolves when the upgrade is complete.
|
|
9
|
+
*/
|
|
10
|
+
export declare const upgradeMissionControl: ({ missionControl, wasmModule }: {
|
|
11
|
+
missionControl: MissionControlParameters;
|
|
12
|
+
wasmModule: Uint8Array;
|
|
13
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { MissionControlParameters } from '../types/actor.types';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the version of Mission Control.
|
|
4
|
+
* @param {Object} params - The parameters for Mission Control.
|
|
5
|
+
* @param {MissionControlParameters} params.missionControl - The Mission Control parameters.
|
|
6
|
+
* @returns {Promise<string>} A promise that resolves to the version of Mission Control.
|
|
7
|
+
*/
|
|
8
|
+
export declare const missionControlVersion: (params: {
|
|
9
|
+
missionControl: MissionControlParameters;
|
|
10
|
+
}) => Promise<string>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Principal } from '@dfinity/principal';
|
|
2
|
+
import type { Controller } from '../../declarations/mission_control/mission_control.did';
|
|
3
|
+
import type { OrbiterParameters } from '../types/actor.types';
|
|
4
|
+
/**
|
|
5
|
+
* Lists the controllers of the Orbiter.
|
|
6
|
+
* @param {Object} params - The parameters for listing the controllers.
|
|
7
|
+
* @param {OrbiterParameters} params.orbiter - The Orbiter parameters.
|
|
8
|
+
* @returns {Promise<[Principal, Controller][]>} A promise that resolves to a list of controllers.
|
|
9
|
+
*/
|
|
10
|
+
export declare const listOrbiterControllers: (params: {
|
|
11
|
+
orbiter: OrbiterParameters;
|
|
12
|
+
}) => Promise<[Principal, Controller][]>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MemorySize } from '../../declarations/orbiter/orbiter.did';
|
|
2
|
+
import type { OrbiterParameters } from '../types/actor.types';
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves the memory size of the Orbiter.
|
|
5
|
+
* @param {Object} params - The parameters for the Orbiter.
|
|
6
|
+
* @param {OrbiterParameters} params.orbiter - The Orbiter parameters.
|
|
7
|
+
* @returns {Promise<MemorySize>} A promise that resolves to the memory size of the Orbiter.
|
|
8
|
+
*/
|
|
9
|
+
export declare const orbiterMemorySize: (params: {
|
|
10
|
+
orbiter: OrbiterParameters;
|
|
11
|
+
}) => Promise<MemorySize>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { OrbiterParameters } from '../types/actor.types';
|
|
2
|
+
/**
|
|
3
|
+
* Upgrades the Orbiter with the provided WASM module.
|
|
4
|
+
* @param {Object} params - The parameters for upgrading the Orbiter.
|
|
5
|
+
* @param {OrbiterParameters} params.orbiter - The Orbiter parameters.
|
|
6
|
+
* @param {Uint8Array} params.wasm_module - The WASM module for the upgrade.
|
|
7
|
+
* @param {boolean} [params.reset=false] - Whether to reset the Orbiter (reinstall) instead of upgrading.
|
|
8
|
+
* @throws Will throw an error if no orbiter principal is defined.
|
|
9
|
+
* @returns {Promise<void>} A promise that resolves when the upgrade is complete.
|
|
10
|
+
*/
|
|
11
|
+
export declare const upgradeOrbiter: ({ orbiter, wasmModule, reset }: {
|
|
12
|
+
orbiter: OrbiterParameters;
|
|
13
|
+
wasmModule: Uint8Array;
|
|
14
|
+
reset?: boolean;
|
|
15
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { OrbiterParameters } from '../types/actor.types';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves the version of the Orbiter.
|
|
4
|
+
* @param {Object} params - The parameters for the Orbiter.
|
|
5
|
+
* @param {OrbiterParameters} params.orbiter - The Orbiter parameters.
|
|
6
|
+
* @returns {Promise<string>} A promise that resolves to the version of the Orbiter.
|
|
7
|
+
*/
|
|
8
|
+
export declare const orbiterVersion: (params: {
|
|
9
|
+
orbiter: OrbiterParameters;
|
|
10
|
+
}) => Promise<string>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SatelliteParameters } from '../types/actor.types';
|
|
2
|
+
/**
|
|
3
|
+
* Counts the assets in a collection.
|
|
4
|
+
* @param {Object} params - The parameters for counting the assets.
|
|
5
|
+
* @param {string} params.collection - The name of the collection.
|
|
6
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
7
|
+
* @returns {Promise<bigint>} A promise that resolves to the number of assets in the collection.
|
|
8
|
+
*/
|
|
9
|
+
export declare const countAssets: (params: {
|
|
10
|
+
collection: string;
|
|
11
|
+
satellite: SatelliteParameters;
|
|
12
|
+
}) => Promise<bigint>;
|
|
13
|
+
/**
|
|
14
|
+
* Deletes the assets in a collection.
|
|
15
|
+
* @param {Object} params - The parameters for deleting the assets.
|
|
16
|
+
* @param {string} params.collection - The name of the collection.
|
|
17
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
18
|
+
* @returns {Promise<void>} A promise that resolves when the assets are deleted.
|
|
19
|
+
*/
|
|
20
|
+
export declare const deleteAssets: (params: {
|
|
21
|
+
collection: string;
|
|
22
|
+
satellite: SatelliteParameters;
|
|
23
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { AuthenticationConfig, DatastoreConfig, StorageConfig } from '@junobuild/config';
|
|
2
|
+
import type { SatelliteParameters } from '../types/actor.types';
|
|
3
|
+
/**
|
|
4
|
+
* Sets the configuration for the Storage of a Satellite.
|
|
5
|
+
* @param {Object} params - The parameters for setting the configuration.
|
|
6
|
+
* @param {Object} params.config - The storage configuration.
|
|
7
|
+
* @param {Array<StorageConfigHeader>} params.config.headers - The headers configuration.
|
|
8
|
+
* @param {Array<StorageConfigRewrite>} params.config.rewrites - The rewrites configuration.
|
|
9
|
+
* @param {Array<StorageConfigRedirect>} params.config.redirects - The redirects configuration.
|
|
10
|
+
* @param {string} params.config.iframe - The iframe configuration.
|
|
11
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
12
|
+
* @returns {Promise<void>} A promise that resolves when the configuration is set.
|
|
13
|
+
*/
|
|
14
|
+
export declare const setStorageConfig: ({ config: { headers: configHeaders, rewrites: configRewrites, redirects: configRedirects, iframe: configIFrame, rawAccess: configRawAccess, maxMemorySize: configMaxMemorySize }, satellite }: {
|
|
15
|
+
config: StorageConfig;
|
|
16
|
+
satellite: SatelliteParameters;
|
|
17
|
+
}) => Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Sets the datastore configuration for a satellite.
|
|
20
|
+
* @param {Object} params - The parameters for setting the authentication configuration.
|
|
21
|
+
* @param {Object} params.config - The datastore configuration.
|
|
22
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
23
|
+
* @returns {Promise<void>} A promise that resolves when the datastore configuration is set.
|
|
24
|
+
*/
|
|
25
|
+
export declare const setDatastoreConfig: ({ config: { maxMemorySize }, ...rest }: {
|
|
26
|
+
config: DatastoreConfig;
|
|
27
|
+
satellite: SatelliteParameters;
|
|
28
|
+
}) => Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Sets the authentication configuration for a satellite.
|
|
31
|
+
* @param {Object} params - The parameters for setting the authentication configuration.
|
|
32
|
+
* @param {Object} params.config - The authentication configuration.
|
|
33
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
34
|
+
* @returns {Promise<void>} A promise that resolves when the authentication configuration is set.
|
|
35
|
+
*/
|
|
36
|
+
export declare const setAuthConfig: ({ config: { internetIdentity }, ...rest }: {
|
|
37
|
+
config: AuthenticationConfig;
|
|
38
|
+
satellite: SatelliteParameters;
|
|
39
|
+
}) => Promise<void>;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the authentication configuration for a satellite.
|
|
42
|
+
* @param {Object} params - The parameters for getting the authentication configuration.
|
|
43
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
44
|
+
* @returns {Promise<AuthenticationConfig | undefined>} A promise that resolves to the authentication configuration or undefined if not found.
|
|
45
|
+
*/
|
|
46
|
+
export declare const getAuthConfig: ({ satellite }: {
|
|
47
|
+
satellite: SatelliteParameters;
|
|
48
|
+
}) => Promise<AuthenticationConfig | undefined>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Principal } from '@dfinity/principal';
|
|
2
|
+
import type { Controller, SetControllersArgs } from '../../declarations/satellite/satellite.did';
|
|
3
|
+
import type { SatelliteParameters } from '../types/actor.types';
|
|
4
|
+
/**
|
|
5
|
+
* Lists the controllers of a satellite.
|
|
6
|
+
* @param {Object} params - The parameters for listing the controllers.
|
|
7
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
8
|
+
* @param {boolean} [params.deprecatedNoScope] - Whether to list deprecated no-scope controllers.
|
|
9
|
+
* @returns {Promise<[Principal, Controller][]>} A promise that resolves to a list of controllers.
|
|
10
|
+
*/
|
|
11
|
+
export declare const listSatelliteControllers: ({ deprecatedNoScope, ...params }: {
|
|
12
|
+
satellite: SatelliteParameters;
|
|
13
|
+
deprecatedNoScope?: boolean;
|
|
14
|
+
}) => Promise<[Principal, Controller][]>;
|
|
15
|
+
/**
|
|
16
|
+
* Sets the controllers of a satellite.
|
|
17
|
+
* @param {Object} params - The parameters for setting the controllers.
|
|
18
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
19
|
+
* @param {SetControllersArgs} params.args - The arguments for setting the controllers.
|
|
20
|
+
* @returns {Promise<[Principal, Controller][]>} A promise that resolves to a list of controllers.
|
|
21
|
+
*/
|
|
22
|
+
export declare const setSatelliteControllers: (params: {
|
|
23
|
+
satellite: SatelliteParameters;
|
|
24
|
+
args: SetControllersArgs;
|
|
25
|
+
}) => Promise<[Principal, Controller][]>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SatelliteParameters } from '../types/actor.types';
|
|
2
|
+
/**
|
|
3
|
+
* Counts the documents in a collection.
|
|
4
|
+
* @param {Object} params - The parameters for counting the documents.
|
|
5
|
+
* @param {string} params.collection - The name of the collection.
|
|
6
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
7
|
+
* @returns {Promise<bigint>} A promise that resolves to the number of documents in the collection.
|
|
8
|
+
*/
|
|
9
|
+
export declare const countDocs: (params: {
|
|
10
|
+
collection: string;
|
|
11
|
+
satellite: SatelliteParameters;
|
|
12
|
+
}) => Promise<bigint>;
|
|
13
|
+
/**
|
|
14
|
+
* Deletes the documents in a collection.
|
|
15
|
+
* @param {Object} params - The parameters for deleting the documents.
|
|
16
|
+
* @param {string} params.collection - The name of the collection.
|
|
17
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
18
|
+
* @returns {Promise<void>} A promise that resolves when the documents are deleted.
|
|
19
|
+
*/
|
|
20
|
+
export declare const deleteDocs: (params: {
|
|
21
|
+
collection: string;
|
|
22
|
+
satellite: SatelliteParameters;
|
|
23
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { SatelliteParameters } from '../types/actor.types';
|
|
2
|
+
import type { CustomDomain } from '../types/customdomain.types';
|
|
3
|
+
/**
|
|
4
|
+
* Lists the custom domains for a satellite.
|
|
5
|
+
* @param {Object} params - The parameters for listing the custom domains.
|
|
6
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
7
|
+
* @returns {Promise<CustomDomain[]>} A promise that resolves to an array of custom domains.
|
|
8
|
+
*/
|
|
9
|
+
export declare const listCustomDomains: ({ satellite }: {
|
|
10
|
+
satellite: SatelliteParameters;
|
|
11
|
+
}) => Promise<CustomDomain[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Sets the custom domains for a satellite.
|
|
14
|
+
* @param {Object} params - The parameters for setting the custom domains.
|
|
15
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
16
|
+
* @param {CustomDomain[]} params.domains - The custom domains to set.
|
|
17
|
+
* @returns {Promise<void[]>} A promise that resolves when the custom domains are set.
|
|
18
|
+
*/
|
|
19
|
+
export declare const setCustomDomains: ({ satellite, domains }: {
|
|
20
|
+
satellite: SatelliteParameters;
|
|
21
|
+
domains: CustomDomain[];
|
|
22
|
+
}) => Promise<void[]>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MemorySize } from '../../declarations/satellite/satellite.did';
|
|
2
|
+
import type { SatelliteParameters } from '../types/actor.types';
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves the memory size of a satellite.
|
|
5
|
+
* @param {Object} params - The parameters for retrieving the memory size.
|
|
6
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
7
|
+
* @returns {Promise<MemorySize>} A promise that resolves to the memory size of the satellite.
|
|
8
|
+
*/
|
|
9
|
+
export declare const satelliteMemorySize: (params: {
|
|
10
|
+
satellite: SatelliteParameters;
|
|
11
|
+
}) => Promise<MemorySize>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Rule, RulesType } from '@junobuild/config';
|
|
2
|
+
import type { SatelliteParameters } from '../types/actor.types';
|
|
3
|
+
/**
|
|
4
|
+
* Lists the rules for a satellite.
|
|
5
|
+
* @param {Object} params - The parameters for listing the rules.
|
|
6
|
+
* @param {RulesType} params.type - The type of rules to list.
|
|
7
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
8
|
+
* @returns {Promise<Rule[]>} A promise that resolves to an array of rules.
|
|
9
|
+
*/
|
|
10
|
+
export declare const listRules: ({ type, satellite }: {
|
|
11
|
+
type: RulesType;
|
|
12
|
+
satellite: SatelliteParameters;
|
|
13
|
+
}) => Promise<Rule[]>;
|
|
14
|
+
/**
|
|
15
|
+
* Sets a rule for a satellite.
|
|
16
|
+
* @param {Object} params - The parameters for setting the rule.
|
|
17
|
+
* @param {Rule} params.rule - The rule to set.
|
|
18
|
+
* @param {RulesType} params.type - The type of rule.
|
|
19
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
20
|
+
* @returns {Promise<void>} A promise that resolves when the rule is set.
|
|
21
|
+
*/
|
|
22
|
+
export declare const setRule: ({ rule: { collection, ...rest }, type, satellite }: {
|
|
23
|
+
rule: Rule;
|
|
24
|
+
type: RulesType;
|
|
25
|
+
satellite: SatelliteParameters;
|
|
26
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { SatelliteParameters } from '../types/actor.types';
|
|
2
|
+
/**
|
|
3
|
+
* Upgrades the satellite with the provided WASM module.
|
|
4
|
+
* @param {Object} params - The parameters for upgrading the satellite.
|
|
5
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
6
|
+
* @param {Uint8Array} params.wasm_module - The WASM module for the upgrade.
|
|
7
|
+
* @param {boolean} params.deprecated - Whether the upgrade is deprecated.
|
|
8
|
+
* @param {boolean} params.deprecatedNoScope - Whether the upgrade is deprecated with no scope.
|
|
9
|
+
* @param {boolean} [params.reset=false] - Whether to reset the satellite (reinstall) instead of upgrading.
|
|
10
|
+
* @returns {Promise<void>} A promise that resolves when the upgrade is complete.
|
|
11
|
+
*/
|
|
12
|
+
export declare const upgradeSatellite: ({ satellite, wasmModule, deprecated, deprecatedNoScope, reset }: {
|
|
13
|
+
satellite: SatelliteParameters;
|
|
14
|
+
wasmModule: Uint8Array;
|
|
15
|
+
deprecated: boolean;
|
|
16
|
+
deprecatedNoScope: boolean;
|
|
17
|
+
reset?: boolean;
|
|
18
|
+
}) => Promise<void>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SatelliteParameters } from '../types/actor.types';
|
|
2
|
+
import type { BuildType } from '../types/build.types';
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves the version of the satellite.
|
|
5
|
+
* @param {Object} params - The parameters for retrieving the version.
|
|
6
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
7
|
+
* @returns {Promise<string>} A promise that resolves to the version of the satellite.
|
|
8
|
+
*/
|
|
9
|
+
export declare const satelliteVersion: (params: {
|
|
10
|
+
satellite: SatelliteParameters;
|
|
11
|
+
}) => Promise<string>;
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves the build version of the satellite.
|
|
14
|
+
* @param {Object} params - The parameters for retrieving the build version.
|
|
15
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
16
|
+
* @returns {Promise<string>} A promise that resolves to the build version of the satellite.
|
|
17
|
+
*/
|
|
18
|
+
export declare const satelliteBuildVersion: (params: {
|
|
19
|
+
satellite: SatelliteParameters;
|
|
20
|
+
}) => Promise<string>;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves the build type of the satellite.
|
|
23
|
+
* @param {Object} params - The parameters for retrieving the build type.
|
|
24
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
25
|
+
* @returns {Promise<BuildType | undefined>} A promise that resolves to the build type of the satellite or undefined if not found.
|
|
26
|
+
*/
|
|
27
|
+
export declare const satelliteBuildType: ({ satellite: { satelliteId, ...rest } }: {
|
|
28
|
+
satellite: SatelliteParameters;
|
|
29
|
+
}) => Promise<BuildType | undefined>;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @property {string} controllerId - The ID of the controller.
|
|
5
5
|
* @property {string | null | undefined} profile - The profile of the controller.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export interface SetControllerParams {
|
|
8
8
|
controllerId: string;
|
|
9
9
|
profile: string | null | undefined;
|
|
10
|
-
}
|
|
10
|
+
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { HttpAgent } from '@dfinity/agent';
|
|
1
|
+
import { HttpAgent, type ActorConfig, type ActorMethod, type ActorSubclass } from '@dfinity/agent';
|
|
3
2
|
import type { IDL } from '@dfinity/candid';
|
|
4
3
|
import type { ActorParameters } from '../types/actor.types';
|
|
5
4
|
export declare const createActor: <T = Record<string, ActorMethod<unknown[], unknown>>>({ canisterId, idlFactory, config, ...rest }: {
|
|
6
5
|
idlFactory: IDL.InterfaceFactory;
|
|
7
6
|
canisterId: string;
|
|
8
|
-
config?: Pick<ActorConfig,
|
|
7
|
+
config?: Pick<ActorConfig, "callTransform" | "queryTransform">;
|
|
9
8
|
} & ActorParameters) => Promise<ActorSubclass<T>>;
|
|
10
9
|
export declare const initAgent: ({ identity, fetch, container }: ActorParameters) => Promise<HttpAgent>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { MemoryText, PermissionText, Rule, RulesType } from '@junobuild/config';
|
|
2
2
|
import type { Memory, Permission, Rule as RuleApi, RulesType as RulesTypeApi, SetRule } from '../../declarations/satellite/satellite.did';
|
|
3
3
|
export declare const mapRuleType: (type: RulesType) => RulesTypeApi;
|
|
4
|
-
export declare const mapSetRule: ({ read, write, memory, maxSize, maxCapacity, version, mutablePermissions }: Pick<Rule,
|
|
4
|
+
export declare const mapSetRule: ({ read, write, memory, maxSize, maxCapacity, version, mutablePermissions, maxTokens }: Pick<Rule, "read" | "write" | "maxSize" | "maxCapacity" | "version" | "memory" | "mutablePermissions" | "maxTokens">) => SetRule;
|
|
5
5
|
export declare const mapRule: ([collection, rule]: [string, RuleApi]) => Rule;
|
|
6
6
|
export declare const permissionToText: (permission: Permission) => PermissionText;
|
|
7
7
|
export declare const memoryFromText: (text: MemoryText) => Memory;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junobuild/admin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.58-next-2024-11-22",
|
|
4
4
|
"description": "A library for interfacing with admin features of Juno",
|
|
5
5
|
"author": "David Dal Busco (https://daviddalbusco.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"homepage": "https://juno.build",
|
|
52
52
|
"peerDependencies": {
|
|
53
53
|
"@dfinity/agent": "*",
|
|
54
|
+
"@dfinity/ic-management": "*",
|
|
54
55
|
"@dfinity/identity": "*",
|
|
55
56
|
"@dfinity/principal": "*",
|
|
56
57
|
"@junobuild/config": "*",
|