Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 10 commits into from
Sep 26, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ export interface ListHostedInterfacesParams extends Paginated {
perPage?: number;
}

export interface ListHostedInterfacesByProjectParams extends ListHostedInterfacesParams {
mtmustapha-coveo marked this conversation as resolved.
Show resolved Hide resolved
/**
* The project for which the interfaces should be fetched
*/
projectId?: string;
mtmustapha-coveo marked this conversation as resolved.
Show resolved Hide resolved
}

export interface HostedInterfaceResultTemplate {
/**
* The name of the result template.
Expand All @@ -146,6 +153,10 @@ export interface HostedInterfaceResultTemplate {
* The metadata details to display.
*/
details: HostedInterfaceResultTemplateDetail[];
/**
* The project ids associated with interface
*/
projectIds: string[];
mtmustapha-coveo marked this conversation as resolved.
Show resolved Hide resolved
}

export interface HostedInterfaceConfiguration {
Expand Down
6 changes: 6 additions & 0 deletions src/resources/InProductExperiences/InProductExperiences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ export default class InProductExperiences extends Resource {
return this.api.get<InProductExperienceModel[]>(this.buildPath(`${InProductExperiences.ipxBaseUrl}s`, {name}));
}

listByProject(projectid?: string) {
mtmustapha-coveo marked this conversation as resolved.
Show resolved Hide resolved
return this.api.get<InProductExperienceModel[]>(
this.buildPath(`${InProductExperiences.ipxBaseUrl}s/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
Expand Up @@ -81,6 +81,11 @@ export interface InProductExperienceModel extends SharedInProductExperienceModel
*/
orgId: string;

/**
* The projects to which this widget is associated to
*/
projectIds: string[];

token: RestTokenParams;
}

Expand Down
Loading