@umbraco/playwright-testhelpers 17.0.0-beta.1 → 17.0.0-beta.11
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/dist/lib/helpers/ApiHelpers.d.ts +23 -13
- package/dist/lib/helpers/ApiHelpers.js +107 -49
- package/dist/lib/helpers/ApiHelpers.js.map +1 -1
- package/dist/lib/helpers/ConstantHelper.d.ts +8 -3
- package/dist/lib/helpers/ConstantHelper.js +20 -15
- package/dist/lib/helpers/ConstantHelper.js.map +1 -1
- package/dist/lib/helpers/ContentUiHelper.d.ts +4 -3
- package/dist/lib/helpers/ContentUiHelper.js +16 -12
- package/dist/lib/helpers/ContentUiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeApiHelper.d.ts +3 -0
- package/dist/lib/helpers/DataTypeApiHelper.js +21 -0
- package/dist/lib/helpers/DataTypeApiHelper.js.map +1 -1
- package/dist/lib/helpers/DataTypeUiHelper.d.ts +3 -0
- package/dist/lib/helpers/DataTypeUiHelper.js +15 -2
- package/dist/lib/helpers/DataTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentBlueprintUiHelper.d.ts +1 -0
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js +3 -0
- package/dist/lib/helpers/DocumentBlueprintUiHelper.js.map +1 -1
- package/dist/lib/helpers/DocumentTypeUiHelper.d.ts +1 -0
- package/dist/lib/helpers/DocumentTypeUiHelper.js +6 -4
- package/dist/lib/helpers/DocumentTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/LanguageUiHelper.d.ts +1 -0
- package/dist/lib/helpers/LanguageUiHelper.js +3 -1
- package/dist/lib/helpers/LanguageUiHelper.js.map +1 -1
- package/dist/lib/helpers/LoginApiHelper.d.ts +7 -3
- package/dist/lib/helpers/LoginApiHelper.js +7 -5
- package/dist/lib/helpers/LoginApiHelper.js.map +1 -1
- package/dist/lib/helpers/PartialViewUiHelper.d.ts +1 -0
- package/dist/lib/helpers/PartialViewUiHelper.js +5 -3
- package/dist/lib/helpers/PartialViewUiHelper.js.map +1 -1
- package/dist/lib/helpers/RelationTypeUiHelper.js +1 -0
- package/dist/lib/helpers/RelationTypeUiHelper.js.map +1 -1
- package/dist/lib/helpers/ScriptUiHelper.d.ts +1 -0
- package/dist/lib/helpers/ScriptUiHelper.js +6 -2
- package/dist/lib/helpers/ScriptUiHelper.js.map +1 -1
- package/dist/lib/helpers/StylesheetUiHelper.d.ts +3 -0
- package/dist/lib/helpers/StylesheetUiHelper.js +11 -2
- package/dist/lib/helpers/StylesheetUiHelper.js.map +1 -1
- package/dist/lib/helpers/UiBaseLocators.d.ts +10 -1
- package/dist/lib/helpers/UiBaseLocators.js +42 -12
- package/dist/lib/helpers/UiBaseLocators.js.map +1 -1
- package/dist/lib/helpers/UserApiHelper.d.ts +6 -2
- package/dist/lib/helpers/UserApiHelper.js +1 -1
- package/dist/lib/helpers/UserApiHelper.js.map +1 -1
- package/dist/lib/helpers/UserGroupUiHelper.js +1 -1
- package/dist/lib/helpers/UserGroupUiHelper.js.map +1 -1
- package/dist/lib/helpers/UserUiHelper.d.ts +0 -1
- package/dist/lib/helpers/UserUiHelper.js +0 -2
- package/dist/lib/helpers/UserUiHelper.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
|
@@ -88,30 +88,40 @@ export declare class ApiHelpers {
|
|
|
88
88
|
delete(url: string, data?: object): Promise<import("playwright-core").APIResponse>;
|
|
89
89
|
put(url: string, data?: object): Promise<import("playwright-core").APIResponse>;
|
|
90
90
|
postMultiPartForm(url: string, id: any, name: string, mimeType: string, filePath: any): Promise<import("playwright-core").APIResponse>;
|
|
91
|
-
private getTokenIssuedTime;
|
|
92
|
-
private getTokenExpireTime;
|
|
93
91
|
getRefreshToken(): Promise<any>;
|
|
94
|
-
isAccessTokenValid(): Promise<void | {
|
|
95
|
-
cookie: string;
|
|
96
|
-
accessToken: any;
|
|
97
|
-
refreshToken: any;
|
|
98
|
-
}>;
|
|
99
92
|
private currentDateToEpoch;
|
|
100
93
|
private dateToEpoch;
|
|
101
|
-
refreshAccessToken(userEmail: string, userPassword: string): Promise<
|
|
94
|
+
refreshAccessToken(userEmail: string, userPassword: string): Promise<{
|
|
102
95
|
cookie: string;
|
|
103
|
-
accessToken:
|
|
104
|
-
|
|
105
|
-
|
|
96
|
+
accessToken: "" | {
|
|
97
|
+
value: string;
|
|
98
|
+
} | undefined;
|
|
99
|
+
refreshToken: "" | {
|
|
100
|
+
value: string;
|
|
101
|
+
} | undefined;
|
|
102
|
+
} | undefined>;
|
|
103
|
+
private splitCookies;
|
|
106
104
|
updateTokenAndCookie(userEmail: string, userPassword: string): Promise<{
|
|
107
105
|
cookie: string;
|
|
108
|
-
accessToken:
|
|
109
|
-
|
|
106
|
+
accessToken: "" | {
|
|
107
|
+
value: string;
|
|
108
|
+
} | undefined;
|
|
109
|
+
refreshToken: "" | {
|
|
110
|
+
value: string;
|
|
111
|
+
} | undefined;
|
|
110
112
|
}>;
|
|
111
113
|
readFileContent(filePath: any): Promise<any>;
|
|
112
114
|
readLocalBearerToken(): Promise<string>;
|
|
113
115
|
readLocalCookie(): Promise<string>;
|
|
114
116
|
private getLocalStorageToken;
|
|
117
|
+
updateLocalStorageTokens(setCookies: string): Promise<{
|
|
118
|
+
accessToken: "" | {
|
|
119
|
+
value: string;
|
|
120
|
+
} | undefined;
|
|
121
|
+
refreshToken: "" | {
|
|
122
|
+
value: string;
|
|
123
|
+
} | undefined;
|
|
124
|
+
}>;
|
|
115
125
|
private getLocalStorageAuthToken;
|
|
116
126
|
private updateLocalStorage;
|
|
117
127
|
private updateCookie;
|
|
@@ -187,32 +187,35 @@ class ApiHelpers {
|
|
|
187
187
|
};
|
|
188
188
|
return await this.page.request.post(url, options);
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
190
|
+
// Currently not used
|
|
191
|
+
// private async getTokenIssuedTime() {
|
|
192
|
+
// const authToken = await this.getLocalStorageAuthToken();
|
|
193
|
+
// return Number(authToken.issued_at);
|
|
194
|
+
// }
|
|
195
|
+
// private async getTokenExpireTime() {
|
|
196
|
+
// const authToken = await this.getLocalStorageAuthToken();
|
|
197
|
+
// return Number(authToken.expires_in);
|
|
198
|
+
// }
|
|
199
|
+
//
|
|
200
|
+
// async isAccessTokenValid() {
|
|
201
|
+
// const tokenTimeIssued = await this.getTokenIssuedTime();
|
|
202
|
+
// const tokenExpireTime = await this.getTokenExpireTime();
|
|
203
|
+
// // Should use a global value
|
|
204
|
+
// const globalTestTimeout: number = 45;
|
|
205
|
+
// // We want to have the date minus the globalTimeout, the reason for this is that while a test is running, the token could expire.
|
|
206
|
+
// // The refresh token lasts for 300 seconds, while the access token lasts for 60 seconds (NOT TOTALLY SURE) this is why we add 240 seconds
|
|
207
|
+
// const tokenRefreshTime = tokenTimeIssued + tokenExpireTime - (globalTestTimeout);
|
|
208
|
+
// // We need the currentTimeInEpoch so we can check if the tokenRefreshTime is close to expiring.
|
|
209
|
+
// const currentTimeInEpoch = await this.currentDateToEpoch();
|
|
210
|
+
//
|
|
211
|
+
// if (tokenRefreshTime <= currentTimeInEpoch) {
|
|
212
|
+
// return await this.refreshAccessToken(umbracoConfig.user.login, umbracoConfig.user.password);
|
|
213
|
+
// }
|
|
214
|
+
// }
|
|
198
215
|
async getRefreshToken() {
|
|
199
216
|
const authToken = await this.getLocalStorageAuthToken();
|
|
200
217
|
return authToken.refresh_token;
|
|
201
218
|
}
|
|
202
|
-
async isAccessTokenValid() {
|
|
203
|
-
const tokenTimeIssued = await this.getTokenIssuedTime();
|
|
204
|
-
const tokenExpireTime = await this.getTokenExpireTime();
|
|
205
|
-
// Should use a global value
|
|
206
|
-
const globalTestTimeout = 45;
|
|
207
|
-
// We want to have the date minus the globalTimeout, the reason for this is that while a test is running, the token could expire.
|
|
208
|
-
// The refresh token lasts for 300 seconds, while the access token lasts for 60 seconds (NOT TOTALLY SURE) this is why we add 240 seconds
|
|
209
|
-
const tokenRefreshTime = tokenTimeIssued + tokenExpireTime - (globalTestTimeout);
|
|
210
|
-
// We need the currentTimeInEpoch so we can check if the tokenRefreshTime is close to expiring.
|
|
211
|
-
const currentTimeInEpoch = await this.currentDateToEpoch();
|
|
212
|
-
if (tokenRefreshTime <= currentTimeInEpoch) {
|
|
213
|
-
return await this.refreshAccessToken(umbraco_config_1.umbracoConfig.user.login, umbraco_config_1.umbracoConfig.user.password);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
219
|
async currentDateToEpoch() {
|
|
217
220
|
const currentTime = new Date(Date.now());
|
|
218
221
|
return await this.dateToEpoch(currentTime);
|
|
@@ -241,19 +244,33 @@ class ApiHelpers {
|
|
|
241
244
|
});
|
|
242
245
|
if (response.status() === 200) {
|
|
243
246
|
const jsonStorageValue = await response.json();
|
|
244
|
-
|
|
247
|
+
const jsonStorageCookie = response.headers()['set-cookie'];
|
|
248
|
+
await this.updateLocalStorage(jsonStorageValue);
|
|
249
|
+
// We get multiple cookies, so we have to split them and then update each of the cookies in our localestorage
|
|
250
|
+
let cookies = this.splitCookies(jsonStorageCookie);
|
|
251
|
+
for (const cookie of cookies) {
|
|
252
|
+
await this.updateCookie(cookie);
|
|
253
|
+
}
|
|
254
|
+
return;
|
|
245
255
|
}
|
|
246
256
|
console.log('Error refreshing access token.');
|
|
247
257
|
return await this.updateTokenAndCookie(userEmail, userPassword);
|
|
248
258
|
}
|
|
259
|
+
splitCookies(cookieString) {
|
|
260
|
+
return cookieString
|
|
261
|
+
.trim()
|
|
262
|
+
.split('\n')
|
|
263
|
+
.filter(line => line.trim())
|
|
264
|
+
.filter(line => !line.includes('expires=Thu, 01 Jan 1970'));
|
|
265
|
+
}
|
|
249
266
|
async updateTokenAndCookie(userEmail, userPassword) {
|
|
250
267
|
const storageStateValues = await this.login.login(userEmail, userPassword);
|
|
251
268
|
await this.updateCookie(storageStateValues.cookie);
|
|
252
269
|
await this.updateLocalStorage(storageStateValues.accessToken);
|
|
253
270
|
return {
|
|
254
271
|
cookie: storageStateValues.cookie,
|
|
255
|
-
accessToken: storageStateValues.accessToken
|
|
256
|
-
refreshToken: storageStateValues.refreshToken
|
|
272
|
+
accessToken: storageStateValues.accessToken,
|
|
273
|
+
refreshToken: storageStateValues.refreshToken,
|
|
257
274
|
};
|
|
258
275
|
}
|
|
259
276
|
async readFileContent(filePath) {
|
|
@@ -299,6 +316,35 @@ class ApiHelpers {
|
|
|
299
316
|
async getLocalStorageToken(localStorage, tokenName) {
|
|
300
317
|
return await localStorage.origins?.[0]?.localStorage?.find(item => item.name === tokenName);
|
|
301
318
|
}
|
|
319
|
+
async updateLocalStorageTokens(setCookies) {
|
|
320
|
+
// Find AccessToken and RefreshToken in CookiesString
|
|
321
|
+
const accessValue = setCookies.match(/__Host-umbAccessToken=([^;]+)/)?.[1];
|
|
322
|
+
const refreshValue = setCookies.match(/__Host-umbRefreshToken=([^;]+)/)?.[1];
|
|
323
|
+
const accessToken = accessValue && { value: accessValue };
|
|
324
|
+
const refreshToken = refreshValue && { value: refreshValue };
|
|
325
|
+
let currentLocalStorageValue = await this.getLocalStorageAuthToken();
|
|
326
|
+
const newIssuedTime = await this.currentDateToEpoch();
|
|
327
|
+
currentLocalStorageValue.access_token = accessToken;
|
|
328
|
+
currentLocalStorageValue.refresh_token = refreshToken;
|
|
329
|
+
currentLocalStorageValue.issued_at = newIssuedTime;
|
|
330
|
+
const filePath = process.env.STORAGE_STAGE_PATH;
|
|
331
|
+
// Updates the user.json file in our CMS project
|
|
332
|
+
if (filePath) {
|
|
333
|
+
try {
|
|
334
|
+
const data = await this.readFileContent(filePath);
|
|
335
|
+
const fileLocalStorageToken = await this.getLocalStorageToken(data, 'umb:userAuthTokenResponse');
|
|
336
|
+
fileLocalStorageToken.value = JSON.stringify(currentLocalStorageValue);
|
|
337
|
+
// Converts the object to JSON string
|
|
338
|
+
const updatedJsonString = JSON.stringify(data, null, 2);
|
|
339
|
+
// Writes the updated JSON content to the file
|
|
340
|
+
fs.writeFileSync(filePath, updatedJsonString, 'utf-8');
|
|
341
|
+
}
|
|
342
|
+
catch (error) {
|
|
343
|
+
console.error('Error updating token:', error);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
return { accessToken: accessToken, refreshToken: refreshToken };
|
|
347
|
+
}
|
|
302
348
|
async getLocalStorageAuthToken() {
|
|
303
349
|
const currentStorageState = await this.page.context().storageState();
|
|
304
350
|
const currentStorageToken = await this.getLocalStorageToken(currentStorageState, 'umb:userAuthTokenResponse');
|
|
@@ -332,34 +378,46 @@ class ApiHelpers {
|
|
|
332
378
|
}
|
|
333
379
|
}
|
|
334
380
|
async updateCookie(cookieString) {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
// Updates the expires value and converts it to Epoch
|
|
348
|
-
currentCookie.expires = await this.dateToEpoch(new Date(val));
|
|
381
|
+
try {
|
|
382
|
+
// Parse cookie string
|
|
383
|
+
const parts = cookieString.split(';').map(p => p.trim());
|
|
384
|
+
const [nameValue, ...attributes] = parts;
|
|
385
|
+
const [name, value] = nameValue.split('=');
|
|
386
|
+
const cookieName = name.trim();
|
|
387
|
+
// Get current state
|
|
388
|
+
const storageState = await this.page.context().storageState();
|
|
389
|
+
const cookieIndex = storageState.cookies.findIndex(c => c.name === cookieName);
|
|
390
|
+
if (cookieIndex === -1) {
|
|
391
|
+
console.log(`Cookie "${cookieName}" not found`);
|
|
392
|
+
return;
|
|
349
393
|
}
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
394
|
+
// Update cookie value
|
|
395
|
+
storageState.cookies[cookieIndex].value = value;
|
|
396
|
+
// Update expires if present
|
|
397
|
+
for (const attr of attributes) {
|
|
398
|
+
if (attr.toLowerCase().startsWith('expires=')) {
|
|
399
|
+
const expiresDate = attr.split('=')[1];
|
|
400
|
+
storageState.cookies[cookieIndex].expires = Date.parse(expiresDate) / 1000;
|
|
401
|
+
}
|
|
358
402
|
}
|
|
359
|
-
|
|
360
|
-
|
|
403
|
+
// Write to file if path exists
|
|
404
|
+
const filePath = process.env.STORAGE_STAGE_PATH;
|
|
405
|
+
if (filePath) {
|
|
406
|
+
const fs = require('fs');
|
|
407
|
+
const fileData = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
408
|
+
const fileCookieIndex = fileData.cookies.findIndex(c => c.name === cookieName);
|
|
409
|
+
if (fileCookieIndex !== -1) {
|
|
410
|
+
fileData.cookies[fileCookieIndex] = storageState.cookies[cookieIndex];
|
|
411
|
+
fs.writeFileSync(filePath, JSON.stringify(fileData, null, 2));
|
|
412
|
+
}
|
|
413
|
+
else {
|
|
414
|
+
console.log(`Cookie "${cookieName}" not found in file`);
|
|
415
|
+
}
|
|
361
416
|
}
|
|
362
417
|
}
|
|
418
|
+
catch (error) {
|
|
419
|
+
console.error('Error updating cookie:', error);
|
|
420
|
+
}
|
|
363
421
|
}
|
|
364
422
|
async revokeAccessToken(cookie, accessToken) {
|
|
365
423
|
return await this.page.request.post(this.baseUrl + '/umbraco/management/api/v1/security/back-office/revoke', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiHelpers.js","sourceRoot":"","sources":["../../../lib/helpers/ApiHelpers.ts"],"names":[],"mappings":";;;AACA,yDAAmD;AACnD,iDAA4C;AAC5C,qEAAgE;AAChE,2DAAsD;AACtD,+DAA0D;AAC1D,mEAA8D;AAC9D,6DAAwD;AACxD,2DAAsD;AACtD,+CAA0C;AAC1C,2DAAsD;AACtD,mDAA8C;AAC9C,qEAAgE;AAChE,yDAAoD;AACpD,uDAAkD;AAClD,iEAA4D;AAC5D,+DAA0D;AAC1D,yBAAyB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,IAAI;SACb,CAAC,CAAC;IACL,CAAC;CACF;AApaD,gCAoaC","sourcesContent":["import {Page} from \"@playwright/test\"\nimport {umbracoConfig} from \"../../umbraco.config\";\nimport {ReportHelper} from \"./ReportHelper\";\nimport {TelemetryDataApiHelper} from \"./TelemetryDataApiHelper\";\nimport {LanguageApiHelper} from \"./LanguageApiHelper\";\nimport {DictionaryApiHelper} from \"./DictionaryApiHelper\";\nimport {RelationTypeApiHelper} from \"./RelationTypeApiHelper\";\nimport {UserGroupApiHelper} from \"./UserGroupApiHelper\";\nimport {TemplateApiHelper} from \"./TemplateApiHelper\";\nimport {AliasHelper} from \"./AliasHelper\";\nimport {DataTypeApiHelper} from \"./DataTypeApiHelper\";\nimport {UserApiHelper} from \"./UserApiHelper\";\nimport {TemporaryFileApiHelper} from \"./TemporaryFileApiHelper\";\nimport {PackageApiHelper} from \"./PackageApiHelper\";\nimport {ScriptApiHelper} from \"./ScriptApiHelper\";\nimport {PartialViewApiHelper} from \"./PartialViewApiHelper\";\nimport {StylesheetApiHelper} from \"./StylesheetApiHelper\";\nimport * as fs from \"fs\";\nimport {LogViewerApiHelper} from \"./LogViewerApiHelper\";\nimport {DocumentTypeApiHelper} from \"./DocumentTypeApiHelper\";\nimport {DocumentApiHelper} from \"./DocumentApiHelper\";\nimport {MediaTypeApiHelper} from \"./MediaTypeApiHelper\";\nimport {MediaApiHelper} from \"./MediaApiHelper\";\nimport {ObjectTypesApiHelper} from \"./ObjectTypesApiHelper\";\nimport {ModelsBuilderApiHelper} from \"./ModelsBuilderApiHelper\";\nimport {HealthCheckApiHelper} from \"./HealthCheckApiHelper\";\nimport {IndexerApiHelper} from \"./IndexerApiHelper\";\nimport {PublishedCacheApiHelper} from \"./PublishedCacheApiHelper\";\nimport {RedirectManagementApiHelper} from './RedirectManagementApiHelper';\nimport {MemberGroupApiHelper} from './MemberGroupApiHelper';\nimport {MemberApiHelper} from './MemberApiHelper';\nimport {MemberTypeApiHelper} from \"./MemberTypeApiHelper\";\nimport {DocumentBlueprintApiHelper} from \"./DocumentBlueprintApiHelper\";\nimport {LoginApiHelper} from \"./LoginApiHelper\";\nimport {WebhookApiHelper} from \"./WebhookApiHelper\";\nimport {MediaDeliveryApiHelper} from './differentAppSettingsHelpers/MediaDeliveryApiHelper';\nimport {ContentDeliveryApiHelper} from \"./differentAppSettingsHelpers/ContentDeliveryApiHelper\";\n\nexport class ApiHelpers {\n baseUrl: string = umbracoConfig.environment.baseUrl;\n page: Page;\n alias: AliasHelper;\n report: ReportHelper;\n telemetry: TelemetryDataApiHelper;\n language: LanguageApiHelper;\n dictionary: DictionaryApiHelper;\n relationType: RelationTypeApiHelper;\n userGroup: UserGroupApiHelper;\n template: TemplateApiHelper;\n dataType: DataTypeApiHelper;\n user: UserApiHelper;\n temporaryFile: TemporaryFileApiHelper;\n documentType: DocumentTypeApiHelper;\n document: DocumentApiHelper;\n package: PackageApiHelper;\n script: ScriptApiHelper;\n partialView: PartialViewApiHelper;\n stylesheet: StylesheetApiHelper;\n logViewer: LogViewerApiHelper;\n mediaType: MediaTypeApiHelper;\n media: MediaApiHelper;\n objectTypes: ObjectTypesApiHelper;\n modelsBuilder: ModelsBuilderApiHelper;\n healthCheck: HealthCheckApiHelper;\n indexer: IndexerApiHelper;\n publishedCache: PublishedCacheApiHelper;\n redirectManagement: RedirectManagementApiHelper;\n memberGroup: MemberGroupApiHelper;\n member: MemberApiHelper;\n memberType: MemberTypeApiHelper;\n documentBlueprint: DocumentBlueprintApiHelper;\n login: LoginApiHelper;\n webhook: WebhookApiHelper;\n mediaDeliveryApi: MediaDeliveryApiHelper;\n contentDeliveryApi: ContentDeliveryApiHelper;\n\n constructor(page: Page) {\n this.page = page;\n this.alias = new AliasHelper();\n this.report = new ReportHelper(this);\n this.telemetry = new TelemetryDataApiHelper(this);\n this.language = new LanguageApiHelper(this);\n this.dictionary = new DictionaryApiHelper(this);\n this.relationType = new RelationTypeApiHelper(this);\n this.userGroup = new UserGroupApiHelper(this);\n this.template = new TemplateApiHelper(this);\n this.dataType = new DataTypeApiHelper(this);\n this.user = new UserApiHelper(this, page);\n this.temporaryFile = new TemporaryFileApiHelper(this);\n this.documentType = new DocumentTypeApiHelper(this);\n this.document = new DocumentApiHelper(this);\n this.package = new PackageApiHelper(this);\n this.script = new ScriptApiHelper(this);\n this.partialView = new PartialViewApiHelper(this);\n this.stylesheet = new StylesheetApiHelper(this);\n this.logViewer = new LogViewerApiHelper(this);\n this.mediaType = new MediaTypeApiHelper(this);\n this.media = new MediaApiHelper(this);\n this.objectTypes = new ObjectTypesApiHelper(this);\n this.modelsBuilder = new ModelsBuilderApiHelper(this);\n this.healthCheck = new HealthCheckApiHelper(this);\n this.indexer = new IndexerApiHelper(this);\n this.publishedCache = new PublishedCacheApiHelper(this);\n this.redirectManagement = new RedirectManagementApiHelper(this);\n this.memberGroup = new MemberGroupApiHelper(this);\n this.member = new MemberApiHelper(this);\n this.memberType = new MemberTypeApiHelper(this);\n this.documentBlueprint = new DocumentBlueprintApiHelper(this);\n this.login = new LoginApiHelper(this, this.page);\n this.webhook = new WebhookApiHelper(this, this.page);\n this.mediaDeliveryApi = new MediaDeliveryApiHelper(this);\n this.contentDeliveryApi = new ContentDeliveryApiHelper(this);\n }\n\n async getAccessToken() {\n const authToken = await this.getLocalStorageAuthToken();\n return authToken.access_token;\n }\n\n async getBearerToken() {\n return 'Bearer ' + await this.getAccessToken();\n }\n\n async getCookie() {\n let someStorage = await this.page.context().storageState();\n let cookieString = \"\";\n for (let cookie of someStorage.cookies) {\n cookieString += cookie.name + '=' + cookie.value + ';';\n }\n return cookieString;\n }\n\n async getHeaders() {\n return {\n 'Authorization': await this.readLocalBearerToken(),\n 'Cookie': await this.readLocalCookie(),\n }\n }\n\n async get(url: string, params?: { [key: string]: string | number | boolean; }, extraHeaders?: { [key: string]: string; }) {\n const headers = await this.getHeaders();\n const allHeaders = { ...headers, ...extraHeaders };\n const options = {\n headers: allHeaders,\n params: params,\n ignoreHTTPSErrors: true\n }\n return await this.page.request.get(url, options);\n }\n\n async saveCodeFile(codeFile) {\n if (codeFile == null) {\n return;\n }\n return await this.post(umbracoConfig.environment.baseUrl + '/umbraco/backoffice/UmbracoApi/CodeFile/PostSave', codeFile);\n }\n\n async post(url: string, data?: object) {\n const options = {\n headers: await this.getHeaders(),\n data: data,\n ignoreHTTPSErrors: true\n }\n return await this.page.request.post(url, options);\n }\n\n async delete(url: string, data?: object) {\n const options = {\n headers: await this.getHeaders(),\n data: data,\n ignoreHTTPSErrors: true\n }\n return await this.page.request.delete(url, options);\n }\n\n async put(url: string, data?: object) {\n const options = {\n headers: await this.getHeaders(),\n data: data,\n ignoreHTTPSErrors: true\n }\n return await this.page.request.put(url, options);\n }\n\n async postMultiPartForm(url: string, id, name: string, mimeType: string, filePath) {\n const options = {\n headers: await this.getHeaders(),\n multipart: {\n Id: id,\n File: {\n name: name,\n mimeType: mimeType,\n buffer: fs.readFileSync(filePath)\n }\n },\n ignoreHTTPSErrors: true\n }\n return await this.page.request.post(url, options);\n }\n\n private async getTokenIssuedTime() {\n const authToken = await this.getLocalStorageAuthToken();\n return Number(authToken.issued_at);\n }\n\n private async getTokenExpireTime() {\n const authToken = await this.getLocalStorageAuthToken();\n return Number(authToken.expires_in);\n }\n\n async getRefreshToken() {\n const authToken = await this.getLocalStorageAuthToken();\n return authToken.refresh_token;\n }\n\n async isAccessTokenValid() {\n const tokenTimeIssued = await this.getTokenIssuedTime();\n const tokenExpireTime = await this.getTokenExpireTime();\n // Should use a global value\n const globalTestTimeout: number = 45;\n // We want to have the date minus the globalTimeout, the reason for this is that while a test is running, the token could expire.\n // The refresh token lasts for 300 seconds, while the access token lasts for 60 seconds (NOT TOTALLY SURE) this is why we add 240 seconds\n const tokenRefreshTime = tokenTimeIssued + tokenExpireTime - (globalTestTimeout);\n // We need the currentTimeInEpoch so we can check if the tokenRefreshTime is close to expiring.\n const currentTimeInEpoch = await this.currentDateToEpoch();\n\n if (tokenRefreshTime <= currentTimeInEpoch) {\n return await this.refreshAccessToken(umbracoConfig.user.login, umbracoConfig.user.password);\n }\n }\n\n private async currentDateToEpoch() {\n const currentTime = new Date(Date.now());\n return await this.dateToEpoch(currentTime);\n }\n\n private async dateToEpoch(date: Date) {\n const dateToEpoch = date.getTime();\n // The epoch is in milliseconds, but we want it to be in seconds(Like it is in the token).\n const millisecondsToSeconds = dateToEpoch / 1000;\n // There is no need to have anything after .\n return Number(millisecondsToSeconds.toString().split('.')[0]);\n }\n\n async refreshAccessToken(userEmail: string, userPassword: string) {\n const response = await this.page.request.post(this.baseUrl + '/umbraco/management/api/v1/security/back-office/token', {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Cookie: await this.readLocalCookie(),\n Origin: this.baseUrl\n },\n form:\n {\n grant_type: 'refresh_token',\n client_id: 'umbraco-back-office',\n redirect_uri: this.baseUrl + '/umbraco/oauth_complete',\n refresh_token: await this.getRefreshToken()\n },\n ignoreHTTPSErrors: true\n });\n\n if (response.status() === 200) {\n const jsonStorageValue = await response.json();\n return await this.updateLocalStorage(jsonStorageValue);\n }\n console.log('Error refreshing access token.');\n return await this.updateTokenAndCookie(userEmail, userPassword);\n }\n\n async updateTokenAndCookie(userEmail: string, userPassword: string) {\n const storageStateValues = await this.login.login(userEmail, userPassword);\n await this.updateCookie(storageStateValues.cookie);\n await this.updateLocalStorage(storageStateValues.accessToken);\n return {\n cookie: storageStateValues.cookie,\n accessToken: storageStateValues.accessToken.access_token,\n refreshToken: storageStateValues.refreshToken.refresh_token\n };\n }\n\n async readFileContent(filePath) {\n try {\n const jsonString = fs.readFileSync(filePath, 'utf-8');\n return JSON.parse(jsonString);\n } catch (error) {\n console.log('Error reading file:', error);\n throw error;\n }\n }\n\n async readLocalBearerToken() {\n const filePath = process.env.STORAGE_STAGE_PATH;\n if (!filePath) {\n return await this.getBearerToken();\n }\n\n try {\n const data = await JSON.parse(fs.readFileSync(filePath, 'utf-8'));\n const localStorageItem = await this.getLocalStorageToken(data, 'umb:userAuthTokenResponse');\n const parsedValue = await JSON.parse(localStorageItem.value);\n return `Bearer ${parsedValue.access_token}`;\n } catch {\n // If the file is not found, return the current access token from the page context\n return await this.getBearerToken();\n }\n }\n\n async readLocalCookie() {\n const filePath = process.env.STORAGE_STAGE_PATH;\n if (!filePath) {\n return await this.getCookie();\n }\n\n try {\n const data = await JSON.parse(fs.readFileSync(filePath, 'utf-8'));\n return await data.cookies.map(cookie => `${cookie.name}=${cookie.value}`).join('; ') + ';';\n } catch {\n // If the file is not found, return the current cookie from the page context\n return await this.getCookie();\n }\n }\n\n private async getLocalStorageToken(localStorage: any, tokenName: string) {\n return await localStorage.origins?.[0]?.localStorage?.find(item => item.name === tokenName);\n }\n\n private async getLocalStorageAuthToken(){\n const currentStorageState = await this.page.context().storageState();\n const currentStorageToken = await this.getLocalStorageToken(currentStorageState, 'umb:userAuthTokenResponse');\n return JSON.parse(currentStorageToken.value);\n }\n\n private async updateLocalStorage(localStorageValue) {\n // Parse the existing token value and update its fields\n let currentLocalStorageValue = await this.getLocalStorageAuthToken();\n const newIssuedTime = await this.currentDateToEpoch();\n\n currentLocalStorageValue.access_token = localStorageValue.access_token;\n currentLocalStorageValue.refresh_token = localStorageValue.refresh_token;\n currentLocalStorageValue.issued_at = newIssuedTime;\n currentLocalStorageValue.scope = localStorageValue.scope;\n currentLocalStorageValue.token_type = localStorageValue.token_type;\n currentLocalStorageValue.expires_in = localStorageValue.expires_in.toString();\n\n const filePath = process.env.STORAGE_STAGE_PATH;\n // Updates the user.json file in our CMS project\n if (filePath) {\n try {\n const data = await this.readFileContent(filePath);\n const fileLocalStorageToken = await this.getLocalStorageToken(data, 'umb:userAuthTokenResponse');\n fileLocalStorageToken.value = JSON.stringify(currentLocalStorageValue);\n // Converts the object to JSON string\n const updatedJsonString = JSON.stringify(data, null, 2);\n // Writes the updated JSON content to the file\n fs.writeFileSync(filePath, updatedJsonString, 'utf-8');\n } catch (error) {\n console.error('Error updating token:', error);\n }\n }\n }\n\n private async updateCookie(cookieString: string) {\n const currentStorageState = await this.page.context().storageState();\n let currentCookie = currentStorageState.cookies[0];\n\n const parts = cookieString.split(';').map(part => part.trim());\n // Extract the main key-value pair\n const [nameValue, ...attributes] = parts;\n const [, value] = nameValue.split('=');\n // Updates the cookie value\n currentCookie.value = value;\n // Process each attribute\n for (const attr of attributes) {\n const [key, val] = attr.split('=');\n if (key.trim().toLowerCase() === 'expires') {\n // Updates the expires value and converts it to Epoch\n currentCookie.expires = await this.dateToEpoch(new Date(val));\n }\n }\n\n const filePath = process.env.STORAGE_STAGE_PATH;\n\n if (filePath) {\n try {\n const data = await this.readFileContent(filePath);\n data.cookies[0] = currentCookie;\n const updatedJsonString = JSON.stringify(data, null, 2);\n fs.writeFileSync(filePath, updatedJsonString, 'utf-8');\n } catch (error) {\n console.error('Error updating cookie:', error);\n }\n }\n }\n\n async revokeAccessToken(cookie: string, accessToken: string) {\n return await this.page.request.post(this.baseUrl + '/umbraco/management/api/v1/security/back-office/revoke', {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Cookie: cookie,\n Origin: this.baseUrl\n },\n form:\n {\n token: accessToken,\n token_type_hint: 'access_token',\n client_id: 'umbraco-back-office'\n },\n ignoreHTTPSErrors: true\n });\n }\n\n async revokeRefreshToken(cookie: string, refreshToken: string) {\n return await this.page.request.post(this.baseUrl + '/umbraco/management/api/v1/security/back-office/revoke', {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Cookie: cookie,\n Origin: this.baseUrl\n },\n form:\n {\n token: refreshToken,\n token_type_hint: 'refresh_token',\n client_id: 'umbraco-back-office'\n },\n ignoreHTTPSErrors: true\n });\n }\n\n async loginToAdminUser(testUserCookie: string, testUserAccessToken: string, testUserRefreshToken: string) {\n await this.revokeAccessToken(testUserCookie, testUserAccessToken);\n await this.revokeRefreshToken(testUserCookie, testUserRefreshToken);\n await this.updateTokenAndCookie(umbracoConfig.user.login, umbracoConfig.user.password);\n }\n\n async getCurrentTimePlusMinute(minute: number = 1) {\n const now = new Date();\n now.setMinutes(now.getMinutes() + minute); // Add one minute\n\n const year = now.getFullYear();\n const month = String(now.getMonth() + 1).padStart(2, '0');\n const day = String(now.getDate()).padStart(2, '0');\n const hours = String(now.getHours()).padStart(2, '0');\n const minutes = String(now.getMinutes()).padStart(2, '0');\n \n return `${year}-${month}-${day}T${hours}:${minutes}`;\n }\n\n async convertDateFormat(dateString: string) {\n return new Date(dateString).toLocaleString(\"en-US\", {\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n hour12: true,\n });\n }\n}"]}
|
|
1
|
+
{"version":3,"file":"ApiHelpers.js","sourceRoot":"","sources":["../../../lib/helpers/ApiHelpers.ts"],"names":[],"mappings":";;;AACA,yDAAmD;AACnD,iDAA4C;AAC5C,qEAAgE;AAChE,2DAAsD;AACtD,+DAA0D;AAC1D,mEAA8D;AAC9D,6DAAwD;AACxD,2DAAsD;AACtD,+CAA0C;AAC1C,2DAAsD;AACtD,mDAA8C;AAC9C,qEAAgE;AAChE,yDAAoD;AACpD,uDAAkD;AAClD,iEAA4D;AAC5D,+DAA0D;AAC1D,yBAAyB;AACzB,6DAAwD;AACxD,mEAA8D;AAC9D,2DAAsD;AACtD,6DAAwD;AACxD,qDAAgD;AAChD,iEAA4D;AAC5D,qEAAgE;AAChE,iEAA4D;AAC5D,yDAAoD;AACpD,uEAAkE;AAClE,+EAA0E;AAC1E,iEAA4D;AAC5D,uDAAkD;AAClD,+DAA0D;AAC1D,6EAAwE;AACxE,qDAAgD;AAChD,yDAAoD;AACpD,iGAA4F;AAC5F,qGAAgG;AAEhG,MAAa,UAAU;IACrB,OAAO,GAAW,8BAAa,CAAC,WAAW,CAAC,OAAO,CAAC;IACpD,IAAI,CAAO;IACX,KAAK,CAAc;IACnB,MAAM,CAAe;IACrB,SAAS,CAAyB;IAClC,QAAQ,CAAoB;IAC5B,UAAU,CAAsB;IAChC,YAAY,CAAwB;IACpC,SAAS,CA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AED,KAAK,CAAC,iBAAiB,CAAC,UAAkB;QACxC,OAAO,IAAI,IAAI,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,OAAO,EAAE;YAClD,IAAI,EAAE,SAAS;YACf,KAAK,EAAE,MAAM;YACb,GAAG,EAAE,SAAS;YACd,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,IAAI;SACb,CAAC,CAAC;IACL,CAAC;CACF;AAjeD,gCAieC","sourcesContent":["import {Page} from \"@playwright/test\"\nimport {umbracoConfig} from \"../../umbraco.config\";\nimport {ReportHelper} from \"./ReportHelper\";\nimport {TelemetryDataApiHelper} from \"./TelemetryDataApiHelper\";\nimport {LanguageApiHelper} from \"./LanguageApiHelper\";\nimport {DictionaryApiHelper} from \"./DictionaryApiHelper\";\nimport {RelationTypeApiHelper} from \"./RelationTypeApiHelper\";\nimport {UserGroupApiHelper} from \"./UserGroupApiHelper\";\nimport {TemplateApiHelper} from \"./TemplateApiHelper\";\nimport {AliasHelper} from \"./AliasHelper\";\nimport {DataTypeApiHelper} from \"./DataTypeApiHelper\";\nimport {UserApiHelper} from \"./UserApiHelper\";\nimport {TemporaryFileApiHelper} from \"./TemporaryFileApiHelper\";\nimport {PackageApiHelper} from \"./PackageApiHelper\";\nimport {ScriptApiHelper} from \"./ScriptApiHelper\";\nimport {PartialViewApiHelper} from \"./PartialViewApiHelper\";\nimport {StylesheetApiHelper} from \"./StylesheetApiHelper\";\nimport * as fs from \"fs\";\nimport {LogViewerApiHelper} from \"./LogViewerApiHelper\";\nimport {DocumentTypeApiHelper} from \"./DocumentTypeApiHelper\";\nimport {DocumentApiHelper} from \"./DocumentApiHelper\";\nimport {MediaTypeApiHelper} from \"./MediaTypeApiHelper\";\nimport {MediaApiHelper} from \"./MediaApiHelper\";\nimport {ObjectTypesApiHelper} from \"./ObjectTypesApiHelper\";\nimport {ModelsBuilderApiHelper} from \"./ModelsBuilderApiHelper\";\nimport {HealthCheckApiHelper} from \"./HealthCheckApiHelper\";\nimport {IndexerApiHelper} from \"./IndexerApiHelper\";\nimport {PublishedCacheApiHelper} from \"./PublishedCacheApiHelper\";\nimport {RedirectManagementApiHelper} from './RedirectManagementApiHelper';\nimport {MemberGroupApiHelper} from './MemberGroupApiHelper';\nimport {MemberApiHelper} from './MemberApiHelper';\nimport {MemberTypeApiHelper} from \"./MemberTypeApiHelper\";\nimport {DocumentBlueprintApiHelper} from \"./DocumentBlueprintApiHelper\";\nimport {LoginApiHelper} from \"./LoginApiHelper\";\nimport {WebhookApiHelper} from \"./WebhookApiHelper\";\nimport {MediaDeliveryApiHelper} from './differentAppSettingsHelpers/MediaDeliveryApiHelper';\nimport {ContentDeliveryApiHelper} from \"./differentAppSettingsHelpers/ContentDeliveryApiHelper\";\n\nexport class ApiHelpers {\n baseUrl: string = umbracoConfig.environment.baseUrl;\n page: Page;\n alias: AliasHelper;\n report: ReportHelper;\n telemetry: TelemetryDataApiHelper;\n language: LanguageApiHelper;\n dictionary: DictionaryApiHelper;\n relationType: RelationTypeApiHelper;\n userGroup: UserGroupApiHelper;\n template: TemplateApiHelper;\n dataType: DataTypeApiHelper;\n user: UserApiHelper;\n temporaryFile: TemporaryFileApiHelper;\n documentType: DocumentTypeApiHelper;\n document: DocumentApiHelper;\n package: PackageApiHelper;\n script: ScriptApiHelper;\n partialView: PartialViewApiHelper;\n stylesheet: StylesheetApiHelper;\n logViewer: LogViewerApiHelper;\n mediaType: MediaTypeApiHelper;\n media: MediaApiHelper;\n objectTypes: ObjectTypesApiHelper;\n modelsBuilder: ModelsBuilderApiHelper;\n healthCheck: HealthCheckApiHelper;\n indexer: IndexerApiHelper;\n publishedCache: PublishedCacheApiHelper;\n redirectManagement: RedirectManagementApiHelper;\n memberGroup: MemberGroupApiHelper;\n member: MemberApiHelper;\n memberType: MemberTypeApiHelper;\n documentBlueprint: DocumentBlueprintApiHelper;\n login: LoginApiHelper;\n webhook: WebhookApiHelper;\n mediaDeliveryApi: MediaDeliveryApiHelper;\n contentDeliveryApi: ContentDeliveryApiHelper;\n\n constructor(page: Page) {\n this.page = page;\n this.alias = new AliasHelper();\n this.report = new ReportHelper(this);\n this.telemetry = new TelemetryDataApiHelper(this);\n this.language = new LanguageApiHelper(this);\n this.dictionary = new DictionaryApiHelper(this);\n this.relationType = new RelationTypeApiHelper(this);\n this.userGroup = new UserGroupApiHelper(this);\n this.template = new TemplateApiHelper(this);\n this.dataType = new DataTypeApiHelper(this);\n this.user = new UserApiHelper(this, page);\n this.temporaryFile = new TemporaryFileApiHelper(this);\n this.documentType = new DocumentTypeApiHelper(this);\n this.document = new DocumentApiHelper(this);\n this.package = new PackageApiHelper(this);\n this.script = new ScriptApiHelper(this);\n this.partialView = new PartialViewApiHelper(this);\n this.stylesheet = new StylesheetApiHelper(this);\n this.logViewer = new LogViewerApiHelper(this);\n this.mediaType = new MediaTypeApiHelper(this);\n this.media = new MediaApiHelper(this);\n this.objectTypes = new ObjectTypesApiHelper(this);\n this.modelsBuilder = new ModelsBuilderApiHelper(this);\n this.healthCheck = new HealthCheckApiHelper(this);\n this.indexer = new IndexerApiHelper(this);\n this.publishedCache = new PublishedCacheApiHelper(this);\n this.redirectManagement = new RedirectManagementApiHelper(this);\n this.memberGroup = new MemberGroupApiHelper(this);\n this.member = new MemberApiHelper(this);\n this.memberType = new MemberTypeApiHelper(this);\n this.documentBlueprint = new DocumentBlueprintApiHelper(this);\n this.login = new LoginApiHelper(this, this.page);\n this.webhook = new WebhookApiHelper(this, this.page);\n this.mediaDeliveryApi = new MediaDeliveryApiHelper(this);\n this.contentDeliveryApi = new ContentDeliveryApiHelper(this);\n }\n\n async getAccessToken() {\n const authToken = await this.getLocalStorageAuthToken();\n return authToken.access_token;\n }\n\n async getBearerToken() {\n return 'Bearer ' + await this.getAccessToken();\n }\n\n async getCookie() {\n let someStorage = await this.page.context().storageState();\n let cookieString = \"\";\n for (let cookie of someStorage.cookies) {\n cookieString += cookie.name + '=' + cookie.value + ';';\n }\n return cookieString;\n }\n\n async getHeaders() {\n return {\n 'Authorization': await this.readLocalBearerToken(),\n 'Cookie': await this.readLocalCookie(),\n }\n }\n\n async get(url: string, params?: { [key: string]: string | number | boolean; }, extraHeaders?: { [key: string]: string; }) {\n const headers = await this.getHeaders();\n const allHeaders = {...headers, ...extraHeaders};\n const options = {\n headers: allHeaders,\n params: params,\n ignoreHTTPSErrors: true\n }\n return await this.page.request.get(url, options);\n }\n\n async saveCodeFile(codeFile) {\n if (codeFile == null) {\n return;\n }\n return await this.post(umbracoConfig.environment.baseUrl + '/umbraco/backoffice/UmbracoApi/CodeFile/PostSave', codeFile);\n }\n\n async post(url: string, data?: object) {\n const options = {\n headers: await this.getHeaders(),\n data: data,\n ignoreHTTPSErrors: true\n }\n return await this.page.request.post(url, options);\n }\n\n async delete(url: string, data?: object) {\n const options = {\n headers: await this.getHeaders(),\n data: data,\n ignoreHTTPSErrors: true\n }\n return await this.page.request.delete(url, options);\n }\n\n async put(url: string, data?: object) {\n const options = {\n headers: await this.getHeaders(),\n data: data,\n ignoreHTTPSErrors: true\n }\n return await this.page.request.put(url, options);\n }\n\n async postMultiPartForm(url: string, id, name: string, mimeType: string, filePath) {\n const options = {\n headers: await this.getHeaders(),\n multipart: {\n Id: id,\n File: {\n name: name,\n mimeType: mimeType,\n buffer: fs.readFileSync(filePath)\n }\n },\n ignoreHTTPSErrors: true\n }\n return await this.page.request.post(url, options);\n }\n\n // Currently not used\n // private async getTokenIssuedTime() {\n // const authToken = await this.getLocalStorageAuthToken();\n // return Number(authToken.issued_at);\n // }\n // private async getTokenExpireTime() {\n // const authToken = await this.getLocalStorageAuthToken();\n // return Number(authToken.expires_in);\n // }\n //\n // async isAccessTokenValid() {\n // const tokenTimeIssued = await this.getTokenIssuedTime();\n // const tokenExpireTime = await this.getTokenExpireTime();\n // // Should use a global value\n // const globalTestTimeout: number = 45;\n // // We want to have the date minus the globalTimeout, the reason for this is that while a test is running, the token could expire.\n // // The refresh token lasts for 300 seconds, while the access token lasts for 60 seconds (NOT TOTALLY SURE) this is why we add 240 seconds\n // const tokenRefreshTime = tokenTimeIssued + tokenExpireTime - (globalTestTimeout);\n // // We need the currentTimeInEpoch so we can check if the tokenRefreshTime is close to expiring.\n // const currentTimeInEpoch = await this.currentDateToEpoch();\n //\n // if (tokenRefreshTime <= currentTimeInEpoch) {\n // return await this.refreshAccessToken(umbracoConfig.user.login, umbracoConfig.user.password);\n // }\n // }\n async getRefreshToken() {\n const authToken = await this.getLocalStorageAuthToken();\n return authToken.refresh_token;\n }\n\n private async currentDateToEpoch() {\n const currentTime = new Date(Date.now());\n return await this.dateToEpoch(currentTime);\n }\n\n private async dateToEpoch(date: Date) {\n const dateToEpoch = date.getTime();\n // The epoch is in milliseconds, but we want it to be in seconds(Like it is in the token).\n const millisecondsToSeconds = dateToEpoch / 1000;\n // There is no need to have anything after .\n return Number(millisecondsToSeconds.toString().split('.')[0]);\n }\n\n async refreshAccessToken(userEmail: string, userPassword: string) {\n const response = await this.page.request.post(this.baseUrl + '/umbraco/management/api/v1/security/back-office/token', {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Cookie: await this.readLocalCookie(),\n Origin: this.baseUrl\n },\n form:\n {\n grant_type: 'refresh_token',\n client_id: 'umbraco-back-office',\n redirect_uri: this.baseUrl + '/umbraco/oauth_complete',\n refresh_token: await this.getRefreshToken()\n },\n ignoreHTTPSErrors: true\n });\n\n if (response.status() === 200) {\n const jsonStorageValue = await response.json();\n const jsonStorageCookie = response.headers()['set-cookie'];\n await this.updateLocalStorage(jsonStorageValue);\n // We get multiple cookies, so we have to split them and then update each of the cookies in our localestorage \n let cookies = this.splitCookies(jsonStorageCookie);\n for (const cookie of cookies) {\n await this.updateCookie(cookie);\n }\n return;\n }\n console.log('Error refreshing access token.');\n return await this.updateTokenAndCookie(userEmail, userPassword);\n }\n\n private splitCookies(cookieString: string): string[] {\n return cookieString\n .trim()\n .split('\\n')\n .filter(line => line.trim())\n .filter(line => !line.includes('expires=Thu, 01 Jan 1970'));\n }\n\n async updateTokenAndCookie(userEmail: string, userPassword: string) {\n const storageStateValues = await this.login.login(userEmail, userPassword);\n await this.updateCookie(storageStateValues.cookie);\n await this.updateLocalStorage(storageStateValues.accessToken);\n return {\n cookie: storageStateValues.cookie,\n accessToken: storageStateValues.accessToken,\n refreshToken: storageStateValues.refreshToken,\n };\n }\n\n async readFileContent(filePath) {\n try {\n const jsonString = fs.readFileSync(filePath, 'utf-8');\n return JSON.parse(jsonString);\n } catch (error) {\n console.log('Error reading file:', error);\n throw error;\n }\n }\n\n async readLocalBearerToken() {\n const filePath = process.env.STORAGE_STAGE_PATH;\n if (!filePath) {\n return await this.getBearerToken();\n }\n\n try {\n const data = await JSON.parse(fs.readFileSync(filePath, 'utf-8'));\n const localStorageItem = await this.getLocalStorageToken(data, 'umb:userAuthTokenResponse');\n const parsedValue = await JSON.parse(localStorageItem.value);\n return `Bearer ${parsedValue.access_token}`;\n } catch {\n // If the file is not found, return the current access token from the page context\n return await this.getBearerToken();\n }\n }\n\n async readLocalCookie() {\n const filePath = process.env.STORAGE_STAGE_PATH;\n if (!filePath) {\n return await this.getCookie();\n }\n\n try {\n const data = await JSON.parse(fs.readFileSync(filePath, 'utf-8'));\n return await data.cookies.map(cookie => `${cookie.name}=${cookie.value}`).join('; ') + ';';\n } catch {\n // If the file is not found, return the current cookie from the page context\n return await this.getCookie();\n }\n }\n\n private async getLocalStorageToken(localStorage: any, tokenName: string) {\n return await localStorage.origins?.[0]?.localStorage?.find(item => item.name === tokenName);\n }\n\n async updateLocalStorageTokens(setCookies: string) {\n // Find AccessToken and RefreshToken in CookiesString\n const accessValue = setCookies.match(/__Host-umbAccessToken=([^;]+)/)?.[1];\n const refreshValue = setCookies.match(/__Host-umbRefreshToken=([^;]+)/)?.[1];\n const accessToken = accessValue && {value: accessValue};\n const refreshToken = refreshValue && {value: refreshValue};\n\n let currentLocalStorageValue = await this.getLocalStorageAuthToken();\n const newIssuedTime = await this.currentDateToEpoch();\n\n currentLocalStorageValue.access_token = accessToken;\n currentLocalStorageValue.refresh_token = refreshToken;\n currentLocalStorageValue.issued_at = newIssuedTime;\n\n const filePath = process.env.STORAGE_STAGE_PATH;\n // Updates the user.json file in our CMS project\n if (filePath) {\n try {\n const data = await this.readFileContent(filePath);\n const fileLocalStorageToken = await this.getLocalStorageToken(data, 'umb:userAuthTokenResponse');\n fileLocalStorageToken.value = JSON.stringify(currentLocalStorageValue);\n // Converts the object to JSON string\n const updatedJsonString = JSON.stringify(data, null, 2);\n // Writes the updated JSON content to the file\n fs.writeFileSync(filePath, updatedJsonString, 'utf-8');\n } catch (error) {\n console.error('Error updating token:', error);\n }\n }\n return {accessToken: accessToken, refreshToken: refreshToken};\n }\n\n private async getLocalStorageAuthToken() {\n const currentStorageState = await this.page.context().storageState();\n const currentStorageToken = await this.getLocalStorageToken(currentStorageState, 'umb:userAuthTokenResponse');\n return JSON.parse(currentStorageToken.value);\n }\n\n private async updateLocalStorage(localStorageValue) {\n // Parse the existing token value and update its fields\n let currentLocalStorageValue = await this.getLocalStorageAuthToken();\n const newIssuedTime = await this.currentDateToEpoch();\n\n currentLocalStorageValue.access_token = localStorageValue.access_token;\n currentLocalStorageValue.refresh_token = localStorageValue.refresh_token;\n currentLocalStorageValue.issued_at = newIssuedTime;\n currentLocalStorageValue.scope = localStorageValue.scope;\n currentLocalStorageValue.token_type = localStorageValue.token_type;\n currentLocalStorageValue.expires_in = localStorageValue.expires_in.toString();\n\n const filePath = process.env.STORAGE_STAGE_PATH;\n // Updates the user.json file in our CMS project\n if (filePath) {\n try {\n const data = await this.readFileContent(filePath);\n const fileLocalStorageToken = await this.getLocalStorageToken(data, 'umb:userAuthTokenResponse');\n fileLocalStorageToken.value = JSON.stringify(currentLocalStorageValue);\n // Converts the object to JSON string\n const updatedJsonString = JSON.stringify(data, null, 2);\n // Writes the updated JSON content to the file\n fs.writeFileSync(filePath, updatedJsonString, 'utf-8');\n } catch (error) {\n console.error('Error updating token:', error);\n }\n }\n }\n\n private async updateCookie(cookieString: string) {\n try {\n // Parse cookie string\n const parts = cookieString.split(';').map(p => p.trim());\n const [nameValue, ...attributes] = parts;\n const [name, value] = nameValue.split('=');\n const cookieName = name.trim();\n\n // Get current state\n const storageState = await this.page.context().storageState();\n const cookieIndex = storageState.cookies.findIndex(c => c.name === cookieName);\n\n if (cookieIndex === -1) {\n console.log(`Cookie \"${cookieName}\" not found`);\n return;\n }\n\n // Update cookie value\n storageState.cookies[cookieIndex].value = value;\n\n // Update expires if present\n for (const attr of attributes) {\n if (attr.toLowerCase().startsWith('expires=')) {\n const expiresDate = attr.split('=')[1];\n storageState.cookies[cookieIndex].expires = Date.parse(expiresDate) / 1000;\n }\n }\n\n // Write to file if path exists\n const filePath = process.env.STORAGE_STAGE_PATH;\n if (filePath) {\n const fs = require('fs');\n const fileData = JSON.parse(fs.readFileSync(filePath, 'utf-8'));\n\n const fileCookieIndex = fileData.cookies.findIndex(c => c.name === cookieName);\n\n if (fileCookieIndex !== -1) {\n fileData.cookies[fileCookieIndex] = storageState.cookies[cookieIndex];\n fs.writeFileSync(filePath, JSON.stringify(fileData, null, 2));\n } else {\n console.log(`Cookie \"${cookieName}\" not found in file`);\n }\n }\n } catch (error) {\n console.error('Error updating cookie:', error);\n }\n }\n\n async revokeAccessToken(cookie: string, accessToken: string) {\n return await this.page.request.post(this.baseUrl + '/umbraco/management/api/v1/security/back-office/revoke', {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Cookie: cookie,\n Origin: this.baseUrl\n },\n form:\n {\n token: accessToken,\n token_type_hint: 'access_token',\n client_id: 'umbraco-back-office'\n },\n ignoreHTTPSErrors: true\n });\n }\n\n async revokeRefreshToken(cookie: string, refreshToken: string) {\n return await this.page.request.post(this.baseUrl + '/umbraco/management/api/v1/security/back-office/revoke', {\n headers: {\n 'Content-Type': 'application/x-www-form-urlencoded',\n Cookie: cookie,\n Origin: this.baseUrl\n },\n form:\n {\n token: refreshToken,\n token_type_hint: 'refresh_token',\n client_id: 'umbraco-back-office'\n },\n ignoreHTTPSErrors: true\n });\n }\n\n async loginToAdminUser(testUserCookie: string, testUserAccessToken: string, testUserRefreshToken: string) {\n await this.revokeAccessToken(testUserCookie, testUserAccessToken);\n await this.revokeRefreshToken(testUserCookie, testUserRefreshToken);\n await this.updateTokenAndCookie(umbracoConfig.user.login, umbracoConfig.user.password);\n }\n\n async getCurrentTimePlusMinute(minute: number = 1) {\n const now = new Date();\n now.setMinutes(now.getMinutes() + minute); // Add one minute\n\n const year = now.getFullYear();\n const month = String(now.getMonth() + 1).padStart(2, '0');\n const day = String(now.getDate()).padStart(2, '0');\n const hours = String(now.getHours()).padStart(2, '0');\n const minutes = String(now.getMinutes()).padStart(2, '0');\n\n return `${year}-${month}-${day}T${hours}:${minutes}`;\n }\n\n async convertDateFormat(dateString: string) {\n return new Date(dateString).toLocaleString(\"en-US\", {\n year: \"numeric\",\n month: \"long\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"numeric\",\n second: \"numeric\",\n hour12: true,\n });\n }\n}"]}
|
|
@@ -140,9 +140,13 @@ export declare class ConstantHelper {
|
|
|
140
140
|
};
|
|
141
141
|
static readonly userGroupDefaultPermissionsSettings: {
|
|
142
142
|
0: string[];
|
|
143
|
+
1: string[];
|
|
144
|
+
2: string[];
|
|
145
|
+
3: string[];
|
|
143
146
|
};
|
|
144
147
|
static readonly userGroupGranularPermissionsSettings: {
|
|
145
148
|
0: string[];
|
|
149
|
+
1: string[];
|
|
146
150
|
};
|
|
147
151
|
static readonly userGroupPermissionsSettings: {
|
|
148
152
|
0: string[];
|
|
@@ -159,9 +163,6 @@ export declare class ConstantHelper {
|
|
|
159
163
|
11: string[];
|
|
160
164
|
12: string[];
|
|
161
165
|
13: string[];
|
|
162
|
-
14: string[];
|
|
163
|
-
15: string[];
|
|
164
|
-
16: string[];
|
|
165
166
|
};
|
|
166
167
|
static readonly userGroupSectionsSettings: {
|
|
167
168
|
0: string[];
|
|
@@ -182,4 +183,8 @@ export declare class ConstantHelper {
|
|
|
182
183
|
eventType: string;
|
|
183
184
|
alias: string;
|
|
184
185
|
}[];
|
|
186
|
+
static readonly dateTimeWithTimeZonePickerSetting: {
|
|
187
|
+
0: string[];
|
|
188
|
+
1: string[];
|
|
189
|
+
};
|
|
185
190
|
}
|
|
@@ -32,8 +32,8 @@ class ConstantHelper {
|
|
|
32
32
|
denied: 'Access denied'
|
|
33
33
|
};
|
|
34
34
|
static approvedColorSettings = {
|
|
35
|
-
0: ['Include labels?', '
|
|
36
|
-
1: ['Colors', 'Add, remove or sort colors'],
|
|
35
|
+
0: ['Include labels?', 'Displays colored field and a label for each color in the color picker, rather than just a colored field.'],
|
|
36
|
+
1: ['Colors', 'Add, remove or sort colors (and labels).'],
|
|
37
37
|
};
|
|
38
38
|
static checkboxListSettings = {
|
|
39
39
|
0: ['Add option', 'Add, remove or sort options for the list.']
|
|
@@ -143,10 +143,14 @@ class ConstantHelper {
|
|
|
143
143
|
3: ['Select media start node', 'Limit the media library to a specific start node']
|
|
144
144
|
};
|
|
145
145
|
static userGroupDefaultPermissionsSettings = {
|
|
146
|
-
0: ['
|
|
146
|
+
0: ['General', ''],
|
|
147
|
+
1: ['Structure', ''],
|
|
148
|
+
2: ['Administration', ''],
|
|
149
|
+
3: ['Granular permissions', 'Assign permissions to specific documents'],
|
|
147
150
|
};
|
|
148
151
|
static userGroupGranularPermissionsSettings = {
|
|
149
|
-
0: ['
|
|
152
|
+
0: ['General', ''],
|
|
153
|
+
1: ['Granular permissions', 'Assign permissions to Document property values'],
|
|
150
154
|
};
|
|
151
155
|
static userGroupPermissionsSettings = {
|
|
152
156
|
0: ['Read', 'Allow access to read a Document', 'Umb.Document.Read'],
|
|
@@ -155,17 +159,14 @@ class ConstantHelper {
|
|
|
155
159
|
3: ['Create', 'Allow access to create a Document', 'Umb.Document.Create'],
|
|
156
160
|
4: ['Notifications', 'Allow access to setup notifications for Documents', 'Umb.Document.Notifications'],
|
|
157
161
|
5: ['Publish', 'Allow access to publish a Document', 'Umb.Document.Publish'],
|
|
158
|
-
6: ['
|
|
159
|
-
7: ['
|
|
160
|
-
8: ['
|
|
161
|
-
9: ['
|
|
162
|
-
10: ['
|
|
163
|
-
11: ['
|
|
164
|
-
12: ['
|
|
165
|
-
13: ['
|
|
166
|
-
14: ['Rollback', 'Allow access to roll back a Document to a previous state', 'Umb.Document.Rollback'],
|
|
167
|
-
15: ['UI Read', 'Allow access to read Document property values in the UI', 'Umb.Document.PropertyValue.Read'],
|
|
168
|
-
16: ['UI Write', 'Allow access to write Document property values from the UI', 'Umb.Document.PropertyValue.Write'],
|
|
162
|
+
6: ['Unpublish', 'Allow access to unpublish a Document', 'Umb.Document.Unpublish'],
|
|
163
|
+
7: ['Update', 'Allow access to save a Document', 'Umb.Document.Update'],
|
|
164
|
+
8: ['Duplicate', 'Allow access to copy a Document', 'Umb.Document.Duplicate'],
|
|
165
|
+
9: ['Move to', 'Allow access to move a Document', 'Umb.Document.Move'],
|
|
166
|
+
10: ['Sort children', 'Allow access to change the sort order for Documents', 'Umb.Document.Sort'],
|
|
167
|
+
11: ['Culture and Hostnames', 'Allow access to assign culture and hostnames', 'Umb.Document.CultureAndHostnames'],
|
|
168
|
+
12: ['Public Access', 'Allow access to set and change access restrictions for a Document', 'Umb.Document.PublicAccess'],
|
|
169
|
+
13: ['Rollback', 'Allow access to roll back a Document to a previous state', 'Umb.Document.Rollback']
|
|
169
170
|
};
|
|
170
171
|
static userGroupSectionsSettings = {
|
|
171
172
|
0: ['Content', 'Umb.Section.Content'],
|
|
@@ -208,6 +209,10 @@ class ConstantHelper {
|
|
|
208
209
|
"alias": "Umbraco.MediaSave"
|
|
209
210
|
}
|
|
210
211
|
];
|
|
212
|
+
static dateTimeWithTimeZonePickerSetting = {
|
|
213
|
+
0: ['Time format', ''],
|
|
214
|
+
1: ['Time zones', 'Select the time zones that the editor should be able to pick from.']
|
|
215
|
+
};
|
|
211
216
|
}
|
|
212
217
|
exports.ConstantHelper = ConstantHelper;
|
|
213
218
|
//# sourceMappingURL=ConstantHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConstantHelper.js","sourceRoot":"","sources":["../../../lib/helpers/ConstantHelper.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAElB,MAAM,CAAU,QAAQ,GAAG;QAChC,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,SAAS;QAClB,UAAU,EAAE,aAAa;QACzB,KAAK,EAAE,OAAO;KACf,CAAA;IAEM,MAAM,CAAU,mBAAmB,GAAG;QAC3C,IAAI,EAAE,WAAW;QACjB,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,uBAAuB;KAClC,CAAA;IAEM,MAAM,CAAU,kBAAkB,GAAG;QAC1C,eAAe,EAAE,wBAAwB;QACzC,YAAY,EAAE,yDAAyD;QACvE,8CAA8C,EAAE,kNAAkN;QAClQ,UAAU,EAAE,uBAAuB;QACnC,SAAS,EAAE,sBAAsB;QACjC,YAAY,EAAE,eAAe;KAC9B,CAAA;IAEM,MAAM,CAAU,UAAU,GAAG;QAClC,OAAO,EAAE,OAAO;QAChB,MAAM,EAAE,kBAAkB;KAC3B,CAAA;IAEM,MAAM,CAAU,MAAM,GAAG;QAC9B,MAAM,EAAE,eAAe;KACxB,CAAA;IAEM,MAAM,CAAU,qBAAqB,GAAG;QAC7C,CAAC,EAAE,CAAC,iBAAiB,EAAE,iHAAiH,CAAC;QACzI,CAAC,EAAE,CAAC,QAAQ,EAAE,4BAA4B,CAAC;KAC5C,CAAA;IAEM,MAAM,CAAU,oBAAoB,GAAG;QAC5C,CAAC,EAAE,CAAC,YAAY,EAAE,2CAA2C,CAAC;KAC/D,CAAA;IAEM,MAAM,CAAU,qBAAqB,GAAG;QAC7C,CAAC,EAAE,CAAC,yBAAyB,EAAE,6FAA6F,CAAC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,EAAE,SAAS;YACtB,OAAO,EAAE,uBAAuB;SACjC;QACD;YACE,WAAW,EAAE,mBAAmB;YAChC,WAAW,EAAE,SAAS;YACtB,OAAO,EAAE,wBAAwB;SAClC;QACD;YACE,WAAW,EAAE,qBAAqB;YAClC,WAAW,EAAE,SAAS;YACtB,OAAO,EAAE,0BAA0B;SACpC;QACD;YACE,WAAW,EAAE,eAAe;YAC5B,WAAW,EAAE,OAAO;YACpB,OAAO,EAAE,qBAAqB;SAC/B;QACD;YACE,WAAW,EAAE,aAAa;YAC1B,WAAW,EAAE,OAAO;YACpB,OAAO,EAAE,mBAAmB;SAC7B;KACF,CAAA;;AA7OH,wCA8OC","sourcesContent":["export class ConstantHelper {\n\n public static readonly sections = {\n content: \"Content\",\n media: \"Media\",\n settings: \"Settings\",\n packages: \"Packages\",\n members: \"Members\",\n dictionary: \"Translation\",\n users: \"Users\"\n }\n\n public static readonly testUserCredentials = {\n name: 'Test User',\n email: 'verySecureEmail@123.test',\n password: 'verySecurePassword123'\n }\n\n public static readonly validationMessages = {\n emptyLinkPicker: 'This field is required',\n invalidValue: 'Value is invalid, it does not match the correct pattern',\n unsupportInvariantContentItemWithVariantBlocks: 'One or more Block Types of this Block Editor is using a Element-Type that is configured to Vary By Culture or Vary By Segment. This is not supported on a Content item that does not vary by Culture or Segment.',\n emptyValue: 'Value cannot be empty',\n nullValue: 'Value cannot be null',\n invalidEmail: 'Invalid email'\n }\n\n public static readonly inputTypes = {\n general: 'input',\n tipTap: 'umb-input-tiptap'\n }\n\n public static readonly access = {\n denied: 'Access denied'\n }\n \n public static readonly approvedColorSettings = {\n 0: ['Include labels?', 'Stores colors as a JSON object containing both the color hex string and label, rather than just the hex string.'],\n 1: ['Colors', 'Add, remove or sort colors'],\n }\n\n public static readonly checkboxListSettings = {\n 0: ['Add option', 'Add, remove or sort options for the list.']\n }\n\n public static readonly contentPickerSettings = {\n 0: ['Ignore user start nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],\n 1: ['Start node', '']\n }\n\n public static readonly datePickerSettings = {\n 0: ['Date format', 'If left empty then the format is YYYY-MM-DD'],\n //1: ['Offset time', \"When enabled the time displayed will be offset with the server's timezone, this is useful for scenarios like scheduled publishing when an editor is in a different timezone than the hosted server\"]\n }\n\n public static readonly dropdownSettings = {\n 0: ['Enable multiple choice', ''],\n 1: ['Add options', '']\n }\n\n public static readonly imageCropperSettings = {\n 0: ['Crop options', ''],\n }\n\n public static readonly mediaPickerSettings = {\n 0: ['Accepted types', 'Limit to specific types'],\n 1: ['Pick multiple items', 'Outputs a IEnumerable'],\n 2: ['Amount', 'Set a required range of medias'],\n 3: ['Start node', ''],\n 4: ['Enable Focal Point', ''],\n 5: ['Image Crops', 'Local crops, stored on document'],\n 6: ['Ignore User Start Nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],\n }\n\n public static readonly labelSettings = {\n 0: ['Value type', 'The type of value to store'],\n 1: ['Label template', 'Enter a template for the label.'],\n }\n\n public static readonly listViewSettings = {\n 0: ['Columns Displayed', 'The properties that will be displayed for each column.'],\n 1: ['Layouts', 'The properties that will be displayed for each column.'],\n 2: ['Order By', 'The default sort order for the Collection.'],\n 3: ['Order Direction', ''],\n 4: ['Page Size', 'Number of items per page.'],\n 5: ['Workspace View icon', \"The icon for the Collection's Workspace View.\"],\n 6: ['Workspace View name', \"The name of the Collection's Workspace View (default if empty: Child Items).\"],\n 7: ['Show Content Workspace View First', \"Enable this to show the Content Workspace View by default instead of the Collection's.\"],\n }\n\n public static readonly multiURLPickerSettings = {\n 0: ['Minimum number of items', ''],\n 1: ['Maximum number of items', ''],\n 2: ['Ignore user start nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],\n 3: ['Overlay Size', 'Select the width of the overlay.'],\n 4: ['Hide anchor/query string input', 'Selecting this hides the anchor/query string input field in the link picker overlay.'],\n }\n\n public static readonly numericSettings = {\n 0: ['Minimum', 'Enter the minimum amount of number to be entered'],\n 1: ['Maximum', 'Enter the maximum amount of number to be entered'],\n 2: ['Step size', 'Enter the intervals amount between each step of number to be entered']\n }\n\n public static readonly radioboxSettings = {\n 0: ['Add option', 'Add, remove or sort options for the list.'],\n }\n\n public static readonly tagsSettings = {\n 0: ['Tag group', ''],\n 1: ['Storage Type', 'Select whether to store the tags in cache as JSON (default) or CSV format. Notice that CSV does not support commas in the tag value.']\n }\n\n public static readonly textareaSettings = {\n 0: ['Maximum allowed characters', 'If empty - no character limit'],\n 1: ['Number of rows', 'If empty or zero, the textarea is set to auto-height']\n }\n\n public static readonly textstringSettings = {\n 0: ['Maximum allowed characters', 'If empty, 512 character limit'],\n }\n\n public static readonly trueFalseSettings = {\n 0: ['Preset value', ''],\n 1: ['Show on/off labels', ''],\n 2: ['Label On', 'Displays text when enabled.'],\n 3: ['Label Off', 'Displays text when disabled.'],\n 4: ['Screen Reader Label', ''],\n }\n\n public static readonly uploadSettings = {\n 0: ['Accepted file extensions', ''],\n }\n\n public static readonly tipTapSettings = {\n 0: ['Capabilities', 'Choose which Tiptap extensions to enable.\\nOnce enabled, the related actions will be available for the toolbar and statusbar.'],\n 1: ['Toolbar', 'Design the available actions.\\nDrag and drop the available actions onto the toolbar.'],\n 2: ['Statusbar', 'Design the available statuses.\\nDrag and drop the available actions onto the statusbar areas.'],\n 3: ['Stylesheets', 'Pick the stylesheets whose editor styles should be available when editing.'],\n 4: ['Dimensions', 'Sets the fixed width and height of the editor. This excludes the toolbar and statusbar heights.'],\n 5: ['Maximum size for inserted images', 'Maximum width or height - enter 0 to disable resizing.'],\n 6: ['Overlay size', 'Select the width of the overlay (link picker).'],\n 7: ['Available Blocks', 'Define the available blocks.'],\n 8: ['Image Upload Folder', 'Choose the upload location of pasted images.'],\n 9: ['Ignore User Start Nodes', ''],\n }\n\n public static readonly tinyMCESettings = {\n 0: ['Toolbar', 'Pick the toolbar options that should be available when editing'],\n 1: ['Stylesheets', 'Pick the stylesheets whose editor styles should be available when editing'],\n 2: ['Dimensions', 'Set the editor dimensions'],\n 3: ['Maximum size for inserted images', 'Maximum width or height - enter 0 to disable resizing.'],\n 4: ['Mode', 'Select the mode for the editor'],\n 5: ['Available Blocks', 'Define the available blocks.'],\n 6: ['Overlay size', 'Select the width of the overlay (link picker).'],\n 7: ['Hide Label', ''],\n 8: ['Image Upload Folder', 'Choose the upload location of pasted images.'],\n 9: ['Ignore User Start Nodes', ''],\n }\n\n public static readonly userGroupAssignAccessSettings = {\n 0: ['Sections', 'Add sections to give users access'],\n 1: ['Languages', 'Limit the languages users have access to edit'],\n 2: ['Select content start node', 'Limit the content tree to a specific start node'],\n 3: ['Select media start node', 'Limit the media library to a specific start node']\n }\n\n public static readonly userGroupDefaultPermissionsSettings = {\n 0: ['Permissions', 'Assign permissions for actions']\n }\n\n public static readonly userGroupGranularPermissionsSettings = {\n 0: ['Documents', 'Assign permissions to specific documents']\n }\n\n public static readonly userGroupPermissionsSettings = {\n 0: ['Read', 'Allow access to read a Document', 'Umb.Document.Read'],\n 1: ['Create Document Blueprint', 'Allow access to create a Document Blueprint', 'Umb.Document.CreateBlueprint'],\n 2: ['Delete', 'Allow access to delete a Document', 'Umb.Document.Delete'],\n 3: ['Create', 'Allow access to create a Document', 'Umb.Document.Create'],\n 4: ['Notifications', 'Allow access to setup notifications for Documents', 'Umb.Document.Notifications'],\n 5: ['Publish', 'Allow access to publish a Document', 'Umb.Document.Publish'],\n 6: ['Set permissions', 'Allow access to change permissions for a Document', 'Umb.Document.Permissions'],\n 7: ['Unpublish', 'Allow access to unpublish a Document', 'Umb.Document.Unpublish'],\n 8: ['Update', 'Allow access to save a Document', 'Umb.Document.Update'],\n 9: ['Duplicate', 'Allow access to copy a Document', 'Umb.Document.Duplicate'],\n 10: ['Move to', 'Allow access to move a Document', 'Umb.Document.Move'],\n 11: ['Sort children', 'Allow access to change the sort order for Documents', 'Umb.Document.Sort'],\n 12: ['Culture and Hostnames', 'Allow access to assign culture and hostnames', 'Umb.Document.CultureAndHostnames'],\n 13: ['Public Access', 'Allow access to set and change access restrictions for a Document', 'Umb.Document.PublicAccess'],\n 14: ['Rollback', 'Allow access to roll back a Document to a previous state', 'Umb.Document.Rollback'],\n 15: ['UI Read', 'Allow access to read Document property values in the UI', 'Umb.Document.PropertyValue.Read'],\n 16: ['UI Write', 'Allow access to write Document property values from the UI', 'Umb.Document.PropertyValue.Write'],\n }\n\n public static readonly userGroupSectionsSettings = {\n 0: ['Content', 'Umb.Section.Content'],\n 1: ['Forms', 'Umb.Section.Forms'],\n 2: ['Media', 'Umb.Section.Media'],\n 3: ['Members', 'Umb.Section.Members'],\n 4: ['Packages', 'Umb.Section.Packages'],\n 5: ['Settings', 'Umb.Section.Settings'],\n 6: ['Translation', 'Umb.Section.Translation'],\n 7: ['Users', 'Umb.Section.Users'],\n }\n\n public static readonly trashDeleteDialogMessage = {\n referenceHeadline: 'The following items depend on this',\n bulkReferenceHeadline: 'The following items are used by other content.'\n }\n\n public static readonly webhookEvents = [\n {\n \"eventName\": \"Content Deleted\",\n \"eventType\": \"Content\",\n \"alias\": \"Umbraco.ContentDelete\"\n },\n {\n \"eventName\": \"Content Published\",\n \"eventType\": \"Content\",\n \"alias\": \"Umbraco.ContentPublish\"\n },\n {\n \"eventName\": \"Content Unpublished\",\n \"eventType\": \"Content\",\n \"alias\": \"Umbraco.ContentUnpublish\"\n },\n {\n \"eventName\": \"Media Deleted\",\n \"eventType\": \"Media\",\n \"alias\": \"Umbraco.MediaDelete\"\n },\n {\n \"eventName\": \"Media Saved\",\n \"eventType\": \"Media\",\n \"alias\": \"Umbraco.MediaSave\"\n }\n ]\n}"]}
|
|
1
|
+
{"version":3,"file":"ConstantHelper.js","sourceRoot":"","sources":["../../../lib/helpers/ConstantHelper.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAElB,MAAM,CAAU,QAAQ,GAAG;QAChC,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,UAAU;QACpB,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,SA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AAW,EAAE,OAAO;YACpB,OAAO,EAAE,mBAAmB;SAC7B;KACF,CAAA;IAEM,MAAM,CAAU,iCAAiC,GAAG;QACzD,CAAC,EAAE,CAAC,aAAa,EAAE,EAAE,CAAC;QACtB,CAAC,EAAE,CAAC,YAAY,EAAE,oEAAoE,CAAC;KACxF,CAAA;;AAnPH,wCAoPC","sourcesContent":["export class ConstantHelper {\n\n public static readonly sections = {\n content: \"Content\",\n media: \"Media\",\n settings: \"Settings\",\n packages: \"Packages\",\n members: \"Members\",\n dictionary: \"Translation\",\n users: \"Users\"\n }\n\n public static readonly testUserCredentials = {\n name: 'Test User',\n email: 'verySecureEmail@123.test',\n password: 'verySecurePassword123'\n }\n\n public static readonly validationMessages = {\n emptyLinkPicker: 'This field is required',\n invalidValue: 'Value is invalid, it does not match the correct pattern',\n unsupportInvariantContentItemWithVariantBlocks: 'One or more Block Types of this Block Editor is using a Element-Type that is configured to Vary By Culture or Vary By Segment. This is not supported on a Content item that does not vary by Culture or Segment.',\n emptyValue: 'Value cannot be empty',\n nullValue: 'Value cannot be null',\n invalidEmail: 'Invalid email'\n }\n\n public static readonly inputTypes = {\n general: 'input',\n tipTap: 'umb-input-tiptap'\n }\n\n public static readonly access = {\n denied: 'Access denied'\n }\n \n public static readonly approvedColorSettings = {\n 0: ['Include labels?', 'Displays colored field and a label for each color in the color picker, rather than just a colored field.'],\n 1: ['Colors', 'Add, remove or sort colors (and labels).'],\n }\n\n public static readonly checkboxListSettings = {\n 0: ['Add option', 'Add, remove or sort options for the list.']\n }\n\n public static readonly contentPickerSettings = {\n 0: ['Ignore user start nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],\n 1: ['Start node', '']\n }\n\n public static readonly datePickerSettings = {\n 0: ['Date format', 'If left empty then the format is YYYY-MM-DD'],\n //1: ['Offset time', \"When enabled the time displayed will be offset with the server's timezone, this is useful for scenarios like scheduled publishing when an editor is in a different timezone than the hosted server\"]\n }\n\n public static readonly dropdownSettings = {\n 0: ['Enable multiple choice', ''],\n 1: ['Add options', '']\n }\n\n public static readonly imageCropperSettings = {\n 0: ['Crop options', ''],\n }\n\n public static readonly mediaPickerSettings = {\n 0: ['Accepted types', 'Limit to specific types'],\n 1: ['Pick multiple items', 'Outputs a IEnumerable'],\n 2: ['Amount', 'Set a required range of medias'],\n 3: ['Start node', ''],\n 4: ['Enable Focal Point', ''],\n 5: ['Image Crops', 'Local crops, stored on document'],\n 6: ['Ignore User Start Nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],\n }\n\n public static readonly labelSettings = {\n 0: ['Value type', 'The type of value to store'],\n 1: ['Label template', 'Enter a template for the label.'],\n }\n\n public static readonly listViewSettings = {\n 0: ['Columns Displayed', 'The properties that will be displayed for each column.'],\n 1: ['Layouts', 'The properties that will be displayed for each column.'],\n 2: ['Order By', 'The default sort order for the Collection.'],\n 3: ['Order Direction', ''],\n 4: ['Page Size', 'Number of items per page.'],\n 5: ['Workspace View icon', \"The icon for the Collection's Workspace View.\"],\n 6: ['Workspace View name', \"The name of the Collection's Workspace View (default if empty: Child Items).\"],\n 7: ['Show Content Workspace View First', \"Enable this to show the Content Workspace View by default instead of the Collection's.\"],\n }\n\n public static readonly multiURLPickerSettings = {\n 0: ['Minimum number of items', ''],\n 1: ['Maximum number of items', ''],\n 2: ['Ignore user start nodes', 'Selecting this option allows a user to choose nodes that they normally dont have access to.'],\n 3: ['Overlay Size', 'Select the width of the overlay.'],\n 4: ['Hide anchor/query string input', 'Selecting this hides the anchor/query string input field in the link picker overlay.'],\n }\n\n public static readonly numericSettings = {\n 0: ['Minimum', 'Enter the minimum amount of number to be entered'],\n 1: ['Maximum', 'Enter the maximum amount of number to be entered'],\n 2: ['Step size', 'Enter the intervals amount between each step of number to be entered']\n }\n\n public static readonly radioboxSettings = {\n 0: ['Add option', 'Add, remove or sort options for the list.'],\n }\n\n public static readonly tagsSettings = {\n 0: ['Tag group', ''],\n 1: ['Storage Type', 'Select whether to store the tags in cache as JSON (default) or CSV format. Notice that CSV does not support commas in the tag value.']\n }\n\n public static readonly textareaSettings = {\n 0: ['Maximum allowed characters', 'If empty - no character limit'],\n 1: ['Number of rows', 'If empty or zero, the textarea is set to auto-height']\n }\n\n public static readonly textstringSettings = {\n 0: ['Maximum allowed characters', 'If empty, 512 character limit'],\n }\n\n public static readonly trueFalseSettings = {\n 0: ['Preset value', ''],\n 1: ['Show on/off labels', ''],\n 2: ['Label On', 'Displays text when enabled.'],\n 3: ['Label Off', 'Displays text when disabled.'],\n 4: ['Screen Reader Label', ''],\n }\n\n public static readonly uploadSettings = {\n 0: ['Accepted file extensions', ''],\n }\n\n public static readonly tipTapSettings = {\n 0: ['Capabilities', 'Choose which Tiptap extensions to enable.\\nOnce enabled, the related actions will be available for the toolbar and statusbar.'],\n 1: ['Toolbar', 'Design the available actions.\\nDrag and drop the available actions onto the toolbar.'],\n 2: ['Statusbar', 'Design the available statuses.\\nDrag and drop the available actions onto the statusbar areas.'],\n 3: ['Stylesheets', 'Pick the stylesheets whose editor styles should be available when editing.'],\n 4: ['Dimensions', 'Sets the fixed width and height of the editor. This excludes the toolbar and statusbar heights.'],\n 5: ['Maximum size for inserted images', 'Maximum width or height - enter 0 to disable resizing.'],\n 6: ['Overlay size', 'Select the width of the overlay (link picker).'],\n 7: ['Available Blocks', 'Define the available blocks.'],\n 8: ['Image Upload Folder', 'Choose the upload location of pasted images.'],\n 9: ['Ignore User Start Nodes', ''],\n }\n\n public static readonly tinyMCESettings = {\n 0: ['Toolbar', 'Pick the toolbar options that should be available when editing'],\n 1: ['Stylesheets', 'Pick the stylesheets whose editor styles should be available when editing'],\n 2: ['Dimensions', 'Set the editor dimensions'],\n 3: ['Maximum size for inserted images', 'Maximum width or height - enter 0 to disable resizing.'],\n 4: ['Mode', 'Select the mode for the editor'],\n 5: ['Available Blocks', 'Define the available blocks.'],\n 6: ['Overlay size', 'Select the width of the overlay (link picker).'],\n 7: ['Hide Label', ''],\n 8: ['Image Upload Folder', 'Choose the upload location of pasted images.'],\n 9: ['Ignore User Start Nodes', ''],\n }\n\n public static readonly userGroupAssignAccessSettings = {\n 0: ['Sections', 'Add sections to give users access'],\n 1: ['Languages', 'Limit the languages users have access to edit'],\n 2: ['Select content start node', 'Limit the content tree to a specific start node'],\n 3: ['Select media start node', 'Limit the media library to a specific start node']\n }\n\n public static readonly userGroupDefaultPermissionsSettings = {\n 0: ['General', ''],\n 1: ['Structure', ''],\n 2: ['Administration', ''],\n 3: ['Granular permissions', 'Assign permissions to specific documents'],\n }\n\n public static readonly userGroupGranularPermissionsSettings = {\n 0: ['General', ''],\n 1: ['Granular permissions', 'Assign permissions to Document property values'],\n }\n\n public static readonly userGroupPermissionsSettings = {\n 0: ['Read', 'Allow access to read a Document', 'Umb.Document.Read'],\n 1: ['Create Document Blueprint', 'Allow access to create a Document Blueprint', 'Umb.Document.CreateBlueprint'],\n 2: ['Delete', 'Allow access to delete a Document', 'Umb.Document.Delete'],\n 3: ['Create', 'Allow access to create a Document', 'Umb.Document.Create'],\n 4: ['Notifications', 'Allow access to setup notifications for Documents', 'Umb.Document.Notifications'],\n 5: ['Publish', 'Allow access to publish a Document', 'Umb.Document.Publish'],\n 6: ['Unpublish', 'Allow access to unpublish a Document', 'Umb.Document.Unpublish'],\n 7: ['Update', 'Allow access to save a Document', 'Umb.Document.Update'],\n 8: ['Duplicate', 'Allow access to copy a Document', 'Umb.Document.Duplicate'],\n 9: ['Move to', 'Allow access to move a Document', 'Umb.Document.Move'],\n 10: ['Sort children', 'Allow access to change the sort order for Documents', 'Umb.Document.Sort'],\n 11: ['Culture and Hostnames', 'Allow access to assign culture and hostnames', 'Umb.Document.CultureAndHostnames'],\n 12: ['Public Access', 'Allow access to set and change access restrictions for a Document', 'Umb.Document.PublicAccess'],\n 13: ['Rollback', 'Allow access to roll back a Document to a previous state', 'Umb.Document.Rollback']\n }\n\n public static readonly userGroupSectionsSettings = {\n 0: ['Content', 'Umb.Section.Content'],\n 1: ['Forms', 'Umb.Section.Forms'],\n 2: ['Media', 'Umb.Section.Media'],\n 3: ['Members', 'Umb.Section.Members'],\n 4: ['Packages', 'Umb.Section.Packages'],\n 5: ['Settings', 'Umb.Section.Settings'],\n 6: ['Translation', 'Umb.Section.Translation'],\n 7: ['Users', 'Umb.Section.Users'],\n }\n\n public static readonly trashDeleteDialogMessage = {\n referenceHeadline: 'The following items depend on this',\n bulkReferenceHeadline: 'The following items are used by other content.'\n }\n\n public static readonly webhookEvents = [\n {\n \"eventName\": \"Content Deleted\",\n \"eventType\": \"Content\",\n \"alias\": \"Umbraco.ContentDelete\"\n },\n {\n \"eventName\": \"Content Published\",\n \"eventType\": \"Content\",\n \"alias\": \"Umbraco.ContentPublish\"\n },\n {\n \"eventName\": \"Content Unpublished\",\n \"eventType\": \"Content\",\n \"alias\": \"Umbraco.ContentUnpublish\"\n },\n {\n \"eventName\": \"Media Deleted\",\n \"eventType\": \"Media\",\n \"alias\": \"Umbraco.MediaDelete\"\n },\n {\n \"eventName\": \"Media Saved\",\n \"eventType\": \"Media\",\n \"alias\": \"Umbraco.MediaSave\"\n }\n ]\n\n public static readonly dateTimeWithTimeZonePickerSetting = {\n 0: ['Time format', ''],\n 1: ['Time zones', 'Select the time zones that the editor should be able to pick from.']\n }\n}"]}
|