@devtron-labs/devtron-fe-common-lib 0.5.0-beta-1 → 0.5.0-beta-3
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.
- package/dist/Common/Constants.d.ts +0 -3
- package/dist/Common/Helper.d.ts +1 -0
- package/dist/Common/Toggle/Toggle.d.ts +2 -1
- package/dist/Common/Types.d.ts +6 -2
- package/dist/Pages/App/AppConfigurations/index.d.ts +1 -0
- package/dist/Pages/App/AppConfigurations/utils.d.ts +2 -0
- package/dist/Pages/{Applications/DevtronApps/Details → App}/index.d.ts +0 -1
- package/dist/Pages/{Applications/DevtronApps/Details/CDPipeline → CDPipeline}/types.d.ts +4 -4
- package/dist/Pages/index.d.ts +2 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiff.d.ts +2 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/DeploymentHistoryConfigDiffCompare.d.ts +2 -0
- package/dist/Shared/Components/CICDHistory/{DeploymentHistoryDiff → DeploymentHistoryConfigDiff}/DeploymentHistoryDiffView.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/helpers.d.ts +6 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/index.d.ts +2 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/types.d.ts +35 -0
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryConfigDiff/utils.d.ts +20 -0
- package/dist/Shared/Components/CICDHistory/TriggerOutput.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/index.d.ts +1 -1
- package/dist/Shared/Components/CICDHistory/types.d.ts +3 -4
- package/dist/Shared/Components/Collapse/Collapse.d.ts +6 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.component.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.constants.d.ts +6 -0
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.types.d.ts +28 -12
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiff.utils.d.ts +3 -2
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffAccordion.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffMain.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/DeploymentConfigDiffNavigation.d.ts +1 -1
- package/dist/Shared/Components/DeploymentConfigDiff/index.d.ts +1 -0
- package/dist/Shared/Components/SelectPicker/type.d.ts +8 -3
- package/dist/Shared/Components/TabGroup/TabGroup.types.d.ts +1 -9
- package/dist/Shared/Components/index.d.ts +0 -1
- package/dist/Shared/Helpers.d.ts +13 -0
- package/dist/Shared/Hooks/useForm/useForm.d.ts +26 -29
- package/dist/Shared/Hooks/useForm/useForm.types.d.ts +8 -15
- package/dist/Shared/Hooks/useForm/useForm.utils.d.ts +1 -1
- package/dist/Shared/Services/app.service.d.ts +4 -1
- package/dist/Shared/Services/app.types.d.ts +53 -42
- package/dist/Shared/constants.d.ts +1 -3
- package/dist/Shared/types.d.ts +0 -12
- package/dist/assets/index.css +1 -1
- package/dist/{cssMode-CcDx4N1V.js → cssMode-BlfpXcRK.js} +1 -1
- package/dist/{freemarker2-DeqGz2I9.js → freemarker2-BOScfwOt.js} +1 -1
- package/dist/{handlebars-DqyEZAW0.js → handlebars-Il5XTYBA.js} +1 -1
- package/dist/{html-Dbv5mKnu.js → html-DVAN4oVg.js} +1 -1
- package/dist/{htmlMode-DKIS0Wp1.js → htmlMode-2cUDXYNV.js} +1 -1
- package/dist/{index-Bk95C8WS.js → index-BDmJgeUH.js} +29265 -29170
- package/dist/index.js +523 -536
- package/dist/{javascript-CcKm78Rp.js → javascript-CsvkGfDF.js} +1 -1
- package/dist/{jsonMode-D9SaAYqJ.js → jsonMode-D2OkD684.js} +1 -1
- package/dist/{liquid-DYLkezXd.js → liquid-Ca0-mc8F.js} +1 -1
- package/dist/{mdx-B8NW5l-H.js → mdx-C5kuaEoV.js} +1 -1
- package/dist/{python-fSby07Yv.js → python-CRaFJp_v.js} +1 -1
- package/dist/{razor-fivLNmXW.js → razor-DQ6-9JDC.js} +1 -1
- package/dist/{tsMode-c6h3SHwD.js → tsMode-Q7tQMIUt.js} +1 -1
- package/dist/{typescript-MiiYpzPG.js → typescript-ChSyq2A2.js} +1 -1
- package/dist/{xml-DVLT2zo0.js → xml-Bt9p71cu.js} +1 -1
- package/dist/{yaml-BGAuLRlJ.js → yaml-6FqY-tTr.js} +1 -1
- package/package.json +1 -1
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/DTApplicationMetricsFormField.d.ts +0 -3
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/constants.d.ts +0 -2
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/index.d.ts +0 -4
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/service.d.ts +0 -4
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/DeploymentTemplate/types.d.ts +0 -171
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/OverrideStrategyTippyContent.d.ts +0 -2
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/constants.d.ts +0 -5
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/index.d.ts +0 -5
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/types.d.ts +0 -27
- package/dist/Pages/Applications/DevtronApps/Details/AppConfigurations/utils.d.ts +0 -2
- package/dist/Pages/Applications/DevtronApps/index.d.ts +0 -1
- package/dist/Pages/Applications/index.d.ts +0 -1
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryConfigList.component.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryDetailedView.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistoryHeader.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/DeploymentHistorySidebar.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/index.d.ts +0 -3
- package/dist/Shared/Components/CICDHistory/DeploymentHistoryDiff/types.d.ts +0 -35
- package/dist/Shared/Components/InvalidYAMLTippy/InvalidYAMLTippyWrapper.d.ts +0 -3
- package/dist/Shared/Components/InvalidYAMLTippy/constants.d.ts +0 -1
- package/dist/Shared/Components/InvalidYAMLTippy/index.d.ts +0 -2
- package/dist/Shared/Components/InvalidYAMLTippy/types.d.ts +0 -6
- package/dist/Shared/Components/InvalidYAMLTippy/utils.d.ts +0 -2
- package/dist/Shared/Components/SelectPicker/constants.d.ts +0 -5
- /package/dist/Pages/{Applications/DevtronApps/Details/CDPipeline → CDPipeline}/index.d.ts +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FormEvent } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* Describes the "required" validation rule.
|
|
4
4
|
* It can be a simple boolean or an object containing a boolean value and an error message.
|
|
@@ -24,10 +24,10 @@ type ValidationPattern = {
|
|
|
24
24
|
* If validation fails, an error message is provided.
|
|
25
25
|
*/
|
|
26
26
|
type ValidationCustom = {
|
|
27
|
-
isValid: (value:
|
|
27
|
+
isValid: (value: string) => boolean;
|
|
28
28
|
message: string;
|
|
29
29
|
} | {
|
|
30
|
-
isValid: (value:
|
|
30
|
+
isValid: (value: string) => boolean;
|
|
31
31
|
message: string;
|
|
32
32
|
}[];
|
|
33
33
|
/**
|
|
@@ -41,9 +41,9 @@ export interface UseFormValidation {
|
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* Represents the structure for form validation errors.
|
|
44
|
-
* Maps each field to an array of error messages.
|
|
44
|
+
* Maps each field to an error message or an array of error messages.
|
|
45
45
|
*/
|
|
46
|
-
export type UseFormErrors<T> = Partial<Record<keyof T, string[]>>;
|
|
46
|
+
export type UseFormErrors<T> = Partial<Record<keyof T, string | string[]>>;
|
|
47
47
|
/**
|
|
48
48
|
* Represents the fields that have been modified ("dirty") in the form.
|
|
49
49
|
* Maps each field to a boolean value indicating whether it has been changed.
|
|
@@ -58,19 +58,12 @@ export type TouchedFields<T> = Partial<Record<keyof T, boolean>>;
|
|
|
58
58
|
* Defines the structure for form validations.
|
|
59
59
|
* Maps each form field to its corresponding validation rules.
|
|
60
60
|
*/
|
|
61
|
-
export type UseFormValidations<T extends {}> =
|
|
61
|
+
export type UseFormValidations<T extends {}> = Partial<Record<keyof T, UseFormValidation>>;
|
|
62
62
|
/**
|
|
63
63
|
* Describes the function signature for handling form submission.
|
|
64
64
|
*
|
|
65
65
|
* @param data - The form data collected during submission.
|
|
66
|
-
* @param e - The event, optionally passed when
|
|
66
|
+
* @param e - The form event, optionally passed when the form is submitted.
|
|
67
67
|
*/
|
|
68
|
-
export type UseFormSubmitHandler<T extends {}> = (data: T, e?:
|
|
69
|
-
/**
|
|
70
|
-
* A type defining the function signature for handling form validation errors.
|
|
71
|
-
*
|
|
72
|
-
* @param errors - An object containing the validation errors for form fields.
|
|
73
|
-
* @param e - The event, optionally passed when `handleSubmit` is called.
|
|
74
|
-
*/
|
|
75
|
-
export type UseFormErrorHandler<T extends {}> = (errors: UseFormErrors<T>, e?: BaseSyntheticEvent) => void;
|
|
68
|
+
export type UseFormSubmitHandler<T extends {}> = (data: T, e?: FormEvent<HTMLFormElement>) => void;
|
|
76
69
|
export {};
|
|
@@ -7,4 +7,4 @@ import { UseFormValidation } from './useForm.types';
|
|
|
7
7
|
* @param validation - The validation rules for the form field.
|
|
8
8
|
* @returns Returns error message(s) or null if valid.
|
|
9
9
|
*/
|
|
10
|
-
export declare const checkValidation: <T extends Record<keyof T, any> = {}>(value: T[keyof T], validation: UseFormValidation) => string[] | null;
|
|
10
|
+
export declare const checkValidation: <T extends Record<keyof T, any> = {}>(value: T[keyof T], validation: UseFormValidation) => string | string[] | null;
|
|
@@ -5,4 +5,7 @@ export declare const getCITriggerInfo: (params: GetCITriggerInfoParamsType) => P
|
|
|
5
5
|
* The only difference between this and getCITriggerInfo is it doesn't have env and trigger related meta info
|
|
6
6
|
*/
|
|
7
7
|
export declare const getArtifactInfo: (params: Pick<GetCITriggerInfoParamsType, "ciArtifactId">) => Promise<CIMaterialInfoType>;
|
|
8
|
-
export declare const getAppEnvDeploymentConfig: (params
|
|
8
|
+
export declare const getAppEnvDeploymentConfig: ({ params, signal, }: {
|
|
9
|
+
params: AppEnvDeploymentConfigPayloadType;
|
|
10
|
+
signal?: AbortSignal;
|
|
11
|
+
}) => Promise<ResponseType<AppEnvDeploymentConfigDTO>>;
|
|
@@ -99,23 +99,12 @@ export declare enum AppEnvDeploymentConfigType {
|
|
|
99
99
|
PREVIOUS_DEPLOYMENTS = "PreviousDeployments",
|
|
100
100
|
DEFAULT_VERSION = "DefaultVersion"
|
|
101
101
|
}
|
|
102
|
-
export declare enum DraftState {
|
|
103
|
-
Init = 1,
|
|
104
|
-
Discarded = 2,
|
|
105
|
-
Published = 3,
|
|
106
|
-
AwaitApproval = 4
|
|
107
|
-
}
|
|
108
|
-
export declare enum DraftAction {
|
|
109
|
-
Add = 1,
|
|
110
|
-
Update = 2,
|
|
111
|
-
Delete = 3
|
|
112
|
-
}
|
|
113
102
|
export interface DraftMetadataDTO {
|
|
114
103
|
appId: number;
|
|
115
104
|
envId: number;
|
|
116
105
|
resource: number;
|
|
117
106
|
resourceName: string;
|
|
118
|
-
action:
|
|
107
|
+
action: number;
|
|
119
108
|
data: string;
|
|
120
109
|
userComment: string;
|
|
121
110
|
changeProposed: boolean;
|
|
@@ -124,44 +113,32 @@ export interface DraftMetadataDTO {
|
|
|
124
113
|
};
|
|
125
114
|
draftId: number;
|
|
126
115
|
draftVersionId: number;
|
|
127
|
-
draftState:
|
|
116
|
+
draftState: number;
|
|
117
|
+
draftResolvedValue: string;
|
|
128
118
|
approvers: string[];
|
|
129
119
|
canApprove: boolean;
|
|
130
120
|
commentsCount: number;
|
|
131
121
|
dataEncrypted: boolean;
|
|
132
122
|
isAppAdmin: boolean;
|
|
133
123
|
}
|
|
134
|
-
export declare enum CMSecretExternalType {
|
|
135
|
-
Internal = "",
|
|
136
|
-
KubernetesConfigMap = "KubernetesConfigMap",
|
|
137
|
-
KubernetesSecret = "KubernetesSecret",
|
|
138
|
-
AWSSecretsManager = "AWSSecretsManager",
|
|
139
|
-
AWSSystemManager = "AWSSystemManager",
|
|
140
|
-
HashiCorpVault = "HashiCorpVault",
|
|
141
|
-
ESO_GoogleSecretsManager = "ESO_GoogleSecretsManager",
|
|
142
|
-
ESO_AWSSecretsManager = "ESO_AWSSecretsManager",
|
|
143
|
-
ESO_AzureSecretsManager = "ESO_AzureSecretsManager",
|
|
144
|
-
ESO_HashiCorpVault = "ESO_HashiCorpVault"
|
|
145
|
-
}
|
|
146
124
|
export interface ConfigDatum {
|
|
147
125
|
name: string;
|
|
148
126
|
type: string;
|
|
149
127
|
external: boolean;
|
|
150
|
-
data: Record<string,
|
|
151
|
-
defaultData: Record<string,
|
|
128
|
+
data: Record<string, string>;
|
|
129
|
+
defaultData: Record<string, string>;
|
|
152
130
|
global: boolean;
|
|
153
|
-
externalType:
|
|
154
|
-
esoSecretData:
|
|
155
|
-
defaultESOSecretData:
|
|
156
|
-
secretData: Record<string,
|
|
157
|
-
defaultSecretData: Record<string,
|
|
131
|
+
externalType: string;
|
|
132
|
+
esoSecretData: {};
|
|
133
|
+
defaultESOSecretData: {};
|
|
134
|
+
secretData: Record<string, string>;
|
|
135
|
+
defaultSecretData: Record<string, string>;
|
|
158
136
|
roleARN: string;
|
|
159
137
|
subPath: boolean;
|
|
160
138
|
filePermission: string;
|
|
161
139
|
overridden: boolean;
|
|
162
|
-
mountPath
|
|
163
|
-
defaultMountPath
|
|
164
|
-
esoSubPath: string[];
|
|
140
|
+
mountPath?: string;
|
|
141
|
+
defaultMountPath?: string;
|
|
165
142
|
}
|
|
166
143
|
export interface ConfigMapSecretDataConfigDatumDTO extends ConfigDatum {
|
|
167
144
|
draftMetadata: DraftMetadataDTO;
|
|
@@ -174,26 +151,40 @@ export interface ConfigMapSecretDataType {
|
|
|
174
151
|
export declare enum ConfigResourceType {
|
|
175
152
|
ConfigMap = "ConfigMap",
|
|
176
153
|
Secret = "Secret",
|
|
177
|
-
DeploymentTemplate = "Deployment Template"
|
|
154
|
+
DeploymentTemplate = "Deployment Template",
|
|
155
|
+
PipelineStrategy = "Pipeline Strategy"
|
|
178
156
|
}
|
|
179
157
|
export interface DeploymentTemplateDTO {
|
|
180
158
|
resourceType: ConfigResourceType.DeploymentTemplate;
|
|
181
|
-
data:
|
|
182
|
-
[key: string]: any;
|
|
183
|
-
};
|
|
159
|
+
data: Record<string, any>;
|
|
184
160
|
deploymentDraftData: ConfigMapSecretDataType | null;
|
|
161
|
+
variableSnapshot: {
|
|
162
|
+
'Deployment Template': Record<string, string>;
|
|
163
|
+
};
|
|
164
|
+
templateVersion: string;
|
|
165
|
+
isAppMetricsEnabled?: true;
|
|
166
|
+
resolvedValue: Record<string, any>;
|
|
185
167
|
}
|
|
186
168
|
export interface ConfigMapSecretDataDTO {
|
|
187
169
|
resourceType: Extract<ConfigResourceType, ConfigResourceType.ConfigMap | ConfigResourceType.Secret>;
|
|
188
170
|
data: ConfigMapSecretDataType;
|
|
171
|
+
variableSnapshot: Record<string, Record<string, string>>;
|
|
172
|
+
resolvedValue: string;
|
|
173
|
+
}
|
|
174
|
+
export interface PipelineConfigDataDTO {
|
|
175
|
+
resourceType: ConfigResourceType.PipelineStrategy;
|
|
176
|
+
data: Record<string, any>;
|
|
177
|
+
pipelineTriggerType: string;
|
|
178
|
+
Strategy: string;
|
|
189
179
|
}
|
|
190
180
|
export interface AppEnvDeploymentConfigDTO {
|
|
191
181
|
deploymentTemplate: DeploymentTemplateDTO | null;
|
|
192
182
|
configMapData: ConfigMapSecretDataDTO | null;
|
|
193
183
|
secretsData: ConfigMapSecretDataDTO | null;
|
|
184
|
+
pipelineConfigData?: PipelineConfigDataDTO;
|
|
194
185
|
isAppAdmin: boolean;
|
|
195
186
|
}
|
|
196
|
-
export
|
|
187
|
+
export type AppEnvDeploymentConfigPayloadType = {
|
|
197
188
|
appName: string;
|
|
198
189
|
envName: string;
|
|
199
190
|
configType: AppEnvDeploymentConfigType;
|
|
@@ -202,7 +193,14 @@ export interface AppEnvDeploymentConfigPayloadType {
|
|
|
202
193
|
resourceType?: ConfigResourceType;
|
|
203
194
|
resourceId?: number;
|
|
204
195
|
resourceName?: string;
|
|
205
|
-
|
|
196
|
+
configArea?: 'AppConfiguration';
|
|
197
|
+
} | {
|
|
198
|
+
appName: string;
|
|
199
|
+
envName: string;
|
|
200
|
+
pipelineId: number;
|
|
201
|
+
configArea: 'CdRollback' | 'DeploymentHistory';
|
|
202
|
+
wfrId: number;
|
|
203
|
+
};
|
|
206
204
|
export declare enum TemplateListType {
|
|
207
205
|
DefaultVersions = 1,
|
|
208
206
|
PublishedOnEnvironments = 2,
|
|
@@ -220,11 +218,24 @@ export interface TemplateListDTO {
|
|
|
220
218
|
finishedOn?: string;
|
|
221
219
|
status?: string;
|
|
222
220
|
pipelineId?: number;
|
|
221
|
+
wfrId?: number;
|
|
222
|
+
}
|
|
223
|
+
export interface ManifestTemplateDTO {
|
|
224
|
+
data: string;
|
|
225
|
+
resolvedData: string;
|
|
226
|
+
variableSnapshot: null;
|
|
227
|
+
}
|
|
228
|
+
export declare enum DraftState {
|
|
229
|
+
Init = 1,
|
|
230
|
+
Discarded = 2,
|
|
231
|
+
Published = 3,
|
|
232
|
+
AwaitApproval = 4
|
|
223
233
|
}
|
|
224
234
|
export declare enum EnvResourceType {
|
|
225
235
|
ConfigMap = "configmap",
|
|
226
236
|
Secret = "secrets",
|
|
227
237
|
DeploymentTemplate = "deployment-template",
|
|
228
|
-
Manifest = "manifest"
|
|
238
|
+
Manifest = "manifest",
|
|
239
|
+
PipelineStrategy = "pipeline-strategy"
|
|
229
240
|
}
|
|
230
241
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OptionType } from '../Common/Types';
|
|
2
|
-
import { CDMaterialSidebarType
|
|
2
|
+
import { CDMaterialSidebarType } from './types';
|
|
3
3
|
export declare const ARTIFACT_STATUS: {
|
|
4
4
|
PROGRESSING: string;
|
|
5
5
|
DEGRADED: string;
|
|
@@ -411,5 +411,3 @@ export declare enum SelectAllGroupedResourceIdentifiers {
|
|
|
411
411
|
}
|
|
412
412
|
export declare const CD_MATERIAL_SIDEBAR_TABS: OptionType<CDMaterialSidebarType, CDMaterialSidebarType>[];
|
|
413
413
|
export declare const TRIGGER_STATUS_PROGRESSING: string[];
|
|
414
|
-
export declare const CONFIGURATION_TYPE_VALUES: ConfigurationType[];
|
|
415
|
-
export declare const DEFAULT_LOCKED_KEYS_CONFIG: Readonly<ConfigKeysWithLockType>;
|
package/dist/Shared/types.d.ts
CHANGED
|
@@ -572,18 +572,6 @@ export type BaseFilterQueryParams<T> = {
|
|
|
572
572
|
*/
|
|
573
573
|
showAll?: boolean;
|
|
574
574
|
} & SortingParams<T>;
|
|
575
|
-
export declare enum ConfigurationType {
|
|
576
|
-
GUI = "GUI",
|
|
577
|
-
YAML = "YAML"
|
|
578
|
-
}
|
|
579
|
-
export interface BaseURLParams {
|
|
580
|
-
appId: string;
|
|
581
|
-
envId: string;
|
|
582
|
-
}
|
|
583
|
-
export interface ConfigKeysWithLockType {
|
|
584
|
-
config: string[];
|
|
585
|
-
allowed: boolean;
|
|
586
|
-
}
|
|
587
575
|
export type DataAttributes = Record<`data-${string}`, unknown>;
|
|
588
576
|
export interface RuntimeParamsListItemType extends KeyValueListType {
|
|
589
577
|
id: number;
|