@junobuild/admin 0.6.7-next-2025-07-17.3 → 0.6.8-next-2025-07-30

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.
@@ -1,13 +1,6 @@
1
1
  import type { IDL } from '@dfinity/candid';
2
- import type { _SERVICE as DeprecatedMissionControlVersionActor } from '../../declarations/mission_control/mission_control-deprecated-version.did';
3
- import type { _SERVICE as MissionControlActor } from '../../declarations/mission_control/mission_control.did';
4
- import type { _SERVICE as DeprecatedOrbiterVersionActor } from '../../declarations/orbiter/orbiter-deprecated-version.did';
5
- import type { _SERVICE as OrbiterActor } from '../../declarations/orbiter/orbiter.did';
6
- import type { _SERVICE as DeprecatedSatelliteNoScopeActor } from '../../declarations/satellite/satellite-deprecated-no-scope.did';
7
- import type { _SERVICE as DeprecatedSatelliteVersionActor } from '../../declarations/satellite/satellite-deprecated-version.did';
8
- import type { _SERVICE as DeprecatedSatelliteActor } from '../../declarations/satellite/satellite-deprecated.did';
9
- import type { _SERVICE as SatelliteActor } from '../../declarations/satellite/satellite.did';
10
2
  import type { ActorParameters, MissionControlParameters, OrbiterParameters, SatelliteParameters } from '../types/actor';
3
+ import { type DeprecatedMissionControlVersionActor, type DeprecatedOrbiterVersionActor, type DeprecatedSatelliteActor, type DeprecatedSatelliteNoScopeActor, type DeprecatedSatelliteVersionActor, type MissionControlActor, type OrbiterActor, type SatelliteActor } from './_actor.factory';
11
4
  /**
12
5
  * @deprecated TODO: for backwards compatibility - to be removed
13
6
  */
@@ -0,0 +1,19 @@
1
+ import { idlFactory as idlFactoryMissionControl } from '../../declarations/mission_control/mission_control.factory.did.js';
2
+ import { idlFactory as idlFactoryOrbiter } from '../../declarations/orbiter/orbiter.factory.did.js';
3
+ import { idlFactory as idlCertifiedFactoryOrbiter } from '../../declarations/orbiter/orbiter.factory.certified.did.js';
4
+ import { idlFactory as idlDeprecatedFactorySatelliteNoScope } from '../../declarations/satellite/satellite-deprecated-no-scope.factory.did.js';
5
+ import { idlFactory as idlDeprecatedFactorySatelliteVersion } from '../../declarations/satellite/satellite-deprecated-version.factory.did.js';
6
+ import { idlFactory as idlDeprecatedFactoryOrbiterVersion } from '../../declarations/orbiter/orbiter-deprecated-version.factory.did.js';
7
+ import { idlFactory as idlDeprecatedFactoryMissionControlVersion } from '../../declarations/mission_control/mission_control-deprecated-version.factory.did.js';
8
+ import { idlFactory as idlDeprecatedFactorySatellite } from '../../declarations/satellite/satellite-deprecated.factory.did.js';
9
+ import { idlFactory as idlFactorySatellite } from '../../declarations/satellite/satellite.factory.did.js';
10
+ import { idlFactory as idlCertifiedFactorySatellite } from '../../declarations/satellite/satellite.factory.certified.did.js';
11
+ import type { _SERVICE as DeprecatedMissionControlVersionActor } from '../../declarations/mission_control/mission_control-deprecated-version.did';
12
+ import type { _SERVICE as MissionControlActor } from '../../declarations/mission_control/mission_control.did';
13
+ import type { _SERVICE as DeprecatedOrbiterVersionActor } from '../../declarations/orbiter/orbiter-deprecated-version.did';
14
+ import type { _SERVICE as OrbiterActor } from '../../declarations/orbiter/orbiter.did';
15
+ import type { _SERVICE as DeprecatedSatelliteNoScopeActor } from '../../declarations/satellite/satellite-deprecated-no-scope.did';
16
+ import type { _SERVICE as DeprecatedSatelliteVersionActor } from '../../declarations/satellite/satellite-deprecated-version.did';
17
+ import type { _SERVICE as DeprecatedSatelliteActor } from '../../declarations/satellite/satellite-deprecated.did';
18
+ import type { _SERVICE as SatelliteActor } from '../../declarations/satellite/satellite.did';
19
+ export { idlCertifiedFactoryOrbiter, idlCertifiedFactorySatellite, idlDeprecatedFactoryMissionControlVersion, idlDeprecatedFactoryOrbiterVersion, idlDeprecatedFactorySatellite, idlDeprecatedFactorySatelliteNoScope, idlDeprecatedFactorySatelliteVersion, idlFactoryMissionControl, idlFactoryOrbiter, idlFactorySatellite, type DeprecatedMissionControlVersionActor, type DeprecatedOrbiterVersionActor, type DeprecatedSatelliteActor, type DeprecatedSatelliteNoScopeActor, type DeprecatedSatelliteVersionActor, type MissionControlActor, type OrbiterActor, type SatelliteActor };
@@ -0,0 +1,3 @@
1
+ import type { HttpAgent } from '@dfinity/agent';
2
+ import type { ActorParameters } from '../types/actor';
3
+ export declare const useOrInitAgent: ({ agent, ...rest }: ActorParameters) => Promise<HttpAgent>;
@@ -1,18 +1,18 @@
1
1
  import type { Principal } from '@dfinity/principal';
