@junobuild/admin 0.6.0 → 0.6.2-next-2025-07-17

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.
Files changed (44) hide show
  1. package/dist/browser/index.js +1 -1
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/node/index.mjs +1 -1
  4. package/dist/node/index.mjs.map +4 -4
  5. package/dist/types/api/actor.api.d.ts +1 -1
  6. package/dist/types/api/ic.api.d.ts +1 -1
  7. package/dist/types/api/mission-control.api.d.ts +1 -1
  8. package/dist/types/api/orbiter.api.d.ts +1 -1
  9. package/dist/types/api/satellite.api.d.ts +1 -1
  10. package/dist/types/handlers/upgrade.chunks.handlers.d.ts +1 -1
  11. package/dist/types/handlers/upgrade.handlers.d.ts +1 -1
  12. package/dist/types/handlers/upgrade.single.handlers.d.ts +1 -1
  13. package/dist/types/helpers/wasm.helpers.d.ts +1 -1
  14. package/dist/types/index.d.ts +6 -6
  15. package/dist/types/schemas/releases.d.ts +51 -0
  16. package/dist/types/services/mission-control.controllers.services.d.ts +2 -2
  17. package/dist/types/services/mission-control.upgrade.services.d.ts +2 -2
  18. package/dist/types/services/mission-control.version.services.d.ts +1 -1
  19. package/dist/types/services/module.upgrade.services.d.ts +2 -2
  20. package/dist/types/services/orbiter.controllers.services.d.ts +1 -1
  21. package/dist/types/services/orbiter.memory.services.d.ts +1 -1
  22. package/dist/types/services/orbiter.upgrade.services.d.ts +2 -2
  23. package/dist/types/services/orbiter.version.services.d.ts +1 -1
  24. package/dist/types/services/package.services.d.ts +1 -1
  25. package/dist/types/services/satellite.assets.services.d.ts +1 -1
  26. package/dist/types/services/satellite.config.services.d.ts +1 -1
  27. package/dist/types/services/satellite.controllers.services.d.ts +1 -1
  28. package/dist/types/services/satellite.docs.services.d.ts +1 -1
  29. package/dist/types/services/satellite.domains.services.d.ts +2 -2
  30. package/dist/types/services/satellite.memory.services.d.ts +1 -1
  31. package/dist/types/services/satellite.rules.services.d.ts +2 -2
  32. package/dist/types/services/satellite.upgrade.services.d.ts +2 -2
  33. package/dist/types/services/satellite.version.services.d.ts +2 -2
  34. package/dist/types/types/{upgrade.types.d.ts → upgrade.d.ts} +1 -1
  35. package/dist/types/utils/actor.utils.d.ts +1 -1
  36. package/dist/types/utils/controllers.utils.d.ts +1 -1
  37. package/dist/types/utils/rule.utils.d.ts +1 -1
  38. package/package.json +10 -10
  39. package/dist/types/types/releases.types.d.ts +0 -62
  40. /package/dist/types/types/{actor.types.d.ts → actor.d.ts} +0 -0
  41. /package/dist/types/types/{build.types.d.ts → build.d.ts} +0 -0
  42. /package/dist/types/types/{controllers.types.d.ts → controllers.d.ts} +0 -0
  43. /package/dist/types/types/{customdomain.types.d.ts → customdomain.d.ts} +0 -0
  44. /package/dist/types/types/{list.types.d.ts → list.d.ts} +0 -0
@@ -7,7 +7,7 @@ import type { _SERVICE as DeprecatedSatelliteNoScopeActor } from '../../declarat
7
7
  import type { _SERVICE as DeprecatedSatelliteVersionActor } from '../../declarations/satellite/satellite-deprecated-version.did';
8
8
  import type { _SERVICE as DeprecatedSatelliteActor } from '../../declarations/satellite/satellite-deprecated.did';
9
9
  import type { _SERVICE as SatelliteActor } from '../../declarations/satellite/satellite.did';
