@zuplo/errors 5.2423.0 → 5.2427.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/dist/problems.js CHANGED
@@ -1,1250 +1,1202 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DEPLOYMENT_NO_ACCESS = exports.INVALID_SOURCE_REPO_URL = exports.SHARED_PROJECT_PREVIOUSLY_INITIALIZED = exports.PROJECT_MUST_HAVE_ONE_MEMBER = exports.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS = exports.PROJECT_MEMBER_ALREADY_EXISTS = exports.PROJECT_MEMBER_NOT_FOUND = exports.INVALID_TEMPLATE_REPOSITORY = exports.INCORRECT_PROJECT_TEMPLATE = exports.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS = exports.PROJECT_NOT_FOUND = exports.PROJECT_NOT_FOUND_FOR_SOURCE_REPO = exports.PROJECT_SHARING_DISABLED_ON_ACCOUNT = exports.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED = exports.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED = exports.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE = exports.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER = exports.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND = exports.ACCOUNT_MEMBER_INVITE_INVALID = exports.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST = exports.ACCOUNT_MEMBER_DOES_NOT_EXIST = exports.ACCOUNT_MEMBER_INFO_MISSING = exports.ACCOUNT_MEMBER_ALREADY_EXISTS = exports.ACCOUNT_UPDATE_INFO_MISSING = exports.ACCOUNT_INFO_MISSING = exports.ACCOUNT_DOES_NOT_EXISTS = exports.INVALID_ACCOUNT_LABEL_ENDING = exports.INVALID_ACCOUNT_NAME_ENDING = exports.ACCOUNT_NAME_ALREADY_IN_USE = exports.INVALID_ACCOUNT_LABEL = exports.INVALID_ACCOUNT_NAME = exports.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED = exports.ACCOUNT_NAME_LENGTH_LIMIT_REACHED = exports.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD = exports.ACCOUNT_NAME_USES_RESERVED_KEYWORD = exports.ACCOUNT_ALREADY_EXISTS = exports.ACCOUNT_NOT_FOUND = exports.USER_IS_NOT_SERVICE_ACCOUNT = exports.USER_REMOVE_NOT_MEMBER_ACCOUNT = exports.USER_HAS_NO_ACCESS_TO_ACCOUNT = exports.USER_DETAILS_CANNOT_BE_FOUND = exports.USER_ALREADY_EXISTS = exports.CLIENT_NOT_FOUND = exports.FORBIDDEN = exports.UNAUTHORIZED = exports.METHOD_NOT_ALLOWED = exports.NOT_FOUND = exports.CONFLICT = exports.BAD_REQUEST = exports.INTERNAL_SERVER_ERROR = void 0;
4
- exports.GITHUB_INTEGRATION_ALREADY_EXISTS = exports.FEATURE_FLAGS_NOT_FOUND = exports.MAX_ALLOWED_PROJECTS_LIMIT_REACHED = exports.PROJECT_ALREADY_HAS_REPO = exports.PROJECT_INVALID_NAME = exports.FAILED_TO_REVOKE_GH_TOKEN = exports.USER_ACCOUNT_NOT_FS_MIGRATED = exports.USER_NO_ACCESS_GITLAB_REPO = exports.USER_NO_ACCESS_BITBUCKET_REPO = exports.GITHUB_APP_CONFIGURATION_NOT_FOUND = exports.GITHUB_APP_NO_USER_ACCESS_ = exports.GITHUB_APP_NO_NAMESPACE_ACCESS = exports.GENERIC_GITHUB_BRANCH_INFO_ERROR = exports.GITHUB_USER_NO_READ_ACCESS_REPO = exports.USER_NO_PULL_ACCESS_GITHUB_REPO = exports.USER_NO_ACCESS_GITHUB_REPO = exports.PROJECT_SHARING_REQUIRES_GIT_REPO = exports.PROJECT_INVALID_GIT_REPO = exports.PROJECT_INVALID_GIT_CLONE = exports.USER_IS_PROJECT_MEMBER = exports.USER_HAS_NO_ACCESS_TO_PROJECT = exports.RUNTIME_FLAG_KEY_NOT_VALID = exports.RUNTIME_FLAG_NOT_FOUND = exports.RUNTIME_FLAG_ALREADY_EXISTS = exports.PROJECT_NO_MEMBERS = exports.PROJECT_ALREADY_EXISTS = exports.SERVICE_CONFIGURATION_FAILED_DECRYPTION = exports.WORKING_COPY_SERVICE_NOT_CREATED = exports.WORKING_COPY_SERVICE_NOT_DELETED = exports.WORKING_COPY_SERVICE_NOT_FOUND = exports.SERVICE_CONFIGURATION_NOT_FOUND = exports.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE = exports.DEPLOYMENT_INCORRECT_STATUS_PAUSE = exports.DEPLOYMENT_NOT_WORKING_COPY = exports.DEPLOYMENT_LOG_NOT_FOUND = exports.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY = exports.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB = exports.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT = exports.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT = exports.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED = exports.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE = exports.DEPLOYMENT_DELETE_ERROR = exports.DEPLOYMENT_CANNOT_DELETE_INSTANCE = exports.DEPLOYMENT_INVALID_MULTI_PART = exports.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART = exports.DEPLOYMENT_DIR_DOES_NOT_EXISTS = exports.DEPLOYMENT_FILE_DOES_NOT_EXISTS = exports.DEPLOYMENT_NOT_FOUND = exports.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST = exports.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH = void 0;
5
- exports.THIRD_PARTY_APP_CONNECTION_NOT_FOUND = exports.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND = exports.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR = exports.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR = exports.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST = exports.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR = exports.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED = exports.SOURCE_CONTROL_REMOTE_BRANCH_EXISTS = exports.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND = exports.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION = exports.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING = exports.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING = exports.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS = exports.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS = exports.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED = exports.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS = exports.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND = exports.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND = exports.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE = exports.SOURCE_CONTROL_REPO_OPERATION_ERROR = exports.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE = exports.SOURCE_CONTROL_REPO_NOT_FOUND = exports.SOURCE_CONTROL_AUTHENTICATION_FAILED = exports.EXTERNAL_SERVICE_GENERIC_ERROR = exports.API_USER_NO_ACCESS = exports.EXTERNAL_USER_NOT_CONFIGURED = exports.EXTERNAL_USER_NO_ACCESS = exports.API_KEY_CANNOT_BE_CREATED = exports.CONSUMER_CANNOT_BE_CREATED = exports.CONSUMER_DOES_NOT_EXIST = exports.GITLAB_ACCESS_LEVEL_CHECK_FAIL = exports.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS = exports.GITLAB_INSUFFICIENT_PERM_CREATE_REPO = exports.GITLAB_DUPLICATE_REPO = exports.GITLAB_FAILED_DURING_REPO_CREATION = exports.GITLAB_QUERY_USER_INFO_FAILED = exports.BITBUCKET_FAILED_DURING_REPO_CREATION = exports.BITBUCKET_WORKSPACE_MISCONFIGURATION = exports.BITBUCKET_QUERY_USER_INFO_FAILED = exports.GITHUB_INTEGRATION_INVALID_REPO = exports.GIT_CREATE_PROJECT_WITH_INVALID_REPO = exports.GIT_CREATE_PROJECT_WITH_EMPTY_REPO = exports.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION = exports.GITHUB_INTEGRATION_DUPLICATE_REPO = exports.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED = exports.GITHUB_INTEGRATION_AUTHENTICATION_FAILED = exports.GITHUB_INTEGRATION_BRANCH_BEHIND = exports.GITHUB_INTEGRATION_NOT_FOUND = exports.GITHUB_REPOSITORY_NOT_FOUND = exports.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND = void 0;
6
- exports.RBACCONFIGURATION_DOES_NOT_EXISTS = exports.RBAC_INVALID_EXPIRATION_DATE = exports.ACCOUNT_RBAC_DISABLED = exports.METERING_BUCKET_CREATION_FAILED = exports.UNABLE_UPGRADE_PLAN = exports.BUCKET_NOT_FOUND = exports.BUCKET_API_KEY_SERVICE_CONFLICT = exports.DIRECTORY_DELETE_FAILED = exports.FILE_DELETE_FAILED = exports.CANNOT_DELETE_SOLE_OPEN_API_FILE = exports.CANNOT_DELETE_ESSENTIAL_DIRECTORY = exports.CANNOT_DELETE_ESSENTIAL_FILE = exports.FILE_WRITE_FAILED = exports.FILE_RENAME_FAILED = exports.FILE_RENAME_FILE_ALREADY_EXISTS = exports.FILE_RENAME_CANNOT_CHANGE_EXTENSION = exports.FILE_RENAME_PATHS_MATCH = exports.DIRECTORY_CREATION_FAILED = exports.DIRECTORY_OR_FILE_DOES_NOT_EXIST = exports.DIRECTORY_DOES_NOT_EXIST = exports.DIRECTORY_ALREADY_EXISTS = exports.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION = exports.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT = exports.FAILED_DOWNLOAD_FROM_STORAGE = exports.CANNOT_FIND_SRC_DIRECTORY = exports.CANNOT_READ_PACKAGE_JSON = exports.PACKAGE_JSON_NOT_FOUND = exports.RUNTIME_VERSION_INCORRECT_FORMAT = exports.MIGRATIONS_ONLY_ON_WORKING_COPY = exports.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT = exports.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT = exports.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR = exports.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2 = exports.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE = exports.NO_GLOBAL_SYMBOLS = exports.NO_ZUPLO_PREFIXED_VARIABLES = exports.NON_EMPTY_TARGETS_REQUIRED = exports.CONFLICTING_TYPES = exports.OVERLAPPING_TARGETS = exports.INVALID_BRANCH_NAME = exports.ENV_VAR_MAX_SIZE_LIMIT = exports.TARGET_BRANCH_ONLY_FOR_PREVIEW = exports.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY = exports.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE = exports.DEPLOYMENT_NAME_MISSING = exports.NON_EXISTENT_ENVIRONMENT_VARIABLE = exports.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE = exports.ENVIRONMENT_VARIABLE_VALIDATION_ERROR = exports.DUPLICATE_ENVIRONMENT_VARIABLE = exports.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION = void 0;
7
- exports.ACCOUNT_MISCONFIGURED_FOR_RBAC = exports.ACCOUNT_ALREADY_RBAC_ENABLED = exports.MISCONFIGURED_ENV_VAR = exports.USER_HAS_NO_DEVELOPER_ENV_VAR_ACCESS = exports.USER_HAS_NO_PROD_ENV_VAR_ACCESS = exports.ACCOUNT_ADMIN_INVALID_PROJECT_ROLE_DOWNGRADE = exports.USER_HAS_NO_DEPLOY_ACCESS_TO_PROJECT_ENVIRONMENT = exports.USER_HAS_NO_ACCESS_TO_PROJECT_ENVIRONMENT = exports.USER_CANNOT_EDIT_OWN_ROLE = exports.USER_DOES_NOT_EXIST = exports.INVALID_USER_ROLE = exports.USER_HAS_NO_ACCESS_TO_CONSUMER = exports.RBACCONFIGURATION_CONSUMER_LOCKED = exports.RBACCONFIGURATION_MISCONFIGURATION = exports.RBACCONFIGURATION_DELETE_MISCONFIGURATION = exports.RBACCONFIGURATION_INVALID_OPENFGA_CONFIG = exports.RBACCONFIGURATION_INVALID_PROJECT_PROVIDED = exports.RBACCONFIGURATION_ACCOUNT_HAS_NO_PROJECTS = exports.RBACCONFIGURATION_REQUIRE_PROJECTS = exports.RBACCONFIGURATION_INVALID_ENVIRONMENTS = exports.RBACCONFIGURATION_REQUIRE_ENVIRONMENTS = void 0;
8
- const http_status_1 = require("./http-status");
9
- const utils_1 = require("./utils");
1
+ import { HttpStatusCode } from "./http-status.js";
2
+ import { getSourceControlProviderLabel } from "./utils.js";
10
3
  // Generic
11
4
  const zuploGithubAppInstallationUrl = "https://github.com/apps/zuplo/installations/new";
