@webiny/wcp 6.4.5 → 6.6.0-alpha.0
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/License.d.ts +2 -2
- package/package.json +3 -3
- package/types.d.ts +0 -3
- package/types.js.map +1 -1
package/License.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { NullLicense } from "./NullLicense.js";
|
|
|
3
3
|
import type { WCP_FEATURE_LABEL } from "./index.js";
|
|
4
4
|
export declare class License implements ILicense {
|
|
5
5
|
private readonly license;
|
|
6
|
-
static fromLicenseDto(license: DecryptedWcpProjectLicense | null):
|
|
7
|
-
static fromEnvironment(): Promise<
|
|
6
|
+
static fromLicenseDto(license: DecryptedWcpProjectLicense | null): License | NullLicense;
|
|
7
|
+
static fromEnvironment(): Promise<License | NullLicense>;
|
|
8
8
|
private constructor();
|
|
9
9
|
getRawLicense(): DecryptedWcpProjectLicense;
|
|
10
10
|
toDto(): DecryptedWcpProjectLicense;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/wcp",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.6.0-alpha.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"author": "Webiny Ltd.",
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@webiny/build-tools": "6.
|
|
18
|
+
"@webiny/build-tools": "6.6.0-alpha.0",
|
|
19
19
|
"rimraf": "6.1.3",
|
|
20
|
-
"typescript": "
|
|
20
|
+
"typescript": "7.0.2"
|
|
21
21
|
},
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public"
|
package/types.d.ts
CHANGED
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import type { WCP_FEATURE_LABEL } from \"./index.js\";\n\nexport interface WcpProject {\n orgId: string;\n projectId: string;\n package: {\n features: ProjectPackageFeatures;\n };\n}\n\nexport interface ILicense {\n // TODO: identify all places where raw license data is being used and refactor.\n getRawLicense: () => DecryptedWcpProjectLicense | null;\n getProject(): WcpProject | null;\n toDto(): DecryptedWcpProjectLicense | null;\n canUseFeature: (featureId: keyof typeof WCP_FEATURE_LABEL) => boolean;\n canUseAacl: () => boolean;\n canUseTeams: () => boolean;\n canUseAuditLogs: () => boolean;\n canUsePrivateFiles: () => boolean;\n canUseFileManagerThreatDetection: () => boolean;\n canUseFolderLevelPermissions: () => boolean;\n canUseRecordLocking: () => boolean;\n canUseWorkflows: () => boolean;\n canUseHcmsFieldPermissions: () => boolean;\n canUseAiImageEnrichment: () => boolean;\n canUseAiPageGeneration: () => boolean;\n canUseAiLexicalGeneration: () => boolean;\n}\n\nexport declare type WcpProjectEnvironment = {\n id: string;\n apiKey: string;\n org: {\n id: string;\n };\n project: {\n id: string;\n };\n};\n\nexport declare type EncryptedWcpProjectLicense = string;\n\nexport enum PROJECT_PACKAGE_FEATURE_NAME {\n SEATS = \"seats\",\n MT = \"multiTenancy\",\n APW = \"advancedPublishingWorkflow\",\n AACL = \"advancedAccessControlLayer\",\n /**\n * @deprecated Use `AUDIT_LOGS` instead.\n * TODO: remove oxlint disable when removing AL enum value.\n */\n // oxlint-disable-next-line typescript/no-duplicate-enum-values\n AL = \"auditLogs\",\n AUDIT_LOGS = \"auditLogs\",\n RECORD_LOCKING = \"recordLocking\",\n FILE_MANAGER = \"fileManager\",\n AI_POWERUPS = \"aiPowerups\"\n}\n\nexport enum MT_OPTIONS_MAX_COUNT_TYPE {\n SEAT_BASED = \"seatBased\",\n FIXED = \"fixed\"\n}\n\nexport interface ProjectPackageFeatures {\n [PROJECT_PACKAGE_FEATURE_NAME.SEATS]: {\n // This is always true because WCP projects immediately get access to seats (by default 1 seat).\n enabled: true;\n options: {\n maxCount: number;\n };\n };\n [PROJECT_PACKAGE_FEATURE_NAME.MT]: {\n // This is always true because WCP projects immediately get access to multi-tenancy.\n enabled: true;\n options: {\n maxCount: {\n type: MT_OPTIONS_MAX_COUNT_TYPE;\n count?: number;\n };\n };\n };\n [PROJECT_PACKAGE_FEATURE_NAME.APW]: {\n enabled: boolean;\n };\n [PROJECT_PACKAGE_FEATURE_NAME.AUDIT_LOGS]: {\n enabled: boolean;\n };\n [PROJECT_PACKAGE_FEATURE_NAME.RECORD_LOCKING]: {\n enabled: boolean;\n };\n [PROJECT_PACKAGE_FEATURE_NAME.AACL]: {\n enabled: boolean;\n options: {\n teams: boolean;\n privateFiles: boolean;\n folderLevelPermissions: boolean;\n hcmsFieldPermissions: boolean;\n };\n };\n [PROJECT_PACKAGE_FEATURE_NAME.
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import type { WCP_FEATURE_LABEL } from \"./index.js\";\n\nexport interface WcpProject {\n orgId: string;\n projectId: string;\n package: {\n features: ProjectPackageFeatures;\n };\n}\n\nexport interface ILicense {\n // TODO: identify all places where raw license data is being used and refactor.\n getRawLicense: () => DecryptedWcpProjectLicense | null;\n getProject(): WcpProject | null;\n toDto(): DecryptedWcpProjectLicense | null;\n canUseFeature: (featureId: keyof typeof WCP_FEATURE_LABEL) => boolean;\n canUseAacl: () => boolean;\n canUseTeams: () => boolean;\n canUseAuditLogs: () => boolean;\n canUsePrivateFiles: () => boolean;\n canUseFileManagerThreatDetection: () => boolean;\n canUseFolderLevelPermissions: () => boolean;\n canUseRecordLocking: () => boolean;\n canUseWorkflows: () => boolean;\n canUseHcmsFieldPermissions: () => boolean;\n canUseAiImageEnrichment: () => boolean;\n canUseAiPageGeneration: () => boolean;\n canUseAiLexicalGeneration: () => boolean;\n}\n\nexport declare type WcpProjectEnvironment = {\n id: string;\n apiKey: string;\n org: {\n id: string;\n };\n project: {\n id: string;\n };\n};\n\nexport declare type EncryptedWcpProjectLicense = string;\n\nexport enum PROJECT_PACKAGE_FEATURE_NAME {\n SEATS = \"seats\",\n MT = \"multiTenancy\",\n APW = \"advancedPublishingWorkflow\",\n AACL = \"advancedAccessControlLayer\",\n /**\n * @deprecated Use `AUDIT_LOGS` instead.\n * TODO: remove oxlint disable when removing AL enum value.\n */\n // oxlint-disable-next-line typescript/no-duplicate-enum-values\n AL = \"auditLogs\",\n AUDIT_LOGS = \"auditLogs\",\n RECORD_LOCKING = \"recordLocking\",\n FILE_MANAGER = \"fileManager\",\n AI_POWERUPS = \"aiPowerups\"\n}\n\nexport enum MT_OPTIONS_MAX_COUNT_TYPE {\n SEAT_BASED = \"seatBased\",\n FIXED = \"fixed\"\n}\n\nexport interface ProjectPackageFeatures {\n [PROJECT_PACKAGE_FEATURE_NAME.SEATS]: {\n // This is always true because WCP projects immediately get access to seats (by default 1 seat).\n enabled: true;\n options: {\n maxCount: number;\n };\n };\n [PROJECT_PACKAGE_FEATURE_NAME.MT]: {\n // This is always true because WCP projects immediately get access to multi-tenancy.\n enabled: true;\n options: {\n maxCount: {\n type: MT_OPTIONS_MAX_COUNT_TYPE;\n count?: number;\n };\n };\n };\n [PROJECT_PACKAGE_FEATURE_NAME.APW]: {\n enabled: boolean;\n };\n [PROJECT_PACKAGE_FEATURE_NAME.AUDIT_LOGS]: {\n enabled: boolean;\n };\n [PROJECT_PACKAGE_FEATURE_NAME.RECORD_LOCKING]: {\n enabled: boolean;\n };\n [PROJECT_PACKAGE_FEATURE_NAME.AACL]: {\n enabled: boolean;\n options: {\n teams: boolean;\n privateFiles: boolean;\n folderLevelPermissions: boolean;\n hcmsFieldPermissions: boolean;\n };\n };\n [PROJECT_PACKAGE_FEATURE_NAME.FILE_MANAGER]: {\n enabled: boolean;\n options: { threatDetection: boolean };\n };\n [PROJECT_PACKAGE_FEATURE_NAME.AI_POWERUPS]: {\n enabled: boolean;\n options: {\n websiteBuilder?: { pageGeneration?: boolean };\n fileManager?: { imageEnrichment?: boolean };\n lexicalGeneration?: boolean;\n };\n };\n}\n\nexport interface DecryptedWcpProjectLicense {\n orgId: string;\n projectId: string;\n package: {\n features: ProjectPackageFeatures;\n };\n}\n"],"names":["PROJECT_PACKAGE_FEATURE_NAME","MT_OPTIONS_MAX_COUNT_TYPE"],"mappings":"AA2CO,IAAKA,qCAA4BA,WAAAA,GAAAA,SAA5BA,4BAA4B;;;;;;;;;;WAA5BA;;AAiBL,IAAKC,kCAAyBA,WAAAA,GAAAA,SAAzBA,yBAAyB;;;WAAzBA"}
|