@stack-spot/portal-network 0.157.2-beta.2 → 0.158.0-beta.2

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/src/apis.json CHANGED
@@ -218,7 +218,7 @@
218
218
  "url": {
219
219
  "dev": "https://discover-discover-core.dev.stackspot.com",
220
220
  "stg": "https://discover-discover-core.stg.stackspot.com",
221
- "prd": "https://discover-discover-core.prd.stackspot.com"
221
+ "prd": "https://discover-discover-core.stackspot.com"
222
222
  },
223
223
  "docs": "/v3/api-docs"
224
224
  }
@@ -42,6 +42,7 @@ import {
42
42
  contextgetConsolidatedPluginInputs,
43
43
  contextgetConsolidatedPluginInputsWithConnectionInterfaces,
44
44
  defaults,
45
+ environmentControllergetEnvironments,
45
46
  managerRunControllerdeleteApplication,
46
47
  managerRunControllerdeleteSharedInfra,
47
48
  sharedInfraControllerV2GetSharedInfraActivities,
@@ -225,6 +226,10 @@ class WorkspaceManagerClient extends ReactQueryNetworkClient {
225
226
  * Gets applied plugins in shared infra
226
227
  */
227
228
  appliedPluginsSharedInfra = this.query(sharedInfraControllerV2GetSharedInfraAppliedPlugins)
229
+ /**
230
+ * List all environments from account
231
+ */
232
+ listEnvironments = this.query(environmentControllergetEnvironments)
228
233
  /**
229
234
  * Gets applied plugins in application
230
235
  */
@@ -61,11 +61,11 @@ function createMessage(status: number, raw: ErrorResponse, dictionary: Dictionar
61
61
  const dictDetails = (detailsDictionary[api?.toLowerCase() as keyof typeof detailsDictionary] ?? {})[language || 'en']
62
62
  const dictionaryDetails = raw.code && dictDetails ? dictDetails[raw.code] : {}
63
63
 
64
- if (raw.suggestedMessages) {
64
+ if (raw?.suggestedMessages) {
65
65
  const parseLanguage: Record<Language, LanguageSuggestedMessageKeys> = { pt: 'ptBr', en: 'enUs' }
66
- const suggestedMessages = raw.suggestedMessages[parseLanguage[language || 'en']]
66
+ const suggestedMessages = raw?.suggestedMessages?.[parseLanguage[language || 'en']]
67
67
  if (suggestedMessages) {
68
- return { description: suggestedMessages, title, ...dictionaryDetails }
68
+ return { description: suggestedMessages, ...dictionaryDetails }
69
69
  }
70
70
  }
71
71