@webiny/api-record-locking 6.0.0-rc.5 → 6.0.0-rc.7

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.
@@ -10,8 +10,8 @@ export declare class EntryBeforeLockEvent extends DomainEvent<EntryBeforeLockPay
10
10
  eventType: "RecordLocking/Entry/BeforeLock";
11
11
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<EntryBeforeLockEvent>>;
12
12
  }
13
- export declare const EntryBeforeLockHandler: import("@webiny/di").Abstraction<IEventHandler<EntryBeforeLockEvent>>;
14
- export declare namespace EntryBeforeLockHandler {
13
+ export declare const EntryBeforeLockEventHandler: import("@webiny/di").Abstraction<IEventHandler<EntryBeforeLockEvent>>;
14
+ export declare namespace EntryBeforeLockEventHandler {
15
15
  type Interface = IEventHandler<EntryBeforeLockEvent>;
16
16
  type Event = EntryBeforeLockEvent;
17
17
  }
@@ -24,8 +24,8 @@ export declare class EntryAfterLockEvent extends DomainEvent<EntryAfterLockPaylo
24
24
  eventType: "RecordLocking/Entry/AfterLock";
25
25
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<EntryAfterLockEvent>>;
26
26
  }
27
- export declare const EntryAfterLockHandler: import("@webiny/di").Abstraction<IEventHandler<EntryAfterLockEvent>>;
28
- export declare namespace EntryAfterLockHandler {
27
+ export declare const EntryAfterLockEventHandler: import("@webiny/di").Abstraction<IEventHandler<EntryAfterLockEvent>>;
28
+ export declare namespace EntryAfterLockEventHandler {
29
29
  type Interface = IEventHandler<EntryAfterLockEvent>;
30
30
  type Event = EntryAfterLockEvent;
31
31
  }
@@ -38,8 +38,8 @@ export declare class EntryLockErrorEvent extends DomainEvent<EntryLockErrorPaylo
38
38
  eventType: "RecordLocking/Entry/LockError";
39
39
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<EntryLockErrorEvent>>;
40
40
  }
