@hubspot/local-dev-lib 2.1.1 → 2.1.2-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/lib/oauth.js CHANGED
@@ -4,7 +4,7 @@ exports.addOauthToAccountConfig = exports.getOauthManager = void 0;
4
4
  const OAuth2Manager_1 = require("../models/OAuth2Manager");
5
5
  const auth_1 = require("../constants/auth");
6
6
  const logger_1 = require("./logger");
7
- const getAccountIdentifier_1 = require("../utils/getAccountIdentifier");
7
+ const getAccountIdentifier_1 = require("../config/getAccountIdentifier");
8
8
  const config_1 = require("../config");
9
9
  const lang_1 = require("../utils/lang");
10
10
  const i18nKey = 'lib.oauth';
@@ -13,6 +13,7 @@ const config_1 = require("../config");
13
13
  const config_2 = require("../constants/config");
14
14
  const developerTestAccounts_1 = require("../api/developerTestAccounts");
15
15
  const logger_1 = require("./logger");
16
+ const CLIConfiguration_1 = require("../config/CLIConfiguration");
16
17
  const lang_1 = require("../utils/lang");
17
18
  const errors_1 = require("../errors");
18
19
  const i18nKey = 'lib.personalAccessKey';
@@ -141,7 +142,7 @@ async function updateConfigWithAccessToken(token, personalAccessKey, env, name,
141
142
  }
142
143
  logger_1.logger.debug(err);
143
144
  }