12
- exports.INTERNAL_SERVER_ERROR = {
5
+ export const INTERNAL_SERVER_ERROR = {
13
6
  type: "https://zup.fail/http-status/500",
14
7
  title: "Internal Server Error",
15
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
8
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
16
9
  };
17
- exports.BAD_REQUEST = {
10
+ export const BAD_REQUEST = {
18
11
  type: "https://zup.fail/http-status/400",
19
12
  title: "Bad Request",
20
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
13
+ status: HttpStatusCode.BAD_REQUEST,
21
14
  };
22
- exports.CONFLICT = {
15
+ export const CONFLICT = {
23
16
  type: "https://zup.fail/http-status/409",
24
17
  title: "Conflict",
25
- status: http_status_1.HttpStatusCode.CONFLICT,
18
+ status: HttpStatusCode.CONFLICT,
26
19
  };
27
- exports.NOT_FOUND = {
20
+ export const NOT_FOUND = {
28
21
  type: "https://zup.fail/http-status/404",
29
22
  title: "Not Found",
30
- status: http_status_1.HttpStatusCode.NOT_FOUND,
23
+ status: HttpStatusCode.NOT_FOUND,
31
24
  };
32
- exports.METHOD_NOT_ALLOWED = {
25
+ export const METHOD_NOT_ALLOWED = {
33
26
  type: "https://zup.fail/http-status/405",
34
27
  title: "Method Not Allowed",
35
- status: http_status_1.HttpStatusCode.METHOD_NOT_ALLOWED,
28
+ status: HttpStatusCode.METHOD_NOT_ALLOWED,
36
29
  };
37
- exports.UNAUTHORIZED = {
30
+ export const UNAUTHORIZED = {
38
31
  type: "https://zup.fail/http-status/401",
39
32
  title: "Unauthorized",
40
- status: http_status_1.HttpStatusCode.UNAUTHORIZED,
33
+ status: HttpStatusCode.UNAUTHORIZED,
41
34
  };
42
- exports.FORBIDDEN = {
35
+ export const FORBIDDEN = {
43
36
  type: "https://zup.fail/http-status/403",
44
37
  title: "Forbidden",
45
- status: http_status_1.HttpStatusCode.FORBIDDEN,
38
+ status: HttpStatusCode.FORBIDDEN,
46
39
  };
47
40
  // Custom
48
- exports.CLIENT_NOT_FOUND = {
41
+ export const CLIENT_NOT_FOUND = {
49
42
  type: "https://zup.fail/client-not-found",
50
43
  title: "Client not found",
51
- status: http_status_1.HttpStatusCode.NOT_FOUND,
44
+ status: HttpStatusCode.NOT_FOUND,
52
45
  };
53
- exports.USER_ALREADY_EXISTS = {
46
+ export const USER_ALREADY_EXISTS = {
54
47
  type: "https://zup.fail/user-already-exists",
55
48
  title: "User already exists",
56
- status: http_status_1.HttpStatusCode.CONFLICT,
49
+ status: HttpStatusCode.CONFLICT,
57
50
  };
58
- exports.USER_DETAILS_CANNOT_BE_FOUND = {
51
+ export const USER_DETAILS_CANNOT_BE_FOUND = {
59
52
  type: "https://zup.fail/user-details-cannot-be-found",
60
53
  title: "User cannot be found",
61
- status: http_status_1.HttpStatusCode.NOT_FOUND,
54
+ status: HttpStatusCode.NOT_FOUND,
62
55
  };
63
- exports.USER_HAS_NO_ACCESS_TO_ACCOUNT = {
56
+ export const USER_HAS_NO_ACCESS_TO_ACCOUNT = {
64
57
  type: "https://zup.fail/user-has-no-access-to-account",
65
58
  title: "Forbidden",
66
59
  detail: "You are not authorized to access the account resource.",
67
- status: http_status_1.HttpStatusCode.FORBIDDEN,
60
+ status: HttpStatusCode.FORBIDDEN,
68
61
  };
69
- exports.USER_REMOVE_NOT_MEMBER_ACCOUNT = {
62
+ export const USER_REMOVE_NOT_MEMBER_ACCOUNT = {
70
63
  type: "https://zup.fail/removed-user-not-account-member",
71
64
  title: "The user being removed is not a member of the account",
72
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
65
+ status: HttpStatusCode.BAD_REQUEST,
73
66
  };
74
- exports.USER_IS_NOT_SERVICE_ACCOUNT = {
67
+ export const USER_IS_NOT_SERVICE_ACCOUNT = {
75
68
  type: "https://zup.fail/user-not-service-account",
76
69
  title: "User is not a service account",
77
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
70
+ status: HttpStatusCode.BAD_REQUEST,
78
71
  };
79
- exports.ACCOUNT_NOT_FOUND = {
72
+ export const ACCOUNT_NOT_FOUND = {
80
73
  type: "https://zup.fail/account-not-found",
81
74
  title: "Account not found",
82
- status: http_status_1.HttpStatusCode.NOT_FOUND,
75
+ status: HttpStatusCode.NOT_FOUND,
83
76
  };
84
- exports.ACCOUNT_ALREADY_EXISTS = {
77
+ export const ACCOUNT_ALREADY_EXISTS = {
85
78
  type: "https://zup.fail/account-already-exists",
86
79
  title: "Account already exists",
87
- status: http_status_1.HttpStatusCode.CONFLICT,
80
+ status: HttpStatusCode.CONFLICT,
88
81
  };
89
- exports.ACCOUNT_NAME_USES_RESERVED_KEYWORD = {
82
+ export const ACCOUNT_NAME_USES_RESERVED_KEYWORD = {
90
83
  type: "https://zup.fail/account-name-reserved-keyword",
91
84
  title: "The account name can not use reserved keyword 'zuplo'",
92
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
85
+ status: HttpStatusCode.BAD_REQUEST,
93
86
  };
94
- exports.ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD = {
87
+ export const ACCOUNT_NAME_STARTS_WITH_RESERVED_KEYWORD = {
95
88
  type: "https://zup.fail/account-use-reserved-keyword",
96
89
  title: "The account name can not start with a reserved keyword",
97
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
90
+ status: HttpStatusCode.BAD_REQUEST,
98
91
  };
99
- exports.ACCOUNT_NAME_LENGTH_LIMIT_REACHED = {
92
+ export const ACCOUNT_NAME_LENGTH_LIMIT_REACHED = {
100
93
  type: "https://zup.fail/account-name-length-limit",
101
94
  title: "The account name exceeds the 200 character limit",
102
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
95
+ status: HttpStatusCode.BAD_REQUEST,
103
96
  };
104
- exports.ACCOUNT_LABEL_LENGTH_LIMIT_REACHED = {
97
+ export const ACCOUNT_LABEL_LENGTH_LIMIT_REACHED = {
105
98
  type: "https://zup.fail/account-label-length-limit",
106
99
  title: "The account label exceeds the 200 character limit",
107
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
100
+ status: HttpStatusCode.BAD_REQUEST,
108
101
  };
109
- exports.INVALID_ACCOUNT_NAME = {
102
+ export const INVALID_ACCOUNT_NAME = {
110
103
  type: "https://zup.fail/invalid-account-name",
111
104
  title: "The account name can only contain lower-cased characters, numbers, dashes and underscores",
112
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
105
+ status: HttpStatusCode.BAD_REQUEST,
113
106
  };
114
- exports.INVALID_ACCOUNT_LABEL = {
107
+ export const INVALID_ACCOUNT_LABEL = {
115
108
  type: "https://zup.fail/invalid-account-label",
116
109
  title: "The account label can only contain alpha-numeric characters, spaces, dashes and underscores",
117
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
110
+ status: HttpStatusCode.BAD_REQUEST,
118
111
  };
119
- exports.ACCOUNT_NAME_ALREADY_IN_USE = {
112
+ export const ACCOUNT_NAME_ALREADY_IN_USE = {
120
113
  type: "https://zup.fail/account-name-in-use",
121
114
  title: "The account name is already taken. Please try again using a different name.",
122
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
115
+ status: HttpStatusCode.BAD_REQUEST,
123
116
  };
124
- exports.INVALID_ACCOUNT_NAME_ENDING = {
117
+ export const INVALID_ACCOUNT_NAME_ENDING = {
125
118
  type: "https://zup.fail/invalid-account-name-ending",
126
119
  title: "The account name can not end with a dash or underscore character",
127
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
120
+ status: HttpStatusCode.BAD_REQUEST,
128
121
  };
129
- exports.INVALID_ACCOUNT_LABEL_ENDING = {
122
+ export const INVALID_ACCOUNT_LABEL_ENDING = {
130
123
  type: "https://zup.fail/invalid-account-label-ending",
131
124
  title: "The account label can not end with a dash or underscore character",
132
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
125
+ status: HttpStatusCode.BAD_REQUEST,
133
126
  };
134
- exports.ACCOUNT_DOES_NOT_EXISTS = {
127
+ export const ACCOUNT_DOES_NOT_EXISTS = {
135
128
  type: "https://zup.fail/account-does-not-exists",
136
129
  title: "Not Found",
137
130
  detail: "The account does not exist.",
138
- status: http_status_1.HttpStatusCode.NOT_FOUND,
131
+ status: HttpStatusCode.NOT_FOUND,
139
132
  };
140
- exports.ACCOUNT_INFO_MISSING = {
133
+ export const ACCOUNT_INFO_MISSING = {
141
134
  type: "https://zup.fail/account-info-missing",
142
135
  title: "Account information is required",
143
- status: http_status_1.HttpStatusCode.NOT_FOUND,
136
+ status: HttpStatusCode.NOT_FOUND,
144
137
  };
145
- exports.ACCOUNT_UPDATE_INFO_MISSING = {
138
+ export const ACCOUNT_UPDATE_INFO_MISSING = {
146
139
  type: "https://zup.fail/account-update-info-missing",
147
140
  title: "Account information is insufficient for this operation.",
148
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
141
+ status: HttpStatusCode.BAD_REQUEST,
149
142
  };
150
- exports.ACCOUNT_MEMBER_ALREADY_EXISTS = {
143
+ export const ACCOUNT_MEMBER_ALREADY_EXISTS = {
151
144
  type: "https://zup.fail/account-member-already-exists",
152
145
  title: "Account member already exists",
153
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
146
+ status: HttpStatusCode.BAD_REQUEST,
154
147
  };
155
- exports.ACCOUNT_MEMBER_INFO_MISSING = {
148
+ export const ACCOUNT_MEMBER_INFO_MISSING = {
156
149
  type: "https://zup.fail/account-member-info-missing",
157
150
  title: "Account member information is required",
158
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
151
+ status: HttpStatusCode.BAD_REQUEST,
159
152
  };
160
- exports.ACCOUNT_MEMBER_DOES_NOT_EXIST = {
153
+ export const ACCOUNT_MEMBER_DOES_NOT_EXIST = {
161
154
  type: "https://zup.fail/account-member-does-not-exists",
162
155
  title: "Account member information cannot be found",
163
- status: http_status_1.HttpStatusCode.NOT_FOUND,
156
+ status: HttpStatusCode.NOT_FOUND,
164
157
  };
165
- exports.ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST = {
158
+ export const ACCOUNT_MEMBER_INVITE_DOES_NOT_EXIST = {
166
159
  type: "https://zup.fail/account-member-invite-does-not-exist",
167
160
  title: "Account member invite cannot be found",
168
- status: http_status_1.HttpStatusCode.NOT_FOUND,
161
+ status: HttpStatusCode.NOT_FOUND,
169
162
  };
170
- exports.ACCOUNT_MEMBER_INVITE_INVALID = {
163
+ export const ACCOUNT_MEMBER_INVITE_INVALID = {
171
164
  type: "https://zup.fail/account-member-invite-invalid",
172
165
  title: "Account member invite is invalid",
173
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
166
+ status: HttpStatusCode.BAD_REQUEST,
174
167
  };
175
- exports.ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND = {
168
+ export const ACCOUNT_MEMBER_INVITE_FAILED_TO_SEND = {
176
169
  type: "https://zup.fail/account-member-invite-failed-send",
177
170
  title: "We were not able to send the account member invite. Please try again or contact support.",
178
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
171
+ status: HttpStatusCode.BAD_REQUEST,
179
172
  };
180
- exports.CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER = {
173
+ export const CANNOT_INVITE_EXISTING_ACCOUNT_MEMBER = {
181
174
  type: "https://zup.fail/account-member-cannot-be-invited",
182
175
  title: "The user is already part of the account.",
183
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
176
+ status: HttpStatusCode.BAD_REQUEST,
184
177
  };
185
- exports.EXISTING_PENDING_ACCOUNT_MEMBER_INVITE = {
178
+ export const EXISTING_PENDING_ACCOUNT_MEMBER_INVITE = {
186
179
  type: "https://zup.fail/existing-pending-account-member-invites",
187
180
  title: "The user has a pending invitation to this account.",
188
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
181
+ status: HttpStatusCode.BAD_REQUEST,
189
182
  };
190
- exports.MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED = {
183
+ export const MULTIPLE_ACCOUNT_MEMBERS_NOT_ALLOWED = {
191
184
  type: "https://zup.fail/no-multi-account-members",
192
185
  title: "Account is not configured for multiple members",
193
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
186
+ status: HttpStatusCode.BAD_REQUEST,
194
187
  };
195
- exports.ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED = {
188
+ export const ACCOUNT_MEMBERS_ALLOWED_LIMIT_REACHED = {
196
189
  type: "https://zup.fail/account-members-limit-reached",
197
190
  title: "This account has reached the limit of users allowed by its current billing plan.",
198
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
191
+ status: HttpStatusCode.BAD_REQUEST,
199
192
  };
200
- exports.PROJECT_SHARING_DISABLED_ON_ACCOUNT = {
193
+ export const PROJECT_SHARING_DISABLED_ON_ACCOUNT = {
201
194
  type: "https://zup.fail/project-sharing-disabled-on-account",
202
195
  title: "Project sharing is not enabled on account",
203
- status: http_status_1.HttpStatusCode.FORBIDDEN,
196
+ status: HttpStatusCode.FORBIDDEN,
204
197
  };
205
- exports.PROJECT_NOT_FOUND_FOR_SOURCE_REPO = {
198
+ export const PROJECT_NOT_FOUND_FOR_SOURCE_REPO = {
206
199
  type: "https://zup.fail/project-not-found-for-source-repo",
207
200
  title: "Project not found for provided repository",
208
- status: http_status_1.HttpStatusCode.NOT_FOUND,
201
+ status: HttpStatusCode.NOT_FOUND,
209
202
  };
210
- exports.PROJECT_NOT_FOUND = {
203
+ export const PROJECT_NOT_FOUND = {
211
204
  type: "https://zup.fail/project-not-found",
212
205
  title: "Project not found",
213
- status: http_status_1.HttpStatusCode.NOT_FOUND,
206
+ status: HttpStatusCode.NOT_FOUND,
214
207
  };
215
- exports.PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS = {
208
+ export const PROJECT_CANNOT_BE_DELETED_PROTECTED_DEPLOYMENTS_EXISTS = {
216
209
  type: "https://zup.fail/project-cannot-be-deleted-protected-deployments-exists",
217
210
  title: "Project cannot be deleted because it has protected deployments",
218
211
  detail: "Project has protected deployments. Make sure to remove the use of custom domains before trying to delete the project.",
219
- status: http_status_1.HttpStatusCode.FORBIDDEN,
212
+ status: HttpStatusCode.FORBIDDEN,
220
213
  };
221
- exports.INCORRECT_PROJECT_TEMPLATE = {
214
+ export const INCORRECT_PROJECT_TEMPLATE = {
222
215
  type: "https://zup.fail/incorrect-project-template",
223
216
  title: "Incorrect project template name",
224
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
217
+ status: HttpStatusCode.BAD_REQUEST,
225
218
  };
226
- const INVALID_TEMPLATE_REPOSITORY = ({ repositoryUrl }) => ({
219
+ export const INVALID_TEMPLATE_REPOSITORY = ({ repositoryUrl }) => ({
227
220
  type: "https://zup.fail/user-no-access-github-app-repo",
228
221
  title: `The repository '${repositoryUrl} is not a valid Zuplo template repository`,
229
- status: http_status_1.HttpStatusCode.FORBIDDEN,
222
+ status: HttpStatusCode.FORBIDDEN,
230
223
  });
231
- exports.INVALID_TEMPLATE_REPOSITORY = INVALID_TEMPLATE_REPOSITORY;
232
- exports.PROJECT_MEMBER_NOT_FOUND = {
224
+ export const PROJECT_MEMBER_NOT_FOUND = {
233
225
  type: "https://zup.fail/project-member-not-found",
234
226
  title: "Project Member not found",
235
- status: http_status_1.HttpStatusCode.NOT_FOUND,
227
+ status: HttpStatusCode.NOT_FOUND,
236
228
  };
237
- exports.PROJECT_MEMBER_ALREADY_EXISTS = {
229
+ export const PROJECT_MEMBER_ALREADY_EXISTS = {
238
230
  type: "https://zup.fail/project-member-already-exists",
239
231
  title: "Project Member already exists",
240
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
232
+ status: HttpStatusCode.BAD_REQUEST,
241
233
  };
242
- exports.CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS = {
234
+ export const CAN_NOT_DELETE_YOUR_OWN_PROJECT_MEMBERS = {
243
235
  type: "https://zup.fail/cannt-delete-your-own-project-member",
244
236
  title: "Can not delete your own Project Member record",
245
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
237
+ status: HttpStatusCode.BAD_REQUEST,
246
238
  };
247
- exports.PROJECT_MUST_HAVE_ONE_MEMBER = {
239
+ export const PROJECT_MUST_HAVE_ONE_MEMBER = {
248
240
  type: "https://zup.fail/project-must-have-one-member",
249
241
  title: "Project must have at least one member",
250
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
242
+ status: HttpStatusCode.BAD_REQUEST,
251
243
  };
252
- exports.SHARED_PROJECT_PREVIOUSLY_INITIALIZED = {
244
+ export const SHARED_PROJECT_PREVIOUSLY_INITIALIZED = {
253
245
  type: "https://zup.fail/project-previously-initialized",
254
246
  title: "Project was previously initialized",
255
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
247
+ status: HttpStatusCode.BAD_REQUEST,
256
248
  };
257
- exports.INVALID_SOURCE_REPO_URL = {
249
+ export const INVALID_SOURCE_REPO_URL = {
258
250
  type: "https://zup.fail/invalid-source-repo-url",
259
251
  title: "Project is not connected to source control, a sourceRepoUrl property must be specified and valid",
260
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
252
+ status: HttpStatusCode.BAD_REQUEST,
261
253
  };
262
- exports.DEPLOYMENT_NO_ACCESS = {
254
+ export const DEPLOYMENT_NO_ACCESS = {
263
255
  type: "https://zup.fail/deployment-no-access",
264
256
  title: "User does not have access to deployment",
265
- status: http_status_1.HttpStatusCode.FORBIDDEN,
257
+ status: HttpStatusCode.FORBIDDEN,
266
258
  };
267
- exports.DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH = {
259
+ export const DEPLOYMENT_DOES_NOT_EXIST_FOR_BRANCH = {
268
260
  type: "https://zup.fail/deployment-branch-does-not-exist",
269
261
  title: "A deployment record cannot be found for the provided branch.",
270
262
  detail: "You can only update a project's default branch to one that has been deployed.",
271
- status: http_status_1.HttpStatusCode.FORBIDDEN,
263
+ status: HttpStatusCode.FORBIDDEN,
272
264
  };
273
- exports.DEFAULT_DEPLOYMENT_DOES_NOT_EXIST = {
265
+ export const DEFAULT_DEPLOYMENT_DOES_NOT_EXIST = {
274
266
  type: "https://zup.fail/default-deployment-does-not-exist",
275
267
  title: "A default deployment record cannot be found for the project.",
276
268
  detail: "You can only update a project's default branch to one that has been deployed.",
277
- status: http_status_1.HttpStatusCode.FORBIDDEN,
269
+ status: HttpStatusCode.FORBIDDEN,
278
270
  };
279
- exports.DEPLOYMENT_NOT_FOUND = {
271
+ export const DEPLOYMENT_NOT_FOUND = {
280
272
  type: "https://zup.fail/deployment-not-found",
281
273
  title: "Deployment was not found",
282
- status: http_status_1.HttpStatusCode.NOT_FOUND,
274
+ status: HttpStatusCode.NOT_FOUND,
283
275
  };
284
- exports.DEPLOYMENT_FILE_DOES_NOT_EXISTS = {
276
+ export const DEPLOYMENT_FILE_DOES_NOT_EXISTS = {
285
277
  type: "https://zup.fail/deployment-file-does-not-exists",
286
278
  title: "Files were not found",
287
- status: http_status_1.HttpStatusCode.NOT_FOUND,
279
+ status: HttpStatusCode.NOT_FOUND,
288
280
  };
289
- exports.DEPLOYMENT_DIR_DOES_NOT_EXISTS = {
281
+ export const DEPLOYMENT_DIR_DOES_NOT_EXISTS = {
290
282
  type: "https://zup.fail/deployment-dir-does-not-exists",
291
283
  title: "NOT FOUND",
292
284
  detail: "Deployment directory was not found",
293
- status: http_status_1.HttpStatusCode.NOT_FOUND,
285
+ status: HttpStatusCode.NOT_FOUND,
294
286
  };
295
- exports.DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART = {
287
+ export const DEPLOYMENT_REQUEST_IS_NOT_MULTI_PART = {
296
288
  type: "https://zup.fail/deployment-request-is-not-multi-part",
297
289
  title: "Request is not multipart.",
298
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
290
+ status: HttpStatusCode.BAD_REQUEST,
299
291
  };
300
- exports.DEPLOYMENT_INVALID_MULTI_PART = {
292
+ export const DEPLOYMENT_INVALID_MULTI_PART = {
301
293
  type: "https://zup.fail/deployment-invalid-multi-part",
302
294
  title: "Invalid request format. Must be multi-part file upload.",
303
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
295
+ status: HttpStatusCode.BAD_REQUEST,
304
296
  };
305
- exports.DEPLOYMENT_CANNOT_DELETE_INSTANCE = {
297
+ export const DEPLOYMENT_CANNOT_DELETE_INSTANCE = {
306
298
  type: "https://zup.fail/deployment-cannot-delete-instance",
307
299
  title: "Cannot delete instance of the deployment. Invalid account or project.",
308
- status: http_status_1.HttpStatusCode.NOT_FOUND,
300
+ status: HttpStatusCode.NOT_FOUND,
309
301
  };
310
- exports.DEPLOYMENT_DELETE_ERROR = {
302
+ export const DEPLOYMENT_DELETE_ERROR = {
311
303
  type: "https://zup.fail/deployment-delete-error",
312
304
  title: "Error deleting deployment instance.",
313
- status: http_status_1.HttpStatusCode.NOT_FOUND,
305
+ status: HttpStatusCode.NOT_FOUND,
314
306
  };
315
- exports.DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE = {
307
+ export const DEPLOYMENT_INVALID_ENVIRONMENT_TO_DELETE = {
316
308
  type: "https://zup.fail/deployment-invalid-environment-to-delete",
317
309
  title: "Invalid environment to delete deployment",
318
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
310
+ status: HttpStatusCode.BAD_REQUEST,
319
311
  };
320
- exports.DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED = {
312
+ export const DEPLOYMENT_IS_PROTECTED_CANNOT_BE_DELETED = {
321
313
  type: "https://zup.fail/deployment-is-protected-cannot-be-deleted",
322
314
  title: "Deployment is protected and cannot be deleted",
323
- status: http_status_1.HttpStatusCode.FORBIDDEN,
315
+ status: HttpStatusCode.FORBIDDEN,
324
316
  };
325
- exports.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT = {
317
+ export const DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_ACCOUNT = {
326
318
  type: "https://zup.fail/deployment-log-not-found",
327
319
  title: "Deployment cannot be redeployed due to invalid account",
328
- status: http_status_1.HttpStatusCode.NOT_FOUND,
320
+ status: HttpStatusCode.NOT_FOUND,
329
321
  };
330
- exports.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT = {
322
+ export const DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_PROJECT = {
331
323
  type: "https://zup.fail/deployment-log-not-found",
332
324
  title: "Deployment cannot be redeployed due to invalid project name",
333
- status: http_status_1.HttpStatusCode.NOT_FOUND,
325
+ status: HttpStatusCode.NOT_FOUND,
334
326
  };
335
- exports.DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB = {
327
+ export const DEPLOYMENT_CANNOT_BE_REDEPLOYED_DUE_TO_USER_SUB = {
336
328
  type: "https://zup.fail/deployment-log-not-found",
337
329
  title: "Deployment cannot be redeployed due to invalid user sub",
338
- status: http_status_1.HttpStatusCode.NOT_FOUND,
330
+ status: HttpStatusCode.NOT_FOUND,
339
331
  };
340
- exports.DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY = {
332
+ export const DEPLOYMENT_CANNOT_BE_DELETED_DUE_WORKING_COPY = {
341
333
  type: "https://zup.fail/deployment-cannot-be-deleted",
342
334
  title: "Deployment cannot be deleted since is a working copy",
343
- status: http_status_1.HttpStatusCode.FORBIDDEN,
335
+ status: HttpStatusCode.FORBIDDEN,
344
336
  };
345
- exports.DEPLOYMENT_LOG_NOT_FOUND = {
337
+ export const DEPLOYMENT_LOG_NOT_FOUND = {
346
338
  type: "https://zup.fail/deployment-log-not-found",
347
339
  title: "DeploymentLog was not found",
348
- status: http_status_1.HttpStatusCode.NOT_FOUND,
340
+ status: HttpStatusCode.NOT_FOUND,
349
341
  };
350
- exports.DEPLOYMENT_NOT_WORKING_COPY = {
342
+ export const DEPLOYMENT_NOT_WORKING_COPY = {
351
343
  type: "https://zup.fail/deployment-not-working-copy",
352
344
  title: `Deployment is not working copy.`,
353
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
345
+ status: HttpStatusCode.BAD_REQUEST,
354
346
  };
355
- exports.DEPLOYMENT_INCORRECT_STATUS_PAUSE = {
347
+ export const DEPLOYMENT_INCORRECT_STATUS_PAUSE = {
356
348
  type: "https://zup.fail/deployment-incorrect-status-pause",
357
349
  title: "Deployment is not in a state to be paused.",
358
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
350
+ status: HttpStatusCode.BAD_REQUEST,
359
351
  };
360
- exports.DEPLOYMENT_INCORRECT_STATUS_UNPAUSE = {
352
+ export const DEPLOYMENT_INCORRECT_STATUS_UNPAUSE = {
361
353
  type: "https://zup.fail/deployment-incorrect-status-unpause",
362
354
  title: "Deployment is not in a state to be unpaused.",
363
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
355
+ status: HttpStatusCode.BAD_REQUEST,
364
356
  };
365
- exports.SERVICE_CONFIGURATION_NOT_FOUND = {
357
+ export const SERVICE_CONFIGURATION_NOT_FOUND = {
366
358
  type: "https://zup.fail/service-config-not-found",
367
359
  title: "Service configuration not found.",
368
- status: http_status_1.HttpStatusCode.NOT_FOUND,
360
+ status: HttpStatusCode.NOT_FOUND,
369
361
  };
370
- exports.WORKING_COPY_SERVICE_NOT_FOUND = {
362
+ export const WORKING_COPY_SERVICE_NOT_FOUND = {
371
363
  type: "https://zup.fail/service-config-not-found",
372
364
  title: "Working Copy service not found.",
373
- status: http_status_1.HttpStatusCode.NOT_FOUND,
365
+ status: HttpStatusCode.NOT_FOUND,
374
366
  };
375
- exports.WORKING_COPY_SERVICE_NOT_DELETED = {
367
+ export const WORKING_COPY_SERVICE_NOT_DELETED = {
376
368
  type: "https://zup.fail/working-copy-service-not-deleted",
377
369
  title: "Working Copy service failed to be deleted.",
378
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
370
+ status: HttpStatusCode.BAD_REQUEST,
379
371
  };
380
- exports.WORKING_COPY_SERVICE_NOT_CREATED = {
372
+ export const WORKING_COPY_SERVICE_NOT_CREATED = {
381
373
  type: "https://zup.fail/working-copy-service-not-created",
382
374
  title: "Working Copy service failed to be created.",
383
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
375
+ status: HttpStatusCode.BAD_REQUEST,
384
376
  };
385
- exports.SERVICE_CONFIGURATION_FAILED_DECRYPTION = {
377
+ export const SERVICE_CONFIGURATION_FAILED_DECRYPTION = {
386
378
  type: "https://zup.fail/service-config-not-decrypted",
387
379
  title: "Service configuration failed to decrypt.",
388
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
380
+ status: HttpStatusCode.BAD_REQUEST,
389
381
  };
390
- exports.PROJECT_ALREADY_EXISTS = {
382
+ export const PROJECT_ALREADY_EXISTS = {
391
383
  type: "https://zup.fail/project-already-exists",
392
384
  title: "Project already exists.",
393
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
385
+ status: HttpStatusCode.BAD_REQUEST,
394
386
  };
395
- exports.PROJECT_NO_MEMBERS = {
387
+ export const PROJECT_NO_MEMBERS = {
396
388
  type: "https://zup.fail/project-no-members",
397
389
  title: "Cannot find project members.",
398
- status: http_status_1.HttpStatusCode.NOT_FOUND,
390
+ status: HttpStatusCode.NOT_FOUND,
399
391
  };
400
- exports.RUNTIME_FLAG_ALREADY_EXISTS = {
392
+ export const RUNTIME_FLAG_ALREADY_EXISTS = {
401
393
  type: "https://zup.fail/runtime-flag-already-exists",
402
394
  title: "RuntimeFlag already exists.",
403
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
395
+ status: HttpStatusCode.BAD_REQUEST,
404
396
  };
405
- exports.RUNTIME_FLAG_NOT_FOUND = {
397
+ export const RUNTIME_FLAG_NOT_FOUND = {
406
398
  type: "https://zup.fail/runtime-flag-not-found",
407
399
  title: "RuntimeFlag was not found.",
408
- status: http_status_1.HttpStatusCode.NOT_FOUND,
400
+ status: HttpStatusCode.NOT_FOUND,
409
401
  };
410
- exports.RUNTIME_FLAG_KEY_NOT_VALID = {
402
+ export const RUNTIME_FLAG_KEY_NOT_VALID = {
411
403
  type: "https://zup.fail/runtime-flag-key-not-valid",
412
404
  title: "RuntimeFlag key must be snake case",
413
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
405
+ status: HttpStatusCode.BAD_REQUEST,
414
406
  };
415
- exports.USER_HAS_NO_ACCESS_TO_PROJECT = {
407
+ export const USER_HAS_NO_ACCESS_TO_PROJECT = {
416
408
  type: "https://zup.fail/user-has-no-access-to-project",
417
409
  title: "Forbidden",
418
410
  detail: "You are not a member of the project",
419
- status: http_status_1.HttpStatusCode.FORBIDDEN,
411
+ status: HttpStatusCode.FORBIDDEN,
420
412
  };
421
- exports.USER_IS_PROJECT_MEMBER = {
413
+ export const USER_IS_PROJECT_MEMBER = {
422
414
  type: "https://zup.fail/user-is-project-member",
423
415
  title: "The user is already a project member.",
424
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
416
+ status: HttpStatusCode.BAD_REQUEST,
425
417
  };
426
- exports.PROJECT_INVALID_GIT_CLONE = {
418
+ export const PROJECT_INVALID_GIT_CLONE = {
427
419
  type: "https://zup.fail/project-invalid-git-clone",
428
420
  title: "Project requires defaultBranch & sourceRepoUrl for creation from a GitHub repository.",
429
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
421
+ status: HttpStatusCode.BAD_REQUEST,
430
422
  };
431
- exports.PROJECT_INVALID_GIT_REPO = {
423
+ export const PROJECT_INVALID_GIT_REPO = {
432
424
  type: "https://zup.fail/project-invalid-git-repo",
433
425
  title: "The current source control repository is already in use by a Zuplo project",
434
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
426
+ status: HttpStatusCode.BAD_REQUEST,
435
427
  };
436
- exports.PROJECT_SHARING_REQUIRES_GIT_REPO = {
428
+ export const PROJECT_SHARING_REQUIRES_GIT_REPO = {
437
429
  type: "https://zup.fail/project-sharing-requires-git-repo",
438
430
  title: "The current project is not connected to a source control repository.",
439
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
431
+ status: HttpStatusCode.BAD_REQUEST,
440
432
  };
441
- const USER_NO_ACCESS_GITHUB_REPO = ({ repositoryUrl }) => ({
433
+ export const USER_NO_ACCESS_GITHUB_REPO = ({ repositoryUrl }) => ({
442
434
  type: "https://zup.fail/user-no-access-github-repo",
443
435
  title: "You do not have access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",
444
436
  detail: `User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${repositoryUrl}' to add a new collaborator.`,
445
- status: http_status_1.HttpStatusCode.FORBIDDEN,
437
+ status: HttpStatusCode.FORBIDDEN,
446
438
  });
447
- exports.USER_NO_ACCESS_GITHUB_REPO = USER_NO_ACCESS_GITHUB_REPO;
448
- const USER_NO_PULL_ACCESS_GITHUB_REPO = ({ repositoryUrl }) => ({
439
+ export const USER_NO_PULL_ACCESS_GITHUB_REPO = ({ repositoryUrl }) => ({
449
440
  type: "https://zup.fail/user-no-access-github-repo",
450
441
  title: "You do not have pull access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",
451
442
  detail: `User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${repositoryUrl}' to add a new collaborator.`,
452
- status: http_status_1.HttpStatusCode.FORBIDDEN,
443
+ status: HttpStatusCode.FORBIDDEN,
453
444
  });
454
- exports.USER_NO_PULL_ACCESS_GITHUB_REPO = USER_NO_PULL_ACCESS_GITHUB_REPO;
455
- const GITHUB_USER_NO_READ_ACCESS_REPO = ({ repositoryUrl }) => ({
445
+ export const GITHUB_USER_NO_READ_ACCESS_REPO = ({ repositoryUrl }) => ({
456
446
  type: "https://zup.fail/no-read-access-github-repo",
457
447
  title: "You do not have read access to the GitHub repository associated to the project. Ask your GitHub admin for access and try again.",
458
448
  detail: `User does not have access to the GitHub repository associated to the project. Go to Settings > Access > Collaborators in '${repositoryUrl}' to add a new collaborator.`,
459
- status: http_status_1.HttpStatusCode.FORBIDDEN,
449
+ status: HttpStatusCode.FORBIDDEN,
460
450
  });
461
- exports.GITHUB_USER_NO_READ_ACCESS_REPO = GITHUB_USER_NO_READ_ACCESS_REPO;
462
- exports.GENERIC_GITHUB_BRANCH_INFO_ERROR = {
451
+ export const GENERIC_GITHUB_BRANCH_INFO_ERROR = {
463
452
  type: "https://zup.fail/gh-branch-info-error",
464
453
  title: "There was an error getting branch information for the GitHub repository associated to the project.",
465
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
454
+ status: HttpStatusCode.BAD_REQUEST,
466
455
  };
467
- exports.GITHUB_APP_NO_NAMESPACE_ACCESS = {
456
+ export const GITHUB_APP_NO_NAMESPACE_ACCESS = {
468
457
  type: "https://zup.fail/no-namespace-access-github-app",
469
458
  title: "The Zuplo GitHub app does not have access to the repositories under the namespace provided. Make sure to configure the GitHub Zuplo App on the repository.",
470
- status: http_status_1.HttpStatusCode.FORBIDDEN,
459
+ status: HttpStatusCode.FORBIDDEN,
471
460
  };
472
- const GITHUB_APP_NO_USER_ACCESS_ = ({ repositoryUrl }) => ({
461
+ export const GITHUB_APP_NO_USER_ACCESS_ = ({ repositoryUrl }) => ({
473
462
  type: "https://zup.fail/user-no-access-github-app-repo",
474
463
  title: "The Zuplo GitHub app does not have access to the repository. Make sure to configure the GitHub Zuplo App on the repository.",
475
464
  detail: `The Zuplo GitHub app has not been granted access to the repository '${repositoryUrl}'. Go to '${zuploGithubAppInstallationUrl}' to add the repository.`,
476
- status: http_status_1.HttpStatusCode.FORBIDDEN,
465
+ status: HttpStatusCode.FORBIDDEN,
477
466
  });
478
- exports.GITHUB_APP_NO_USER_ACCESS_ = GITHUB_APP_NO_USER_ACCESS_;
479
- exports.GITHUB_APP_CONFIGURATION_NOT_FOUND = {
467
+ export const GITHUB_APP_CONFIGURATION_NOT_FOUND = {
480
468
  type: "https://zup.fail/gh-app-not-found",
481
469
  title: "Global GitHub App configuration not found",
482
- status: http_status_1.HttpStatusCode.NOT_FOUND,
470
+ status: HttpStatusCode.NOT_FOUND,
483
471
  };
484
- const USER_NO_ACCESS_BITBUCKET_REPO = ({ repositoryUrl }) => ({
472
+ export const USER_NO_ACCESS_BITBUCKET_REPO = ({ repositoryUrl }) => ({
485
473
  type: "https://zup.fail/user-no-access-bitbucket-repo",
486
474
  title: "You do not have access to the Bitbucket repository associated to the project. Ask your Bitbucket admin for access and try again.",
487
475
  detail: `User does not have access to the Bitbucket repository associated to the project. Update the user permissions in '${repositoryUrl}' to add a new collaborator.`,
488
- status: http_status_1.HttpStatusCode.FORBIDDEN,
476
+ status: HttpStatusCode.FORBIDDEN,
489
477
  });
490
- exports.USER_NO_ACCESS_BITBUCKET_REPO = USER_NO_ACCESS_BITBUCKET_REPO;
491
- const USER_NO_ACCESS_GITLAB_REPO = ({ repositoryUrl }) => ({
478
+ export const USER_NO_ACCESS_GITLAB_REPO = ({ repositoryUrl }) => ({
492
479
  type: "https://zup.fail/user-no-access-gitlab-repo",
493
480
  title: "You do not have access to the GitLab repository associated to the project. Ask your GitLab admin for access and try again.",
494
481
  detail: `User does not have access to the GitLab repository associated to the project. Update the user permissions in '${repositoryUrl}' to add a new collaborator.`,
495
- status: http_status_1.HttpStatusCode.FORBIDDEN,
482
+ status: HttpStatusCode.FORBIDDEN,
496
483
  });
497
- exports.USER_NO_ACCESS_GITLAB_REPO = USER_NO_ACCESS_GITLAB_REPO;
498
- exports.USER_ACCOUNT_NOT_FS_MIGRATED = {
484
+ export const USER_ACCOUNT_NOT_FS_MIGRATED = {
499
485
  type: "https://zup.fail/user-account-not-fs-migrated",
500
486
  title: "User account is in a plan that does not allow project sharing. Please contact your account admin.",
501
- status: http_status_1.HttpStatusCode.FORBIDDEN,
487
+ status: HttpStatusCode.FORBIDDEN,
502
488
  };
503
- exports.FAILED_TO_REVOKE_GH_TOKEN = {
489
+ export const FAILED_TO_REVOKE_GH_TOKEN = {
504
490
  type: "https://zup.fail/failed-to-revoke-gh-token",
505
491
  title: "Failed to revoke GitHub token for the user",
506
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
492
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
507
493
  };
508
- exports.PROJECT_INVALID_NAME = {
494
+ export const PROJECT_INVALID_NAME = {
509
495
  type: "https://zup.fail/project-invalid-name",
510
496
  title: "Project name is invalid, it only can contain letter, number and dashes.",
511
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
497
+ status: HttpStatusCode.BAD_REQUEST,
512
498
  };
513
- exports.PROJECT_ALREADY_HAS_REPO = {
499
+ export const PROJECT_ALREADY_HAS_REPO = {
514
500
  type: "https://zup.fail/project-already-has-repo",
515
501
  title: "The current project has been previously linked to a source control repository",
516
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
502
+ status: HttpStatusCode.BAD_REQUEST,
517
503
  };
518
- exports.MAX_ALLOWED_PROJECTS_LIMIT_REACHED = {
504
+ export const MAX_ALLOWED_PROJECTS_LIMIT_REACHED = {
519
505
  type: "https://zup.fail/max-allowed-projects-limit-reached",
520
506
  title: "Your account has reached the maximum number of projects allowed.",
521
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
507
+ status: HttpStatusCode.BAD_REQUEST,
522
508
  };
523
- exports.FEATURE_FLAGS_NOT_FOUND = {
509
+ export const FEATURE_FLAGS_NOT_FOUND = {
524
510
  type: "https://zup.fail/feature-flags-not-found",
525
511
  title: "Error trying to retrieve feature flags for this user",
526
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
512
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
527
513
  };
528
- exports.GITHUB_INTEGRATION_ALREADY_EXISTS = {
514
+ export const GITHUB_INTEGRATION_ALREADY_EXISTS = {
529
515
  type: "https://zup.fail/github-integration-already-exists",
530
516
  title: "Error trying to create GitHub Integration, already exists.",
531
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
517
+ status: HttpStatusCode.BAD_REQUEST,
532
518
  };
533
- const GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND = ({ repositoryUrl }) => ({
519
+ export const GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND = ({ repositoryUrl }) => ({
534
520
  type: "https://zup.fail/github-integration-not-found",
535
521
  title: "Cannot find a project configured for this repository",
536
- status: http_status_1.HttpStatusCode.CONFLICT,
522
+ status: HttpStatusCode.CONFLICT,
537
523
  detail: `The repository ${repositoryUrl} does not have a GitHub configured project.`,
538
524
  });
539
- exports.GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND = GITHUB_INTEGRATION_REPOSITORY_NOT_FOUND;
540
- const GITHUB_REPOSITORY_NOT_FOUND = ({ repositoryUrl }) => ({
525
+ export const GITHUB_REPOSITORY_NOT_FOUND = ({ repositoryUrl }) => ({
541
526
  type: "https://zup.fail/github-repo-not-found",
542
527
  title: "Cannot find a provided GitHub repository",
543
- status: http_status_1.HttpStatusCode.CONFLICT,
528
+ status: HttpStatusCode.CONFLICT,
544
529
  detail: `The GitHub repository ${repositoryUrl} was not found.`,
545
530
  });
546
- exports.GITHUB_REPOSITORY_NOT_FOUND = GITHUB_REPOSITORY_NOT_FOUND;
547
- exports.GITHUB_INTEGRATION_NOT_FOUND = {
531
+ export const GITHUB_INTEGRATION_NOT_FOUND = {
548
532
  type: "https://zup.fail/github-integration-not-found",
549
533
  title: "Project is not integrated with GitHub",
550
- status: http_status_1.HttpStatusCode.NOT_FOUND,
534
+ status: HttpStatusCode.NOT_FOUND,
551
535
  detail: `The project does not have a GitHub integration configured.`,
552
536
  };
553
- exports.GITHUB_INTEGRATION_BRANCH_BEHIND = {
537
+ export const GITHUB_INTEGRATION_BRANCH_BEHIND = {
554
538
  type: "https://zup.fail/github-integration-branch-behind",
555
539
  title: "The current branch is behind, sync with remote repo for avoid conflicts.",
556
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
540
+ status: HttpStatusCode.BAD_REQUEST,
557
541
  };
558
- exports.GITHUB_INTEGRATION_AUTHENTICATION_FAILED = {
542
+ export const GITHUB_INTEGRATION_AUTHENTICATION_FAILED = {
559
543
  type: "https://zup.fail/github-integration-authentication-failed",
560
544
  title: "GitHub integration: Authentication failed",
561
- status: http_status_1.HttpStatusCode.FORBIDDEN,
545
+ status: HttpStatusCode.FORBIDDEN,
562
546
  };
563
- exports.GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED = {
547
+ export const GITHUB_INTEGRATION_QUERY_USER_INFO_FAILED = {
564
548
  type: "https://zup.fail/github-integration-query-user-info-failed",
565
549
  title: "Failed while requesting basic user info from GitHub",
566
- status: http_status_1.HttpStatusCode.FORBIDDEN,
550
+ status: HttpStatusCode.FORBIDDEN,
567
551
  };
568
- const GITHUB_INTEGRATION_DUPLICATE_REPO = ({ repositoryName, orgName }) => ({
552
+ export const GITHUB_INTEGRATION_DUPLICATE_REPO = ({ repositoryName, orgName }) => ({
569
553
  type: "https://zup.fail/github-integration-duplicate-repo",
570
554
  title: "A repository with that name already exists in GitHub",
571
555
  details: `A repository named '${repositoryName}' already exists on GitHub org '${orgName}'.`,
572
556
  instance: repositoryName,
573
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
557
+ status: HttpStatusCode.BAD_REQUEST,
574
558
  });
575
- exports.GITHUB_INTEGRATION_DUPLICATE_REPO = GITHUB_INTEGRATION_DUPLICATE_REPO;
576
- const GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION = ({ repositoryName, details }) => ({
559
+ export const GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION = ({ repositoryName, details }) => ({
577
560
  type: "https://zup.fail/github-integration-failed-repo-creation",
578
561
  title: "Failed to create a new repository in GitHub",
579
562
  details,
580
563
  instance: repositoryName,
581
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
564
+ status: HttpStatusCode.BAD_REQUEST,
582
565
  });
583
- exports.GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION = GITHUB_INTEGRATION_FAILED_DURING_REPO_CREATION;
584
- const GIT_CREATE_PROJECT_WITH_EMPTY_REPO = ({ repositoryUrl }) => ({
566
+ export const GIT_CREATE_PROJECT_WITH_EMPTY_REPO = ({ repositoryUrl }) => ({
585
567
  type: "https://zup.fail/create-project-invalid-empty-repo",
586
568
  title: "The repository is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",
587
569
  details: `Repository '${repositoryUrl}' is empty and we can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,
588
570
  instance: repositoryUrl,
589
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
571
+ status: HttpStatusCode.BAD_REQUEST,
590
572
  });
591
- exports.GIT_CREATE_PROJECT_WITH_EMPTY_REPO = GIT_CREATE_PROJECT_WITH_EMPTY_REPO;
592
- const GIT_CREATE_PROJECT_WITH_INVALID_REPO = ({ repositoryUrl }) => ({
573
+ export const GIT_CREATE_PROJECT_WITH_INVALID_REPO = ({ repositoryUrl }) => ({
593
574
  type: "https://zup.fail/create-project-invalid-git-repo",
594
575
  title: "We can only create a project using a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.",
595
576
  details: `Repository '${repositoryUrl}' is not a repository containing a valid Zuplo project. Try again with a Git repository containing a Zuplo project.`,
596
577
  instance: repositoryUrl,
597
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
578
+ status: HttpStatusCode.BAD_REQUEST,
598
579
  });
599
- exports.GIT_CREATE_PROJECT_WITH_INVALID_REPO = GIT_CREATE_PROJECT_WITH_INVALID_REPO;
600
- const GITHUB_INTEGRATION_INVALID_REPO = ({ repositoryUrl }) => ({
580
+ export const GITHUB_INTEGRATION_INVALID_REPO = ({ repositoryUrl }) => ({
601
581
  type: "https://zup.fail/github-integration-invalid-repo",
602
582
  title: "We can only connect to an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.",
603
583
  details: `Repository '${repositoryUrl}' is not an empty repository or a repository containing a valid Zuplo project. Try again with an empty GitHub repository.`,
604
584
  instance: repositoryUrl,
605
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
585
+ status: HttpStatusCode.BAD_REQUEST,
606
586
  });
607
- exports.GITHUB_INTEGRATION_INVALID_REPO = GITHUB_INTEGRATION_INVALID_REPO;
608
- exports.BITBUCKET_QUERY_USER_INFO_FAILED = {
587
+ export const BITBUCKET_QUERY_USER_INFO_FAILED = {
609
588
  type: "https://zup.fail/bitbucket-query-user-info-failed",
610
589
  title: "Failed while requesting basic user info from Bitbucket",
611
- status: http_status_1.HttpStatusCode.FORBIDDEN,
590
+ status: HttpStatusCode.FORBIDDEN,
612
591
  };
613
- exports.BITBUCKET_WORKSPACE_MISCONFIGURATION = {
592
+ export const BITBUCKET_WORKSPACE_MISCONFIGURATION = {
614
593
  type: "https://zup.fail/bitbucket-workspace-misconfiguration",
615
594
  title: "Bitbucket source control configuration is missing workspace information",
616
- status: http_status_1.HttpStatusCode.FORBIDDEN,
595
+ status: HttpStatusCode.FORBIDDEN,
617
596
  };
618
- const BITBUCKET_FAILED_DURING_REPO_CREATION = ({ details }) => ({
597
+ export const BITBUCKET_FAILED_DURING_REPO_CREATION = ({ details }) => ({
619
598
  type: "https://zup.fail/bitbucket-failed-repo-creation",
620
599
  title: "Failed to create a new repository in Bitbucket",
621
600
  details,
622
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
601
+ status: HttpStatusCode.BAD_REQUEST,
623
602
  });
624
- exports.BITBUCKET_FAILED_DURING_REPO_CREATION = BITBUCKET_FAILED_DURING_REPO_CREATION;
625
- exports.GITLAB_QUERY_USER_INFO_FAILED = {
603
+ export const GITLAB_QUERY_USER_INFO_FAILED = {
626
604
  type: "https://zup.fail/gitlab-query-user-info-failed",
627
605
  title: "Failed while requesting basic user info from GitLab",
628
- status: http_status_1.HttpStatusCode.FORBIDDEN,
606
+ status: HttpStatusCode.FORBIDDEN,
629
607
  };
630
- const GITLAB_FAILED_DURING_REPO_CREATION = ({ details }) => ({
608
+ export const GITLAB_FAILED_DURING_REPO_CREATION = ({ details }) => ({
631
609
  type: "https://zup.fail/gitlab-failed-repo-creation",
632
610
  title: "Failed to create a new repository in GitLab",
633
611
  details,
634
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
612
+ status: HttpStatusCode.BAD_REQUEST,
635
613
  });
636
- exports.GITLAB_FAILED_DURING_REPO_CREATION = GITLAB_FAILED_DURING_REPO_CREATION;
637
- const GITLAB_DUPLICATE_REPO = ({ repositoryName, orgName }) => ({
614
+ export const GITLAB_DUPLICATE_REPO = ({ repositoryName, orgName }) => ({
638
615
  type: "https://zup.fail/gitlab-duplicate-repo",
639
616
  title: "A repository with that name already exists in GitLab",
640
617
  details: `A repository named '${repositoryName}' already exists in GitLab team '${orgName}'.`,
641
618
  instance: repositoryName,
642
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
619
+ status: HttpStatusCode.BAD_REQUEST,
643
620
  });
644
- exports.GITLAB_DUPLICATE_REPO = GITLAB_DUPLICATE_REPO;
645
- const GITLAB_INSUFFICIENT_PERM_CREATE_REPO = ({ orgName }) => ({
621
+ export const GITLAB_INSUFFICIENT_PERM_CREATE_REPO = ({ orgName }) => ({
646
622
  type: "https://zup.fail/gitlab-create-repo-perm",
647
623
  title: "The user's GitLab group access level does not allow for repository creation.",
648
624
  details: "The user's GitLab group access level does not allow for repository creation.",
649
625
  instance: orgName,
650
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
626
+ status: HttpStatusCode.BAD_REQUEST,
651
627
  });
652
- exports.GITLAB_INSUFFICIENT_PERM_CREATE_REPO = GITLAB_INSUFFICIENT_PERM_CREATE_REPO;
653
- const GITLAB_INSUFFICIENT_NAMESPACE_ACCESS = ({ namespaceLabel }) => ({
628
+ export const GITLAB_INSUFFICIENT_NAMESPACE_ACCESS = ({ namespaceLabel }) => ({
654
629
  type: "https://zup.fail/gitlab-insufficient-namespace-access",
655
630
  title: `The user's GitLab access level does not allow the use of namespace '${namespaceLabel}'.`,
656
631
  details: `The user's GitLab access level does not allow the use of namespace '${namespaceLabel}'.`,
657
632
  instance: namespaceLabel,
658
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
633
+ status: HttpStatusCode.BAD_REQUEST,
659
634
  });
660
- exports.GITLAB_INSUFFICIENT_NAMESPACE_ACCESS = GITLAB_INSUFFICIENT_NAMESPACE_ACCESS;
661
- const GITLAB_ACCESS_LEVEL_CHECK_FAIL = ({ orgName }) => ({
635
+ export const GITLAB_ACCESS_LEVEL_CHECK_FAIL = ({ orgName }) => ({
662
636
  type: "https://zup.fail/gitlab-access-check-fail",
663
637
  title: "Failed to verify user's GitLab group access level",
664
638
  instance: orgName,
665
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
639
+ status: HttpStatusCode.BAD_REQUEST,
666
640
  });
667
- exports.GITLAB_ACCESS_LEVEL_CHECK_FAIL = GITLAB_ACCESS_LEVEL_CHECK_FAIL;
668
- exports.CONSUMER_DOES_NOT_EXIST = {
641
+ export const CONSUMER_DOES_NOT_EXIST = {
669
642
  type: "https://zup.fail/consumer-does-not-exist",
670
643
  title: "Consumer does not exist or cannot be accessed.",
671
- status: http_status_1.HttpStatusCode.NOT_FOUND,
644
+ status: HttpStatusCode.NOT_FOUND,
672
645
  };
673
- exports.CONSUMER_CANNOT_BE_CREATED = {
646
+ export const CONSUMER_CANNOT_BE_CREATED = {
674
647
  type: "https://zup.fail/consumer-not-created",
675
648
  title: "Failed to create consumer",
676
- status: http_status_1.HttpStatusCode.BAD_GATEWAY,
649
+ status: HttpStatusCode.BAD_GATEWAY,
677
650
  };
678
- exports.API_KEY_CANNOT_BE_CREATED = {
651
+ export const API_KEY_CANNOT_BE_CREATED = {
679
652
  type: "https://zup.fail/api-key-not-created",
680
653
  title: "Failed to create api key",
681
- status: http_status_1.HttpStatusCode.BAD_GATEWAY,
654
+ status: HttpStatusCode.BAD_GATEWAY,
682
655
  };
683
- exports.EXTERNAL_USER_NO_ACCESS = {
656
+ export const EXTERNAL_USER_NO_ACCESS = {
684
657
  type: "https://zup.fail/external-user-no-access",
685
658
  title: "User does not have access to this external user.",
686
- status: http_status_1.HttpStatusCode.UNAUTHORIZED,
659
+ status: HttpStatusCode.UNAUTHORIZED,
687
660
  };
688
- exports.EXTERNAL_USER_NOT_CONFIGURED = {
661
+ export const EXTERNAL_USER_NOT_CONFIGURED = {
689
662
  type: "https://zup.fail/external-user-not-configured",
690
663
  title: "User is not setup as an External User (Key Manager)",
691
- status: http_status_1.HttpStatusCode.FORBIDDEN,
664
+ status: HttpStatusCode.FORBIDDEN,
692
665
  };
693
- exports.API_USER_NO_ACCESS = {
666
+ export const API_USER_NO_ACCESS = {
694
667
  type: "https://zup.fail/api-user-no-access",
695
668
  title: "Api user does not have access to this endpoint.",
696
- status: http_status_1.HttpStatusCode.FORBIDDEN,
669
+ status: HttpStatusCode.FORBIDDEN,
697
670
  };
698
- exports.EXTERNAL_SERVICE_GENERIC_ERROR = {
671
+ export const EXTERNAL_SERVICE_GENERIC_ERROR = {
699
672
  type: "https://zup.fail/external-service-generic-error",
700
673
  title: "Unable to complete API request for External Service.",
701
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
674
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
702
675
  };
703
- const SOURCE_CONTROL_AUTHENTICATION_FAILED = ({ sourceControlProvider }) => {
704
- const label = (0, utils_1.getSourceControlProviderLabel)(sourceControlProvider);
676
+ export const SOURCE_CONTROL_AUTHENTICATION_FAILED = ({ sourceControlProvider }) => {
677
+ const label = getSourceControlProviderLabel(sourceControlProvider);
705
678
  return {
706
679
  type: "https://zup.fail/source-control-authentication-failed",
707
680
  title: "Source provider authentication failed",
708
681
  detail: `Could not authenticate to ${label}`,
709
- status: http_status_1.HttpStatusCode.UNAUTHORIZED,
682
+ status: HttpStatusCode.UNAUTHORIZED,
710
683
  };
711
684
  };
712
- exports.SOURCE_CONTROL_AUTHENTICATION_FAILED = SOURCE_CONTROL_AUTHENTICATION_FAILED;
713
- const SOURCE_CONTROL_REPO_NOT_FOUND = ({ sourceControlProvider }) => {
714
- const label = (0, utils_1.getSourceControlProviderLabel)(sourceControlProvider);
685
+ export const SOURCE_CONTROL_REPO_NOT_FOUND = ({ sourceControlProvider }) => {
686
+ const label = getSourceControlProviderLabel(sourceControlProvider);
715
687
  return {
716
688
  type: "https://zup.fail/source-control-repo-not-found",
717
689
  title: "We cannot connect to the repository associated to the project, verify your source control access configuration and try again.",
718
690
  detail: `Could not connect to ${label} repository`,
719
- status: http_status_1.HttpStatusCode.NOT_FOUND,
691
+ status: HttpStatusCode.NOT_FOUND,
720
692
  };
721
693
  };
722
- exports.SOURCE_CONTROL_REPO_NOT_FOUND = SOURCE_CONTROL_REPO_NOT_FOUND;
723
- exports.SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE = {
694
+ export const SOURCE_CONTROL_EMPTY_COMMIT_MESSAGE = {
724
695
  type: "https://zup.fail/source-control-empty-commit",
725
696
  title: "Commit operation failed because you provided an empty message. Please try again by providing a commit message.",
726
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
697
+ status: HttpStatusCode.BAD_REQUEST,
727
698
  };
728
- const SOURCE_CONTROL_REPO_OPERATION_ERROR = ({ repoURL, operation }) => {
699
+ export const SOURCE_CONTROL_REPO_OPERATION_ERROR = ({ repoURL, operation }) => {
729
700
  return {
730
701
  type: `https://zup.fail/source-control-repo-${operation}-error`,
731
702
  title: `Failed on ${operation} operation to repository '${repoURL}'. Verify you have read & write access to the repository and try again.`,
732
703
  detail: `Verify your source control configuration and make sure you have been granted read & write access to the repository`,
733
- status: http_status_1.HttpStatusCode.FORBIDDEN,
704
+ status: HttpStatusCode.FORBIDDEN,
734
705
  };
735
706
  };
736
- exports.SOURCE_CONTROL_REPO_OPERATION_ERROR = SOURCE_CONTROL_REPO_OPERATION_ERROR;
737
- exports.SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE = {
707
+ export const SOURCE_CONTROL_REPO_WRITE_ACCESS_ISSUE = {
738
708
  type: "https://zup.fail/source-control-write-access-issue",
739
709
  title: `You do not have write access to the repository, verify your source control access configuration and try again.`,
740
710
  detail: `Verify your source control configuration and make sure you have been granted access to the repository`,
741
- status: http_status_1.HttpStatusCode.FORBIDDEN,
711
+ status: HttpStatusCode.FORBIDDEN,
742
712
  };
743
- exports.SOURCE_CONTROL_CONFIGURATION_NOT_FOUND = {
713
+ export const SOURCE_CONTROL_CONFIGURATION_NOT_FOUND = {
744
714
  type: "https://zup.fail/source-control-configuration-not-found",
745
715
  title: "Source control configuration not found for this account.",
746
- status: http_status_1.HttpStatusCode.NOT_FOUND,
716
+ status: HttpStatusCode.NOT_FOUND,
747
717
  };
748
- exports.SOURCE_CONTROL_CREDENTIALS_NOT_FOUND = {
718
+ export const SOURCE_CONTROL_CREDENTIALS_NOT_FOUND = {
749
719
  type: "https://zup.fail/source-control-credentials-not-found",
750
720
  title: "Source control credentials not found for this user. Verify your user's source control connection and try again.",
751
- status: http_status_1.HttpStatusCode.NOT_FOUND,
721
+ status: HttpStatusCode.NOT_FOUND,
752
722
  };
753
- exports.FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS = {
723
+ export const FAILED_TO_REFRESH_SOURCE_CONTROL_CREDENTIALS = {
754
724
  type: "https://zup.fail/failed-to-refresh-source-control-credentials",
755
725
  title: "Failed to refresh Source Control credentials. Verify your user's source control connection and try again.",
756
- status: http_status_1.HttpStatusCode.FORBIDDEN,
726
+ status: HttpStatusCode.FORBIDDEN,
757
727
  };
758
- exports.SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED = {
728
+ export const SOURCE_CONTROL_GH_APP_CONFIG_REQUIRED = {
759
729
  type: "https://zup.fail/new-gh-config-required",
760
730
  title: "Current Source Control credentials are using the previous Zuplo GitHup App. Re-authenticate using the latest Zuplo GitHup App via Profile UI and try again.",
761
- status: http_status_1.HttpStatusCode.FORBIDDEN,
731
+ status: HttpStatusCode.FORBIDDEN,
762
732
  };
763
- exports.SOURCE_CONTROL_GH_APP_REVOKED_ACCESS = {
733
+ export const SOURCE_CONTROL_GH_APP_REVOKED_ACCESS = {
764
734
  type: "https://zup.fail/gh-app-revoked-access",
765
735
  title: "Current Source Control credentials are invalid. Re-authenticate to GitHub via Profile UI and try again.",
766
- status: http_status_1.HttpStatusCode.UNAUTHORIZED,
736
+ status: HttpStatusCode.UNAUTHORIZED,
767
737
  };
768
- exports.FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS = {
738
+ export const FAILED_TO_REVOKE_SOURCE_CONTROL_CREDENTIALS = {
769
739
  type: "https://zup.fail/failed-to-revoke-source-control-credentials",
770
740
  title: "Failed to revoke Source Control access token for the user",
771
- status: http_status_1.HttpStatusCode.FORBIDDEN,
741
+ status: HttpStatusCode.FORBIDDEN,
772
742
  };
773
- exports.SOURCE_CONTROL_CONFIGURATION_INFO_MISSING = {
743
+ export const SOURCE_CONTROL_CONFIGURATION_INFO_MISSING = {
774
744
  type: "https://zup.fail/source-control-configuration-info-missing",
775
745
  title: "Source Control Configuration information is insufficient for this operation.",
776
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
746
+ status: HttpStatusCode.BAD_REQUEST,
777
747
  };
778
- exports.SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING = {
748
+ export const SOURCE_CONTROL_CONFIGURATION_BITBUCKET_WORKSPACE_MISSING = {
779
749
  type: "https://zup.fail/source-control-configuration-bb-workspace-missing",
780
750
  title: "Source Control Configuration for Bitbucket must include a workspace configuration (additionalMetadata).",
781
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
751
+ status: HttpStatusCode.BAD_REQUEST,
782
752
  };
783
- exports.ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION = {
753
+ export const ACCOUNT_HAS_PREEXISTING_SOURCE_CONTROL_CONFIGURATION = {
784
754
  type: "https://zup.fail/preexisiting-source-control-configuration-on-account",
785
755
  title: "This account already has a Source Control Configuration for this provider.",
786
756
  detail: "This account has a pre-existing Source Control Configuration for this provider. Delete or update the existing configuration.",
787
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
757
+ status: HttpStatusCode.BAD_REQUEST,
788
758
  };
789
- exports.SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND = {
759
+ export const SOURCE_CONTROL_INTEGRATION_BRANCH_BEHIND = {
790
760
  type: "https://zup.fail/source-control-integration-branch-behind",
791
761
  title: "The current branch is behind, sync with remote repo for avoid conflicts.",
792
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
762
+ status: HttpStatusCode.BAD_REQUEST,
793
763
  };
794
- exports.SOURCE_CONTROL_REMOTE_BRANCH_EXISTS = {
764
+ export const SOURCE_CONTROL_REMOTE_BRANCH_EXISTS = {
795
765
  type: "https://zup.fail/source-control-integration-branch-behind",
796
766
  title: "The branch exists in the remote repository. Please try again with a different branch name.",
797
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
767
+ status: HttpStatusCode.BAD_REQUEST,
798
768
  };
799
- exports.SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED = {
769
+ export const SOURCE_CONTROL_INTEGRATION_AUTHENTICATION_FAILED = {
800
770
  type: "https://zup.fail/source-control-integration-authentication-failed",
801
771
  title: "Source control integration: Authentication failed",
802
- status: http_status_1.HttpStatusCode.FORBIDDEN,
772
+ status: HttpStatusCode.FORBIDDEN,
803
773
  };
804
- exports.THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR = {
774
+ export const THIRD_PARTY_APP_AUTH0_CLIENTS_ENDPOINT_ERROR = {
805
775
  type: "https://zup.fail/third-party-app-auth0-clients-endpoint-error",
806
776
  title: "Error Creating an Auth0 Client through tenant api",
807
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
777
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
808
778
  };
809
- exports.THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST = {
779
+ export const THIRD_PARTY_APP_AUTH0_CONFIG_DOES_NOT_EXIST = {
810
780
  type: "https://zup.fail/third-party-app-auth0-config-does-not-exist",
811
781
  title: "Auth0 Configuration does not exist for account and environment",
812
- status: http_status_1.HttpStatusCode.NOT_FOUND,
782
+ status: HttpStatusCode.NOT_FOUND,
813
783
  };
814
- exports.THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR = {
784
+ export const THIRD_PARTY_APP_AUTH0_CLIENT_NOT_FOUND_ERROR = {
815
785
  type: "https://zup.fail/third-party-app-auth0-client-not-found-error",
816
786
  title: "Third Party App Not Found",
817
- status: http_status_1.HttpStatusCode.NOT_FOUND,
787
+ status: HttpStatusCode.NOT_FOUND,
818
788
  };
819
- exports.THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR = {
789
+ export const THIRD_PARTY_APP_AUTH_SCOPE_CONFIG_ERROR = {
820
790
  type: "https://zup.fail/third-party-app-auth-scope-config-error",
821
791
  title: "API Scope configuration at Auth0 end Error",
822
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
792
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
823
793
  };
824
- exports.THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND = {
794
+ export const THIRD_PARTY_APP_CONNECTIONS_NOT_FOUND = {
825
795
  type: "https://zup.fail/third-party-app-connections-not-found",
826
796
  title: "Cannot find auth0 tenant connections",
827
- status: http_status_1.HttpStatusCode.FAILED_DEPENDENCY,
797
+ status: HttpStatusCode.FAILED_DEPENDENCY,
828
798
  };
829
- exports.THIRD_PARTY_APP_CONNECTION_NOT_FOUND = {
799
+ export const THIRD_PARTY_APP_CONNECTION_NOT_FOUND = {
830
800
  type: "https://zup.fail/third-party-app-connection-not-found",
831
801
  title: "Cannot find connection with the given name",
832
- status: http_status_1.HttpStatusCode.FAILED_DEPENDENCY,
802
+ status: HttpStatusCode.FAILED_DEPENDENCY,
833
803
  };
834
- exports.THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION = {
804
+ export const THIRD_PARTY_APP_CANNOT_LINK_TPA_TO_CONNECTION = {
835
805
  type: "https://zup.fail/third-party-app-cannot-link-tpa-to-connection",
836
806
  title: "Cannot link a connection to a third party app",
837
- status: http_status_1.HttpStatusCode.FAILED_DEPENDENCY,
807
+ status: HttpStatusCode.FAILED_DEPENDENCY,
838
808
  };
839
- exports.DUPLICATE_ENVIRONMENT_VARIABLE = {
809
+ export const DUPLICATE_ENVIRONMENT_VARIABLE = {
840
810
  type: "https://zup.fail/duplicate-environment-variable",
841
811
  title: "Duplicate environment variable",
842
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
812
+ status: HttpStatusCode.BAD_REQUEST,
843
813
  };
844
- exports.ENVIRONMENT_VARIABLE_VALIDATION_ERROR = {
814
+ export const ENVIRONMENT_VARIABLE_VALIDATION_ERROR = {
845
815
  type: "https://zup.fail/environment-variables-validation-error",
846
816
  title: "Environment variable configuration is invalid",
847
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
817
+ status: HttpStatusCode.BAD_REQUEST,
848
818
  };
849
- exports.ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE = {
819
+ export const ENVIRONMENT_VARIABLE_INVALID_ENVIRONMENT_TYPE = {
850
820
  type: "https://zup.fail/environment-variables-cannot-be-retrieved-invalid-env-type",
851
821
  title: "Env vars will not be retrieved since the deployment is from non valid environment type",
852
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
822
+ status: HttpStatusCode.BAD_REQUEST,
853
823
  };
854
- exports.NON_EXISTENT_ENVIRONMENT_VARIABLE = {
824
+ export const NON_EXISTENT_ENVIRONMENT_VARIABLE = {
855
825
  type: "https://zup.fail/non-existent-environment-variable",
856
826
  title: "Environment variable doesn't exist",
857
- status: http_status_1.HttpStatusCode.NOT_FOUND,
827
+ status: HttpStatusCode.NOT_FOUND,
858
828
  };
859
- exports.DEPLOYMENT_NAME_MISSING = {
829
+ export const DEPLOYMENT_NAME_MISSING = {
860
830
  type: "https://zup.fail/deployment-name-missing",
861
831
  title: "Deployment name missing",
862
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
832
+ status: HttpStatusCode.BAD_REQUEST,
863
833
  };
864
- exports.INVALIDLY_NAMED_ENVIRONMENT_VARIABLE = {
834
+ export const INVALIDLY_NAMED_ENVIRONMENT_VARIABLE = {
865
835
  type: "https://zup.fail/invalidly-named-environment-variable",
866
836
  title: "Environment variable needs a valid name",
867
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
837
+ status: HttpStatusCode.BAD_REQUEST,
868
838
  };
869
- exports.PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY = {
839
+ export const PERSONAL_OVERRIDE_ONLY_FOR_WORKING_COPY = {
870
840
  type: "https://zup.fail/personal-override-only-for-working-copy",
871
841
  title: "A personal override can only be used for a working-copy environment variable",
872
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
842
+ status: HttpStatusCode.BAD_REQUEST,
873
843
  };
874
- exports.TARGET_BRANCH_ONLY_FOR_PREVIEW = {
844
+ export const TARGET_BRANCH_ONLY_FOR_PREVIEW = {
875
845
  type: "https://zup.fail/target-branch-only-for-preview",
876
846
  title: "A target branch can only be used for preview environment variables",
877
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
847
+ status: HttpStatusCode.BAD_REQUEST,
878
848
  };
879
- exports.ENV_VAR_MAX_SIZE_LIMIT = {
849
+ export const ENV_VAR_MAX_SIZE_LIMIT = {
880
850
  type: "https://zup.fail/environment-variable-maximum-size-limit",
881
851
  title: "Environment variables cannot exceed 5KB in size",
882
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
852
+ status: HttpStatusCode.BAD_REQUEST,
883
853
  };
884
- exports.INVALID_BRANCH_NAME = {
854
+ export const INVALID_BRANCH_NAME = {
885
855
  type: "https://zup.fail/invalid-branch-name",
886
856
  title: "Branch name is invalid",
887
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
857
+ status: HttpStatusCode.BAD_REQUEST,
888
858
  };
889
- exports.OVERLAPPING_TARGETS = {
859
+ export const OVERLAPPING_TARGETS = {
890
860
  type: "https://zup.fail/overlapping-targets",
891
861
  title: "The environments of this environment variable overlaps with an existing environment variable",
892
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
862
+ status: HttpStatusCode.BAD_REQUEST,
893
863
  };
894
- exports.CONFLICTING_TYPES = {
864
+ export const CONFLICTING_TYPES = {
895
865
  type: "https://zup.fail/conflicting-types",
896
866
  title: "The type of this environment variable conflicts with an existing environment variable with the same name",
897
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
867
+ status: HttpStatusCode.BAD_REQUEST,
898
868
  };
899
- exports.NON_EMPTY_TARGETS_REQUIRED = {
869
+ export const NON_EMPTY_TARGETS_REQUIRED = {
900
870
  type: "https://zup.fail/non-empty-targets-required",
901
871
  title: "The environment targets for this environment variable cannot be empty.",
902
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
872
+ status: HttpStatusCode.BAD_REQUEST,
903
873
  };
904
- exports.NO_ZUPLO_PREFIXED_VARIABLES = {
874
+ export const NO_ZUPLO_PREFIXED_VARIABLES = {
905
875
  type: "https://zup.fail/no-zuplo-prefixed-variables",
906
876
  title: "Environment variables should not start with the reserved prefix of ZUPLO or __ZUPLO",
907
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
877
+ status: HttpStatusCode.BAD_REQUEST,
908
878
  };
909
- exports.NO_GLOBAL_SYMBOLS = {
879
+ export const NO_GLOBAL_SYMBOLS = {
910
880
  type: "https://zup.fail/no-global-symbols",
911
881
  title: "Environment variables cannot be named after global variables.",
912
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
882
+ status: HttpStatusCode.BAD_REQUEST,
913
883
  };
914
- exports.DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE = {
884
+ export const DEPLOYER_NON_VALID_DEPLOYMENT_ENVIRONMENT_TYPE = {
915
885
  type: "https://zup.fail/deployer-non-valid-deployment-environment-type",
916
886
  title: "Deployment cannot be different than preview or production",
917
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
887
+ status: HttpStatusCode.BAD_REQUEST,
918
888
  };
919
- exports.DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2 = {
889
+ export const DEPLOYER_CANNOT_DEPLOY_USING_ENV_VARS_V2 = {
920
890
  type: "https://zup.fail/deployer-cannot-deploy-using-env-vars-v2",
921
891
  title: "Deployer was not able to deploy zup using environment variables v2",
922
- status: http_status_1.HttpStatusCode.FORBIDDEN,
892
+ status: HttpStatusCode.FORBIDDEN,
923
893
  };
924
- exports.DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR = {
894
+ export const DELETING_ZUPLO_ENVIRONMENT_VARIABLES_ERROR = {
925
895
  type: "https://zup.fail/deleting-zuplo-environment-variables-error",
926
896
  title: "Problems deleting ZUPLO environment variables for deployment",
927
- status: http_status_1.HttpStatusCode.NOT_FOUND,
897
+ status: HttpStatusCode.NOT_FOUND,
928
898
  };
929
- const CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT = ({ operation, path }) => ({
899
+ export const CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT = ({ operation, path }) => ({
930
900
  type: "https://zup.fail/cannot-modify-file-on-read-only-environment",
931
901
  title: `Cannot modify file on read-only environment`,
932
902
  detail: `Cannot ${operation} file ${path} for a read-only environment. Read-only environments cannot be edited.`,
933
- status: http_status_1.HttpStatusCode.METHOD_NOT_ALLOWED,
903
+ status: HttpStatusCode.METHOD_NOT_ALLOWED,
934
904
  });
935
- exports.CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT = CANNOT_MODIFY_FILE_ON_READ_ONLY_ENVIRONMENT;
936
- const CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT = () => ({
905
+ export const CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT = () => ({
937
906
  type: "https://zup.fail/cannot-modify-file-on-read-only-environment",
938
907
  title: `Cannot modify files on read-only environment`,
939
908
  detail: `Cannot save files on a read-only environment. Read-only environments cannot be edited.`,
940
- status: http_status_1.HttpStatusCode.METHOD_NOT_ALLOWED,
909
+ status: HttpStatusCode.METHOD_NOT_ALLOWED,
941
910
  });
942
- exports.CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT = CANNOT_SAVE_FILES_ON_READ_ONLY_ENVIRONMENT;
943
- exports.MIGRATIONS_ONLY_ON_WORKING_COPY = {
911
+ export const MIGRATIONS_ONLY_ON_WORKING_COPY = {
944
912
  type: "https://zup.fail/migration-only-on-working-copy",
945
913
  title: `Migrations can only run on working copies.`,
946
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
914
+ status: HttpStatusCode.BAD_REQUEST,
947
915
  };
948
- exports.RUNTIME_VERSION_INCORRECT_FORMAT = {
916
+ export const RUNTIME_VERSION_INCORRECT_FORMAT = {
949
917
  type: "https://zup.fail/migration-incorrect-runtime-version-format",
950
918
  title: `Runtime version is in an incorrect format.`,
951
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
919
+ status: HttpStatusCode.BAD_REQUEST,
952
920
  };
953
- exports.PACKAGE_JSON_NOT_FOUND = {
921
+ export const PACKAGE_JSON_NOT_FOUND = {
954
922
  type: "https://zup.fail/no-pkg-file-found",
955
923
  title: `No package.json file found.`,
956
- status: http_status_1.HttpStatusCode.NOT_FOUND,
924
+ status: HttpStatusCode.NOT_FOUND,
957
925
  };
958
- exports.CANNOT_READ_PACKAGE_JSON = {
926
+ export const CANNOT_READ_PACKAGE_JSON = {
959
927
  type: "https://zup.fail/cannot-read-pkg-file",
960
928
  title: `Cannot read package.json file.`,
961
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
929
+ status: HttpStatusCode.BAD_REQUEST,
962
930
  };
963
- exports.CANNOT_FIND_SRC_DIRECTORY = {
931
+ export const CANNOT_FIND_SRC_DIRECTORY = {
964
932
  type: "https://zup.fail/cannot-find-src-dir",
965
933
  title: `Cannot find source directory.`,
966
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
934
+ status: HttpStatusCode.BAD_REQUEST,
967
935
  };
968
- exports.FAILED_DOWNLOAD_FROM_STORAGE = {
936
+ export const FAILED_DOWNLOAD_FROM_STORAGE = {
969
937
  type: "https://zup.fail/failed-download-storage",
970
938
  title: `Failed to download content from storage.`,
971
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
939
+ status: HttpStatusCode.BAD_REQUEST,
972
940
  };
973
- const CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT = ({ path }) => ({
941
+ export const CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT = ({ path }) => ({
974
942
  type: "https://zup.fail/cannot-modify-file-on-read-only-environment",
975
943
  title: `Cannot create directory on read-only environment`,
976
944
  detail: `Cannot create folder ${path} for a read-only environment. Read-only environments cannot be edited.`,
977
- status: http_status_1.HttpStatusCode.METHOD_NOT_ALLOWED,
945
+ status: HttpStatusCode.METHOD_NOT_ALLOWED,
978
946
  });
979
- exports.CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT = CANNOT_CREATE_DIRECTORY_ON_READ_ONLY_ENVIRONMENT;
980
- const CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION = ({ path }) => ({
947
+ export const CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION = ({ path }) => ({
981
948
  type: "https://zup.fail/directory-creation-in-non-allowed-location",
982
949
  title: "Directory creation attempted in non allowed location",
983
950
  detail: `Directory creation in ${path} is not allowed.`,
984
951
  instance: path,
985
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
952
+ status: HttpStatusCode.BAD_REQUEST,
986
953
  });
987
- exports.CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION = CANNOT_CREATE_DIRECTORY_IN_NON_ALLOWED_LOCATION;
988
- const DIRECTORY_ALREADY_EXISTS = ({ path }) => ({
954
+ export const DIRECTORY_ALREADY_EXISTS = ({ path }) => ({
989
955
  type: "https://zup.fail/directory-already-exists",
990
956
  title: "Directory already exists",
991
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
957
+ status: HttpStatusCode.BAD_REQUEST,
992
958
  detail: `Directory already exists at ${path}.`,
993
959
  });
994
- exports.DIRECTORY_ALREADY_EXISTS = DIRECTORY_ALREADY_EXISTS;
995
- const DIRECTORY_DOES_NOT_EXIST = ({ path }) => ({
960
+ export const DIRECTORY_DOES_NOT_EXIST = ({ path }) => ({
996
961
  type: "https://zup.fail/directory-does-not-exist",
997
962
  title: "Directory does not exist",
998
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
963
+ status: HttpStatusCode.BAD_REQUEST,
999
964
  detail: `No directory at ${path}`,
1000
965
  });
1001
- exports.DIRECTORY_DOES_NOT_EXIST = DIRECTORY_DOES_NOT_EXIST;
1002
- const DIRECTORY_OR_FILE_DOES_NOT_EXIST = ({ path }) => ({
966
+ export const DIRECTORY_OR_FILE_DOES_NOT_EXIST = ({ path }) => ({
1003
967
  type: "https://zup.fail/directory-or-file-does-not-exist",
1004
968
  title: "Directory or File does not exist",
1005
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
969
+ status: HttpStatusCode.BAD_REQUEST,
1006
970
  detail: `No file/directory at ${path}`,
1007
971
  });
1008
- exports.DIRECTORY_OR_FILE_DOES_NOT_EXIST = DIRECTORY_OR_FILE_DOES_NOT_EXIST;
1009
- const DIRECTORY_CREATION_FAILED = ({ path }) => ({
972
+ export const DIRECTORY_CREATION_FAILED = ({ path }) => ({
1010
973
  type: "https://zup.fail/directory-creation-failure",
1011
974
  title: "Directory creation failed",
1012
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
975
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
1013
976
  detail: `Failed to create directory at ${path}. Please try again or contact support.`,
1014
977
  });
1015
- exports.DIRECTORY_CREATION_FAILED = DIRECTORY_CREATION_FAILED;
1016
- const FILE_RENAME_PATHS_MATCH = ({ path }) => ({
978
+ export const FILE_RENAME_PATHS_MATCH = ({ path }) => ({
1017
979
  type: "https://zup.fail/file-rename-paths-match",
1018
980
  title: "New file name matches old file name",
1019
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
981
+ status: HttpStatusCode.BAD_REQUEST,
1020
982
  detail: `Failed to rename file, the old path ${path} matched the provided new path. Please choose a different name.`,
1021
983
  });
1022
- exports.FILE_RENAME_PATHS_MATCH = FILE_RENAME_PATHS_MATCH;
1023
- const FILE_RENAME_CANNOT_CHANGE_EXTENSION = ({ oldExtension, newExtension }) => ({
984
+ export const FILE_RENAME_CANNOT_CHANGE_EXTENSION = ({ oldExtension, newExtension }) => ({
1024
985
  type: "https://zup.fail/file-rename-cannot-change-extension",
1025
986
  title: "Cannot change extension of renamed file",
1026
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
987
+ status: HttpStatusCode.BAD_REQUEST,
1027
988
  detail: `Failed to rename file, the new extension ${newExtension} must match the old extension ${oldExtension}.`,
1028
989
  });
1029
- exports.FILE_RENAME_CANNOT_CHANGE_EXTENSION = FILE_RENAME_CANNOT_CHANGE_EXTENSION;
1030
- const FILE_RENAME_FILE_ALREADY_EXISTS = ({ path }) => ({
990
+ export const FILE_RENAME_FILE_ALREADY_EXISTS = ({ path }) => ({
1031
991
  type: "https://zup.fail/file-rename-file-exists",
1032
992
  title: "File already exists",
1033
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
993
+ status: HttpStatusCode.BAD_REQUEST,
1034
994
  detail: `Failed to rename file, there already exists a file at ${path}. Please choose a different name.`,
1035
995
  });
1036
- exports.FILE_RENAME_FILE_ALREADY_EXISTS = FILE_RENAME_FILE_ALREADY_EXISTS;
1037
- const FILE_RENAME_FAILED = ({ path }) => ({
996
+ export const FILE_RENAME_FAILED = ({ path }) => ({
1038
997
  type: "https://zup.fail/file-rename-failure",
1039
998
  title: "File rename failed",
1040
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
999
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
1041
1000
  detail: `Failed to rename file ${path}. Please try again or contact support.`,
1042
1001
  });
1043
- exports.FILE_RENAME_FAILED = FILE_RENAME_FAILED;
1044
- const FILE_WRITE_FAILED = ({ path }) => ({
1002
+ export const FILE_WRITE_FAILED = ({ path }) => ({
1045
1003
  type: "https://zup.fail/file-write-failure",
1046
1004
  title: "File write failed",
1047
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
1005
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
1048
1006
  detail: `Failed to write file ${path}. Please try again or contact support.`,
1049
1007
  });
1050
- exports.FILE_WRITE_FAILED = FILE_WRITE_FAILED;
1051
- const CANNOT_DELETE_ESSENTIAL_FILE = ({ path }) => ({
1008
+ export const CANNOT_DELETE_ESSENTIAL_FILE = ({ path }) => ({
1052
1009
  type: "https://zup.fail/essential-file-deletion",
1053
1010
  title: "Cannot delete essential file",
1054
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1011
+ status: HttpStatusCode.BAD_REQUEST,
1055
1012
  detail: `File '${path}' cannot be deleted. It is an essential file.`,
1056
1013
  });
1057
- exports.CANNOT_DELETE_ESSENTIAL_FILE = CANNOT_DELETE_ESSENTIAL_FILE;
1058
- const CANNOT_DELETE_ESSENTIAL_DIRECTORY = ({ path }) => ({
1014
+ export const CANNOT_DELETE_ESSENTIAL_DIRECTORY = ({ path }) => ({
1059
1015
  type: "https://zup.fail/essential-directory-deletion",
1060
1016
  title: "Cannot delete essential file",
1061
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1017
+ status: HttpStatusCode.BAD_REQUEST,
1062
1018
  detail: `Directory '${path}' cannot be deleted. It is an essential directory.`,
1063
1019
  });
1064
- exports.CANNOT_DELETE_ESSENTIAL_DIRECTORY = CANNOT_DELETE_ESSENTIAL_DIRECTORY;
1065
- const CANNOT_DELETE_SOLE_OPEN_API_FILE = () => ({
1020
+ export const CANNOT_DELETE_SOLE_OPEN_API_FILE = () => ({
1066
1021
  type: "https://zup.fail/sole-open-api-file-deletion",
1067
1022
  title: "Cannot delete sole OpenAPI file",
1068
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1023
+ status: HttpStatusCode.BAD_REQUEST,
1069
1024
  detail: `Your project must have at least 1 OpenAPI file.`,
1070
1025
  });
1071
- exports.CANNOT_DELETE_SOLE_OPEN_API_FILE = CANNOT_DELETE_SOLE_OPEN_API_FILE;
1072
- const FILE_DELETE_FAILED = ({ path }) => ({
1026
+ export const FILE_DELETE_FAILED = ({ path }) => ({
1073
1027
  type: "https://zup.fail/file-delete-failure",
1074
1028
  title: "File deletion failed",
1075
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
1029
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
1076
1030
  detail: `Failed to delete file ${path}. Please try again or contact support.`,
1077
1031
  });
1078
- exports.FILE_DELETE_FAILED = FILE_DELETE_FAILED;
1079
- const DIRECTORY_DELETE_FAILED = ({ path }) => ({
1032
+ export const DIRECTORY_DELETE_FAILED = ({ path }) => ({
1080
1033
  type: "https://zup.fail/directory-delete-failure",
1081
1034
  title: "Directory deletion failed",
1082
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
1035
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
1083
1036
  detail: `Failed to delete directory ${path}. Please try again or contact support.`,
1084
1037
  });
1085
- exports.DIRECTORY_DELETE_FAILED = DIRECTORY_DELETE_FAILED;
1086
- exports.BUCKET_API_KEY_SERVICE_CONFLICT = {
1038
+ export const BUCKET_API_KEY_SERVICE_CONFLICT = {
1087
1039
  type: "https://zup.fail/bucket-api-key-service-error",
1088
1040
  title: "Bucket name conflicts",
1089
- status: http_status_1.HttpStatusCode.CONFLICT,
1041
+ status: HttpStatusCode.CONFLICT,
1090
1042
  };
1091
- exports.BUCKET_NOT_FOUND = {
1043
+ export const BUCKET_NOT_FOUND = {
1092
1044
  type: "https://zup.fail/bucket-not-found",
1093
1045
  title: "Bucket cannot be found",
1094
- status: http_status_1.HttpStatusCode.NOT_FOUND,
1046
+ status: HttpStatusCode.NOT_FOUND,
1095
1047
  };
1096
- exports.UNABLE_UPGRADE_PLAN = {
1048
+ export const UNABLE_UPGRADE_PLAN = {
1097
1049
  type: "https://zup.fail/cant-upgrade-plan",
1098
1050
  title: "Can't upgrade to selected plan",
1099
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1051
+ status: HttpStatusCode.BAD_REQUEST,
1100
1052
  };
1101
- exports.METERING_BUCKET_CREATION_FAILED = {
1053
+ export const METERING_BUCKET_CREATION_FAILED = {
1102
1054
  type: "https://zup.fail/metering-bucket-creation-failed",
1103
1055
  title: "Failed to create metering buckets for project",
1104
- status: http_status_1.HttpStatusCode.INTERNAL_SERVER_ERROR,
1056
+ status: HttpStatusCode.INTERNAL_SERVER_ERROR,
1105
1057
  };
1106
- exports.ACCOUNT_RBAC_DISABLED = {
1058
+ export const ACCOUNT_RBAC_DISABLED = {
1107
1059
  type: "https://zup.fail/account_rbac_disabled",
1108
1060
  title: "Forbidden",
1109
1061
  detail: "Your account does not have fine-grained RBAC feature enabled. Please contact support to enable this feature.",
1110
- status: http_status_1.HttpStatusCode.FORBIDDEN,
1062
+ status: HttpStatusCode.FORBIDDEN,
1111
1063
  };
1112
- exports.RBAC_INVALID_EXPIRATION_DATE = {
1064
+ export const RBAC_INVALID_EXPIRATION_DATE = {
1113
1065
  type: "https://zup.fail/rbac_invalid_expiration_date",
1114
1066
  title: "Bad Request",
1115
1067
  detail: "The expiration date provided cannot be in the past. Please provide a valid expiration date.",
1116
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1068
+ status: HttpStatusCode.BAD_REQUEST,
1117
1069
  };
1118
- exports.RBACCONFIGURATION_DOES_NOT_EXISTS = {
1070
+ export const RBACCONFIGURATION_DOES_NOT_EXISTS = {
1119
1071
  type: "https://zup.fail/rbacconfiguration-does-not-exists",
1120
1072
  title: "Bad Request",
1121
1073
  detail: "The api key configuration does not exist or you don't have access to it.",
1122
- status: http_status_1.HttpStatusCode.NOT_FOUND,
1074
+ status: HttpStatusCode.NOT_FOUND,
1123
1075
  };
1124
- exports.RBACCONFIGURATION_REQUIRE_ENVIRONMENTS = {
1076
+ export const RBACCONFIGURATION_REQUIRE_ENVIRONMENTS = {
1125
1077
  type: "https://zup.fail/rbacconfiguration-required-environments",
1126
1078
  title: "Bad Request",
1127
1079
  detail: "Please provide at least one environment value. Valid options include 'production', 'preview' and 'development'.",
1128
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1080
+ status: HttpStatusCode.BAD_REQUEST,
1129
1081
  };
1130
- exports.RBACCONFIGURATION_INVALID_ENVIRONMENTS = {
1082
+ export const RBACCONFIGURATION_INVALID_ENVIRONMENTS = {
1131
1083
  type: "https://zup.fail/rbacconfiguration-invalid-environments",
1132
1084
  title: "Bad Request",
1133
1085
  detail: "Please provide at least one environment value. Valid options include 'production', 'preview' and 'development'.",
1134
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1086
+ status: HttpStatusCode.BAD_REQUEST,
1135
1087
  };
1136
- exports.RBACCONFIGURATION_REQUIRE_PROJECTS = {
1088
+ export const RBACCONFIGURATION_REQUIRE_PROJECTS = {
1137
1089
  type: "https://zup.fail/rbacconfiguration-required-projects",
1138
1090
  title: "Bad Request",
1139
1091
  detail: "Please provide at least one project to configure access for.",
1140
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1092
+ status: HttpStatusCode.BAD_REQUEST,
1141
1093
  };
1142
- exports.RBACCONFIGURATION_ACCOUNT_HAS_NO_PROJECTS = {
1094
+ export const RBACCONFIGURATION_ACCOUNT_HAS_NO_PROJECTS = {
1143
1095
  type: "https://zup.fail/rbacconfiguration-no-projects",
1144
1096
  title: "Bad Request",
1145
1097
  detail: "The account does not have any projects to configure. Please create at least one project before configuring api key access.",
1146
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1098
+ status: HttpStatusCode.BAD_REQUEST,
1147
1099
  };
1148
- exports.RBACCONFIGURATION_INVALID_PROJECT_PROVIDED = {
1100
+ export const RBACCONFIGURATION_INVALID_PROJECT_PROVIDED = {
1149
1101
  type: "https://zup.fail/rbacconfiguration-invalid-project",
1150
1102
  title: "Bad Request",
1151
1103
  detail: "One or more of the projects provided is not part of the account or does not exist. Make sure all the projects are valid and try again.",
1152
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1104
+ status: HttpStatusCode.BAD_REQUEST,
1153
1105
  };
1154
- exports.RBACCONFIGURATION_INVALID_OPENFGA_CONFIG = {
1106
+ export const RBACCONFIGURATION_INVALID_OPENFGA_CONFIG = {
1155
1107
  type: "https://zup.fail/rbacconfiguration-invalid-openfga-config",
1156
1108
  title: "Bad Gateway",
1157
1109
  detail: "The provided configuration caused an unexpected error. Please contact support.",
1158
- status: http_status_1.HttpStatusCode.BAD_GATEWAY,
1110
+ status: HttpStatusCode.BAD_GATEWAY,
1159
1111
  };
1160
- exports.RBACCONFIGURATION_DELETE_MISCONFIGURATION = {
1112
+ export const RBACCONFIGURATION_DELETE_MISCONFIGURATION = {
1161
1113
  type: "https://zup.fail/rbacconfiguration-delete-misconfiguration",
1162
1114
  title: "Bad Request",
1163
1115
  detail: "The provided configuration was not correctly created and cannot be deleted. Please contact support.",
1164
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1116
+ status: HttpStatusCode.BAD_REQUEST,
1165
1117
  };
1166
- exports.RBACCONFIGURATION_MISCONFIGURATION = {
1118
+ export const RBACCONFIGURATION_MISCONFIGURATION = {
1167
1119
  type: "https://zup.fail/rbacconfiguration-misconfiguration",
1168
1120
  title: "Bad Request",
1169
1121
  detail: "The provided configuration was not correctly created and cannot be used. Please contact support.",
1170
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1122
+ status: HttpStatusCode.BAD_REQUEST,
1171
1123
  };
1172
- exports.RBACCONFIGURATION_CONSUMER_LOCKED = {
1124
+ export const RBACCONFIGURATION_CONSUMER_LOCKED = {
1173
1125
  type: "https://zup.fail/rbacconfiguration-consumer-locked",
1174
1126
  title: "Forbidden",
1175
1127
  detail: "The provided consumer is locked and can't be modified or deleted.",
1176
- status: http_status_1.HttpStatusCode.FORBIDDEN,
1128
+ status: HttpStatusCode.FORBIDDEN,
1177
1129
  };
1178
- exports.USER_HAS_NO_ACCESS_TO_CONSUMER = {
1130
+ export const USER_HAS_NO_ACCESS_TO_CONSUMER = {
1179
1131
  type: "https://zup.fail/forbidden",
1180
1132
  title: "Forbidden",
1181
1133
  detail: "You are not authorized to access the consumer resource.",
1182
- status: http_status_1.HttpStatusCode.FORBIDDEN,
1134
+ status: HttpStatusCode.FORBIDDEN,
1183
1135
  };
1184
- exports.INVALID_USER_ROLE = {
1136
+ export const INVALID_USER_ROLE = {
1185
1137
  type: "https://zup.fail/invalid-user-role",
1186
1138
  title: "Bad Request",
1187
1139
  detail: "You provided an invalid user role. Valid options include 'admin', 'developer' and 'member'.",
1188
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1140
+ status: HttpStatusCode.BAD_REQUEST,
1189
1141
  };
1190
- exports.USER_DOES_NOT_EXIST = {
1142
+ export const USER_DOES_NOT_EXIST = {
1191
1143
  type: "https://zup.fail/user-does-not-exist",
1192
1144
  title: "Forbidden",
1193
1145
  detail: "You are not authorized to access the user resource.",
1194
- status: http_status_1.HttpStatusCode.FORBIDDEN,
1146
+ status: HttpStatusCode.FORBIDDEN,
1195
1147
  };
1196
- exports.USER_CANNOT_EDIT_OWN_ROLE = {
1148
+ export const USER_CANNOT_EDIT_OWN_ROLE = {
1197
1149
  type: "https://zup.fail/user-edit-itself",
1198
1150
  title: "Forbidden",
1199
1151
  detail: "You are not authorized to edit your own access role.",
1200
- status: http_status_1.HttpStatusCode.FORBIDDEN,
1152
+ status: HttpStatusCode.FORBIDDEN,
1201
1153
  };
1202
- exports.USER_HAS_NO_ACCESS_TO_PROJECT_ENVIRONMENT = {
1154
+ export const USER_HAS_NO_ACCESS_TO_PROJECT_ENVIRONMENT = {
1203
1155
  type: "https://zup.fail/user-has-no-access-to-project-env",
1204
1156
  title: "Forbidden",
1205
1157
  detail: "You are not authorized to access this project environment.",
1206
- status: http_status_1.HttpStatusCode.FORBIDDEN,
1158
+ status: HttpStatusCode.FORBIDDEN,
1207
1159
  };
1208
- exports.USER_HAS_NO_DEPLOY_ACCESS_TO_PROJECT_ENVIRONMENT = {
1160
+ export const USER_HAS_NO_DEPLOY_ACCESS_TO_PROJECT_ENVIRONMENT = {
1209
1161
  type: "https://zup.fail/user-has-no-deploy-access-to-project-env",
1210
1162
  title: "Forbidden",
1211
1163
  detail: "You are not authorized to access to deploy this project environment.",
1212
- status: http_status_1.HttpStatusCode.FORBIDDEN,
1164
+ status: HttpStatusCode.FORBIDDEN,
1213
1165
  };
1214
- exports.ACCOUNT_ADMIN_INVALID_PROJECT_ROLE_DOWNGRADE = {
1166
+ export const ACCOUNT_ADMIN_INVALID_PROJECT_ROLE_DOWNGRADE = {
1215
1167
  type: "https://zup.fail/account-admin-invalid-project-role-downgrade",
1216
1168
  title: "Bad Request",
1217
1169
  detail: "An account administrator cannot be downgraded to a non-administrator role in a project.",
1218
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1170
+ status: HttpStatusCode.BAD_REQUEST,
1219
1171
  };
1220
- exports.USER_HAS_NO_PROD_ENV_VAR_ACCESS = {
1172
+ export const USER_HAS_NO_PROD_ENV_VAR_ACCESS = {
1221
1173
  type: "https://zup.fail/user-no-prod-env-var-access",
1222
1174
  title: "Forbidden",
1223
1175
  detail: "You are not authorized to modify or create the project's production environment variables.",
1224
- status: http_status_1.HttpStatusCode.FORBIDDEN,
1176
+ status: HttpStatusCode.FORBIDDEN,
1225
1177
  };
1226
- exports.USER_HAS_NO_DEVELOPER_ENV_VAR_ACCESS = {
1178
+ export const USER_HAS_NO_DEVELOPER_ENV_VAR_ACCESS = {
1227
1179
  type: "https://zup.fail/user-no-dev-env-var-access",
1228
1180
  title: "Forbidden",
1229
1181
  detail: "You are not authorized to modify or create the project's preview and development environment variables.",
1230
- status: http_status_1.HttpStatusCode.FORBIDDEN,
1182
+ status: HttpStatusCode.FORBIDDEN,
1231
1183
  };
1232
- exports.MISCONFIGURED_ENV_VAR = {
1184
+ export const MISCONFIGURED_ENV_VAR = {
1233
1185
  type: "https://zup.fail/misconfigured-env-var",
1234
1186
  title: "Bad Request",
1235
1187
  detail: "The environment variable is not correctly configured on any environment. Please contact support.",
1236
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1188
+ status: HttpStatusCode.BAD_REQUEST,
1237
1189
  };
1238
- exports.ACCOUNT_ALREADY_RBAC_ENABLED = {
1190
+ export const ACCOUNT_ALREADY_RBAC_ENABLED = {
1239
1191
  type: "https://zup.fail/misconfigured-env-var",
1240
1192
  title: "Bad Request",
1241
1193
  detail: "The account has been previously migrated to use RBAC.",
1242
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1194
+ status: HttpStatusCode.BAD_REQUEST,
1243
1195
  };
1244
- exports.ACCOUNT_MISCONFIGURED_FOR_RBAC = {
1196
+ export const ACCOUNT_MISCONFIGURED_FOR_RBAC = {
1245
1197
  type: "https://zup.fail/misconfigured-env-var",
1246
1198
  title: "Bad Request",
1247
1199
  detail: "This account has conflicting account roles and cannot be self-migrated to use RBAC. Please contact support.",
1248
- status: http_status_1.HttpStatusCode.BAD_REQUEST,
1200
+ status: HttpStatusCode.BAD_REQUEST,
1249
1201
  };
1250
1202
  //# sourceMappingURL=problems.js.map