From c3650ce9e1db6c35953d954e4b2f771df9e37b1c Mon Sep 17 00:00:00 2001 From: Tahar Mustapha <134401020+mtmustapha-coveo@users.noreply.github.com> Date: Fri, 27 Sep 2024 10:50:27 -0400 Subject: [PATCH] Revert "feat(TSP-414): add listByProject endpoint to platform client" (#864) Revert "feat(TSP-414): add listByProject endpoint to platform client (#858)" This reverts commit fe32d5439eaff8463a4055312964a695cd16b36b. --- .../InProductExperiences/InProductExperiences.ts | 7 ------- .../InProductExperiencesInterfaces.ts | 3 --- .../tests/InProductExperiences.spec.ts | 8 -------- src/resources/Projects/ProjectInterfaces.ts | 14 -------------- 4 files changed, 32 deletions(-) diff --git a/src/resources/InProductExperiences/InProductExperiences.ts b/src/resources/InProductExperiences/InProductExperiences.ts index 8f7f54262..0a8f2fefc 100644 --- a/src/resources/InProductExperiences/InProductExperiences.ts +++ b/src/resources/InProductExperiences/InProductExperiences.ts @@ -7,7 +7,6 @@ import { UpdateInProductExperienceModel, InProductExperienceLoader, CreateInProductExperienceResponse, - InProductExperienceProjectsModel, } from './InProductExperiencesInterfaces.js'; /** @@ -45,12 +44,6 @@ export default class InProductExperiences extends Resource { return this.api.get(this.buildPath(`${InProductExperiences.ipxBaseUrl}s`, {name})); } - listByProject(projectId?: string) { - return this.api.get( - this.buildPath(`${InProductExperiences.ipxBaseUrl}s/projectid`, {projectid: projectId}), - ); - } - getLoader(ipxId: string, access_token?: string) { return this.api.get( this.buildPath(`${InProductExperiences.baseUrl}/${ipxId}/inappwidget/loader`, {access_token}), diff --git a/src/resources/InProductExperiences/InProductExperiencesInterfaces.ts b/src/resources/InProductExperiences/InProductExperiencesInterfaces.ts index c31894cdb..ca0c0cdca 100644 --- a/src/resources/InProductExperiences/InProductExperiencesInterfaces.ts +++ b/src/resources/InProductExperiences/InProductExperiencesInterfaces.ts @@ -1,4 +1,3 @@ -import {ProjectResourceModel} from '../Projects/ProjectInterfaces.js'; import {RestTokenParams} from '../Search/index.js'; import {CSSResourceModel, JavaScriptResourceModel} from '../SearchPages/index.js'; @@ -85,8 +84,6 @@ export interface InProductExperienceModel extends SharedInProductExperienceModel token: RestTokenParams; } -export interface InProductExperienceProjectsModel extends InProductExperienceModel, ProjectResourceModel {} - export interface CreateUpdateInProductExperienceModel extends SharedInProductExperienceModel { /** * The CSS classes of the button. diff --git a/src/resources/InProductExperiences/tests/InProductExperiences.spec.ts b/src/resources/InProductExperiences/tests/InProductExperiences.spec.ts index a87aeee33..24a5ac723 100644 --- a/src/resources/InProductExperiences/tests/InProductExperiences.spec.ts +++ b/src/resources/InProductExperiences/tests/InProductExperiences.spec.ts @@ -25,14 +25,6 @@ describe('InProductExperiences', () => { }); }); - describe('listByProject', () => { - it('should make a GET call to the specific Project In-Product Experiences url', async () => { - await ipxService.listByProject(); - expect(api.get).toHaveBeenCalledTimes(1); - expect(api.get).toHaveBeenCalledWith(`${InProductExperiences.ipxBaseUrl}s/projectid`); - }); - }); - describe('create', () => { it('should make a POST call to the In-Product Experiences base url', () => { const ipxModel: CreateInProductExperienceModel = { diff --git a/src/resources/Projects/ProjectInterfaces.ts b/src/resources/Projects/ProjectInterfaces.ts index a1204107f..5a11a98d5 100644 --- a/src/resources/Projects/ProjectInterfaces.ts +++ b/src/resources/Projects/ProjectInterfaces.ts @@ -160,17 +160,3 @@ export interface UpdatedProjectResourceAssociationsModel { */ removals: UpdatedProjectAssociationsModel; } - -export interface ListResourceByProjectParams { - /** - * Project identifier for which resources are to be fetched - */ - projectId: string; -} - -export interface ProjectResourceModel { - /** - * Ids of projects associated to this resource - */ - projectIds: string[]; -}