@webiny/api-record-locking 0.0.0-unstable.e53eceafb5 → 0.0.0-unstable.e6f0dc8ca7
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/README.md +10 -9
- package/domain/LockRecord.d.ts +45 -0
- package/{utils/convertEntryToLockRecord.js → domain/LockRecord.js} +10 -21
- package/domain/LockRecord.js.map +1 -0
- package/domain/RecordLockingModel.d.ts +9 -0
- package/domain/RecordLockingModel.js +29 -0
- package/domain/RecordLockingModel.js.map +1 -0
- package/domain/abstractions.d.ts +18 -0
- package/domain/abstractions.js +10 -0
- package/domain/abstractions.js.map +1 -0
- package/domain/calculateExpiresOn.d.ts +1 -0
- package/domain/calculateExpiresOn.js +9 -0
- package/domain/calculateExpiresOn.js.map +1 -0
- package/domain/errors.d.ts +71 -0
- package/domain/errors.js +95 -0
- package/domain/errors.js.map +1 -0
- package/domain/index.d.ts +4 -0
- package/domain/index.js +6 -0
- package/domain/index.js.map +1 -0
- package/domain/types.d.ts +44 -0
- package/domain/types.js +12 -0
- package/domain/types.js.map +1 -0
- package/features/GetLockRecord/GetLockRecordRepository.d.ts +16 -0
- package/features/GetLockRecord/GetLockRecordRepository.js +37 -0
- package/features/GetLockRecord/GetLockRecordRepository.js.map +1 -0
- package/features/GetLockRecord/GetLockRecordUseCase.d.ts +12 -0
- package/features/GetLockRecord/GetLockRecordUseCase.js +15 -0
- package/features/GetLockRecord/GetLockRecordUseCase.js.map +1 -0
- package/features/GetLockRecord/abstractions.d.ts +41 -0
- package/features/GetLockRecord/abstractions.js +17 -0
- package/features/GetLockRecord/abstractions.js.map +1 -0
- package/features/GetLockRecord/feature.d.ts +4 -0
- package/features/GetLockRecord/feature.js +12 -0
- package/features/GetLockRecord/feature.js.map +1 -0
- package/features/GetLockRecord/index.d.ts +2 -0
- package/features/GetLockRecord/index.js +4 -0
- package/features/GetLockRecord/index.js.map +1 -0
- package/features/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.d.ts +15 -0
- package/features/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.js +39 -0
- package/features/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.js.map +1 -0
- package/features/GetLockedEntryLockRecord/abstractions.d.ts +26 -0
- package/features/GetLockedEntryLockRecord/abstractions.js +13 -0
- package/features/GetLockedEntryLockRecord/abstractions.js.map +1 -0
- package/features/GetLockedEntryLockRecord/feature.d.ts +4 -0
- package/features/GetLockedEntryLockRecord/feature.js +10 -0
- package/features/GetLockedEntryLockRecord/feature.js.map +1 -0
- package/features/GetLockedEntryLockRecord/index.d.ts +2 -0
- package/features/GetLockedEntryLockRecord/index.js +4 -0
- package/features/GetLockedEntryLockRecord/index.js.map +1 -0
- package/features/IsEntryLocked/IsEntryLockedUseCase.d.ts +14 -0
- package/features/IsEntryLocked/IsEntryLockedUseCase.js +39 -0
- package/features/IsEntryLocked/IsEntryLockedUseCase.js.map +1 -0
- package/features/IsEntryLocked/abstractions.d.ts +24 -0
- package/features/IsEntryLocked/abstractions.js +12 -0
- package/features/IsEntryLocked/abstractions.js.map +1 -0
- package/features/IsEntryLocked/feature.d.ts +4 -0
- package/features/IsEntryLocked/feature.js +10 -0
- package/features/IsEntryLocked/feature.js.map +1 -0
- package/features/IsEntryLocked/index.d.ts +1 -0
- package/features/IsEntryLocked/index.js +3 -0
- package/features/IsEntryLocked/index.js.map +1 -0
- package/features/KickOutCurrentUser/KickOutCurrentUserUseCase.d.ts +15 -0
- package/features/KickOutCurrentUser/KickOutCurrentUserUseCase.js +42 -0
- package/features/KickOutCurrentUser/KickOutCurrentUserUseCase.js.map +1 -0
- package/features/KickOutCurrentUser/abstractions.d.ts +17 -0
- package/features/KickOutCurrentUser/abstractions.js +9 -0
- package/features/KickOutCurrentUser/abstractions.js.map +1 -0
- package/features/KickOutCurrentUser/feature.d.ts +4 -0
- package/features/KickOutCurrentUser/feature.js +10 -0
- package/features/KickOutCurrentUser/feature.js.map +1 -0
- package/features/KickOutCurrentUser/index.d.ts +1 -0
- package/features/KickOutCurrentUser/index.js +3 -0
- package/features/KickOutCurrentUser/index.js.map +1 -0
- package/features/ListAllLockRecords/ListAllLockRecordsRepository.d.ts +16 -0
- package/features/ListAllLockRecords/ListAllLockRecordsRepository.js +43 -0
- package/features/ListAllLockRecords/ListAllLockRecordsRepository.js.map +1 -0
- package/features/ListAllLockRecords/ListAllLockRecordsUseCase.d.ts +11 -0
- package/features/ListAllLockRecords/ListAllLockRecordsUseCase.js +15 -0
- package/features/ListAllLockRecords/ListAllLockRecordsUseCase.js.map +1 -0
- package/features/ListAllLockRecords/abstractions.d.ts +40 -0
- package/features/ListAllLockRecords/abstractions.js +17 -0
- package/features/ListAllLockRecords/abstractions.js.map +1 -0
- package/features/ListAllLockRecords/feature.d.ts +4 -0
- package/features/ListAllLockRecords/feature.js +12 -0
- package/features/ListAllLockRecords/feature.js.map +1 -0
- package/features/ListAllLockRecords/index.d.ts +2 -0
- package/features/ListAllLockRecords/index.js +4 -0
- package/features/ListAllLockRecords/index.js.map +1 -0
- package/features/ListLockRecords/ListLockRecordsRepository.d.ts +15 -0
- package/features/ListLockRecords/ListLockRecordsRepository.js +43 -0
- package/features/ListLockRecords/ListLockRecordsRepository.js.map +1 -0
- package/features/ListLockRecords/ListLockRecordsUseCase.d.ts +15 -0
- package/features/ListLockRecords/ListLockRecordsUseCase.js +30 -0
- package/features/ListLockRecords/ListLockRecordsUseCase.js.map +1 -0
- package/features/ListLockRecords/abstractions.d.ts +45 -0
- package/features/ListLockRecords/abstractions.js +17 -0
- package/features/ListLockRecords/abstractions.js.map +1 -0
- package/features/ListLockRecords/feature.d.ts +4 -0
- package/features/ListLockRecords/feature.js +12 -0
- package/features/ListLockRecords/feature.js.map +1 -0
- package/features/ListLockRecords/index.d.ts +1 -0
- package/features/ListLockRecords/index.js +3 -0
- package/features/ListLockRecords/index.js.map +1 -0
- package/features/LockEntry/LockEntryEventsDecorator.d.ts +14 -0
- package/features/LockEntry/LockEntryEventsDecorator.js +40 -0
- package/features/LockEntry/LockEntryEventsDecorator.js.map +1 -0
- package/features/LockEntry/LockEntryRepository.d.ts +16 -0
- package/features/LockEntry/LockEntryRepository.js +42 -0
- package/features/LockEntry/LockEntryRepository.js.map +1 -0
- package/features/LockEntry/LockEntryUseCase.d.ts +14 -0
- package/features/LockEntry/LockEntryUseCase.js +36 -0
- package/features/LockEntry/LockEntryUseCase.js.map +1 -0
- package/features/LockEntry/abstractions.d.ts +41 -0
- package/features/LockEntry/abstractions.js +17 -0
- package/features/LockEntry/abstractions.js.map +1 -0
- package/features/LockEntry/events.d.ts +45 -0
- package/features/LockEntry/events.js +40 -0
- package/features/LockEntry/events.js.map +1 -0
- package/features/LockEntry/feature.d.ts +4 -0
- package/features/LockEntry/feature.js +14 -0
- package/features/LockEntry/feature.js.map +1 -0
- package/features/LockEntry/index.d.ts +1 -0
- package/features/LockEntry/index.js +3 -0
- package/features/LockEntry/index.js.map +1 -0
- package/features/RecordLockingFeature.d.ts +15 -0
- package/features/RecordLockingFeature.js +36 -0
- package/features/RecordLockingFeature.js.map +1 -0
- package/features/UnlockEntry/UnlockEntryEventsDecorator.d.ts +14 -0
- package/features/UnlockEntry/UnlockEntryEventsDecorator.js +41 -0
- package/features/UnlockEntry/UnlockEntryEventsDecorator.js.map +1 -0
- package/features/UnlockEntry/UnlockEntryRepository.d.ts +14 -0
- package/features/UnlockEntry/UnlockEntryRepository.js +40 -0
- package/features/UnlockEntry/UnlockEntryRepository.js.map +1 -0
- package/features/UnlockEntry/UnlockEntryUseCase.d.ts +18 -0
- package/features/UnlockEntry/UnlockEntryUseCase.js +81 -0
- package/features/UnlockEntry/UnlockEntryUseCase.js.map +1 -0
- package/features/UnlockEntry/abstractions.d.ts +44 -0
- package/features/UnlockEntry/abstractions.js +17 -0
- package/features/UnlockEntry/abstractions.js.map +1 -0
- package/features/UnlockEntry/events.d.ts +46 -0
- package/features/UnlockEntry/events.js +40 -0
- package/features/UnlockEntry/events.js.map +1 -0
- package/features/UnlockEntry/feature.d.ts +4 -0
- package/features/UnlockEntry/feature.js +14 -0
- package/features/UnlockEntry/feature.js.map +1 -0
- package/features/UnlockEntry/hasFullAccessPermission.d.ts +2 -0
- package/features/UnlockEntry/hasFullAccessPermission.js +10 -0
- package/features/UnlockEntry/hasFullAccessPermission.js.map +1 -0
- package/features/UnlockEntry/index.d.ts +1 -0
- package/features/UnlockEntry/index.js +3 -0
- package/features/UnlockEntry/index.js.map +1 -0
- package/features/UnlockEntryRequest/UnlockEntryRequestEventsDecorator.d.ts +14 -0
- package/features/UnlockEntryRequest/UnlockEntryRequestEventsDecorator.js +40 -0
- package/features/UnlockEntryRequest/UnlockEntryRequestEventsDecorator.js.map +1 -0
- package/features/UnlockEntryRequest/UnlockEntryRequestRepository.d.ts +17 -0
- package/features/UnlockEntryRequest/UnlockEntryRequestRepository.js +43 -0
- package/features/UnlockEntryRequest/UnlockEntryRequestRepository.js.map +1 -0
- package/features/UnlockEntryRequest/UnlockEntryRequestUseCase.d.ts +16 -0
- package/features/UnlockEntryRequest/UnlockEntryRequestUseCase.js +92 -0
- package/features/UnlockEntryRequest/UnlockEntryRequestUseCase.js.map +1 -0
- package/features/UnlockEntryRequest/abstractions.d.ts +42 -0
- package/features/UnlockEntryRequest/abstractions.js +17 -0
- package/features/UnlockEntryRequest/abstractions.js.map +1 -0
- package/features/UnlockEntryRequest/events.d.ts +45 -0
- package/features/UnlockEntryRequest/events.js +40 -0
- package/features/UnlockEntryRequest/events.js.map +1 -0
- package/features/UnlockEntryRequest/feature.d.ts +4 -0
- package/features/UnlockEntryRequest/feature.js +14 -0
- package/features/UnlockEntryRequest/feature.js.map +1 -0
- package/features/UnlockEntryRequest/index.d.ts +3 -0
- package/features/UnlockEntryRequest/index.js +5 -0
- package/features/UnlockEntryRequest/index.js.map +1 -0
- package/features/UpdateEntryLock/UpdateEntryLockRepository.d.ts +20 -0
- package/features/UpdateEntryLock/UpdateEntryLockRepository.js +63 -0
- package/features/UpdateEntryLock/UpdateEntryLockRepository.js.map +1 -0
- package/features/UpdateEntryLock/UpdateEntryLockUseCase.d.ts +18 -0
- package/features/UpdateEntryLock/UpdateEntryLockUseCase.js +62 -0
- package/features/UpdateEntryLock/UpdateEntryLockUseCase.js.map +1 -0
- package/features/UpdateEntryLock/abstractions.d.ts +42 -0
- package/features/UpdateEntryLock/abstractions.js +17 -0
- package/features/UpdateEntryLock/abstractions.js.map +1 -0
- package/features/UpdateEntryLock/feature.d.ts +4 -0
- package/features/UpdateEntryLock/feature.js +12 -0
- package/features/UpdateEntryLock/feature.js.map +1 -0
- package/features/UpdateEntryLock/index.d.ts +1 -0
- package/features/UpdateEntryLock/index.js +3 -0
- package/features/UpdateEntryLock/index.js.map +1 -0
- package/graphql/checkPermissions.d.ts +5 -0
- package/graphql/checkPermissions.js +14 -0
- package/graphql/checkPermissions.js.map +1 -0
- package/{utils → graphql}/resolve.d.ts +3 -3
- package/graphql/resolve.js +22 -0
- package/graphql/resolve.js.map +1 -0
- package/graphql/schema.d.ts +7 -3
- package/graphql/schema.js +101 -66
- package/graphql/schema.js.map +1 -1
- package/index.d.ts +3 -3
- package/index.js +49 -25
- package/index.js.map +1 -1
- package/package.json +25 -26
- package/types.d.ts +3 -132
- package/types.js +2 -20
- package/types.js.map +1 -1
- package/utils/convertWhereCondition.d.ts +1 -1
- package/utils/convertWhereCondition.js +11 -14
- package/utils/convertWhereCondition.js.map +1 -1
- package/utils/getTimeout.js +1 -8
- package/utils/getTimeout.js.map +1 -1
- package/utils/lockRecordDatabaseId.js +4 -12
- package/utils/lockRecordDatabaseId.js.map +1 -1
- package/abstractions/IGetLockRecordUseCase.d.ts +0 -8
- package/abstractions/IGetLockRecordUseCase.js +0 -7
- package/abstractions/IGetLockRecordUseCase.js.map +0 -1
- package/abstractions/IGetLockedEntryLockRecordUseCase.d.ts +0 -8
- package/abstractions/IGetLockedEntryLockRecordUseCase.js +0 -7
- package/abstractions/IGetLockedEntryLockRecordUseCase.js.map +0 -1
- package/abstractions/IIsEntryLocked.d.ts +0 -8
- package/abstractions/IIsEntryLocked.js +0 -7
- package/abstractions/IIsEntryLocked.js.map +0 -1
- package/abstractions/IKickOutCurrentUserUseCase.d.ts +0 -5
- package/abstractions/IKickOutCurrentUserUseCase.js +0 -7
- package/abstractions/IKickOutCurrentUserUseCase.js.map +0 -1
- package/abstractions/IListAllLockRecordsUseCase.d.ts +0 -9
- package/abstractions/IListAllLockRecordsUseCase.js +0 -7
- package/abstractions/IListAllLockRecordsUseCase.js.map +0 -1
- package/abstractions/IListLockRecordsUseCase.d.ts +0 -10
- package/abstractions/IListLockRecordsUseCase.js +0 -7
- package/abstractions/IListLockRecordsUseCase.js.map +0 -1
- package/abstractions/ILockEntryUseCase.d.ts +0 -11
- package/abstractions/ILockEntryUseCase.js +0 -7
- package/abstractions/ILockEntryUseCase.js.map +0 -1
- package/abstractions/IUnlockEntryRequestUseCase.d.ts +0 -11
- package/abstractions/IUnlockEntryRequestUseCase.js +0 -7
- package/abstractions/IUnlockEntryRequestUseCase.js.map +0 -1
- package/abstractions/IUnlockEntryUseCase.d.ts +0 -12
- package/abstractions/IUnlockEntryUseCase.js +0 -7
- package/abstractions/IUnlockEntryUseCase.js.map +0 -1
- package/abstractions/IUpdateEntryLockUseCase.d.ts +0 -11
- package/abstractions/IUpdateEntryLockUseCase.js +0 -7
- package/abstractions/IUpdateEntryLockUseCase.js.map +0 -1
- package/crud/crud.d.ts +0 -7
- package/crud/crud.js +0 -204
- package/crud/crud.js.map +0 -1
- package/crud/model.d.ts +0 -2
- package/crud/model.js +0 -127
- package/crud/model.js.map +0 -1
- package/useCases/GetLockRecord/GetLockRecordUseCase.d.ts +0 -16
- package/useCases/GetLockRecord/GetLockRecordUseCase.js +0 -39
- package/useCases/GetLockRecord/GetLockRecordUseCase.js.map +0 -1
- package/useCases/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.d.ts +0 -16
- package/useCases/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.js +0 -29
- package/useCases/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.js.map +0 -1
- package/useCases/IsEntryLocked/IsEntryLockedUseCase.d.ts +0 -13
- package/useCases/IsEntryLocked/IsEntryLockedUseCase.js +0 -31
- package/useCases/IsEntryLocked/IsEntryLockedUseCase.js.map +0 -1
- package/useCases/KickOutCurrentUser/KickOutCurrentUserUseCase.d.ts +0 -12
- package/useCases/KickOutCurrentUser/KickOutCurrentUserUseCase.js +0 -46
- package/useCases/KickOutCurrentUser/KickOutCurrentUserUseCase.js.map +0 -1
- package/useCases/ListAllLockRecordsUseCase/ListAllLockRecordsUseCase.d.ts +0 -13
- package/useCases/ListAllLockRecordsUseCase/ListAllLockRecordsUseCase.js +0 -34
- package/useCases/ListAllLockRecordsUseCase/ListAllLockRecordsUseCase.js.map +0 -1
- package/useCases/ListLockRecordsUseCase/ListLockRecordsUseCase.d.ts +0 -14
- package/useCases/ListLockRecordsUseCase/ListLockRecordsUseCase.js +0 -27
- package/useCases/ListLockRecordsUseCase/ListLockRecordsUseCase.js.map +0 -1
- package/useCases/LockEntryUseCase/LockEntryUseCase.d.ts +0 -21
- package/useCases/LockEntryUseCase/LockEntryUseCase.js +0 -64
- package/useCases/LockEntryUseCase/LockEntryUseCase.js.map +0 -1
- package/useCases/UnlockEntryUseCase/UnlockEntryUseCase.d.ts +0 -23
- package/useCases/UnlockEntryUseCase/UnlockEntryUseCase.js +0 -90
- package/useCases/UnlockEntryUseCase/UnlockEntryUseCase.js.map +0 -1
- package/useCases/UnlockRequestUseCase/UnlockEntryRequestUseCase.d.ts +0 -21
- package/useCases/UnlockRequestUseCase/UnlockEntryRequestUseCase.js +0 -82
- package/useCases/UnlockRequestUseCase/UnlockEntryRequestUseCase.js.map +0 -1
- package/useCases/UpdateEntryLock/UpdateEntryLockUseCase.d.ts +0 -26
- package/useCases/UpdateEntryLock/UpdateEntryLockUseCase.js +0 -93
- package/useCases/UpdateEntryLock/UpdateEntryLockUseCase.js.map +0 -1
- package/useCases/index.d.ts +0 -31
- package/useCases/index.js +0 -96
- package/useCases/index.js.map +0 -1
- package/useCases/types.d.ts +0 -5
- package/useCases/types.js +0 -7
- package/useCases/types.js.map +0 -1
- package/utils/calculateExpiresOn.d.ts +0 -2
- package/utils/calculateExpiresOn.js +0 -16
- package/utils/calculateExpiresOn.js.map +0 -1
- package/utils/checkPermissions.d.ts +0 -7
- package/utils/checkPermissions.js +0 -21
- package/utils/checkPermissions.js.map +0 -1
- package/utils/convertEntryToLockRecord.d.ts +0 -28
- package/utils/convertEntryToLockRecord.js.map +0 -1
- package/utils/resolve.js +0 -30
- package/utils/resolve.js.map +0 -1
- package/utils/validateSameIdentity.d.ts +0 -6
- package/utils/validateSameIdentity.js +0 -24
- package/utils/validateSameIdentity.js.map +0 -1
package/types.d.ts
CHANGED
|
@@ -1,26 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import { CmsEntry, CmsError } from "@webiny/api-headless-cms/types";
|
|
3
|
-
|
|
4
|
-
import type { Context as IWebsocketsContext, IWebsocketsContextObject } from "@webiny/api-websockets/types";
|
|
5
|
-
import type { SecurityPermission } from "@webiny/api-security/types";
|
|
6
|
-
export { CmsError, CmsEntry };
|
|
1
|
+
import type { CmsEntryListParams, CmsEntryMeta, CmsIdentity } from "@webiny/api-headless-cms/types/index.js";
|
|
2
|
+
import { CmsEntry, CmsError } from "@webiny/api-headless-cms/types/index.js";
|
|
3
|
+
export type { CmsError, CmsEntry };
|
|
7
4
|
export type IRecordLockingIdentity = CmsIdentity;
|
|
8
|
-
export type IRecordLockingModelManager = CmsModelManager<IRecordLockingLockRecordValues>;
|
|
9
5
|
export type IRecordLockingMeta = CmsEntryMeta;
|
|
10
|
-
export interface IHasRecordLockingAccessCallable {
|
|
11
|
-
(): Promise<boolean>;
|
|
12
|
-
}
|
|
13
|
-
export interface IGetWebsocketsContextCallable {
|
|
14
|
-
(): IWebsocketsContextObject;
|
|
15
|
-
}
|
|
16
|
-
export interface IGetIdentity {
|
|
17
|
-
(): IRecordLockingIdentity;
|
|
18
|
-
}
|
|
19
|
-
export interface IRecordLockingLockRecordValues {
|
|
20
|
-
targetId: string;
|
|
21
|
-
type: IRecordLockingLockRecordEntryType;
|
|
22
|
-
actions?: IRecordLockingLockRecordAction[];
|
|
23
|
-
}
|
|
24
6
|
export declare enum RecordLockingLockRecordActionType {
|
|
25
7
|
requested = "requested",
|
|
26
8
|
approved = "approved",
|
|
@@ -69,114 +51,3 @@ export interface IRecordLockingLockRecord extends IRecordLockingLockRecordObject
|
|
|
69
51
|
export type IRecordLockingLockRecordEntryType = string;
|
|
70
52
|
export type IRecordLockingListAllLockRecordsParams = Pick<CmsEntryListParams, "where" | "limit" | "sort" | "after">;
|
|
71
53
|
export type IRecordLockingListLockRecordsParams = IRecordLockingListAllLockRecordsParams;
|
|
72
|
-
export interface IRecordLockingListAllLockRecordsResponse {
|
|
73
|
-
items: IRecordLockingLockRecord[];
|
|
74
|
-
meta: IRecordLockingMeta;
|
|
75
|
-
}
|
|
76
|
-
export type IRecordLockingListLockRecordsResponse = IRecordLockingListAllLockRecordsResponse;
|
|
77
|
-
export interface IRecordLockingGetLockRecordParams {
|
|
78
|
-
id: string;
|
|
79
|
-
type: IRecordLockingLockRecordEntryType;
|
|
80
|
-
}
|
|
81
|
-
export interface IRecordLockingIsLockedParams {
|
|
82
|
-
id: string;
|
|
83
|
-
type: IRecordLockingLockRecordEntryType;
|
|
84
|
-
}
|
|
85
|
-
export interface IRecordLockingGetLockedEntryLockRecordParams {
|
|
86
|
-
id: string;
|
|
87
|
-
type: IRecordLockingLockRecordEntryType;
|
|
88
|
-
}
|
|
89
|
-
export interface IRecordLockingLockEntryParams {
|
|
90
|
-
id: string;
|
|
91
|
-
type: IRecordLockingLockRecordEntryType;
|
|
92
|
-
}
|
|
93
|
-
export interface IRecordLockingUpdateEntryLockParams {
|
|
94
|
-
id: string;
|
|
95
|
-
type: IRecordLockingLockRecordEntryType;
|
|
96
|
-
}
|
|
97
|
-
export interface IRecordLockingUnlockEntryParams {
|
|
98
|
-
id: string;
|
|
99
|
-
type: IRecordLockingLockRecordEntryType;
|
|
100
|
-
force?: boolean;
|
|
101
|
-
}
|
|
102
|
-
export interface IRecordLockingUnlockEntryRequestParams {
|
|
103
|
-
id: string;
|
|
104
|
-
type: IRecordLockingLockRecordEntryType;
|
|
105
|
-
}
|
|
106
|
-
export interface OnEntryBeforeLockTopicParams {
|
|
107
|
-
id: string;
|
|
108
|
-
type: IRecordLockingLockRecordEntryType;
|
|
109
|
-
}
|
|
110
|
-
export interface OnEntryAfterLockTopicParams {
|
|
111
|
-
id: string;
|
|
112
|
-
type: IRecordLockingLockRecordEntryType;
|
|
113
|
-
record: IRecordLockingLockRecord;
|
|
114
|
-
}
|
|
115
|
-
export interface OnEntryLockErrorTopicParams {
|
|
116
|
-
id: string;
|
|
117
|
-
type: IRecordLockingLockRecordEntryType;
|
|
118
|
-
error: CmsError;
|
|
119
|
-
}
|
|
120
|
-
export interface OnEntryBeforeUnlockTopicParams {
|
|
121
|
-
id: string;
|
|
122
|
-
type: IRecordLockingLockRecordEntryType;
|
|
123
|
-
getIdentity: IGetIdentity;
|
|
124
|
-
}
|
|
125
|
-
export interface OnEntryAfterUnlockTopicParams {
|
|
126
|
-
id: string;
|
|
127
|
-
type: IRecordLockingLockRecordEntryType;
|
|
128
|
-
record: IRecordLockingLockRecord;
|
|
129
|
-
}
|
|
130
|
-
export interface OnEntryUnlockErrorTopicParams {
|
|
131
|
-
id: string;
|
|
132
|
-
type: IRecordLockingLockRecordEntryType;
|
|
133
|
-
error: CmsError;
|
|
134
|
-
}
|
|
135
|
-
export interface OnEntryBeforeUnlockRequestTopicParams {
|
|
136
|
-
id: string;
|
|
137
|
-
type: IRecordLockingLockRecordEntryType;
|
|
138
|
-
}
|
|
139
|
-
export interface OnEntryAfterUnlockRequestTopicParams {
|
|
140
|
-
id: string;
|
|
141
|
-
type: IRecordLockingLockRecordEntryType;
|
|
142
|
-
record: IRecordLockingLockRecord;
|
|
143
|
-
}
|
|
144
|
-
export interface OnEntryUnlockRequestErrorTopicParams {
|
|
145
|
-
id: string;
|
|
146
|
-
type: IRecordLockingLockRecordEntryType;
|
|
147
|
-
error: CmsError;
|
|
148
|
-
}
|
|
149
|
-
export interface IRecordLocking {
|
|
150
|
-
/**
|
|
151
|
-
* In milliseconds.
|
|
152
|
-
*/
|
|
153
|
-
getTimeout: () => number;
|
|
154
|
-
onEntryBeforeLock: Topic<OnEntryBeforeLockTopicParams>;
|
|
155
|
-
onEntryAfterLock: Topic<OnEntryAfterLockTopicParams>;
|
|
156
|
-
onEntryLockError: Topic<OnEntryLockErrorTopicParams>;
|
|
157
|
-
onEntryBeforeUnlock: Topic<OnEntryBeforeUnlockTopicParams>;
|
|
158
|
-
onEntryAfterUnlock: Topic<OnEntryAfterUnlockTopicParams>;
|
|
159
|
-
onEntryUnlockError: Topic<OnEntryUnlockErrorTopicParams>;
|
|
160
|
-
onEntryBeforeUnlockRequest: Topic<OnEntryBeforeUnlockRequestTopicParams>;
|
|
161
|
-
onEntryAfterUnlockRequest: Topic<OnEntryAfterUnlockRequestTopicParams>;
|
|
162
|
-
onEntryUnlockRequestError: Topic<OnEntryUnlockRequestErrorTopicParams>;
|
|
163
|
-
getModel(): Promise<CmsModel>;
|
|
164
|
-
listAllLockRecords(params?: IRecordLockingListAllLockRecordsParams): Promise<IRecordLockingListAllLockRecordsResponse>;
|
|
165
|
-
/**
|
|
166
|
-
* Same call as listAllLockRecords, except this one will filter out records with expired lock.
|
|
167
|
-
*/
|
|
168
|
-
listLockRecords(params?: IRecordLockingListLockRecordsParams): Promise<IRecordLockingListLockRecordsResponse>;
|
|
169
|
-
getLockRecord(params: IRecordLockingGetLockRecordParams): Promise<IRecordLockingLockRecord | null>;
|
|
170
|
-
isEntryLocked(params: IRecordLockingIsLockedParams): Promise<boolean>;
|
|
171
|
-
getLockedEntryLockRecord(params: IRecordLockingGetLockedEntryLockRecordParams): Promise<IRecordLockingLockRecord | null>;
|
|
172
|
-
lockEntry(params: IRecordLockingLockEntryParams): Promise<IRecordLockingLockRecord>;
|
|
173
|
-
updateEntryLock(params: IRecordLockingUpdateEntryLockParams): Promise<IRecordLockingLockRecord>;
|
|
174
|
-
unlockEntry(params: IRecordLockingUnlockEntryParams): Promise<IRecordLockingLockRecord>;
|
|
175
|
-
unlockEntryRequest(params: IRecordLockingUnlockEntryRequestParams): Promise<IRecordLockingLockRecord>;
|
|
176
|
-
}
|
|
177
|
-
export interface Context extends CmsContext, IWebsocketsContext {
|
|
178
|
-
recordLocking: IRecordLocking;
|
|
179
|
-
}
|
|
180
|
-
export interface RecordLockingSecurityPermission extends SecurityPermission {
|
|
181
|
-
canForceUnlock?: string;
|
|
182
|
-
}
|
package/types.js
CHANGED
|
@@ -1,28 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "CmsEntry", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _types.CmsEntry;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "CmsError", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _types.CmsError;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
exports.RecordLockingLockRecordActionType = void 0;
|
|
19
|
-
var _types = require("@webiny/api-headless-cms/types");
|
|
20
|
-
let RecordLockingLockRecordActionType = exports.RecordLockingLockRecordActionType = /*#__PURE__*/function (RecordLockingLockRecordActionType) {
|
|
1
|
+
export let RecordLockingLockRecordActionType = /*#__PURE__*/function (RecordLockingLockRecordActionType) {
|
|
21
2
|
RecordLockingLockRecordActionType["requested"] = "requested";
|
|
22
3
|
RecordLockingLockRecordActionType["approved"] = "approved";
|
|
23
4
|
RecordLockingLockRecordActionType["denied"] = "denied";
|
|
24
5
|
return RecordLockingLockRecordActionType;
|
|
25
6
|
}({});
|
|
7
|
+
|
|
26
8
|
/**
|
|
27
9
|
* Do not use any special chars other than #, as we use this to create lock record IDs.
|
|
28
10
|
*/
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["RecordLockingLockRecordActionType"],"sources":["types.ts"],"sourcesContent":["import type {\n CmsEntryListParams,\n CmsEntryMeta,\n CmsIdentity\n} from \"@webiny/api-headless-cms/types/index.js\";\nimport { CmsEntry, CmsError } from \"@webiny/api-headless-cms/types/index.js\";\n\nexport type { CmsError, CmsEntry };\n\nexport type IRecordLockingIdentity = CmsIdentity;\n\nexport type IRecordLockingMeta = CmsEntryMeta;\n\nexport enum RecordLockingLockRecordActionType {\n requested = \"requested\",\n approved = \"approved\",\n denied = \"denied\"\n}\n\nexport interface IRecordLockingLockRecordRequestedAction {\n type: RecordLockingLockRecordActionType.requested;\n message?: string;\n createdOn: Date;\n createdBy: IRecordLockingIdentity;\n}\n\nexport interface IRecordLockingLockRecordApprovedAction {\n type: RecordLockingLockRecordActionType.approved;\n message?: string;\n createdOn: Date;\n createdBy: IRecordLockingIdentity;\n}\n\nexport interface IRecordLockingLockRecordDeniedAction {\n type: RecordLockingLockRecordActionType.denied;\n message?: string;\n createdOn: Date;\n createdBy: IRecordLockingIdentity;\n}\n\nexport type IRecordLockingLockRecordAction =\n | IRecordLockingLockRecordRequestedAction\n | IRecordLockingLockRecordApprovedAction\n | IRecordLockingLockRecordDeniedAction;\n\nexport interface IRecordLockingLockRecordObject {\n id: string;\n targetId: string;\n type: IRecordLockingLockRecordEntryType;\n lockedBy: IRecordLockingIdentity;\n lockedOn: Date;\n updatedOn: Date;\n expiresOn: Date;\n actions?: IRecordLockingLockRecordAction[];\n}\n\nexport interface IRecordLockingLockRecord extends IRecordLockingLockRecordObject {\n toObject(): IRecordLockingLockRecordObject;\n addAction(action: IRecordLockingLockRecordAction): void;\n getUnlockRequested(): IRecordLockingLockRecordRequestedAction | undefined;\n getUnlockApproved(): IRecordLockingLockRecordApprovedAction | undefined;\n getUnlockDenied(): IRecordLockingLockRecordDeniedAction | undefined;\n isExpired(): boolean;\n}\n\n/**\n * Do not use any special chars other than #, as we use this to create lock record IDs.\n */\nexport type IRecordLockingLockRecordEntryType = string;\n\nexport type IRecordLockingListAllLockRecordsParams = Pick<\n CmsEntryListParams,\n \"where\" | \"limit\" | \"sort\" | \"after\"\n>;\n\nexport type IRecordLockingListLockRecordsParams = IRecordLockingListAllLockRecordsParams;\n"],"mappings":"AAaA,WAAYA,iCAAiC,0BAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAjCA,iCAAiC;EAAA,OAAjCA,iCAAiC;AAAA;;AAoD7C;AACA;AACA","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IRecordLockingListLockRecordsParams } from "../types";
|
|
1
|
+
import type { IRecordLockingListLockRecordsParams } from "../types.js";
|
|
2
2
|
type IWhere = IRecordLockingListLockRecordsParams["where"] | undefined;
|
|
3
3
|
export declare const convertWhereCondition: (where: IWhere) => IWhere;
|
|
4
4
|
export {};
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.convertWhereCondition = void 0;
|
|
7
|
-
var _lockRecordDatabaseId = require("./lockRecordDatabaseId");
|
|
1
|
+
import { createLockRecordDatabaseId } from "./lockRecordDatabaseId.js";
|
|
8
2
|
const attachPrefix = value => {
|
|
9
|
-
if (
|
|
10
|
-
return value;
|
|
11
|
-
} else if (Array.isArray(value)) {
|
|
12
|
-
return value.map(_lockRecordDatabaseId.createLockRecordDatabaseId);
|
|
3
|
+
if (Array.isArray(value)) {
|
|
4
|
+
return value.map(createLockRecordDatabaseId);
|
|
13
5
|
}
|
|
14
|
-
return
|
|
6
|
+
return createLockRecordDatabaseId(value);
|
|
15
7
|
};
|
|
16
|
-
const convertWhereCondition = where => {
|
|
8
|
+
export const convertWhereCondition = where => {
|
|
17
9
|
if (!where) {
|
|
18
10
|
return where;
|
|
19
11
|
}
|
|
@@ -30,12 +22,17 @@ const convertWhereCondition = where => {
|
|
|
30
22
|
} else if (key.startsWith("id") === false) {
|
|
31
23
|
continue;
|
|
32
24
|
}
|
|
25
|
+
const value = where[key];
|
|
26
|
+
if (!value) {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
33
29
|
const newKey = key.replace("id", "entryId");
|
|
30
|
+
// @ts-expect-error
|
|
34
31
|
where[newKey] = attachPrefix(where[key]);
|
|
32
|
+
// @ts-expect-error
|
|
35
33
|
delete where[key];
|
|
36
34
|
}
|
|
37
35
|
return where;
|
|
38
36
|
};
|
|
39
|
-
exports.convertWhereCondition = convertWhereCondition;
|
|
40
37
|
|
|
41
38
|
//# sourceMappingURL=convertWhereCondition.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["createLockRecordDatabaseId","attachPrefix","value","Array","isArray","map","convertWhereCondition","where","key","startsWith","subKey","newKey","replace"],"sources":["convertWhereCondition.ts"],"sourcesContent":["import type { IRecordLockingListLockRecordsParams } from \"~/types.js\";\nimport { createLockRecordDatabaseId } from \"~/utils/lockRecordDatabaseId.js\";\n\ntype IWhere = IRecordLockingListLockRecordsParams[\"where\"] | undefined;\n\nconst attachPrefix = (value: string | string[]) => {\n if (Array.isArray(value)) {\n return value.map(createLockRecordDatabaseId);\n }\n return createLockRecordDatabaseId(value);\n};\n\nexport const convertWhereCondition = (where: IWhere): IWhere => {\n if (!where) {\n return where;\n }\n for (const key in where) {\n if (key.startsWith(\"AND\") || key.startsWith(\"OR\")) {\n const value = where[key as keyof typeof where] as IWhere[] | undefined;\n if (!value) {\n continue;\n }\n for (const subKey in value) {\n value[subKey] = convertWhereCondition(value[subKey]);\n }\n continue;\n } else if (key.startsWith(\"id\") === false) {\n continue;\n }\n const value = where[key as keyof typeof where];\n if (!value) {\n continue;\n }\n\n const newKey = key.replace(\"id\", \"entryId\") as keyof typeof where;\n // @ts-expect-error\n where[newKey] = attachPrefix(where[key]);\n // @ts-expect-error\n delete where[key];\n }\n return where;\n};\n"],"mappings":"AACA,SAASA,0BAA0B;AAInC,MAAMC,YAAY,GAAIC,KAAwB,IAAK;EAC/C,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;IACtB,OAAOA,KAAK,CAACG,GAAG,CAACL,0BAA0B,CAAC;EAChD;EACA,OAAOA,0BAA0B,CAACE,KAAK,CAAC;AAC5C,CAAC;AAED,OAAO,MAAMI,qBAAqB,GAAIC,KAAa,IAAa;EAC5D,IAAI,CAACA,KAAK,EAAE;IACR,OAAOA,KAAK;EAChB;EACA,KAAK,MAAMC,GAAG,IAAID,KAAK,EAAE;IACrB,IAAIC,GAAG,CAACC,UAAU,CAAC,KAAK,CAAC,IAAID,GAAG,CAACC,UAAU,CAAC,IAAI,CAAC,EAAE;MAC/C,MAAMP,KAAK,GAAGK,KAAK,CAACC,GAAG,CAA+C;MACtE,IAAI,CAACN,KAAK,EAAE;QACR;MACJ;MACA,KAAK,MAAMQ,MAAM,IAAIR,KAAK,EAAE;QACxBA,KAAK,CAACQ,MAAM,CAAC,GAAGJ,qBAAqB,CAACJ,KAAK,CAACQ,MAAM,CAAC,CAAC;MACxD;MACA;IACJ,CAAC,MAAM,IAAIF,GAAG,CAACC,UAAU,CAAC,IAAI,CAAC,KAAK,KAAK,EAAE;MACvC;IACJ;IACA,MAAMP,KAAK,GAAGK,KAAK,CAACC,GAAG,CAAuB;IAC9C,IAAI,CAACN,KAAK,EAAE;MACR;IACJ;IAEA,MAAMS,MAAM,GAAGH,GAAG,CAACI,OAAO,CAAC,IAAI,EAAE,SAAS,CAAuB;IACjE;IACAL,KAAK,CAACI,MAAM,CAAC,GAAGV,YAAY,CAACM,KAAK,CAACC,GAAG,CAAC,CAAC;IACxC;IACA,OAAOD,KAAK,CAACC,GAAG,CAAC;EACrB;EACA,OAAOD,KAAK;AAChB,CAAC","ignoreList":[]}
|
package/utils/getTimeout.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getTimeout = void 0;
|
|
7
1
|
const minTimeoutInSeconds = 30;
|
|
8
2
|
const defaultTimeoutInSeconds = 60;
|
|
9
3
|
/**
|
|
10
4
|
* Input is in seconds.
|
|
11
5
|
* Output is milliseconds.
|
|
12
6
|
*/
|
|
13
|
-
const getTimeout = input => {
|
|
7
|
+
export const getTimeout = input => {
|
|
14
8
|
if (input && input > 0) {
|
|
15
9
|
if (input < minTimeoutInSeconds) {
|
|
16
10
|
return minTimeoutInSeconds * 1000;
|
|
@@ -23,6 +17,5 @@ const getTimeout = input => {
|
|
|
23
17
|
}
|
|
24
18
|
return userDefined * 1000;
|
|
25
19
|
};
|
|
26
|
-
exports.getTimeout = getTimeout;
|
|
27
20
|
|
|
28
21
|
//# sourceMappingURL=getTimeout.js.map
|
package/utils/getTimeout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["minTimeoutInSeconds","defaultTimeoutInSeconds","getTimeout","input","userDefined","process","env","WEBINY_RECORD_LOCK_TIMEOUT","parseInt","undefined","isNaN"
|
|
1
|
+
{"version":3,"names":["minTimeoutInSeconds","defaultTimeoutInSeconds","getTimeout","input","userDefined","process","env","WEBINY_RECORD_LOCK_TIMEOUT","parseInt","undefined","isNaN"],"sources":["getTimeout.ts"],"sourcesContent":["const minTimeoutInSeconds = 30;\nconst defaultTimeoutInSeconds = 60;\n/**\n * Input is in seconds.\n * Output is milliseconds.\n */\nexport const getTimeout = (input: number | undefined) => {\n if (input && input > 0) {\n if (input < minTimeoutInSeconds) {\n return minTimeoutInSeconds * 1000;\n }\n return input * 1000;\n }\n const userDefined = process.env.WEBINY_RECORD_LOCK_TIMEOUT\n ? parseInt(process.env.WEBINY_RECORD_LOCK_TIMEOUT)\n : undefined;\n if (!userDefined || isNaN(userDefined) || userDefined <= 0) {\n return defaultTimeoutInSeconds * 1000;\n }\n return userDefined * 1000;\n};\n"],"mappings":"AAAA,MAAMA,mBAAmB,GAAG,EAAE;AAC9B,MAAMC,uBAAuB,GAAG,EAAE;AAClC;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAIC,KAAyB,IAAK;EACrD,IAAIA,KAAK,IAAIA,KAAK,GAAG,CAAC,EAAE;IACpB,IAAIA,KAAK,GAAGH,mBAAmB,EAAE;MAC7B,OAAOA,mBAAmB,GAAG,IAAI;IACrC;IACA,OAAOG,KAAK,GAAG,IAAI;EACvB;EACA,MAAMC,WAAW,GAAGC,OAAO,CAACC,GAAG,CAACC,0BAA0B,GACpDC,QAAQ,CAACH,OAAO,CAACC,GAAG,CAACC,0BAA0B,CAAC,GAChDE,SAAS;EACf,IAAI,CAACL,WAAW,IAAIM,KAAK,CAACN,WAAW,CAAC,IAAIA,WAAW,IAAI,CAAC,EAAE;IACxD,OAAOH,uBAAuB,GAAG,IAAI;EACzC;EACA,OAAOG,WAAW,GAAG,IAAI;AAC7B,CAAC","ignoreList":[]}
|
|
@@ -1,24 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.removeLockRecordDatabasePrefix = exports.createLockRecordDatabaseId = void 0;
|
|
7
|
-
var _utils = require("@webiny/utils");
|
|
1
|
+
import { parseIdentifier } from "@webiny/utils";
|
|
8
2
|
const WBY_LM_PREFIX = "wby-lm-";
|
|
9
|
-
const createLockRecordDatabaseId = input => {
|
|
3
|
+
export const createLockRecordDatabaseId = input => {
|
|
10
4
|
const {
|
|
11
5
|
id
|
|
12
|
-
} =
|
|
6
|
+
} = parseIdentifier(input);
|
|
13
7
|
if (id.startsWith(WBY_LM_PREFIX)) {
|
|
14
8
|
return id;
|
|
15
9
|
}
|
|
16
10
|
return `${WBY_LM_PREFIX}${id}`;
|
|
17
11
|
};
|
|
18
|
-
|
|
19
|
-
const removeLockRecordDatabasePrefix = id => {
|
|
12
|
+
export const removeLockRecordDatabasePrefix = id => {
|
|
20
13
|
return id.replace(WBY_LM_PREFIX, "");
|
|
21
14
|
};
|
|
22
|
-
exports.removeLockRecordDatabasePrefix = removeLockRecordDatabasePrefix;
|
|
23
15
|
|
|
24
16
|
//# sourceMappingURL=lockRecordDatabaseId.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["parseIdentifier","WBY_LM_PREFIX","createLockRecordDatabaseId","input","id","startsWith","removeLockRecordDatabasePrefix","replace"],"sources":["lockRecordDatabaseId.ts"],"sourcesContent":["import { parseIdentifier } from \"@webiny/utils\";\n\nconst WBY_LM_PREFIX = \"wby-lm-\";\n\nexport const createLockRecordDatabaseId = (input: string): string => {\n const { id } = parseIdentifier(input);\n if (id.startsWith(WBY_LM_PREFIX)) {\n return id;\n }\n return `${WBY_LM_PREFIX}${id}`;\n};\n\nexport const removeLockRecordDatabasePrefix = (id: string) => {\n return id.replace(WBY_LM_PREFIX, \"\");\n};\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,eAAe;AAE/C,MAAMC,aAAa,GAAG,SAAS;AAE/B,OAAO,MAAMC,0BAA0B,GAAIC,KAAa,IAAa;EACjE,MAAM;IAAEC;EAAG,CAAC,GAAGJ,eAAe,CAACG,KAAK,CAAC;EACrC,IAAIC,EAAE,CAACC,UAAU,CAACJ,aAAa,CAAC,EAAE;IAC9B,OAAOG,EAAE;EACb;EACA,OAAO,GAAGH,aAAa,GAAGG,EAAE,EAAE;AAClC,CAAC;AAED,OAAO,MAAME,8BAA8B,GAAIF,EAAU,IAAK;EAC1D,OAAOA,EAAE,CAACG,OAAO,CAACN,aAAa,EAAE,EAAE,CAAC;AACxC,CAAC","ignoreList":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { IRecordLockingGetLockRecordParams, IRecordLockingLockRecord } from "../types";
|
|
2
|
-
export type IGetLockRecordUseCaseExecuteParams = IRecordLockingGetLockRecordParams;
|
|
3
|
-
export interface IGetLockRecordUseCaseExecute {
|
|
4
|
-
(params: IGetLockRecordUseCaseExecuteParams): Promise<IRecordLockingLockRecord | null>;
|
|
5
|
-
}
|
|
6
|
-
export interface IGetLockRecordUseCase {
|
|
7
|
-
execute: IGetLockRecordUseCaseExecute;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IGetLockRecordUseCase.ts"],"sourcesContent":["import type { IRecordLockingGetLockRecordParams, IRecordLockingLockRecord } from \"~/types\";\n\nexport type IGetLockRecordUseCaseExecuteParams = IRecordLockingGetLockRecordParams;\n\nexport interface IGetLockRecordUseCaseExecute {\n (params: IGetLockRecordUseCaseExecuteParams): Promise<IRecordLockingLockRecord | null>;\n}\n\nexport interface IGetLockRecordUseCase {\n execute: IGetLockRecordUseCaseExecute;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { IRecordLockingIsLockedParams, IRecordLockingLockRecord } from "../types";
|
|
2
|
-
export type IGetLockedEntryLockRecordUseCaseExecuteParams = IRecordLockingIsLockedParams;
|
|
3
|
-
export interface IGetLockedEntryLockRecordUseCaseExecute {
|
|
4
|
-
(params: IGetLockedEntryLockRecordUseCaseExecuteParams): Promise<IRecordLockingLockRecord | null>;
|
|
5
|
-
}
|
|
6
|
-
export interface IGetLockedEntryLockRecordUseCase {
|
|
7
|
-
execute: IGetLockedEntryLockRecordUseCaseExecute;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IGetLockedEntryLockRecordUseCase.ts"],"sourcesContent":["import type { IRecordLockingIsLockedParams, IRecordLockingLockRecord } from \"~/types\";\n\nexport type IGetLockedEntryLockRecordUseCaseExecuteParams = IRecordLockingIsLockedParams;\n\nexport interface IGetLockedEntryLockRecordUseCaseExecute {\n (\n params: IGetLockedEntryLockRecordUseCaseExecuteParams\n ): Promise<IRecordLockingLockRecord | null>;\n}\n\nexport interface IGetLockedEntryLockRecordUseCase {\n execute: IGetLockedEntryLockRecordUseCaseExecute;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { IRecordLockingIsLockedParams } from "../types";
|
|
2
|
-
export type IIsEntryLockedUseCaseExecuteParams = IRecordLockingIsLockedParams;
|
|
3
|
-
export interface IIsEntryLockedUseCaseExecute {
|
|
4
|
-
(params: IIsEntryLockedUseCaseExecuteParams): Promise<boolean>;
|
|
5
|
-
}
|
|
6
|
-
export interface IIsEntryLockedUseCase {
|
|
7
|
-
execute: IIsEntryLockedUseCaseExecute;
|
|
8
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IIsEntryLocked.ts"],"sourcesContent":["import type { IRecordLockingIsLockedParams } from \"~/types\";\n\nexport type IIsEntryLockedUseCaseExecuteParams = IRecordLockingIsLockedParams;\n\nexport interface IIsEntryLockedUseCaseExecute {\n (params: IIsEntryLockedUseCaseExecuteParams): Promise<boolean>;\n}\n\nexport interface IIsEntryLockedUseCase {\n execute: IIsEntryLockedUseCaseExecute;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IKickOutCurrentUserUseCase.ts"],"sourcesContent":["import type { IRecordLockingLockRecord } from \"~/types\";\n\nexport type IKickOutCurrentUserUseCaseExecuteParams = IRecordLockingLockRecord;\n\nexport interface IKickOutCurrentUserUseCase {\n execute(params: IKickOutCurrentUserUseCaseExecuteParams): Promise<void>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { IRecordLockingListAllLockRecordsParams, IRecordLockingListAllLockRecordsResponse } from "../types";
|
|
2
|
-
export type IListAllLockRecordsUseCaseExecuteParams = IRecordLockingListAllLockRecordsParams;
|
|
3
|
-
export type IListAllLockRecordsUseCaseExecuteResponse = IRecordLockingListAllLockRecordsResponse;
|
|
4
|
-
export interface IListAllLockRecordsUseCaseExecute {
|
|
5
|
-
(params: IListAllLockRecordsUseCaseExecuteParams): Promise<IListAllLockRecordsUseCaseExecuteResponse>;
|
|
6
|
-
}
|
|
7
|
-
export interface IListAllLockRecordsUseCase {
|
|
8
|
-
execute: IListAllLockRecordsUseCaseExecute;
|
|
9
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IListAllLockRecordsUseCase.ts"],"sourcesContent":["import type {\n IRecordLockingListAllLockRecordsParams,\n IRecordLockingListAllLockRecordsResponse\n} from \"~/types\";\n\nexport type IListAllLockRecordsUseCaseExecuteParams = IRecordLockingListAllLockRecordsParams;\n\nexport type IListAllLockRecordsUseCaseExecuteResponse = IRecordLockingListAllLockRecordsResponse;\n\nexport interface IListAllLockRecordsUseCaseExecute {\n (\n params: IListAllLockRecordsUseCaseExecuteParams\n ): Promise<IListAllLockRecordsUseCaseExecuteResponse>;\n}\n\nexport interface IListAllLockRecordsUseCase {\n execute: IListAllLockRecordsUseCaseExecute;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { IListAllLockRecordsUseCaseExecuteParams } from "./IListAllLockRecordsUseCase";
|
|
2
|
-
import type { IRecordLockingListAllLockRecordsResponse } from "../types";
|
|
3
|
-
export type IListLockRecordsUseCaseExecuteParams = IListAllLockRecordsUseCaseExecuteParams;
|
|
4
|
-
export type IListLockRecordsUseCaseExecuteResponse = IRecordLockingListAllLockRecordsResponse;
|
|
5
|
-
export interface IListLockRecordsUseCaseExecute {
|
|
6
|
-
(params: IListLockRecordsUseCaseExecuteParams): Promise<IListLockRecordsUseCaseExecuteResponse>;
|
|
7
|
-
}
|
|
8
|
-
export interface IListLockRecordsUseCase {
|
|
9
|
-
execute: IListLockRecordsUseCaseExecute;
|
|
10
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IListLockRecordsUseCase.ts"],"sourcesContent":["import type { IListAllLockRecordsUseCaseExecuteParams } from \"./IListAllLockRecordsUseCase\";\nimport type { IRecordLockingListAllLockRecordsResponse } from \"~/types\";\n\nexport type IListLockRecordsUseCaseExecuteParams = IListAllLockRecordsUseCaseExecuteParams;\n\nexport type IListLockRecordsUseCaseExecuteResponse = IRecordLockingListAllLockRecordsResponse;\n\nexport interface IListLockRecordsUseCaseExecute {\n (params: IListLockRecordsUseCaseExecuteParams): Promise<IListLockRecordsUseCaseExecuteResponse>;\n}\n\nexport interface IListLockRecordsUseCase {\n execute: IListLockRecordsUseCaseExecute;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { IRecordLockingLockRecord, IRecordLockingLockRecordEntryType } from "../types";
|
|
2
|
-
export interface ILockEntryUseCaseExecuteParams {
|
|
3
|
-
id: string;
|
|
4
|
-
type: IRecordLockingLockRecordEntryType;
|
|
5
|
-
}
|
|
6
|
-
export interface ILockEntryUseCaseExecute {
|
|
7
|
-
(params: ILockEntryUseCaseExecuteParams): Promise<IRecordLockingLockRecord>;
|
|
8
|
-
}
|
|
9
|
-
export interface ILockEntryUseCase {
|
|
10
|
-
execute: ILockEntryUseCaseExecute;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["ILockEntryUseCase.ts"],"sourcesContent":["import type { IRecordLockingLockRecord, IRecordLockingLockRecordEntryType } from \"~/types\";\n\nexport interface ILockEntryUseCaseExecuteParams {\n id: string;\n type: IRecordLockingLockRecordEntryType;\n}\n\nexport interface ILockEntryUseCaseExecute {\n (params: ILockEntryUseCaseExecuteParams): Promise<IRecordLockingLockRecord>;\n}\n\nexport interface ILockEntryUseCase {\n execute: ILockEntryUseCaseExecute;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { IRecordLockingLockRecord, IRecordLockingLockRecordEntryType } from "../types";
|
|
2
|
-
export interface IUnlockEntryRequestUseCaseExecuteParams {
|
|
3
|
-
id: string;
|
|
4
|
-
type: IRecordLockingLockRecordEntryType;
|
|
5
|
-
}
|
|
6
|
-
export interface IUnlockEntryRequestUseCaseExecute {
|
|
7
|
-
(params: IUnlockEntryRequestUseCaseExecuteParams): Promise<IRecordLockingLockRecord>;
|
|
8
|
-
}
|
|
9
|
-
export interface IUnlockEntryRequestUseCase {
|
|
10
|
-
execute: IUnlockEntryRequestUseCaseExecute;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IUnlockEntryRequestUseCase.ts"],"sourcesContent":["import type { IRecordLockingLockRecord, IRecordLockingLockRecordEntryType } from \"~/types\";\n\nexport interface IUnlockEntryRequestUseCaseExecuteParams {\n id: string;\n type: IRecordLockingLockRecordEntryType;\n}\n\nexport interface IUnlockEntryRequestUseCaseExecute {\n (params: IUnlockEntryRequestUseCaseExecuteParams): Promise<IRecordLockingLockRecord>;\n}\n\nexport interface IUnlockEntryRequestUseCase {\n execute: IUnlockEntryRequestUseCaseExecute;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { IRecordLockingLockRecord, IRecordLockingLockRecordEntryType } from "../types";
|
|
2
|
-
export interface IUnlockEntryUseCaseExecuteParams {
|
|
3
|
-
id: string;
|
|
4
|
-
type: IRecordLockingLockRecordEntryType;
|
|
5
|
-
force?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface IUnlockEntryUseCaseExecute {
|
|
8
|
-
(params: IUnlockEntryUseCaseExecuteParams): Promise<IRecordLockingLockRecord>;
|
|
9
|
-
}
|
|
10
|
-
export interface IUnlockEntryUseCase {
|
|
11
|
-
execute: IUnlockEntryUseCaseExecute;
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IUnlockEntryUseCase.ts"],"sourcesContent":["import type { IRecordLockingLockRecord, IRecordLockingLockRecordEntryType } from \"~/types\";\n\nexport interface IUnlockEntryUseCaseExecuteParams {\n id: string;\n type: IRecordLockingLockRecordEntryType;\n force?: boolean;\n}\n\nexport interface IUnlockEntryUseCaseExecute {\n (params: IUnlockEntryUseCaseExecuteParams): Promise<IRecordLockingLockRecord>;\n}\n\nexport interface IUnlockEntryUseCase {\n execute: IUnlockEntryUseCaseExecute;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { IRecordLockingLockRecord, IRecordLockingLockRecordEntryType } from "../types";
|
|
2
|
-
export interface IUpdateEntryLockUseCaseExecuteParams {
|
|
3
|
-
id: string;
|
|
4
|
-
type: IRecordLockingLockRecordEntryType;
|
|
5
|
-
}
|
|
6
|
-
export interface IUpdateEntryLockUseCaseExecute {
|
|
7
|
-
(params: IUpdateEntryLockUseCaseExecuteParams): Promise<IRecordLockingLockRecord>;
|
|
8
|
-
}
|
|
9
|
-
export interface IUpdateEntryLockUseCase {
|
|
10
|
-
execute: IUpdateEntryLockUseCaseExecute;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IUpdateEntryLockUseCase.ts"],"sourcesContent":["import type { IRecordLockingLockRecord, IRecordLockingLockRecordEntryType } from \"~/types\";\n\nexport interface IUpdateEntryLockUseCaseExecuteParams {\n id: string;\n type: IRecordLockingLockRecordEntryType;\n}\n\nexport interface IUpdateEntryLockUseCaseExecute {\n (params: IUpdateEntryLockUseCaseExecuteParams): Promise<IRecordLockingLockRecord>;\n}\n\nexport interface IUpdateEntryLockUseCase {\n execute: IUpdateEntryLockUseCaseExecute;\n}\n"],"mappings":"","ignoreList":[]}
|
package/crud/crud.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Context, IRecordLocking } from "../types";
|
|
2
|
-
interface Params {
|
|
3
|
-
context: Pick<Context, "plugins" | "cms" | "benchmark" | "security" | "websockets">;
|
|
4
|
-
timeout?: number;
|
|
5
|
-
}
|
|
6
|
-
export declare const createRecordLockingCrud: (params: Params) => Promise<IRecordLocking>;
|
|
7
|
-
export {};
|