@aristid/leav-types 1.13.0-6929b19b → 1.13.0-6c03dd61

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/CLAUDE.md CHANGED
@@ -15,8 +15,8 @@ depuis `apps/core`, destinée aux **développeurs de plugins** qui étendent le
15
15
  Publié automatiquement sur **npm public** (`@aristid/leav-types`) via GitLab CI,
16
16
  déclenché par tout changement dans `apps/core/**/*` :
17
17
 
18
- - **`next`** — à chaque push sur `develop`
19
- - **`latest`** — sur les releases taguées
18
+ - **`next`** — à chaque push sur `develop`
19
+ - **`latest`** — sur les releases taguées
20
20
 
21
21
  ```bash
22
22
  # Commande de génération (lancée par le CI)
@@ -35,10 +35,10 @@ export declare enum SyncAutomationRuleEventAction {
35
35
  RECORD_INIT = "RECORD_INIT"
36
36
  }
37
37
  export type AutomationRuleEventAction = EventAction | SyncAutomationRuleEventAction;
38
- export type AutomationRulesEventTopic = IDbPayload['topic'];
38
+ export type AutomationRuleEventTopic = IDbPayload['topic'];
39
39
  export type AutomationRuleTrigger = {
40
40
  synchronous: boolean;
41
41
  eventAction: AutomationRuleEventAction;
42
- eventTopic?: AutomationRulesEventTopic;
42
+ eventTopic?: AutomationRuleEventTopic;
43
43
  };
44
44
  export type AutomationRuleIndexEntry = Pick<IAutomationRule, 'id' | 'trigger'>;
@@ -1,4 +1,4 @@
1
- import { type ICreateAutomationRule, type IAutomationRule, type IUpdateAutomationRule, type AutomationRulesEventTopic, type AutomationRuleEventAction, type AutomationRuleJsonSchemaFormType } from '../../_types/automation';
1
+ import { type ICreateAutomationRule, type IAutomationRule, type IUpdateAutomationRule, type AutomationRuleEventTopic, type AutomationRuleEventAction, type AutomationRuleJsonSchemaFormType } from '../../_types/automation';
2
2
  import { type IList } from '../../_types/list';
3
3
  import { type IQueryInfos } from '../../_types/queryInfos';
4
4
  import { type IGetCoreEntitiesParams } from '../../_types/shared';
@@ -18,13 +18,13 @@ export interface IGetAutomationRulesParams extends IGetCoreEntitiesParams {
18
18
  active?: boolean;
19
19
  synchronous?: boolean;
20
20
  eventAction?: AutomationRuleEventAction;
21
- eventTopic?: AutomationRulesEventTopic;
21
+ eventTopic?: AutomationRuleEventTopic;
22
22
  };
23
23
  }
24
24
  interface ITriggerRulesParams {
25
25
  event: {
26
- action: IAutomationRule['trigger']['eventAction'];
27
- topic?: IAutomationRule['trigger']['eventTopic'];
26
+ action: AutomationRuleEventAction;
27
+ topic?: AutomationRuleEventTopic;
28
28
  };
29
29
  synchronous: boolean;
30
30
  ctx: IQueryInfos;
@@ -1,4 +1,4 @@
1
- import { type AutomationRuleEventAction, type AutomationRulesEventTopic, type IAutomationRule } from '../../_types/automation';
1
+ import { type AutomationRuleEventAction, type AutomationRuleEventTopic, type IAutomationRule } from '../../_types/automation';
2
2
  import { type IConfig } from '../../_types/config';
3
3
  import { type IQueryInfos } from '../../_types/queryInfos';
4
4
  import { type IAutomationRuleRepo } from '../../infra/automation/automationRuleRepo';
@@ -54,7 +54,7 @@ export declare const ruleCacheKey: (id: string) => string;
54
54
  export interface IAutomationRulesCache {
55
55
  getRulesToTrigger(event: {
56
56
  action: AutomationRuleEventAction;
57
- topic?: AutomationRulesEventTopic;
57
+ topic?: AutomationRuleEventTopic;
58
58
  }, synchronous: boolean, ctx: IQueryInfos): Promise<IAutomationRule[]>;
59
59
  invalidate(ruleId?: string): Promise<void>;
60
60
  }
@@ -1,7 +1,7 @@
1
- import { type AutomationRuleEventAction, type AutomationRulesEventTopic, type IAutomationRule } from '../../_types/automation';
1
+ import { type AutomationRuleEventAction, type AutomationRuleEventTopic, type IAutomationRule } from '../../_types/automation';
2
2
  import { type IQueryInfos } from '../../_types/queryInfos';
3
3
  export declare const TRIGGER_FAKER_RULES_FOR_DEV = false;
4
4
  export declare const buildFakeRulesToTrigger: (event: {
5
5
  action: AutomationRuleEventAction;
6
- topic?: AutomationRulesEventTopic;
6
+ topic?: AutomationRuleEventTopic;
7
7
  }, synchronous: boolean, ctx: IQueryInfos) => Promise<IAutomationRule[]>;
@@ -1,10 +1,10 @@
1
1
  import { type ZodType } from 'zod';
2
- import { type AutomationRuleEventAction, type AutomationRulesEventTopic } from '../../../_types/automation';
2
+ import { type AutomationRuleEventAction, type AutomationRuleEventTopic } from '../../../_types/automation';
3
3
  import { type IAutomationTriggersTopics } from './automationTriggersTopics';
4
4
  import { AutomationTriggerDefSynchronicity } from './_types';
5
5
  type AutomationTriggerRegistration = {
6
6
  eventAction: AutomationRuleEventAction;
7
- topicSchema: ZodType<Partial<AutomationRulesEventTopic>>;
7
+ topicSchema: ZodType<Partial<AutomationRuleEventTopic>>;
8
8
  synchronicity: AutomationTriggerDefSynchronicity;
9
9
  };
10
10
  export interface IAutomationTriggersRegistry {
@@ -5,9 +5,9 @@ import { type IValidateHelper } from '../../helpers/validate';
5
5
  export interface IAutomationTriggersTopics {
6
6
  librarySchema: ZodType<string>;
7
7
  attributeSchema: ZodType<string>;
8
- libraryAndAttributeSchema: ZodType<{
8
+ libraryAndOptAttributeSchema: ZodType<{
9
9
  library: string;
10
- attribute: string;
10
+ attribute?: string;
11
11
  }>;
12
12
  }
13
13
  export interface IAutomationTriggersTopicsDeps {
@@ -1,6 +1,7 @@
1
1
  import { type IEventsManagerDomain } from '../eventsManager/eventsManagerDomain';
2
2
  import { type UpdateRecordLastModifFunc } from '../helpers/updateRecordLastModif';
3
3
  import { type SendRecordUpdateEventHelper } from '../record/helpers/sendRecordUpdateEvent';
4
+ import { type IAutomationDomain } from '../automation/automationDomain';
4
5
  import { type IElementAncestorsHelper } from '../tree/helpers/elementAncestors';
5
6
  import { type IGetDefaultElementHelper } from '../tree/helpers/getDefaultElement';
6
7
  import { type ITreeDomain } from '../tree/treeDomain';
@@ -126,6 +127,7 @@ export interface IValueDomainDeps {
126
127
  config: Config.IConfig;
127
128
  'core.domain.actionsList': IActionsListDomain;
128
129
  'core.domain.attribute': IAttributeDomain;
130
+ 'core.domain.automation': IAutomationDomain;
129
131
  'core.domain.permission.attributeDependentValues': IAttributeDependentValuesPermissionDomain;
130
132
  'core.domain.permission.recordAttribute': IRecordAttributePermissionDomain;
131
133
  'core.domain.permission.record': IRecordPermissionDomain;
@@ -152,5 +154,5 @@ export interface IValueDomainDeps {
152
154
  'core.utils.logger': ILogger;
153
155
  'core.domain.tree': ITreeDomain;
154
156
  }
155
- declare const valueDomain: ({ config, "core.domain.actionsList": actionsListDomain, "core.domain.attribute": attributeDomain, "core.domain.permission.attributeDependentValues": attributeDependentValuesPermissionDomain, "core.domain.permission.recordAttribute": recordAttributePermissionDomain, "core.domain.permission.record": recordPermissionDomain, "core.domain.eventsManager": eventsManager, "core.domain.helpers.validate": validate, "core.domain.helpers.updateRecordLastModif": updateRecordLastModif, "core.domain.tree.helpers.elementAncestors": elementAncestors, "core.domain.tree.helpers.getDefaultElement": getDefaultElementHelper, "core.domain.record.helpers.sendRecordUpdateEvent": sendRecordUpdateEvent, "core.domain.record.helpers.createRecord": createRecordHelper, "core.domain.record.helpers.getRecordIdentity": getRecordIdentity, "core.domain.value.helpers.getRecordFieldValue": getRecordFieldValueHelper, "core.domain.value.helpers.getValues": getValuesHelper, "core.domain.value.helpers.runActionsList": runActionsListHelper, "core.domain.value.helpers.formatValue": formatValueHelper, "core.domain.record.helpers.findRecords": findRecordsHelper, "core.domain.permission.helpers.recordInCreationBypass": recordInCreationBypassHelper, "core.domain.attribute.helpers.ifLibraryJoinLinkAttribute": ifLibraryJoinLinkAttribute, "core.domain.versionProfile": versionProfileDomain, "core.infra.record": recordRepo, "core.infra.tree": treeRepo, "core.infra.value": valueRepo, "core.utils": utils, "core.utils.logger": logger, }: IValueDomainDeps) => IValueDomain;
157
+ declare const valueDomain: ({ config, "core.domain.actionsList": actionsListDomain, "core.domain.attribute": attributeDomain, "core.domain.automation": automationDomain, "core.domain.permission.attributeDependentValues": attributeDependentValuesPermissionDomain, "core.domain.permission.recordAttribute": recordAttributePermissionDomain, "core.domain.permission.record": recordPermissionDomain, "core.domain.eventsManager": eventsManager, "core.domain.helpers.validate": validate, "core.domain.helpers.updateRecordLastModif": updateRecordLastModif, "core.domain.tree.helpers.elementAncestors": elementAncestors, "core.domain.tree.helpers.getDefaultElement": getDefaultElementHelper, "core.domain.record.helpers.sendRecordUpdateEvent": sendRecordUpdateEvent, "core.domain.record.helpers.createRecord": createRecordHelper, "core.domain.record.helpers.getRecordIdentity": getRecordIdentity, "core.domain.value.helpers.getRecordFieldValue": getRecordFieldValueHelper, "core.domain.value.helpers.getValues": getValuesHelper, "core.domain.value.helpers.runActionsList": runActionsListHelper, "core.domain.value.helpers.formatValue": formatValueHelper, "core.domain.record.helpers.findRecords": findRecordsHelper, "core.domain.permission.helpers.recordInCreationBypass": recordInCreationBypassHelper, "core.domain.attribute.helpers.ifLibraryJoinLinkAttribute": ifLibraryJoinLinkAttribute, "core.domain.versionProfile": versionProfileDomain, "core.infra.record": recordRepo, "core.infra.tree": treeRepo, "core.infra.value": valueRepo, "core.utils": utils, "core.utils.logger": logger, }: IValueDomainDeps) => IValueDomain;
156
158
  export default valueDomain;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aristid/leav-types",
3
- "version": "1.13.0-6929b19b",
3
+ "version": "1.13.0-6c03dd61",
4
4
  "description": "Shared Leav types",
5
5
  "scripts": {
6
6
  "tscheck": "",