@devtron-labs/devtron-fe-common-lib 1.2.4-beta-3 → 1.2.4-beta-5

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.
Files changed (27) hide show
  1. package/dist/{@code-editor-DT9fzrvW.js → @code-editor-CTMrJ4TQ.js} +3282 -3191
  2. package/dist/{@common-rjsf-DJXsw-P3.js → @common-rjsf-CQOy6buw.js} +1 -1
  3. package/dist/Common/CIPipeline.Types.d.ts +26 -1
  4. package/dist/Common/Constants.d.ts +1 -1
  5. package/dist/Common/CustomTagSelector/Types.d.ts +0 -12
  6. package/dist/Common/Helper.d.ts +1 -2
  7. package/dist/Common/RJSF/Form.d.ts +1 -1
  8. package/dist/Common/Types.d.ts +2 -20
  9. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/index.d.ts +1 -0
  10. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/services.d.ts +10 -0
  11. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/index.d.ts +1 -0
  12. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/services.d.ts +11 -0
  13. package/dist/Pages/Applications/DevtronApps/Details/index.d.ts +1 -0
  14. package/dist/Shared/Components/DynamicDataTable/DynamicDataTable.d.ts +1 -1
  15. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableHeader.d.ts +1 -1
  16. package/dist/Shared/Components/DynamicDataTable/DynamicDataTableRow.d.ts +1 -1
  17. package/dist/Shared/Components/DynamicDataTable/types.d.ts +22 -17
  18. package/dist/Shared/Components/DynamicDataTable/utils.d.ts +3 -3
  19. package/dist/Shared/Components/FileUpload/FileUpload.d.ts +2 -0
  20. package/dist/Shared/Components/FileUpload/index.d.ts +2 -0
  21. package/dist/Shared/Components/FileUpload/types.d.ts +8 -0
  22. package/dist/Shared/Components/index.d.ts +1 -0
  23. package/dist/Shared/types.d.ts +31 -19
  24. package/dist/assets/@code-editor.css +1 -1
  25. package/dist/assets/ic-cloud-upload.18066e05.svg +1 -0
  26. package/dist/index.js +247 -246
  27. package/package.json +1 -1
@@ -2,7 +2,7 @@ import { j as n, J as A } from "./@vendor-RU8AW1bK.js";
2
2
  import E, { forwardRef as $ } from "react";
3
3
  import L, { getDefaultRegistry as k } from "@rjsf/core";
4
4
  import D from "@rjsf/validator-ajv8";
5
- import { T as y, c as H, a as J, d as w } from "./@code-editor-DT9fzrvW.js";
5
+ import { T as y, c as H, a as J, d as w } from "./@code-editor-CTMrJ4TQ.js";
6
6
  import M, { components as O } from "react-select";
7
7
  import { getUiOptions as B, getTemplate as I, getSubmitButtonOptions as U, ADDITIONAL_PROPERTY_FLAG as P, errorId as W, englishStringTranslator as V, TranslatableString as q, titleId as K, canExpand as Y, deepEquals as z } from "@rjsf/utils";
8
8
  import { ReactComponent as G } from "./assets/ic-chevron-down.fc70d7a7.svg";
@@ -70,11 +70,30 @@ export declare enum RefVariableStageType {
70
70
  PRE_CI = "PRE_CI",
71
71
  POST_CI = "POST_CI"
72
72
  }