2
- import type { AuthenticationConfig, CollectionType, Controller, CustomDomain, DbConfig, ListRulesParams, ListRulesResults, MemorySize, Rule, SetControllersArgs, SetRule, StorageConfig } from '../../declarations/satellite/satellite.did';
2
+ import type { AuthenticationConfig, CollectionType, Config, Controller, CustomDomain, DbConfig, ListRulesParams, ListRulesResults, MemorySize, Rule, SetAuthenticationConfig, SetControllersArgs, SetDbConfig, SetRule, SetStorageConfig, StorageConfig } from '../../declarations/satellite/satellite.did';
3
3
  import type { SatelliteParameters } from '../types/actor';
4
4
  export declare const setStorageConfig: ({ config, satellite }: {
5
- config: StorageConfig;
5
+ config: SetStorageConfig;
6
6
  satellite: SatelliteParameters;
7
- }) => Promise<void>;
7
+ }) => Promise<StorageConfig>;
8
8
  export declare const setDatastoreConfig: ({ config, satellite }: {
9
- config: DbConfig;
9
+ config: SetDbConfig;
10
10
  satellite: SatelliteParameters;
11
- }) => Promise<void>;
11
+ }) => Promise<DbConfig>;
12
12
  export declare const setAuthConfig: ({ config, satellite }: {
13
- config: AuthenticationConfig;
13
+ config: SetAuthenticationConfig;
14
14
  satellite: SatelliteParameters;
15
- }) => Promise<void>;
15
+ }) => Promise<AuthenticationConfig>;
16
16
  export declare const getStorageConfig: ({ satellite }: {
17
17
  satellite: SatelliteParameters;
18
18
  }) => Promise<StorageConfig>;
