Skip to content

Commit

Permalink
feat: reflected changes to message contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
jbristowe committed Jun 22, 2022
1 parent 89ed6c5 commit 1c72122
Showing 1 changed file with 12 additions and 24 deletions.
36 changes: 12 additions & 24 deletions src/repositories/buildInformationRepository.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type { OctopusPackageVersionBuildInformationMappedResource } from "@octopusdeploy/message-contracts";
import type { NewOctopusPackageVersionBuildInformationResource, OctopusPackageVersionBuildInformationMappedResource } from "@octopusdeploy/message-contracts";
import type { Client } from "../client";
import type { AllArgs } from "./basicRepository";
import { BasicRepository, ListArgs } from "./basicRepository";
import type { Client } from "../client";
import {OverwriteMode} from "./packageRepository";
import {CommitDetail} from "@octopusdeploy/message-contracts/dist/commitDetail";
import { OverwriteMode } from "./packageRepository";

export type BuildInformationListArgs = {
filter?: string;
Expand All @@ -15,32 +14,21 @@ type BuildInformationGetArgs = {};

export type BuildInformationCreateArgs = {
overwriteMode?: OverwriteMode;
}

export interface NewOctopusPackageVersionBuildInformationResource
{
PackageId: string,
Version: string,
OctopusBuildInformation: OctopusBuildInformationResource,
};

export interface OctopusBuildInformationResource {
Branch: string;
BuildEnvironment: string;
BuildNumber: string;
BuildUrl: string;
Commits: Omit<CommitDetail, "LinkUrl">[];
VcsCommitNumber: string;
VcsType: string;
VcsRoot: string;
}

export class BuildInformationRepository extends BasicRepository<OctopusPackageVersionBuildInformationMappedResource, NewOctopusPackageVersionBuildInformationResource, BuildInformationListArgs, AllArgs, BuildInformationGetArgs, BuildInformationCreateArgs> {
export class BuildInformationRepository extends BasicRepository<
OctopusPackageVersionBuildInformationMappedResource,
NewOctopusPackageVersionBuildInformationResource,
BuildInformationListArgs,
AllArgs,
BuildInformationGetArgs,
BuildInformationCreateArgs
> {
constructor(client: Client) {
super("BuildInformation", client);
}

deleteMany(ids: string[]) {
return this.client.del(this.client.getLink("BuildInformationBulk"), null, { ids });
}
}
}

0 comments on commit 1c72122

Please sign in to comment.