73
+ export interface FileProperty {
74
+ allowedExtensions: string[];
75
+ maxUploadSize: number;
76
+ }
77
+ export interface Constraint {
78
+ fileProperty: FileProperty;
79
+ }
80
+ export interface ValueConstraint {
81
+ choices: string[];
82
+ blockCustomValue: boolean;
83
+ constraint: Constraint;
84
+ }
85
+ export declare enum VariableTypeFormat {
86
+ STRING = "STRING",
87
+ NUMBER = "NUMBER",
88
+ BOOL = "BOOL",
89
+ DATE = "DATE",
90
+ FILE = "FILE"
91
+ }
73
92
  export interface VariableType {
74
93
  id: number;
75
94
  name: string;
76
95
  value: string;
77
- format: string;
96
+ format: VariableTypeFormat;
78
97
  description: string;
79
98
  defaultValue: string;
80
99
  allowEmptyValue: boolean;
@@ -83,6 +102,12 @@ export interface VariableType {
83
102
  refVariableName: string;
84
103
  refVariableStage?: RefVariableStageType;
85
104
  variableStepIndexInPlugin?: number;
105
+ fileMountDir: string;
106
+ fileReferenceId: number;
107
+ valueConstraintId: number;
108
+ valueConstraint: ValueConstraint;
109
+ isRuntimeArg: boolean;
110
+ refVariableUsed: boolean;
86
111
  }
87
112
  interface CommandArgsMap {
88
113
  command: string;
@@ -12,7 +12,6 @@ export declare const DOCUMENTATION: {
12
12
  GLOBAL_CONFIG_BUILD_INFRA: string;
13
13
  };
14
14
  export declare const PATTERNS: {
15
- STRING: RegExp;
16
15
  KUBERNETES_KEY_PREFIX: RegExp;
17
16
  KUBERNETES_KEY_NAME: RegExp;
18
17
  START_END_ALPHANUMERIC: RegExp;
@@ -95,6 +94,7 @@ export declare const ROUTES: {
95
94
  USER_LIST_MIN: string;
96
95
  CONFIG_DATA: string;
97
96
  K8S_RESOURCE_LIST: string;
97
+ FILE_UPLOAD: string;
98
98
  };
99
99
  export declare enum KEY_VALUE {
100
100
  KEY = "key",
@@ -5,16 +5,6 @@ export interface SuggestedTagOptionType extends OptionType {
5
5
  description: string;
6
6
  propagate: boolean;
7
7
  }
8
- export declare enum DeploymentPolicy {
9
- ALLOW = "allow",
10
- BLOCK = "block",
11
- BLOCK_PROD = "block-prod",
12
- BLOCK_NON_PROD = "block-non-prod"
13
- }
14
- export interface VariableValueConstraintTypes {
15
- choices?: string[];
16
- blockCustomValue?: boolean;
17
- }
18
8
  export interface TagType {
19
9
  id?: number;
20
10
  key: string;
@@ -26,8 +16,6 @@ export interface TagType {
26
16
  isInvalidValue?: boolean;
27
17
  isSuggested?: boolean;
28
18
  isPropagateDisabled?: boolean;
29
- deploymentPolicy?: DeploymentPolicy;
30
- valueConstraint?: VariableValueConstraintTypes;
31
19
  }
32
20
  export interface TagErrorType {
33
21
  isValid: boolean;
@@ -1,6 +1,6 @@
1
1
  import { default as React, SyntheticEvent } from 'react';
2
2
  import { JSONPathOptions } from 'jsonpath-plus';
3
- import { AsyncOptions, DeploymentNodeType, UseSearchString } from './Types';
3
+ import { AsyncOptions, UseSearchString } from './Types';
4
4
  import { scrollableInterface } from '../Shared';
5
5
  export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
6
6
  interface ConditionalWrapper<T> {
@@ -133,5 +133,4 @@ export declare const getSanitizedIframe: (iframeString: string) => string;
133
133
  * This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
134
134
  */
135
135
  export declare const getIframeWithDefaultAttributes: (iframeString: string, defaultName?: string) => string;
136
- export declare const getStageTitle: (stageType: DeploymentNodeType) => string;
137
136
  export {};
@@ -1,3 +1,3 @@
1
1
  import { default as RJSF } from '@rjsf/core';
2
2
  import { FormProps } from './types';
3
- export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "children" | "className" | "disabled" | "id" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "target" | "action" | "tagName" | "autoComplete" | "method" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
3
+ export declare const RJSFForm: import('react').ForwardRefExoticComponent<Pick<FormProps, "name" | "id" | "children" | "className" | "disabled" | "onFocus" | "onBlur" | "onChange" | "onSubmit" | "onError" | "target" | "action" | "tagName" | "autoComplete" | "method" | "noValidate" | "readonly" | "schema" | "uiSchema" | "formContext" | "formData" | "idPrefix" | "idSeparator" | "fields" | "templates" | "widgets" | "translateString" | "acceptcharset" | "acceptCharset" | "enctype" | "customValidate" | "extraErrors" | "extraErrorsBlockSubmit" | "noHtml5Validate" | "liveValidate" | "liveOmit" | "omitExtraData" | "showErrorList" | "transformErrors" | "focusOnFirstError" | "experimental_defaultFormStateBehavior" | "_internalFormWrapper"> & import('react').RefAttributes<RJSF<unknown, import('json-schema').JSONSchema7, import('@rjsf/utils').GenericObjectType>>>;
@@ -3,7 +3,7 @@ import { TippyProps } from '@tippyjs/react';
3
3
  import { Placement } from 'tippy.js';
4
4
  import { UserGroupDTO } from '../Pages/GlobalConfigurations';
5
5
  import { ImageComment, ReleaseTag } from './ImageTags.Types';
6
- import { MandatoryPluginBaseStateType, PolicyBlockInfo, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
6
+ import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity } from '../Shared';
7
7
  import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
8
8
  /**
9
9
  * Generic response type object with support for overriding the result type
@@ -432,10 +432,6 @@ export interface CDMaterialType {
432
432
  * Would currently only be received in case of release
433
433
  */
434
434
  appWorkflowId: number;
435
- /**
436
- * Denotes trigger blocking due to mandatory tags, (might be used for plugins and other features in future)
437
- */
438
- deploymentBlockedState?: PolicyBlockInfo;
439
435
  }
440
436
  export declare enum CDMaterialServiceEnum {
441
437
  ROLLBACK = "rollback",
@@ -472,14 +468,6 @@ export interface DownstreamNodesEnvironmentsType {
472
468
  environmentId: number;
473
469
  environmentName: string;
474
470
  }
475
- export declare enum TriggerBlockType {
476
- MANDATORY_TAG = "mandatory-tags",
477
- MANDATORY_PLUGIN = "mandatory-plugins"
478
- }
479
- export interface TriggerBlockedInfo {
480
- blockedBy: TriggerBlockType;
481
- blockedReason?: string;
482
- }
483
471
  export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTriggerBlocked' | 'pluginBlockState'> {
484
472
  connectingCiPipelineId?: number;
485
473
  parents: string | number[] | string[];
@@ -542,7 +530,6 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
542
530
  downstreamEnvironments?: DownstreamNodesEnvironmentsType[];
543
531
  cipipelineId?: number;
544
532
  isDeploymentBlocked?: boolean;
545
- triggerBlockedInfo?: TriggerBlockedInfo;
546
533
  }
547
534
  export declare enum DeploymentAppTypes {
548
535
  HELM = "helm",
@@ -605,8 +592,7 @@ export interface CDMaterialsMetaInfo {
605
592
  * This is the ID of user that has request the material
606
593
  */
607
594
  requestedUserId: number;
608
- runtimeParams: RuntimeParamsListItemType[];
609
- deploymentBlockedState?: PolicyBlockInfo;
595
+ runtimeParams: RuntimePluginVariables[];
610
596
  }
611
597
  export interface ImagePromotionMaterialInfo {
612
598
  isApprovalPendingForPromotion: boolean;
@@ -689,7 +675,6 @@ export interface CDStage {
689
675
  name: string;
690
676
  triggerType: 'AUTOMATIC' | 'MANUAL';
691
677
  config: string;
692
- triggerBlockedInfo?: TriggerBlockedInfo;
693
678
  }
694
679
  export interface CDStageConfigMapSecretNames {
695
680
  configMaps: any[];
@@ -701,7 +686,6 @@ export interface PrePostDeployStageType extends MandatoryPluginBaseStateType {
701
686
  triggerType: string;
702
687
  name: string;
703
688
  status: string;
704
- triggerBlockedInfo?: TriggerBlockedInfo;
705
689
  }
706
690
  export interface CdPipeline {
707
691
  id: number;
@@ -735,8 +719,6 @@ export interface CdPipeline {
735
719
  isProdEnv?: boolean;
736
720
  isGitOpsRepoNotConfigured?: boolean;
737
721
  isDeploymentBlocked?: boolean;
738
- isTriggerBlocked?: boolean;
739
- triggerBlockedInfo?: TriggerBlockedInfo;
740
722
  }
741
723
  export interface ExternalCiConfig {
742
724
  id: number;
@@ -1 +1,2 @@
1
1
  export * from './types';
2
+ export * from './services';
@@ -0,0 +1,10 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { UploadFileDTO } from '../../../../../Shared/types';
3
+ export declare const uploadCDPipelineFile: ({ file, appId, envId, allowedExtensions, maxUploadSize, abortControllerRef, }: {
4
+ file: File[];
5
+ appId: number;
6
+ envId: number;
7
+ allowedExtensions?: string[];
8
+ maxUploadSize?: number;
9
+ abortControllerRef?: MutableRefObject<AbortController>;
10
+ }) => Promise<UploadFileDTO>;
@@ -0,0 +1 @@
1
+ export * from './services';
@@ -0,0 +1,11 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { UploadFileDTO } from '../../../../../Shared/types';
3
+ export declare const uploadCIPipelineFile: ({ file, appId, ciPipelineId, envId, allowedExtensions, maxUploadSize, abortControllerRef, }: {
4
+ file: File[];
5
+ appId: number;
6
+ ciPipelineId: number;
7
+ envId?: number;
8
+ allowedExtensions?: string[];
9
+ maxUploadSize?: number;
10
+ abortControllerRef?: MutableRefObject<AbortController>;
11
+ }) => Promise<UploadFileDTO>;
@@ -1,2 +1,3 @@
1
1
  export * from './AppConfigurations';
2
2
  export * from './CDPipeline';
3
+ export * from './CIPipeline';
@@ -1,2 +1,2 @@
1
1
  import { DynamicDataTableProps } from './types';
2
- export declare const DynamicDataTable: <K extends string>({ headers, ...props }: DynamicDataTableProps<K>) => JSX.Element;
2
+ export declare const DynamicDataTable: <K extends string, CustomStateType = Record<string, unknown>>({ headers, ...props }: DynamicDataTableProps<K, CustomStateType>) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { DynamicDataTableHeaderProps } from './types';
2
- export declare const DynamicDataTableHeader: <K extends string>({ headers, rows, sortingConfig, onRowAdd, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, headerComponent, actionButtonConfig, }: DynamicDataTableHeaderProps<K>) => JSX.Element;
2
+ export declare const DynamicDataTableHeader: <K extends string, CustomStateType = Record<string, unknown>>({ headers, rows, sortingConfig, onRowAdd, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, headerComponent, actionButtonConfig, }: DynamicDataTableHeaderProps<K, CustomStateType>) => JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { DynamicDataTableRowProps } from './types';
2
- export declare const DynamicDataTableRow: <K extends string>({ rows, headers, maskValue, readOnly, isAdditionNotAllowed, isDeletionNotAllowed, validationSchema, showError, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, buttonCellWrapComponent, }: DynamicDataTableRowProps<K>) => JSX.Element;
2
+ export declare const DynamicDataTableRow: <K extends string, CustomStateType = Record<string, unknown>>({ rows, headers, maskValue, readOnly, isDeletionNotAllowed, validationSchema, showError, actionButtonConfig, onRowEdit, onRowDelete, leadingCellIcon, trailingCellIcon, buttonCellWrapComponent, }: DynamicDataTableRowProps<K, CustomStateType>) => JSX.Element;
@@ -1,9 +1,9 @@
1
1
  import { DetailedHTMLProps, ReactElement, ReactNode } from 'react';
2
2
  import { SortingOrder } from '../../../Common/Constants';
3
3
  import { ResizableTagTextAreaProps } from '../../../Common/CustomTagSelector';
4
- import { InfoIconTippyProps } from '../../../Common/Types';
5
4
  import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
6
5
  import { SelectTextAreaProps } from '../SelectTextArea';
6
+ import { FileUploadProps } from '../FileUpload';
7
7
  /**
8
8
  * Interface representing header for a dynamic data table.
9
9
  * @template K - A string representing the key type.
@@ -19,14 +19,13 @@ export type DynamicDataTableHeaderType<K extends string> = {
19
19
  isSortable?: boolean;
20
20
  /** An optional boolean to control the visibility of the column. */
21
21
  isHidden?: boolean;
22
- /** An optional boolean to show the column */
23
- renderHelpTextForHeader?: () => ReactNode;
24
22
  };
25
23
  export declare enum DynamicDataTableRowDataType {
26
24
  TEXT = "text",
27
25
  DROPDOWN = "dropdown",
28
26
  SELECT_TEXT = "select-text",
29
- BUTTON = "button"
27
+ BUTTON = "button",
28
+ FILE_UPLOAD = "file-upload"
30
29
  }
31
30
  export type DynamicDataTableCellPropsMap = {
32
31
  [DynamicDataTableRowDataType.TEXT]: Omit<ResizableTagTextAreaProps, 'className' | 'minHeight' | 'maxHeight' | 'value' | 'onChange' | 'disabled' | 'disableOnBlurResizeToMinHeight' | 'refVar' | 'dependentRef'>;
@@ -38,6 +37,7 @@ export type DynamicDataTableCellPropsMap = {
38
37
  icon?: ReactNode;
39
38
  text: string;
40
39
  };
40
+ [DynamicDataTableRowDataType.FILE_UPLOAD]: Omit<FileUploadProps, 'className' | 'fileName' | 'onUpload' | 'multiple'>;
41
41
  };
42
42
  type DynamicDataTableCellData<T extends keyof DynamicDataTableCellPropsMap = keyof DynamicDataTableCellPropsMap> = T extends keyof DynamicDataTableCellPropsMap ? {
43
43
  type: T;
@@ -54,23 +54,27 @@ export type DynamicDataTableRowType<K extends string, CustomStateType = Record<s
54
54
  disabled?: boolean;
55
55
  /** An optional boolean indicating if an asterisk should be shown. */
56
56
  required?: boolean;
57
+ /** An optional tooltip text to show when hovering over cell. */
58
+ tooltipText?: string;
57
59
  } & DynamicDataTableCellData;
58
60
  };
59
61
  id: string | number;
60
62
  /** */
61
63
  customState?: CustomStateType;
64
+ /** An optional boolean indicating if row deletion is disabled. */
65
+ disableDelete?: boolean;
62
66
  };
63
67
  type DynamicDataTableMask<K extends string> = {
64
68
  [key in K]?: boolean;
65
69
  };
66
- type DynamicDataTableCellIcon<K extends string> = {
67
- [key in K]?: (row: DynamicDataTableRowType<K>) => ReactNode;
70
+ type DynamicDataTableCellIcon<K extends string, CustomStateType = Record<string, unknown>> = {
71
+ [key in K]?: (row: DynamicDataTableRowType<K, CustomStateType>) => ReactNode;
68
72
  };
69
73
  /**
70
74
  * Interface representing the properties for the dynamic data table component.
71
75
  * @template K - A string representing the key type.
72
76
  */
73
- export type DynamicDataTableProps<K extends string> = {
77
+ export type DynamicDataTableProps<K extends string, CustomStateType = Record<string, unknown>> = {
74
78
  /**
75
79
  * An array containing the headers for the data table. \
76
80
  * Each header defines a column with its label, key, width, and optional settings.
@@ -79,7 +83,7 @@ export type DynamicDataTableProps<K extends string> = {
79
83
  /**
80
84
  * An array of rows where each row contains data corresponding to the table headers.
81
85
  */
82
- rows: DynamicDataTableRowType<K>[];
86
+ rows: DynamicDataTableRowType<K, CustomStateType>[];
83
87
  /** Optional configuration for sorting the table. */
84
88
  sortingConfig?: {
85
89
  sortBy: K;
@@ -89,11 +93,11 @@ export type DynamicDataTableProps<K extends string> = {
89
93
  /** An optional mask to hide the values of the cell. */
90
94
  maskValue?: DynamicDataTableMask<K>;
91
95
  /** Optional configuration for displaying an icon in the leading position of a cell. */
92
- leadingCellIcon?: DynamicDataTableCellIcon<K>;
96
+ leadingCellIcon?: DynamicDataTableCellIcon<K, CustomStateType>;
93
97
  /** Optional configuration for displaying an icon in the trailing position of a cell. */
94
- trailingCellIcon?: DynamicDataTableCellIcon<K>;
98
+ trailingCellIcon?: DynamicDataTableCellIcon<K, CustomStateType>;
95
99
  /** An optional function to render a custom wrapper component for the type `DynamicDataTableRowDataType.BUTTON`. */
96
- buttonCellWrapComponent?: (row: DynamicDataTableRowType<K>) => ReactElement;
100
+ buttonCellWrapComponent?: (row: DynamicDataTableRowType<K, CustomStateType>) => ReactElement;
97
101
  /** An optional React node for a custom header component. */
98
102
  headerComponent?: ReactNode;
99
103
  /** When true, data addition field will not be shown. */
@@ -111,14 +115,15 @@ export type DynamicDataTableProps<K extends string> = {
111
115
  * @param value - The value of the cell.
112
116
  * @param extraData - Additional data, such as a selected value for dropdowns.
113
117
  */
114
- onRowEdit: (row: DynamicDataTableRowType<K>, headerKey: K, value: string, extraData: {
118
+ onRowEdit: (row: DynamicDataTableRowType<K, CustomStateType>, headerKey: K, value: string, extraData: {
119
+ files?: File[];
115
120
  selectedValue?: SelectPickerOptionType<string>;
116
121
  }) => void;
117
122
  /**
118
123
  * Function to handle row deletions.
119
124
  * @param row - The row that was deleted.
120
125
  */
121
- onRowDelete: (row: DynamicDataTableRowType<K>) => void;
126
+ onRowDelete: (row: DynamicDataTableRowType<K, CustomStateType>) => void;
122
127
  /** Optional configuration for rendering a custom action button in a row. */
123
128
  actionButtonConfig?: {
124
129
  /**
@@ -126,7 +131,7 @@ export type DynamicDataTableProps<K extends string> = {
126
131
  * @param row - The current row being rendered.
127
132
  * @returns A React node representing the action button.
128
133
  */
129
- renderer: (row: DynamicDataTableRowType<K>) => ReactNode;
134
+ renderer: (row: DynamicDataTableRowType<K, CustomStateType>) => ReactNode;
130
135
  /**
131
136
  * This represents under which header key the action button will be rendered.
132
137
  */
@@ -153,13 +158,13 @@ export type DynamicDataTableProps<K extends string> = {
153
158
  * @param row - The row containing the cell.
154
159
  * @returns An object with a boolean indicating validity and an array of error messages.
155
160
  */
156
- validationSchema?: (value: string, key: K, row: DynamicDataTableRowType<K>) => {
161
+ validationSchema?: (value: string, key: K, row: DynamicDataTableRowType<K, CustomStateType>) => {
157
162
  isValid: boolean;
158
163
  errorMessages: string[];
159
164
  };
160
165
  };
161
- export interface DynamicDataTableHeaderProps<K extends string> extends Pick<DynamicDataTableProps<K>, 'headers' | 'rows' | 'headerComponent' | 'sortingConfig' | 'onRowAdd' | 'readOnly' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'actionButtonConfig'>, Pick<InfoIconTippyProps, 'heading' | 'additionalContent'> {
166
+ export interface DynamicDataTableHeaderProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'headers' | 'rows' | 'headerComponent' | 'sortingConfig' | 'onRowAdd' | 'readOnly' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'actionButtonConfig'> {
162
167
  }
163
- export interface DynamicDataTableRowProps<K extends string> extends Pick<DynamicDataTableProps<K>, 'rows' | 'headers' | 'maskValue' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'showError' | 'validationSchema' | 'leadingCellIcon' | 'trailingCellIcon' | 'buttonCellWrapComponent'> {
168
+ export interface DynamicDataTableRowProps<K extends string, CustomStateType = Record<string, unknown>> extends Pick<DynamicDataTableProps<K, CustomStateType>, 'rows' | 'headers' | 'maskValue' | 'isAdditionNotAllowed' | 'isDeletionNotAllowed' | 'readOnly' | 'onRowEdit' | 'onRowDelete' | 'actionButtonConfig' | 'showError' | 'validationSchema' | 'leadingCellIcon' | 'trailingCellIcon' | 'buttonCellWrapComponent'> {
164
169
  }
165
170
  export {};
@@ -1,5 +1,5 @@
1
1
  import { DynamicDataTableHeaderType, DynamicDataTableProps, DynamicDataTableRowDataType } from './types';
2
- export declare const getActionButtonPosition: <K extends string>({ headers, actionButtonConfig, }: Pick<DynamicDataTableProps<K>, "headers" | "actionButtonConfig">) => number;
3
- export declare const getHeaderGridTemplateColumn: <K extends string>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K>["actionButtonConfig"], noDeleteBtn: boolean) => string;
4
- export declare const getRowGridTemplateColumn: <K extends string>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K>["actionButtonConfig"], noDeleteBtn: boolean) => string;
2
+ export declare const getActionButtonPosition: <K extends string, CustomStateType = Record<string, unknown>>({ headers, actionButtonConfig, }: Pick<DynamicDataTableProps<K, CustomStateType>, "headers" | "actionButtonConfig">) => number;
3
+ export declare const getHeaderGridTemplateColumn: <K extends string, CustomStateType = Record<string, unknown>>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K, CustomStateType>["actionButtonConfig"], noDeleteBtn: boolean) => string;
4
+ export declare const getRowGridTemplateColumn: <K extends string, CustomStateType = Record<string, unknown>>(headers: DynamicDataTableHeaderType<K>[], actionButtonConfig: DynamicDataTableProps<K, CustomStateType>["actionButtonConfig"], noDeleteBtn: boolean) => string;
5
5
  export declare const rowTypeHasInputField: (type: DynamicDataTableRowDataType) => boolean;
@@ -0,0 +1,2 @@
1
+ import { FileUploadProps } from './types';
2
+ export declare const FileUpload: ({ label, fileName, multiple, fileTypes, className, onUpload, }: FileUploadProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './FileUpload';
2
+ export * from './types';
@@ -0,0 +1,8 @@
1
+ export interface FileUploadProps {
2
+ fileName: string;
3
+ onUpload: (files: File[]) => void;
4
+ multiple?: boolean;
5
+ label?: string;
6
+ className?: string;
7
+ fileTypes?: string[];
8
+ }
@@ -44,3 +44,4 @@ export * from './InvalidYAMLTippy';
44
44
  export * from './ConfirmationModal';
45
45
  export * from './DiffViewer';
46
46
  export * from './DynamicDataTable';
47
+ export * from './FileUpload';
@@ -1,5 +1,5 @@
1
1
  import { Dayjs } from 'dayjs';
2
- import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType } from '../Common';
2
+ import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, ValueConstraint, VariableType, RefVariableType, PluginType } from '../Common';
3
3
  import { KeyValueListType } from './Components';
4
4
  import { EnvironmentTypeEnum, PatchOperationType } from './constants';
5
5
  export declare enum EnvType {
@@ -282,11 +282,29 @@ export interface GitTriggers {
282
282
  CiConfigureSourceType: string;
283
283
  CiConfigureSourceValue: string;
284
284
  }
285
+ export interface RuntimePluginVariables extends Pick<VariableType, 'name' | 'value' | 'format' | 'fileReferenceId' | 'fileMountDir'> {
286
+ variableStepScope: string;
287
+ valueConstraint: ValueConstraint & {
288
+ id: number;
289
+ };
290
+ stepVariableId: number;
291
+ valueType: RefVariableType;
292
+ stepName: string;
293
+ stepType: PluginType;
294
+ isRequired: boolean;
295
+ pluginIcon?: string;
296
+ }
285
297
  export interface RuntimeParamsAPIResponseType {
286
298
  envVariables: Record<string, string>;
299
+ runtimePluginVariables: RuntimePluginVariables[];
287
300
  }
288
301
  export interface RuntimeParamsTriggerPayloadType {
289
- runtimeParams: RuntimeParamsAPIResponseType;
302
+ runtimeParams: Pick<RuntimeParamsAPIResponseType, 'envVariables'>;
303
+ }
304
+ export interface RuntimeParamsV2TriggerPayloadType {
305
+ runtimeParams: {
306
+ runtimePluginVariables: Pick<RuntimePluginVariables, 'name' | 'fileMountDir' | 'fileReferenceId' | 'value' | 'format' | 'variableStepScope'>[];
307
+ };
290
308
  }
291
309
  export declare enum CIMaterialSidebarType {
292
310
  CODE_SOURCE = "Code Source",
@@ -739,22 +757,16 @@ export interface PreventOutsideFocusProps {
739
757
  identifier: string;
740
758
  preventFocus: boolean;
741
759
  }
742
- export interface PolicyBlockInfo {
743
- isBlocked: boolean;
744
- blockedBy: TriggerBlockType;
745
- reason: string;
746
- }
747
- export interface PipelineStageBlockInfo {
748
- node: PolicyBlockInfo;
749
- pre: PolicyBlockInfo;
750
- post: PolicyBlockInfo;
751
- }
752
- export interface PolicyConsequencesDTO {
753
- cd: PipelineStageBlockInfo;
754
- ci: PipelineStageBlockInfo;
755
- }
756
- export interface GetPolicyConsequencesProps {
757
- appId: number;
758
- envId: number;
760
+ export interface UploadFileDTO {
761
+ id: number;
762
+ name: string;
763
+ size: number;
764
+ mimeType: string;
765
+ extension: string;
766
+ }
767
+ export interface UploadFileProps {
768
+ file: File[];
769
+ allowedExtensions?: string[];
770
+ maxUploadSize?: number;
759
771
  }
760
772
  export {};