@junobuild/admin 4.0.2 → 4.1.0
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 +1 -1
- package/dist/browser/index.js.map +3 -3
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +3 -3
- package/dist/types/api/satellite.api.d.ts +14 -0
- package/dist/types/services/satellite.config.services.d.ts +21 -1
- package/dist/types/services/satellite.controllers.services.d.ts +33 -0
- package/dist/types/utils/config.utils.d.ts +4 -2
- package/package.json +2 -2
|
@@ -12,6 +12,10 @@ export declare const setAuthConfig: ({ config, satellite }: {
|
|
|
12
12
|
config: SatelliteDid.SetAuthenticationConfig;
|
|
13
13
|
satellite: SatelliteParameters;
|
|
14
14
|
}) => Promise<SatelliteDid.AuthenticationConfig>;
|
|
15
|
+
export declare const setAutomationConfig: ({ config, satellite }: {
|
|
16
|
+
config: SatelliteDid.SetAutomationConfig;
|
|
17
|
+
satellite: SatelliteParameters;
|
|
18
|
+
}) => Promise<SatelliteDid.AutomationConfig>;
|
|
15
19
|
export declare const getStorageConfig: ({ satellite }: {
|
|
16
20
|
satellite: SatelliteParameters;
|
|
17
21
|
}) => Promise<SatelliteDid.StorageConfig>;
|
|
@@ -21,6 +25,9 @@ export declare const getDatastoreConfig: ({ satellite }: {
|
|
|
21
25
|
export declare const getAuthConfig: ({ satellite }: {
|
|
22
26
|
satellite: SatelliteParameters;
|
|
23
27
|
}) => Promise<[] | [SatelliteDid.AuthenticationConfig]>;
|
|
28
|
+
export declare const getAutomationConfig: ({ satellite }: {
|
|
29
|
+
satellite: SatelliteParameters;
|
|
30
|
+
}) => Promise<[] | [SatelliteDid.AutomationConfig]>;
|
|
24
31
|
export declare const getConfig: ({ satellite }: {
|
|
25
32
|
satellite: SatelliteParameters;
|
|
26
33
|
}) => Promise<SatelliteDid.Config>;
|
|
@@ -88,3 +95,10 @@ export declare const setControllers: ({ args, satellite }: {
|
|
|
88
95
|
args: SatelliteDid.SetControllersArgs;
|
|
89
96
|
satellite: SatelliteParameters;
|
|
90
97
|
}) => Promise<[Principal, SatelliteDid.Controller][]>;
|
|
98
|
+
export declare const deleteControllers: ({ args, satellite }: {
|
|
99
|
+
args: SatelliteDid.DeleteControllersArgs;
|
|
100
|
+
satellite: SatelliteParameters;
|
|
101
|
+
}) => Promise<[Principal, SatelliteDid.Controller][]>;
|
|
102
|
+
export declare const deleteControllerSelf: ({ satellite }: {
|
|
103
|
+
satellite: SatelliteParameters;
|
|
104
|
+
}) => Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AuthenticationConfig, DatastoreConfig, StorageConfig } from '@junobuild/config';
|
|
1
|
+
import type { AuthenticationConfig, AutomationConfig, DatastoreConfig, StorageConfig } from '@junobuild/config';
|
|
2
2
|
import type { SatelliteParameters } from '@junobuild/ic-client/actor';
|
|
3
3
|
/**
|
|
4
4
|
* Sets the configuration for the Storage of a Satellite.
|
|
@@ -37,6 +37,17 @@ export declare const setAuthConfig: ({ config, ...rest }: {
|
|
|
37
37
|
config: Omit<AuthenticationConfig, "createdAt" | "updatedAt">;
|
|
38
38
|
satellite: SatelliteParameters;
|
|
39
39
|
}) => Promise<AuthenticationConfig>;
|
|
40
|
+
/**
|
|
41
|
+
* Sets the automation configuration for a satellite.
|
|
42
|
+
* @param {Object} params - The parameters for setting the automation configuration.
|
|
43
|
+
* @param {Object} params.config - The automation configuration.
|
|
44
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
45
|
+
* @returns {Promise<void>} A promise that resolves when the automation configuration is set.
|
|
46
|
+
*/
|
|
47
|
+
export declare const setAutomationConfig: ({ config, ...rest }: {
|
|
48
|
+
config: Omit<AutomationConfig, "createdAt" | "updatedAt">;
|
|
49
|
+
satellite: SatelliteParameters;
|
|
50
|
+
}) => Promise<AutomationConfig>;
|
|
40
51
|
/**
|
|
41
52
|
* Gets the authentication configuration for a satellite.
|
|
42
53
|
* @param {Object} params - The parameters for getting the authentication configuration.
|
|
@@ -46,6 +57,15 @@ export declare const setAuthConfig: ({ config, ...rest }: {
|
|
|
46
57
|
export declare const getAuthConfig: ({ satellite }: {
|
|
47
58
|
satellite: SatelliteParameters;
|
|
48
59
|
}) => Promise<AuthenticationConfig | undefined>;
|
|
60
|
+
/**
|
|
61
|
+
* Gets the automation configuration for a satellite.
|
|
62
|
+
* @param {Object} params - The parameters for getting the automation configuration.
|
|
63
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
64
|
+
* @returns {Promise<AutomationConfig | undefined>} A promise that resolves to the automation configuration or undefined if not found.
|
|
65
|
+
*/
|
|
66
|
+
export declare const getAutomationConfig: ({ satellite }: {
|
|
67
|
+
satellite: SatelliteParameters;
|
|
68
|
+
}) => Promise<AutomationConfig | undefined>;
|
|
49
69
|
/**
|
|
50
70
|
* Gets the storage configuration for a satellite.
|
|
51
71
|
* @param {Object} params - The parameters for getting the storage configuration.
|
|
@@ -2,6 +2,7 @@ import type { Principal } from '@icp-sdk/core/principal';
|
|
|
2
2
|
import type { SatelliteDid, SatelliteParameters } from '@junobuild/ic-client/actor';
|
|
3
3
|
/**
|
|
4
4
|
* Lists the controllers of a satellite.
|
|
5
|
+
*
|
|
5
6
|
* @param {Object} params - The parameters for listing the controllers.
|
|
6
7
|
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
7
8
|
* @param {boolean} [params.deprecatedNoScope] - Whether to list deprecated no-scope controllers.
|
|
@@ -13,6 +14,10 @@ export declare const listSatelliteControllers: ({ deprecatedNoScope, ...params }
|
|
|
13
14
|
}) => Promise<[Principal, SatelliteDid.Controller][]>;
|
|
14
15
|
/**
|
|
15
16
|
* Sets the controllers of a satellite.
|
|
17
|
+
*
|
|
18
|
+
* Note: This only add controllers for the satellite's in-memory list, which is used for
|
|
19
|
+
* guards and access control within the satellite's features.
|
|
20
|
+
*
|
|
16
21
|
* @param {Object} params - The parameters for setting the controllers.
|
|
17
22
|
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
18
23
|
* @param {SetControllersArgs} params.args - The arguments for setting the controllers.
|
|
@@ -22,3 +27,31 @@ export declare const setSatelliteControllers: (params: {
|
|
|
22
27
|
satellite: SatelliteParameters;
|
|
23
28
|
args: SatelliteDid.SetControllersArgs;
|
|
24
29
|
}) => Promise<[Principal, SatelliteDid.Controller][]>;
|
|
30
|
+
/**
|
|
31
|
+
* Delete selected controllers from a satellite.
|
|
32
|
+
*
|
|
33
|
+
* Note: This only removes controllers from the satellite's in-memory list, which is used for
|
|
34
|
+
* guards and access control within the satellite's features.
|
|
35
|
+
*
|
|
36
|
+
* @param {Object} params - The parameters for setting the controllers.
|
|
37
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
38
|
+
* @param {SetControllersArgs} params.args - The arguments for setting the controllers.
|
|
39
|
+
* @returns {Promise<[Principal, Controller][]>} A promise that resolves to a list of controllers.
|
|
40
|
+
*/
|
|
41
|
+
export declare const deleteSatelliteControllers: (params: {
|
|
42
|
+
satellite: SatelliteParameters;
|
|
43
|
+
args: SatelliteDid.DeleteControllersArgs;
|
|
44
|
+
}) => Promise<[Principal, SatelliteDid.Controller][]>;
|
|
45
|
+
/**
|
|
46
|
+
* Delete the calling controller from the satellite.
|
|
47
|
+
*
|
|
48
|
+
* Note: This only removes the controller from the satellite's in-memory list, which is used for
|
|
49
|
+
* guards and access control within the satellite's features.
|
|
50
|
+
*
|
|
51
|
+
* @param {Object} params - The parameters for deleting the controller.
|
|
52
|
+
* @param {SatelliteParameters} params.satellite - The satellite parameters.
|
|
53
|
+
* @returns {Promise<void>} A promise that resolves when the controller is deleted.
|
|
54
|
+
*/
|
|
55
|
+
export declare const deleteSatelliteControllerSelf: (params: {
|
|
56
|
+
satellite: SatelliteParameters;
|
|
57
|
+
}) => Promise<void>;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import type { AuthenticationConfig, DatastoreConfig, StorageConfig } from '@junobuild/config';
|
|
1
|
+
import type { AuthenticationConfig, AutomationConfig, DatastoreConfig, StorageConfig } from '@junobuild/config';
|
|
2
2
|
import type { SatelliteDid } from '@junobuild/ic-client/actor';
|
|
3
3
|
export declare const fromStorageConfig: ({ headers: configHeaders, rewrites: configRewrites, redirects: configRedirects, iframe: configIFrame, rawAccess: configRawAccess, maxMemorySize: configMaxMemorySize, version: configVersion }: StorageConfig) => SatelliteDid.SetStorageConfig;
|
|
4
4
|
export declare const toStorageConfig: ({ redirects: redirectsDid, iframe: iframeDid, version, raw_access: rawAccessDid, max_memory_size, headers: headersDid, rewrites: rewritesDid }: SatelliteDid.StorageConfig) => StorageConfig;
|
|
5
5
|
export declare const fromDatastoreConfig: ({ maxMemorySize, version }: DatastoreConfig) => SatelliteDid.SetDbConfig;
|
|
6
6
|
export declare const toDatastoreConfig: ({ version, max_memory_size }: SatelliteDid.DbConfig) => DatastoreConfig;
|
|
7
|
-
export declare const fromAuthenticationConfig: ({ internetIdentity, google, rules, version }: AuthenticationConfig) => SatelliteDid.SetAuthenticationConfig;
|
|
7
|
+
export declare const fromAuthenticationConfig: ({ internetIdentity, github, google, rules, version }: AuthenticationConfig) => SatelliteDid.SetAuthenticationConfig;
|
|
8
8
|
export declare const toAuthenticationConfig: ({ version, internet_identity, openid: openIdDid, rules: rulesDid }: SatelliteDid.AuthenticationConfig) => AuthenticationConfig;
|
|
9
|
+
export declare const fromAutomationConfig: ({ github, version }: AutomationConfig) => SatelliteDid.SetAutomationConfig;
|
|
10
|
+
export declare const toAutomationConfig: ({ version, openid: openIdDid }: SatelliteDid.AutomationConfig) => AutomationConfig;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junobuild/admin",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
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",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@icp-sdk/canisters": "^3.3",
|
|
57
57
|
"@icp-sdk/core": "^5",
|
|
58
58
|
"@junobuild/config": "*",
|
|
59
|
-
"@junobuild/ic-client": "^
|
|
59
|
+
"@junobuild/ic-client": "^8",
|
|
60
60
|
"semver": "7.*",
|
|
61
61
|
"zod": "^4"
|
|
62
62
|
}
|