@webiny/api-record-locking 0.0.0-unstable.a4637c5ce6 → 0.0.0-unstable.a4f3e4ea8b

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.
Files changed (285) hide show
  1. package/README.md +10 -9
  2. package/domain/LockRecord.d.ts +45 -0
  3. package/domain/LockRecord.js +73 -0
  4. package/domain/LockRecord.js.map +1 -0
  5. package/domain/RecordLockingModel.d.ts +9 -0
  6. package/domain/RecordLockingModel.js +32 -0
  7. package/domain/RecordLockingModel.js.map +1 -0
  8. package/domain/abstractions.d.ts +18 -0
  9. package/domain/abstractions.js +6 -0
  10. package/domain/abstractions.js.map +1 -0
  11. package/domain/calculateExpiresOn.d.ts +1 -0
  12. package/domain/calculateExpiresOn.js +8 -0
  13. package/domain/calculateExpiresOn.js.map +1 -0
  14. package/domain/errors.d.ts +71 -0
  15. package/domain/errors.js +85 -0
  16. package/domain/errors.js.map +1 -0
  17. package/domain/index.d.ts +4 -0
  18. package/domain/index.js +4 -0
  19. package/domain/types.d.ts +44 -0
  20. package/domain/types.js +9 -0
  21. package/domain/types.js.map +1 -0
  22. package/features/GetLockRecord/GetLockRecordRepository.d.ts +16 -0
  23. package/features/GetLockRecord/GetLockRecordRepository.js +40 -0
  24. package/features/GetLockRecord/GetLockRecordRepository.js.map +1 -0
  25. package/features/GetLockRecord/GetLockRecordUseCase.d.ts +12 -0
  26. package/features/GetLockRecord/GetLockRecordUseCase.js +18 -0
  27. package/features/GetLockRecord/GetLockRecordUseCase.js.map +1 -0
  28. package/features/GetLockRecord/abstractions.d.ts +41 -0
  29. package/features/GetLockRecord/abstractions.js +6 -0
  30. package/features/GetLockRecord/abstractions.js.map +1 -0
  31. package/features/GetLockRecord/feature.d.ts +4 -0
  32. package/features/GetLockRecord/feature.js +13 -0
  33. package/features/GetLockRecord/feature.js.map +1 -0
  34. package/features/GetLockRecord/index.d.ts +2 -0
  35. package/features/GetLockRecord/index.js +2 -0
  36. package/features/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.d.ts +15 -0
  37. package/features/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.js +30 -0
  38. package/features/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.js.map +1 -0
  39. package/features/GetLockedEntryLockRecord/abstractions.d.ts +26 -0
  40. package/features/GetLockedEntryLockRecord/abstractions.js +5 -0
  41. package/features/GetLockedEntryLockRecord/abstractions.js.map +1 -0
  42. package/features/GetLockedEntryLockRecord/feature.d.ts +4 -0
  43. package/features/GetLockedEntryLockRecord/feature.js +11 -0
  44. package/features/GetLockedEntryLockRecord/feature.js.map +1 -0
  45. package/features/GetLockedEntryLockRecord/index.d.ts +2 -0
  46. package/features/GetLockedEntryLockRecord/index.js +2 -0
  47. package/features/IsEntryLocked/IsEntryLockedUseCase.d.ts +14 -0
  48. package/features/IsEntryLocked/IsEntryLockedUseCase.js +33 -0
  49. package/features/IsEntryLocked/IsEntryLockedUseCase.js.map +1 -0
  50. package/features/IsEntryLocked/abstractions.d.ts +24 -0
  51. package/features/IsEntryLocked/abstractions.js +5 -0
  52. package/features/IsEntryLocked/abstractions.js.map +1 -0
  53. package/features/IsEntryLocked/feature.d.ts +4 -0
  54. package/features/IsEntryLocked/feature.js +11 -0
  55. package/features/IsEntryLocked/feature.js.map +1 -0
  56. package/features/IsEntryLocked/index.d.ts +1 -0
  57. package/features/IsEntryLocked/index.js +1 -0
  58. package/features/KickOutCurrentUser/KickOutCurrentUserUseCase.d.ts +15 -0
  59. package/features/KickOutCurrentUser/KickOutCurrentUserUseCase.js +36 -0
  60. package/features/KickOutCurrentUser/KickOutCurrentUserUseCase.js.map +1 -0
  61. package/features/KickOutCurrentUser/abstractions.d.ts +17 -0
  62. package/features/KickOutCurrentUser/abstractions.js +5 -0
  63. package/features/KickOutCurrentUser/abstractions.js.map +1 -0
  64. package/features/KickOutCurrentUser/feature.d.ts +4 -0
  65. package/features/KickOutCurrentUser/feature.js +11 -0
  66. package/features/KickOutCurrentUser/feature.js.map +1 -0
  67. package/features/KickOutCurrentUser/index.d.ts +1 -0
  68. package/features/KickOutCurrentUser/index.js +1 -0
  69. package/features/ListAllLockRecords/ListAllLockRecordsRepository.d.ts +18 -0
  70. package/features/ListAllLockRecords/ListAllLockRecordsRepository.js +49 -0
  71. package/features/ListAllLockRecords/ListAllLockRecordsRepository.js.map +1 -0
  72. package/features/ListAllLockRecords/ListAllLockRecordsUseCase.d.ts +11 -0
  73. package/features/ListAllLockRecords/ListAllLockRecordsUseCase.js +18 -0
  74. package/features/ListAllLockRecords/ListAllLockRecordsUseCase.js.map +1 -0
  75. package/features/ListAllLockRecords/abstractions.d.ts +40 -0
  76. package/features/ListAllLockRecords/abstractions.js +6 -0
  77. package/features/ListAllLockRecords/abstractions.js.map +1 -0
  78. package/features/ListAllLockRecords/feature.d.ts +4 -0
  79. package/features/ListAllLockRecords/feature.js +13 -0
  80. package/features/ListAllLockRecords/feature.js.map +1 -0
  81. package/features/ListAllLockRecords/index.d.ts +2 -0
  82. package/features/ListAllLockRecords/index.js +2 -0
  83. package/features/ListLockRecords/ListLockRecordsRepository.d.ts +17 -0
  84. package/features/ListLockRecords/ListLockRecordsRepository.js +49 -0
  85. package/features/ListLockRecords/ListLockRecordsRepository.js.map +1 -0
  86. package/features/ListLockRecords/ListLockRecordsUseCase.d.ts +15 -0
  87. package/features/ListLockRecords/ListLockRecordsUseCase.js +33 -0
  88. package/features/ListLockRecords/ListLockRecordsUseCase.js.map +1 -0
  89. package/features/ListLockRecords/abstractions.d.ts +45 -0
  90. package/features/ListLockRecords/abstractions.js +6 -0
  91. package/features/ListLockRecords/abstractions.js.map +1 -0
  92. package/features/ListLockRecords/feature.d.ts +4 -0
  93. package/features/ListLockRecords/feature.js +13 -0
  94. package/features/ListLockRecords/feature.js.map +1 -0
  95. package/features/ListLockRecords/index.d.ts +1 -0
  96. package/features/ListLockRecords/index.js +1 -0
  97. package/features/LockEntry/LockEntryEventsDecorator.d.ts +14 -0
  98. package/features/LockEntry/LockEntryEventsDecorator.js +40 -0
  99. package/features/LockEntry/LockEntryEventsDecorator.js.map +1 -0
  100. package/features/LockEntry/LockEntryRepository.d.ts +16 -0
  101. package/features/LockEntry/LockEntryRepository.js +45 -0
  102. package/features/LockEntry/LockEntryRepository.js.map +1 -0
  103. package/features/LockEntry/LockEntryUseCase.d.ts +14 -0
  104. package/features/LockEntry/LockEntryUseCase.js +31 -0
  105. package/features/LockEntry/LockEntryUseCase.js.map +1 -0
  106. package/features/LockEntry/abstractions.d.ts +41 -0
  107. package/features/LockEntry/abstractions.js +6 -0
  108. package/features/LockEntry/abstractions.js.map +1 -0
  109. package/features/LockEntry/events.d.ts +45 -0
  110. package/features/LockEntry/events.js +32 -0
  111. package/features/LockEntry/events.js.map +1 -0
  112. package/features/LockEntry/feature.d.ts +4 -0
  113. package/features/LockEntry/feature.js +15 -0
  114. package/features/LockEntry/feature.js.map +1 -0
  115. package/features/LockEntry/index.d.ts +1 -0
  116. package/features/LockEntry/index.js +1 -0
  117. package/features/RecordLockingFeature.d.ts +15 -0
  118. package/features/RecordLockingFeature.js +34 -0
  119. package/features/RecordLockingFeature.js.map +1 -0
  120. package/features/UnlockEntry/UnlockEntryEventsDecorator.d.ts +14 -0
  121. package/features/UnlockEntry/UnlockEntryEventsDecorator.js +41 -0
  122. package/features/UnlockEntry/UnlockEntryEventsDecorator.js.map +1 -0
  123. package/features/UnlockEntry/UnlockEntryRepository.d.ts +14 -0
  124. package/features/UnlockEntry/UnlockEntryRepository.js +42 -0
  125. package/features/UnlockEntry/UnlockEntryRepository.js.map +1 -0
  126. package/features/UnlockEntry/UnlockEntryUseCase.d.ts +18 -0
  127. package/features/UnlockEntry/UnlockEntryUseCase.js +65 -0
  128. package/features/UnlockEntry/UnlockEntryUseCase.js.map +1 -0
  129. package/features/UnlockEntry/abstractions.d.ts +44 -0
  130. package/features/UnlockEntry/abstractions.js +6 -0
  131. package/features/UnlockEntry/abstractions.js.map +1 -0
  132. package/features/UnlockEntry/events.d.ts +46 -0
  133. package/features/UnlockEntry/events.js +32 -0
  134. package/features/UnlockEntry/events.js.map +1 -0
  135. package/features/UnlockEntry/feature.d.ts +4 -0
  136. package/features/UnlockEntry/feature.js +15 -0
  137. package/features/UnlockEntry/feature.js.map +1 -0
  138. package/features/UnlockEntry/hasFullAccessPermission.d.ts +2 -0
  139. package/features/UnlockEntry/hasFullAccessPermission.js +9 -0
  140. package/features/UnlockEntry/hasFullAccessPermission.js.map +1 -0
  141. package/features/UnlockEntry/index.d.ts +1 -0
  142. package/features/UnlockEntry/index.js +1 -0
  143. package/features/UnlockEntryRequest/UnlockEntryRequestEventsDecorator.d.ts +14 -0
  144. package/features/UnlockEntryRequest/UnlockEntryRequestEventsDecorator.js +40 -0
  145. package/features/UnlockEntryRequest/UnlockEntryRequestEventsDecorator.js.map +1 -0
  146. package/features/UnlockEntryRequest/UnlockEntryRequestRepository.d.ts +17 -0
  147. package/features/UnlockEntryRequest/UnlockEntryRequestRepository.js +44 -0
  148. package/features/UnlockEntryRequest/UnlockEntryRequestRepository.js.map +1 -0
  149. package/features/UnlockEntryRequest/UnlockEntryRequestUseCase.d.ts +16 -0
  150. package/features/UnlockEntryRequest/UnlockEntryRequestUseCase.js +75 -0
  151. package/features/UnlockEntryRequest/UnlockEntryRequestUseCase.js.map +1 -0
  152. package/features/UnlockEntryRequest/abstractions.d.ts +42 -0
  153. package/features/UnlockEntryRequest/abstractions.js +6 -0
  154. package/features/UnlockEntryRequest/abstractions.js.map +1 -0
  155. package/features/UnlockEntryRequest/events.d.ts +45 -0
  156. package/features/UnlockEntryRequest/events.js +32 -0
  157. package/features/UnlockEntryRequest/events.js.map +1 -0
  158. package/features/UnlockEntryRequest/feature.d.ts +4 -0
  159. package/features/UnlockEntryRequest/feature.js +15 -0
  160. package/features/UnlockEntryRequest/feature.js.map +1 -0
  161. package/features/UnlockEntryRequest/index.d.ts +3 -0
  162. package/features/UnlockEntryRequest/index.js +3 -0
  163. package/features/UpdateEntryLock/UpdateEntryLockRepository.d.ts +20 -0
  164. package/features/UpdateEntryLock/UpdateEntryLockRepository.js +60 -0
  165. package/features/UpdateEntryLock/UpdateEntryLockRepository.js.map +1 -0
  166. package/features/UpdateEntryLock/UpdateEntryLockUseCase.d.ts +18 -0
  167. package/features/UpdateEntryLock/UpdateEntryLockUseCase.js +51 -0
  168. package/features/UpdateEntryLock/UpdateEntryLockUseCase.js.map +1 -0
  169. package/features/UpdateEntryLock/abstractions.d.ts +42 -0
  170. package/features/UpdateEntryLock/abstractions.js +6 -0
  171. package/features/UpdateEntryLock/abstractions.js.map +1 -0
  172. package/features/UpdateEntryLock/feature.d.ts +4 -0
  173. package/features/UpdateEntryLock/feature.js +13 -0
  174. package/features/UpdateEntryLock/feature.js.map +1 -0
  175. package/features/UpdateEntryLock/index.d.ts +1 -0
  176. package/features/UpdateEntryLock/index.js +1 -0
  177. package/graphql/checkPermissions.d.ts +5 -0
  178. package/graphql/checkPermissions.js +10 -0
  179. package/graphql/checkPermissions.js.map +1 -0
  180. package/{utils → graphql}/resolve.d.ts +2 -2
  181. package/graphql/resolve.js +20 -0
  182. package/graphql/resolve.js.map +1 -0
  183. package/graphql/schema.d.ts +7 -3
  184. package/graphql/schema.js +162 -145
  185. package/graphql/schema.js.map +1 -1
  186. package/index.d.ts +3 -3
  187. package/index.js +55 -34
  188. package/index.js.map +1 -1
  189. package/package.json +29 -28
  190. package/types.d.ts +3 -132
  191. package/types.js +6 -27
  192. package/types.js.map +1 -1
  193. package/utils/convertWhereCondition.d.ts +1 -1
  194. package/utils/convertWhereCondition.js +21 -36
  195. package/utils/convertWhereCondition.js.map +1 -1
  196. package/utils/getTimeout.js +8 -22
  197. package/utils/getTimeout.js.map +1 -1
  198. package/utils/lockRecordDatabaseId.js +7 -20
  199. package/utils/lockRecordDatabaseId.js.map +1 -1
  200. package/abstractions/IGetLockRecordUseCase.d.ts +0 -8
  201. package/abstractions/IGetLockRecordUseCase.js +0 -7
  202. package/abstractions/IGetLockRecordUseCase.js.map +0 -1
  203. package/abstractions/IGetLockedEntryLockRecordUseCase.d.ts +0 -8
  204. package/abstractions/IGetLockedEntryLockRecordUseCase.js +0 -7
  205. package/abstractions/IGetLockedEntryLockRecordUseCase.js.map +0 -1
  206. package/abstractions/IIsEntryLocked.d.ts +0 -8
  207. package/abstractions/IIsEntryLocked.js +0 -7
  208. package/abstractions/IIsEntryLocked.js.map +0 -1
  209. package/abstractions/IKickOutCurrentUserUseCase.d.ts +0 -5
  210. package/abstractions/IKickOutCurrentUserUseCase.js +0 -7
  211. package/abstractions/IKickOutCurrentUserUseCase.js.map +0 -1
  212. package/abstractions/IListAllLockRecordsUseCase.d.ts +0 -9
  213. package/abstractions/IListAllLockRecordsUseCase.js +0 -7
  214. package/abstractions/IListAllLockRecordsUseCase.js.map +0 -1
  215. package/abstractions/IListLockRecordsUseCase.d.ts +0 -10
  216. package/abstractions/IListLockRecordsUseCase.js +0 -7
  217. package/abstractions/IListLockRecordsUseCase.js.map +0 -1
  218. package/abstractions/ILockEntryUseCase.d.ts +0 -11
  219. package/abstractions/ILockEntryUseCase.js +0 -7
  220. package/abstractions/ILockEntryUseCase.js.map +0 -1
  221. package/abstractions/IUnlockEntryRequestUseCase.d.ts +0 -11
  222. package/abstractions/IUnlockEntryRequestUseCase.js +0 -7
  223. package/abstractions/IUnlockEntryRequestUseCase.js.map +0 -1
  224. package/abstractions/IUnlockEntryUseCase.d.ts +0 -12
  225. package/abstractions/IUnlockEntryUseCase.js +0 -7
  226. package/abstractions/IUnlockEntryUseCase.js.map +0 -1
  227. package/abstractions/IUpdateEntryLockUseCase.d.ts +0 -11
  228. package/abstractions/IUpdateEntryLockUseCase.js +0 -7
  229. package/abstractions/IUpdateEntryLockUseCase.js.map +0 -1
  230. package/crud/crud.d.ts +0 -7
  231. package/crud/crud.js +0 -204
  232. package/crud/crud.js.map +0 -1
  233. package/crud/model.d.ts +0 -2
  234. package/crud/model.js +0 -127
  235. package/crud/model.js.map +0 -1
  236. package/useCases/GetLockRecord/GetLockRecordUseCase.d.ts +0 -16
  237. package/useCases/GetLockRecord/GetLockRecordUseCase.js +0 -39
  238. package/useCases/GetLockRecord/GetLockRecordUseCase.js.map +0 -1
  239. package/useCases/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.d.ts +0 -16
  240. package/useCases/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.js +0 -29
  241. package/useCases/GetLockedEntryLockRecord/GetLockedEntryLockRecordUseCase.js.map +0 -1
  242. package/useCases/IsEntryLocked/IsEntryLockedUseCase.d.ts +0 -13
  243. package/useCases/IsEntryLocked/IsEntryLockedUseCase.js +0 -31
  244. package/useCases/IsEntryLocked/IsEntryLockedUseCase.js.map +0 -1
  245. package/useCases/KickOutCurrentUser/KickOutCurrentUserUseCase.d.ts +0 -12
  246. package/useCases/KickOutCurrentUser/KickOutCurrentUserUseCase.js +0 -46
  247. package/useCases/KickOutCurrentUser/KickOutCurrentUserUseCase.js.map +0 -1
  248. package/useCases/ListAllLockRecordsUseCase/ListAllLockRecordsUseCase.d.ts +0 -13
  249. package/useCases/ListAllLockRecordsUseCase/ListAllLockRecordsUseCase.js +0 -34
  250. package/useCases/ListAllLockRecordsUseCase/ListAllLockRecordsUseCase.js.map +0 -1
  251. package/useCases/ListLockRecordsUseCase/ListLockRecordsUseCase.d.ts +0 -14
  252. package/useCases/ListLockRecordsUseCase/ListLockRecordsUseCase.js +0 -27
  253. package/useCases/ListLockRecordsUseCase/ListLockRecordsUseCase.js.map +0 -1
  254. package/useCases/LockEntryUseCase/LockEntryUseCase.d.ts +0 -21
  255. package/useCases/LockEntryUseCase/LockEntryUseCase.js +0 -64
  256. package/useCases/LockEntryUseCase/LockEntryUseCase.js.map +0 -1
  257. package/useCases/UnlockEntryUseCase/UnlockEntryUseCase.d.ts +0 -23
  258. package/useCases/UnlockEntryUseCase/UnlockEntryUseCase.js +0 -90
  259. package/useCases/UnlockEntryUseCase/UnlockEntryUseCase.js.map +0 -1
  260. package/useCases/UnlockRequestUseCase/UnlockEntryRequestUseCase.d.ts +0 -21
  261. package/useCases/UnlockRequestUseCase/UnlockEntryRequestUseCase.js +0 -82
  262. package/useCases/UnlockRequestUseCase/UnlockEntryRequestUseCase.js.map +0 -1
  263. package/useCases/UpdateEntryLock/UpdateEntryLockUseCase.d.ts +0 -26
  264. package/useCases/UpdateEntryLock/UpdateEntryLockUseCase.js +0 -93
  265. package/useCases/UpdateEntryLock/UpdateEntryLockUseCase.js.map +0 -1
  266. package/useCases/index.d.ts +0 -31
  267. package/useCases/index.js +0 -96
  268. package/useCases/index.js.map +0 -1
  269. package/useCases/types.d.ts +0 -5
  270. package/useCases/types.js +0 -7
  271. package/useCases/types.js.map +0 -1
  272. package/utils/calculateExpiresOn.d.ts +0 -2
  273. package/utils/calculateExpiresOn.js +0 -16
  274. package/utils/calculateExpiresOn.js.map +0 -1
  275. package/utils/checkPermissions.d.ts +0 -7
  276. package/utils/checkPermissions.js +0 -21
  277. package/utils/checkPermissions.js.map +0 -1
  278. package/utils/convertEntryToLockRecord.d.ts +0 -28
  279. package/utils/convertEntryToLockRecord.js +0 -91
  280. package/utils/convertEntryToLockRecord.js.map +0 -1
  281. package/utils/resolve.js +0 -30
  282. package/utils/resolve.js.map +0 -1
  283. package/utils/validateSameIdentity.d.ts +0 -6
  284. package/utils/validateSameIdentity.js +0 -24
  285. package/utils/validateSameIdentity.js.map +0 -1
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=IGetLockedEntryLockRecordUseCase.js.map
@@ -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,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=IIsEntryLocked.js.map
@@ -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,5 +0,0 @@
1
- import type { IRecordLockingLockRecord } from "../types";
2
- export type IKickOutCurrentUserUseCaseExecuteParams = IRecordLockingLockRecord;
3
- export interface IKickOutCurrentUserUseCase {
4
- execute(params: IKickOutCurrentUserUseCaseExecuteParams): Promise<void>;
5
- }
@@ -1,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=IKickOutCurrentUserUseCase.js.map
@@ -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,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=IListAllLockRecordsUseCase.js.map
@@ -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,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=IListLockRecordsUseCase.js.map
@@ -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,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=ILockEntryUseCase.js.map
@@ -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,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=IUnlockEntryRequestUseCase.js.map
@@ -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,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=IUnlockEntryUseCase.js.map
@@ -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,7 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
-
7
- //# sourceMappingURL=IUpdateEntryLockUseCase.js.map
@@ -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 {};
package/crud/crud.js DELETED
@@ -1,204 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createRecordLockingCrud = void 0;
7
- var _error = require("@webiny/error");
8
- var _model = require("./model");
9
- var _useCases = require("../useCases");
10
- var _pubsub = require("@webiny/pubsub");
11
- var _getTimeout = require("../utils/getTimeout");
12
- const createRecordLockingCrud = async params => {
13
- const {
14
- context
15
- } = params;
16
- const getTimeout = () => {
17
- return (0, _getTimeout.getTimeout)(params.timeout);
18
- };
19
- const getModel = async () => {
20
- const model = await context.cms.getModel(_model.RECORD_LOCKING_MODEL_ID);
21
- if (model) {
22
- return model;
23
- }
24
- throw new _error.WebinyError("Record Locking model not found.", "MODEL_NOT_FOUND", {
25
- modelId: _model.RECORD_LOCKING_MODEL_ID
26
- });
27
- };
28
- const getManager = async () => {
29
- return await context.cms.getEntryManager(_model.RECORD_LOCKING_MODEL_ID);
30
- };
31
- const getSecurity = () => {
32
- return context.security;
33
- };
34
- const getIdentity = () => {
35
- const identity = context.security.getIdentity();
36
- if (!identity) {
37
- throw new _error.WebinyError("Identity missing.");
38
- }
39
- return {
40
- id: identity.id,
41
- displayName: identity.displayName,
42
- type: identity.type
43
- };
44
- };
45
- const hasRecordLockingAccess = async () => {
46
- const hasFulLAccess = await context.security.hasFullAccess();
47
- if (hasFulLAccess) {
48
- return true;
49
- }
50
- const permission = await context.security.getPermission("recordLocking");
51
- return permission?.canForceUnlock === "yes";
52
- };
53
- const onEntryBeforeLock = (0, _pubsub.createTopic)("cms.recordLocking.onEntryBeforeLock");
54
- const onEntryAfterLock = (0, _pubsub.createTopic)("cms.recordLocking.onEntryAfterLock");
55
- const onEntryLockError = (0, _pubsub.createTopic)("cms.recordLocking.onEntryLockError");
56
- const onEntryBeforeUnlock = (0, _pubsub.createTopic)("cms.recordLocking.onEntryBeforeUnlock");
57
- const onEntryAfterUnlock = (0, _pubsub.createTopic)("cms.recordLocking.onEntryAfterUnlock");
58
- const onEntryUnlockError = (0, _pubsub.createTopic)("cms.recordLocking.onEntryUnlockError");
59
- const onEntryBeforeUnlockRequest = (0, _pubsub.createTopic)("cms.recordLocking.onEntryBeforeUnlockRequest");
60
- const onEntryAfterUnlockRequest = (0, _pubsub.createTopic)("cms.recordLocking.onEntryAfterUnlockRequest");
61
- const onEntryUnlockRequestError = (0, _pubsub.createTopic)("cms.recordLocking.onEntryUnlockRequestError");
62
- const getWebsockets = () => {
63
- return context.websockets;
64
- };
65
- const {
66
- listLockRecordsUseCase,
67
- listAllLockRecordsUseCase,
68
- getLockRecordUseCase,
69
- isEntryLockedUseCase,
70
- getLockedEntryLockRecordUseCase,
71
- lockEntryUseCase,
72
- updateEntryLockUseCase,
73
- unlockEntryUseCase,
74
- unlockEntryRequestUseCase
75
- } = (0, _useCases.createUseCases)({
76
- getIdentity,
77
- getManager,
78
- getSecurity,
79
- hasRecordLockingAccess,
80
- getWebsockets,
81
- getTimeout
82
- });
83
- const listAllLockRecords = async params => {
84
- return context.benchmark.measure("recordLocking.listAllLockRecords", async () => {
85
- return listAllLockRecordsUseCase.execute(params);
86
- });
87
- };
88
- const listLockRecords = async params => {
89
- return context.benchmark.measure("recordLocking.listLockRecords", async () => {
90
- return listLockRecordsUseCase.execute(params);
91
- });
92
- };
93
- const getLockRecord = async params => {
94
- return context.benchmark.measure("recordLocking.getLockRecord", async () => {
95
- return getLockRecordUseCase.execute(params);
96
- });
97
- };
98
- const isEntryLocked = async params => {
99
- return context.benchmark.measure("recordLocking.isEntryLocked", async () => {
100
- return isEntryLockedUseCase.execute(params);
101
- });
102
- };
103
- const getLockedEntryLockRecord = async params => {
104
- return context.benchmark.measure("recordLocking.getLockedEntryLockRecord", async () => {
105
- return getLockedEntryLockRecordUseCase.execute(params);
106
- });
107
- };
108
- const lockEntry = async params => {
109
- return context.benchmark.measure("recordLocking.lockEntry", async () => {
110
- try {
111
- await onEntryBeforeLock.publish(params);
112
- const record = await lockEntryUseCase.execute(params);
113
- await onEntryAfterLock.publish({
114
- ...params,
115
- record
116
- });
117
- return record;
118
- } catch (ex) {
119
- await onEntryLockError.publish({
120
- ...params,
121
- error: ex
122
- });
123
- throw ex;
124
- }
125
- });
126
- };
127
- const updateEntryLock = async params => {
128
- return context.benchmark.measure("recordLocking.updateEntryLock", async () => {
129
- return updateEntryLockUseCase.execute(params);
130
- });
131
- };
132
- const unlockEntry = async params => {
133
- return context.benchmark.measure("recordLocking.unlockEntry", async () => {
134
- try {
135
- await onEntryBeforeUnlock.publish({
136
- ...params,
137
- getIdentity
138
- });
139
- const record = await unlockEntryUseCase.execute(params);
140
- await onEntryAfterUnlock.publish({
141
- ...params,
142
- record
143
- });
144
- return record;
145
- } catch (ex) {
146
- await onEntryUnlockError.publish({
147
- ...params,
148
- error: ex
149
- });
150
- throw ex;
151
- }
152
- });
153
- };
154
- const unlockEntryRequest = async params => {
155
- return context.benchmark.measure("recordLocking.unlockEntryRequest", async () => {
156
- try {
157
- await onEntryBeforeUnlockRequest.publish(params);
158
- const record = await unlockEntryRequestUseCase.execute(params);
159
- await onEntryAfterUnlockRequest.publish({
160
- ...params,
161
- record
162
- });
163
- return record;
164
- } catch (ex) {
165
- await onEntryUnlockRequestError.publish({
166
- ...params,
167
- error: ex
168
- });
169
- throw ex;
170
- }
171
- });
172
- };
173
- return {
174
- /**
175
- * Lifecycle events
176
- */
177
- onEntryBeforeLock,
178
- onEntryAfterLock,
179
- onEntryLockError,
180
- onEntryBeforeUnlock,
181
- onEntryAfterUnlock,
182
- onEntryUnlockError,
183
- onEntryBeforeUnlockRequest,
184
- onEntryAfterUnlockRequest,
185
- onEntryUnlockRequestError,
186
- /**
187
- * Methods
188
- */
189
- getModel,
190
- listLockRecords,
191
- listAllLockRecords,
192
- getLockRecord,
193
- isEntryLocked,
194
- getLockedEntryLockRecord,
195
- lockEntry,
196
- updateEntryLock,
197
- unlockEntry,
198
- unlockEntryRequest,
199
- getTimeout
200
- };
201
- };
202
- exports.createRecordLockingCrud = createRecordLockingCrud;
203
-
204
- //# sourceMappingURL=crud.js.map
package/crud/crud.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"names":["_error","require","_model","_useCases","_pubsub","_getTimeout","createRecordLockingCrud","params","context","getTimeout","baseGetTimeout","timeout","getModel","model","cms","RECORD_LOCKING_MODEL_ID","WebinyError","modelId","getManager","getEntryManager","getSecurity","security","getIdentity","identity","id","displayName","type","hasRecordLockingAccess","hasFulLAccess","hasFullAccess","permission","getPermission","canForceUnlock","onEntryBeforeLock","createTopic","onEntryAfterLock","onEntryLockError","onEntryBeforeUnlock","onEntryAfterUnlock","onEntryUnlockError","onEntryBeforeUnlockRequest","onEntryAfterUnlockRequest","onEntryUnlockRequestError","getWebsockets","websockets","listLockRecordsUseCase","listAllLockRecordsUseCase","getLockRecordUseCase","isEntryLockedUseCase","getLockedEntryLockRecordUseCase","lockEntryUseCase","updateEntryLockUseCase","unlockEntryUseCase","unlockEntryRequestUseCase","createUseCases","listAllLockRecords","benchmark","measure","execute","listLockRecords","getLockRecord","isEntryLocked","getLockedEntryLockRecord","lockEntry","publish","record","ex","error","updateEntryLock","unlockEntry","unlockEntryRequest","exports"],"sources":["crud.ts"],"sourcesContent":["import { WebinyError } from \"@webiny/error\";\nimport type {\n Context,\n IGetIdentity,\n IGetWebsocketsContextCallable,\n IHasRecordLockingAccessCallable,\n IRecordLocking,\n IRecordLockingLockRecordValues,\n IRecordLockingModelManager,\n OnEntryAfterLockTopicParams,\n OnEntryAfterUnlockRequestTopicParams,\n OnEntryAfterUnlockTopicParams,\n OnEntryBeforeLockTopicParams,\n OnEntryBeforeUnlockRequestTopicParams,\n OnEntryBeforeUnlockTopicParams,\n OnEntryLockErrorTopicParams,\n OnEntryUnlockErrorTopicParams,\n OnEntryUnlockRequestErrorTopicParams,\n RecordLockingSecurityPermission\n} from \"~/types\";\nimport { RECORD_LOCKING_MODEL_ID } from \"./model\";\nimport type { IGetLockRecordUseCaseExecute } from \"~/abstractions/IGetLockRecordUseCase\";\nimport type { IIsEntryLockedUseCaseExecute } from \"~/abstractions/IIsEntryLocked\";\nimport type { ILockEntryUseCaseExecute } from \"~/abstractions/ILockEntryUseCase\";\nimport type { IUnlockEntryUseCaseExecute } from \"~/abstractions/IUnlockEntryUseCase\";\nimport { createUseCases } from \"~/useCases\";\nimport type { IUnlockEntryRequestUseCaseExecute } from \"~/abstractions/IUnlockEntryRequestUseCase\";\nimport { createTopic } from \"@webiny/pubsub\";\nimport type { IListAllLockRecordsUseCaseExecute } from \"~/abstractions/IListAllLockRecordsUseCase\";\nimport type { IListLockRecordsUseCaseExecute } from \"~/abstractions/IListLockRecordsUseCase\";\nimport type { IUpdateEntryLockUseCaseExecute } from \"~/abstractions/IUpdateEntryLockUseCase\";\nimport type { IGetLockedEntryLockRecordUseCaseExecute } from \"~/abstractions/IGetLockedEntryLockRecordUseCase\";\nimport { getTimeout as baseGetTimeout } from \"~/utils/getTimeout\";\n\ninterface Params {\n context: Pick<Context, \"plugins\" | \"cms\" | \"benchmark\" | \"security\" | \"websockets\">;\n timeout?: number;\n}\n\nexport const createRecordLockingCrud = async (params: Params): Promise<IRecordLocking> => {\n const { context } = params;\n const getTimeout = (): number => {\n return baseGetTimeout(params.timeout);\n };\n const getModel = async () => {\n const model = await context.cms.getModel(RECORD_LOCKING_MODEL_ID);\n if (model) {\n return model;\n }\n throw new WebinyError(\"Record Locking model not found.\", \"MODEL_NOT_FOUND\", {\n modelId: RECORD_LOCKING_MODEL_ID\n });\n };\n\n const getManager = async (): Promise<IRecordLockingModelManager> => {\n return await context.cms.getEntryManager<IRecordLockingLockRecordValues>(\n RECORD_LOCKING_MODEL_ID\n );\n };\n\n const getSecurity = () => {\n return context.security;\n };\n\n const getIdentity: IGetIdentity = () => {\n const identity = context.security.getIdentity();\n if (!identity) {\n throw new WebinyError(\"Identity missing.\");\n }\n return {\n id: identity.id,\n displayName: identity.displayName,\n type: identity.type\n };\n };\n\n const hasRecordLockingAccess: IHasRecordLockingAccessCallable = async () => {\n const hasFulLAccess = await context.security.hasFullAccess();\n if (hasFulLAccess) {\n return true;\n }\n const permission = await context.security.getPermission<RecordLockingSecurityPermission>(\n \"recordLocking\"\n );\n return permission?.canForceUnlock === \"yes\";\n };\n\n const onEntryBeforeLock = createTopic<OnEntryBeforeLockTopicParams>(\n \"cms.recordLocking.onEntryBeforeLock\"\n );\n const onEntryAfterLock = createTopic<OnEntryAfterLockTopicParams>(\n \"cms.recordLocking.onEntryAfterLock\"\n );\n const onEntryLockError = createTopic<OnEntryLockErrorTopicParams>(\n \"cms.recordLocking.onEntryLockError\"\n );\n\n const onEntryBeforeUnlock = createTopic<OnEntryBeforeUnlockTopicParams>(\n \"cms.recordLocking.onEntryBeforeUnlock\"\n );\n const onEntryAfterUnlock = createTopic<OnEntryAfterUnlockTopicParams>(\n \"cms.recordLocking.onEntryAfterUnlock\"\n );\n const onEntryUnlockError = createTopic<OnEntryUnlockErrorTopicParams>(\n \"cms.recordLocking.onEntryUnlockError\"\n );\n\n const onEntryBeforeUnlockRequest = createTopic<OnEntryBeforeUnlockRequestTopicParams>(\n \"cms.recordLocking.onEntryBeforeUnlockRequest\"\n );\n const onEntryAfterUnlockRequest = createTopic<OnEntryAfterUnlockRequestTopicParams>(\n \"cms.recordLocking.onEntryAfterUnlockRequest\"\n );\n const onEntryUnlockRequestError = createTopic<OnEntryUnlockRequestErrorTopicParams>(\n \"cms.recordLocking.onEntryUnlockRequestError\"\n );\n\n const getWebsockets: IGetWebsocketsContextCallable = () => {\n return context.websockets;\n };\n\n const {\n listLockRecordsUseCase,\n listAllLockRecordsUseCase,\n getLockRecordUseCase,\n isEntryLockedUseCase,\n getLockedEntryLockRecordUseCase,\n lockEntryUseCase,\n updateEntryLockUseCase,\n unlockEntryUseCase,\n unlockEntryRequestUseCase\n } = createUseCases({\n getIdentity,\n getManager,\n getSecurity,\n hasRecordLockingAccess,\n getWebsockets,\n getTimeout\n });\n\n const listAllLockRecords: IListAllLockRecordsUseCaseExecute = async params => {\n return context.benchmark.measure(\"recordLocking.listAllLockRecords\", async () => {\n return listAllLockRecordsUseCase.execute(params);\n });\n };\n\n const listLockRecords: IListLockRecordsUseCaseExecute = async params => {\n return context.benchmark.measure(\"recordLocking.listLockRecords\", async () => {\n return listLockRecordsUseCase.execute(params);\n });\n };\n\n const getLockRecord: IGetLockRecordUseCaseExecute = async params => {\n return context.benchmark.measure(\"recordLocking.getLockRecord\", async () => {\n return getLockRecordUseCase.execute(params);\n });\n };\n\n const isEntryLocked: IIsEntryLockedUseCaseExecute = async params => {\n return context.benchmark.measure(\"recordLocking.isEntryLocked\", async () => {\n return isEntryLockedUseCase.execute(params);\n });\n };\n\n const getLockedEntryLockRecord: IGetLockedEntryLockRecordUseCaseExecute = async params => {\n return context.benchmark.measure(\"recordLocking.getLockedEntryLockRecord\", async () => {\n return getLockedEntryLockRecordUseCase.execute(params);\n });\n };\n\n const lockEntry: ILockEntryUseCaseExecute = async params => {\n return context.benchmark.measure(\"recordLocking.lockEntry\", async () => {\n try {\n await onEntryBeforeLock.publish(params);\n const record = await lockEntryUseCase.execute(params);\n await onEntryAfterLock.publish({\n ...params,\n record\n });\n return record;\n } catch (ex) {\n await onEntryLockError.publish({\n ...params,\n error: ex\n });\n throw ex;\n }\n });\n };\n\n const updateEntryLock: IUpdateEntryLockUseCaseExecute = async params => {\n return context.benchmark.measure(\"recordLocking.updateEntryLock\", async () => {\n return updateEntryLockUseCase.execute(params);\n });\n };\n\n const unlockEntry: IUnlockEntryUseCaseExecute = async params => {\n return context.benchmark.measure(\"recordLocking.unlockEntry\", async () => {\n try {\n await onEntryBeforeUnlock.publish({\n ...params,\n getIdentity\n });\n const record = await unlockEntryUseCase.execute(params);\n await onEntryAfterUnlock.publish({\n ...params,\n record\n });\n return record;\n } catch (ex) {\n await onEntryUnlockError.publish({\n ...params,\n error: ex\n });\n throw ex;\n }\n });\n };\n\n const unlockEntryRequest: IUnlockEntryRequestUseCaseExecute = async params => {\n return context.benchmark.measure(\"recordLocking.unlockEntryRequest\", async () => {\n try {\n await onEntryBeforeUnlockRequest.publish(params);\n const record = await unlockEntryRequestUseCase.execute(params);\n await onEntryAfterUnlockRequest.publish({\n ...params,\n record\n });\n return record;\n } catch (ex) {\n await onEntryUnlockRequestError.publish({\n ...params,\n error: ex\n });\n throw ex;\n }\n });\n };\n\n return {\n /**\n * Lifecycle events\n */\n onEntryBeforeLock,\n onEntryAfterLock,\n onEntryLockError,\n onEntryBeforeUnlock,\n onEntryAfterUnlock,\n onEntryUnlockError,\n onEntryBeforeUnlockRequest,\n onEntryAfterUnlockRequest,\n onEntryUnlockRequestError,\n /**\n * Methods\n */\n getModel,\n listLockRecords,\n listAllLockRecords,\n getLockRecord,\n isEntryLocked,\n getLockedEntryLockRecord,\n lockEntry,\n updateEntryLock,\n unlockEntry,\n unlockEntryRequest,\n getTimeout\n };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAoBA,IAAAC,MAAA,GAAAD,OAAA;AAKA,IAAAE,SAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAKA,IAAAI,WAAA,GAAAJ,OAAA;AAOO,MAAMK,uBAAuB,GAAG,MAAOC,MAAc,IAA8B;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CAAC,CAAC,OAAOC,EAAE,EAAE;QACT,MAAMxB,yBAAyB,CAACsB,OAAO,CAAC;UACpC,GAAGzD,MAAM;UACT4D,KAAK,EAAED;QACX,CAAC,CAAC;QACF,MAAMA,EAAE;MACZ;IACJ,CAAC,CAAC;EACN,CAAC;EAED,OAAO;IACH;AACR;AACA;IACQjC,iBAAiB;IACjBE,gBAAgB;IAChBC,gBAAgB;IAChBC,mBAAmB;IACnBC,kBAAkB;IAClBC,kBAAkB;IAClBC,0BAA0B;IAC1BC,yBAAyB;IACzBC,yBAAyB;IACzB;AACR;AACA;IACQ9B,QAAQ;IACR+C,eAAe;IACfJ,kBAAkB;IAClBK,aAAa;IACbC,aAAa;IACbC,wBAAwB;IACxBC,SAAS;IACTK,eAAe;IACfC,WAAW;IACXC,kBAAkB;IAClB7D;EACJ,CAAC;AACL,CAAC;AAAC8D,OAAA,CAAAjE,uBAAA,GAAAA,uBAAA","ignoreList":[]}
package/crud/model.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare const RECORD_LOCKING_MODEL_ID = "wby_recordLocking";
2
- export declare const createLockingModel: () => import("@webiny/api-headless-cms").CmsModelPlugin;
package/crud/model.js DELETED
@@ -1,127 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.createLockingModel = exports.RECORD_LOCKING_MODEL_ID = void 0;
7
- var _apiHeadlessCms = require("@webiny/api-headless-cms");
8
- const RECORD_LOCKING_MODEL_ID = exports.RECORD_LOCKING_MODEL_ID = "wby_recordLocking";
9
- const createLockingModel = () => {
10
- return (0, _apiHeadlessCms.createCmsModel)((0, _apiHeadlessCms.createPrivateModel)({
11
- modelId: RECORD_LOCKING_MODEL_ID,
12
- name: "Record Lock Tracking",
13
- fields: [{
14
- id: "targetId",
15
- type: "text",
16
- fieldId: "targetId",
17
- storageId: "text@targetId",
18
- label: "Target ID",
19
- validation: [{
20
- name: "required",
21
- message: "Target ID is required."
22
- }]
23
- },
24
- /**
25
- * Since we need a generic way to track records, we will use type to determine if it's a cms record or a page or a form, etc...
26
- * Update IHeadlessCmsLockRecordValues in types.ts file with additional fields as required.
27
- *
28
- * @see IHeadlessCmsLockRecordValues
29
- */
30
- {
31
- id: "type",
32
- type: "text",
33
- fieldId: "type",
34
- storageId: "text@type",
35
- label: "Record Type",
36
- validation: [{
37
- name: "required",
38
- message: "Record type is required."
39
- }]
40
- }, {
41
- id: "actions",
42
- type: "object",
43
- fieldId: "actions",
44
- storageId: "object@actions",
45
- label: "Actions",
46
- multipleValues: true,
47
- settings: {
48
- fields: [{
49
- id: "type",
50
- type: "text",
51
- fieldId: "type",
52
- storageId: "text@type",
53
- label: "Action Type",
54
- validation: [{
55
- name: "required",
56
- message: "Action type is required."
57
- }]
58
- }, {
59
- id: "message",
60
- type: "text",
61
- fieldId: "message",
62
- storageId: "text@message",
63
- label: "Message"
64
- }, {
65
- id: "createdBy",
66
- type: "object",
67
- fieldId: "createdBy",
68
- storageId: "object@createdBy",
69
- label: "Created By",
70
- validation: [{
71
- name: "required",
72
- message: "Created by is required."
73
- }],
74
- settings: {
75
- fields: [{
76
- id: "id",
77
- type: "text",
78
- fieldId: "id",
79
- storageId: "text@id",
80
- label: "ID",
81
- validation: [{
82
- name: "required",
83
- message: "ID is required."
84
- }]
85
- }, {
86
- id: "displayName",
87
- type: "text",
88
- fieldId: "displayName",
89
- storageId: "text@displayName",
90
- label: "Display Name",
91
- validation: [{
92
- name: "required",
93
- message: "Display name is required."
94
- }]
95
- }, {
96
- id: "type",
97
- type: "text",
98
- fieldId: "type",
99
- storageId: "text@type",
100
- label: "Type",
101
- validation: [{
102
- name: "required",
103
- message: "Type is required."
104
- }]
105
- }]
106
- }
107
- }, {
108
- id: "createdOn",
109
- type: "datetime",
110
- fieldId: "createdOn",
111
- storageId: "datetime@createdOn",
112
- settings: {
113
- type: "dateTimeWithoutTimezone"
114
- },
115
- label: "Created On",
116
- validation: [{
117
- name: "required",
118
- message: "Created on is required."
119
- }]
120
- }]
121
- }
122
- }]
123
- }));
124
- };
125
- exports.createLockingModel = createLockingModel;
126
-
127
- //# sourceMappingURL=model.js.map
package/crud/model.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"names":["_apiHeadlessCms","require","RECORD_LOCKING_MODEL_ID","exports","createLockingModel","createCmsModel","createPrivateModel","modelId","name","fields","id","type","fieldId","storageId","label","validation","message","multipleValues","settings"],"sources":["model.ts"],"sourcesContent":["import { createCmsModel, createPrivateModel } from \"@webiny/api-headless-cms\";\n\nexport const RECORD_LOCKING_MODEL_ID = \"wby_recordLocking\";\n\nexport const createLockingModel = () => {\n return createCmsModel(\n createPrivateModel({\n modelId: RECORD_LOCKING_MODEL_ID,\n name: \"Record Lock Tracking\",\n fields: [\n {\n id: \"targetId\",\n type: \"text\",\n fieldId: \"targetId\",\n storageId: \"text@targetId\",\n label: \"Target ID\",\n validation: [\n {\n name: \"required\",\n message: \"Target ID is required.\"\n }\n ]\n },\n /**\n * Since we need a generic way to track records, we will use type to determine if it's a cms record or a page or a form, etc...\n * Update IHeadlessCmsLockRecordValues in types.ts file with additional fields as required.\n *\n * @see IHeadlessCmsLockRecordValues\n */\n {\n id: \"type\",\n type: \"text\",\n fieldId: \"type\",\n storageId: \"text@type\",\n label: \"Record Type\",\n validation: [\n {\n name: \"required\",\n message: \"Record type is required.\"\n }\n ]\n },\n {\n id: \"actions\",\n type: \"object\",\n fieldId: \"actions\",\n storageId: \"object@actions\",\n label: \"Actions\",\n multipleValues: true,\n settings: {\n fields: [\n {\n id: \"type\",\n type: \"text\",\n fieldId: \"type\",\n storageId: \"text@type\",\n label: \"Action Type\",\n validation: [\n {\n name: \"required\",\n message: \"Action type is required.\"\n }\n ]\n },\n {\n id: \"message\",\n type: \"text\",\n fieldId: \"message\",\n storageId: \"text@message\",\n label: \"Message\"\n },\n {\n id: \"createdBy\",\n type: \"object\",\n fieldId: \"createdBy\",\n storageId: \"object@createdBy\",\n label: \"Created By\",\n validation: [\n {\n name: \"required\",\n message: \"Created by is required.\"\n }\n ],\n settings: {\n fields: [\n {\n id: \"id\",\n type: \"text\",\n fieldId: \"id\",\n storageId: \"text@id\",\n label: \"ID\",\n validation: [\n {\n name: \"required\",\n message: \"ID is required.\"\n }\n ]\n },\n {\n id: \"displayName\",\n type: \"text\",\n fieldId: \"displayName\",\n storageId: \"text@displayName\",\n label: \"Display Name\",\n validation: [\n {\n name: \"required\",\n message: \"Display name is required.\"\n }\n ]\n },\n {\n id: \"type\",\n type: \"text\",\n fieldId: \"type\",\n storageId: \"text@type\",\n label: \"Type\",\n validation: [\n {\n name: \"required\",\n message: \"Type is required.\"\n }\n ]\n }\n ]\n }\n },\n {\n id: \"createdOn\",\n type: \"datetime\",\n fieldId: \"createdOn\",\n storageId: \"datetime@createdOn\",\n settings: {\n type: \"dateTimeWithoutTimezone\"\n },\n label: \"Created On\",\n validation: [\n {\n name: \"required\",\n message: \"Created on is required.\"\n }\n ]\n }\n ]\n }\n }\n ]\n })\n );\n};\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAEO,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,mBAAmB;AAEnD,MAAME,kBAAkB,GAAGA,CAAA,KAAM;EACpC,OAAO,IAAAC,8BAAc,EACjB,IAAAC,kCAAkB,EAAC;IACfC,OAAO,EAAEL,uBAAuB;IAChCM,IAAI,EAAE,sBAAsB;IAC5BC,MAAM,EAAE,CACJ;MACIC,EAAE,EAAE,UAAU;MACdC,IAAI,EAAE,MAAM;MACZC,OAAO,EAAE,UAAU;MACnBC,SAAS,EAAE,eAAe;MAC1BC,KAAK,EAAE,WAAW;MAClBC,UAAU,EAAE,CACR;QACIP,IAAI,EAAE,UAAU;QAChBQ,OAAO,EAAE;MACb,CAAC;IAET,CAAC;IACD;AAChB;AACA;AACA;AACA;AACA;IACgB;MACIN,EAAE,EAAE,MAAM;MACVC,IAAI,EAAE,MAAM;MACZC,OAAO,EAAE,MAAM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E,aAAa;cACtBC,SAAS,EAAE,kBAAkB;cAC7BC,KAAK,EAAE,cAAc;cACrBC,UAAU,EAAE,CACR;gBACIP,IAAI,EAAE,UAAU;gBAChBQ,OAAO,EAAE;cACb,CAAC;YAET,CAAC,EACD;cACIN,EAAE,EAAE,MAAM;cACVC,IAAI,EAAE,MAAM;cACZC,OAAO,EAAE,MAAM;cACfC,SAAS,EAAE,WAAW;cACtBC,KAAK,EAAE,MAAM;cACbC,UAAU,EAAE,CACR;gBACIP,IAAI,EAAE,UAAU;gBAChBQ,OAAO,EAAE;cACb,CAAC;YAET,CAAC;UAET;QACJ,CAAC,EACD;UACIN,EAAE,EAAE,WAAW;UACfC,IAAI,EAAE,UAAU;UAChBC,OAAO,EAAE,WAAW;UACpBC,SAAS,EAAE,oBAAoB;UAC/BK,QAAQ,EAAE;YACNP,IAAI,EAAE;UACV,CAAC;UACDG,KAAK,EAAE,YAAY;UACnBC,UAAU,EAAE,CACR;YACIP,IAAI,EAAE,UAAU;YAChBQ,OAAO,EAAE;UACb,CAAC;QAET,CAAC;MAET;IACJ,CAAC;EAET,CAAC,CACL,CAAC;AACL,CAAC;AAACb,OAAA,CAAAC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,16 +0,0 @@
1
- import type { IGetLockRecordUseCase, IGetLockRecordUseCaseExecuteParams } from "../../abstractions/IGetLockRecordUseCase";
2
- import type { IRecordLockingLockRecord, IRecordLockingModelManager } from "../../types";
3
- import type { ConvertEntryToLockRecordCb } from "../types";
4
- import type { Security } from "@webiny/api-security/types";
5
- export interface IGetLockRecordUseCaseParams {
6
- getManager(): Promise<IRecordLockingModelManager>;
7
- getSecurity(): Pick<Security, "withoutAuthorization">;
8
- convert: ConvertEntryToLockRecordCb;
9
- }
10
- export declare class GetLockRecordUseCase implements IGetLockRecordUseCase {
11
- private readonly getManager;
12
- private readonly getSecurity;
13
- private readonly convert;
14
- constructor(params: IGetLockRecordUseCaseParams);
15
- execute(input: IGetLockRecordUseCaseExecuteParams): Promise<IRecordLockingLockRecord | null>;
16
- }