Skip to content

Commit

Permalink
Remove reqore, use generics instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Foxhoundn committed Aug 23, 2024
1 parent 4624595 commit 36cf55a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 2,004 deletions.
6 changes: 6 additions & 0 deletions merge
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Merge branch 'develop' into chore/types-fix
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@qoretechnologies/ts-toolkit",
"version": "0.4.6",
"version": "0.4.7",
"description": "Utility library to interact with Qorus Integration Engine & Qore Language",
"keywords": [
"qoretechnologies",
Expand Down Expand Up @@ -108,7 +108,6 @@
"webpack-node-externals": "^3.0.0"
},
"dependencies": {
"@qoretechnologies/reqore": "^0.48.4",
"async": "^3.2.4",
"cron-validator": "^1.3.1",
"js-yaml": "^4.1.0",
Expand Down
20 changes: 9 additions & 11 deletions src/types/forms.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import type { TReqoreIntent } from '@qoretechnologies/reqore/dist/constants/theme';
import type { IReqoreAutoFocusRules } from '@qoretechnologies/reqore/dist/hooks/useAutoFocus';
import { IQorusExpression } from './expressions';
import { TQorusType } from './qorus';

Expand All @@ -20,10 +18,10 @@ export type TQorusForm =

export type TQorusFlatForm = Record<string, any>;

export interface IQorusFormFieldMessage {
export interface IQorusFormFieldMessage<Intent> {
title?: string;
content: string;
intent?: TReqoreIntent;
intent?: Intent;
}

export interface IQorusAllowedValue {
Expand All @@ -33,7 +31,7 @@ export interface IQorusAllowedValue {
value: unknown;
}

export interface IQorusFormFieldSchema {
export interface IQorusFormFieldSchema<Intent, FocusRules> {
type: TQorusType | TQorusType[];
element_type?: TQorusType;
value?: unknown | IQorusExpression;
Expand All @@ -47,7 +45,7 @@ export interface IQorusFormFieldSchema {

allowed_values?: IQorusAllowedValue[];
allowed_schemes?: IQorusAllowedValue[];
arg_schema?: IQorusFormSchema;
arg_schema?: IQorusFormSchema<Intent, FocusRules>;

supports_templates?: boolean;
supports_references?: boolean;
Expand All @@ -68,12 +66,12 @@ export interface IQorusFormFieldSchema {
disabled?: boolean;
readonly?: boolean;

intent?: TReqoreIntent;
intent?: Intent;
metadata?: Record<string, any>;
rules?: ['valid_identifier'];

messages?: IQorusFormFieldMessage[];
focusRules?: IReqoreAutoFocusRules;
messages?: IQorusFormFieldMessage<Intent>[];
focusRules?: FocusRules;
markdown?: boolean;

get_message?: {
Expand All @@ -92,8 +90,8 @@ export interface IQorusFormFieldSchema {
};
}

export interface IQorusFormSchema {
[optionName: string]: IQorusFormFieldSchema;
export interface IQorusFormSchema<Intent, FocusRules> {
[optionName: string]: IQorusFormFieldSchema<Intent, FocusRules>;
}

export interface IQorusFormOperator {
Expand Down
Loading

0 comments on commit 36cf55a

Please sign in to comment.