@devtron-labs/devtron-fe-common-lib 1.2.15 → 1.2.17-beta-1

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 (42) hide show
  1. package/dist/{@code-editor-BogrfDse.js → @code-editor-BJEMG_jf.js} +4637 -4281
  2. package/dist/{@common-rjsf-DLiAZrnL.js → @common-rjsf-C_TfOOVU.js} +1 -1
  3. package/dist/{@monaco-editor-CVagbUeH.js → @monaco-editor-DukJFc0i.js} +27951 -28153
  4. package/dist/Common/CIPipeline.Types.d.ts +41 -5
  5. package/dist/Common/Common.service.d.ts +9 -3
  6. package/dist/Common/Constants.d.ts +5 -0
  7. package/dist/Common/CustomTagSelector/Types.d.ts +12 -14
  8. package/dist/Common/CustomTagSelector/index.d.ts +1 -1
  9. package/dist/Common/CustomTagSelector/tags.utils.d.ts +13 -0
  10. package/dist/Common/Helper.d.ts +3 -1
  11. package/dist/Common/RJSF/Form.d.ts +1 -1
  12. package/dist/Common/Types.d.ts +34 -6
  13. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/index.d.ts +1 -0
  14. package/dist/Pages/Applications/DevtronApps/Details/CDPipeline/services.d.ts +7 -0
  15. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/components/FileConfigTippy.d.ts +2 -0
  16. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/components/SystemVariableIcon.d.ts +1 -0
  17. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/components/index.d.ts +2 -0
  18. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/constants.d.ts +3 -0
  19. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/index.d.ts +3 -0
  20. package/dist/Pages/Applications/DevtronApps/Details/CIPipeline/services.d.ts +7 -0
  21. package/dist/Pages/Applications/DevtronApps/Details/index.d.ts +1 -0
  22. package/dist/Pages/ResourceBrowser/constants.d.ts +1 -1
  23. package/dist/Shared/Components/DynamicDataTable/types.d.ts +7 -1
  24. package/dist/Shared/Components/FileUpload/FileUpload.d.ts +2 -0
  25. package/dist/Shared/Components/FileUpload/index.d.ts +2 -0
  26. package/dist/Shared/Components/FileUpload/types.d.ts +8 -0
  27. package/dist/Shared/Components/SelectPicker/SelectPicker.component.d.ts +1 -1
  28. package/dist/Shared/Components/SelectPicker/type.d.ts +1 -1
  29. package/dist/Shared/Components/TagsKeyValueTable/TagsContainer.d.ts +3 -0
  30. package/dist/Shared/Components/TagsKeyValueTable/constants.d.ts +4 -0
  31. package/dist/Shared/Components/TagsKeyValueTable/index.d.ts +3 -0
  32. package/dist/Shared/Components/TagsKeyValueTable/types.d.ts +12 -0
  33. package/dist/Shared/Components/TagsKeyValueTable/utils.d.ts +3 -0
  34. package/dist/Shared/Components/index.d.ts +2 -0
  35. package/dist/Shared/types.d.ts +48 -6
  36. package/dist/assets/@code-editor.css +1 -1
  37. package/dist/assets/ic-cloud-upload.18066e05.svg +3 -0
  38. package/dist/assets/ic-var-initial.afdaa854.svg +25 -0
  39. package/dist/index.js +547 -530
  40. package/package.json +2 -2
  41. package/dist/Common/CustomTagSelector/TagLabelSelect.d.ts +0 -2
  42. package/dist/Common/CustomTagSelector/TagSelector.utils.d.ts +0 -12
