@hubspot/local-dev-lib 3.0.0-beta.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/appsDev.d.ts +5 -5
- package/api/customObjects.d.ts +7 -7
- package/api/designManager.d.ts +3 -4
- package/api/developerTestAccounts.d.ts +5 -5
- package/api/fileManager.d.ts +5 -5
- package/api/fileMapper.d.ts +9 -8
- package/api/fileTransport.d.ts +4 -4
- package/api/functions.d.ts +6 -7
- package/api/github.d.ts +6 -6
- package/api/hubdb.d.ts +10 -11
- package/api/lighthouseScore.d.ts +4 -5
- package/api/localDevAuth.d.ts +4 -4
- package/api/marketplaceValidation.d.ts +4 -5
- package/api/projects.d.ts +28 -29
- package/api/sandboxHubs.d.ts +4 -3
- package/api/sandboxSync.d.ts +3 -3
- package/api/sandboxSync.js +1 -1
- package/api/secrets.d.ts +5 -5
- package/api/validateHubl.d.ts +2 -2
- package/http/index.d.ts +6 -6
- package/http/unauthed.d.ts +6 -7
- package/package.json +1 -1
- package/types/Http.d.ts +2 -1
package/api/appsDev.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AxiosPromise } from 'axios';
|
|
2
1
|
import { PublicApp, PublicAppInstallCounts, PublicAppDeveloperTestAccountInstallData, FetchPublicAppsForPortalResponse } from '../types/Apps';
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
2
|
+
import { HubSpotPromise } from '../types/Http';
|
|
3
|
+
export declare function fetchPublicAppsForPortal(accountId: number): HubSpotPromise<FetchPublicAppsForPortalResponse>;
|
|
4
|
+
export declare function fetchPublicAppDeveloperTestAccountInstallData(appId: number, accountId: number): HubSpotPromise<PublicAppDeveloperTestAccountInstallData>;
|
|
5
|
+
export declare function fetchPublicAppProductionInstallCounts(appId: number, accountId: number): HubSpotPromise<PublicAppInstallCounts>;
|
|
6
|
+
export declare function fetchPublicAppMetadata(appId: number, accountId: number): HubSpotPromise<PublicApp>;
|
package/api/customObjects.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AxiosPromise } from 'axios';
|
|
2
1
|
import { FetchSchemasResponse, Schema, CreateObjectsResponse } from '../types/Schemas';
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
2
|
+
import { HubSpotPromise } from '../types/Http';
|
|
3
|
+
export declare function batchCreateObjects(accountId: number, objectTypeId: string, objects: JSON): HubSpotPromise<CreateObjectsResponse>;
|
|
4
|
+
export declare function createObjectSchema(accountId: number, schema: JSON): HubSpotPromise<Schema>;
|
|
5
|
+
export declare function updateObjectSchema(accountId: number, schemaObjectType: string, schema: Schema): HubSpotPromise<Schema>;
|
|
6
|
+
export declare function fetchObjectSchema(accountId: number, schemaObjectType: string): HubSpotPromise<Schema>;
|
|
7
|
+
export declare function fetchObjectSchemas(accountId: number): HubSpotPromise<FetchSchemasResponse>;
|
|
8
|
+
export declare function deleteObjectSchema(accountId: number, schemaObjectType: string): HubSpotPromise<void>;
|
package/api/designManager.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { QueryParams } from '../types/Http';
|
|
1
|
+
import { HubSpotPromise, QueryParams } from '../types/Http';
|
|
3
2
|
import { FetchThemesResponse, FetchBuiltinMappingResponse } from '../types/DesignManager';
|
|
4
|
-
export declare function fetchThemes(accountId: number, params?: QueryParams):
|
|
5
|
-
export declare function fetchBuiltinMapping(accountId: number):
|
|
3
|
+
export declare function fetchThemes(accountId: number, params?: QueryParams): HubSpotPromise<FetchThemesResponse>;
|
|
4
|
+
export declare function fetchBuiltinMapping(accountId: number): HubSpotPromise<FetchBuiltinMappingResponse>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AxiosPromise } from 'axios';
|
|
2
1
|
import { DeveloperTestAccount, FetchDeveloperTestAccountsResponse } from '../types/developerTestAccounts';
|
|
3
2
|
import { Environment } from '../types/Config';
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
3
|
+
import { HubSpotPromise } from '../types/Http';
|
|
4
|
+
export declare function fetchDeveloperTestAccounts(accountId: number): HubSpotPromise<FetchDeveloperTestAccountsResponse>;
|
|
5
|
+
export declare function createDeveloperTestAccount(accountId: number, accountName: string): HubSpotPromise<DeveloperTestAccount>;
|
|
6
|
+
export declare function deleteDeveloperTestAccount(accountId: number, testAccountId: number): HubSpotPromise<void>;
|
|
7
|
+
export declare function fetchDeveloperTestAccountData(accessToken: string, accountId: number, env?: Environment): HubSpotPromise<DeveloperTestAccount>;
|
package/api/fileManager.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HubSpotPromise } from '../types/Http';
|
|
2
2
|
import { FetchStatResponse, FetchFilesResponse, FetchFolderResponse, UploadResponse } from '../types/FileManager';
|
|
3
|
-
export declare function uploadFile(accountId: number, src: string, dest: string):
|
|
4
|
-
export declare function fetchStat(accountId: number, src: string):
|
|
5
|
-
export declare function fetchFiles(accountId: number, folderId: number | 'None', offset: number, archived?: boolean):
|
|
6
|
-
export declare function fetchFolders(accountId: number, folderId: number | 'None'):
|
|
3
|
+
export declare function uploadFile(accountId: number, src: string, dest: string): HubSpotPromise<UploadResponse>;
|
|
4
|
+
export declare function fetchStat(accountId: number, src: string): HubSpotPromise<FetchStatResponse>;
|
|
5
|
+
export declare function fetchFiles(accountId: number, folderId: number | 'None', offset: number, archived?: boolean): HubSpotPromise<FetchFilesResponse>;
|
|
6
|
+
export declare function fetchFolders(accountId: number, folderId: number | 'None'): HubSpotPromise<FetchFolderResponse>;
|
package/api/fileMapper.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { AxiosResponse
|
|
1
|
+
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { FileMapperNode, FileMapperOptions, FileTree } from '../types/Files';
|
|
3
|
+
import { HubSpotPromise } from '../types/Http';
|
|
3
4
|
export declare const FILE_MAPPER_API_PATH = "content/filemapper/v1";
|
|
4
5
|
export declare function createFileMapperNodeFromStreamResponse(filePath: string, response: Partial<AxiosResponse>): FileMapperNode;
|
|
5
|
-
export declare function upload(accountId: number, src: string, dest: string, options?: FileMapperOptions):
|
|
6
|
-
export declare function fetchModule(accountId: number, moduleId: number, options?: FileMapperOptions):
|
|
6
|
+
export declare function upload(accountId: number, src: string, dest: string, options?: FileMapperOptions): HubSpotPromise<void>;
|
|
7
|
+
export declare function fetchModule(accountId: number, moduleId: number, options?: FileMapperOptions): HubSpotPromise<FileTree>;
|
|
7
8
|
export declare function fetchFileStream(accountId: number, filePath: string, destination: string, options?: FileMapperOptions): Promise<FileMapperNode>;
|
|
8
|
-
export declare function download(accountId: number, filepath: string, options?: FileMapperOptions):
|
|
9
|
-
export declare function downloadDefault(accountId: number, filepath: string, options?: FileMapperOptions):
|
|
10
|
-
export declare function deleteFile(accountId: number, filePath: string):
|
|
11
|
-
export declare function moveFile(accountId: number, srcPath: string, destPath: string):
|
|
12
|
-
export declare function getDirectoryContentsByPath(accountId: number, path: string):
|
|
9
|
+
export declare function download(accountId: number, filepath: string, options?: FileMapperOptions): HubSpotPromise<FileMapperNode>;
|
|
10
|
+
export declare function downloadDefault(accountId: number, filepath: string, options?: FileMapperOptions): HubSpotPromise<FileMapperNode>;
|
|
11
|
+
export declare function deleteFile(accountId: number, filePath: string): HubSpotPromise<void>;
|
|
12
|
+
export declare function moveFile(accountId: number, srcPath: string, destPath: string): HubSpotPromise<void>;
|
|
13
|
+
export declare function getDirectoryContentsByPath(accountId: number, path: string): HubSpotPromise<FileMapperNode>;
|
package/api/fileTransport.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function createSchemaFromHubFile(accountId: number, filepath: string):
|
|
3
|
-
export declare function updateSchemaFromHubFile(accountId: number, filepath: string):
|
|
4
|
-
export declare function fetchHubFileSchema(accountId: number, objectName: string, path: string):
|
|
1
|
+
import { HubSpotPromise } from '../types/Http';
|
|
2
|
+
export declare function createSchemaFromHubFile(accountId: number, filepath: string): HubSpotPromise;
|
|
3
|
+
export declare function updateSchemaFromHubFile(accountId: number, filepath: string): HubSpotPromise;
|
|
4
|
+
export declare function fetchHubFileSchema(accountId: number, objectName: string, path: string): HubSpotPromise;
|
package/api/functions.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { QueryParams } from '../types/Http';
|
|
1
|
+
import { HubSpotPromise, QueryParams } from '../types/Http';
|
|
3
2
|
import { GetBuildStatusResponse, GetRoutesResponse } from '../types/Functions';
|
|
4
|
-
export declare function getRoutes(accountId: number):
|
|
5
|
-
export declare function getFunctionLogs(accountId: number, route: string, params?: QueryParams):
|
|
6
|
-
export declare function getLatestFunctionLog(accountId: number, route: string):
|
|
7
|
-
export declare function buildPackage(accountId: number, folderPath: string):
|
|
8
|
-
export declare function getBuildStatus(accountId: number, buildId: number):
|
|
3
|
+
export declare function getRoutes(accountId: number): HubSpotPromise<GetRoutesResponse>;
|
|
4
|
+
export declare function getFunctionLogs(accountId: number, route: string, params?: QueryParams): HubSpotPromise;
|
|
5
|
+
export declare function getLatestFunctionLog(accountId: number, route: string): HubSpotPromise;
|
|
6
|
+
export declare function buildPackage(accountId: number, folderPath: string): HubSpotPromise<string>;
|
|
7
|
+
export declare function getBuildStatus(accountId: number, buildId: number): HubSpotPromise<GetBuildStatusResponse>;
|
package/api/github.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { AxiosPromise } from 'axios';
|
|
3
2
|
import { GithubReleaseData, GithubRepoFile, RepoPath } from '../types/Github';
|
|
3
|
+
import { HubSpotPromise } from '../types/Http';
|
|
4
4
|
declare global {
|
|
5
5
|
var githubToken: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function fetchRepoReleaseData(repoPath: RepoPath, tag?: string):
|
|
8
|
-
export declare function fetchRepoAsZip(zipUrl: string):
|
|
9
|
-
export declare function fetchRepoFile(repoPath: RepoPath, filePath: string, ref: string):
|
|
10
|
-
export declare function fetchRepoFileByDownloadUrl(downloadUrl: string):
|
|
11
|
-
export declare function fetchRepoContents(repoPath: RepoPath, path: string, ref?: string):
|
|
7
|
+
export declare function fetchRepoReleaseData(repoPath: RepoPath, tag?: string): HubSpotPromise<GithubReleaseData>;
|
|
8
|
+
export declare function fetchRepoAsZip(zipUrl: string): HubSpotPromise<Buffer>;
|
|
9
|
+
export declare function fetchRepoFile(repoPath: RepoPath, filePath: string, ref: string): HubSpotPromise<Buffer>;
|
|
10
|
+
export declare function fetchRepoFileByDownloadUrl(downloadUrl: string): HubSpotPromise<Buffer>;
|
|
11
|
+
export declare function fetchRepoContents(repoPath: RepoPath, path: string, ref?: string): HubSpotPromise<Array<GithubRepoFile>>;
|
package/api/hubdb.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { QueryParams } from '../types/Http';
|
|
1
|
+
import { HubSpotPromise, QueryParams } from '../types/Http';
|
|
3
2
|
import { CreateRowsResponse, FetchRowsResponse, Row, Schema, Table, FetchTablesResponse } from '../types/Hubdb';
|
|
4
|
-
export declare function fetchTables(accountId: number):
|
|
5
|
-
export declare function fetchTable(accountId: number, tableId: string):
|
|
6
|
-
export declare function createTable(accountId: number, schema: Schema):
|
|
7
|
-
export declare function updateTable(accountId: number, tableId: string, schema: Schema):
|
|
8
|
-
export declare function publishTable(accountId: number, tableId: string):
|
|
9
|
-
export declare function deleteTable(accountId: number, tableId: string):
|
|
10
|
-
export declare function createRows(accountId: number, tableId: string, rows: Array<Row>):
|
|
11
|
-
export declare function fetchRows(accountId: number, tableId: string, params?: QueryParams):
|
|
12
|
-
export declare function deleteRows(accountId: number, tableId: string, rowIds: Array<string>):
|
|
3
|
+
export declare function fetchTables(accountId: number): HubSpotPromise<FetchTablesResponse>;
|
|
4
|
+
export declare function fetchTable(accountId: number, tableId: string): HubSpotPromise<Table>;
|
|
5
|
+
export declare function createTable(accountId: number, schema: Schema): HubSpotPromise<Table>;
|
|
6
|
+
export declare function updateTable(accountId: number, tableId: string, schema: Schema): HubSpotPromise<Table>;
|
|
7
|
+
export declare function publishTable(accountId: number, tableId: string): HubSpotPromise<Table>;
|
|
8
|
+
export declare function deleteTable(accountId: number, tableId: string): HubSpotPromise<void>;
|
|
9
|
+
export declare function createRows(accountId: number, tableId: string, rows: Array<Row>): HubSpotPromise<CreateRowsResponse>;
|
|
10
|
+
export declare function fetchRows(accountId: number, tableId: string, params?: QueryParams): HubSpotPromise<FetchRowsResponse>;
|
|
11
|
+
export declare function deleteRows(accountId: number, tableId: string, rowIds: Array<string>): HubSpotPromise<void>;
|
package/api/lighthouseScore.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Data, QueryParams } from '../types/Http';
|
|
1
|
+
import { Data, HubSpotPromise, QueryParams } from '../types/Http';
|
|
3
2
|
import { GetLighthouseScoreResponse, RequestLighthouseScoreResponse } from '../types/Lighthouse';
|
|
4
|
-
export declare function requestLighthouseScore(accountId: number, data?: Data):
|
|
5
|
-
export declare function getLighthouseScoreStatus(accountId: number, params?: QueryParams):
|
|
6
|
-
export declare function getLighthouseScore(accountId: number, params?: QueryParams):
|
|
3
|
+
export declare function requestLighthouseScore(accountId: number, data?: Data): HubSpotPromise<RequestLighthouseScoreResponse>;
|
|
4
|
+
export declare function getLighthouseScoreStatus(accountId: number, params?: QueryParams): HubSpotPromise<string>;
|
|
5
|
+
export declare function getLighthouseScore(accountId: number, params?: QueryParams): HubSpotPromise<GetLighthouseScoreResponse>;
|
package/api/localDevAuth.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { AxiosPromise } from 'axios';
|
|
2
1
|
import { Environment } from '../types/Config';
|
|
3
2
|
import { ScopeData, AccessTokenResponse, EnabledFeaturesResponse } from '../types/Accounts';
|
|
4
3
|
import { PublicAppInstallationData } from '../types/Apps';
|
|
5
|
-
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
4
|
+
import { HubSpotPromise } from '../types/Http';
|
|
5
|
+
export declare function fetchAccessToken(personalAccessKey: string, env?: Environment, portalId?: number): HubSpotPromise<AccessTokenResponse>;
|
|
6
|
+
export declare function fetchScopeData(accountId: number, scopeGroup: string): HubSpotPromise<ScopeData>;
|
|
7
|
+
export declare function fetchAppInstallationData(portalId: number, projectId: number, appUid: string, requiredScopeGroups: Array<string>, optionalScopeGroups?: Array<string>): HubSpotPromise<PublicAppInstallationData>;
|
|
8
8
|
export declare function fetchEnabledFeatures(accountId: number): Promise<import("axios").AxiosResponse<EnabledFeaturesResponse, any>>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Data, QueryParams } from '../types/Http';
|
|
1
|
+
import { Data, HubSpotPromise, QueryParams } from '../types/Http';
|
|
3
2
|
import { GetValidationResultsResponse } from '../types/MarketplaceValidation';
|
|
4
|
-
export declare function requestValidation(accountId: number, data?: Data):
|
|
5
|
-
export declare function getValidationStatus(accountId: number, params?: QueryParams):
|
|
6
|
-
export declare function getValidationResults(accountId: number, params?: QueryParams):
|
|
3
|
+
export declare function requestValidation(accountId: number, data?: Data): HubSpotPromise<number>;
|
|
4
|
+
export declare function getValidationStatus(accountId: number, params?: QueryParams): HubSpotPromise<string>;
|
|
5
|
+
export declare function getValidationResults(accountId: number, params?: QueryParams): HubSpotPromise<GetValidationResultsResponse>;
|
package/api/projects.d.ts
CHANGED
|
@@ -1,40 +1,39 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
3
|
-
import { QueryParams } from '../types/Http';
|
|
2
|
+
import { HubSpotPromise, QueryParams } from '../types/Http';
|
|
4
3
|
import { Project, FetchProjectResponse, UploadProjectResponse, ProjectSettings, FetchPlatformVersionResponse } from '../types/Project';
|
|
5
4
|
import { Build, FetchProjectBuildsResponse } from '../types/Build';
|
|
6
5
|
import { ComponentStructureResponse, ProjectComponentsMetadata } from '../types/ComponentStructure';
|
|
7
6
|
import { Deploy, ProjectDeployResponse } from '../types/Deploy';
|
|
8
7
|
import { ProjectLog } from '../types/ProjectLog';
|
|
9
8
|
import { MigrateAppResponse, CloneAppResponse, PollAppResponse } from '../types/Migration';
|
|
10
|
-
export declare function fetchProjects(accountId: number):
|
|
11
|
-
export declare function createProject(accountId: number, name: string):
|
|
12
|
-
export declare function uploadProject(accountId: number, projectName: string, projectFile: string, uploadMessage: string, platformVersion?: string):
|
|
13
|
-
export declare function fetchProject(accountId: number, projectName: string):
|
|
14
|
-
export declare function fetchProjectComponentsMetadata(accountId: number, projectId: number):
|
|
15
|
-
export declare function downloadProject(accountId: number, projectName: string, buildId: number):
|
|
16
|
-
export declare function deleteProject(accountId: number, projectName: string):
|
|
17
|
-
export declare function fetchPlatformVersions(accountId: number):
|
|
18
|
-
export declare function fetchProjectBuilds(accountId: number, projectName: string, params?: QueryParams):
|
|
19
|
-
export declare function getBuildStatus(accountId: number, projectName: string, buildId: number):
|
|
20
|
-
export declare function getBuildStructure(accountId: number, projectName: string, buildId: number):
|
|
21
|
-
export declare function deployProject(accountId: number, projectName: string, buildId: number):
|
|
22
|
-
export declare function getDeployStatus(accountId: number, projectName: string, deployId: number):
|
|
23
|
-
export declare function getDeployStructure(accountId: number, projectName: string, deployId: number):
|
|
24
|
-
export declare function fetchProjectSettings(accountId: number, projectName: string):
|
|
25
|
-
export declare function provisionBuild(accountId: number, projectName: string, platformVersion?: string):
|
|
26
|
-
export declare function queueBuild(accountId: number, projectName: string, platformVersion?: string):
|
|
27
|
-
export declare function uploadFileToBuild(accountId: number, projectName: string, filePath: string, path: string):
|
|
28
|
-
export declare function deleteFileFromBuild(accountId: number, projectName: string, path: string):
|
|
29
|
-
export declare function cancelStagedBuild(accountId: number, projectName: string):
|
|
9
|
+
export declare function fetchProjects(accountId: number): HubSpotPromise<FetchProjectResponse>;
|
|
10
|
+
export declare function createProject(accountId: number, name: string): HubSpotPromise<Project>;
|
|
11
|
+
export declare function uploadProject(accountId: number, projectName: string, projectFile: string, uploadMessage: string, platformVersion?: string): HubSpotPromise<UploadProjectResponse>;
|
|
12
|
+
export declare function fetchProject(accountId: number, projectName: string): HubSpotPromise<Project>;
|
|
13
|
+
export declare function fetchProjectComponentsMetadata(accountId: number, projectId: number): HubSpotPromise<ProjectComponentsMetadata>;
|
|
14
|
+
export declare function downloadProject(accountId: number, projectName: string, buildId: number): HubSpotPromise<Buffer>;
|
|
15
|
+
export declare function deleteProject(accountId: number, projectName: string): HubSpotPromise<void>;
|
|
16
|
+
export declare function fetchPlatformVersions(accountId: number): HubSpotPromise<FetchPlatformVersionResponse>;
|
|
17
|
+
export declare function fetchProjectBuilds(accountId: number, projectName: string, params?: QueryParams): HubSpotPromise<FetchProjectBuildsResponse>;
|
|
18
|
+
export declare function getBuildStatus(accountId: number, projectName: string, buildId: number): HubSpotPromise<Build>;
|
|
19
|
+
export declare function getBuildStructure(accountId: number, projectName: string, buildId: number): HubSpotPromise<ComponentStructureResponse>;
|
|
20
|
+
export declare function deployProject(accountId: number, projectName: string, buildId: number): HubSpotPromise<ProjectDeployResponse>;
|
|
21
|
+
export declare function getDeployStatus(accountId: number, projectName: string, deployId: number): HubSpotPromise<Deploy>;
|
|
22
|
+
export declare function getDeployStructure(accountId: number, projectName: string, deployId: number): HubSpotPromise<ComponentStructureResponse>;
|
|
23
|
+
export declare function fetchProjectSettings(accountId: number, projectName: string): HubSpotPromise<ProjectSettings>;
|
|
24
|
+
export declare function provisionBuild(accountId: number, projectName: string, platformVersion?: string): HubSpotPromise<Build>;
|
|
25
|
+
export declare function queueBuild(accountId: number, projectName: string, platformVersion?: string): HubSpotPromise<void>;
|
|
26
|
+
export declare function uploadFileToBuild(accountId: number, projectName: string, filePath: string, path: string): HubSpotPromise<void>;
|
|
27
|
+
export declare function deleteFileFromBuild(accountId: number, projectName: string, path: string): HubSpotPromise<void>;
|
|
28
|
+
export declare function cancelStagedBuild(accountId: number, projectName: string): HubSpotPromise<void>;
|
|
30
29
|
type WarnLogsResponse = {
|
|
31
30
|
logs: Array<ProjectLog>;
|
|
32
31
|
};
|
|
33
|
-
export declare function fetchBuildWarnLogs(accountId: number, projectName: string, buildId: number):
|
|
34
|
-
export declare function fetchDeployWarnLogs(accountId: number, projectName: string, deployId: number):
|
|
35
|
-
export declare function migrateApp(accountId: number, appId: number, projectName: string):
|
|
36
|
-
export declare function checkMigrationStatus(accountId: number, id: number):
|
|
37
|
-
export declare function cloneApp(accountId: number, appId: number):
|
|
38
|
-
export declare function checkCloneStatus(accountId: number, exportId: number):
|
|
39
|
-
export declare function downloadClonedProject(accountId: number, exportId: number):
|
|
32
|
+
export declare function fetchBuildWarnLogs(accountId: number, projectName: string, buildId: number): HubSpotPromise<WarnLogsResponse>;
|
|
33
|
+
export declare function fetchDeployWarnLogs(accountId: number, projectName: string, deployId: number): HubSpotPromise<WarnLogsResponse>;
|
|
34
|
+
export declare function migrateApp(accountId: number, appId: number, projectName: string): HubSpotPromise<MigrateAppResponse>;
|
|
35
|
+
export declare function checkMigrationStatus(accountId: number, id: number): HubSpotPromise<PollAppResponse>;
|
|
36
|
+
export declare function cloneApp(accountId: number, appId: number): HubSpotPromise<CloneAppResponse>;
|
|
37
|
+
export declare function checkCloneStatus(accountId: number, exportId: number): HubSpotPromise<CloneAppResponse>;
|
|
38
|
+
export declare function downloadClonedProject(accountId: number, exportId: number): HubSpotPromise<Buffer>;
|
|
40
39
|
export {};
|
package/api/sandboxHubs.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AxiosPromise } from 'axios';
|
|
2
2
|
import { Environment } from '../types/Config';
|
|
3
3
|
import { SandboxHubData, SandboxResponse, SandboxUsageLimitsResponse } from '../types/Sandbox';
|
|
4
|
-
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
4
|
+
import { HubSpotPromise } from '../types/Http';
|
|
5
|
+
export declare function createSandbox(accountId: number, name: string, type: 1 | 2): HubSpotPromise<SandboxResponse>;
|
|
6
|
+
export declare function deleteSandbox(parentAccountId: number, sandboxAccountId: number): HubSpotPromise<void>;
|
|
7
|
+
export declare function getSandboxUsageLimits(parentAccountId: number): HubSpotPromise<SandboxUsageLimitsResponse>;
|
|
7
8
|
export declare function fetchSandboxHubData(accessToken: string, accountId: number, env?: Environment): AxiosPromise<SandboxHubData>;
|
package/api/sandboxSync.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AxiosPromise } from 'axios';
|
|
2
1
|
import { InitiateSyncResponse, FetchTypesResponse, TaskRequestData } from '../types/Sandbox';
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
2
|
+
import { HubSpotPromise } from '../types/Http';
|
|
3
|
+
export declare function initiateSync(fromHubId: number, toHubId: number, tasks: Array<TaskRequestData>, sandboxHubId: number): HubSpotPromise<InitiateSyncResponse>;
|
|
4
|
+
export declare function fetchTypes(accountId: number, toHubId: number): HubSpotPromise<FetchTypesResponse>;
|
package/api/sandboxSync.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.fetchTypes = exports.initiateSync = void 0;
|
|
|
4
4
|
const http_1 = require("../http");
|
|
5
5
|
const api_1 = require("../constants/api");
|
|
6
6
|
const SANDBOXES_SYNC_API_PATH = 'sandboxes-sync/v1';
|
|
7
|
-
function initiateSync(fromHubId, toHubId, tasks, sandboxHubId) {
|
|
7
|
+
async function initiateSync(fromHubId, toHubId, tasks, sandboxHubId) {
|
|
8
8
|
return http_1.http.post(fromHubId, {
|
|
9
9
|
data: {
|
|
10
10
|
command: 'SYNC',
|
package/api/secrets.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AxiosPromise } from 'axios';
|
|
2
1
|
import { FetchSecretsResponse } from '../types/Secrets';
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
2
|
+
import { HubSpotPromise } from '../types/Http';
|
|
3
|
+
export declare function addSecret(accountId: number, key: string, value: string): HubSpotPromise<void>;
|
|
4
|
+
export declare function updateSecret(accountId: number, key: string, value: string): HubSpotPromise<void>;
|
|
5
|
+
export declare function deleteSecret(accountId: number, key: string): HubSpotPromise<void>;
|
|
6
|
+
export declare function fetchSecrets(accountId: number): HubSpotPromise<FetchSecretsResponse>;
|
package/api/validateHubl.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { AxiosPromise } from 'axios';
|
|
2
1
|
import { Validation, HublValidationOptions } from '../types/HublValidation';
|
|
3
|
-
|
|
2
|
+
import { HubSpotPromise } from '../types/Http';
|
|
3
|
+
export declare function validateHubl(accountId: number, sourceCode: string, hublValidationOptions?: HublValidationOptions): HubSpotPromise<Validation>;
|
package/http/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AxiosPromise } from 'axios';
|
|
2
|
-
import { HttpOptions } from '../types/Http';
|
|
2
|
+
import { HttpOptions, HubSpotPromise } from '../types/Http';
|
|
3
3
|
export declare function addUserAgentHeader(key: string, value: string): void;
|
|
4
|
-
declare function getRequest<T>(accountId: number, options: HttpOptions):
|
|
5
|
-
declare function postRequest<T>(accountId: number, options: HttpOptions):
|
|
6
|
-
declare function putRequest<T>(accountId: number, options: HttpOptions):
|
|
7
|
-
declare function patchRequest<T>(accountId: number, options: HttpOptions):
|
|
8
|
-
declare function deleteRequest<T>(accountId: number, options: HttpOptions):
|
|
4
|
+
declare function getRequest<T>(accountId: number, options: HttpOptions): HubSpotPromise<T>;
|
|
5
|
+
declare function postRequest<T>(accountId: number, options: HttpOptions): HubSpotPromise<T>;
|
|
6
|
+
declare function putRequest<T>(accountId: number, options: HttpOptions): HubSpotPromise<T>;
|
|
7
|
+
declare function patchRequest<T>(accountId: number, options: HttpOptions): HubSpotPromise<T>;
|
|
8
|
+
declare function deleteRequest<T>(accountId: number, options: HttpOptions): HubSpotPromise<T>;
|
|
9
9
|
export declare const http: {
|
|
10
10
|
get: typeof getRequest;
|
|
11
11
|
post: typeof postRequest;
|
package/http/unauthed.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
declare function
|
|
4
|
-
declare function
|
|
5
|
-
declare function
|
|
6
|
-
declare function
|
|
7
|
-
declare function deleteRequest<T>(options: HttpOptions): AxiosPromise<T>;
|
|
1
|
+
import { HttpOptions, HubSpotPromise } from '../types/Http';
|
|
2
|
+
declare function getRequest<T>(options: HttpOptions): HubSpotPromise<T>;
|
|
3
|
+
declare function postRequest<T>(options: HttpOptions): HubSpotPromise<T>;
|
|
4
|
+
declare function putRequest<T>(options: HttpOptions): HubSpotPromise<T>;
|
|
5
|
+
declare function patchRequest<T>(options: HttpOptions): HubSpotPromise<T>;
|
|
6
|
+
declare function deleteRequest<T>(options: HttpOptions): HubSpotPromise<T>;
|
|
8
7
|
export declare const http: {
|
|
9
8
|
get: typeof getRequest;
|
|
10
9
|
post: typeof postRequest;
|
package/package.json
CHANGED
package/types/Http.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
/// <reference types="node" />
|
|
4
|
-
import { ResponseType } from 'axios';
|
|
4
|
+
import { AxiosPromise, ResponseType } from 'axios';
|
|
5
5
|
import { ReadStream } from 'fs';
|
|
6
6
|
import { Stream } from 'stream';
|
|
7
|
+
export type HubSpotPromise<T = unknown> = AxiosPromise<T>;
|
|
7
8
|
export type Data = {
|
|
8
9
|
[key: string]: any;
|
|
9
10
|
};
|