diff --git a/src/Umbraco.Web.UI.Client/libs/repository/detail-repository.interface.ts b/src/Umbraco.Web.UI.Client/libs/repository/detail-repository.interface.ts index b228dc0c30..25a3cd332b 100644 --- a/src/Umbraco.Web.UI.Client/libs/repository/detail-repository.interface.ts +++ b/src/Umbraco.Web.UI.Client/libs/repository/detail-repository.interface.ts @@ -19,7 +19,7 @@ export interface UmbDetailRepository { error?: ProblemDetailsModel; }>; - delete(key: string): Promise<{ + delete(id: string): Promise<{ error?: ProblemDetailsModel; }>; } diff --git a/src/Umbraco.Web.UI.Client/libs/repository/folder-repository.interface.ts b/src/Umbraco.Web.UI.Client/libs/repository/folder-repository.interface.ts index 5e1a016fdb..3d9559bb2b 100644 --- a/src/Umbraco.Web.UI.Client/libs/repository/folder-repository.interface.ts +++ b/src/Umbraco.Web.UI.Client/libs/repository/folder-repository.interface.ts @@ -29,7 +29,7 @@ export interface UmbFolderRepository { error?: ProblemDetailsModel; }>; - deleteFolder(key: string): Promise<{ + deleteFolder(id: string): Promise<{ error?: ProblemDetailsModel; }>; } diff --git a/src/Umbraco.Web.UI.Client/libs/store/file-system-tree.store.ts b/src/Umbraco.Web.UI.Client/libs/store/file-system-tree.store.ts index 384ff4d883..8afa8ca62e 100644 --- a/src/Umbraco.Web.UI.Client/libs/store/file-system-tree.store.ts +++ b/src/Umbraco.Web.UI.Client/libs/store/file-system-tree.store.ts @@ -27,7 +27,7 @@ export class UmbFileSystemTreeStore extends UmbStoreBase implements UmbTreeStore * @memberof UmbFileSystemTreeStore */ updateItem(path: string, data: Partial) { - this.#data.appendOne(data) + this.#data.appendOne(data); } /** @@ -56,7 +56,7 @@ export class UmbFileSystemTreeStore extends UmbStoreBase implements UmbTreeStore } /** - * Returns an observable to observe the items with the given keys + * Returns an observable to observe the items with the given ids * @param {Array} paths * @return {*} * @memberof UmbFileSystemTreeStore diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/documents/dashboards/redirect-management/dashboard-redirect-management.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/documents/dashboards/redirect-management/dashboard-redirect-management.element.ts index 5f7fcff78e..8e7de5f464 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/documents/dashboards/redirect-management/dashboard-redirect-management.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/documents/dashboards/redirect-management/dashboard-redirect-management.element.ts @@ -293,7 +293,7 @@ export class UmbDashboardRedirectManagementElement extends UmbLitElement { Actions ${this._redirectData?.map((data) => { - return html` + return html` ${data.culture || '*'} ${data.originalUrl} diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/documents/document-blueprints/document-blueprint.detail.store.ts b/src/Umbraco.Web.UI.Client/src/backoffice/documents/document-blueprints/document-blueprint.detail.store.ts index 411f7d7768..f60b478a36 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/documents/document-blueprints/document-blueprint.detail.store.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/documents/document-blueprints/document-blueprint.detail.store.ts @@ -19,20 +19,20 @@ export class UmbDocumentBlueprintStore extends UmbStoreBase { } /** - * @description - Request a Data Type by key. The Data Type is added to the store and is returned as an Observable. - * @param {string} key + * @description - Request a Data Type by id. The Data Type is added to the store and is returned as an Observable. + * @param {string} id * @return {*} {(Observable)} * @memberof UmbDocumentBlueprintStore */ - getByKey(key: string) { + getById(id: string) { // TODO: use backend cli when available. - fetch(`/umbraco/management/api/v1/document-blueprint/details/${key}`) + fetch(`/umbraco/management/api/v1/document-blueprint/details/${id}`) .then((res) => res.json()) .then((data) => { this.#data.append(data); }); - return this.#data.getObservablePart((documents) => documents.find((document) => document.id === key)); + return this.#data.getObservablePart((documents) => documents.find((document) => document.id === id)); } getScaffold(entityType: string, parentId: string | null) { @@ -75,7 +75,7 @@ export class UmbDocumentBlueprintStore extends UmbStoreBase { // TODO: How can we avoid having this in both stores? /** * @description - Delete a Data Type. - * @param {string[]} keys + * @param {string[]} ids * @memberof UmbDocumentBlueprintStore * @return {*} {Promise} */ diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/documents/document-types/repository/sources/document-type.tree.server.data.ts b/src/Umbraco.Web.UI.Client/src/backoffice/documents/document-types/repository/sources/document-type.tree.server.data.ts index 7ea0b4bb81..7447fcad49 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/documents/document-types/repository/sources/document-type.tree.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/documents/document-types/repository/sources/document-type.tree.server.data.ts @@ -33,7 +33,7 @@ export class DocumentTypeTreeServerDataSource implements UmbTreeDataSource { this.#host, fetch('/umbraco/management/api/v1/document-type/move', { method: 'POST', - body: JSON.stringify({ keys: ids, destination }), + body: JSON.stringify({ ids: ids, destination }), headers: { 'Content-Type': 'application/json', }, @@ -60,14 +60,14 @@ export class DocumentTypeTreeServerDataSource implements UmbTreeDataSource { } /** - * Fetches the children of a given parent key from the server + * Fetches the children of a given parent id from the server * @param {(string | null)} parentId * @return {*} * @memberof DocumentTreeServerDataSource */ async getChildrenOf(parentId: string | null) { if (!parentId) { - const error: ProblemDetailsModel = { title: 'Parent key is missing' }; + const error: ProblemDetailsModel = { title: 'Parent id is missing' }; return { error }; } @@ -80,7 +80,7 @@ export class DocumentTypeTreeServerDataSource implements UmbTreeDataSource { } /** - * Fetches the items for the given keys from the server + * Fetches the items for the given ids from the server * @param {Array} ids * @return {*} * @memberof DocumentTreeServerDataSource diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/repository/sources/document.tree.server.data.ts b/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/repository/sources/document.tree.server.data.ts index 73ab968e2a..dcd3ec9ffa 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/repository/sources/document.tree.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/repository/sources/document.tree.server.data.ts @@ -60,7 +60,7 @@ export class DocumentTreeServerDataSource implements UmbTreeDataSource { } /** - * Fetches the children of a given parent key from the server + * Fetches the children of a given parent id from the server * @param {(string | null)} parentId * @return {*} * @memberof DocumentTreeServerDataSource @@ -80,8 +80,8 @@ export class DocumentTreeServerDataSource implements UmbTreeDataSource { } /** - * Fetches the items for the given keys from the server - * @param {Array} keys + * Fetches the items for the given ids from the server + * @param {Array} ids * @return {*} * @memberof DocumentTreeServerDataSource */ diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/repository/sources/index.ts b/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/repository/sources/index.ts index a00ee540ff..8cbe1ec6d5 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/repository/sources/index.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/documents/documents/repository/sources/index.ts @@ -3,5 +3,5 @@ import { UmbDataSource, DataSourceResponse } from '@umbraco-cms/backoffice/repos export interface UmbDocumentDataSource extends UmbDataSource { createScaffold(documentTypeKey: string): Promise>; - trash(key: string): Promise>; + trash(id: string): Promise>; } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/media-type.repository.ts b/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/media-type.repository.ts index 9d697ec22f..898e1ab966 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/media-type.repository.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/media-type.repository.ts @@ -60,7 +60,7 @@ export class UmbMediaTypeRepository implements UmbTreeRepository { await this.#init; if (!parentId) { - const error: ProblemDetailsModel = { title: 'Parent key is missing' }; + const error: ProblemDetailsModel = { title: 'Parent id is missing' }; return { data: undefined, error }; } @@ -111,10 +111,10 @@ export class UmbMediaTypeRepository implements UmbTreeRepository { async requestDetails(id: string) { await this.#init; - // TODO: should we show a notification if the key is missing? + // TODO: should we show a notification if the id is missing? // Investigate what is best for Acceptance testing, cause in that perspective a thrown error might be the best choice? if (!id) { - const error: ProblemDetailsModel = { title: 'Key is missing' }; + const error: ProblemDetailsModel = { title: 'Id is missing' }; return { error }; } const { data, error } = await this.#detailSource.get(id); diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.detail.server.data.ts b/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.detail.server.data.ts index f1e92f0202..701b0dcf21 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.detail.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.detail.server.data.ts @@ -31,15 +31,15 @@ export class UmbMediaTypeDetailServerDataSource implements MediaTypeDetailDataSo } /** - * @description - Fetches a MediaType with the given key from the server - * @param {string} key + * @description - Fetches a MediaType with the given id from the server + * @param {string} id * @return {*} * @memberof UmbMediaTypeDetailServerDataSource */ - get(key: string) { - //return tryExecuteAndNotify(this.#host, MediaTypeResource.getMediaTypeByKey({ key })) as any; + get(id: string) { + //return tryExecuteAndNotify(this.#host, MediaTypeResource.getMediaTypeByKey({ id })) as any; // TODO: use backend cli when available. - return tryExecuteAndNotify(this.#host, fetch(`/umbraco/management/api/v1/media-type/${key}`)) as any; + return tryExecuteAndNotify(this.#host, fetch(`/umbraco/management/api/v1/media-type/${id}`)) as any; } /** @@ -50,11 +50,11 @@ export class UmbMediaTypeDetailServerDataSource implements MediaTypeDetailDataSo */ async update(mediaType: MediaTypeDetails) { if (!mediaType.id) { - const error: ProblemDetailsModel = { title: 'MediaType key is missing' }; + const error: ProblemDetailsModel = { title: 'MediaType id is missing' }; return { error }; } - const payload = { key: mediaType.id, requestBody: mediaType }; + const payload = { id: mediaType.id, requestBody: mediaType }; //return tryExecuteAndNotify(this.#host, MediaTypeResource.putMediaTypeByKey(payload)); // TODO: use backend cli when available. @@ -93,21 +93,21 @@ export class UmbMediaTypeDetailServerDataSource implements MediaTypeDetailDataSo /** * @description - Deletes a MediaType on the server - * @param {string} key + * @param {string} id * @return {*} * @memberof UmbMediaTypeDetailServerDataSource */ - async delete(key: string) { - if (!key) { + async delete(id: string) { + if (!id) { const error: ProblemDetailsModel = { title: 'Key is missing' }; return { error }; } - //return await tryExecuteAndNotify(this.#host, MediaTypeResource.deleteMediaTypeByKey({ key })); + //return await tryExecuteAndNotify(this.#host, MediaTypeResource.deleteMediaTypeByKey({ id })); // TODO: use backend cli when available. return tryExecuteAndNotify( this.#host, - fetch(`/umbraco/management/api/v1/media-type/${key}`, { + fetch(`/umbraco/management/api/v1/media-type/${id}`, { method: 'DELETE', }) ) as any; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.details.server.data.interface.ts b/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.details.server.data.interface.ts index e1a682c55e..7da7f1a9b2 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.details.server.data.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.details.server.data.interface.ts @@ -4,8 +4,8 @@ import type { DataSourceResponse } from '@umbraco-cms/backoffice/repository'; // TODO => Use models when they exist export interface MediaTypeDetailDataSource { createScaffold(parentId: string): Promise>; - get(key: string): Promise>; + get(id: string): Promise>; insert(data: any): Promise; update(data: any): Promise; - delete(key: string): Promise; + delete(id: string): Promise; } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.tree.server.data.ts b/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.tree.server.data.ts index 5cfcd81ab2..c66dc1b224 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.tree.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/media/media-types/repository/sources/media-type.tree.server.data.ts @@ -31,14 +31,14 @@ export class MediaTypeTreeServerDataSource implements UmbTreeDataSource { } /** - * Fetches the children of a given parent key from the server + * Fetches the children of a given parent id from the server * @param {(string | null)} parentId * @return {*} * @memberof MediaTypeTreeServerDataSource */ async getChildrenOf(parentId: string | null) { if (!parentId) { - const error: ProblemDetailsModel = { title: 'Parent key is missing' }; + const error: ProblemDetailsModel = { title: 'Parent id is missing' }; return { error }; } @@ -51,8 +51,8 @@ export class MediaTypeTreeServerDataSource implements UmbTreeDataSource { } /** - * Fetches the items for the given keys from the server - * @param {Array} keys + * Fetches the items for the given ids from the server + * @param {Array} ids * @return {*} * @memberof MediaTypeTreeServerDataSource */ diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/media/media/repository/sources/media.tree.server.data.ts b/src/Umbraco.Web.UI.Client/src/backoffice/media/media/repository/sources/media.tree.server.data.ts index e88386baf2..096d2b2814 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/media/media/repository/sources/media.tree.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/media/media/repository/sources/media.tree.server.data.ts @@ -60,14 +60,14 @@ export class MediaTreeServerDataSource implements UmbTreeDataSource { } /** - * Fetches the children of a given parent key from the server + * Fetches the children of a given parent id from the server * @param {(string | null)} parentId * @return {*} * @memberof MediaTreeServerDataSource */ async getChildrenOf(parentId: string | null) { if (!parentId) { - const error: ProblemDetailsModel = { title: 'Parent key is missing' }; + const error: ProblemDetailsModel = { title: 'Parent id is missing' }; return { error }; } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/repository/member-group.repository.ts b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/repository/member-group.repository.ts index 9a463fa34f..e6b95a05b6 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/repository/member-group.repository.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/repository/member-group.repository.ts @@ -97,10 +97,10 @@ export class UmbMemberGroupRepository implements UmbTreeRepository, UmbDetailRep async requestById(id: string) { await this.#init; - // TODO: should we show a notification if the key is missing? + // TODO: should we show a notification if the id is missing? // Investigate what is best for Acceptance testing, cause in that perspective a thrown error might be the best choice? if (!id) { - const error: ProblemDetailsModel = { title: 'Key is missing' }; + const error: ProblemDetailsModel = { title: 'Id is missing' }; return { error }; } const { data, error } = await this.#detailSource.get(id); diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/repository/sources/member-group.detail.server.data.ts b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/repository/sources/member-group.detail.server.data.ts index 223f4b443a..11503e3873 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/repository/sources/member-group.detail.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-groups/repository/sources/member-group.detail.server.data.ts @@ -32,15 +32,15 @@ export class UmbMemberGroupDetailServerDataSource implements UmbDataSource} keys + * Fetches the items for the given ids from the server + * @param {Array} ids * @return {*} * @memberof MemberGroupTreeServerDataSource */ diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/repository/sources/member-type.detail.server.data.ts b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/repository/sources/member-type.detail.server.data.ts index 6a13f71f39..a5cb2f1c9e 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/repository/sources/member-type.detail.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/repository/sources/member-type.detail.server.data.ts @@ -28,15 +28,15 @@ export class UmbMemberTypeDetailServerDataSource implements UmbDetailRepository< } /** - * @description - Fetches a MemberType with the given key from the server - * @param {string} key + * @description - Fetches a MemberType with the given id from the server + * @param {string} id * @return {*} * @memberof UmbMemberTypeDetailServerDataSource */ - requestById(key: string) { - //return tryExecuteAndNotify(this.#host, MemberTypeResource.getMemberTypeByKey({ key })); + requestById(id: string) { + //return tryExecuteAndNotify(this.#host, MemberTypeResource.getMemberTypeByKey({ id })); // TODO => use backend cli when available. - return tryExecuteAndNotify(this.#host, fetch(`/umbraco/management/api/v1/member-group/${key}`)) as any; + return tryExecuteAndNotify(this.#host, fetch(`/umbraco/management/api/v1/member-group/${id}`)) as any; } /** @@ -47,11 +47,11 @@ export class UmbMemberTypeDetailServerDataSource implements UmbDetailRepository< */ async save(memberType: MemberTypeDetails) { if (!memberType.id) { - const error: ProblemDetailsModel = { title: 'MemberType key is missing' }; + const error: ProblemDetailsModel = { title: 'MemberType id is missing' }; return { error }; } - const payload = { key: memberType.id, requestBody: memberType }; + const payload = { id: memberType.id, requestBody: memberType }; //return tryExecuteAndNotify(this.#host, MemberTypeResource.putMemberTypeByKey(payload)); // TODO => use backend cli when available. @@ -94,21 +94,21 @@ export class UmbMemberTypeDetailServerDataSource implements UmbDetailRepository< /** * @description - Deletes a MemberType on the server - * @param {string} key + * @param {string} id * @return {*} * @memberof UmbMemberTypeDetailServerDataSource */ - async delete(key: string) { - if (!key) { + async delete(id: string) { + if (!id) { const error: ProblemDetailsModel = { title: 'Key is missing' }; return { error }; } - //return await tryExecuteAndNotify(this.#host, MemberTypeResource.deleteMemberTypeByKey({ key })); + //return await tryExecuteAndNotify(this.#host, MemberTypeResource.deleteMemberTypeByKey({ id })); // TODO => use backend cli when available. return tryExecuteAndNotify( this.#host, - fetch(`/umbraco/management/api/v1/member-type/${key}`, { + fetch(`/umbraco/management/api/v1/member-type/${id}`, { method: 'DELETE', }) ) as any; diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/repository/sources/member-type.tree.server.data.ts b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/repository/sources/member-type.tree.server.data.ts index a8e5ae1e6e..7ec6a36505 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/repository/sources/member-type.tree.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/members/member-types/repository/sources/member-type.tree.server.data.ts @@ -31,7 +31,7 @@ export class MemberTypeTreeServerDataSource implements UmbTreeDataSource { } /** - * Fetches the children of a given parent key from the server + * Fetches the children of a given parent id from the server * @param {(string | null)} parentId * @return {*} * @memberof MemberTypeTreeServerDataSource @@ -42,8 +42,8 @@ export class MemberTypeTreeServerDataSource implements UmbTreeDataSource { } /** - * Fetches the items for the given keys from the server - * @param {Array} keys + * Fetches the items for the given ids from the server + * @param {Array} ids * @return {*} * @memberof MemberTypeTreeServerDataSource */ diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/members/members/repository/sources/index.ts b/src/Umbraco.Web.UI.Client/src/backoffice/members/members/repository/sources/index.ts index c327035dfc..2b26859baf 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/members/members/repository/sources/index.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/members/members/repository/sources/index.ts @@ -6,5 +6,5 @@ import type { export interface MemberTreeDataSource { getRootItems(): Promise>; - getItems(key: Array): Promise>; + getItems(id: Array): Promise>; } diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/members/members/repository/sources/member.tree.server.data.ts b/src/Umbraco.Web.UI.Client/src/backoffice/members/members/repository/sources/member.tree.server.data.ts index b61ee911bf..b386fb52e2 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/members/members/repository/sources/member.tree.server.data.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/members/members/repository/sources/member.tree.server.data.ts @@ -33,8 +33,8 @@ export class MemberTreeServerDataSource implements MemberTreeDataSource { } /** - * Fetches the items for the given keys from the server - * @param {Array} keys + * Fetches the items for the given ids from the server + * @param {Array} ids * @return {*} * @memberof MemberTreeServerDataSource */ diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/members/members/workspace/member-workspace.context.ts b/src/Umbraco.Web.UI.Client/src/backoffice/members/members/workspace/member-workspace.context.ts index 3e9ca61b6a..3edd6f8b1e 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/members/members/workspace/member-workspace.context.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/members/members/workspace/member-workspace.context.ts @@ -28,8 +28,8 @@ export class UmbMemberWorkspaceContext console.log('save'); } - async load(key: string) { - console.log('load', key); + async load(id: string) { + console.log('load', id); } public destroy(): void {