@hubspot/local-dev-lib 3.11.0-beta.0 → 3.12.0-beta.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DeveloperTestAccount, CreateDeveloperTestAccountResponse, FetchDeveloperTestAccountsResponse, DeveloperTestAccountConfig, CreateDeveloperTestAccountV3Response } from '../types/developerTestAccounts';
|
|
1
|
+
import { DeveloperTestAccount, CreateDeveloperTestAccountResponse, FetchDeveloperTestAccountsResponse, DeveloperTestAccountConfig, CreateDeveloperTestAccountV3Response, InstallOauthAppIntoDeveloperTestAccountResponse, TestPortalStatusResponse } from '../types/developerTestAccounts';
|
|
2
2
|
import { Environment } from '../types/Config';
|
|
3
3
|
import { HubSpotPromise } from '../types/Http';
|
|
4
4
|
export declare function fetchDeveloperTestAccounts(accountId: number): HubSpotPromise<FetchDeveloperTestAccountsResponse>;
|
|
@@ -6,6 +6,6 @@ export declare function createDeveloperTestAccount(accountId: number, accountInf
|
|
|
6
6
|
export declare function createDeveloperTestAccount(accountId: number, accountInfo: DeveloperTestAccountConfig): HubSpotPromise<CreateDeveloperTestAccountV3Response>;
|
|
7
7
|
export declare function deleteDeveloperTestAccount(accountId: number, testAccountId: number, useV3?: boolean): HubSpotPromise<void>;
|
|
8
8
|
export declare function fetchDeveloperTestAccountData(accessToken: string, accountId: number, env?: Environment): HubSpotPromise<DeveloperTestAccount>;
|
|
9
|
-
export declare function
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
export declare function installOauthAppIntoDeveloperTestAccount(accountId: number, testAccountId: number, projectName: string, appUId: string): HubSpotPromise<InstallOauthAppIntoDeveloperTestAccountResponse>;
|
|
10
|
+
export declare function fetchDeveloperTestAccountOauthAppInstallStatus(accountId: number, projectName: string, appUId: string): HubSpotPromise<TestPortalStatusResponse>;
|
|
11
|
+
export declare function fetchDeveloperTestAccountGateSyncStatus(accountId: number, testAccountId: number): HubSpotPromise<TestPortalStatusResponse>;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.fetchDeveloperTestAccountGateSyncStatus = exports.fetchDeveloperTestAccountData = exports.deleteDeveloperTestAccount = exports.createDeveloperTestAccount = exports.fetchDeveloperTestAccounts = void 0;
|
|
6
|
+
exports.fetchDeveloperTestAccountGateSyncStatus = exports.fetchDeveloperTestAccountOauthAppInstallStatus = exports.installOauthAppIntoDeveloperTestAccount = exports.fetchDeveloperTestAccountData = exports.deleteDeveloperTestAccount = exports.createDeveloperTestAccount = exports.fetchDeveloperTestAccounts = void 0;
|
|
7
7
|
const axios_1 = __importDefault(require("axios"));
|
|
8
8
|
const http_1 = require("../http");
|
|
9
9
|
const getAxiosConfig_1 = require("../http/getAxiosConfig");
|
|
@@ -59,6 +59,27 @@ function fetchDeveloperTestAccountData(accessToken, accountId, env = environment
|
|
|
59
59
|
return (0, axios_1.default)(reqWithToken);
|
|
60
60
|
}
|
|
61
61
|
exports.fetchDeveloperTestAccountData = fetchDeveloperTestAccountData;
|
|
62
|
+
function installOauthAppIntoDeveloperTestAccount(accountId, testAccountId, projectName, appUId) {
|
|
63
|
+
return http_1.http.post(accountId, {
|
|
64
|
+
url: `${TEST_ACCOUNTS_API_PATH_V3}/install-apps`,
|
|
65
|
+
data: {
|
|
66
|
+
testPortalId: testAccountId,
|
|
67
|
+
developerQualifiedSymbol: { developerSymbol: appUId, projectName },
|
|
68
|
+
},
|
|
69
|
+
timeout: api_1.SANDBOX_TIMEOUT,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
exports.installOauthAppIntoDeveloperTestAccount = installOauthAppIntoDeveloperTestAccount;
|
|
73
|
+
function fetchDeveloperTestAccountOauthAppInstallStatus(accountId, projectName, appUId) {
|
|
74
|
+
return http_1.http.post(accountId, {
|
|
75
|
+
url: `${TEST_ACCOUNTS_API_PATH_V3}/install-apps/readiness`,
|
|
76
|
+
data: {
|
|
77
|
+
developerQualifiedSymbol: { developerSymbol: appUId, projectName },
|
|
78
|
+
},
|
|
79
|
+
timeout: api_1.SANDBOX_TIMEOUT,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
exports.fetchDeveloperTestAccountOauthAppInstallStatus = fetchDeveloperTestAccountOauthAppInstallStatus;
|
|
62
83
|
function fetchDeveloperTestAccountGateSyncStatus(accountId, testAccountId) {
|
|
63
84
|
return http_1.http.get(accountId, {
|
|
64
85
|
url: `${TEST_ACCOUNTS_API_PATH_V3}/gate-sync-status/${testAccountId}`,
|
package/package.json
CHANGED
|
@@ -36,3 +36,15 @@ export type DeveloperTestAccountConfig = {
|
|
|
36
36
|
salesLevel?: AccountLevel;
|
|
37
37
|
contentLevel?: AccountLevel;
|
|
38
38
|
};
|
|
39
|
+
export type InstallOauthAppIntoDeveloperTestAccountResponse = {
|
|
40
|
+
authCodes: Array<{
|
|
41
|
+
developerQualifiedSymbol: {
|
|
42
|
+
projectName: string;
|
|
43
|
+
developerSymbol: string;
|
|
44
|
+
};
|
|
45
|
+
authCode: string;
|
|
46
|
+
}>;
|
|
47
|
+
};
|
|
48
|
+
export type TestPortalStatusResponse = {
|
|
49
|
+
status: 'IN_PROGRESS' | 'SUCCESS';
|
|
50
|
+
};
|