bintray.d.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. import { CancellationToken } from "./CancellationToken";
  2. import { HttpExecutor, RequestHeaders } from "./httpExecutor";
  3. import { BintrayOptions } from "./publishOptions";
  4. export interface Version {
  5. readonly name: string;
  6. readonly package: string;
  7. }
  8. export interface File {
  9. name: string;
  10. path: string;
  11. sha1: string;
  12. sha256: string;
  13. }
  14. export declare class BintrayClient {
  15. private readonly httpExecutor;
  16. private readonly cancellationToken;
  17. private readonly basePath;
  18. readonly auth: string | null;
  19. readonly repo: string;
  20. readonly owner: string;
  21. readonly user: string;
  22. readonly component: string | null;
  23. readonly distribution: string | null;
  24. readonly packageName: string;
  25. private requestHeaders;
  26. setRequestHeaders(value: RequestHeaders | null): void;
  27. constructor(options: BintrayOptions, httpExecutor: HttpExecutor<any>, cancellationToken: CancellationToken, apiKey?: string | null);
  28. private bintrayRequest<T>(path, auth, data, cancellationToken, method?);
  29. getVersion(version: string): Promise<Version>;
  30. getVersionFiles(version: string): Promise<Array<File>>;
  31. createVersion(version: string): Promise<any>;
  32. deleteVersion(version: string): Promise<any>;
  33. }