Skip to content

Commit

Permalink
feat(pipelines): add new interface for get single pipeline (#818)
Browse files Browse the repository at this point in the history
* feat(pipelines): add new interface for get single pipeline

* feat(pipelines): add new interface for get single pipeline

* feat(pipelines): fix dep review

* feat(pipelines): fix dep review

* feat(pipelines): fix dep review

* feat(pipelines): fix dep review
  • Loading branch information
aboissinot-coveo authored May 8, 2024
1 parent 6a1af6f commit cbe1084
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ jobs:
with:
public: true
distributed: true
base-ref: ${{ github.event.pull_request.base.sha || 'master' }}
head-ref: ${{ github.event.pull_request.head.sha || github.ref_name }}
3 changes: 2 additions & 1 deletion src/resources/Pipelines/Pipelines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
ListPipelinesOptions,
ListPipelinesReturnVariant,
NewPipelineModel,
PipelineDetailedModel,
PipelineModel,
UpdatePipelineModel,
} from './PipelinesInterfaces.js';
Expand Down Expand Up @@ -47,7 +48,7 @@ export default class Pipelines extends Resource {
}

get(pipelineId: string) {
return this.api.get<PipelineModel>(
return this.api.get<PipelineDetailedModel>(
this.buildPath(`${Pipelines.searchUrlVersion1}/${pipelineId}`, {
organizationId: this.api.organizationId,
}),
Expand Down
11 changes: 11 additions & 0 deletions src/resources/Pipelines/PipelinesInterfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,17 @@ export interface PipelineModel extends PipelineShared {
};
}

export interface PipelineDetailedModel extends PipelineModel {
/**
* The unique identifier of query pipeline A in the A/B test.
*
* See also the splitTestName, splitTestRatio, and splitTestEnabled properties
*
* @example: '22a3860e-fa6f-4e64-a9f1-ef738af0786e'
*/
splitTestOriginalPipeline?: string;
}

export interface NewPipelineModel extends PipelineShared, GranularResource {}
export interface UpdatePipelineModel extends PipelineModel, GranularResource {}

Expand Down

0 comments on commit cbe1084

Please sign in to comment.