creo-flow-extensions-base 1.2.0-dev.10 → 1.2.0-dev.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,4 @@
1
1
  import { ICreateExtensionParams } from './interfaces';
2
2
  export * from './enum/ExtensionTypes';
3
- export * from './enum/ContextMode';
4
3
  export * from './interfaces';
5
4
  export declare const createExtension: (extension: ICreateExtensionParams) => ICreateExtensionParams;
@@ -16,7 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.createExtension = void 0;
18
18
  __exportStar(require("./enum/ExtensionTypes"), exports);
19
- __exportStar(require("./enum/ContextMode"), exports);
20
19
  __exportStar(require("./interfaces"), exports);
21
20
  const createExtension = (extension) => {
22
21
  return extension;
@@ -2,7 +2,6 @@ import { IMethodSchema } from '../../method';
2
2
  import { Field } from '../../fields';
3
3
  import { IConnectionSchema } from '../../connection';
4
4
  import { ExtensionTypes } from '../enum/ExtensionTypes';
5
- import { ContextMode } from '../enum/ContextMode';
6
5
  export interface ICreateExtensionParams {
7
6
  methods: IMethodSchema<readonly Field[], readonly Field[]>[];
8
7
  connections?: IConnectionSchema<readonly Field[]>[];
@@ -12,18 +11,4 @@ export interface ICreateExtensionParams {
12
11
  version: string;
13
12
  icon: string;
14
13
  type: ExtensionTypes;
15
- /**
16
- * Context processing mode used by this extension.
17
- *
18
- * - `ContextMode.SIMPLIFIED` — the platform automatically parses the context
19
- * and passes a simplified, small context payload to the extension
20
- * (maximum size: less than 0.1 MB). Use this when you do not need to
21
- * handle large or highly customized context structures.
22
- *
23
- * - `ContextMode.MANUAL` — the context is passed as a separate raw object
24
- * and must be parsed manually inside the extension. In this mode, the
25
- * context object is also forwarded to the extension method, allowing more
26
- * flexible handling of complex or large context payloads.
27
- */
28
- contextMode: ContextMode;
29
14
  }
@@ -1,6 +1,6 @@
1
1
  import { FieldTypes } from '../enum';
2
2
  import { IBaseField } from '../interfaces';
3
3
  export interface ICodeField extends IBaseField {
4
- language: 'javascript' | 'python';
4
+ language: 'javascript' | 'python' | 'json';
5
5
  type: FieldTypes.CODE;
6
6
  }
@@ -6,7 +6,8 @@ export declare enum FieldTypes {
6
6
  AUTOCOMPLETE = "autocomplete",
7
7
  DYNAMIC_FIELDS_LIST = "dynamicFieldsList",
8
8
  FIELDS_GROUP = "fieldsListGroup",
9
- COLLAPSIBLE_FIELDS_LIST = "collapsibleFieldsList"
9
+ COLLAPSIBLE_FIELDS_LIST = "collapsibleFieldsList",
10
+ TEXTAREA = "textarea"
10
11
  }
11
12
  export declare enum ContentType {
12
13
  STRING = "string",
@@ -11,6 +11,7 @@ var FieldTypes;
11
11
  FieldTypes["DYNAMIC_FIELDS_LIST"] = "dynamicFieldsList";
12
12
  FieldTypes["FIELDS_GROUP"] = "fieldsListGroup";
13
13
  FieldTypes["COLLAPSIBLE_FIELDS_LIST"] = "collapsibleFieldsList";
14
+ FieldTypes["TEXTAREA"] = "textarea";
14
15
  })(FieldTypes || (exports.FieldTypes = FieldTypes = {}));
15
16
  var ContentType;
16
17
  (function (ContentType) {
@@ -5,6 +5,7 @@ import { ICodeField } from './code';
5
5
  import { ICollapsibleFieldsList } from './collapsibleFieldsList';
6
6
  import { IDynamicFieldsList } from './dynamicFieldsList';
7
7
  import { IFieldsGroup } from './fieldsGroup';
8
+ import { ITextareaField } from './textarea';
8
9
  export * from './enum';
9
- export type Field = IInputField | ISelectField | ICheckboxField | ICodeField | ICollapsibleFieldsList | IDynamicFieldsList | IFieldsGroup;
10
+ export type Field = IInputField | ISelectField | ICheckboxField | ICodeField | ICollapsibleFieldsList | IDynamicFieldsList | IFieldsGroup | ITextareaField;
10
11
  export declare function createFields<const T extends readonly Field[]>(fields: T & Field[]): T;
@@ -0,0 +1,5 @@
1
+ import { FieldTypes } from '../enum';
2
+ import { IBaseField } from '../interfaces';
3
+ export interface ITextareaField extends IBaseField {
4
+ type: FieldTypes.TEXTAREA;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -11,12 +11,8 @@ export interface IMethodSchema<T extends readonly Field[], C extends readonly Fi
11
11
  * Executes the method logic.
12
12
  *
13
13
  * @param args - Aggregated field values and default execution arguments.
14
- * @param context - Optional raw context object. This value is provided
15
- * when the extension is configured to use manual
16
- * context mode and must be parsed manually inside
17
- * the extension method implementation.
18
14
  */
19
- execute: (args: FieldNameMap<T> & FieldNameMap<C> & IDefaultExecutionArgs, context?: SafeAny) => S;
15
+ execute: (args: FieldNameMap<T> & FieldNameMap<C> & IDefaultExecutionArgs) => S;
20
16
  }
21
17
  export declare function createMethodSchema<const T extends readonly Field[], const C extends readonly Field[] = [], S = SafeAny>(schema: {
22
18
  label: string;
@@ -27,10 +23,6 @@ export declare function createMethodSchema<const T extends readonly Field[], con
27
23
  * Executes the method logic.
28
24
  *
29
25
  * @param args - Aggregated field values and default execution arguments.
30
- * @param context - Optional raw context object. This value is provided
31
- * when the extension is configured to use manual
32
- * context mode and must be parsed manually inside
33
- * the extension method implementation.
34
26
  */
35
- execute: (args: FieldNameMap<T> & FieldNameMap<C> & IDefaultExecutionArgs, context?: SafeAny) => S;
27
+ execute: (args: FieldNameMap<T> & FieldNameMap<C> & IDefaultExecutionArgs) => S;
36
28
  }): IMethodSchema<T, C, S>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creo-flow-extensions-base",
3
- "version": "1.2.0-dev.10",
3
+ "version": "1.2.0-dev.12",
4
4
  "main": "lib/index.js",
5
5
  "repository": "git@github.com:CloudDataHub/creo-flow-extension-base.git",
6
6
  "author": "Naum Zakletskyi",
@@ -1,19 +0,0 @@
1
- /**
2
- * Defines how the extension receives and processes context.
3
- *
4
- * - `SIMPLIFIED` — the platform automatically parses the context and passes
5
- * a pre-processed, small context payload to the extension.
6
- * This mode supports only small context sizes (less than 0.1 MB).
7
- * Use this mode when you want a simple setup and do not need to handle
8
- * large or highly customized context structures.
9
- *
10
- * - `MANUAL` — the context is delivered to the extension as a separate,
11
- * raw object and must be parsed manually inside the extension.
12
- * In this mode, the `context` object is also passed directly into the
13
- * extension method, giving you more flexibility and control over how the
14
- * context is interpreted, transformed, and used.
15
- */
16
- export declare enum ContextMode {
17
- SIMPLIFIED = "simplified",
18
- MANUAL = "manual"
19
- }
@@ -1,23 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContextMode = void 0;
4
- /**
5
- * Defines how the extension receives and processes context.
6
- *
7
- * - `SIMPLIFIED` — the platform automatically parses the context and passes
8
- * a pre-processed, small context payload to the extension.
9
- * This mode supports only small context sizes (less than 0.1 MB).
10
- * Use this mode when you want a simple setup and do not need to handle
11
- * large or highly customized context structures.
12
- *
13
- * - `MANUAL` — the context is delivered to the extension as a separate,
14
- * raw object and must be parsed manually inside the extension.
15
- * In this mode, the `context` object is also passed directly into the
16
- * extension method, giving you more flexibility and control over how the
17
- * context is interpreted, transformed, and used.
18
- */
19
- var ContextMode;
20
- (function (ContextMode) {
21
- ContextMode["SIMPLIFIED"] = "simplified";
22
- ContextMode["MANUAL"] = "manual";
23
- })(ContextMode || (exports.ContextMode = ContextMode = {}));