Skip to content

Commit

Permalink
Revert "feat(TSP-414): add listByProject endpoint to platform client" (
Browse files Browse the repository at this point in the history
…#864)

Revert "feat(TSP-414): add listByProject endpoint to platform client (#858)"

This reverts commit fe32d54.
  • Loading branch information
mtmustapha-coveo authored Sep 27, 2024
1 parent 729492b commit c3650ce
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 32 deletions.
7 changes: 0 additions & 7 deletions src/resources/InProductExperiences/InProductExperiences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
UpdateInProductExperienceModel,
InProductExperienceLoader,
CreateInProductExperienceResponse,
InProductExperienceProjectsModel,
} from './InProductExperiencesInterfaces.js';

/**
Expand Down Expand Up @@ -45,12 +44,6 @@ export default class InProductExperiences extends Resource {
return this.api.get<InProductExperienceModel[]>(this.buildPath(`${InProductExperiences.ipxBaseUrl}s`, {name}));
}

listByProject(projectId?: string) {
return this.api.get<InProductExperienceProjectsModel[]>(
this.buildPath(`${InProductExperiences.ipxBaseUrl}s/projectid`, {projectid: projectId}),
);
}

getLoader(ipxId: string, access_token?: string) {
return this.api.get<InProductExperienceLoader>(
this.buildPath(`${InProductExperiences.baseUrl}/${ipxId}/inappwidget/loader`, {access_token}),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import {ProjectResourceModel} from '../Projects/ProjectInterfaces.js';
import {RestTokenParams} from '../Search/index.js';
import {CSSResourceModel, JavaScriptResourceModel} from '../SearchPages/index.js';

Expand Down Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
14 changes: 0 additions & 14 deletions src/resources/Projects/ProjectInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[];
}

0 comments on commit c3650ce

Please sign in to comment.