@@ -22,6 +22,9 @@ export declare const getDatastoreConfig: ({ satellite }: {
22
22
  export declare const getAuthConfig: ({ satellite }: {
23
23
  satellite: SatelliteParameters;
24
24
  }) => Promise<[] | [AuthenticationConfig]>;
25
+ export declare const getConfig: ({ satellite }: {
26
+ satellite: SatelliteParameters;
27
+ }) => Promise<Config>;
25
28
  export declare const listRules: ({ satellite, type, filter }: {
26
29
  satellite: SatelliteParameters;
27
30
  type: CollectionType;
@@ -9,23 +9,23 @@ import type { SatelliteParameters } from '../types/actor';
9
9
  * @param {Array<StorageConfigRedirect>} params.config.redirects - The redirects configuration.
10
10
  * @param {string} params.config.iframe - The iframe configuration.
11
11
  * @param {SatelliteParameters} params.satellite - The satellite parameters.
12
- * @returns {Promise<void>} A promise that resolves when the configuration is set.
12
+ * @returns {Promise<void>} A promise that resolves with the applied configuration when set.
13
13
  */
14
- export declare const setStorageConfig: ({ config: { headers: configHeaders, rewrites: configRewrites, redirects: configRedirects, iframe: configIFrame, rawAccess: configRawAccess, maxMemorySize: configMaxMemorySize }, satellite }: {
15
- config: StorageConfig;
14
+ export declare const setStorageConfig: ({ config, satellite }: {
15
+ config: Omit<StorageConfig, "createdAt" | "updatedAt">;
16
16
  satellite: SatelliteParameters;
17
- }) => Promise<void>;
17
+ }) => Promise<StorageConfig>;
18
18
  /**
19
19
  * Sets the datastore configuration for a satellite.
20
20
  * @param {Object} params - The parameters for setting the authentication configuration.
21
21
  * @param {Object} params.config - The datastore configuration.
22
22
  * @param {SatelliteParameters} params.satellite - The satellite parameters.
23
- * @returns {Promise<void>} A promise that resolves when the datastore configuration is set.
23
+ * @returns {Promise<void>} A promise that resolves with the config when the datastore configuration is set.
24
24
  */
25
- export declare const setDatastoreConfig: ({ config: { maxMemorySize }, ...rest }: {
26
- config: DatastoreConfig;
25
+ export declare const setDatastoreConfig: ({ config, ...rest }: {
26
+ config: Omit<DatastoreConfig, "createdAt" | "updatedAt">;
27
27
  satellite: SatelliteParameters;
28
- }) => Promise<void>;
28
+ }) => Promise<DatastoreConfig>;
29
29
  /**
30
30
  * Sets the authentication configuration for a satellite.
31
31
  * @param {Object} params - The parameters for setting the authentication configuration.
@@ -33,10 +33,10 @@ export declare const setDatastoreConfig: ({ config: { maxMemorySize }, ...rest }
33
33
  * @param {SatelliteParameters} params.satellite - The satellite parameters.
34
34
  * @returns {Promise<void>} A promise that resolves when the authentication configuration is set.
35
35
  */
36
- export declare const setAuthConfig: ({ config: { internetIdentity }, ...rest }: {
37
- config: AuthenticationConfig;
36
+ export declare const setAuthConfig: ({ config, ...rest }: {
37
+ config: Omit<AuthenticationConfig, "createdAt" | "updatedAt">;
38
38
  satellite: SatelliteParameters;
39
- }) => Promise<void>;
39
+ }) => Promise<AuthenticationConfig>;
40
40
  /**
41
41
  * Gets the authentication configuration for a satellite.
42
42
  * @param {Object} params - The parameters for getting the authentication configuration.
@@ -46,3 +46,34 @@ export declare const setAuthConfig: ({ config: { internetIdentity }, ...rest }:
46
46
  export declare const getAuthConfig: ({ satellite }: {
47
47
  satellite: SatelliteParameters;
48
48
  }) => Promise<AuthenticationConfig | undefined>;
49
+ /**
50
+ * Gets the storage configuration for a satellite.
51
+ * @param {Object} params - The parameters for getting the storage configuration.
52
+ * @param {SatelliteParameters} params.satellite - The satellite parameters.
53
+ * @returns {Promise<StorageConfig | undefined>} A promise that resolves to the storage configuration or undefined if not found.
54
+ */
55
+ export declare const getStorageConfig: ({ satellite }: {
56
+ satellite: SatelliteParameters;
57
+ }) => Promise<StorageConfig>;
58
+ /**
59
+ * Gets the datastore configuration for a satellite.
60
+ * @param {Object} params - The parameters for getting the datastore configuration.
61
+ * @param {SatelliteParameters} params.satellite - The satellite parameters.
62
+ * @returns {Promise<AuthenticationConfig | undefined>} A promise that resolves to the datastore configuration or undefined if not found.
63
+ */
64
+ export declare const getDatastoreConfig: ({ satellite }: {
65
+ satellite: SatelliteParameters;
66
+ }) => Promise<DatastoreConfig | undefined>;
67
+ /**
68
+ * Gets all the configuration for a satellite.
69
+ * @param {Object} params - The parameters for getting the configurations.
70
+ * @param {SatelliteParameters} params.satellite - The satellite parameters.
71
+ * @returns {Promise<{storage: StorageConfig; datastore?: DatastoreConfig; auth?: AuthenticationConfig;}>} A promise that resolves to the configuration.
72
+ */
73
+ export declare const getConfig: ({ satellite }: {
74
+ satellite: SatelliteParameters;
75
+ }) => Promise<{
76
+ storage: StorageConfig;
77
+ datastore?: DatastoreConfig;
78
+ auth?: AuthenticationConfig;
79
+ }>;
@@ -0,0 +1,6 @@
1
+ import { HttpAgent } from '@dfinity/agent';
2
+ import type { ActorParameters } from '../types/actor';
3
+ export declare const createAgent: ({ identity, host, localActor }: Pick<ActorParameters, "identity"> & {
4
+ host: string;
5
+ localActor: boolean;
6
+ }) => Promise<HttpAgent>;
@@ -0,0 +1,8 @@
1
+ import type { AuthenticationConfig, DatastoreConfig, StorageConfig } from '@junobuild/config';
2
+ import type { AuthenticationConfig as AuthenticationConfigDid, DbConfig as DbConfigDid, SetAuthenticationConfig, SetDbConfig, SetStorageConfig, StorageConfig as StorageConfigDid } from '../../declarations/satellite/satellite.did';
3
+ export declare const fromStorageConfig: ({ headers: configHeaders, rewrites: configRewrites, redirects: configRedirects, iframe: configIFrame, rawAccess: configRawAccess, maxMemorySize: configMaxMemorySize, version: configVersion }: Omit<StorageConfig, "createdAt" | "updatedAt">) => SetStorageConfig;
4
+ export declare const toStorageConfig: ({ redirects: redirectsDid, iframe: iframeDid, version, raw_access: rawAccessDid, max_memory_size, updated_at, created_at, headers: headersDid, rewrites: rewritesDid }: StorageConfigDid) => StorageConfig;
5
+ export declare const fromDatastoreConfig: ({ maxMemorySize, version }: Omit<DatastoreConfig, "createdAt" | "updatedAt">) => SetDbConfig;
6
+ export declare const toDatastoreConfig: ({ version, max_memory_size, created_at, updated_at }: DbConfigDid) => DatastoreConfig;
7
+ export declare const fromAuthenticationConfig: ({ internetIdentity, rules, version }: Omit<AuthenticationConfig, "createdAt" | "updatedAt">) => SetAuthenticationConfig;
8
+ export declare const toAuthenticationConfig: ({ version, internet_identity, rules: rulesDid, created_at, updated_at }: AuthenticationConfigDid) => AuthenticationConfig;
@@ -1,3 +1,6 @@
1
1
  import type { MaxMemorySizeConfig } from '@junobuild/config';
2
2
  import type { ConfigMaxMemorySize } from '../../declarations/satellite/satellite.did';
3
3
  export declare const toMaxMemorySize: (configMaxMemorySize?: MaxMemorySizeConfig) => [] | [ConfigMaxMemorySize];
4
+ export declare const fromMaxMemorySize: (configMaxMemorySize: [] | [ConfigMaxMemorySize]) => {
5
+ maxMemorySize?: MaxMemorySizeConfig;
6
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/admin",
3
- "version": "0.6.7-next-2025-07-17.3",
3
+ "version": "0.6.8-next-2025-07-30",
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",
@@ -1,9 +0,0 @@
1
- import { HttpAgent, type ActorConfig, type ActorMethod, type ActorSubclass } from '@dfinity/agent';
2
- import type { IDL } from '@dfinity/candid';
3
- import type { ActorParameters } from '../types/actor';
4
- export declare const createActor: <T = Record<string, ActorMethod>>({ canisterId, idlFactory, config, ...rest }: {
5
- idlFactory: IDL.InterfaceFactory;
6
- canisterId: string;
7
- config?: Pick<ActorConfig, "callTransform" | "queryTransform">;
8
- } & ActorParameters) => Promise<ActorSubclass<T>>;
9
- export declare const useOrInitAgent: ({ agent, ...rest }: ActorParameters) => Promise<HttpAgent>;