@devtron-labs/devtron-fe-common-lib 0.0.47-beta-5 → 0.0.48

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.
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { AddCDButtonProps } from './types';
3
+ export default function AddCDButton({ position, addCDButtons, endNode, startNode, handleAddCD, tooltipContent, }: Readonly<AddCDButtonProps>): JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default as AddCDButton } from './AddCDButton';
2
+ export { handleAddCD } from './utils';
@@ -0,0 +1,26 @@
1
+ import { AddCDPositions, AddPipelineType, EdgeEndNodeType, EdgeNodeType, Point } from '../Types';
2
+ export interface AddCDButtonProps {
3
+ position: AddCDPositions;
4
+ addCDButtons: AddCDPositions[];
5
+ endNode: Point & EdgeEndNodeType;
6
+ startNode: Point & EdgeNodeType;
7
+ handleAddCD: (position: AddCDPositions) => void;
8
+ tooltipContent?: string;
9
+ }
10
+ export interface HandleAddCD {
11
+ position: AddCDPositions;
12
+ handleCDSelect: (workflowId: number | string, ciPipelineId: number | string, parentPipelineType: string, parentPipelineId: number | string, isWebhookCD?: boolean, childPipelineId?: number | string, addType?: AddPipelineType) => void;
13
+ startNode: EdgeNodeType;
14
+ endNode: EdgeEndNodeType;
15
+ workflowId: number | string;
16
+ ciPipelineId: number | string;
17
+ isWebhookCD: boolean;
18
+ isParallelEdge: boolean;
19
+ }
20
+ export interface GetPipelineType {
21
+ isWebhookCD: boolean;
22
+ startNode: EdgeNodeType;
23
+ }
24
+ export interface TooltipContentProps {
25
+ tooltipContent?: string;
26
+ }
@@ -0,0 +1,2 @@
1
+ import { HandleAddCD } from './types';
2
+ export declare const handleAddCD: ({ position, handleCDSelect, startNode, endNode, workflowId, ciPipelineId, isWebhookCD, isParallelEdge, }: HandleAddCD) => void;
@@ -16,5 +16,4 @@ export declare function setImageTags(request: any, pipelineId: number, artifactI
16
16
  export declare const genericCDMaterialsService: (serviceType: CDMaterialServiceEnum, cdMaterialID: number, stage: DeploymentNodeType, signal: AbortSignal, queryParams?: CDMaterialServiceQueryParams) => Promise<CDMaterialResponseType>;
17
17
  export declare function extractImage(image: string): string;
18
18
  export declare function createGitCommitUrl(url: string, revision: string): string;
19
- export declare function fetchChartTemplateVersions(): Promise<ResponseType>;
20
19
  export {};
@@ -20,7 +20,6 @@ export declare const ROUTES: {
20
20
  USER_CHECK_ROLE: string;
21
21
  IMAGE_TAGGING: string;
22
22
  CD_MATERIAL_GET: string;
23
- DEPLOYMENT_TEMPLATE_LIST: string;
24
23
  };
25
24
  export declare enum KEY_VALUE {
26
25
  KEY = "key",
@@ -10,6 +10,7 @@ export interface DeleteDialogProps {
10
10
  dataTestId?: string;
11
11
  buttonPrimaryText?: string;
12
12
  shouldStopPropagation?: boolean;
13
+ disabled?: boolean;
13
14
  }
14
15
  export interface ForceDeleteDialogType {
15
16
  onClickDelete: () => void;
@@ -48,13 +48,4 @@ export declare const getUrlWithSearchParams: (url: string, params: Record<string
48
48
  * Custom exception logger function for logging errors to sentry
49
49
  */
50
50
  export declare const logExceptionToSentry: typeof Sentry.captureException;
51
- export declare const customStyles: {
52
- control: (base: any, state: any) => any;
53
- indicatorSeparator: (base: any, state: any) => any;
54
- valueContainer: (base: any, state: any) => any;
55
- dropdownIndicator: (base: any, state: any) => any;
56
- };
57
- export declare const getFilteredChartVersions: (charts: any, selectedChartType: any) => any;
58
- export declare function getUnlockedJSON(json: any, jsonPathArray: any): any;
59
- export declare function getLockedJSON(json: any, jsonPathArray: string[]): any;
60
51
  export {};
@@ -261,6 +261,10 @@ export interface CDMaterialServiceQueryParams {
261
261
  resource?: CDMaterialResourceQuery;
262
262
  filter?: CDMaterialFilterQuery;
263
263
  }
264
+ export interface DownstreamNodesEnvironmentsType {
265
+ environmentId: number;
266
+ environmentName: string;
267
+ }
264
268
  export interface CommonNodeAttr {
265
269
  connectingCiPipelineId?: number;
266
270
  parents: string | number[] | string[];
@@ -322,6 +326,9 @@ export interface CommonNodeAttr {
322
326
  };
323
327
  appReleaseTagNames?: string[];
324
328
  tagsEditable?: boolean;
329
+ deploymentAppCreated?: boolean;
330
+ isLast?: boolean;
331
+ downstreamEnvironments?: DownstreamNodesEnvironmentsType[];
325
332
  }
326
333
  export declare enum DeploymentAppTypes {
327
334
  HELM = "helm",
@@ -563,68 +570,44 @@ export interface CiPipeline {
563
570
  isOffendingMandatoryPlugin?: boolean;
564
571
  pipelineType?: string;
565
572
  }
566
- export interface DeploymentChartVersionType {
567
- chartRefId: number;
568
- chartVersion: string;
569
- chartType: string;
570
- type: number;
573
+ export declare enum PipelineType {
574
+ CI_PIPELINE = "CI_PIPELINE",
575
+ CD_PIPELINE = "CD_PIPELINE",
576
+ WEBHOOK = "WEBHOOK",
577
+ LINKED_CD = "LINKED_CD"
578
+ }
579
+ export declare enum WorkflowNodeType {
580
+ GIT = "GIT",
581
+ CI = "CI",
582
+ WEBHOOK = "WEBHOOK",
583
+ PRE_CD = "PRECD",
584
+ CD = "CD",
585
+ POST_CD = "POSTCD"
571
586
  }
572
- export interface ChartVersionAndTypeSelectorProps {
573
- setSelectedChartRefId: React.Dispatch<React.SetStateAction<number>>;
587
+ export declare enum AddCDPositions {
588
+ LEFT = "left",
589
+ RIGHT = "right"
574
590
  }
575
- export interface InformationBarProps {
576
- text: string;
577
- className?: string;
578
- children?: React.ReactNode;
591
+ export interface SelectedNode {
592
+ nodeType: WorkflowNodeType;
593
+ id: string;
579
594
  }
580
- export interface CodeEditorInterface {
581
- value?: string;
582
- lineDecorationsWidth?: number;
583
- responseType?: string;
584
- onChange?: (string: any) => void;
585
- onBlur?: () => void;
586
- onFocus?: () => void;
587
- children?: any;
588
- defaultValue?: string;
589
- mode?: 'json' | 'yaml' | 'shell' | 'dockerfile' | 'plaintext';
590
- tabSize?: number;
591
- readOnly?: boolean;
592
- noParsing?: boolean;
593
- minHeight?: number;
594
- maxHeight?: number;
595
- inline?: boolean;
596
- height?: number | string;
597
- shebang?: string | JSX.Element;
598
- diffView?: boolean;
599
- loading?: boolean;
600
- customLoader?: JSX.Element;
601
- theme?: string;
602
- original?: string;
603
- focus?: boolean;
604
- validatorSchema?: any;
605
- isKubernetes?: boolean;
606
- cleanData?: boolean;
607
- chartVersion?: any;
608
- }
609
- export interface CodeEditorComposition {
610
- Header?: React.FC<any>;
611
- LanguageChanger?: React.FC<any>;
612
- ThemeChanger?: React.FC<any>;
613
- ValidationError?: React.FC<any>;
614
- Clipboard?: React.FC<any>;
615
- Warning?: React.FC<InformationBarProps>;
616
- ErrorBar?: React.FC<InformationBarProps>;
617
- Information?: React.FC<InformationBarProps>;
618
- }
619
- export interface CodeEditorHeaderComposition {
620
- LanguageChanger?: React.FC<any>;
621
- ThemeChanger?: React.FC<any>;
622
- ValidationError?: React.FC<any>;
623
- Clipboard?: React.FC<any>;
624
- }
625
- export interface CodeEditorHeaderInterface {
626
- children?: any;
627
- className?: string;
628
- hideDefaultSplitHeader?: boolean;
595
+ export declare enum AddPipelineType {
596
+ SEQUENTIAL = "SEQUENTIAL",
597
+ PARALLEL = "PARALLEL"
598
+ }
599
+ export interface Point {
600
+ x: number;
601
+ y: number;
602
+ }
603
+ export interface EdgeNodeType {
604
+ height: number;
605
+ width: number;
606
+ userApprovalConfig?: UserApprovalConfigType;
607
+ type?: any;
608
+ id?: number | string;
609
+ }
610
+ export interface EdgeEndNodeType extends EdgeNodeType {
611
+ userApprovalConfig?: UserApprovalConfigType;
629
612
  }
630
613
  export {};
@@ -42,5 +42,5 @@ export * from './Hooks';
42
42
  export { AppStatus } from './AppStatus';
43
43
  export * from './RJSF';
44
44
  export * from './DevtronProgressing';
45
- export { default as ChartVersionAndTypeSelector } from './ChartVersionAndTypeSelector';
45
+ export * from './AddCDButton';
46
46
  export * from './CustomInput';