@imbricate/core
Version:
Imbricate Core, Notebook for Engineers
68 lines (67 loc) • 3.01 kB
TypeScript
/**
* @author WMXPY
* @namespace Common
* @description Action
*/
import type { IETF_LOCALE } from "@sudoo/locale";
import { CommonActionOutcomeSymbol, CommonOutcomeSymbol } from "./outcome";
export declare enum IMBRICATE_ORIGIN_ACTION_PARAMETER_TYPE {
STRING = "STRING"
}
export type ImbricateOriginActionParameterType = {
readonly type: IMBRICATE_ORIGIN_ACTION_PARAMETER_TYPE;
};
export type ImbricateOriginActionParameter = {
readonly parameterKey: string;
readonly parameterName: Record<IETF_LOCALE, string>;
readonly parameterDescription: Record<IETF_LOCALE, string>;
readonly parameterType: ImbricateOriginActionParameterType;
};
export declare enum IMBRICATE_ORIGIN_ACTION_APPEARANCE {
DEFAULT = "DEFAULT",
IMPORTANT = "IMPORTANT",
SUCCESS = "SUCCESS",
WARNING = "WARNING",
DANGER = "DANGER"
}
export type ImbricateOriginAction = {
readonly actionIdentifier: string;
readonly defaultLocale: IETF_LOCALE;
readonly actionName: Partial<Record<IETF_LOCALE, string>>;
readonly actionDescription: Partial<Record<IETF_LOCALE, string>>;
readonly parameters: ImbricateOriginActionParameter[];
readonly appearance?: IMBRICATE_ORIGIN_ACTION_APPEARANCE;
readonly disabled?: boolean;
};
export type ImbricateOriginActionInput = {
readonly actionIdentifier: string;
readonly parameters: Record<string, any>;
};
export type ImbricateOriginActionResultReference = {};
export type ImbricateOriginActionResultOutput = {
readonly content: string;
};
export declare enum IMBRICATE_ORIGIN_ACTION_RESULT_STATUS {
SUCCESS = "SUCCESS",
BAD_INPUT = "BAD_INPUT",
INTERNAL_ERROR = "INTERNAL_ERROR"
}
export declare const rebuildImbricateOriginActionOutcomeSymbol: (symbolDescription: string) => CommonOutcomeSymbol | CommonActionOutcomeSymbol;
export type ImbricateOriginActionOutcome = {
readonly response: IMBRICATE_ORIGIN_ACTION_RESULT_STATUS;
readonly outputs: ImbricateOriginActionResultOutput[];
readonly references: ImbricateOriginActionResultReference[];
} | CommonOutcomeSymbol | CommonActionOutcomeSymbol;
export declare const S_Common_QueryOriginActions_Stale: unique symbol;
export declare const S_Common_QueryOriginActions_Unknown: unique symbol;
export type ImbricateCommonQueryOriginActionsOutcomeSymbol = typeof S_Common_QueryOriginActions_Stale | typeof S_Common_QueryOriginActions_Unknown;
export declare const ImbricateCommonQueryOriginActionsOutcomeSymbolList: ImbricateCommonQueryOriginActionsOutcomeSymbol[];
export declare const rebuildImbricateCommonQueryOriginActionsSymbol: (symbolDescription: string) => CommonOutcomeSymbol | ImbricateCommonQueryOriginActionsOutcomeSymbol;
export type ImbricateCommonQueryOriginActionsOutcome = {
readonly actions: ImbricateOriginAction[];
readonly count: number;
} | CommonOutcomeSymbol | ImbricateCommonQueryOriginActionsOutcomeSymbol;
export type ImbricateCommonQueryOriginActionsQuery = {
readonly limit?: number;
readonly skip?: number;
};