@hubspot/local-dev-lib 0.0.1-experimental.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/LICENSE +12 -0
- package/README.md +17 -0
- package/api/appsDev.d.ts +6 -0
- package/api/appsDev.js +29 -0
- package/api/customObjects.d.ts +8 -0
- package/api/customObjects.js +45 -0
- package/api/designManager.d.ts +5 -0
- package/api/designManager.js +18 -0
- package/api/developerTestAccounts.d.ts +7 -0
- package/api/developerTestAccounts.js +48 -0
- package/api/fileManager.d.ts +6 -0
- package/api/fileManager.js +63 -0
- package/api/fileMapper.d.ts +12 -0
- package/api/fileMapper.js +106 -0
- package/api/fileTransport.d.ts +4 -0
- package/api/fileTransport.js +39 -0
- package/api/functions.d.ts +8 -0
- package/api/functions.js +43 -0
- package/api/github.d.ts +11 -0
- package/api/github.js +71 -0
- package/api/hubdb.d.ts +12 -0
- package/api/hubdb.js +67 -0
- package/api/lighthouseScore.d.ts +6 -0
- package/api/lighthouseScore.js +26 -0
- package/api/localDevAuth.d.ts +8 -0
- package/api/localDevAuth.js +53 -0
- package/api/marketplaceValidation.d.ts +6 -0
- package/api/marketplaceValidation.js +26 -0
- package/api/projects.d.ts +40 -0
- package/api/projects.js +216 -0
- package/api/sandboxHubs.d.ts +7 -0
- package/api/sandboxHubs.js +49 -0
- package/api/sandboxSync.d.ts +4 -0
- package/api/sandboxSync.js +26 -0
- package/api/secrets.d.ts +6 -0
- package/api/secrets.js +37 -0
- package/api/validateHubl.d.ts +3 -0
- package/api/validateHubl.js +15 -0
- package/config/CLIConfiguration.d.ts +62 -0
- package/config/CLIConfiguration.js +467 -0
- package/config/configFile.d.ts +21 -0
- package/config/configFile.js +102 -0
- package/config/configUtils.d.ts +5 -0
- package/config/configUtils.js +87 -0
- package/config/config_DEPRECATED.d.ts +75 -0
- package/config/config_DEPRECATED.js +678 -0
- package/config/environment.d.ts +2 -0
- package/config/environment.js +60 -0
- package/config/getAccountIdentifier.d.ts +2 -0
- package/config/getAccountIdentifier.js +15 -0
- package/config/index.d.ts +41 -0
- package/config/index.js +260 -0
- package/constants/api.d.ts +15 -0
- package/constants/api.js +18 -0
- package/constants/auth.d.ts +37 -0
- package/constants/auth.js +38 -0
- package/constants/config.d.ts +18 -0
- package/constants/config.js +22 -0
- package/constants/environments.d.ts +15 -0
- package/constants/environments.js +18 -0
- package/constants/extensions.d.ts +6 -0
- package/constants/extensions.js +28 -0
- package/constants/files.d.ts +21 -0
- package/constants/files.js +24 -0
- package/constants/ports.d.ts +3 -0
- package/constants/ports.js +6 -0
- package/enums/build.d.ts +36 -0
- package/enums/build.js +39 -0
- package/enums/deploy.d.ts +11 -0
- package/enums/deploy.js +14 -0
- package/enums/project.d.ts +6 -0
- package/enums/project.js +9 -0
- package/errors/errors_DEPRECATED.d.ts +3 -0
- package/errors/errors_DEPRECATED.js +60 -0
- package/errors/index.d.ts +18 -0
- package/errors/index.js +63 -0
- package/http/addQueryParams.d.ts +2 -0
- package/http/addQueryParams.js +14 -0
- package/http/getAxiosConfig.d.ts +9 -0
- package/http/getAxiosConfig.js +66 -0
- package/http/index.d.ts +17 -0
- package/http/index.js +173 -0
- package/http/unauthed.d.ts +15 -0
- package/http/unauthed.js +38 -0
- package/lang/en.json +389 -0
- package/lib/archive.d.ts +3 -0
- package/lib/archive.js +117 -0
- package/lib/cms/functions.d.ts +8 -0
- package/lib/cms/functions.js +181 -0
- package/lib/cms/handleFieldsJS.d.ts +33 -0
- package/lib/cms/handleFieldsJS.js +148 -0
- package/lib/cms/modules.d.ts +14 -0
- package/lib/cms/modules.js +186 -0
- package/lib/cms/processFieldsJs.d.ts +1 -0
- package/lib/cms/processFieldsJs.js +97 -0
- package/lib/cms/templates.d.ts +65 -0
- package/lib/cms/templates.js +107 -0
- package/lib/cms/themes.d.ts +2 -0
- package/lib/cms/themes.js +34 -0
- package/lib/cms/uploadFolder.d.ts +7 -0
- package/lib/cms/uploadFolder.js +202 -0
- package/lib/cms/validate.d.ts +2 -0
- package/lib/cms/validate.js +40 -0
- package/lib/cms/watch.d.ts +4 -0
- package/lib/cms/watch.js +201 -0
- package/lib/customObjects.d.ts +5 -0
- package/lib/customObjects.js +42 -0
- package/lib/environment.d.ts +2 -0
- package/lib/environment.js +16 -0
- package/lib/escapeRegExp.d.ts +1 -0
- package/lib/escapeRegExp.js +7 -0
- package/lib/fileManager.d.ts +2 -0
- package/lib/fileManager.js +184 -0
- package/lib/fileMapper.d.ts +18 -0
- package/lib/fileMapper.js +317 -0
- package/lib/fs.d.ts +4 -0
- package/lib/fs.js +71 -0
- package/lib/github.d.ts +8 -0
- package/lib/github.js +167 -0
- package/lib/gitignore.d.ts +3 -0
- package/lib/gitignore.js +49 -0
- package/lib/hubdb.d.ts +17 -0
- package/lib/hubdb.js +133 -0
- package/lib/ignoreRules.d.ts +3 -0
- package/lib/ignoreRules.js +69 -0
- package/lib/logger.d.ts +56 -0
- package/lib/logger.js +146 -0
- package/lib/notify.d.ts +1 -0
- package/lib/notify.js +43 -0
- package/lib/oauth.d.ts +4 -0
- package/lib/oauth.js +34 -0
- package/lib/path.d.ts +14 -0
- package/lib/path.js +134 -0
- package/lib/personalAccessKey.d.ts +10 -0
- package/lib/personalAccessKey.js +163 -0
- package/lib/portManager.d.ts +10 -0
- package/lib/portManager.js +46 -0
- package/lib/text.d.ts +2 -0
- package/lib/text.js +24 -0
- package/lib/trackUsage.d.ts +1 -0
- package/lib/trackUsage.js +63 -0
- package/lib/urls.d.ts +2 -0
- package/lib/urls.js +24 -0
- package/models/FileSystemError.d.ts +6 -0
- package/models/FileSystemError.js +47 -0
- package/models/HubSpotHttpError.d.ts +24 -0
- package/models/HubSpotHttpError.js +197 -0
- package/models/OAuth2Manager.d.ts +12 -0
- package/models/OAuth2Manager.js +105 -0
- package/package.json +81 -0
- package/types/Accounts.d.ts +178 -0
- package/types/Accounts.js +2 -0
- package/types/Activity.d.ts +20 -0
- package/types/Activity.js +2 -0
- package/types/Api.d.ts +2 -0
- package/types/Api.js +2 -0
- package/types/Apps.d.ts +77 -0
- package/types/Apps.js +2 -0
- package/types/Archive.d.ts +9 -0
- package/types/Archive.js +2 -0
- package/types/Build.d.ts +41 -0
- package/types/Build.js +2 -0
- package/types/CLIOptions.d.ts +8 -0
- package/types/CLIOptions.js +2 -0
- package/types/ComponentStructure.d.ts +40 -0
- package/types/ComponentStructure.js +2 -0
- package/types/Config.d.ts +37 -0
- package/types/Config.js +2 -0
- package/types/Deploy.d.ts +42 -0
- package/types/Deploy.js +2 -0
- package/types/DesignManager.d.ts +10 -0
- package/types/DesignManager.js +2 -0
- package/types/Error.d.ts +37 -0
- package/types/Error.js +2 -0
- package/types/FieldsJS.d.ts +1 -0
- package/types/FieldsJS.js +2 -0
- package/types/FileManager.d.ts +71 -0
- package/types/FileManager.js +2 -0
- package/types/Files.d.ts +79 -0
- package/types/Files.js +2 -0
- package/types/Functions.d.ts +66 -0
- package/types/Functions.js +2 -0
- package/types/Github.d.ts +76 -0
- package/types/Github.js +2 -0
- package/types/Http.d.ts +29 -0
- package/types/Http.js +2 -0
- package/types/Hubdb.d.ts +109 -0
- package/types/Hubdb.js +2 -0
- package/types/HublValidation.d.ts +59 -0
- package/types/HublValidation.js +2 -0
- package/types/Lang.d.ts +10 -0
- package/types/Lang.js +2 -0
- package/types/Lighthouse.d.ts +25 -0
- package/types/Lighthouse.js +2 -0
- package/types/MarketplaceValidation.d.ts +28 -0
- package/types/MarketplaceValidation.js +2 -0
- package/types/Migration.d.ts +28 -0
- package/types/Migration.js +10 -0
- package/types/Modules.d.ts +16 -0
- package/types/Modules.js +2 -0
- package/types/PortManager.d.ts +11 -0
- package/types/PortManager.js +2 -0
- package/types/Project.d.ts +42 -0
- package/types/Project.js +2 -0
- package/types/ProjectLog.d.ts +9 -0
- package/types/ProjectLog.js +2 -0
- package/types/Sandbox.d.ts +155 -0
- package/types/Sandbox.js +2 -0
- package/types/Schemas.d.ts +39 -0
- package/types/Schemas.js +2 -0
- package/types/Secrets.d.ts +3 -0
- package/types/Secrets.js +2 -0
- package/types/Utils.d.ts +6 -0
- package/types/Utils.js +2 -0
- package/types/developerTestAccounts.d.ts +12 -0
- package/types/developerTestAccounts.js +2 -0
- package/utils/PortManagerServer.d.ts +26 -0
- package/utils/PortManagerServer.js +158 -0
- package/utils/accounts.d.ts +4 -0
- package/utils/accounts.js +28 -0
- package/utils/cms/fieldsJS.d.ts +2 -0
- package/utils/cms/fieldsJS.js +18 -0
- package/utils/cms/modules.d.ts +4 -0
- package/utils/cms/modules.js +54 -0
- package/utils/detectPort.d.ts +1 -0
- package/utils/detectPort.js +102 -0
- package/utils/git.d.ts +3 -0
- package/utils/git.js +71 -0
- package/utils/lang.d.ts +6 -0
- package/utils/lang.js +88 -0
package/types/Http.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
/// <reference types="node" />
|
|
3
|
+
/// <reference types="node" />
|
|
4
|
+
import { ResponseType } from 'axios';
|
|
5
|
+
import { ReadStream } from 'fs';
|
|
6
|
+
import { Stream } from 'stream';
|
|
7
|
+
export type Data = {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
export type QueryParams = {
|
|
11
|
+
[key: string]: string | number | boolean | undefined;
|
|
12
|
+
};
|
|
13
|
+
export type FormData = {
|
|
14
|
+
[key: string]: string | ReadStream;
|
|
15
|
+
};
|
|
16
|
+
export type HttpOptions = {
|
|
17
|
+
baseURL?: string;
|
|
18
|
+
url: string;
|
|
19
|
+
env?: string;
|
|
20
|
+
localHostOverride?: boolean;
|
|
21
|
+
data?: Data | string | ArrayBuffer | ArrayBufferView | URLSearchParams | Stream | Buffer;
|
|
22
|
+
resolveWithFullResponse?: boolean;
|
|
23
|
+
params?: QueryParams;
|
|
24
|
+
timeout?: number;
|
|
25
|
+
responseType?: ResponseType;
|
|
26
|
+
headers?: {
|
|
27
|
+
[header: string]: string | string[] | undefined;
|
|
28
|
+
};
|
|
29
|
+
};
|
package/types/Http.js
ADDED
package/types/Hubdb.d.ts
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export type Schema = {
|
|
2
|
+
label: string;
|
|
3
|
+
name: string;
|
|
4
|
+
columns: Array<Column>;
|
|
5
|
+
useForPages: boolean;
|
|
6
|
+
allowChildTables: boolean;
|
|
7
|
+
enableChildTablePages: boolean;
|
|
8
|
+
allowPublicApiAccess: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type Table = {
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
portalId?: number;
|
|
14
|
+
createdAt: string;
|
|
15
|
+
publishedAt: string;
|
|
16
|
+
updatedAt: string;
|
|
17
|
+
label: string;
|
|
18
|
+
columns: Array<Column>;
|
|
19
|
+
rows?: Array<Row>;
|
|
20
|
+
partitioningSettings?: {
|
|
21
|
+
teamIds: Array<any>;
|
|
22
|
+
userIds: Array<any>;
|
|
23
|
+
};
|
|
24
|
+
published?: boolean;
|
|
25
|
+
cosObjectType?: string;
|
|
26
|
+
updated?: number;
|
|
27
|
+
archived: boolean;
|
|
28
|
+
columnCount?: number;
|
|
29
|
+
cdnPurgeEmbargoTime?: number | null;
|
|
30
|
+
rowCount: number;
|
|
31
|
+
createdBy?: {
|
|
32
|
+
id: string;
|
|
33
|
+
email: string;
|
|
34
|
+
firstName: string;
|
|
35
|
+
lastName: string;
|
|
36
|
+
};
|
|
37
|
+
useForPages: boolean;
|
|
38
|
+
allowChildTables: boolean;
|
|
39
|
+
enableChildTablePages: boolean;
|
|
40
|
+
crmObjectTypeId?: number;
|
|
41
|
+
dynamicMetaTags?: {
|
|
42
|
+
[key: string]: number;
|
|
43
|
+
};
|
|
44
|
+
allowPublicApiAccess: boolean;
|
|
45
|
+
};
|
|
46
|
+
export type Column = {
|
|
47
|
+
name: string;
|
|
48
|
+
label: string;
|
|
49
|
+
id?: string;
|
|
50
|
+
archived?: boolean;
|
|
51
|
+
type: string;
|
|
52
|
+
deleted?: boolean;
|
|
53
|
+
foreignIdsByName?: {
|
|
54
|
+
[key: string]: {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
type: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
foreignIdsById?: {
|
|
61
|
+
[key: string]: {
|
|
62
|
+
id: string;
|
|
63
|
+
name: string;
|
|
64
|
+
type: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export type Row = {
|
|
69
|
+
id: string;
|
|
70
|
+
createdAt: string;
|
|
71
|
+
updatedAt: string;
|
|
72
|
+
publishedAt: string | null;
|
|
73
|
+
values: {
|
|
74
|
+
text_column?: string;
|
|
75
|
+
number_column?: number;
|
|
76
|
+
multiselect?: Array<any>;
|
|
77
|
+
};
|
|
78
|
+
path: string | null;
|
|
79
|
+
name: string | null;
|
|
80
|
+
childTableId?: string;
|
|
81
|
+
isSoftEditable?: boolean;
|
|
82
|
+
};
|
|
83
|
+
export type CreateRowsResponse = {
|
|
84
|
+
status: string;
|
|
85
|
+
results: Array<Row>;
|
|
86
|
+
startedAt?: string;
|
|
87
|
+
completedAt?: string;
|
|
88
|
+
links?: {
|
|
89
|
+
[key: string]: any;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
export type FetchRowsResponse = {
|
|
93
|
+
total: number;
|
|
94
|
+
results: Array<Row>;
|
|
95
|
+
paging?: {
|
|
96
|
+
next: {
|
|
97
|
+
after: string | null;
|
|
98
|
+
};
|
|
99
|
+
} | null;
|
|
100
|
+
};
|
|
101
|
+
export type FetchTablesResponse = {
|
|
102
|
+
total: number;
|
|
103
|
+
results: Array<Table>;
|
|
104
|
+
paging?: {
|
|
105
|
+
next: {
|
|
106
|
+
after: string | null;
|
|
107
|
+
};
|
|
108
|
+
} | null;
|
|
109
|
+
};
|
package/types/Hubdb.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export type HublValidationOptions = {
|
|
2
|
+
is_available_for_new_content?: boolean;
|
|
3
|
+
template_type?: string;
|
|
4
|
+
template_path?: string;
|
|
5
|
+
module_path?: string;
|
|
6
|
+
};
|
|
7
|
+
export type HubLValidationError = {
|
|
8
|
+
reason: string;
|
|
9
|
+
message: string;
|
|
10
|
+
lineno: number;
|
|
11
|
+
startPosition: number;
|
|
12
|
+
categoryErrors: {
|
|
13
|
+
fullName?: string;
|
|
14
|
+
path?: string;
|
|
15
|
+
};
|
|
16
|
+
category: string;
|
|
17
|
+
severity?: string;
|
|
18
|
+
};
|
|
19
|
+
export type LintResult = {
|
|
20
|
+
file: string;
|
|
21
|
+
validation: Validation | null;
|
|
22
|
+
};
|
|
23
|
+
export type Validation = {
|
|
24
|
+
meta: {
|
|
25
|
+
all_widgets: Array<string>;
|
|
26
|
+
widgets_in_rich_text: Array<string>;
|
|
27
|
+
editable_flex_areas: Array<string>;
|
|
28
|
+
editable_layout_sections: {
|
|
29
|
+
key: string;
|
|
30
|
+
} | null;
|
|
31
|
+
email_style_settings: {
|
|
32
|
+
key: string;
|
|
33
|
+
} | null;
|
|
34
|
+
sms_flex_area: Array<string>;
|
|
35
|
+
google_font_variations: {
|
|
36
|
+
key: string;
|
|
37
|
+
} | null;
|
|
38
|
+
custom_font_variations: Array<string>;
|
|
39
|
+
has_style_tag: boolean;
|
|
40
|
+
has_header_tag: boolean;
|
|
41
|
+
output_html: string;
|
|
42
|
+
has_menu_tag: boolean;
|
|
43
|
+
has_theme_setting_function: boolean;
|
|
44
|
+
template_source: string;
|
|
45
|
+
attribute_defaults?: {
|
|
46
|
+
key: string;
|
|
47
|
+
} | null;
|
|
48
|
+
template_errors: Array<HubLValidationError>;
|
|
49
|
+
path_dependencies: Array<string>;
|
|
50
|
+
theme_field_dependencies: Array<string>;
|
|
51
|
+
template_type_ids?: {
|
|
52
|
+
key: string;
|
|
53
|
+
} | null;
|
|
54
|
+
exact_path_references: Array<string>;
|
|
55
|
+
required_scopes_to_render: Array<string>;
|
|
56
|
+
};
|
|
57
|
+
renderingErrors: Array<HubLValidationError>;
|
|
58
|
+
html: string;
|
|
59
|
+
};
|
package/types/Lang.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import lang from '../lang/en.json';
|
|
2
|
+
import { Leaves } from './Utils';
|
|
3
|
+
export type GenericLanguageObject = {
|
|
4
|
+
[key: string]: string | GenericLanguageObject;
|
|
5
|
+
};
|
|
6
|
+
export type LanguageObject = typeof lang;
|
|
7
|
+
export type LangKey = Leaves<LanguageObject>;
|
|
8
|
+
export type InterpolationData = {
|
|
9
|
+
[identifier: string]: string | number;
|
|
10
|
+
};
|
package/types/Lang.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type RequestLighthouseScoreResponse = {
|
|
2
|
+
desktopId: number;
|
|
3
|
+
mobileId: number;
|
|
4
|
+
};
|
|
5
|
+
export type GetLighthouseScoreResponse = {
|
|
6
|
+
portalId: number;
|
|
7
|
+
themePath: string;
|
|
8
|
+
status: string;
|
|
9
|
+
scores: [
|
|
10
|
+
{
|
|
11
|
+
accessibilityScore: number;
|
|
12
|
+
bestPracticesScore: number;
|
|
13
|
+
performanceScore: number;
|
|
14
|
+
pwaScore: number;
|
|
15
|
+
seoScore: number;
|
|
16
|
+
runWarnings: Array<string>;
|
|
17
|
+
auditDetails: null;
|
|
18
|
+
emulatedFormFactor: string;
|
|
19
|
+
templatePath: string | null;
|
|
20
|
+
link: string | null;
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
failedTemplatePaths: Array<string>;
|
|
24
|
+
error: Error | null;
|
|
25
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
type Check = {
|
|
2
|
+
check: string;
|
|
3
|
+
status: string;
|
|
4
|
+
title: string;
|
|
5
|
+
documentationLink: string;
|
|
6
|
+
message: string | null;
|
|
7
|
+
description: string;
|
|
8
|
+
line: number | null;
|
|
9
|
+
file: string;
|
|
10
|
+
};
|
|
11
|
+
export type GetValidationResultsResponse = {
|
|
12
|
+
validationRequestId: number;
|
|
13
|
+
assetPath: string;
|
|
14
|
+
assetType: string;
|
|
15
|
+
results: {
|
|
16
|
+
REQUIRED: {
|
|
17
|
+
status: string;
|
|
18
|
+
results: Array<Check>;
|
|
19
|
+
};
|
|
20
|
+
RECOMMENDED: {
|
|
21
|
+
status: string;
|
|
22
|
+
results: Array<Check>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
errors: Array<Error>;
|
|
26
|
+
requestedAt: string;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ValueOf } from './Utils';
|
|
2
|
+
import { OptionalError } from './Error';
|
|
3
|
+
export declare const MIGRATION_STATUS: {
|
|
4
|
+
readonly BUILDING: "BUILDING";
|
|
5
|
+
readonly FAILURE: "FAILURE";
|
|
6
|
+
readonly PREPARING: "PREPARING";
|
|
7
|
+
readonly PENDING: "PENDING";
|
|
8
|
+
readonly SUCCESS: "SUCCESS";
|
|
9
|
+
};
|
|
10
|
+
export type MigrateAppResponse = {
|
|
11
|
+
id: number;
|
|
12
|
+
status: ValueOf<typeof MIGRATION_STATUS>;
|
|
13
|
+
};
|
|
14
|
+
export type CloneAppResponse = {
|
|
15
|
+
exportId: number;
|
|
16
|
+
status: ValueOf<typeof MIGRATION_STATUS>;
|
|
17
|
+
};
|
|
18
|
+
export type PollAppResponse = {
|
|
19
|
+
id: number;
|
|
20
|
+
project?: {
|
|
21
|
+
id: number;
|
|
22
|
+
name: string;
|
|
23
|
+
buildId: number;
|
|
24
|
+
deployId: number;
|
|
25
|
+
};
|
|
26
|
+
error?: OptionalError;
|
|
27
|
+
status: ValueOf<typeof MIGRATION_STATUS>;
|
|
28
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MIGRATION_STATUS = void 0;
|
|
4
|
+
exports.MIGRATION_STATUS = {
|
|
5
|
+
BUILDING: 'BUILDING',
|
|
6
|
+
FAILURE: 'FAILURE',
|
|
7
|
+
PREPARING: 'PREPARING',
|
|
8
|
+
PENDING: 'PENDING',
|
|
9
|
+
SUCCESS: 'SUCCESS',
|
|
10
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type PathInput = {
|
|
2
|
+
isLocal?: boolean;
|
|
3
|
+
isHubSpot?: boolean;
|
|
4
|
+
path: string;
|
|
5
|
+
};
|
|
6
|
+
export type ValidationResult = {
|
|
7
|
+
id: string;
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
export type ModuleDefinition = {
|
|
11
|
+
contentTypes: Array<string>;
|
|
12
|
+
moduleLabel: string;
|
|
13
|
+
reactType: boolean;
|
|
14
|
+
global: boolean;
|
|
15
|
+
availableForNewContent: boolean;
|
|
16
|
+
};
|
package/types/Modules.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type RequestPortsData = {
|
|
2
|
+
instanceId: string;
|
|
3
|
+
port?: number;
|
|
4
|
+
};
|
|
5
|
+
export type NetError = Error & {
|
|
6
|
+
code: string;
|
|
7
|
+
};
|
|
8
|
+
export type ListenCallback = (error: NetError | null, port: number) => void;
|
|
9
|
+
export type ServerPortMap = {
|
|
10
|
+
[instanceId: string]: number;
|
|
11
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Build } from './Build';
|
|
2
|
+
import { GithubSourceData } from './Github';
|
|
3
|
+
export type Project = {
|
|
4
|
+
createdAt: number;
|
|
5
|
+
deletedAt: number;
|
|
6
|
+
deployedBuild?: Build;
|
|
7
|
+
deployedBuildId?: number;
|
|
8
|
+
id: number;
|
|
9
|
+
isLocked: boolean;
|
|
10
|
+
latestBuild?: Build;
|
|
11
|
+
name: string;
|
|
12
|
+
portalId: number;
|
|
13
|
+
sourceIntegration?: GithubSourceData;
|
|
14
|
+
updatedAt: number;
|
|
15
|
+
};
|
|
16
|
+
export type FetchProjectResponse = {
|
|
17
|
+
results: Array<Project>;
|
|
18
|
+
};
|
|
19
|
+
export type UploadProjectResponse = {
|
|
20
|
+
buildId: number;
|
|
21
|
+
projectTree: {
|
|
22
|
+
path: string;
|
|
23
|
+
name: string;
|
|
24
|
+
parentPath: string;
|
|
25
|
+
updatedAt: number;
|
|
26
|
+
children: Array<UploadProjectResponse>;
|
|
27
|
+
folder: boolean;
|
|
28
|
+
};
|
|
29
|
+
buildStatusTaskLocator: {
|
|
30
|
+
id: string;
|
|
31
|
+
links: {
|
|
32
|
+
status: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export type ProjectSettings = {
|
|
37
|
+
isAutoDeployEnabled: boolean;
|
|
38
|
+
};
|
|
39
|
+
export type FetchPlatformVersionResponse = {
|
|
40
|
+
defaultPlatformVersion: string;
|
|
41
|
+
activePlatformVersions: Array<string>;
|
|
42
|
+
};
|
package/types/Project.js
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
export type SandboxHubData = {
|
|
2
|
+
type?: string | null;
|
|
3
|
+
parentHubId?: number;
|
|
4
|
+
};
|
|
5
|
+
type User = {
|
|
6
|
+
userId: number;
|
|
7
|
+
firstName: string;
|
|
8
|
+
lastName: string;
|
|
9
|
+
gdprDeleted?: boolean;
|
|
10
|
+
removed?: boolean;
|
|
11
|
+
deactivated?: boolean;
|
|
12
|
+
};
|
|
13
|
+
type TaskError = {
|
|
14
|
+
message: string;
|
|
15
|
+
in: string;
|
|
16
|
+
code: string;
|
|
17
|
+
subCategory: string;
|
|
18
|
+
context: {
|
|
19
|
+
missingScopes: Array<string>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
type MutationError = {
|
|
23
|
+
message: string;
|
|
24
|
+
portableKey: string;
|
|
25
|
+
subResource: {
|
|
26
|
+
type: string;
|
|
27
|
+
key: string;
|
|
28
|
+
};
|
|
29
|
+
standardError: {
|
|
30
|
+
status: string;
|
|
31
|
+
id: string;
|
|
32
|
+
category: string;
|
|
33
|
+
subCategory: {
|
|
34
|
+
[key: string]: string;
|
|
35
|
+
};
|
|
36
|
+
message: string;
|
|
37
|
+
errors: Array<TaskError>;
|
|
38
|
+
context: {
|
|
39
|
+
additionalProp1: Array<string>;
|
|
40
|
+
additionalProp2: Array<string>;
|
|
41
|
+
additionalProp3: Array<string>;
|
|
42
|
+
};
|
|
43
|
+
links: {
|
|
44
|
+
additionalProp1: string;
|
|
45
|
+
additionalProp2: string;
|
|
46
|
+
additionalProp3: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
type SyncMutationData = {
|
|
51
|
+
numRequests: number;
|
|
52
|
+
numSuccesses: number;
|
|
53
|
+
errors: Array<TaskError>;
|
|
54
|
+
mutationErrors: Array<MutationError>;
|
|
55
|
+
};
|
|
56
|
+
export type CompositeSyncTask = {
|
|
57
|
+
id: string;
|
|
58
|
+
parentHubId: number;
|
|
59
|
+
sandboxHubId: number;
|
|
60
|
+
fromHubId: number;
|
|
61
|
+
toHubId: number;
|
|
62
|
+
command: string;
|
|
63
|
+
type: string;
|
|
64
|
+
status: string;
|
|
65
|
+
result: string;
|
|
66
|
+
sandboxType: string;
|
|
67
|
+
requestedAt: string;
|
|
68
|
+
requestedByUserId: number;
|
|
69
|
+
requestedByUser: User;
|
|
70
|
+
startedAt: string;
|
|
71
|
+
completedAt: string;
|
|
72
|
+
error: MutationError;
|
|
73
|
+
creates: SyncMutationData;
|
|
74
|
+
updates: SyncMutationData;
|
|
75
|
+
deletes: SyncMutationData;
|
|
76
|
+
diffSummary: string;
|
|
77
|
+
portableKeys: Array<string>;
|
|
78
|
+
};
|
|
79
|
+
export type SyncTask = {
|
|
80
|
+
id: string;
|
|
81
|
+
parentHubId: number;
|
|
82
|
+
sandboxHubId: number;
|
|
83
|
+
fromHubId: number;
|
|
84
|
+
toHubId: number;
|
|
85
|
+
command: string;
|
|
86
|
+
status: string;
|
|
87
|
+
result: string;
|
|
88
|
+
sandboxType: string;
|
|
89
|
+
requestedAt: string;
|
|
90
|
+
requestedByUserId: number;
|
|
91
|
+
requestedByUser: User;
|
|
92
|
+
startedAt: string;
|
|
93
|
+
completedAt: string;
|
|
94
|
+
tasks: Array<CompositeSyncTask>;
|
|
95
|
+
};
|
|
96
|
+
export type Sandbox = {
|
|
97
|
+
sandboxHubId: number;
|
|
98
|
+
parentHubId: number;
|
|
99
|
+
createdAt: string;
|
|
100
|
+
updatedAt?: string | null;
|
|
101
|
+
archivedAt?: string | null;
|
|
102
|
+
type: string;
|
|
103
|
+
archived: boolean;
|
|
104
|
+
name: string;
|
|
105
|
+
domain: string;
|
|
106
|
+
createdByUser: User;
|
|
107
|
+
updatedByUser?: User | null;
|
|
108
|
+
lastSync?: SyncTask;
|
|
109
|
+
currentUserHasAccess?: boolean;
|
|
110
|
+
currentUserHasSuperAdminAccess?: boolean;
|
|
111
|
+
requestAccessFrom?: User | null;
|
|
112
|
+
superAdminsInSandbox?: number;
|
|
113
|
+
};
|
|
114
|
+
export type SandboxResponse = {
|
|
115
|
+
sandbox: Sandbox;
|
|
116
|
+
personalAccessKey: string;
|
|
117
|
+
};
|
|
118
|
+
export type Usage = {
|
|
119
|
+
STANDARD: {
|
|
120
|
+
used: number;
|
|
121
|
+
available: number;
|
|
122
|
+
limit: number;
|
|
123
|
+
};
|
|
124
|
+
DEVELOPER: {
|
|
125
|
+
used: number;
|
|
126
|
+
available: number;
|
|
127
|
+
limit: number;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
export type SandboxUsageLimitsResponse = {
|
|
131
|
+
usage: Usage;
|
|
132
|
+
};
|
|
133
|
+
export type TaskRequestData = {
|
|
134
|
+
type: string;
|
|
135
|
+
};
|
|
136
|
+
export type InitiateSyncResponse = {
|
|
137
|
+
links: {
|
|
138
|
+
status: string;
|
|
139
|
+
};
|
|
140
|
+
sync: SyncTask;
|
|
141
|
+
id: string;
|
|
142
|
+
};
|
|
143
|
+
export type SandboxType = {
|
|
144
|
+
name: string;
|
|
145
|
+
dependsOn: Array<string>;
|
|
146
|
+
pushToProductionEnabled: boolean;
|
|
147
|
+
isBeta: boolean;
|
|
148
|
+
diffEnabled: boolean;
|
|
149
|
+
groupType: string;
|
|
150
|
+
syncMandatory: boolean;
|
|
151
|
+
};
|
|
152
|
+
export type FetchTypesResponse = {
|
|
153
|
+
results: Array<SandboxType>;
|
|
154
|
+
};
|
|
155
|
+
export {};
|
package/types/Sandbox.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type Schema = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
createdAt?: string;
|
|
5
|
+
updatedAt?: string;
|
|
6
|
+
properties: Array<any>;
|
|
7
|
+
associations: Array<{
|
|
8
|
+
id: string;
|
|
9
|
+
fromObjectTypeId: string;
|
|
10
|
+
toObjectTypeId: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
createdAt?: string | null;
|
|
13
|
+
updatedAt?: string | null;
|
|
14
|
+
}>;
|
|
15
|
+
labels: {
|
|
16
|
+
singular?: string;
|
|
17
|
+
plural?: string;
|
|
18
|
+
};
|
|
19
|
+
requiredProperties: Array<string>;
|
|
20
|
+
searchableProperties?: Array<string>;
|
|
21
|
+
primaryDisplayProperty?: string;
|
|
22
|
+
fullyQualifiedName?: string;
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
};
|
|
25
|
+
export type FetchSchemasResponse = {
|
|
26
|
+
results: Array<Schema>;
|
|
27
|
+
};
|
|
28
|
+
export type CreateObjectsResponse = {
|
|
29
|
+
status: string;
|
|
30
|
+
startedAt: string;
|
|
31
|
+
completedAt: string;
|
|
32
|
+
results: Array<{
|
|
33
|
+
id: string;
|
|
34
|
+
properties: Array<any>;
|
|
35
|
+
createdAt: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
archived: boolean;
|
|
38
|
+
}>;
|
|
39
|
+
};
|
package/types/Schemas.js
ADDED
package/types/Secrets.js
ADDED
package/types/Utils.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type ValueOf<T> = T[keyof T];
|
|
2
|
+
type Join<K, P> = K extends string | number ? P extends string | number ? `${K}${'' extends P ? '' : '.'}${P}` : never : never;
|
|
3
|
+
export type Leaves<T> = [10] extends [never] ? never : T extends object ? {
|
|
4
|
+
[K in keyof T]-?: Join<K, Leaves<T[K]>>;
|
|
5
|
+
}[keyof T] : '';
|
|
6
|
+
export {};
|
package/types/Utils.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type DeveloperTestAccount = {
|
|
2
|
+
testPortalId: number;
|
|
3
|
+
parentPortalId: number;
|
|
4
|
+
accountName: string;
|
|
5
|
+
createdAt: string;
|
|
6
|
+
updatedAt: string;
|
|
7
|
+
status: string;
|
|
8
|
+
};
|
|
9
|
+
export type FetchDeveloperTestAccountsResponse = {
|
|
10
|
+
results: DeveloperTestAccount[];
|
|
11
|
+
maxTestPortals: number;
|
|
12
|
+
};
|