UNPKG

@junobuild/admin

Version:

A library for interfacing with admin features of Juno

100 lines (99 loc) 5.41 kB
import type { AuthenticationConfig, AutomationConfig, DatastoreConfig, StorageConfig } from '@junobuild/config'; import type { SatelliteParameters } from '@junobuild/ic-client/actor'; /** * 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 with the applied configuration when set. */ export declare const setStorageConfig: ({ config, satellite }: { config: Omit<StorageConfig, "createdAt" | "updatedAt">; satellite: SatelliteParameters; }) => Promise<StorageConfig>; /** * 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 with the config when the datastore configuration is set. */ export declare const setDatastoreConfig: ({ config, ...rest }: { config: Omit<DatastoreConfig, "createdAt" | "updatedAt">; satellite: SatelliteParameters; }) => Promise<DatastoreConfig>; /** * 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, ...rest }: { config: Omit<AuthenticationConfig, "createdAt" | "updatedAt">; satellite: SatelliteParameters; }) => Promise<AuthenticationConfig>; /** * Sets the automation configuration for a satellite. * @param {Object} params - The parameters for setting the automation configuration. * @param {Object} params.config - The automation configuration. * @param {SatelliteParameters} params.satellite - The satellite parameters. * @returns {Promise<void>} A promise that resolves when the automation configuration is set. */ export declare const setAutomationConfig: ({ config, ...rest }: { config: Omit<AutomationConfig, "createdAt" | "updatedAt">; satellite: SatelliteParameters; }) => Promise<AutomationConfig>; /** * 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>; /** * Gets the automation configuration for a satellite. * @param {Object} params - The parameters for getting the automation configuration. * @param {SatelliteParameters} params.satellite - The satellite parameters. * @returns {Promise<AutomationConfig | undefined>} A promise that resolves to the automation configuration or undefined if not found. */ export declare const getAutomationConfig: ({ satellite }: { satellite: SatelliteParameters; }) => Promise<AutomationConfig | undefined>; /** * Gets the storage configuration for a satellite. * @param {Object} params - The parameters for getting the storage configuration. * @param {SatelliteParameters} params.satellite - The satellite parameters. * @returns {Promise<StorageConfig | undefined>} A promise that resolves to the storage configuration or undefined if not found. */ export declare const getStorageConfig: ({ satellite }: { satellite: SatelliteParameters; }) => Promise<StorageConfig>; /** * Gets the datastore configuration for a satellite. * @param {Object} params - The parameters for getting the datastore configuration. * @param {SatelliteParameters} params.satellite - The satellite parameters. * @returns {Promise<AuthenticationConfig | undefined>} A promise that resolves to the datastore configuration or undefined if not found. */ export declare const getDatastoreConfig: ({ satellite }: { satellite: SatelliteParameters; }) => Promise<DatastoreConfig | undefined>; /** * Gets all the configuration for a satellite. * @param {Object} params - The parameters for getting the configurations. * @param {SatelliteParameters} params.satellite - The satellite parameters. * @returns {Promise<{storage: StorageConfig; datastore?: DatastoreConfig; auth?: AuthenticationConfig;}>} A promise that resolves to the configuration. */ export declare const getConfig: ({ satellite }: { satellite: SatelliteParameters; }) => Promise<{ storage: StorageConfig; datastore?: DatastoreConfig; auth?: AuthenticationConfig; }>;