@junobuild/admin
Version:
A library for interfacing with admin features of Juno
49 lines (48 loc) • 2.83 kB
TypeScript
import type { AuthenticationConfig, DatastoreConfig, StorageConfig } from '@junobuild/config';
import type { SatelliteParameters } from '../types/actor.types';
/**
* Sets the configuration for the Storage of a Satellite.
* @param {Object} params - The parameters for setting the configuration.
* @param {Object} params.config - The storage configuration.
* @param {Array<StorageConfigHeader>} params.config.headers - The headers configuration.
* @param {Array<StorageConfigRewrite>} params.config.rewrites - The rewrites configuration.
* @param {Array<StorageConfigRedirect>} params.config.redirects - The redirects configuration.
* @param {string} params.config.iframe - The iframe configuration.
* @param {SatelliteParameters} params.satellite - The satellite parameters.
* @returns {Promise<void>} A promise that resolves when the configuration is set.
*/
export declare const setStorageConfig: ({ config: { headers: configHeaders, rewrites: configRewrites, redirects: configRedirects, iframe: configIFrame, rawAccess: configRawAccess, maxMemorySize: configMaxMemorySize }, satellite }: {
config: StorageConfig;
satellite: SatelliteParameters;
}) => Promise<void>;
/**
* Sets the datastore configuration for a satellite.
* @param {Object} params - The parameters for setting the authentication configuration.
* @param {Object} params.config - The datastore configuration.
* @param {SatelliteParameters} params.satellite - The satellite parameters.
* @returns {Promise<void>} A promise that resolves when the datastore configuration is set.
*/
export declare const setDatastoreConfig: ({ config: { maxMemorySize }, ...rest }: {
config: DatastoreConfig;
satellite: SatelliteParameters;
}) => Promise<void>;
/**
* Sets the authentication configuration for a satellite.
* @param {Object} params - The parameters for setting the authentication configuration.
* @param {Object} params.config - The authentication configuration.
* @param {SatelliteParameters} params.satellite - The satellite parameters.
* @returns {Promise<void>} A promise that resolves when the authentication configuration is set.
*/
export declare const setAuthConfig: ({ config: { internetIdentity }, ...rest }: {
config: AuthenticationConfig;
satellite: SatelliteParameters;
}) => Promise<void>;
/**
* Gets the authentication configuration for a satellite.
* @param {Object} params - The parameters for getting the authentication configuration.
* @param {SatelliteParameters} params.satellite - The satellite parameters.
* @returns {Promise<AuthenticationConfig | undefined>} A promise that resolves to the authentication configuration or undefined if not found.
*/
export declare const getAuthConfig: ({ satellite }: {
satellite: SatelliteParameters;
}) => Promise<AuthenticationConfig | undefined>;