@aristid/leav-types 1.7.0-989124ed → 1.7.0-9aed233e

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.
@@ -6,6 +6,7 @@ import { type ActionsListConfig } from '_types/actionsList';
6
6
  import { type ITreeElement } from '_types/tree';
7
7
  import { AttributeFormats, type AttributeTypes, type IAttributeVersionsConf, type IEmbeddedAttribute } from '../../../_types/attribute';
8
8
  import { type ITreePermissionsDependentValuesConf } from '_types/permissions';
9
+ import { type ISaveValue } from '_types/value';
9
10
  export interface IGlobalThis {
10
11
  guestUser: IE2EUserParams;
11
12
  nonAdminUser: IE2EUserParams;
@@ -67,6 +68,8 @@ export declare function gqlCreateRecord(library: string): Promise<string>;
67
68
  export declare function gqlAddElemToTree(treeId: string, element: ITreeElement, parent?: string | null, order?: number): Promise<string>;
68
69
  export declare function gqlGetValue(libraryId: string, recordId: string, attributeId: string): Promise<any>;
69
70
  export declare function gqlSaveValue(attributeId: string, libraryId: string, recordId: string, value: string | number): Promise<void>;
71
+ export declare function gqlSaveValueBis(attributeId: string, libraryId: string, recordId: string, value: ISaveValue): Promise<string | null>;
72
+ export declare function gqlDeleteValue(attributeId: string, libraryId: string, recordId: string, idValue: string | null): Promise<void>;
70
73
  export declare function gqlSaveVersionProfile(profileId: string, label: string, trees: string[]): Promise<void>;
71
74
  /**
72
75
  * Convert object to JSON, escaping quotes to be able to use it in a graphql query
@@ -26,7 +26,7 @@ export interface IActionsListContext extends IQueryInfos {
26
26
  library?: string;
27
27
  recordId?: string;
28
28
  }
29
- export type ActionsListParams<T extends string | number | symbol> = Record<T, any>;
29
+ export type ActionsListParams<T extends string | number | symbol> = Record<T, string>;
30
30
  export type ActionsListParamsConfig<ParamsRequired extends Record<string, boolean>> = {
31
31
  [Name in keyof ParamsRequired]: {
32
32
  name: Name;
@@ -24,6 +24,7 @@ export declare enum Errors {
24
24
  FORBIDDEN_KEY = "FORBIDDEN_KEY",
25
25
  FORMAT_ERROR = "FORMAT_ERROR",
26
26
  INVALID_ACTION_TYPE = "INVALID_ACTION_TYPE",
27
+ INVALID_ATTRIBUTE_TYPE = "INVALID_ATTRIBUTE_TYPE",
27
28
  INVALID_ATTRIBUTE_FILTER_FORMAT = "INVALID_ATTRIBUTE_FILTER_FORMAT",
28
29
  INVALID_ATTRIBUTE_FOR_LIBRARY = "INVALID_ATTRIBUTE_FOR_LIBRARY",
29
30
  INVALID_ATTRIBUTES = "INVALID_ATTRIBUTES",
@@ -81,6 +81,7 @@ export interface IRecordIdentity {
81
81
  getSubLabel?: () => Promise<string | null>;
82
82
  getColor?: () => Promise<string | null>;
83
83
  getPreview?: () => Promise<IPreview | null>;
84
+ getParentContext?: () => Promise<IRecordIdentity[] | null>;
84
85
  }
85
86
  export interface IRecordIdentityConf {
86
87
  label?: string;
@@ -88,6 +89,7 @@ export interface IRecordIdentityConf {
88
89
  preview?: string;
89
90
  treeColorPreview?: string;
90
91
  subLabel?: string;
92
+ parentContext?: string;
91
93
  }
92
94
  export interface IRecordUpdateEvent {
93
95
  record: IRecord;
@@ -7,8 +7,10 @@ interface IDeps {
7
7
  config: IConfig;
8
8
  'core.utils.logger': ILogger;
9
9
  }
10
- export default function ({ 'core.domain.helpers.calculationVariable': calculationVariable, 'core.utils.logger': logger, config, }: IDeps): IActionsListFunction<{
10
+ type ActionParams = {
11
11
  Formula: true;
12
12
  Description: true;
13
- }>;
13
+ ['Return only calculated value']: false;
14
+ };
15
+ export default function ({ 'core.domain.helpers.calculationVariable': calculationVariable, 'core.utils.logger': logger, config, }: IDeps): IActionsListFunction<ActionParams>;
14
16
  export {};
@@ -17,3 +17,4 @@ export { default as validateRegexAction } from './validateRegexAction';
17
17
  export { default as validateURLAction } from './validateURLAction';
18
18
  export { default as toUppercaseAction } from './toUppercaseAction';
19
19
  export { default as toLowercaseAction } from './toLowercaseAction';
20
+ export { default as replaceAnotherAttribute } from './replaceAnotherAttributeAction';
@@ -5,8 +5,10 @@ interface IDeps {
5
5
  'core.domain.helpers.calculationVariable'?: ICalculationVariable;
6
6
  'core.domain.attribute'?: IAttributeDomain;
7
7
  }
8
- export default function ({ 'core.domain.helpers.calculationVariable': calculationVariable, 'core.domain.attribute': attributeDomain, }?: IDeps): IActionsListFunction<{
8
+ type ActionParams = {
9
9
  Formula: true;
10
10
  Description: true;
11
- }>;
11
+ ['Return only calculated value']: false;
12
+ };
13
+ export default function ({ 'core.domain.helpers.calculationVariable': calculationVariable, 'core.domain.attribute': attributeDomain, }?: IDeps): IActionsListFunction<ActionParams>;
12
14
  export {};
@@ -0,0 +1,13 @@
1
+ import { type IAttributeDomain } from 'domain/attribute/attributeDomain';
2
+ import { type IValueDomain } from 'domain/value/valueDomain';
3
+ import { type IActionsListFunction } from '../../_types/actionsList';
4
+ import { type IUtils } from 'utils/utils';
5
+ interface IDeps {
6
+ 'core.domain.value'?: IValueDomain;
7
+ 'core.domain.attribute'?: IAttributeDomain;
8
+ 'core.utils': IUtils;
9
+ }
10
+ export default function ({ 'core.domain.value': valueDomain, 'core.domain.attribute': attributeDomain, 'core.utils': utils, }: IDeps): IActionsListFunction<{
11
+ attributePath: true;
12
+ }>;
13
+ export {};
@@ -9,6 +9,7 @@ export interface IDeleteValueParams {
9
9
  attribute: string;
10
10
  value?: IValue;
11
11
  skipReadonly?: boolean;
12
+ skipActions?: boolean;
12
13
  ctx: IQueryInfos;
13
14
  }
14
15
  export interface IRunActionListParams {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.7.0-989124ed",
3
+ "version": "1.7.0-9aed233e",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",