spiff-arena/spiffworkflow-frontend/src/extension_ui_schema_interfaces.ts
jasquat f6d3bc8e73 Feature/api keys (#489)
* some initial work to support user api keys w/ burnettk

* some updates to store and use service accounts - migrations do not work in sqlite atm

* pyl

* minor tweak to the migration

* refactored user route

* this is working if returning user that created the service account

* put back migrations from main w/ burnettk

* tests pass with new migration w/ burnettk

* do not remove service account permissions on refresh_permissions w/ burnettk

* added new component to make some api calls to populate child components and routes w/ burnettk

* allow displaying extensions in configuration tab w/ burnettk

* removed service accounts controller in favor of extension and encrypt the api keys

* add fuzz to username to make deleting and recreating service accounts easier

* allow specifying the process id to use when running an extension w/ burnettk

* allow extensions to navigate to each other on form submit w/ burnettk

* removed commented out debug code

---------

Co-authored-by: jasquat <jasquat@users.noreply.github.com>
2023-09-15 10:10:57 -04:00

67 lines
1.4 KiB
TypeScript

export enum UiSchemaDisplayLocation {
header_menu_item = 'header_menu_item',
user_profile_item = 'user_profile_item',
}
export enum UiSchemaPersistenceLevel {
full = 'full',
none = 'none',
}
export interface UiSchemaLocationSpecificConfig {
highlight_on_tabs?: string[];
}
export interface UiSchemaUxElement {
label: string;
page: string;
display_location: UiSchemaDisplayLocation;
location_specific_configs?: UiSchemaLocationSpecificConfig;
}
export interface UiSchemaForm {
form_schema_filename: any;
form_ui_schema_filename: any;
form_submit_button_label?: string;
}
export interface UiSchemaAction {
api_path: string;
navigate_to_on_form_submit?: string;
persistence_level?: UiSchemaPersistenceLevel;
process_id_to_run?: string;
results_markdown_filename?: string;
search_params_to_inject?: string[];
full_api_path?: boolean;
}
export interface UiSchemaPageDefinition {
header: string;
api: string;
form?: UiSchemaForm;
markdown_instruction_filename?: string;
navigate_instead_of_post_to_api?: boolean;
navigate_to_on_form_submit?: string;
on_form_submit?: UiSchemaAction;
on_load?: UiSchemaAction;
open_links_in_new_tab?: boolean;
}
export interface UiSchemaPage {
[key: string]: UiSchemaPageDefinition;
}
export interface ExtensionUiSchema {
ux_elements?: UiSchemaUxElement[];
pages: UiSchemaPage;
}
export interface ExtensionPostBody {
extension_input: any;
ui_schema_action?: UiSchemaAction;
}