10
- import type { ActorParameters, MissionControlParameters, OrbiterParameters, SatelliteParameters } from '../types/actor.types';
10
+ import type { ActorParameters, MissionControlParameters, OrbiterParameters, SatelliteParameters } from '../types/actor';
11
11
  /**
12
12
  * @deprecated TODO: for backwards compatibility - to be removed
13
13
  */
@@ -3,7 +3,7 @@ import { type chunk_hash, type InstallChunkedCodeParams, type InstallCodeParams,
3
3
  import type { take_canister_snapshot_result } from '@dfinity/ic-management/dist/candid/ic-management';
4
4
  import type { CanisterStatusResponse } from '@dfinity/ic-management/dist/types/types/ic-management.responses';
5
5
  import { Principal } from '@dfinity/principal';
6
- import type { ActorParameters } from '../types/actor.types';
6
+ import type { ActorParameters } from '../types/actor';
7
7
  export declare const canisterStop: ({ canisterId, actor }: {
8
8
  canisterId: Principal;
9
9
  actor: ActorParameters;
@@ -1,6 +1,6 @@
1
1
  import type { Principal } from '@dfinity/principal';
2
2
  import type { Controller, SetController } from '../../declarations/mission_control/mission_control.did';
3
- import type { MissionControlParameters } from '../types/actor.types';
3
+ import type { MissionControlParameters } from '../types/actor';
4
4
  /**
5
5
  * @deprecated - Replaced in Mission Control > v0.0.14 with public custom section juno:package
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import type { Principal } from '@dfinity/principal';
2
2
  import type { Controller, MemorySize } from '../../declarations/orbiter/orbiter.did';
3
- import type { OrbiterParameters } from '../types/actor.types';
3
+ import type { OrbiterParameters } from '../types/actor';
4
4
  /**
5
5
  * @deprecated - Replaced in Orbiter > v0.0.8 with public custom section juno:package
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import type { Principal } from '@dfinity/principal';
2
2
  import type { AuthenticationConfig, CollectionType, Controller, CustomDomain, DbConfig, ListRulesParams, ListRulesResults, MemorySize, Rule, SetControllersArgs, SetRule, StorageConfig } from '../../declarations/satellite/satellite.did';
3
- import type { SatelliteParameters } from '../types/actor.types';
3
+ import type { SatelliteParameters } from '../types/actor';
4
4
  export declare const setStorageConfig: ({ config, satellite }: {
5
5
  config: StorageConfig;
6
6
  satellite: SatelliteParameters;
@@ -1,2 +1,2 @@
1
- import type { UpgradeCodeParams } from '../types/upgrade.types';
1
+ import type { UpgradeCodeParams } from '../types/upgrade';
2
2
  export declare const upgradeChunkedCode: ({ actor, canisterId, missionControlId, wasmModule, preClearChunks: userPreClearChunks, ...rest }: UpgradeCodeParams) => Promise<void>;
@@ -1,4 +1,4 @@
1
- import { type UpgradeCodeParams } from '../types/upgrade.types';
1
+ import { type UpgradeCodeParams } from '../types/upgrade';
2
2
  export declare const upgrade: ({ wasmModule, canisterId, actor, onProgress, takeSnapshot, ...rest }: UpgradeCodeParams & {
3
3
  reset?: boolean;
4
4
  }) => Promise<void>;
@@ -1,2 +1,2 @@
1
- import type { UpgradeCodeParams } from '../types/upgrade.types';
1
+ import type { UpgradeCodeParams } from '../types/upgrade';
2
2
  export declare const upgradeSingleChunkCode: ({ actor, ...rest }: UpgradeCodeParams) => Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import { type JunoPackage } from '@junobuild/config';
2
- import type { BuildType } from '../types/build.types';
2
+ import type { BuildType } from '../types/build';
3
3
  /**
4
4
  * Extracts the build type from a provided Juno package or falls back to a deprecated detection method.
5
5
  *
@@ -4,6 +4,7 @@ export * from './helpers/crypto.helpers';
4
4
  export * from './helpers/package.helpers';
5
5
  export * from './helpers/version.helpers';
6
6
  export * from './helpers/wasm.helpers';
7
+ export * from './schemas/releases';
7
8
  export * from './services/mission-control.controllers.services';
8
9
  export * from './services/mission-control.upgrade.services';
9
10
  export * from './services/mission-control.version.services';
@@ -22,9 +23,8 @@ export * from './services/satellite.memory.services';
22
23
  export * from './services/satellite.rules.services';
23
24
  export * from './services/satellite.upgrade.services';
24
25
  export * from './services/satellite.version.services';
25
- export type * from './types/actor.types';
26
- export type * from './types/build.types';
27
- export type * from './types/controllers.types';
28
- export type * from './types/customdomain.types';
29
- export type * from './types/releases.types';
30
- export * from './types/upgrade.types';
26
+ export type * from './types/actor';
27
+ export type * from './types/build';
28
+ export type * from './types/controllers';
29
+ export type * from './types/customdomain';
30
+ export * from './types/upgrade';
@@ -0,0 +1,51 @@
1
+ import * as z from 'zod/v4';
2
+ /**
3
+ * A schema representing the metadata for multiple releases provided by Juno.
4
+ */
5
+ export declare const ReleasesMetadataSchema: z.ZodObject<{
6
+ /**
7
+ * List of all Mission Control versions across releases.
8
+ */
9
+ mission_controls: z.ZodArray<z.ZodString>;
10
+ /**
11
+ * List of all Satellite versions across releases.
12
+ */
13
+ satellites: z.ZodArray<z.ZodString>;
14
+ /**
15
+ * List of all Orbiter versions across releases.
16
+ */
17
+ orbiters: z.ZodArray<z.ZodString>;
18
+ /**
19
+ * List of release metadata objects, each representing one release.
20
+ */
21
+ releases: z.ZodArray<z.ZodObject<{
22
+ /**
23
+ * Unique version identifier for the release, following the `x.y.z` format.
24
+ */
25
+ tag: z.ZodString;
26
+ /**
27
+ * The version of the console included in the release.
28
+ */
29
+ console: z.ZodString;
30
+ /**
31
+ * Version of the Observatory module included in the release.
32
+ */
33
+ observatory: z.ZodString;
34
+ /**
35
+ * Version of the Mission Control module included in the release.
36
+ */
37
+ mission_control: z.ZodString;
38
+ /**
39
+ * Version of the Satellite module included in the release.
40
+ */
41
+ satellite: z.ZodString;
42
+ /**
43
+ * Version of the Orbiter module included in the release.
44
+ */
45
+ orbiter: z.ZodString;
46
+ }, z.core.$strict>>;
47
+ }, z.core.$strict>;
48
+ /**
49
+ * Type representing the metadata for multiple releases provided by Juno.
50
+ */
51
+ export type ReleasesMetadata = z.infer<typeof ReleasesMetadataSchema>;
@@ -1,7 +1,7 @@
1
1
  import type { Principal } from '@dfinity/principal';
2
2
  import type { Controller } from '../../declarations/mission_control/mission_control.did';
3
- import type { MissionControlParameters } from '../types/actor.types';
4
- import type { SetControllerParams } from '../types/controllers.types';
3
+ import type { MissionControlParameters } from '../types/actor';
4
+ import type { SetControllerParams } from '../types/controllers';
5
5
  /**
6
6
  * Sets the controller for the specified satellites.
7
7
  * @param {Object} params - The parameters for setting the satellites controller.
@@ -1,5 +1,5 @@
1
- import type { MissionControlParameters } from '../types/actor.types';
2
- import type { UpgradeCodeParams } from '../types/upgrade.types';
1
+ import type { MissionControlParameters } from '../types/actor';
2
+ import type { UpgradeCodeParams } from '../types/upgrade';
3
3
  /**
4
4
  * Upgrades the Mission Control with the provided WASM module.
5
5
  * @param {Object} params - The parameters for upgrading the Mission Control.
@@ -1,4 +1,4 @@
1
- import type { MissionControlParameters } from '../types/actor.types';
1
+ import type { MissionControlParameters } from '../types/actor';
2
2
  /**
3
3
  * Retrieves the version of Mission Control.
4
4
  * @param {Object} params - The parameters for Mission Control.
@@ -1,5 +1,5 @@
1
- import type { ActorParameters } from '../types/actor.types';
2
- import type { UpgradeCodeParams } from '../types/upgrade.types';
1
+ import type { ActorParameters } from '../types/actor';
2
+ import type { UpgradeCodeParams } from '../types/upgrade';
3
3
  /**
4
4
  * Upgrades a module with the provided WASM code and arguments. This generic is notably useful for Juno Docker.
5
5
  *
@@ -1,6 +1,6 @@
1
1
  import type { Principal } from '@dfinity/principal';
2
2
  import type { Controller } from '../../declarations/mission_control/mission_control.did';
3
- import type { OrbiterParameters } from '../types/actor.types';
3
+ import type { OrbiterParameters } from '../types/actor';
4
4
  /**
5
5
  * Lists the controllers of the Orbiter.
6
6
  * @param {Object} params - The parameters for listing the controllers.
@@ -1,5 +1,5 @@
1
1
  import type { MemorySize } from '../../declarations/orbiter/orbiter.did';
2
- import type { OrbiterParameters } from '../types/actor.types';
2
+ import type { OrbiterParameters } from '../types/actor';
3
3
  /**
4
4
  * Retrieves the stable and heap memory size of the Orbiter.
5
5
  * @param {Object} params - The parameters for the Orbiter.
@@ -1,5 +1,5 @@
1
- import type { OrbiterParameters } from '../types/actor.types';
2
- import type { UpgradeCodeParams } from '../types/upgrade.types';
1
+ import type { OrbiterParameters } from '../types/actor';
2
+ import type { UpgradeCodeParams } from '../types/upgrade';
3
3
  /**
4
4
  * Upgrades the Orbiter with the provided WASM module.
5
5
  * @param {Object} params - The parameters for upgrading the Orbiter.
@@ -1,4 +1,4 @@
1
- import type { OrbiterParameters } from '../types/actor.types';
1
+ import type { OrbiterParameters } from '../types/actor';
2
2
  /**
3
3
  * Retrieves the version of the Orbiter.
4
4
  * @param {Object} params - The parameters for the Orbiter.
@@ -1,6 +1,6 @@
1
1
  import type { Principal } from '@dfinity/principal';
2
2
  import { type JunoPackage } from '@junobuild/config';
3
- import type { ActorParameters } from '../types/actor.types';
3
+ import type { ActorParameters } from '../types/actor';
4
4
  /**
5
5
  * Parameters required to retrieve a `juno:package` metadata section.
6
6
  *
@@ -1,4 +1,4 @@
1
- import type { SatelliteParameters } from '../types/actor.types';
1
+ import type { SatelliteParameters } from '../types/actor';
2
2
  /**
3
3
  * Counts the assets in a collection.
4
4
  * @param {Object} params - The parameters for counting the assets.
@@ -1,5 +1,5 @@
1
1
  import type { AuthenticationConfig, DatastoreConfig, StorageConfig } from '@junobuild/config';
2
- import type { SatelliteParameters } from '../types/actor.types';
2
+ import type { SatelliteParameters } from '../types/actor';
3
3
  /**
4
4
  * Sets the configuration for the Storage of a Satellite.
5
5
  * @param {Object} params - The parameters for setting the configuration.
@@ -1,6 +1,6 @@
1
1
  import type { Principal } from '@dfinity/principal';
2
2
  import type { Controller, SetControllersArgs } from '../../declarations/satellite/satellite.did';
3
- import type { SatelliteParameters } from '../types/actor.types';
3
+ import type { SatelliteParameters } from '../types/actor';
4
4
  /**
5
5
  * Lists the controllers of a satellite.
6
6
  * @param {Object} params - The parameters for listing the controllers.
@@ -1,4 +1,4 @@
1
- import type { SatelliteParameters } from '../types/actor.types';
1
+ import type { SatelliteParameters } from '../types/actor';
2
2
  /**
3
3
  * Counts the documents in a collection.
4
4
  * @param {Object} params - The parameters for counting the documents.
@@ -1,5 +1,5 @@
1
- import type { SatelliteParameters } from '../types/actor.types';
2
- import type { CustomDomain } from '../types/customdomain.types';
1
+ import type { SatelliteParameters } from '../types/actor';
2
+ import type { CustomDomain } from '../types/customdomain';
3
3
  /**
4
4
  * Lists the custom domains for a satellite.
5
5
  * @param {Object} params - The parameters for listing the custom domains.
@@ -1,5 +1,5 @@
1
1
  import type { MemorySize } from '../../declarations/satellite/satellite.did';
2
- import type { SatelliteParameters } from '../types/actor.types';
2
+ import type { SatelliteParameters } from '../types/actor';
3
3
  /**
4
4
  * Retrieves the stable and heap memory size of a satellite.
5
5
  * @param {Object} params - The parameters for retrieving the memory size.
@@ -1,6 +1,6 @@
1
1
  import type { Rule, RulesType } from '@junobuild/config';
2
- import type { SatelliteParameters } from '../types/actor.types';
3
- import type { ListRulesMatcher, ListRulesResults } from '../types/list.types';
2
+ import type { SatelliteParameters } from '../types/actor';
3
+ import type { ListRulesMatcher, ListRulesResults } from '../types/list';
4
4
  /**
5
5
  * Lists the rules for a satellite.
6
6
  * @param {Object} params - The parameters for listing the rules.
@@ -1,5 +1,5 @@
1
- import type { SatelliteParameters } from '../types/actor.types';
2
- import type { UpgradeCodeParams } from '../types/upgrade.types';
1
+ import type { SatelliteParameters } from '../types/actor';
2
+ import type { UpgradeCodeParams } from '../types/upgrade';
3
3
  /**
4
4
  * Upgrades a satellite with the provided WASM module.
5
5
  * @param {Object} params - The parameters for upgrading the satellite.
@@ -1,5 +1,5 @@
1
- import type { SatelliteParameters } from '../types/actor.types';
2
- import type { BuildType } from '../types/build.types';
1
+ import type { SatelliteParameters } from '../types/actor';
2
+ import type { BuildType } from '../types/build';
3
3
  /**
4
4
  * Retrieves the version of the satellite.
5
5
  * @param {Object} params - The parameters for retrieving the version.
@@ -1,6 +1,6 @@
1
1
  import type { canister_install_mode } from '@dfinity/ic-management';
2
2
  import type { Principal } from '@dfinity/principal';
3
- import type { ActorParameters } from './actor.types';
3
+ import type { ActorParameters } from './actor';
4
4
  export declare enum UpgradeCodeProgressStep {
5
5
  AssertingExistingCode = 0,
6
6
  StoppingCanister = 1,
@@ -1,6 +1,6 @@
1
1
  import { HttpAgent, type ActorConfig, type ActorMethod, type ActorSubclass } from '@dfinity/agent';
2
2
  import type { IDL } from '@dfinity/candid';
3
- import type { ActorParameters } from '../types/actor.types';
3
+ import type { ActorParameters } from '../types/actor';
4
4
  export declare const createActor: <T = Record<string, ActorMethod>>({ canisterId, idlFactory, config, ...rest }: {
5
5
  idlFactory: IDL.InterfaceFactory;
6
6
  canisterId: string;
@@ -1,6 +1,6 @@
1
1
  import { Principal } from '@dfinity/principal';
2
2
  import type { SetController } from '../../declarations/mission_control/mission_control.did';
3
- import type { SetControllerParams } from '../types/controllers.types';
3
+ import type { SetControllerParams } from '../types/controllers';
4
4
  export declare const mapSetControllerParams: ({ controllerId, profile }: SetControllerParams) => {
5
5
  controllerIds: Principal[];
6
6
  controller: SetController;
@@ -1,6 +1,6 @@
1
1
  import type { MemoryText, PermissionText, Rule, RulesType } from '@junobuild/config';
2
2
  import type { CollectionType as CollectionTypeApi, ListRulesParams as ListRulesParamsApi, Memory, Permission, Rule as RuleApi, SetRule } from '../../declarations/satellite/satellite.did';
3
- import type { ListRulesMatcher } from '../types/list.types';
3
+ import type { ListRulesMatcher } from '../types/list';
4
4
  export declare const mapRuleType: (type: RulesType) => CollectionTypeApi;
5
5
  export declare const mapRulesFilter: (filter?: ListRulesMatcher) => ListRulesParamsApi;
6
6
  export declare const mapSetRule: ({ read, write, memory, maxSize, maxChangesPerUser, maxCapacity, version, mutablePermissions, maxTokens }: Pick<Rule, "read" | "write" | "maxSize" | "maxChangesPerUser" | "maxCapacity" | "version" | "memory" | "mutablePermissions" | "maxTokens">) => SetRule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/admin",
3
- "version": "0.6.0",
3
+ "version": "0.6.2-next-2025-07-17",
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",
@@ -50,14 +50,14 @@
50
50
  ],
51
51
  "homepage": "https://juno.build",
52
52
  "peerDependencies": {
53
- "@dfinity/agent": "^2.3.0",
54
- "@dfinity/candid": "^2.3.0",
55
- "@dfinity/ic-management": "^6.2",
56
- "@dfinity/identity": "^2.3.0",
57
- "@dfinity/principal": "^2.3.0",
58
- "@dfinity/utils": "^2",
53
+ "@dfinity/agent": "*",
54
+ "@dfinity/candid": "*",
55
+ "@dfinity/ic-management": "*",
56
+ "@dfinity/identity": "*",
57
+ "@dfinity/principal": "*",
58
+ "@dfinity/utils": "*",
59
59
  "@junobuild/config": "*",
60
- "semver": "7.*",
61
- "zod": "^3.25"
60
+ "semver": "*",
61
+ "zod": "*"
62
62
  }
63
- }
63
+ }
@@ -1,62 +0,0 @@
1
- /**
2
- * Represents metadata for a release.
3
- * @interface
4
- */
5
- export interface ReleaseMetadata {
6
- /**
7
- * The tag of the release.
8
- * @type {string}
9
- */
10
- tag: string;
11
- /**
12
- * The version of the console included in the release.
13
- * @type {string}
14
- */
15
- console: string;
16
- /**
17
- * The version of the observatory included in the release.
18
- * @type {string}
19
- */
20
- observatory: string;
21
- /**
22
- * The version of the mission control included in the release.
23
- * @type {string}
24
- */
25
- mission_control: string;
26
- /**
27
- * The version of the satellite included in the release.
28
- * @type {string}
29
- */
30
- satellite: string;
31
- /**
32
- * The version of the orbiter included in the release.
33
- * @type {string}
34
- */
35
- orbiter: string;
36
- }
37
- /**
38
- * Represents metadata for multiple releases.
39
- * @interface
40
- */
41
- export interface ReleasesMetadata {
42
- /**
43
- * The list of mission control versions.
44
- * @type {string[]}
45
- */
46
- mission_controls: string[];
47
- /**
48
- * The list of satellite versions.
49
- * @type {string[]}
50
- */
51
- satellites: string[];
52
- /**
53
- * The list of orbiter versions.
54
- * @type {string[]}
55
- */
56
- orbiters: string[];
57
- /**
58
- * The list of release metadata.
59
- * @type {ReleaseMetadata[]}
60
- */
61
- releases: ReleaseMetadata[];
62
- }
File without changes