@hubspot/local-dev-lib 3.6.1-beta.0 → 3.7.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.
- package/api/devSecrets.d.ts +6 -0
- package/api/devSecrets.js +40 -0
- package/package.json +1 -1
- package/types/DevSecrets.d.ts +5 -0
- package/types/DevSecrets.js +2 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HubSpotPromise } from '../types/Http';
|
|
2
|
+
import { FetchDevSecretsResponse } from '../types/DevSecrets';
|
|
3
|
+
export declare function addAppSecret(accountId: number, appId: number, key: string, value: string): HubSpotPromise<void>;
|
|
4
|
+
export declare function updateAppSecret(accountId: number, appId: number, key: string, value: string): HubSpotPromise<void>;
|
|
5
|
+
export declare function deleteAppSecret(accountId: number, appId: number, key: string): HubSpotPromise<void>;
|
|
6
|
+
export declare function fetchAppSecrets(accountId: number, appId: number): HubSpotPromise<FetchDevSecretsResponse>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fetchAppSecrets = exports.deleteAppSecret = exports.updateAppSecret = exports.addAppSecret = void 0;
|
|
4
|
+
const http_1 = require("../http");
|
|
5
|
+
const DEV_SECRETS_API_PATH = 'dev-secrets/management/v3';
|
|
6
|
+
function addAppSecret(accountId, appId, key, value) {
|
|
7
|
+
return http_1.http.post(accountId, {
|
|
8
|
+
url: `${DEV_SECRETS_API_PATH}/secrets/app/${appId}`,
|
|
9
|
+
data: {
|
|
10
|
+
key,
|
|
11
|
+
value,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
exports.addAppSecret = addAppSecret;
|
|
16
|
+
function updateAppSecret(accountId, appId, key, value) {
|
|
17
|
+
return http_1.http.patch(accountId, {
|
|
18
|
+
url: `${DEV_SECRETS_API_PATH}/secrets/app/${appId}`,
|
|
19
|
+
data: {
|
|
20
|
+
key,
|
|
21
|
+
value,
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
exports.updateAppSecret = updateAppSecret;
|
|
26
|
+
function deleteAppSecret(accountId, appId, key) {
|
|
27
|
+
return http_1.http.delete(accountId, {
|
|
28
|
+
url: `${DEV_SECRETS_API_PATH}/secrets/app/${appId}`,
|
|
29
|
+
data: {
|
|
30
|
+
key,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
exports.deleteAppSecret = deleteAppSecret;
|
|
35
|
+
function fetchAppSecrets(accountId, appId) {
|
|
36
|
+
return http_1.http.get(accountId, {
|
|
37
|
+
url: `${DEV_SECRETS_API_PATH}/keys/app/${appId}`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
exports.fetchAppSecrets = fetchAppSecrets;
|
package/package.json
CHANGED