144
- const updatedConfig = (0, config_1.updateAccountConfig)({
145
+ const updatedAccount = (0, config_1.updateAccountConfig)({
145
146
  accountId: portalId,
146
147
  accountType,
147
148
  personalAccessKey,
@@ -151,10 +152,12 @@ async function updateConfigWithAccessToken(token, personalAccessKey, env, name,
151
152
  parentAccountId,
152
153
  env: accountEnv,
153
154
  });
154
- (0, config_1.writeConfig)();
155
+ if (!CLIConfiguration_1.CLIConfiguration.isActive()) {
156
+ (0, config_1.writeConfig)();
157
+ }
155
158
  if (makeDefault && name) {
156
159
  (0, config_1.updateDefaultAccount)(name);
157
160
  }
158
- return updatedConfig;
161
+ return updatedAccount;
159
162
  }
160
163
  exports.updateConfigWithAccessToken = updateConfigWithAccessToken;
@@ -9,7 +9,7 @@ const moment_1 = __importDefault(require("moment"));
9
9
  const urls_1 = require("../lib/urls");
10
10
  const environment_1 = require("../lib/environment");
11
11
  const logger_1 = require("../lib/logger");
12
- const getAccountIdentifier_1 = require("../utils/getAccountIdentifier");
12
+ const getAccountIdentifier_1 = require("../config/getAccountIdentifier");
13
13
  const auth_1 = require("../constants/auth");
14
14
  const lang_1 = require("../utils/lang");
15
15
  const i18nKey = 'models.OAuth2Manager';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/local-dev-lib",
3
- "version": "2.1.1",
3
+ "version": "2.1.2-beta.0",
4
4
  "description": "Provides library functionality for HubSpot local development tooling, including the HubSpot CLI",
5
5
  "main": "lib/index.js",
6
6
  "repository": {
@@ -12,22 +12,16 @@
12
12
  "access": "public"
13
13
  },
14
14
  "scripts": {
15
- "build": "rm -rf ./dist/ && tsc --rootDir . --outdir dist && yarn copy-files && yarn clear-postinstall",
16
- "check-main": "branch=$(git rev-parse --abbrev-ref HEAD) && [ $branch = main ] || (echo 'Error: New release can only be published on main branch' && exit 1)",
17
- "clear-postinstall": "cd dist && npm pkg delete scripts.postinstall",
18
- "copy-files": "cp -r lang dist/lang",
15
+ "build": "ts-node ./scripts/build.ts",
19
16
  "lint": "eslint --max-warnings=0 . && prettier . --check",
20
17
  "local-dev": "yarn build && cd dist && yarn link && cd .. && tsc --watch --rootDir . --outdir dist",
21
18
  "prettier:write": "prettier . --write",
22
- "pub": "cd dist && npm publish --tag latest && cd ..",
23
- "push": "git push --atomic origin main v$npm_package_version",
24
- "release:major": "yarn check-main && yarn version --major && yarn build && yarn pub && yarn push",
25
- "release:minor": "yarn check-main && yarn version --minor && yarn build && yarn pub && yarn push",
26
- "release:patch": "yarn check-main && yarn version --patch && yarn build && yarn pub && yarn push",
19
+ "release": "ts-node ./scripts/release.ts release",
27
20
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ./node_modules/.bin/jest"
28
21
  },
29
22
  "license": "Apache-2.0",
30
23
  "devDependencies": {
24
+ "@inquirer/prompts": "^7.0.1",
31
25
  "@types/content-disposition": "^0.5.5",
32
26
  "@types/cors": "^2.8.15",
33
27
  "@types/debounce": "^1.2.1",
@@ -45,7 +39,9 @@
45
39
  "husky": "^8.0.0",
46
40
  "jest": "^29.5.0",
47
41
  "ts-jest": "^29.0.5",
48
- "typescript": "^4.9.5"
42
+ "ts-node": "^10.9.2",
43
+ "typescript": "^4.9.5",
44
+ "yargs": "^17.7.2"
49
45
  },
50
46
  "exports": {
51
47
  "./*": "./lib/*.js",
@@ -53,6 +49,7 @@
53
49
  "./errors/*": "./errors/*.js",
54
50
  "./http": "./http/index.js",
55
51
  "./http/*": "./http/*.js",
52
+ "./config/getAccountIdentifier": "./config/getAccountIdentifier.js",
56
53
  "./config": "./config/index.js",
57
54
  "./constants/*": "./constants/*.js",
58
55
  "./models/*": "./models/*.js",
@@ -1,5 +1,4 @@
1
- import { CLIAccount, GenericAccount } from '../types/Accounts';
1
+ import { CLIAccount } from '../types/Accounts';
2
2
  import { CLIConfig } from '../types/Config';
3
- export declare function getAccountIdentifier(account?: GenericAccount | null): number | undefined;
4
3
  export declare function getAccounts(config?: CLIConfig | null): Array<CLIAccount>;
5
4
  export declare function getDefaultAccount(config?: CLIConfig | null): string | number | undefined;
@@ -1,18 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDefaultAccount = exports.getAccounts = exports.getAccountIdentifier = void 0;
4
- function getAccountIdentifier(account) {
5
- if (!account) {
6
- return undefined;
7
- }
8
- else if (Object.hasOwn(account, 'portalId')) {
9
- return account.portalId;
10
- }
11
- else if (Object.hasOwn(account, 'accountId')) {
12
- return account.accountId;
13
- }
14
- }
15
- exports.getAccountIdentifier = getAccountIdentifier;
3
+ exports.getDefaultAccount = exports.getAccounts = void 0;
16
4
  function getAccounts(config) {
17
5
  if (!config) {
18
6
  return [];
package/lang/lang/en.json DELETED
@@ -1,389 +0,0 @@
1
- {
2
- "lib": {
3
- "trackUsage": {
4
- "invalidEvent": "Usage tracking event {{ eventName }} is not a valid event type.",
5
- "sendingEventAuthenticated": "Sending usage event to authenticated endpoint",
6
- "retryingEventUnauthenticated": "Failed to send the usage event as authenticated. Trying again as unauthenticated.",
7
- "sendingEventUnauthenticated": "Sending usage event to unauthenticated endpoint"
8
- },
9
- "archive": {
10
- "extractZip": {
11
- "init": "Extracting project source...",
12
- "success": "Completed project source extraction.",
13
- "errors": {
14
- "write": "An error occurred writing temp project source.",
15
- "extract": "An error occurred extracting project source."
16
- }
17
- },
18
- "copySourceToDest": {
19
- "init": "Copying project source...",
20
- "sourceEmpty": "Project source is empty",
21
- "success": "Completed copying project source.",
22
- "error": "An error occurred copying project source to {{ dest }}."
23
- },
24
- "cleanupTempDir": {
25
- "error": "Failed to clean up temp dir: {{ tmpDir }}"
26
- }
27
- },
28
- "gitignore": {
29
- "errors": {
30
- "configIgnore": "Unable to determine if config file is properly ignored by git."
31
- }
32
- },
33
- "github": {
34
- "fetchFileFromRepository": {
35
- "fetching": "Fetching {{ path }}...",
36
- "errors": {
37
- "fetchFail": "An error occurred fetching JSON file."
38
- }
39
- },
40
- "fetchReleaseData": {
41
- "errors": {
42
- "fetchFail": "Failed fetching release data for {{ tag }} project."
43
- }
44
- },
45
- "downloadGithubRepoZip": {
46
- "fetching": "Fetching repository with name {{ repoPath }}...",
47
- "fetchingName": "Fetching {{ name }}...",
48
- "completed": "Completed project fetch.",
49
- "errors": {
50
- "fetchFail": "An error occurred fetching the project source."
51
- }
52
- },
53
- "cloneGithubRepo": {
54
- "success": "Your new {{ type }} has been created in {{ dest }}"
55
- },
56
- "downloadGithubRepoContents": {
57
- "downloading": "Downloading content piece: {{ contentPiecePath }} from {{ downloadUrl }} to {{ downloadPath }}",
58
- "errors": {
59
- "fetchFail": "Failed to fetch contents: {{ errorMessage }}"
60
- }
61
- },
62
- "listGitHubRepoContents": {
63
- "errors": {
64
- "fetchFail": "Failed to fetch contents: {{ errorMessage }}"
65
- }
66
- }
67
- },
68
- "hubdb": {
69
- "errors": {
70
- "invalidJsonPath": "The HubDB table file must be a '.json' file",
71
- "invalidJsonFile": "The '{{{ src }}' path is not a path to a file"
72
- }
73
- },
74
- "personalAccessKey": {
75
- "errors": {
76
- "accountNotFound": "Account with id {{ accountId }} does not exist.",
77
- "invalidPersonalAccessKey": "Error while retrieving new access token: {{ errorMessage }}"
78
- }
79
- },
80
- "cms": {
81
- "modules": {
82
- "createModule": {
83
- "creatingModule": "Creating module at {{ path }}",
84
- "creatingPath": "Creating {{ path }}",
85
- "errors": {
86
- "pathExists": "The {{ path }} path already exists",
87
- "fileUpdateFailure": "There was a problem updating the modules files at {{ path }}: {{ errorMessage }}"
88
- }
89
- },
90
- "retrieveDefaultModule": {
91
- "errors": {
92
- "pathExists": "Folder already exists at \"{{ path }}\""
93
- }
94
- }
95
- },
96
- "functions": {
97
- "updateExistingConfig": {
98
- "unableToReadFile": "The file {{ configFilePath }} could not be read",
99
- "invalidJSON": "The file {{ configFilePath }} is not valid JSON",
100
- "couldNotUpdateFile": "The file {{ configFilePath }} could not be updated",
101
- "errors": {
102
- "configIsNotObjectError": "The existing {{ configFilePath }} is not an object",
103
- "endpointAreadyExistsError": "The endpoint {{ endpointPath }} already exists in {{ configFilePath }}"
104
- }
105
- },
106
- "createFunction": {
107
- "destPathAlreadyExists": "The {{ path }} path already exists",
108
- "createdDest": "Created {{ path }}",
109
- "failedToCreateFile": "The file {{ configFilePath }} could not be created",
110
- "createdFunctionFile": "Created {{ path }}",
111
- "createdConfigFile": "Created {{ path }}",
112
- "success": "A function for the endpoint '/_hcms/api/{{ endpointPath }}' has been created. Upload {{ folderName }} to try it out",
113
- "errors": {
114
- "nestedConfigError": "Cannot create a functions directory inside '{{ ancestorConfigPath }}'",
115
- "jsFileConflictError": "The JavaScript file at '{{ functionFilePath }}'' already exists"
116
- }
117
- }
118
- },
119
- "handleFieldsJs": {
120
- "convertFieldsJs": {
121
- "creating": "Creating child process with pid {{ pid }}",
122
- "terminating": "Child process with pid {{ pid }} has been terminated",
123
- "errors": {
124
- "errorConverting": "There was an error converting '{{ filePath }}'"
125
- }
126
- },
127
- "saveOutput": {
128
- "errors": {
129
- "saveFailed": "There was an error saving the json output of {{ path }}"
130
- }
131
- },
132
- "createTmpDirSync": {
133
- "errors": {
134
- "writeFailed": "An error occurred writing temporary project source."
135
- }
136
- },
137
- "cleanupTmpDirSync": {
138
- "errors": {
139
- "deleteFailed": "There was an error deleting the temporary project source"
140
- }
141
- }
142
- },
143
- "uploadFolder": {
144
- "uploadFolder": {
145
- "success": "Uploaded file \"{{ file}}\" to \"{{ destPath }}\"",
146
- "attempt": "Attempting to upload file \"{{ file }}\" to \"{{ destPath }}\"",
147
- "failed": "Uploading file \"{{ file }}\" to \"{{ destPath }}\" failed so scheduled retry",
148
- "retry": "Retrying to upload file \"{{ file }}\" to \"{{ destPath }}\"",
149
- "retryFailed": "Uploading file \"{{ file }}\" to \"{{ destPath }}\" failed"
150
- }
151
- },
152
- "templates": {
153
- "createTemplate": {
154
- "creatingFile": "Creating file at {{ path }}",
155
- "creatingPath": "Making {{ path }} if needed",
156
- "errors": {
157
- "pathExists": "The {{ path }} path already exists"
158
- }
159
- }
160
- },
161
- "processFieldsJs": {
162
- "converting": "Converting \"{{ src }}\" to \"{{ dest }}\".",
163
- "converted": "Finished converting \"{{ src }}\" to \"{{ dest }}\".",
164
- "errors": {
165
- "invalidMjsFile": ".mjs files are only supported when using Node 13.2.0+",
166
- "notFunction": "There was an error loading JS file \"{{ path }}\". Expected type \"Function\" but received type \"{{ returned }}\". Make sure that your default export is a function.",
167
- "notArray": "There was an error loading JS file \"{{ path }}\". Expected type \"Array\" but received type \"{{ returned }}\" . Make sure that your function returns an array"
168
- }
169
- },
170
- "watch": {
171
- "notifyOfThemePreview": "To preview this theme, visit: {{ previewUrl }}",
172
- "skipUnsupportedExtension": "Skipping {{ file }} due to unsupported extension",
173
- "skipIgnoreRule": "Skipping {{ file }} due to an ignore rule",
174
- "uploadAttempt": "Attempting to upload file \"{{ file }}\" to \"{{ dest }}\"",
175
- "uploadSuccess": "Uploaded file {{ file }} to {{ dest }}",
176
- "uploadFailed": "Uploading file {{ file }} to {{ dest }} failed",
177
- "uploadRetry": "Retrying to upload file \"{{ file }}\" to \"{{ dest }}\"",
178
- "deleteAttempt": "Attempting to delete file {{ remoteFilePath }}",
179
- "deleteAttemptWithType": "Attempting to delete {{ type }} {{ remoteFilePath }}",
180
- "deleteSuccess": "Deleted file {{ remoteFilePath }}",
181
- "deleteSuccessWithType": "Deleted {{ type }} {{ remoteFilePath }}",
182
- "deleteFailed": "Deleting file {{ remoteFilePath }} failed",
183
- "folderUploadSuccess": "Completed uploading files in {{ src }} to {{ dest }} in {{ accountId }}",
184
- "ready": "Watcher is ready and watching {{ src }}. Any changes detected will be automatically uploaded and overwrite the current version in the developer file system."
185
- }
186
- },
187
- "oauth": {
188
- "writeTokenInfo": "Updating Oauth2 token info for portalId: {{ portalId }}",
189
- "addOauthToAccountConfig": {
190
- "init": "Updating configuration",
191
- "success": "Configuration updated"
192
- }
193
- },
194
- "fileManager": {
195
- "uploadStarted": "Uploading files from \"{{ file }}\" to \"{{ destPath }}\" in the File Manager of account {{ accountId }}",
196
- "uploadSuccess": "Uploaded file \"{{ file }}\" to \"{{ destPath }}\"",
197
- "skippedExisting": "Skipped existing {{ filepath }}",
198
- "fetchingFiles": "Fetching {{ fileCount }} files from remote folder: {{ folderName }}",
199
- "fetchFolderStarted": "Fetching folder from \"{{ src }}\" to \"{{ path }}\" in the File Manager of account {{ accountId }}",
200
- "fetchFolderSuccess": "Completed fetch of folder \"{{ src }}\" to \"{{ dest }}\" from the File Manager",
201
- "fetchFileStarted": "Fetching file from \"{{ src }}\" to \"{{ dest }}\" in the File Manager of account {{ accountId }}",
202
- "fetchFileSuccess": "Completed fetch of file \"{{ src }}\" to \"{{ dest }}\" from the File Manager",
203
- "errors": {
204
- "uploadFailed": "Uploading file \"{{ file }}\" to \"{{ destPath }}\" failed",
205
- "archivedFile": "\"{{ src }} \" in the File Manager is an archived file. Try fetching again with the \"--include-archived\" flag",
206
- "hiddenFile": "\"{{ src }}\" in the File Manager is a hidden file."
207
- }
208
- },
209
- "fileMapper": {
210
- "skippedExisting": "Skipped existing {{ filepath }}",
211
- "wroteFolder": "Wrote folder {{ filepath }}",
212
- "completedFetch": "Completed fetch of file \"{{ src }}\"{{ version }} to \"{{ dest }}\" from the Design Manager",
213
- "folderFetch": "Fetched \"{{ src }}\" from account {{ accountId }} from the Design Manager successfully",
214
- "completedFolderFetch": "Completed fetch of folder \"{{ src }}\"{{ version }} to \"{{ dest }}\" from the Design Manager",
215
- "errors": {
216
- "invalidRequest": "Invalid request for file: {{ src }}",
217
- "invalidNode": "Invalid FileMapperNode: {{ json }}",
218
- "invalidFileType": "Invalid file type requested: {{ srcPath }}",
219
- "assetTimeout": "HubSpot assets are unavailable at the moment. Please wait a few minutes and try again.",
220
- "failedToFetchFile": "Failed fetch of file \"{{ src }}\" to \"{{ dest }}\" from the Design Manager",
221
- "failedToFetchFolder": "Failed fetch of folder \"{{ src }}\" to \"{{ dest }}\" from the Design Manager",
222
- "invalidFetchFolderRequest": "Invalid request for folder: \"{{ src }}\"",
223
- "incompleteFetch": "Not all files in folder \"{{ src }}\" were successfully fetched. Re-run the last command to try again"
224
- }
225
- },
226
- "accountTypes": {
227
- "developmentSandbox": "dev sandbox",
228
- "standardSandbox": "standard sandbox",
229
- "developerTest": "test account",
230
- "appDeveloper": "dev account",
231
- "standard": "standard"
232
- }
233
- },
234
- "config": {
235
- "cliConfiguration": {
236
- "errors": {
237
- "noConfigLoaded": "No config loaded."
238
- },
239
- "load": {
240
- "configFromEnv": "Loaded config from environment variables for {{ accountId }}",
241
- "configFromFile": "Loaded config from configuration file.",
242
- "empty": "The config file was empty. Initializing an empty config."
243
- },
244
- "validate": {
245
- "noConfig": "Valiation failed: No config was found.",
246
- "noConfigAccounts": "Valiation failed: config.accounts[] is not defined.",
247
- "emptyAccountConfig": "Valiation failed: config.accounts[] has an empty entry.",
248
- "noAccountId": "Valiation failed: config.accounts[] has an entry missing accountId.",
249
- "duplicateAccountIds": "Valiation failed: config.accounts[] has multiple entries with {{ accountId }}.",
250
- "duplicateAccountNames": "Valiation failed: config.accounts[] has multiple entries with {{ accountName }}.",
251
- "nameContainsSpaces": "Valiation failed: config.name {{ accountName }} cannot contain spaces."
252
- },
253
- "updateAccount": {
254
- "noConfigToUpdate": "No config to update.",
255
- "updating": "Updating account config for {{ accountId }}",
256
- "addingConfigEntry": "Adding account config entry for {{ accountId }}",
257
- "errors": {
258
- "accountIdRequired": "An accountId is required to update the config"
259
- }
260
- },
261
- "updateDefaultAccount": {
262
- "errors": {
263
- "invalidInput": "A 'defaultAccount' with value of number or string is required to update the config."
264
- }
265
- },
266
- "renameAccount": {
267
- "errors": {
268
- "invalidName": "Cannot find account with identifier {{ currentName }}"
269
- }
270
- },
271
- "removeAccountFromConfig": {
272
- "deleting": "Deleting config for {{ accountId }}",
273
- "errors": {
274
- "invalidId": "Unable to find account for {{ nameOrId }}."
275
- }
276
- },
277
- "updateDefaultMode": {
278
- "errors": {
279
- "invalidMode": "The mode {{ defaultMode }} is invalid. Valid values are {{ validModes }}."
280
- }
281
- },
282
- "updateHttpTimeout": {
283
- "errors": {
284
- "invalidTimeout": "The value {{ timeout }} is invalid. The value must be a number greater than {{ minTimeout }}."
285
- }
286
- },
287
- "updateAllowUsageTracking": {
288
- "errors": {
289
- "invalidInput": "Unable to update allowUsageTracking. The value {{ isEnabled }} is invalid. The value must be a boolean."
290
- }
291
- }
292
- },
293
- "configFile": {
294
- "errorReading": "Config file could not be read: {{ configPath }}",
295
- "writeSuccess": "Successfully wrote updated config data to {{ configPath }}",
296
- "errorLoading": "A configuration file could not be found at {{ configPath }}.",
297
- "errors": {
298
- "parsing": "Config file could not be parsed"
299
- }
300
- },
301
- "configUtils": {
302
- "unknownType": "Unknown auth type {{ type }}"
303
- },
304
- "environment": {
305
- "loadConfig": {
306
- "missingAccountId": "Unable to load config from environment variables: Missing accountId",
307
- "missingEnv": "Unable to load config from environment variables: Missing env",
308
- "unknownAuthType": "Unable to load config from environment variables: Unknown auth type"
309
- }
310
- }
311
- },
312
- "models": {
313
- "OAuth2Manager": {
314
- "fetchingAccessToken": "Fetching access token for accountId {{ accountId }} for clientId {{ clientId }}",
315
- "updatingTokenInfo": "Persisting updated tokenInfo for accountId {{ accountId }} for clientId {{ clientId }}",
316
- "refreshingAccessToken": "Waiting for access token for accountId {{ accountId }} for clientId {{ clientId }} to be fetched",
317
- "errors": {
318
- "missingRefreshToken": "The account {{ accountId }} has not been authenticated with Oauth2",
319
- "auth": "Error while retrieving new token: {{ token }}"
320
- }
321
- }
322
- },
323
- "utils": {
324
- "notify": {
325
- "errors": {
326
- "filePath": "Unable to notify file '{{ filePath }}'"
327
- }
328
- },
329
- "cms": {
330
- "modules": {
331
- "throwInvalidPathInput": "Expected Path Input"
332
- }
333
- },
334
- "detectPort": {
335
- "errors": {
336
- "invalidPort": "Port must be between {{ minPort }} and {{ maxPort }}"
337
- }
338
- },
339
- "PortManagerServer": {
340
- "started": "PortManagerServer running on port {{ port }}",
341
- "setPort": "Server with instanceId {{ instanceId }} assigned to port {{ port }}",
342
- "deletedPort": "Server with instanceId {{ instanceId }} unassigned from port {{ port }}",
343
- "close": "PortManagerServer shutting down.",
344
- "errors": {
345
- "portInUse": "Failed to start PortManagerServer. Port {{ port }} is already in use.",
346
- "duplicateInstance": "Failed to start PortManagerServer. An instance of PortManagerServer is already running.",
347
- "404": "Could not find a server with instanceId {{ instanceId }}",
348
- "409": "Failed to assign port. Server with instanceId {{ instanceId }} is already running on port {{ port }}",
349
- "400": "Invalid port requested. Port must be between {{ minPort }} and {{ maxPort }}."
350
- }
351
- }
352
- },
353
- "http": {
354
- "index": {
355
- "createGetRequestStream": {
356
- "onWrite": "Wrote file {{ filepath }}"
357
- },
358
- "errors": {
359
- "withOauth": "Oauth manager for account {{ accountId }} not found.",
360
- "withAuth": "Account with id {{ accountId }} not found."
361
- }
362
- }
363
- },
364
- "errors": {
365
- "fileSystemErrors": {
366
- "readAction": "reading from",
367
- "writeAction": "writing to",
368
- "otherAction": "accessing",
369
- "unknownFilepath": "a file or folder",
370
- "baseMessage": "An error occurred while {{ fileAction }} {{ filepath }}."
371
- },
372
- "apiErrors": {
373
- "messageDetail": "{{ requestName }} in account {{ accountId }}",
374
- "genericMessageDetail": "request",
375
- "unableToUpload": "Unable to upload \"{{ payload }}.",
376
- "codes": {
377
- "400": "The {{ messageDetail }} was bad.",
378
- "401": "The {{ messageDetail }} was unauthorized.",
379
- "403": "The {{ messageDetail }} was forbidden.",
380
- "404": "The {{ messageDetail }} was not found.",
381
- "429": "The {{ messageDetail }} surpassed the rate limit. Retry in one minute.",
382
- "503": "The {{ messageDetail }} could not be handled at this time. Please try again or visit https://help.hubspot.com/ to submit a ticket or contact HubSpot Support if the issue persists.",
383
- "500Generic": "The {{ messageDetail }} failed due to a server error. Please try again or visit https://help.hubspot.com/ to submit a ticket or contact HubSpot Support if the issue persists.",
384
- "400Generic": "The {{ messageDetail }} failed due to a client error.",
385
- "generic": "The {{ messageDetail }} failed."
386
- }
387
- }
388
- }
389
- }