@grouparoo/core
Version:
The Grouparoo Core
186 lines (185 loc) • 5.8 kB
TypeScript
import { ParamsFrom } from "actionhero";
import { AuthenticatedAction } from "../classes/actions/authenticatedAction";
import { ActionPermission } from "../models/Permission";
import { APIData } from "../modules/apiData";
export declare class ApiKeysList extends AuthenticatedAction {
name: string;
description: string;
outputExample: {};
permission: ActionPermission;
inputs: {
readonly limit: {
readonly required: true;
readonly default: 100;
readonly formatter: typeof APIData.ensureNumber;
};
readonly offset: {
readonly required: true;
readonly default: 0;
readonly formatter: typeof APIData.ensureNumber;
};
};
runWithinTransaction({ params }: {
params: ParamsFrom<ApiKeysList>;
}): Promise<{
total: number;
apiKeys: {
id: string;
name: string;
apiKey: string;
locked: string;
permissionAllRead: boolean;
permissionAllWrite: boolean;
permissions: {
id: string;
topic: "file" | "record" | "source" | "group" | "import" | "system" | "run" | "resque" | "log" | "model" | "app" | "property" | "export" | "destination" | "apiKey" | "notification" | "setupStep" | "team";
read: boolean;
write: boolean;
locked: string;
}[];
createdAt: number;
updatedAt: number;
}[];
}>;
}
export declare class ApiKeyCreate extends AuthenticatedAction {
name: string;
description: string;
outputExample: {};
permission: ActionPermission;
inputs: {
readonly name: {
readonly required: true;
};
readonly permissionAllRead: {
readonly required: false;
};
readonly permissionAllWrite: {
readonly required: false;
};
readonly permissions: {
readonly required: false;
readonly formatter: typeof APIData.ensureArray;
};
};
runWithinTransaction({ params }: {
params: ParamsFrom<ApiKeyCreate>;
}): Promise<{
apiKey: {
id: string;
name: string;
apiKey: string;
locked: string;
permissionAllRead: boolean;
permissionAllWrite: boolean;
permissions: {
id: string;
topic: "file" | "record" | "source" | "group" | "import" | "system" | "run" | "resque" | "log" | "model" | "app" | "property" | "export" | "destination" | "apiKey" | "notification" | "setupStep" | "team";
read: boolean;
write: boolean;
locked: string;
}[];
createdAt: number;
updatedAt: number;
};
}>;
}
export declare class ApiKeyEdit extends AuthenticatedAction {
name: string;
description: string;
outputExample: {};
permission: ActionPermission;
inputs: {
id: {
required: true;
};
name: {
required: boolean;
};
permissionAllRead: {
required: boolean;
};
permissionAllWrite: {
required: boolean;
};
disabledPermissionAllRead: {
required: boolean;
};
disabledPermissionAllWrite: {
required: boolean;
};
permissions: {
required: boolean;
formatter: typeof APIData.ensureArray;
};
};
runWithinTransaction({ params }: {
params: ParamsFrom<ApiKeyEdit>;
}): Promise<{
apiKey: {
id: string;
name: string;
apiKey: string;
locked: string;
permissionAllRead: boolean;
permissionAllWrite: boolean;
permissions: {
id: string;
topic: "file" | "record" | "source" | "group" | "import" | "system" | "run" | "resque" | "log" | "model" | "app" | "property" | "export" | "destination" | "apiKey" | "notification" | "setupStep" | "team";
read: boolean;
write: boolean;
locked: string;
}[];
createdAt: number;
updatedAt: number;
};
}>;
}
export declare class ApiKeyView extends AuthenticatedAction {
name: string;
description: string;
outputExample: {};
permission: ActionPermission;
inputs: {
readonly id: {
readonly required: true;
};
};
runWithinTransaction({ params }: {
params: ParamsFrom<ApiKeyView>;
}): Promise<{
apiKey: {
id: string;
name: string;
apiKey: string;
locked: string;
permissionAllRead: boolean;
permissionAllWrite: boolean;
permissions: {
id: string;
topic: "file" | "record" | "source" | "group" | "import" | "system" | "run" | "resque" | "log" | "model" | "app" | "property" | "export" | "destination" | "apiKey" | "notification" | "setupStep" | "team";
read: boolean;
write: boolean;
locked: string;
}[];
createdAt: number;
updatedAt: number;
};
}>;
}
export declare class ApiKeyDestroy extends AuthenticatedAction {
name: string;
description: string;
outputExample: {};
permission: ActionPermission;
inputs: {
readonly id: {
readonly required: true;
};
};
runWithinTransaction({ params, }: {
params: ParamsFrom<ApiKeyDestroy>;
}): Promise<{
success: boolean;
}>;
}