@devtron-labs/devtron-fe-common-lib 0.0.75-beta-29 → 0.0.76

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.
@@ -2,7 +2,6 @@ import { MutableRefObject } from 'react';
2
2
  import { ResponseType, APIOptions } from './Types';
3
3
  export declare const post: (url: string, data: object, options?: APIOptions, isMultipartRequest?: boolean) => Promise<ResponseType>;
4
4
  export declare const put: (url: string, data: object, options?: APIOptions) => Promise<ResponseType>;
5
- export declare const patch: (url: string, data: object, options?: APIOptions) => Promise<ResponseType>;
6
5
  export declare const get: (url: string, options?: APIOptions) => Promise<ResponseType>;
7
6
  export declare const trash: (url: string, data?: object, options?: APIOptions) => Promise<ResponseType>;
8
7
  /**
@@ -44,7 +44,7 @@ export declare const processDeployedTime: (lastDeployed: any, isArgoInstalled: a
44
44
  * @param url URL to which the search params needs to be added
45
45
  * @param params Object for the search parameters
46
46
  */
47
- export declare const getUrlWithSearchParams: (url: string, params?: Record<string | number, any>) => string;
47
+ export declare const getUrlWithSearchParams: (url: string, params: Record<string | number, any>) => string;
48
48
  /**
49
49
  * Custom exception logger function for logging errors to sentry
50
50
  */
@@ -3,4 +3,3 @@ export * from './validations';
3
3
  export * from './Helpers';
4
4
  export * from './types';
5
5
  export * from './Providers';
6
- export * from './constants';
@@ -1,4 +1,3 @@
1
- import { PatchOperationType } from './constants';
2
1
  export interface RuntimeParamsAPIResponseType {
3
2
  envVariables: Record<string, string>;
4
3
  }
@@ -9,63 +8,3 @@ export declare enum CIMaterialSidebarType {
9
8
  CODE_SOURCE = "Code Source",
10
9
  PARAMETERS = "Parameters"
11
10
  }
12
- /**
13
- * @example Usage with specific enum for path & `unknown` type for value
14
- * ```ts
15
- * enum PatchKeys {
16
- * name = 'name',
17
- * description = 'description',
18
- * }
19
- *
20
- * const query: PatchQueryType<PatchKeys> = {
21
- * op: PatchOperationType.replace,
22
- * path: PatchKeys.name,
23
- * value: '1'
24
- * }
25
- * ```
26
- *
27
- * @example Usage with specific enum for path & custom type for value
28
- * ```ts
29
- * enum PatchKeys {
30
- * name = 'name',
31
- * description = 'description',
32
- * }
33
- *
34
- * const query: PatchQueryType<PatchKeys, number> = {
35
- * op: PatchOperationType.replace,
36
- * path: PatchKeys.name,
37
- * value: 1
38
- * }
39
- * ```
40
- *
41
- * @example Usage with `PatchOperationType.remove`
42
- * Note: We cannot add value to remove operation
43
- *
44
- * ```ts
45
- * const query: PatchQueryType<string> = {
46
- * op: PatchOperationType.remove,
47
- * path: 'name'
48
- * }
49
- * ```
50
- */
51
- export type PatchQueryType<T extends string, K = unknown> = {
52
- /**
53
- * The path of the json to be patched
54
- */
55
- path: T;
56
- } & ({
57
- /**
58
- * Operation type for patch
59
- */
60
- op: PatchOperationType.replace;
61
- /**
62
- * Corresponding value for the operation
63
- */
64
- value: K;
65
- } | {
66
- /**
67
- * Operation type for patch
68
- */
69
- op: PatchOperationType.remove;
70
- value?: never;
71
- });
@@ -2,16 +2,6 @@ export interface ValidationResponseType {
2
2
  isValid: boolean;
3
3
  message?: string;
4
4
  }
5
- export declare const MESSAGES: {
6
- PROVIDE_A_NUMBER: string;
7
- LOWERCASE_ALPHANUMERIC: string;
8
- CAN_NOT_START_END_WITH_SEPARATORS: string;
9
- getMinMaxCharMessage: (min: number, max: number) => string;
10
- getMaxCharMessage: (max: number) => string;
11
- VALID_POSITIVE_NUMBER: string;
12
- VALID_POSITIVE_INTEGER: string;
13
- MAX_SAFE_INTEGER: string;
14
- };
15
5
  export declare const validateName: (name: string) => ValidationResponseType;
16
6
  export declare const validateDescription: (description: string) => ValidationResponseType;
17
7
  export declare const validateRequiredPositiveNumber: (value: string | number) => ValidationResponseType;
package/dist/index.d.ts CHANGED
@@ -49,7 +49,7 @@ export interface customEnv {
49
49
  ENABLE_EXTERNAL_ARGO_CD: boolean;
50
50
  API_BATCH_SIZE: number;
51
51
  SERVICE_WORKER_TIMEOUT?: string;
52
- HIDE_RELEASES?: boolean;
52
+ FEATURE_USER_DEFINED_GITOPS_REPO_ENABLE: boolean;
53
53
  }
54
54
  declare global {
55
55
  interface Window {