41
- export declare const EntryLockErrorHandler: import("@webiny/di").Abstraction<IEventHandler<EntryLockErrorEvent>>;
42
- export declare namespace EntryLockErrorHandler {
41
+ export declare const EntryLockErrorEventHandler: import("@webiny/di").Abstraction<IEventHandler<EntryLockErrorEvent>>;
42
+ export declare namespace EntryLockErrorEventHandler {
43
43
  type Interface = IEventHandler<EntryLockErrorEvent>;
44
44
  type Event = EntryLockErrorEvent;
45
45
  }
@@ -8,10 +8,10 @@ import { DomainEvent } from "@webiny/api-core/features/EventPublisher";
8
8
  export class EntryBeforeLockEvent extends DomainEvent {
9
9
  eventType = "RecordLocking/Entry/BeforeLock";
10
10
  getHandlerAbstraction() {
11
- return EntryBeforeLockHandler;
11
+ return EntryBeforeLockEventHandler;
12
12
  }
13
13
  }
14
- export const EntryBeforeLockHandler = createAbstraction("EntryBeforeLockHandler");
14
+ export const EntryBeforeLockEventHandler = createAbstraction("EntryBeforeLockEventHandler");
15
15
 
16
16
  // ============================================================================
17
17
  // EntryAfterLock Event
@@ -20,10 +20,10 @@ export const EntryBeforeLockHandler = createAbstraction("EntryBeforeLockHandler"
20
20
  export class EntryAfterLockEvent extends DomainEvent {
21
21
  eventType = "RecordLocking/Entry/AfterLock";
22
22
  getHandlerAbstraction() {
23
- return EntryAfterLockHandler;
23
+ return EntryAfterLockEventHandler;
24
24
  }
25
25
  }
26
- export const EntryAfterLockHandler = createAbstraction("EntryAfterLockHandler");
26
+ export const EntryAfterLockEventHandler = createAbstraction("EntryAfterLockEventHandler");
27
27
 
28
28
  // ============================================================================
29
29
  // EntryLockError Event
@@ -32,9 +32,9 @@ export const EntryAfterLockHandler = createAbstraction("EntryAfterLockHandler");
32
32
  export class EntryLockErrorEvent extends DomainEvent {
33
33
  eventType = "RecordLocking/Entry/LockError";
34
34
  getHandlerAbstraction() {
35
- return EntryLockErrorHandler;
35
+ return EntryLockErrorEventHandler;
36
36
  }
37
37
  }
38
- export const EntryLockErrorHandler = createAbstraction("EntryLockErrorHandler");
38
+ export const EntryLockErrorEventHandler = createAbstraction("EntryLockErrorEventHandler");
39
39
 
40
40
  //# sourceMappingURL=events.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","DomainEvent","EntryBeforeLockEvent","eventType","getHandlerAbstraction","EntryBeforeLockHandler","EntryAfterLockEvent","EntryAfterLockHandler","EntryLockErrorEvent","EntryLockErrorHandler"],"sources":["events.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { DomainEvent } from \"@webiny/api-core/features/EventPublisher\";\nimport type { IEventHandler } from \"@webiny/api-core/features/EventPublisher\";\nimport type { ILockRecord } from \"~/domain/LockRecord.js\";\nimport type { LockRecordEntryType } from \"~/domain/types.js\";\n\n// ============================================================================\n// EntryBeforeLock Event\n// ============================================================================\n\nexport interface EntryBeforeLockPayload {\n id: string;\n type: LockRecordEntryType;\n}\n\nexport class EntryBeforeLockEvent extends DomainEvent<EntryBeforeLockPayload> {\n eventType = \"RecordLocking/Entry/BeforeLock\" as const;\n\n getHandlerAbstraction() {\n return EntryBeforeLockHandler;\n }\n}\n\nexport const EntryBeforeLockHandler =\n createAbstraction<IEventHandler<EntryBeforeLockEvent>>(\"EntryBeforeLockHandler\");\n\nexport namespace EntryBeforeLockHandler {\n export type Interface = IEventHandler<EntryBeforeLockEvent>;\n export type Event = EntryBeforeLockEvent;\n}\n\n// ============================================================================\n// EntryAfterLock Event\n// ============================================================================\n\nexport interface EntryAfterLockPayload {\n id: string;\n type: LockRecordEntryType;\n record: ILockRecord;\n}\n\nexport class EntryAfterLockEvent extends DomainEvent<EntryAfterLockPayload> {\n eventType = \"RecordLocking/Entry/AfterLock\" as const;\n\n getHandlerAbstraction() {\n return EntryAfterLockHandler;\n }\n}\n\nexport const EntryAfterLockHandler =\n createAbstraction<IEventHandler<EntryAfterLockEvent>>(\"EntryAfterLockHandler\");\n\nexport namespace EntryAfterLockHandler {\n export type Interface = IEventHandler<EntryAfterLockEvent>;\n export type Event = EntryAfterLockEvent;\n}\n\n// ============================================================================\n// EntryLockError Event\n// ============================================================================\n\nexport interface EntryLockErrorPayload {\n id: string;\n type: LockRecordEntryType;\n error: Error;\n}\n\nexport class EntryLockErrorEvent extends DomainEvent<EntryLockErrorPayload> {\n eventType = \"RecordLocking/Entry/LockError\" as const;\n\n getHandlerAbstraction() {\n return EntryLockErrorHandler;\n }\n}\n\nexport const EntryLockErrorHandler =\n createAbstraction<IEventHandler<EntryLockErrorEvent>>(\"EntryLockErrorHandler\");\n\nexport namespace EntryLockErrorHandler {\n export type Interface = IEventHandler<EntryLockErrorEvent>;\n export type Event = EntryLockErrorEvent;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,WAAW,QAAQ,0CAA0C;;AAKtE;AACA;AACA;;AAOA,OAAO,MAAMC,oBAAoB,SAASD,WAAW,CAAyB;EAC1EE,SAAS,GAAG,gCAAgC;EAE5CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOC,sBAAsB;EACjC;AACJ;AAEA,OAAO,MAAMA,sBAAsB,GAC/BL,iBAAiB,CAAsC,wBAAwB,CAAC;;AAOpF;AACA;AACA;;AAQA,OAAO,MAAMM,mBAAmB,SAASL,WAAW,CAAwB;EACxEE,SAAS,GAAG,+BAA+B;EAE3CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOG,qBAAqB;EAChC;AACJ;AAEA,OAAO,MAAMA,qBAAqB,GAC9BP,iBAAiB,CAAqC,uBAAuB,CAAC;;AAOlF;AACA;AACA;;AAQA,OAAO,MAAMQ,mBAAmB,SAASP,WAAW,CAAwB;EACxEE,SAAS,GAAG,+BAA+B;EAE3CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOK,qBAAqB;EAChC;AACJ;AAEA,OAAO,MAAMA,qBAAqB,GAC9BT,iBAAiB,CAAqC,uBAAuB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","DomainEvent","EntryBeforeLockEvent","eventType","getHandlerAbstraction","EntryBeforeLockEventHandler","EntryAfterLockEvent","EntryAfterLockEventHandler","EntryLockErrorEvent","EntryLockErrorEventHandler"],"sources":["events.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { DomainEvent } from \"@webiny/api-core/features/EventPublisher\";\nimport type { IEventHandler } from \"@webiny/api-core/features/EventPublisher\";\nimport type { ILockRecord } from \"~/domain/LockRecord.js\";\nimport type { LockRecordEntryType } from \"~/domain/types.js\";\n\n// ============================================================================\n// EntryBeforeLock Event\n// ============================================================================\n\nexport interface EntryBeforeLockPayload {\n id: string;\n type: LockRecordEntryType;\n}\n\nexport class EntryBeforeLockEvent extends DomainEvent<EntryBeforeLockPayload> {\n eventType = \"RecordLocking/Entry/BeforeLock\" as const;\n\n getHandlerAbstraction() {\n return EntryBeforeLockEventHandler;\n }\n}\n\nexport const EntryBeforeLockEventHandler = createAbstraction<IEventHandler<EntryBeforeLockEvent>>(\n \"EntryBeforeLockEventHandler\"\n);\n\nexport namespace EntryBeforeLockEventHandler {\n export type Interface = IEventHandler<EntryBeforeLockEvent>;\n export type Event = EntryBeforeLockEvent;\n}\n\n// ============================================================================\n// EntryAfterLock Event\n// ============================================================================\n\nexport interface EntryAfterLockPayload {\n id: string;\n type: LockRecordEntryType;\n record: ILockRecord;\n}\n\nexport class EntryAfterLockEvent extends DomainEvent<EntryAfterLockPayload> {\n eventType = \"RecordLocking/Entry/AfterLock\" as const;\n\n getHandlerAbstraction() {\n return EntryAfterLockEventHandler;\n }\n}\n\nexport const EntryAfterLockEventHandler = createAbstraction<IEventHandler<EntryAfterLockEvent>>(\n \"EntryAfterLockEventHandler\"\n);\n\nexport namespace EntryAfterLockEventHandler {\n export type Interface = IEventHandler<EntryAfterLockEvent>;\n export type Event = EntryAfterLockEvent;\n}\n\n// ============================================================================\n// EntryLockError Event\n// ============================================================================\n\nexport interface EntryLockErrorPayload {\n id: string;\n type: LockRecordEntryType;\n error: Error;\n}\n\nexport class EntryLockErrorEvent extends DomainEvent<EntryLockErrorPayload> {\n eventType = \"RecordLocking/Entry/LockError\" as const;\n\n getHandlerAbstraction() {\n return EntryLockErrorEventHandler;\n }\n}\n\nexport const EntryLockErrorEventHandler = createAbstraction<IEventHandler<EntryLockErrorEvent>>(\n \"EntryLockErrorEventHandler\"\n);\n\nexport namespace EntryLockErrorEventHandler {\n export type Interface = IEventHandler<EntryLockErrorEvent>;\n export type Event = EntryLockErrorEvent;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,WAAW,QAAQ,0CAA0C;;AAKtE;AACA;AACA;;AAOA,OAAO,MAAMC,oBAAoB,SAASD,WAAW,CAAyB;EAC1EE,SAAS,GAAG,gCAAgC;EAE5CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOC,2BAA2B;EACtC;AACJ;AAEA,OAAO,MAAMA,2BAA2B,GAAGL,iBAAiB,CACxD,6BACJ,CAAC;;AAOD;AACA;AACA;;AAQA,OAAO,MAAMM,mBAAmB,SAASL,WAAW,CAAwB;EACxEE,SAAS,GAAG,+BAA+B;EAE3CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOG,0BAA0B;EACrC;AACJ;AAEA,OAAO,MAAMA,0BAA0B,GAAGP,iBAAiB,CACvD,4BACJ,CAAC;;AAOD;AACA;AACA;;AAQA,OAAO,MAAMQ,mBAAmB,SAASP,WAAW,CAAwB;EACxEE,SAAS,GAAG,+BAA+B;EAE3CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOK,0BAA0B;EACrC;AACJ;AAEA,OAAO,MAAMA,0BAA0B,GAAGT,iBAAiB,CACvD,4BACJ,CAAC","ignoreList":[]}
@@ -11,8 +11,8 @@ export declare class EntryBeforeUnlockEvent extends DomainEvent<EntryBeforeUnloc
11
11
  eventType: "RecordLocking/Entry/BeforeUnlock";
12
12
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<EntryBeforeUnlockEvent>>;
13
13
  }
14
- export declare const EntryBeforeUnlockHandler: import("@webiny/di").Abstraction<IEventHandler<EntryBeforeUnlockEvent>>;
15
- export declare namespace EntryBeforeUnlockHandler {
14
+ export declare const EntryBeforeUnlockEventHandler: import("@webiny/di").Abstraction<IEventHandler<EntryBeforeUnlockEvent>>;
15
+ export declare namespace EntryBeforeUnlockEventHandler {
16
16
  type Interface = IEventHandler<EntryBeforeUnlockEvent>;
17
17
  type Event = EntryBeforeUnlockEvent;
18
18
  }
@@ -25,8 +25,8 @@ export declare class EntryAfterUnlockEvent extends DomainEvent<EntryAfterUnlockP
25
25
  eventType: "RecordLocking/Entry/AfterUnlock";
26
26
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<EntryAfterUnlockEvent>>;
27
27
  }
28
- export declare const EntryAfterUnlockHandler: import("@webiny/di").Abstraction<IEventHandler<EntryAfterUnlockEvent>>;
29
- export declare namespace EntryAfterUnlockHandler {
28
+ export declare const EntryAfterUnlockEventHandler: import("@webiny/di").Abstraction<IEventHandler<EntryAfterUnlockEvent>>;
29
+ export declare namespace EntryAfterUnlockEventHandler {
30
30
  type Interface = IEventHandler<EntryAfterUnlockEvent>;
31
31
  type Event = EntryAfterUnlockEvent;
32
32
  }
@@ -39,8 +39,8 @@ export declare class EntryUnlockErrorEvent extends DomainEvent<EntryUnlockErrorP
39
39
  eventType: "RecordLocking/Entry/UnlockError";
40
40
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<EntryUnlockErrorEvent>>;
41
41
  }
42
- export declare const EntryUnlockErrorHandler: import("@webiny/di").Abstraction<IEventHandler<EntryUnlockErrorEvent>>;
43
- export declare namespace EntryUnlockErrorHandler {
42
+ export declare const EntryUnlockErrorEventHandler: import("@webiny/di").Abstraction<IEventHandler<EntryUnlockErrorEvent>>;
43
+ export declare namespace EntryUnlockErrorEventHandler {
44
44
  type Interface = IEventHandler<EntryUnlockErrorEvent>;
45
45
  type Event = EntryUnlockErrorEvent;
46
46
  }
@@ -8,10 +8,10 @@ import { DomainEvent } from "@webiny/api-core/features/EventPublisher";
8
8
  export class EntryBeforeUnlockEvent extends DomainEvent {
9
9
  eventType = "RecordLocking/Entry/BeforeUnlock";
10
10
  getHandlerAbstraction() {
11
- return EntryBeforeUnlockHandler;
11
+ return EntryBeforeUnlockEventHandler;
12
12
  }
13
13
  }
14
- export const EntryBeforeUnlockHandler = createAbstraction("EntryBeforeUnlockHandler");
14
+ export const EntryBeforeUnlockEventHandler = createAbstraction("EntryBeforeUnlockEventHandler");
15
15
 
16
16
  // ============================================================================
17
17
  // EntryAfterUnlock Event
@@ -20,10 +20,10 @@ export const EntryBeforeUnlockHandler = createAbstraction("EntryBeforeUnlockHand
20
20
  export class EntryAfterUnlockEvent extends DomainEvent {
21
21
  eventType = "RecordLocking/Entry/AfterUnlock";
22
22
  getHandlerAbstraction() {
23
- return EntryAfterUnlockHandler;
23
+ return EntryAfterUnlockEventHandler;
24
24
  }
25
25
  }
26
- export const EntryAfterUnlockHandler = createAbstraction("EntryAfterUnlockHandler");
26
+ export const EntryAfterUnlockEventHandler = createAbstraction("EntryAfterUnlockEventHandler");
27
27
 
28
28
  // ============================================================================
29
29
  // EntryUnlockError Event
@@ -32,9 +32,9 @@ export const EntryAfterUnlockHandler = createAbstraction("EntryAfterUnlockHandle
32
32
  export class EntryUnlockErrorEvent extends DomainEvent {
33
33
  eventType = "RecordLocking/Entry/UnlockError";
34
34
  getHandlerAbstraction() {
35
- return EntryUnlockErrorHandler;
35
+ return EntryUnlockErrorEventHandler;
36
36
  }
37
37
  }
38
- export const EntryUnlockErrorHandler = createAbstraction("EntryUnlockErrorHandler");
38
+ export const EntryUnlockErrorEventHandler = createAbstraction("EntryUnlockErrorEventHandler");
39
39
 
40
40
  //# sourceMappingURL=events.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","DomainEvent","EntryBeforeUnlockEvent","eventType","getHandlerAbstraction","EntryBeforeUnlockHandler","EntryAfterUnlockEvent","EntryAfterUnlockHandler","EntryUnlockErrorEvent","EntryUnlockErrorHandler"],"sources":["events.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { DomainEvent } from \"@webiny/api-core/features/EventPublisher\";\nimport type { IEventHandler } from \"@webiny/api-core/features/EventPublisher\";\nimport type { ILockRecord } from \"~/domain/LockRecord.js\";\nimport type { LockRecordEntryType } from \"~/domain/types.js\";\n\n// ============================================================================\n// EntryBeforeUnlock Event\n// ============================================================================\n\nexport interface EntryBeforeUnlockPayload {\n id: string;\n type: LockRecordEntryType;\n force?: boolean;\n}\n\nexport class EntryBeforeUnlockEvent extends DomainEvent<EntryBeforeUnlockPayload> {\n eventType = \"RecordLocking/Entry/BeforeUnlock\" as const;\n\n getHandlerAbstraction() {\n return EntryBeforeUnlockHandler;\n }\n}\n\nexport const EntryBeforeUnlockHandler = createAbstraction<IEventHandler<EntryBeforeUnlockEvent>>(\n \"EntryBeforeUnlockHandler\"\n);\n\nexport namespace EntryBeforeUnlockHandler {\n export type Interface = IEventHandler<EntryBeforeUnlockEvent>;\n export type Event = EntryBeforeUnlockEvent;\n}\n\n// ============================================================================\n// EntryAfterUnlock Event\n// ============================================================================\n\nexport interface EntryAfterUnlockPayload {\n id: string;\n type: LockRecordEntryType;\n record: ILockRecord;\n}\n\nexport class EntryAfterUnlockEvent extends DomainEvent<EntryAfterUnlockPayload> {\n eventType = \"RecordLocking/Entry/AfterUnlock\" as const;\n\n getHandlerAbstraction() {\n return EntryAfterUnlockHandler;\n }\n}\n\nexport const EntryAfterUnlockHandler =\n createAbstraction<IEventHandler<EntryAfterUnlockEvent>>(\"EntryAfterUnlockHandler\");\n\nexport namespace EntryAfterUnlockHandler {\n export type Interface = IEventHandler<EntryAfterUnlockEvent>;\n export type Event = EntryAfterUnlockEvent;\n}\n\n// ============================================================================\n// EntryUnlockError Event\n// ============================================================================\n\nexport interface EntryUnlockErrorPayload {\n id: string;\n type: LockRecordEntryType;\n error: Error;\n}\n\nexport class EntryUnlockErrorEvent extends DomainEvent<EntryUnlockErrorPayload> {\n eventType = \"RecordLocking/Entry/UnlockError\" as const;\n\n getHandlerAbstraction() {\n return EntryUnlockErrorHandler;\n }\n}\n\nexport const EntryUnlockErrorHandler =\n createAbstraction<IEventHandler<EntryUnlockErrorEvent>>(\"EntryUnlockErrorHandler\");\n\nexport namespace EntryUnlockErrorHandler {\n export type Interface = IEventHandler<EntryUnlockErrorEvent>;\n export type Event = EntryUnlockErrorEvent;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,WAAW,QAAQ,0CAA0C;;AAKtE;AACA;AACA;;AAQA,OAAO,MAAMC,sBAAsB,SAASD,WAAW,CAA2B;EAC9EE,SAAS,GAAG,kCAAkC;EAE9CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOC,wBAAwB;EACnC;AACJ;AAEA,OAAO,MAAMA,wBAAwB,GAAGL,iBAAiB,CACrD,0BACJ,CAAC;;AAOD;AACA;AACA;;AAQA,OAAO,MAAMM,qBAAqB,SAASL,WAAW,CAA0B;EAC5EE,SAAS,GAAG,iCAAiC;EAE7CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOG,uBAAuB;EAClC;AACJ;AAEA,OAAO,MAAMA,uBAAuB,GAChCP,iBAAiB,CAAuC,yBAAyB,CAAC;;AAOtF;AACA;AACA;;AAQA,OAAO,MAAMQ,qBAAqB,SAASP,WAAW,CAA0B;EAC5EE,SAAS,GAAG,iCAAiC;EAE7CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOK,uBAAuB;EAClC;AACJ;AAEA,OAAO,MAAMA,uBAAuB,GAChCT,iBAAiB,CAAuC,yBAAyB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","DomainEvent","EntryBeforeUnlockEvent","eventType","getHandlerAbstraction","EntryBeforeUnlockEventHandler","EntryAfterUnlockEvent","EntryAfterUnlockEventHandler","EntryUnlockErrorEvent","EntryUnlockErrorEventHandler"],"sources":["events.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { DomainEvent } from \"@webiny/api-core/features/EventPublisher\";\nimport type { IEventHandler } from \"@webiny/api-core/features/EventPublisher\";\nimport type { ILockRecord } from \"~/domain/LockRecord.js\";\nimport type { LockRecordEntryType } from \"~/domain/types.js\";\n\n// ============================================================================\n// EntryBeforeUnlock Event\n// ============================================================================\n\nexport interface EntryBeforeUnlockPayload {\n id: string;\n type: LockRecordEntryType;\n force?: boolean;\n}\n\nexport class EntryBeforeUnlockEvent extends DomainEvent<EntryBeforeUnlockPayload> {\n eventType = \"RecordLocking/Entry/BeforeUnlock\" as const;\n\n getHandlerAbstraction() {\n return EntryBeforeUnlockEventHandler;\n }\n}\n\nexport const EntryBeforeUnlockEventHandler = createAbstraction<\n IEventHandler<EntryBeforeUnlockEvent>\n>(\"EntryBeforeUnlockEventHandler\");\n\nexport namespace EntryBeforeUnlockEventHandler {\n export type Interface = IEventHandler<EntryBeforeUnlockEvent>;\n export type Event = EntryBeforeUnlockEvent;\n}\n\n// ============================================================================\n// EntryAfterUnlock Event\n// ============================================================================\n\nexport interface EntryAfterUnlockPayload {\n id: string;\n type: LockRecordEntryType;\n record: ILockRecord;\n}\n\nexport class EntryAfterUnlockEvent extends DomainEvent<EntryAfterUnlockPayload> {\n eventType = \"RecordLocking/Entry/AfterUnlock\" as const;\n\n getHandlerAbstraction() {\n return EntryAfterUnlockEventHandler;\n }\n}\n\nexport const EntryAfterUnlockEventHandler = createAbstraction<IEventHandler<EntryAfterUnlockEvent>>(\n \"EntryAfterUnlockEventHandler\"\n);\n\nexport namespace EntryAfterUnlockEventHandler {\n export type Interface = IEventHandler<EntryAfterUnlockEvent>;\n export type Event = EntryAfterUnlockEvent;\n}\n\n// ============================================================================\n// EntryUnlockError Event\n// ============================================================================\n\nexport interface EntryUnlockErrorPayload {\n id: string;\n type: LockRecordEntryType;\n error: Error;\n}\n\nexport class EntryUnlockErrorEvent extends DomainEvent<EntryUnlockErrorPayload> {\n eventType = \"RecordLocking/Entry/UnlockError\" as const;\n\n getHandlerAbstraction() {\n return EntryUnlockErrorEventHandler;\n }\n}\n\nexport const EntryUnlockErrorEventHandler = createAbstraction<IEventHandler<EntryUnlockErrorEvent>>(\n \"EntryUnlockErrorEventHandler\"\n);\n\nexport namespace EntryUnlockErrorEventHandler {\n export type Interface = IEventHandler<EntryUnlockErrorEvent>;\n export type Event = EntryUnlockErrorEvent;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,WAAW,QAAQ,0CAA0C;;AAKtE;AACA;AACA;;AAQA,OAAO,MAAMC,sBAAsB,SAASD,WAAW,CAA2B;EAC9EE,SAAS,GAAG,kCAAkC;EAE9CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOC,6BAA6B;EACxC;AACJ;AAEA,OAAO,MAAMA,6BAA6B,GAAGL,iBAAiB,CAE5D,+BAA+B,CAAC;;AAOlC;AACA;AACA;;AAQA,OAAO,MAAMM,qBAAqB,SAASL,WAAW,CAA0B;EAC5EE,SAAS,GAAG,iCAAiC;EAE7CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOG,4BAA4B;EACvC;AACJ;AAEA,OAAO,MAAMA,4BAA4B,GAAGP,iBAAiB,CACzD,8BACJ,CAAC;;AAOD;AACA;AACA;;AAQA,OAAO,MAAMQ,qBAAqB,SAASP,WAAW,CAA0B;EAC5EE,SAAS,GAAG,iCAAiC;EAE7CC,qBAAqBA,CAAA,EAAG;IACpB,OAAOK,4BAA4B;EACvC;AACJ;AAEA,OAAO,MAAMA,4BAA4B,GAAGT,iBAAiB,CACzD,8BACJ,CAAC","ignoreList":[]}
@@ -10,8 +10,8 @@ export declare class EntryBeforeUnlockRequestEvent extends DomainEvent<EntryBefo
10
10
  eventType: "RecordLocking/Entry/BeforeUnlockRequest";
11
11
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<EntryBeforeUnlockRequestEvent>>;
12
12
  }
13
- export declare const EntryBeforeUnlockRequestHandler: import("@webiny/di").Abstraction<IEventHandler<EntryBeforeUnlockRequestEvent>>;
14
- export declare namespace EntryBeforeUnlockRequestHandler {
13
+ export declare const EntryBeforeUnlockRequestEventHandler: import("@webiny/di").Abstraction<IEventHandler<EntryBeforeUnlockRequestEvent>>;
14
+ export declare namespace EntryBeforeUnlockRequestEventHandler {
15
15
  type Interface = IEventHandler<EntryBeforeUnlockRequestEvent>;
16
16
  type Event = EntryBeforeUnlockRequestEvent;
17
17
  }
@@ -24,8 +24,8 @@ export declare class EntryAfterUnlockRequestEvent extends DomainEvent<EntryAfter
24
24
  eventType: "RecordLocking/Entry/AfterUnlockRequest";
25
25
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<EntryAfterUnlockRequestEvent>>;
26
26
  }
27
- export declare const EntryAfterUnlockRequestHandler: import("@webiny/di").Abstraction<IEventHandler<EntryAfterUnlockRequestEvent>>;
28
- export declare namespace EntryAfterUnlockRequestHandler {
27
+ export declare const EntryAfterUnlockRequestEventHandler: import("@webiny/di").Abstraction<IEventHandler<EntryAfterUnlockRequestEvent>>;
28
+ export declare namespace EntryAfterUnlockRequestEventHandler {
29
29
  type Interface = IEventHandler<EntryAfterUnlockRequestEvent>;
30
30
  type Event = EntryAfterUnlockRequestEvent;
31
31
  }
@@ -38,8 +38,8 @@ export declare class EntryUnlockRequestErrorEvent extends DomainEvent<EntryUnloc
38
38
  eventType: "RecordLocking/Entry/UnlockRequestError";
39
39
  getHandlerAbstraction(): import("@webiny/di").Abstraction<IEventHandler<EntryUnlockRequestErrorEvent>>;
40
40
  }
41
- export declare const EntryUnlockRequestErrorHandler: import("@webiny/di").Abstraction<IEventHandler<EntryUnlockRequestErrorEvent>>;
42
- export declare namespace EntryUnlockRequestErrorHandler {
41
+ export declare const EntryUnlockRequestErrorEventHandler: import("@webiny/di").Abstraction<IEventHandler<EntryUnlockRequestErrorEvent>>;
42
+ export declare namespace EntryUnlockRequestErrorEventHandler {
43
43
  type Interface = IEventHandler<EntryUnlockRequestErrorEvent>;
44
44
  type Event = EntryUnlockRequestErrorEvent;
45
45
  }
@@ -8,10 +8,10 @@ import { DomainEvent } from "@webiny/api-core/features/EventPublisher";
8
8
  export class EntryBeforeUnlockRequestEvent extends DomainEvent {
9
9
  eventType = "RecordLocking/Entry/BeforeUnlockRequest";
10
10
  getHandlerAbstraction() {
11
- return EntryBeforeUnlockRequestHandler;
11
+ return EntryBeforeUnlockRequestEventHandler;
12
12
  }
13
13
  }
14
- export const EntryBeforeUnlockRequestHandler = createAbstraction("EntryBeforeUnlockRequestHandler");
14
+ export const EntryBeforeUnlockRequestEventHandler = createAbstraction("EntryBeforeUnlockRequestEventHandler");
15
15
 
16
16
  // ============================================================================
17
17
  // EntryAfterUnlockRequest Event
@@ -20,10 +20,10 @@ export const EntryBeforeUnlockRequestHandler = createAbstraction("EntryBeforeUnl
20
20
  export class EntryAfterUnlockRequestEvent extends DomainEvent {
21
21
  eventType = "RecordLocking/Entry/AfterUnlockRequest";
22
22
  getHandlerAbstraction() {
23
- return EntryAfterUnlockRequestHandler;
23
+ return EntryAfterUnlockRequestEventHandler;
24
24
  }
25
25
  }
26
- export const EntryAfterUnlockRequestHandler = createAbstraction("EntryAfterUnlockRequestHandler");
26
+ export const EntryAfterUnlockRequestEventHandler = createAbstraction("EntryAfterUnlockRequestEventHandler");
27
27
 
28
28
  // ============================================================================
29
29
  // EntryUnlockRequestError Event
@@ -32,9 +32,9 @@ export const EntryAfterUnlockRequestHandler = createAbstraction("EntryAfterUnloc
32
32
  export class EntryUnlockRequestErrorEvent extends DomainEvent {
33
33
  eventType = "RecordLocking/Entry/UnlockRequestError";
34
34
  getHandlerAbstraction() {
35
- return EntryUnlockRequestErrorHandler;
35
+ return EntryUnlockRequestErrorEventHandler;
36
36
  }
37
37
  }
38
- export const EntryUnlockRequestErrorHandler = createAbstraction("EntryUnlockRequestErrorHandler");
38
+ export const EntryUnlockRequestErrorEventHandler = createAbstraction("EntryUnlockRequestErrorEventHandler");
39
39
 
40
40
  //# sourceMappingURL=events.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","DomainEvent","EntryBeforeUnlockRequestEvent","eventType","getHandlerAbstraction","EntryBeforeUnlockRequestHandler","EntryAfterUnlockRequestEvent","EntryAfterUnlockRequestHandler","EntryUnlockRequestErrorEvent","EntryUnlockRequestErrorHandler"],"sources":["events.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { DomainEvent } from \"@webiny/api-core/features/EventPublisher\";\nimport type { IEventHandler } from \"@webiny/api-core/features/EventPublisher\";\nimport type { ILockRecord } from \"~/domain/LockRecord.js\";\nimport type { LockRecordEntryType } from \"~/domain/types.js\";\n\n// ============================================================================\n// EntryBeforeUnlockRequest Event\n// ============================================================================\n\nexport interface EntryBeforeUnlockRequestPayload {\n id: string;\n type: LockRecordEntryType;\n}\n\nexport class EntryBeforeUnlockRequestEvent extends DomainEvent<EntryBeforeUnlockRequestPayload> {\n eventType = \"RecordLocking/Entry/BeforeUnlockRequest\" as const;\n\n getHandlerAbstraction() {\n return EntryBeforeUnlockRequestHandler;\n }\n}\n\nexport const EntryBeforeUnlockRequestHandler = createAbstraction<\n IEventHandler<EntryBeforeUnlockRequestEvent>\n>(\"EntryBeforeUnlockRequestHandler\");\n\nexport namespace EntryBeforeUnlockRequestHandler {\n export type Interface = IEventHandler<EntryBeforeUnlockRequestEvent>;\n export type Event = EntryBeforeUnlockRequestEvent;\n}\n\n// ============================================================================\n// EntryAfterUnlockRequest Event\n// ============================================================================\n\nexport interface EntryAfterUnlockRequestPayload {\n id: string;\n type: LockRecordEntryType;\n record: ILockRecord;\n}\n\nexport class EntryAfterUnlockRequestEvent extends DomainEvent<EntryAfterUnlockRequestPayload> {\n eventType = \"RecordLocking/Entry/AfterUnlockRequest\" as const;\n\n getHandlerAbstraction() {\n return EntryAfterUnlockRequestHandler;\n }\n}\n\nexport const EntryAfterUnlockRequestHandler = createAbstraction<\n IEventHandler<EntryAfterUnlockRequestEvent>\n>(\"EntryAfterUnlockRequestHandler\");\n\nexport namespace EntryAfterUnlockRequestHandler {\n export type Interface = IEventHandler<EntryAfterUnlockRequestEvent>;\n export type Event = EntryAfterUnlockRequestEvent;\n}\n\n// ============================================================================\n// EntryUnlockRequestError Event\n// ============================================================================\n\nexport interface EntryUnlockRequestErrorPayload {\n id: string;\n type: LockRecordEntryType;\n error: Error;\n}\n\nexport class EntryUnlockRequestErrorEvent extends DomainEvent<EntryUnlockRequestErrorPayload> {\n eventType = \"RecordLocking/Entry/UnlockRequestError\" as const;\n\n getHandlerAbstraction() {\n return EntryUnlockRequestErrorHandler;\n }\n}\n\nexport const EntryUnlockRequestErrorHandler = createAbstraction<\n IEventHandler<EntryUnlockRequestErrorEvent>\n>(\"EntryUnlockRequestErrorHandler\");\n\nexport namespace EntryUnlockRequestErrorHandler {\n export type Interface = IEventHandler<EntryUnlockRequestErrorEvent>;\n export type Event = EntryUnlockRequestErrorEvent;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,WAAW,QAAQ,0CAA0C;;AAKtE;AACA;AACA;;AAOA,OAAO,MAAMC,6BAA6B,SAASD,WAAW,CAAkC;EAC5FE,SAAS,GAAG,yCAAyC;EAErDC,qBAAqBA,CAAA,EAAG;IACpB,OAAOC,+BAA+B;EAC1C;AACJ;AAEA,OAAO,MAAMA,+BAA+B,GAAGL,iBAAiB,CAE9D,iCAAiC,CAAC;;AAOpC;AACA;AACA;;AAQA,OAAO,MAAMM,4BAA4B,SAASL,WAAW,CAAiC;EAC1FE,SAAS,GAAG,wCAAwC;EAEpDC,qBAAqBA,CAAA,EAAG;IACpB,OAAOG,8BAA8B;EACzC;AACJ;AAEA,OAAO,MAAMA,8BAA8B,GAAGP,iBAAiB,CAE7D,gCAAgC,CAAC;;AAOnC;AACA;AACA;;AAQA,OAAO,MAAMQ,4BAA4B,SAASP,WAAW,CAAiC;EAC1FE,SAAS,GAAG,wCAAwC;EAEpDC,qBAAqBA,CAAA,EAAG;IACpB,OAAOK,8BAA8B;EACzC;AACJ;AAEA,OAAO,MAAMA,8BAA8B,GAAGT,iBAAiB,CAE7D,gCAAgC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","DomainEvent","EntryBeforeUnlockRequestEvent","eventType","getHandlerAbstraction","EntryBeforeUnlockRequestEventHandler","EntryAfterUnlockRequestEvent","EntryAfterUnlockRequestEventHandler","EntryUnlockRequestErrorEvent","EntryUnlockRequestErrorEventHandler"],"sources":["events.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/api\";\nimport { DomainEvent } from \"@webiny/api-core/features/EventPublisher\";\nimport type { IEventHandler } from \"@webiny/api-core/features/EventPublisher\";\nimport type { ILockRecord } from \"~/domain/LockRecord.js\";\nimport type { LockRecordEntryType } from \"~/domain/types.js\";\n\n// ============================================================================\n// EntryBeforeUnlockRequest Event\n// ============================================================================\n\nexport interface EntryBeforeUnlockRequestPayload {\n id: string;\n type: LockRecordEntryType;\n}\n\nexport class EntryBeforeUnlockRequestEvent extends DomainEvent<EntryBeforeUnlockRequestPayload> {\n eventType = \"RecordLocking/Entry/BeforeUnlockRequest\" as const;\n\n getHandlerAbstraction() {\n return EntryBeforeUnlockRequestEventHandler;\n }\n}\n\nexport const EntryBeforeUnlockRequestEventHandler = createAbstraction<\n IEventHandler<EntryBeforeUnlockRequestEvent>\n>(\"EntryBeforeUnlockRequestEventHandler\");\n\nexport namespace EntryBeforeUnlockRequestEventHandler {\n export type Interface = IEventHandler<EntryBeforeUnlockRequestEvent>;\n export type Event = EntryBeforeUnlockRequestEvent;\n}\n\n// ============================================================================\n// EntryAfterUnlockRequest Event\n// ============================================================================\n\nexport interface EntryAfterUnlockRequestPayload {\n id: string;\n type: LockRecordEntryType;\n record: ILockRecord;\n}\n\nexport class EntryAfterUnlockRequestEvent extends DomainEvent<EntryAfterUnlockRequestPayload> {\n eventType = \"RecordLocking/Entry/AfterUnlockRequest\" as const;\n\n getHandlerAbstraction() {\n return EntryAfterUnlockRequestEventHandler;\n }\n}\n\nexport const EntryAfterUnlockRequestEventHandler = createAbstraction<\n IEventHandler<EntryAfterUnlockRequestEvent>\n>(\"EntryAfterUnlockRequestEventHandler\");\n\nexport namespace EntryAfterUnlockRequestEventHandler {\n export type Interface = IEventHandler<EntryAfterUnlockRequestEvent>;\n export type Event = EntryAfterUnlockRequestEvent;\n}\n\n// ============================================================================\n// EntryUnlockRequestError Event\n// ============================================================================\n\nexport interface EntryUnlockRequestErrorPayload {\n id: string;\n type: LockRecordEntryType;\n error: Error;\n}\n\nexport class EntryUnlockRequestErrorEvent extends DomainEvent<EntryUnlockRequestErrorPayload> {\n eventType = \"RecordLocking/Entry/UnlockRequestError\" as const;\n\n getHandlerAbstraction() {\n return EntryUnlockRequestErrorEventHandler;\n }\n}\n\nexport const EntryUnlockRequestErrorEventHandler = createAbstraction<\n IEventHandler<EntryUnlockRequestErrorEvent>\n>(\"EntryUnlockRequestErrorEventHandler\");\n\nexport namespace EntryUnlockRequestErrorEventHandler {\n export type Interface = IEventHandler<EntryUnlockRequestErrorEvent>;\n export type Event = EntryUnlockRequestErrorEvent;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,WAAW,QAAQ,0CAA0C;;AAKtE;AACA;AACA;;AAOA,OAAO,MAAMC,6BAA6B,SAASD,WAAW,CAAkC;EAC5FE,SAAS,GAAG,yCAAyC;EAErDC,qBAAqBA,CAAA,EAAG;IACpB,OAAOC,oCAAoC;EAC/C;AACJ;AAEA,OAAO,MAAMA,oCAAoC,GAAGL,iBAAiB,CAEnE,sCAAsC,CAAC;;AAOzC;AACA;AACA;;AAQA,OAAO,MAAMM,4BAA4B,SAASL,WAAW,CAAiC;EAC1FE,SAAS,GAAG,wCAAwC;EAEpDC,qBAAqBA,CAAA,EAAG;IACpB,OAAOG,mCAAmC;EAC9C;AACJ;AAEA,OAAO,MAAMA,mCAAmC,GAAGP,iBAAiB,CAElE,qCAAqC,CAAC;;AAOxC;AACA;AACA;;AAQA,OAAO,MAAMQ,4BAA4B,SAASP,WAAW,CAAiC;EAC1FE,SAAS,GAAG,wCAAwC;EAEpDC,qBAAqBA,CAAA,EAAG;IACpB,OAAOK,mCAAmC;EAC9C;AACJ;AAEA,OAAO,MAAMA,mCAAmC,GAAGT,iBAAiB,CAElE,qCAAqC,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-record-locking",
3
- "version": "6.0.0-rc.5",
3
+ "version": "6.0.0-rc.7",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -13,22 +13,22 @@
13
13
  ],
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
- "@webiny/api": "6.0.0-rc.5",
17
- "@webiny/api-headless-cms": "6.0.0-rc.5",
18
- "@webiny/api-websockets": "6.0.0-rc.5",
19
- "@webiny/feature": "6.0.0-rc.5",
20
- "@webiny/handler": "6.0.0-rc.5",
21
- "@webiny/handler-aws": "6.0.0-rc.5",
22
- "@webiny/handler-graphql": "6.0.0-rc.5",
23
- "@webiny/plugins": "6.0.0-rc.5",
24
- "@webiny/utils": "6.0.0-rc.5"
16
+ "@webiny/api": "6.0.0-rc.7",
17
+ "@webiny/api-headless-cms": "6.0.0-rc.7",
18
+ "@webiny/api-websockets": "6.0.0-rc.7",
19
+ "@webiny/feature": "6.0.0-rc.7",
20
+ "@webiny/handler": "6.0.0-rc.7",
21
+ "@webiny/handler-aws": "6.0.0-rc.7",
22
+ "@webiny/handler-graphql": "6.0.0-rc.7",
23
+ "@webiny/plugins": "6.0.0-rc.7",
24
+ "@webiny/utils": "6.0.0-rc.7"
25
25
  },
26
26
  "devDependencies": {
27
- "@webiny/api-core": "6.0.0-rc.5",
28
- "@webiny/build-tools": "6.0.0-rc.5",
29
- "@webiny/project-utils": "6.0.0-rc.5",
30
- "@webiny/wcp": "6.0.0-rc.5",
31
- "graphql": "16.13.0",
27
+ "@webiny/api-core": "6.0.0-rc.7",
28
+ "@webiny/build-tools": "6.0.0-rc.7",
29
+ "@webiny/project-utils": "6.0.0-rc.7",
30
+ "@webiny/wcp": "6.0.0-rc.7",
31
+ "graphql": "16.13.1",
32
32
  "rimraf": "6.1.3",
33
33
  "type-fest": "5.4.4",
34
34
  "typescript": "5.9.3",
@@ -38,5 +38,5 @@
38
38
  "access": "public",
39
39
  "directory": "dist"
40
40
  },
41
- "gitHead": "8f9b60f1193682a21e037e6f771b19f1dfd65045"
41
+ "gitHead": "9c6892640a45679ff521e25cd6587dff57393a2e"
42
42
  }