1 | import { AccessKey, Account, App, CollaboratorMap, Deployment, DeploymentMetrics, Headers, Package, PackageInfo, CodePushError } from "./types";
|
2 | declare class AccountManager {
|
3 | static AppPermission: {
|
4 | OWNER: string;
|
5 | COLLABORATOR: string;
|
6 | };
|
7 | private _accessKey;
|
8 | private _requestManager;
|
9 | private _adapter;
|
10 | private _fileUploadClient;
|
11 | constructor(accessKey: string, customHeaders?: Headers, serverUrl?: string, proxy?: string);
|
12 | get accessKey(): string;
|
13 | isAuthenticated(throwIfUnauthorized?: boolean): Promise<boolean>;
|
14 | addAccessKey(friendlyName: string, ttl?: number): Promise<AccessKey>;
|
15 | getAccessKeys(): Promise<AccessKey[]>;
|
16 | removeAccessKey(name: string): Promise<void>;
|
17 | getAccountInfo(): Promise<Account>;
|
18 | getApps(): Promise<App[]>;
|
19 | getApp(appName: string): Promise<App>;
|
20 | addApp(appName: string, appOs: string, appPlatform: string, manuallyProvisionDeployments?: boolean): Promise<App>;
|
21 | removeApp(appName: string): Promise<void>;
|
22 | renameApp(oldAppName: string, newAppName: string): Promise<void>;
|
23 | transferApp(appName: string, orgName: string): Promise<void>;
|
24 | getCollaborators(appName: string): Promise<CollaboratorMap>;
|
25 | addCollaborator(appName: string, email: string): Promise<void>;
|
26 | removeCollaborator(appName: string, email: string): Promise<void>;
|
27 | addDeployment(appName: string, deploymentName: string): Promise<Deployment>;
|
28 | clearDeploymentHistory(appName: string, deploymentName: string): Promise<void>;
|
29 | getDeployments(appName: string): Promise<Deployment[]>;
|
30 | getDeployment(appName: string, deploymentName: string): Promise<Deployment>;
|
31 | renameDeployment(appName: string, oldDeploymentName: string, newDeploymentName: string): Promise<void>;
|
32 | removeDeployment(appName: string, deploymentName: string): Promise<void>;
|
33 | getDeploymentMetrics(appName: string, deploymentName: string): Promise<DeploymentMetrics>;
|
34 | getDeploymentHistory(appName: string, deploymentName: string): Promise<Package[]>;
|
35 | release(appName: string, deploymentName: string, filePath: string, targetBinaryVersion: string, updateMetadata: PackageInfo, uploadProgressCallback?: (progress: number) => void): Promise<Package>;
|
36 | patchRelease(appName: string, deploymentName: string, label: string, updateMetadata: PackageInfo): Promise<void>;
|
37 | promote(appName: string, sourceDeploymentName: string, destinationDeploymentName: string, updateMetadata: PackageInfo): Promise<Package>;
|
38 | rollback(appName: string, deploymentName: string, targetRelease?: string): Promise<void>;
|
39 | getAccessKey(accessKeyName: string): CodePushError;
|
40 | getSessions(): CodePushError;
|
41 | patchAccessKey(oldName: string, newName?: string, ttl?: number): CodePushError;
|
42 | removeSession(machineName: string): CodePushError;
|
43 | private packageFileFromPath;
|
44 | private generateRandomFilename;
|
45 | private getDeprecatedMethodError;
|
46 | }
|
47 | export = AccountManager;
|