@constructor-io/constructorio-connect-cli
Version:
CLI tool to enable users to interface with the Constructor Connect Ecosystem
79 lines • 2.03 kB
TypeScript
export interface Config {
helpers: string | undefined;
environments: Array<{
environment: string;
templates: Array<{
paths: Partial<Record<TemplateType, string>>;
connection_ids: string[];
}>;
}>;
}
export interface PartialConnection {
id: string;
slug: string;
environment: string;
}
export interface Connection {
id: string;
name: string;
slug: string;
partner: string;
environment: string;
frequent_sync: boolean;
force: boolean;
notification_email?: string | null;
api_key?: string | null;
section: string;
ingestion_type?: string | null;
created_at: string;
updated_at: string;
active: boolean;
}
export type ConnectionConfigDict = Record<string, PartialConnection>;
export type PromptChoices<T> = Array<{
name: string;
value: T;
}>;
interface TemplateError {
code: "TEMPLATE_ERROR";
message?: string;
line?: number;
position?: number;
token?: string;
snippet?: string[];
}
export interface TemplateValidatorWarning {
type: string;
critical: boolean;
message: string;
}
export interface TemplateExecutionSuccessResponse {
success: true;
data: Record<string, any>;
warnings: TemplateValidatorWarning[];
}
export interface TemplateExecutionErrorResponse {
success: false;
error: TemplateError;
warnings: TemplateValidatorWarning[];
}
export declare enum CatalogFixtureType {
ITEM = "item",
VARIATION = "variation",
ITEM_GROUP = "item_group",
EXTERNAL_DATA = "external_data",
MAPPING = "mapping"
}
export declare const TemplateTypes: readonly ["item", "variation", "item_group", "grouping", "mapping"];
/**
* The unix relative path of a given template.
* With NO prefixed "/" or "./".
*
* E.g
* - staging/item/en_CA/item.jsonata
* - variation/variation.jsonata
*/
export type TemplatePath = string;
export type TemplateType = (typeof TemplateTypes)[number];
export {};
//# sourceMappingURL=types.d.ts.map