@stack-spot/portal-network 0.180.1 → 0.181.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/CHANGELOG.md +37 -0
- package/dist/error/DefaultAPIError.d.ts.map +1 -1
- package/dist/error/DefaultAPIError.js.map +1 -1
- package/dist/error/StackspotAPIError.d.ts +3 -4
- package/dist/error/StackspotAPIError.d.ts.map +1 -1
- package/dist/error/StackspotAPIError.js +3 -3
- package/dist/error/StackspotAPIError.js.map +1 -1
- package/package.json +7 -7
- package/src/error/DefaultAPIError.ts +5 -5
- package/src/error/StackspotAPIError.ts +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.181.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.180.1...portal-network@v0.181.0) (2025-09-30)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* 2288 association secrets ([#1476](https://github.com/stack-spot/portal-commons/issues/1476)) ([d14e33f](https://github.com/stack-spot/portal-commons/commit/d14e33f590d965ffacdcd997c30cc58d421148d1))
|
|
9
|
+
* Add analytics and SCM search endpoints support ([#1537](https://github.com/stack-spot/portal-commons/issues/1537)) ([e7f1389](https://github.com/stack-spot/portal-commons/commit/e7f1389a7c87a5455017f8af6653df79ff5aba2d))
|
|
10
|
+
* add analytics methods to code-shift client ([#1319](https://github.com/stack-spot/portal-commons/issues/1319)) ([634c612](https://github.com/stack-spot/portal-commons/commit/634c6129c20640a1ebd99fad767bdec42f1b2a95))
|
|
11
|
+
* add discover api (adp) ([#1510](https://github.com/stack-spot/portal-commons/issues/1510)) ([3690ee4](https://github.com/stack-spot/portal-commons/commit/3690ee44653f24e92e503fda2bd31d6b4e6b4e2d))
|
|
12
|
+
* added remote quick command endpoints ([#1440](https://github.com/stack-spot/portal-commons/issues/1440)) ([41f1c45](https://github.com/stack-spot/portal-commons/commit/41f1c457cd000509b2c20c2338f4bb9af2c50de7))
|
|
13
|
+
* Adds analytics details API ([#1435](https://github.com/stack-spot/portal-commons/issues/1435)) ([da1e3e1](https://github.com/stack-spot/portal-commons/commit/da1e3e1ef391f1d253e1abf4617ab6aee64999d3))
|
|
14
|
+
* exposed openapi request ([105155b](https://github.com/stack-spot/portal-commons/commit/105155b211e3ab0d12399c54ea32a40dc7c37405))
|
|
15
|
+
* exposed openapi request ([#1606](https://github.com/stack-spot/portal-commons/issues/1606)) ([e917526](https://github.com/stack-spot/portal-commons/commit/e91752611f5254ebb7e25ff1b654a6de45d87bed))
|
|
16
|
+
* Favorite agents on agent tools ([#1420](https://github.com/stack-spot/portal-commons/issues/1420)) ([8caeb02](https://github.com/stack-spot/portal-commons/commit/8caeb02e8102c17c56f20198530eb3e463629070))
|
|
17
|
+
* Feat 2141 field for QC end step ([#1542](https://github.com/stack-spot/portal-commons/issues/1542)) ([1fac22d](https://github.com/stack-spot/portal-commons/commit/1fac22d4236eb8a014df357622c4ba40348f658c))
|
|
18
|
+
* Feat list indexed files ks ([#1521](https://github.com/stack-spot/portal-commons/issues/1521)) ([993ff53](https://github.com/stack-spot/portal-commons/commit/993ff53969ed2a5099ea4d0743fe60e8cedea3ba))
|
|
19
|
+
* itau selft hosted ([#1527](https://github.com/stack-spot/portal-commons/issues/1527)) ([38abce7](https://github.com/stack-spot/portal-commons/commit/38abce78fcab84748924544d37aaa71e2149bd98))
|
|
20
|
+
* upgrades translation lib ([#1643](https://github.com/stack-spot/portal-commons/issues/1643)) ([05db11f](https://github.com/stack-spot/portal-commons/commit/05db11f399dd2c6e1815e74ee99f8b6c2e6fedef))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Bug Fixes
|
|
24
|
+
|
|
25
|
+
* add error mapping in cloud platform ([#1522](https://github.com/stack-spot/portal-commons/issues/1522)) ([da78360](https://github.com/stack-spot/portal-commons/commit/da78360a42b273dd36465303b7bb77eb463cc849))
|
|
26
|
+
* agent tools buildStackSpotError ([#1478](https://github.com/stack-spot/portal-commons/issues/1478)) ([89455ae](https://github.com/stack-spot/portal-commons/commit/89455aeadf2b8b3090a807a755d1a4deaff9e26c))
|
|
27
|
+
* Change api call on message for agent toolkit details ([#1479](https://github.com/stack-spot/portal-commons/issues/1479)) ([023e57b](https://github.com/stack-spot/portal-commons/commit/023e57b3389fee9aac60fbde509823183e28ae70))
|
|
28
|
+
* create agent ([#1428](https://github.com/stack-spot/portal-commons/issues/1428)) ([d44173d](https://github.com/stack-spot/portal-commons/commit/d44173d9da98d9b3974dd594609b600fdb64aac1))
|
|
29
|
+
* endpoints itau ([#1584](https://github.com/stack-spot/portal-commons/issues/1584)) ([c40aecb](https://github.com/stack-spot/portal-commons/commit/c40aecbe724fbaa9a10fa7cfd3073de71ff1af51))
|
|
30
|
+
* interface FixedAddResourceToWorkspaceAi ([#1400](https://github.com/stack-spot/portal-commons/issues/1400)) ([ec455de](https://github.com/stack-spot/portal-commons/commit/ec455de188e04d23c3d1c5c98441a7c2ea7d87b6))
|
|
31
|
+
* List agents available to be added to other agents ([#1433](https://github.com/stack-spot/portal-commons/issues/1433)) ([2436a7e](https://github.com/stack-spot/portal-commons/commit/2436a7e7060bba950c8e6b91832c66db42482e71))
|
|
32
|
+
* tokens limit ([#1519](https://github.com/stack-spot/portal-commons/issues/1519)) ([b7fdd19](https://github.com/stack-spot/portal-commons/commit/b7fdd19b4051b123b33c0ef073c57780b856f29a))
|
|
33
|
+
* translation in cloud platform errors ([#1583](https://github.com/stack-spot/portal-commons/issues/1583)) ([3a47adf](https://github.com/stack-spot/portal-commons/commit/3a47adf33b90f21a421a76db80940e59bc07e1fc))
|
|
34
|
+
* update agent tools and add getSecretsByIds ([#1458](https://github.com/stack-spot/portal-commons/issues/1458)) ([eee24d0](https://github.com/stack-spot/portal-commons/commit/eee24d0ba9d8b92291156a65beeaf513b476a8db))
|
|
35
|
+
* Update code buddy ([#1431](https://github.com/stack-spot/portal-commons/issues/1431)) ([b283553](https://github.com/stack-spot/portal-commons/commit/b2835539279961f16fca56265cdd6f00ff3afc5c))
|
|
36
|
+
* update code buddy ([#1494](https://github.com/stack-spot/portal-commons/issues/1494)) ([a21d681](https://github.com/stack-spot/portal-commons/commit/a21d681600e055e9696e68818a626affa85c1850))
|
|
37
|
+
* update horizon api ([#1470](https://github.com/stack-spot/portal-commons/issues/1470)) ([9f99d84](https://github.com/stack-spot/portal-commons/commit/9f99d841e2d9ea1ec93d560264e70dc58c4a26cd))
|
|
38
|
+
* workspace input ([#1523](https://github.com/stack-spot/portal-commons/issues/1523)) ([5447804](https://github.com/stack-spot/portal-commons/commit/5447804dad162a7e78304c2079721403f3a5c0bb))
|
|
39
|
+
|
|
3
40
|
## [0.180.0](https://github.com/stack-spot/portal-commons/compare/portal-network@v0.179.0...portal-network@v0.180.0) (2025-09-24)
|
|
4
41
|
|
|
5
42
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultAPIError.d.ts","sourceRoot":"","sources":["../../src/error/DefaultAPIError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"DefaultAPIError.d.ts","sourceRoot":"","sources":["../../src/error/DefaultAPIError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAQzD,OAAO,EAA0B,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAC/E,OAAO,EAAE,aAAa,EAAmD,MAAM,SAAS,CAAA;AAwCxF,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAUlH;AA4CD;;GAEG;AACH,qBAAa,eAAgB,SAAQ,iBAAiB;IACpD;;OAEG;IACH,IAAI,CAAC,EAAE,aAAa,CAAA;IACpB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAA;;IAGP;;OAEG;IACH,WAAW,EAAE,GAAG;IAChB;;OAEG;IACH,MAAM,EAAE,MAAM;IACd;;OAEG;IACH,UAAU,EAAE,UAAU;IACtB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO;CAkBpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultAPIError.js","sourceRoot":"","sources":["../../src/error/DefaultAPIError.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAA0B,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAG/E,+GAA+G;AAC/G,MAAM,mBAAmB,GAAG;IAC1B,uBAAuB,EAAE,WAAW,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,WAAW,EAAE,cAAc,EAAE,aAAa;CAC9H,CAAA;AAED,MAAM,eAAe,GAAG;IACtB,GAAG,EAAE,SAAS;IACd,GAAG,EAAE,eAAe;CACrB,CAAA;AAED,MAAM,iBAAiB,GAAG;IACxB,GAAG,EAAE,gBAAgB;IACrB,SAAS,EAAE,aAAa;CACzB,CAAA;AAED,SAAS,QAAQ,CAAC,MAAc,EAAE,GAAkB,EAAE,UAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"DefaultAPIError.js","sourceRoot":"","sources":["../../src/error/DefaultAPIError.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA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AW,EAAE,iBAAiB,EAAE,GAAG,iBAAiB,EAAE,CAAA;QACjE,CAAC;IACH,CAAC;IAED,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,iBAAiB,EAAE,CAAA;AACrD,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,iBAAiB;IAUpD;IACE;;OAEG;IACH,WAAgB;IAChB;;OAEG;IACH,MAAc;IACd;;OAEG;IACH,UAAsB;IACtB;;OAEG;IACH,OAAiB;QAEjB,IAAI,cAAc,CAAA;QAClB,IAAI,CAAC;YACH,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;QAC1C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,cAAc,GAAG,WAAW,CAAA;QAC9B,CAAC;QAED,KAAK,CAAC;YACJ,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,cAAc,CAAC,IAAI;YACzB,OAAO,EAAE,QAAQ,CAAC,EAAE,CAAC,aAAa,CAAC,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,QAAQ,CAAC;YAChF,OAAO;SACR,CAAC,CAAA;QAvCJ;;WAEG;QACH;;;;;WAAoB;QACpB;;WAEG;QACH;;;;;WAAS;QAiCP,IAAI,CAAC,GAAG,GAAG,cAAc,CAAA;QACzB,IAAI,IAAI,CAAC,GAAG,EAAE,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,GAAG,EAAE,OAAO,KAAK,SAAS;YAAE,IAAI,CAAC,IAAI,GAAG,cAAc,CAAA;IACnI,CAAC;CACF"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export type InternationalizedMessage = (language: Language) => string | ErrorDetailsProperties;
|
|
1
|
+
export type InternationalizedMessage = (language: 'pt' | 'en') => string | ErrorDetailsProperties;
|
|
3
2
|
export interface ErrorDetailsProperties {
|
|
4
3
|
/**
|
|
5
4
|
* The error title
|
|
@@ -62,8 +61,8 @@ export declare class StackspotAPIError extends Error {
|
|
|
62
61
|
* @param language
|
|
63
62
|
* @returns an error message
|
|
64
63
|
*/
|
|
65
|
-
translate(language?:
|
|
66
|
-
translateDetails(language?:
|
|
64
|
+
translate(language?: "pt" | "en"): string;
|
|
65
|
+
translateDetails(language?: "pt" | "en"): ErrorDetailsProperties;
|
|
67
66
|
}
|
|
68
67
|
export {};
|
|
69
68
|
//# sourceMappingURL=StackspotAPIError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackspotAPIError.d.ts","sourceRoot":"","sources":["../../src/error/StackspotAPIError.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StackspotAPIError.d.ts","sourceRoot":"","sources":["../../src/error/StackspotAPIError.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,wBAAwB,GAAG,CAAC,QAAQ,EAAE,IAAI,GAAG,IAAI,KAAK,MAAM,GAAG,sBAAsB,CAAA;AAEjG,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,eAAe;IACvB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,OAAO,CAAC,EAAE,wBAAwB,GAAG,MAAM,GAAG,sBAAsB,CAAC;IACrE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAEhB;AAOD,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;IACxB,OAAO,CAAC,IAAI,CAAC,CAA0B;gBAE3B,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,eAAe;IAStE;;;;OAIG;IACH,SAAS,CAAC,QAAQ,cAAoB,GAAG,MAAM;IAQ/C,gBAAgB,CAAC,QAAQ,cAAoB,GAAG,sBAAsB;CASvE"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getLanguage } from '@stack-spot/portal-translate';
|
|
1
|
+
import { getLanguage, ptEn } from '@stack-spot/portal-translate';
|
|
2
2
|
function getMessage(error) {
|
|
3
3
|
const message = typeof error === 'function' ? error('en') : error;
|
|
4
4
|
return typeof message === 'string' ? message : message?.description;
|
|
@@ -50,13 +50,13 @@ export class StackspotAPIError extends Error {
|
|
|
50
50
|
* @param language
|
|
51
51
|
* @returns an error message
|
|
52
52
|
*/
|
|
53
|
-
translate(language = getLanguage()) {
|
|
53
|
+
translate(language = getLanguage(ptEn)) {
|
|
54
54
|
const unknown = language === 'en' ? 'unknown error' : 'erro desconhecido';
|
|
55
55
|
const error = this.intl?.(language);
|
|
56
56
|
const message = typeof error === 'string' ? error : error?.description;
|
|
57
57
|
return message ?? this.message ?? this.code ?? (this.status === 0 ? unknown : `${this.status}`);
|
|
58
58
|
}
|
|
59
|
-
translateDetails(language = getLanguage()) {
|
|
59
|
+
translateDetails(language = getLanguage(ptEn)) {
|
|
60
60
|
const unknown = language === 'en' ? 'unknown error' : 'erro desconhecido';
|
|
61
61
|
const errorMessage = this.intl?.(language);
|
|
62
62
|
if (typeof errorMessage === 'string')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StackspotAPIError.js","sourceRoot":"","sources":["../../src/error/StackspotAPIError.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":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
|
"./package.json": "./package.json",
|
|
10
10
|
"./api/*": "./dist/api/*.js"
|
|
11
11
|
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "rimraf dist && tsc-silent -p tsconfig.build.json --suppress @/src/api/ && tsc-esm-fix --target='dist'",
|
|
14
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
15
|
+
"generate": "tsx ./scripts/generate-apis.ts"
|
|
16
|
+
},
|
|
12
17
|
"peerDependencies": {
|
|
13
18
|
"@stack-spot/auth": "^5.3.3",
|
|
14
19
|
"@stack-spot/opa": "^2.6.1",
|
|
15
|
-
"@stack-spot/portal-translate": "^1.
|
|
20
|
+
"@stack-spot/portal-translate": "^2.1.0",
|
|
16
21
|
"@tanstack/react-query": "^5.59.15",
|
|
17
22
|
"react": "^18.2.0",
|
|
18
23
|
"react-dom": "^18.2.0"
|
|
@@ -50,10 +55,5 @@
|
|
|
50
55
|
"@oazapfts/runtime": "^1.0.3",
|
|
51
56
|
"fetch-event-stream": "^0.1.5",
|
|
52
57
|
"lodash": "^4.17.21"
|
|
53
|
-
},
|
|
54
|
-
"scripts": {
|
|
55
|
-
"build": "rimraf dist && tsc-silent -p tsconfig.build.json --suppress @/src/api/ && tsc-esm-fix --target='dist'",
|
|
56
|
-
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
57
|
-
"generate": "tsx ./scripts/generate-apis.ts"
|
|
58
58
|
}
|
|
59
59
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Dictionary
|
|
1
|
+
import { Dictionary } from '@stack-spot/portal-translate'
|
|
2
2
|
import { every, isString } from 'lodash'
|
|
3
3
|
import { actionDetails } from './dictionary/action-details'
|
|
4
4
|
import { baseDictionary } from './dictionary/base'
|
|
@@ -24,7 +24,7 @@ const detailsDictionary = {
|
|
|
24
24
|
actionapi: actionDetails,
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function getTitle(status: number, raw: ErrorResponse, dictionary: Dictionary, language:
|
|
27
|
+
function getTitle(status: number, raw: ErrorResponse, dictionary: Dictionary, language: 'pt' | 'en') {
|
|
28
28
|
if (ignoredTitleErrorCodes.includes(raw.code)) return ' '
|
|
29
29
|
if (dictionary[language][raw.code]) return dictionary[language][raw.code]
|
|
30
30
|
if (raw.details && !ignoredDescriptions.includes(raw.details)) return raw.details
|
|
@@ -35,8 +35,8 @@ function getValues(detail: ValidationDetails) {
|
|
|
35
35
|
return detail.values && every(detail.values, isString) ? `\n${detail.values.join('\n')}` : ''
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function getSuggestedMessages(suggestedMessage: ErrorResponse['suggestedMessages'] | null | undefined, language?:
|
|
39
|
-
const parseLanguage: Record<
|
|
38
|
+
function getSuggestedMessages(suggestedMessage: ErrorResponse['suggestedMessages'] | null | undefined, language?: 'pt' | 'en') {
|
|
39
|
+
const parseLanguage: Record<'pt' | 'en', LanguageSuggestedMessageKeys> = { pt: 'ptBr', en: 'enUs' }
|
|
40
40
|
return suggestedMessage?.[parseLanguage?.[language || 'en']]
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -60,7 +60,7 @@ export function interpolateErrors(message: string, values: string[], fieldValues
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
function createMessage(status: number, raw: ErrorResponse, dictionary: Dictionary, language?:
|
|
63
|
+
function createMessage(status: number, raw: ErrorResponse, dictionary: Dictionary, language?: 'pt' | 'en'): ErrorDetailsProperties {
|
|
64
64
|
const title = getTitle(status, raw, dictionary, language || 'en')
|
|
65
65
|
const api = raw.code?.split(/[-_]/)[0]
|
|
66
66
|
const dictDetails = (detailsDictionary[api?.toLowerCase() as keyof typeof detailsDictionary] ?? {})[language || 'en']
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getLanguage, ptEn } from '@stack-spot/portal-translate'
|
|
2
2
|
|
|
3
|
-
export type InternationalizedMessage = (language:
|
|
3
|
+
export type InternationalizedMessage = (language: 'pt' | 'en') => string | ErrorDetailsProperties
|
|
4
4
|
|
|
5
5
|
export interface ErrorDetailsProperties {
|
|
6
6
|
/**
|
|
@@ -81,7 +81,7 @@ export class StackspotAPIError extends Error {
|
|
|
81
81
|
* @param language
|
|
82
82
|
* @returns an error message
|
|
83
83
|
*/
|
|
84
|
-
translate(language
|
|
84
|
+
translate(language = getLanguage(ptEn)): string {
|
|
85
85
|
const unknown = language === 'en' ? 'unknown error' : 'erro desconhecido'
|
|
86
86
|
|
|
87
87
|
const error = this.intl?.(language)
|
|
@@ -89,7 +89,7 @@ export class StackspotAPIError extends Error {
|
|
|
89
89
|
return message ?? this.message ?? this.code ?? (this.status === 0 ? unknown : `${this.status}`)
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
translateDetails(language
|
|
92
|
+
translateDetails(language = getLanguage(ptEn)): ErrorDetailsProperties {
|
|
93
93
|
const unknown = language === 'en' ? 'unknown error' : 'erro desconhecido'
|
|
94
94
|
const errorMessage = this.intl?.(language)
|
|
95
95
|
if (typeof errorMessage === 'string')
|