@webiny/api-record-locking 6.2.0 → 6.3.0-beta.1

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.
@@ -1 +1,4 @@
1
- export declare const GetLockRecordFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
1
+ export declare const GetLockRecordFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
@@ -1 +1,4 @@
1
- export declare const GetLockedEntryLockRecordFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
1
+ export declare const GetLockedEntryLockRecordFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
@@ -1 +1,4 @@
1
- export declare const IsEntryLockedFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
1
+ export declare const IsEntryLockedFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
@@ -1 +1,4 @@
1
- export declare const KickOutCurrentUserFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
1
+ export declare const KickOutCurrentUserFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
@@ -1 +1,4 @@
1
- export declare const ListAllLockRecordsFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
1
+ export declare const ListAllLockRecordsFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
@@ -1 +1 @@
1
- {"version":3,"names":["createAbstraction","ListLockRecordsUseCase","ListLockRecordsRepository"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction, Result } from \"@webiny/feature/api\";\nimport type { ILockRecord } from \"~/domain/LockRecord.js\";\nimport type { LockRecordPersistenceError } from \"~/domain/errors.js\";\nimport type { CmsEntryListParams, CmsEntryMeta } from \"@webiny/api-headless-cms/types\";\nimport type {\n DateStringInterfaceGenerator,\n IdentityInterfaceGenerator,\n IdInterfaceGenerator\n} from \"@webiny/api\";\n\n// Input/Output types\nexport interface IListLockRecordsWhere\n extends IdInterfaceGenerator<\"id\">,\n IdentityInterfaceGenerator<\"lockedBy\">,\n IdentityInterfaceGenerator<\"createdBy\">,\n DateStringInterfaceGenerator<\"lockedOn\">,\n DateStringInterfaceGenerator<\"updatedOn\">,\n DateStringInterfaceGenerator<\"savedOn\">,\n DateStringInterfaceGenerator<\"expiresOn\"> {}\n\nexport interface ListLockRecordsInput extends Pick<CmsEntryListParams, \"limit\" | \"sort\" | \"after\"> {\n where?: IListLockRecordsWhere;\n}\n\nexport interface ListLockRecordsOutput {\n items: ILockRecord[];\n meta: CmsEntryMeta;\n}\n\n/**\n * ListLockRecords Use Case - Lists active lock records (filters out expired, excludes current user)\n */\nexport interface IListLockRecordsUseCase {\n execute(input?: ListLockRecordsInput): Promise<Result<ListLockRecordsOutput, UseCaseError>>;\n}\n\nexport interface IListLockRecordsUseCaseErrors {\n persistence: LockRecordPersistenceError;\n}\n\ntype UseCaseError = IListLockRecordsUseCaseErrors[keyof IListLockRecordsUseCaseErrors];\n\nexport const ListLockRecordsUseCase =\n createAbstraction<IListLockRecordsUseCase>(\"ListLockRecordsUseCase\");\n\nexport namespace ListLockRecordsUseCase {\n export type Interface = IListLockRecordsUseCase;\n export type Error = UseCaseError;\n}\n\n/**\n * ListLockRecordsRepository - Fetches lock records from storage with filtering\n */\nexport interface IListLockRecordsRepository {\n execute(input?: ListLockRecordsInput): Promise<Result<ListLockRecordsOutput, RepositoryError>>;\n}\n\nexport interface IListLockRecordsRepositoryErrors {\n persistence: LockRecordPersistenceError;\n}\n\ntype RepositoryError = IListLockRecordsRepositoryErrors[keyof IListLockRecordsRepositoryErrors];\n\nexport const ListLockRecordsRepository = createAbstraction<IListLockRecordsRepository>(\n \"ListLockRecordsRepository\"\n);\n\nexport namespace ListLockRecordsRepository {\n export type Interface = IListLockRecordsRepository;\n export type Error = RepositoryError;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAgB,qBAAqB;;AAU/D;;AAmBA;AACA;AACA;;AAWA,OAAO,MAAMC,sBAAsB,GAC/BD,iBAAiB,CAA0B,wBAAwB,CAAC;;AAOxE;AACA;AACA;;AAWA,OAAO,MAAME,yBAAyB,GAAGF,iBAAiB,CACtD,2BACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createAbstraction","ListLockRecordsUseCase","ListLockRecordsRepository"],"sources":["abstractions.ts"],"sourcesContent":["import { createAbstraction, Result } from \"@webiny/feature/api\";\nimport type { ILockRecord } from \"~/domain/LockRecord.js\";\nimport type { LockRecordPersistenceError } from \"~/domain/errors.js\";\nimport type { CmsEntryListParams, CmsEntryMeta } from \"@webiny/api-headless-cms/types\";\nimport type {\n DateStringInterfaceGenerator,\n IdentityInterfaceGenerator,\n IdInterfaceGenerator\n} from \"@webiny/api\";\n\n// Input/Output types\nexport interface IListLockRecordsWhere\n extends\n IdInterfaceGenerator<\"id\">,\n IdentityInterfaceGenerator<\"lockedBy\">,\n IdentityInterfaceGenerator<\"createdBy\">,\n DateStringInterfaceGenerator<\"lockedOn\">,\n DateStringInterfaceGenerator<\"updatedOn\">,\n DateStringInterfaceGenerator<\"savedOn\">,\n DateStringInterfaceGenerator<\"expiresOn\"> {}\n\nexport interface ListLockRecordsInput extends Pick<CmsEntryListParams, \"limit\" | \"sort\" | \"after\"> {\n where?: IListLockRecordsWhere;\n}\n\nexport interface ListLockRecordsOutput {\n items: ILockRecord[];\n meta: CmsEntryMeta;\n}\n\n/**\n * ListLockRecords Use Case - Lists active lock records (filters out expired, excludes current user)\n */\nexport interface IListLockRecordsUseCase {\n execute(input?: ListLockRecordsInput): Promise<Result<ListLockRecordsOutput, UseCaseError>>;\n}\n\nexport interface IListLockRecordsUseCaseErrors {\n persistence: LockRecordPersistenceError;\n}\n\ntype UseCaseError = IListLockRecordsUseCaseErrors[keyof IListLockRecordsUseCaseErrors];\n\nexport const ListLockRecordsUseCase =\n createAbstraction<IListLockRecordsUseCase>(\"ListLockRecordsUseCase\");\n\nexport namespace ListLockRecordsUseCase {\n export type Interface = IListLockRecordsUseCase;\n export type Error = UseCaseError;\n}\n\n/**\n * ListLockRecordsRepository - Fetches lock records from storage with filtering\n */\nexport interface IListLockRecordsRepository {\n execute(input?: ListLockRecordsInput): Promise<Result<ListLockRecordsOutput, RepositoryError>>;\n}\n\nexport interface IListLockRecordsRepositoryErrors {\n persistence: LockRecordPersistenceError;\n}\n\ntype RepositoryError = IListLockRecordsRepositoryErrors[keyof IListLockRecordsRepositoryErrors];\n\nexport const ListLockRecordsRepository = createAbstraction<IListLockRecordsRepository>(\n \"ListLockRecordsRepository\"\n);\n\nexport namespace ListLockRecordsRepository {\n export type Interface = IListLockRecordsRepository;\n export type Error = RepositoryError;\n}\n"],"mappings":"AAAA,SAASA,iBAAiB,QAAgB,qBAAqB;;AAU/D;;AAoBA;AACA;AACA;;AAWA,OAAO,MAAMC,sBAAsB,GAC/BD,iBAAiB,CAA0B,wBAAwB,CAAC;;AAOxE;AACA;AACA;;AAWA,OAAO,MAAME,yBAAyB,GAAGF,iBAAiB,CACtD,2BACJ,CAAC","ignoreList":[]}
@@ -1 +1,4 @@
1
- export declare const ListLockRecordsFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
1
+ export declare const ListLockRecordsFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
@@ -1 +1,4 @@
1
- export declare const LockEntryFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
1
+ export declare const LockEntryFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
@@ -9,4 +9,7 @@ export interface RecordLockingParams {
9
9
  */
10
10
  model: CmsModel;
11
11
  }