@@ -1,3 +1,4 @@
1
+ import { DynamicDataTableCellValidationState } from '../Shared/Components';
1
2
  export interface MaterialType {
2
3
  name: string;
3
4
  type: string;
@@ -70,11 +71,30 @@ export declare enum RefVariableStageType {
70
71
  PRE_CI = "PRE_CI",
71
72
  POST_CI = "POST_CI"
72
73
  }
74
+ export interface FilePropertyType {
75
+ allowedExtensions: string[];
76
+ maxUploadSize: number;
77
+ }
78
+ export interface ConstraintType {
79
+ fileProperty: FilePropertyType;
80
+ }
81
+ export interface ValueConstraintType {
82
+ choices?: string[];
83
+ blockCustomValue?: boolean;
84
+ constraint?: ConstraintType;
85
+ }
86
+ export declare enum VariableTypeFormat {
87
+ STRING = "STRING",
88
+ NUMBER = "NUMBER",
89
+ BOOL = "BOOL",
90
+ DATE = "DATE",
91
+ FILE = "FILE"
92
+ }
73
93
  export interface VariableType {
74
94
  id: number;
75
95
  name: string;
76
96
  value: string;
77
- format: string;
97
+ format: VariableTypeFormat;
78
98
  description: string;
79
99
  defaultValue: string;
80
100
  allowEmptyValue: boolean;
@@ -83,6 +103,12 @@ export interface VariableType {
83
103
  refVariableName: string;
84
104
  refVariableStage?: RefVariableStageType;
85
105
  variableStepIndexInPlugin?: number;
106
+ fileMountDir: string;
107
+ fileReferenceId?: number;
108
+ valueConstraintId?: number;
109
+ valueConstraint?: ValueConstraintType;
110
+ isRuntimeArg: boolean;
111
+ refVariableUsed: boolean;
86
112
  }
87
113
  interface CommandArgsMap {
88
114
  command: string;
@@ -226,16 +252,26 @@ export interface ErrorObj {
226
252
  isValid: boolean;
227
253
  message: string | null;
228
254
  }
255
+ export declare enum InputOutputVariablesHeaderKeys {
256
+ VARIABLE = "variable",
257
+ FORMAT = "format",
258
+ VALUE = "val"
259
+ }
260
+ export type InputOutputVariablesErrorObj = Record<InputOutputVariablesHeaderKeys, DynamicDataTableCellValidationState>;
229
261
  export interface TaskErrorObj {
230
262
  isValid: boolean;
231
263
  name: ErrorObj;
232
264
  inlineStepDetail?: {
233
- inputVariables?: ErrorObj[];
234
- outputVariables?: ErrorObj[];
265
+ inputVariables?: Record<number, InputOutputVariablesErrorObj>;
266
+ outputVariables?: Record<number, InputOutputVariablesErrorObj>;
267
+ isInputVariablesValid?: boolean;
268
+ isOutputVariablesValid?: boolean;
235
269
  };
236
270
  pluginRefStepDetail?: {
237
- inputVariables?: ErrorObj[];
238
- outputVariables?: ErrorObj[];
271
+ inputVariables?: Record<number, InputOutputVariablesErrorObj>;
272
+ outputVariables?: Record<number, InputOutputVariablesErrorObj>;
273
+ isInputVariablesValid?: boolean;
274
+ isOutputVariablesValid?: boolean;
239
275
  };
240
276
  }
241
277
  export interface FormErrorObjectType {
@@ -1,5 +1,6 @@
1
- import { RuntimeParamsAPIResponseType, RuntimeParamsListItemType } from '../Shared/types';
2
- import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse } from './Types';
1
+ import { MutableRefObject } from 'react';
2
+ import { RuntimeParamsAPIResponseType, RuntimePluginVariables } from '../Shared/types';
3
+ import { TeamList, ResponseType, DeploymentNodeType, CDMaterialServiceEnum, CDMaterialServiceQueryParams, CDMaterialResponseType, CDMaterialFilterQuery, EnvironmentListHelmResponse, GlobalVariableOptionType } from './Types';
3
4
  import { ApiResourceType } from '../Pages';
4
5
  export declare const getTeamListMin: () => Promise<TeamList>;
5
6
  interface UserRole extends ResponseType {
@@ -15,7 +16,7 @@ export declare const SourceTypeMap: {
15
16
  };
16
17
  export declare function getUserRole(appName?: string): Promise<UserRole>;
17
18
  export declare function setImageTags(request: any, pipelineId: number, artifactId: number): Promise<ResponseType<any>>;
18
- export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimeParamsListItemType[];
19
+ export declare const parseRuntimeParams: (response: RuntimeParamsAPIResponseType) => RuntimePluginVariables[];
19
20
  export declare const processCDMaterialServiceResponse: (cdMaterialsResult: any, stage: DeploymentNodeType, offset: number, filter: CDMaterialFilterQuery, disableDefaultSelection?: boolean) => CDMaterialResponseType;
20
21
  export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
21
22
  export declare function extractImage(image: string): string;
@@ -34,4 +35,9 @@ export declare function getWebhookEventsForEventId(eventId: string | number): Pr
34
35
  * @returns URL to the branch in the Git repository
35
36
  */
36
37
  export declare const getGitBranchUrl: (gitUrl: string, branchName: string) => string | null;
38
+ export declare const getGlobalVariables: ({ appId, isCD, abortControllerRef, }: {
39
+ appId: number;
40
+ isCD?: boolean;
41
+ abortControllerRef?: MutableRefObject<AbortController>;
42
+ }) => Promise<GlobalVariableOptionType[]>;
37
43
  export {};
@@ -13,11 +13,14 @@ export declare const DOCUMENTATION: {
13
13
  GLOBAL_CONFIG_BUILD_INFRA: string;
14
14
  };
15
15
  export declare const PATTERNS: {
16
+ STRING: RegExp;
17
+ NATURAL_NUMBERS: RegExp;
16
18
  KUBERNETES_KEY_PREFIX: RegExp;
17
19
  KUBERNETES_KEY_NAME: RegExp;
18
20
  START_END_ALPHANUMERIC: RegExp;
19
21
  ALPHANUMERIC_WITH_SPECIAL_CHAR: RegExp;
20
22
  ESCAPED_CHARACTERS: RegExp;
23
+ NUMBERS_WITH_SCOPE_VARIABLES: RegExp;
21
24
  };
22
25
  export declare const URLS: {
23
26
  LOGIN_SSO: string;
@@ -99,6 +102,8 @@ export declare const ROUTES: {
99
102
  CONFIG_DATA: string;
100
103
  K8S_RESOURCE: string;
101
104
  K8S_RESOURCE_LIST: string;
105
+ FILE_UPLOAD: string;
106
+ PLUGIN_GLOBAL_VARIABLES: string;
102
107
  CONFIG_COMPARE_SECRET: string;
103
108
  };
104
109
  export declare enum KEY_VALUE {
@@ -5,6 +5,16 @@ 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
+ }
8
18
  export interface TagType {
9
19
  id?: number;
10
20
  key: string;
@@ -16,20 +26,8 @@ export interface TagType {
16
26
  isInvalidValue?: boolean;
17
27
  isSuggested?: boolean;
18
28
  isPropagateDisabled?: boolean;
19
- }
20
- export interface TagErrorType {
21
- isValid: boolean;
22
- messages: string[];
23
- }
24
- export interface TagLabelSelectType {
25
- isCreateApp?: boolean;
26
- labelTags: TagType[];
27
- setLabelTags: (tagList: TagType[]) => void;
28
- tabIndex?: number;
29
- selectedProjectId?: number;
30
- suggestedTagsOptions?: SuggestedTagOptionType[];
31
- reloadProjectTags?: boolean;
32
- hidePropagateTag?: boolean;
29
+ deploymentPolicy?: DeploymentPolicy;
30
+ valueConstraint?: VariableValueConstraintTypes;
33
31
  }
34
32
  export interface TagDetailType {
35
33
  index: number;
@@ -1,6 +1,6 @@
1
1
  export { default as PropagateTagInfo } from './PropagateTagInfo';
2
2
  export * from './TagDetails';
3
- export * from './TagLabelSelect';
4
3
  export * from './TagLabelValueSelector';
5
4
  export * from './ResizableTagTextArea';
6
5
  export * from './Types';
6
+ export { validateTagKeyValue, validateTagValue } from './tags.utils';
@@ -0,0 +1,13 @@
1
+ /**
2
+ *
3
+ * @param value tag key value to validate
4
+ * @returns isValid: boolean, errorMessages: string[]
5
+ */
6
+ export declare const validateTagKeyValue: (value: string) => {
7
+ isValid: boolean;
8
+ errorMessages: string[];
9
+ };
10
+ export declare const validateTagValue: (value: string, key: string) => {
11
+ isValid: boolean;
12
+ errorMessages: string[];
13
+ };
@@ -1,6 +1,6 @@
1
1
  import { default as React, SyntheticEvent } from 'react';
2
2
  import { JSONPathOptions } from 'jsonpath-plus';
3
- import { AsyncOptions, UseSearchString } from './Types';
3
+ import { AsyncOptions, DeploymentNodeType, UseSearchString } from './Types';
4
4
  import { scrollableInterface } from '../Shared';
5
5
  import * as Sentry from '@sentry/browser';
6
6
  export declare function showError(serverError: any, showToastOnUnknownError?: boolean, hideAccessError?: boolean): void;
@@ -135,4 +135,6 @@ export declare const getSanitizedIframe: (iframeString: string) => string;
135
135
  * This method adds default attributes to iframe - title, loading ="lazy", width="100%", height="100%"
136
136
  */
137
137
  export declare const getIframeWithDefaultAttributes: (iframeString: string, defaultName?: string) => string;
138
+ export declare const getStageTitle: (stageType: DeploymentNodeType) => string;
139
+ export declare const getGoLangFormattedDateWithTimezone: (dateFormat: string) => string;
138
140
  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,8 +3,8 @@ 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, RegistryType, RuntimeParamsListItemType, Severity } from '../Shared';
7
- import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, SortingOrder, TaskErrorObj } from '.';
6
+ import { MandatoryPluginBaseStateType, RegistryType, RuntimePluginVariables, Severity, PolicyBlockInfo } from '../Shared';
7
+ import { ACTION_STATE, DEPLOYMENT_WINDOW_TYPE, DockerConfigOverrideType, RefVariableType, SortingOrder, TaskErrorObj, VariableTypeFormat } from '.';
8
8
  /**
9
9
  * Generic response type object with support for overriding the result type
10
10
  *
@@ -94,6 +94,7 @@ export interface TippyCustomizedProps extends Pick<TippyProps, 'appendTo'> {
94
94
  documentationLink?: string;
95
95
  documentationLinkText?: string;
96
96
  children: React.ReactElement<any>;
97
+ disableClose?: boolean;
97
98
  }
98
99
  export interface InfoIconTippyProps extends Pick<TippyCustomizedProps, 'heading' | 'infoText' | 'iconClass' | 'documentationLink' | 'documentationLinkText' | 'additionalContent' | 'placement' | 'Icon' | 'headingInfo'> {
99
100
  dataTestid?: string;
@@ -432,6 +433,10 @@ export interface CDMaterialType {
432
433
  * Would currently only be received in case of release
433
434
  */
434
435
  appWorkflowId: number;
436
+ /**
437
+ * Denotes trigger blocking due to mandatory tags, (might be used for plugins and other features in future)
438
+ */
439
+ deploymentBlockedState?: PolicyBlockInfo;
435
440
  }
436
441
  export declare enum CDMaterialServiceEnum {
437
442
  ROLLBACK = "rollback",
@@ -468,6 +473,15 @@ export interface DownstreamNodesEnvironmentsType {
468
473
  environmentId: number;
469
474
  environmentName: string;
470
475
  }
476
+ export declare enum TriggerBlockType {
477
+ MANDATORY_TAG = "mandatory-tags",
478
+ MANDATORY_PLUGIN = "mandatory-plugins",
479
+ SECURITY_SCAN = "security-scan"
480
+ }
481
+ export interface TriggerBlockedInfo {
482
+ blockedBy: TriggerBlockType;
483
+ blockedReason?: string;
484
+ }
471
485
  export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTriggerBlocked' | 'pluginBlockState'> {
472
486
  connectingCiPipelineId?: number;
473
487
  parents: string | number[] | string[];
@@ -530,6 +544,7 @@ export interface CommonNodeAttr extends Pick<MandatoryPluginBaseStateType, 'isTr
530
544
  downstreamEnvironments?: DownstreamNodesEnvironmentsType[];
531
545
  cipipelineId?: number;
532
546
  isDeploymentBlocked?: boolean;
547
+ triggerBlockedInfo?: TriggerBlockedInfo;
533
548
  }
534
549
  export declare enum DeploymentAppTypes {
535
550
  HELM = "helm",
@@ -592,7 +607,8 @@ export interface CDMaterialsMetaInfo {
592
607
  * This is the ID of user that has request the material
593
608
  */
594
609
  requestedUserId: number;
595
- runtimeParams: RuntimeParamsListItemType[];
610
+ deploymentBlockedState?: PolicyBlockInfo;
611
+ runtimeParams: RuntimePluginVariables[];
596
612
  }
597
613
  export interface ImagePromotionMaterialInfo {
598
614
  isApprovalPendingForPromotion: boolean;
@@ -670,7 +686,7 @@ export interface Strategy {
670
686
  config: any;
671
687
  default?: boolean;
672
688
  }
673
- export interface CDStage {
689
+ export interface CDStage extends Partial<Pick<CommonNodeAttr, 'triggerBlockedInfo'>> {
674
690
  status: string;
675
691
  name: string;
676
692
  triggerType: 'AUTOMATIC' | 'MANUAL';
@@ -680,14 +696,14 @@ export interface CDStageConfigMapSecretNames {
680
696
  configMaps: any[];
681
697
  secrets: any[];
682
698
  }
683
- export interface PrePostDeployStageType extends MandatoryPluginBaseStateType {
699
+ export interface PrePostDeployStageType extends MandatoryPluginBaseStateType, Partial<Pick<CommonNodeAttr, 'triggerBlockedInfo'>> {
684
700
  isValid: boolean;
685
701
  steps: TaskErrorObj[];
686
702
  triggerType: string;
687
703
  name: string;
688
704
  status: string;
689
705
  }
690
- export interface CdPipeline {
706
+ export interface CdPipeline extends Partial<Pick<CommonNodeAttr, 'triggerBlockedInfo'>> {
691
707
  id: number;
692
708
  environmentId: number;
693
709
  environmentName?: string;
@@ -719,6 +735,7 @@ export interface CdPipeline {
719
735
  isProdEnv?: boolean;
720
736
  isGitOpsRepoNotConfigured?: boolean;
721
737
  isDeploymentBlocked?: boolean;
738
+ isTriggerBlocked?: boolean;
722
739
  }
723
740
  export interface ExternalCiConfig {
724
741
  id: number;
@@ -871,4 +888,15 @@ export interface WidgetEventDetails {
871
888
  age: string;
872
889
  lastSeen: string;
873
890
  }
891
+ export interface GlobalVariableDTO {
892
+ name: string;
893
+ format: VariableTypeFormat;
894
+ description: string;
895
+ stageType: 'cd' | 'post-cd' | 'ci';
896
+ }
897
+ export type GlobalVariableOptionType = Omit<GlobalVariableDTO, 'name'> & {
898
+ label: string;
899
+ value: string;
900
+ variableType: Extract<RefVariableType, RefVariableType.GLOBAL>;
901
+ };
874
902
  export {};
@@ -1 +1,2 @@
1
1
  export * from './types';
2
+ export * from './services';
@@ -0,0 +1,7 @@
1
+ import { MutableRefObject } from 'react';
2
+ import { UploadFileDTO, UploadFileProps } from '../../../../../Shared/types';
3
+ export declare const uploadCDPipelineFile: ({ file, appId, envId, allowedExtensions, maxUploadSize, abortControllerRef, }: UploadFileProps & {
4
+ appId: number;
5
+ envId: number;
6
+ abortControllerRef?: MutableRefObject<AbortController>;
7
+ }) => Promise<UploadFileDTO>;
@@ -0,0 +1,2 @@
1
+ import { VariableType } from '../../../../../../Common/CIPipeline.Types';
2
+ export declare const FileConfigTippy: ({ fileMountDir }: Pick<VariableType, "fileMountDir">) => JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const SystemVariableIcon: () => JSX.Element;
@@ -0,0 +1,2 @@
1
+ export * from './SystemVariableIcon';
2
+ export * from './FileConfigTippy';
@@ -0,0 +1,3 @@
1
+ import { SelectPickerOptionType } from '../../../../../Shared/Components';
2
+ export declare const IO_VARIABLES_VALUE_COLUMN_BOOL_OPTIONS: SelectPickerOptionType<string>[];
3
+ export declare const IO_VARIABLES_VALUE_COLUMN_DATE_OPTIONS: SelectPickerOptionType<string>[];
@@ -0,0 +1,3 @@
1
+ export * from './services';
2
+ export * from './constants';
3
+ export * from './components';
@@ -0,0 +1,7 @@
1
+ import { UploadFileDTO, UploadFileProps } from '../../../../../Shared/types';
2
+ import { APIOptions } from '../../../../../Common/Types';
3
+ export declare const uploadCIPipelineFile: ({ file, appId, ciPipelineId, envId, allowedExtensions, maxUploadSize, abortControllerRef, }: {
4
+ appId: number;
5
+ ciPipelineId: number;
6
+ envId?: number;
7
+ } & UploadFileProps & Pick<APIOptions, "abortControllerRef">) => 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 { SelectPickerOptionType } from '../../Shared/Components';
2
- export declare const ALL_NAMESPACE_OPTION: Readonly<Pick<SelectPickerOptionType, 'value' | 'label'>>;
2
+ export declare const ALL_NAMESPACE_OPTION: Readonly<Pick<SelectPickerOptionType<string>, 'value' | 'label'>>;
@@ -4,6 +4,7 @@ import { UseStateFiltersReturnType } from '../../../Common/Hooks';
4
4
  import { TooltipProps } from '@Common/Tooltip/types';
5
5
  import { SelectPickerOptionType, SelectPickerProps } from '../SelectPicker';
6
6
  import { SelectTextAreaProps } from '../SelectTextArea';
7
+ import { FileUploadProps } from '../FileUpload';
7
8
  /**
8
9
  * Interface representing header for a dynamic data table.
9
10
  * @template K - A string representing the key type.
@@ -19,12 +20,15 @@ export type DynamicDataTableHeaderType<K extends string> = {
19
20
  isSortable?: boolean;
20
21
  /** An optional boolean to control the visibility of the column. */
21
22
  isHidden?: boolean;
23
+ /** An optional boolean to show the column */
24
+ renderAdditionalContent?: () => ReactNode;
22
25
  };
23
26
  export declare enum DynamicDataTableRowDataType {
24
27
  TEXT = "text",
25
28
  DROPDOWN = "dropdown",
26
29
  SELECT_TEXT = "select-text",
27
- BUTTON = "button"
30
+ BUTTON = "button",
31
+ FILE_UPLOAD = "file-upload"
28
32
  }
29
33
  export type DynamicDataTableCellPropsMap = {
30
34
  [DynamicDataTableRowDataType.TEXT]: Omit<ResizableTagTextAreaProps, 'id' | 'className' | 'minHeight' | 'maxHeight' | 'value' | 'onChange' | 'disabled' | 'disableOnBlurResizeToMinHeight' | 'refVar' | 'dependentRef'>;
@@ -36,6 +40,7 @@ export type DynamicDataTableCellPropsMap = {
36
40
  icon?: ReactNode;
37
41
  text: string;
38
42
  };
43
+ [DynamicDataTableRowDataType.FILE_UPLOAD]: Omit<FileUploadProps, 'className' | 'fileName' | 'onUpload' | 'multiple'>;
39
44
  };
40
45
  type DynamicDataTableCellData<T extends keyof DynamicDataTableCellPropsMap = keyof DynamicDataTableCellPropsMap> = T extends keyof DynamicDataTableCellPropsMap ? {
41
46
  type: T;
@@ -120,6 +125,7 @@ export type DynamicDataTableProps<K extends string, CustomStateType = Record<str
120
125
  * @param extraData - Additional data, such as a selected value for dropdowns.
121
126
  */
122
127
  onRowEdit: (row: DynamicDataTableRowType<K, CustomStateType>, headerKey: K, value: string, extraData: {
128
+ files?: File[];
123
129
  selectedValue?: SelectPickerOptionType<string>;
124
130
  }) => void;
125
131
  /**
@@ -0,0 +1,2 @@
1
+ import { FileUploadProps } from './types';
2
+ export declare const FileUpload: ({ isLoading, label, fileName, multiple, fileTypes, 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
+ isLoading?: boolean;
3
+ fileName: string;
4
+ onUpload: (files: File[]) => void;
5
+ multiple?: boolean;
6
+ label?: string;
7
+ fileTypes?: string[];
8
+ }
@@ -134,5 +134,5 @@ import { SelectPickerProps } from './type';
134
134
  * />
135
135
  * ```
136
136
  */
137
- declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, inputValue, onInputChange, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
137
+ declare const SelectPicker: <OptionValue, IsMulti extends boolean>({ error, icon, helperText, placeholder, label, showSelectedOptionIcon, size, disabledTippyContent, showSelectedOptionsCount, menuSize, optionListError, reloadOptionList, menuPosition, variant, disableDescriptionEllipsis, multiSelectProps, isMulti, name, classNamePrefix, shouldRenderCustomOptions, isSearchable, selectRef, shouldMenuAlignRight, fullWidth, customSelectedOptionsCount, renderMenuListFooter, inputValue, onInputChange, isCreatable, onCreateOption, closeMenuOnSelect, shouldShowNoOptionsMessage, formatCreateLabel, ...props }: SelectPickerProps<OptionValue, IsMulti>) => JSX.Element;
138
138
  export default SelectPicker;
@@ -61,7 +61,7 @@ export declare enum SelectPickerVariantType {
61
61
  DEFAULT = "default",
62
62
  BORDER_LESS = "border-less"
63
63
  }
64
- export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption'>> & {
64
+ export type SelectPickerProps<OptionValue = number | string, IsMulti extends boolean = false> = Pick<SelectProps<OptionValue, IsMulti>, 'name' | 'classNamePrefix' | 'options' | 'value' | 'onChange' | 'isSearchable' | 'isClearable' | 'hideSelectedOptions' | 'controlShouldRenderValue' | 'closeMenuOnSelect' | 'isDisabled' | 'isLoading' | 'required' | 'isOptionDisabled' | 'placeholder' | 'menuPosition' | 'getOptionLabel' | 'getOptionValue' | 'isOptionSelected' | 'menuIsOpen' | 'onMenuOpen' | 'onMenuClose' | 'autoFocus' | 'onBlur' | 'onKeyDown' | 'formatOptionLabel' | 'onInputChange' | 'inputValue'> & Partial<Pick<SelectProps<OptionValue, IsMulti>, 'renderMenuListFooter' | 'shouldRenderCustomOptions' | 'renderCustomOptions' | 'icon' | 'showSelectedOptionIcon'>> & Required<Pick<SelectProps<OptionValue, IsMulti>, 'inputId'>> & Partial<Pick<CreatableProps<SelectPickerOptionType<OptionValue>, IsMulti, GroupBase<SelectPickerOptionType<OptionValue>>>, 'onCreateOption' | 'formatCreateLabel'>> & {
65
65
  /**
66
66
  * Error message for the select
67
67
  */
@@ -0,0 +1,3 @@
1
+ import { TagsContainerProps } from './types';
2
+ declare const TagsContainer: ({ isCreateApp, hidePropagateTags, ...props }: TagsContainerProps) => JSX.Element;
3
+ export default TagsContainer;
@@ -0,0 +1,4 @@
1
+ import { DynamicDataTableHeaderType } from '../DynamicDataTable';
2
+ import { TagsTableColumnsType } from './types';
3
+ export declare const TAGS_TABLE_HEADERS: DynamicDataTableHeaderType<TagsTableColumnsType>[];
4
+ export declare const DEVTRON_AI_URL: string;
@@ -0,0 +1,3 @@
1
+ export { default as TagsContainer } from './TagsContainer';
2
+ export { getEmptyTagTableRow } from './utils';
3
+ export type { TagsTableColumnsType } from './types';
@@ -0,0 +1,12 @@
1
+ import { DynamicDataTableCellErrorType, DynamicDataTableProps, DynamicDataTableRowType } from '../DynamicDataTable';
2
+ export type TagsTableColumnsType = 'tagKey' | 'tagValue';
3
+ export interface TagsContainerProps extends Partial<Pick<DynamicDataTableProps<TagsTableColumnsType>, 'onRowEdit'>> {
4
+ appType: string;
5
+ isCreateApp?: boolean;
6
+ rows: DynamicDataTableRowType<TagsTableColumnsType>[];
7
+ setRows: (updatedRows: DynamicDataTableRowType<TagsTableColumnsType>[]) => void;
8
+ hidePropagateTags?: boolean;
9
+ getEmptyRow?: (keyChoices?: string[]) => DynamicDataTableRowType<TagsTableColumnsType>;
10
+ tagsError: DynamicDataTableCellErrorType<TagsTableColumnsType>;
11
+ setTagErrors: (updatedTagsError: DynamicDataTableCellErrorType<TagsTableColumnsType>) => void;
12
+ }
@@ -0,0 +1,3 @@
1
+ import { DynamicDataTableRowType } from '../DynamicDataTable';
2
+ import { TagsTableColumnsType } from './types';
3
+ export declare const getEmptyTagTableRow: () => DynamicDataTableRowType<TagsTableColumnsType>;
@@ -46,3 +46,5 @@ export * from './EnterpriseTag';
46
46
  export * from './ConfirmationModal';
47
47
  export * from './DiffViewer';
48
48
  export * from './DynamicDataTable';
49
+ export * from './TagsKeyValueTable';
50
+ export * from './FileUpload';
@@ -1,6 +1,5 @@
1
1
  import { Dayjs } from 'dayjs';
2
- import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams } from '../Common';
3
- import { KeyValueListType } from './Components';
2
+ import { OptionType, CommonNodeAttr, ResponseType, UserApprovalConfigType, VulnerabilityType, DeploymentAppTypes, ServerErrors, SortingParams, TriggerBlockType, ValueConstraintType, VariableType, RefVariableType, PluginType } from '../Common';
4
3
  import { EnvironmentTypeEnum, PatchOperationType } from './constants';
5
4
  export declare enum EnvType {
6
5
  CHART = "helm_charts",
@@ -282,11 +281,27 @@ export interface GitTriggers {
282
281
  CiConfigureSourceType: string;
283
282
  CiConfigureSourceValue: string;
284
283
  }
284
+ export interface RuntimePluginVariables extends Pick<VariableType, 'name' | 'value' | 'defaultValue' | 'format' | 'fileReferenceId' | 'fileMountDir'> {
285
+ variableStepScope: string;
286
+ valueConstraint: ValueConstraintType & {
287
+ id: number;
288
+ };
289
+ stepVariableId: number;
290
+ valueType: RefVariableType;
291
+ stepName: string;
292
+ stepType: PluginType;
293
+ isRequired: boolean;
294
+ pluginIcon?: string;
295
+ description?: 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: {
303
+ runtimePluginVariables: Pick<RuntimePluginVariables, 'name' | 'fileMountDir' | 'fileReferenceId' | 'value' | 'format' | 'variableStepScope'>[];
304
+ };
290
305
  }
291
306
  export declare enum CIMaterialSidebarType {
292
307
  CODE_SOURCE = "Code Source",
@@ -596,9 +611,6 @@ export interface ConfigKeysWithLockType {
596
611
  allowed: boolean;
597
612
  }
598
613
  export type DataAttributes = Record<`data-${string}`, unknown>;
599
- export interface RuntimeParamsListItemType extends KeyValueListType {
600
- id: number;
601
- }
602
614
  export declare enum RuntimeParamsHeadingType {
603
615
  KEY = "key",
604
616
  VALUE = "value"
@@ -740,4 +752,34 @@ export interface PreventOutsideFocusProps {
740
752
  identifier: string;
741
753
  preventFocus: boolean;
742
754
  }
755
+ export interface PolicyBlockInfo {
756
+ isBlocked: boolean;
757
+ blockedBy: TriggerBlockType;
758
+ reason: string;
759
+ }
760
+ export interface PipelineStageBlockInfo {
761
+ node: PolicyBlockInfo;
762
+ pre: PolicyBlockInfo;
763
+ post: PolicyBlockInfo;
764
+ }
765
+ export interface PolicyConsequencesDTO {
766
+ cd: PipelineStageBlockInfo;
767
+ ci: PipelineStageBlockInfo;
768
+ }
769
+ export interface GetPolicyConsequencesProps {
770
+ appId: number;
771
+ envId: number;
772
+ }
773
+ export interface UploadFileDTO {
774
+ id: number;
775
+ name: string;
776
+ size: number;
777
+ mimeType: string;
778
+ extension: string;
779
+ }
780
+ export interface UploadFileProps {
781
+ file: File[];
782
+ allowedExtensions?: string[];
783
+ maxUploadSize?: number;
784
+ }
743
785
  export {};