12
- export declare const RecordLockingFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<RecordLockingParams>;
12
+ export declare const RecordLockingFeature: {
13
+ name: string;
14
+ register(container: import("@webiny/di").Container, context: RecordLockingParams): void;
15
+ };
@@ -1 +1 @@
1
- {"version":3,"names":["createFeature","RecordLockingConfig","RecordLockingModel","GetLockRecordFeature","GetLockedEntryLockRecordFeature","KickOutCurrentUserFeature","ListLockRecordsFeature","ListAllLockRecordsFeature","IsEntryLockedFeature","LockEntryFeature","UpdateEntryLockFeature","UnlockEntryFeature","UnlockEntryRequestFeature","RecordLockingFeature","name","register","container","params","registerInstance","timeout","model"],"sources":["RecordLockingFeature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types\";\nimport { RecordLockingConfig, RecordLockingModel } from \"~/domain/abstractions.js\";\nimport { GetLockRecordFeature } from \"./GetLockRecord/feature.js\";\nimport { GetLockedEntryLockRecordFeature } from \"./GetLockedEntryLockRecord/feature.js\";\nimport { KickOutCurrentUserFeature } from \"./KickOutCurrentUser/feature.js\";\nimport { ListLockRecordsFeature } from \"./ListLockRecords/feature.js\";\nimport { ListAllLockRecordsFeature } from \"./ListAllLockRecords/feature.js\";\nimport { IsEntryLockedFeature } from \"./IsEntryLocked/feature.js\";\nimport { LockEntryFeature } from \"./LockEntry/feature.js\";\nimport { UpdateEntryLockFeature } from \"./UpdateEntryLock/feature.js\";\nimport { UnlockEntryFeature } from \"./UnlockEntry/feature.js\";\nimport { UnlockEntryRequestFeature } from \"./UnlockEntryRequest/feature.js\";\n\nexport interface RecordLockingParams {\n /**\n * Timeout in milliseconds after which a lock expires\n */\n timeout: number;\n /**\n * The CMS model for storing lock records\n */\n model: CmsModel;\n}\n\nexport const RecordLockingFeature = createFeature({\n name: \"RecordLockingManagement\",\n register(container, params: RecordLockingParams) {\n // Register domain abstractions\n container.registerInstance(RecordLockingConfig, { timeout: params.timeout });\n container.registerInstance(RecordLockingModel, params.model);\n\n // Register all sub-features\n GetLockRecordFeature.register(container);\n GetLockedEntryLockRecordFeature.register(container);\n KickOutCurrentUserFeature.register(container);\n ListLockRecordsFeature.register(container);\n ListAllLockRecordsFeature.register(container);\n IsEntryLockedFeature.register(container);\n LockEntryFeature.register(container);\n UpdateEntryLockFeature.register(container);\n UnlockEntryFeature.register(container);\n UnlockEntryRequestFeature.register(container);\n }\n});\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,qBAAqB;AAEnD,SAASC,mBAAmB,EAAEC,kBAAkB;AAChD,SAASC,oBAAoB;AAC7B,SAASC,+BAA+B;AACxC,SAASC,yBAAyB;AAClC,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAClC,SAASC,oBAAoB;AAC7B,SAASC,gBAAgB;AACzB,SAASC,sBAAsB;AAC/B,SAASC,kBAAkB;AAC3B,SAASC,yBAAyB;AAalC,OAAO,MAAMC,oBAAoB,GAAGb,aAAa,CAAC;EAC9Cc,IAAI,EAAE,yBAAyB;EAC/BC,QAAQA,CAACC,SAAS,EAAEC,MAA2B,EAAE;IAC7C;IACAD,SAAS,CAACE,gBAAgB,CAACjB,mBAAmB,EAAE;MAAEkB,OAAO,EAAEF,MAAM,CAACE;IAAQ,CAAC,CAAC;IAC5EH,SAAS,CAACE,gBAAgB,CAAChB,kBAAkB,EAAEe,MAAM,CAACG,KAAK,CAAC;;IAE5D;IACAjB,oBAAoB,CAACY,QAAQ,CAACC,SAAS,CAAC;IACxCZ,+BAA+B,CAACW,QAAQ,CAACC,SAAS,CAAC;IACnDX,yBAAyB,CAACU,QAAQ,CAACC,SAAS,CAAC;IAC7CV,sBAAsB,CAACS,QAAQ,CAACC,SAAS,CAAC;IAC1CT,yBAAyB,CAACQ,QAAQ,CAACC,SAAS,CAAC;IAC7CR,oBAAoB,CAACO,QAAQ,CAACC,SAAS,CAAC;IACxCP,gBAAgB,CAACM,QAAQ,CAACC,SAAS,CAAC;IACpCN,sBAAsB,CAACK,QAAQ,CAACC,SAAS,CAAC;IAC1CL,kBAAkB,CAACI,QAAQ,CAACC,SAAS,CAAC;IACtCJ,yBAAyB,CAACG,QAAQ,CAACC,SAAS,CAAC;EACjD;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["createFeature","RecordLockingConfig","RecordLockingModel","GetLockRecordFeature","GetLockedEntryLockRecordFeature","KickOutCurrentUserFeature","ListLockRecordsFeature","ListAllLockRecordsFeature","IsEntryLockedFeature","LockEntryFeature","UpdateEntryLockFeature","UnlockEntryFeature","UnlockEntryRequestFeature","RecordLockingFeature","name","register","container","params","registerInstance","timeout","model"],"sources":["RecordLockingFeature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/api\";\nimport type { CmsModel } from \"@webiny/api-headless-cms/types\";\nimport { RecordLockingConfig, RecordLockingModel } from \"~/domain/abstractions.js\";\nimport { GetLockRecordFeature } from \"./GetLockRecord/feature.js\";\nimport { GetLockedEntryLockRecordFeature } from \"./GetLockedEntryLockRecord/feature.js\";\nimport { KickOutCurrentUserFeature } from \"./KickOutCurrentUser/feature.js\";\nimport { ListLockRecordsFeature } from \"./ListLockRecords/feature.js\";\nimport { ListAllLockRecordsFeature } from \"./ListAllLockRecords/feature.js\";\nimport { IsEntryLockedFeature } from \"./IsEntryLocked/feature.js\";\nimport { LockEntryFeature } from \"./LockEntry/feature.js\";\nimport { UpdateEntryLockFeature } from \"./UpdateEntryLock/feature.js\";\nimport { UnlockEntryFeature } from \"./UnlockEntry/feature.js\";\nimport { UnlockEntryRequestFeature } from \"./UnlockEntryRequest/feature.js\";\n\nexport interface RecordLockingParams {\n /**\n * Timeout in milliseconds after which a lock expires\n */\n timeout: number;\n /**\n * The CMS model for storing lock records\n */\n model: CmsModel;\n}\n\nexport const RecordLockingFeature = createFeature<RecordLockingParams>({\n name: \"RecordLockingManagement\",\n register(container, params) {\n // Register domain abstractions\n container.registerInstance(RecordLockingConfig, { timeout: params.timeout });\n container.registerInstance(RecordLockingModel, params.model);\n\n // Register all sub-features\n GetLockRecordFeature.register(container);\n GetLockedEntryLockRecordFeature.register(container);\n KickOutCurrentUserFeature.register(container);\n ListLockRecordsFeature.register(container);\n ListAllLockRecordsFeature.register(container);\n IsEntryLockedFeature.register(container);\n LockEntryFeature.register(container);\n UpdateEntryLockFeature.register(container);\n UnlockEntryFeature.register(container);\n UnlockEntryRequestFeature.register(container);\n }\n});\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,qBAAqB;AAEnD,SAASC,mBAAmB,EAAEC,kBAAkB;AAChD,SAASC,oBAAoB;AAC7B,SAASC,+BAA+B;AACxC,SAASC,yBAAyB;AAClC,SAASC,sBAAsB;AAC/B,SAASC,yBAAyB;AAClC,SAASC,oBAAoB;AAC7B,SAASC,gBAAgB;AACzB,SAASC,sBAAsB;AAC/B,SAASC,kBAAkB;AAC3B,SAASC,yBAAyB;AAalC,OAAO,MAAMC,oBAAoB,GAAGb,aAAa,CAAsB;EACnEc,IAAI,EAAE,yBAAyB;EAC/BC,QAAQA,CAACC,SAAS,EAAEC,MAAM,EAAE;IACxB;IACAD,SAAS,CAACE,gBAAgB,CAACjB,mBAAmB,EAAE;MAAEkB,OAAO,EAAEF,MAAM,CAACE;IAAQ,CAAC,CAAC;IAC5EH,SAAS,CAACE,gBAAgB,CAAChB,kBAAkB,EAAEe,MAAM,CAACG,KAAK,CAAC;;IAE5D;IACAjB,oBAAoB,CAACY,QAAQ,CAACC,SAAS,CAAC;IACxCZ,+BAA+B,CAACW,QAAQ,CAACC,SAAS,CAAC;IACnDX,yBAAyB,CAACU,QAAQ,CAACC,SAAS,CAAC;IAC7CV,sBAAsB,CAACS,QAAQ,CAACC,SAAS,CAAC;IAC1CT,yBAAyB,CAACQ,QAAQ,CAACC,SAAS,CAAC;IAC7CR,oBAAoB,CAACO,QAAQ,CAACC,SAAS,CAAC;IACxCP,gBAAgB,CAACM,QAAQ,CAACC,SAAS,CAAC;IACpCN,sBAAsB,CAACK,QAAQ,CAACC,SAAS,CAAC;IAC1CL,kBAAkB,CAACI,QAAQ,CAACC,SAAS,CAAC;IACtCJ,yBAAyB,CAACG,QAAQ,CAACC,SAAS,CAAC;EACjD;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -1 +1,4 @@
1
- export declare const UnlockEntryFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
1
+ export declare const UnlockEntryFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
@@ -1 +1,4 @@
1
- export declare const UnlockEntryRequestFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
1
+ export declare const UnlockEntryRequestFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
@@ -1 +1,4 @@
1
- export declare const UpdateEntryLockFeature: import("@webiny/feature/api/createFeature.js").FeatureDefinition<unknown>;
1
+ export declare const UpdateEntryLockFeature: {
2
+ name: string;
3
+ register(container: import("@webiny/di").Container): void;
4
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-record-locking",
3
- "version": "6.2.0",
3
+ "version": "6.3.0-beta.1",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -13,30 +13,30 @@
13
13
  ],
14
14
  "license": "MIT",
15
15
  "dependencies": {
16
- "@webiny/api": "6.2.0",
17
- "@webiny/api-headless-cms": "6.2.0",
18
- "@webiny/api-websockets": "6.2.0",
19
- "@webiny/feature": "6.2.0",
20
- "@webiny/handler": "6.2.0",
21
- "@webiny/handler-aws": "6.2.0",
22
- "@webiny/handler-graphql": "6.2.0",
23
- "@webiny/plugins": "6.2.0",
24
- "@webiny/utils": "6.2.0"
16
+ "@webiny/api": "6.3.0-beta.1",
17
+ "@webiny/api-headless-cms": "6.3.0-beta.1",
18
+ "@webiny/api-websockets": "6.3.0-beta.1",
19
+ "@webiny/feature": "6.3.0-beta.1",
20
+ "@webiny/handler": "6.3.0-beta.1",
21
+ "@webiny/handler-aws": "6.3.0-beta.1",
22
+ "@webiny/handler-graphql": "6.3.0-beta.1",
23
+ "@webiny/plugins": "6.3.0-beta.1",
24
+ "@webiny/utils": "6.3.0-beta.1"
25
25
  },
26
26
  "devDependencies": {
27
- "@webiny/api-core": "6.2.0",
28
- "@webiny/build-tools": "6.2.0",
29
- "@webiny/project-utils": "6.2.0",
30
- "@webiny/wcp": "6.2.0",
27
+ "@webiny/api-core": "6.3.0-beta.1",
28
+ "@webiny/build-tools": "6.3.0-beta.1",
29
+ "@webiny/project-utils": "6.3.0-beta.1",
30
+ "@webiny/wcp": "6.3.0-beta.1",
31
31
  "graphql": "16.13.2",
32
32
  "rimraf": "6.1.3",
33
- "type-fest": "5.5.0",
34
- "typescript": "5.9.3",
33
+ "type-fest": "5.6.0",
34
+ "typescript": "6.0.3",
35
35
  "vitest": "4.1.4"
36
36
  },
37
37
  "publishConfig": {
38
38
  "access": "public",
39
39
  "directory": "dist"
40
40
  },
41
- "gitHead": "3d3148358b6febbc857371930871743bec3b3939"
41
+ "gitHead": "664b273a9f0a971f9ca7e6ffe920db77fefdced1"
42
42
  }