@stack-spot/portal-network 0.208.2 → 0.209.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 +15 -0
- package/dist/api/accountAssetManager.d.ts +279 -0
- package/dist/api/accountAssetManager.d.ts.map +1 -0
- package/dist/api/accountAssetManager.js +167 -0
- package/dist/api/accountAssetManager.js.map +1 -0
- package/dist/apis-itau.json +8 -0
- package/dist/apis.json +8 -0
- package/dist/client/account-asset-manager.d.ts +110 -0
- package/dist/client/account-asset-manager.d.ts.map +1 -0
- package/dist/client/account-asset-manager.js +160 -0
- package/dist/client/account-asset-manager.js.map +1 -0
- package/dist/client/account.d.ts +5 -2
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +2 -2
- package/dist/client/account.js.map +1 -1
- package/dist/client/ai.d.ts +24 -1
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +19 -1
- package/dist/client/ai.js.map +1 -1
- package/dist/error/dictionary/accountAssetManager.d.ts +11 -0
- package/dist/error/dictionary/accountAssetManager.d.ts.map +1 -0
- package/dist/error/dictionary/accountAssetManager.js +11 -0
- package/dist/error/dictionary/accountAssetManager.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/api/accountAssetManager.ts +655 -0
- package/src/apis-itau.json +8 -0
- package/src/apis.json +8 -0
- package/src/client/account-asset-manager.ts +100 -0
- package/src/client/account.ts +2 -1
- package/src/client/ai.ts +10 -0
- package/src/error/dictionary/accountAssetManager.ts +12 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
+
import { getApiAddresses } from '../api-addresses'
|
|
3
|
+
import { defaults, deleteAssetType, deleteFolder, deleteProject, disassociateProjectAsset, getFolderDetails, getProjectDetails, listAssetTypes, listFolders, saveAssetType, saveFolder, saveProject, updateAsset, updateAssetType, updateFolders, updateProject } from '../api/accountAssetManager'
|
|
4
|
+
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
5
|
+
import { accountAssetManagerDictionary } from '../error/dictionary/accountAssetManager'
|
|
6
|
+
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
7
|
+
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
8
|
+
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
9
|
+
|
|
10
|
+
class AccountAssetManagerClient extends ReactQueryNetworkClient {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(getApiAddresses().accountAssetManager.url, defaults)
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
protected buildStackSpotError(error: HttpError): StackspotAPIError {
|
|
16
|
+
return new DefaultAPIError(error.data, error.status, accountAssetManagerDictionary, error.headers)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Save project
|
|
21
|
+
*/
|
|
22
|
+
saveProject = this.mutation(removeAuthorizationParam(saveProject))
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get project details
|
|
26
|
+
*/
|
|
27
|
+
getProjectDetails = this.query(removeAuthorizationParam(getProjectDetails))
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Delete project
|
|
31
|
+
*/
|
|
32
|
+
deleteProject = this.mutation(removeAuthorizationParam(deleteProject))
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Update project
|
|
36
|
+
*/
|
|
37
|
+
updateProject = this.mutation(removeAuthorizationParam(updateProject))
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Disassociate project asset
|
|
41
|
+
*/
|
|
42
|
+
disassociateProjectAsset = this.mutation(removeAuthorizationParam(disassociateProjectAsset))
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* List account folders
|
|
46
|
+
*/
|
|
47
|
+
folders = this.query(removeAuthorizationParam(listFolders))
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Create new folder in account
|
|
51
|
+
*/
|
|
52
|
+
createFolder = this.mutation(removeAuthorizationParam(saveFolder))
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Get folder details
|
|
56
|
+
*/
|
|
57
|
+
folderDetails = this.query(removeAuthorizationParam(getFolderDetails))
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Delete folder
|
|
61
|
+
*/
|
|
62
|
+
deleteFolder = this.mutation(removeAuthorizationParam(deleteFolder))
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Update folder
|
|
66
|
+
*/
|
|
67
|
+
updateFolder = this.mutation(removeAuthorizationParam(updateFolders))
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Create asset
|
|
71
|
+
*/
|
|
72
|
+
createAsset = this.mutation(removeAuthorizationParam(saveAssetType))
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Update asset
|
|
76
|
+
*/
|
|
77
|
+
updateAsset = this.mutation(removeAuthorizationParam(updateAsset))
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* List all asset types
|
|
81
|
+
*/
|
|
82
|
+
assetTypes = this.query(removeAuthorizationParam(listAssetTypes))
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Save asset type
|
|
86
|
+
*/
|
|
87
|
+
saveAssetType = this.mutation(removeAuthorizationParam(saveAssetType))
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Delete asset type
|
|
91
|
+
*/
|
|
92
|
+
deleteAssetType = this.mutation(removeAuthorizationParam(deleteAssetType))
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Update asset type
|
|
96
|
+
*/
|
|
97
|
+
updateAssetType = this.mutation(removeAuthorizationParam(updateAssetType))
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export const accountAssetManagerClient = new AccountAssetManagerClient()
|
package/src/client/account.ts
CHANGED
|
@@ -101,6 +101,7 @@ import {
|
|
|
101
101
|
isCreatedScmCredentials,
|
|
102
102
|
isCreatedScmCredentials1,
|
|
103
103
|
listAccountMemberFavorites,
|
|
104
|
+
listExtensionLinks,
|
|
104
105
|
listExtensionVersions,
|
|
105
106
|
listManageableExtensions,
|
|
106
107
|
listMemberFavoritesByResource,
|
|
@@ -720,7 +721,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
720
721
|
/**
|
|
721
722
|
* Lists all extension links.
|
|
722
723
|
*/
|
|
723
|
-
extensionLinks = this.query(
|
|
724
|
+
extensionLinks = this.query(listExtensionLinks)
|
|
724
725
|
|
|
725
726
|
/**
|
|
726
727
|
* Updates an extension link with a patch operation.
|
package/src/client/ai.ts
CHANGED
|
@@ -45,6 +45,8 @@ import {
|
|
|
45
45
|
resetKnowledgeObjectsV1KnowledgeSourcesSlugObjectsDelete,
|
|
46
46
|
runFetchStepV1QuickCommandsSlugStepsStepSlugFetchRunPost,
|
|
47
47
|
searchKnowledgeSourcesV1KnowledgeSourcesSearchPost,
|
|
48
|
+
tokensByUserV1AnalyticsTokensByUserGet,
|
|
49
|
+
tokensDailyUsageV1AnalyticsTokensDailyUsageGet,
|
|
48
50
|
startScriptStepV1QuickCommandsSlugStepsStepSlugStartScriptPost,
|
|
49
51
|
totalV1TokensUsageTotalGet,
|
|
50
52
|
updateQuickCommandV1QuickCommandsSlugPatch,
|
|
@@ -277,6 +279,14 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
277
279
|
*/
|
|
278
280
|
removeFavoriteQuickCommand = this.mutation(removeAuthorizationParam(deleteFavoriteV1QuickCommandsSlugFavoriteDelete))
|
|
279
281
|
/**
|
|
282
|
+
* Get Tokens Daily usage
|
|
283
|
+
*/
|
|
284
|
+
analyticsTokensDailyUsage = this.query(removeAuthorizationParam(tokensDailyUsageV1AnalyticsTokensDailyUsageGet))
|
|
285
|
+
/**
|
|
286
|
+
* Get Tokens By User
|
|
287
|
+
*/
|
|
288
|
+
analyticsTokensByUser = this.query(removeAuthorizationParam(tokensByUserV1AnalyticsTokensByUserGet))
|
|
289
|
+
/*
|
|
280
290
|
* Lists all the feature flags for this user.
|
|
281
291
|
*/
|
|
282
292
|
flags = this.query(getFlagsV1FlagsGet)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Dictionary } from '@stack-spot/portal-translate'
|
|
2
|
+
|
|
3
|
+
export const accountAssetManagerDictionary = {
|
|
4
|
+
en: {
|
|
5
|
+
FOLDER_BAD_REQUEST_ERROR: 'The provided data is invalid or inconsistent.',
|
|
6
|
+
FOLDER_ALREADY_EXISTS: 'A folder with this name already exists.',
|
|
7
|
+
},
|
|
8
|
+
pt: {
|
|
9
|
+
FOLDER_BAD_REQUEST_ERROR: 'Os dados informados estão inválidos ou inconsistentes.',
|
|
10
|
+
FOLDER_ALREADY_EXISTS: 'Já existe uma pasta com esse nome.',
|
|
11
|
+
},
|
|
12
|
+
} satisfies Dictionary
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { CancelledError } from '@tanstack/react-query'
|
|
2
2
|
export { apiAddresses, getApiAddresses, getApisByTenant, getBaseUrlByTenantWithOverride, setApisOverride } from './api-addresses'
|
|
3
3
|
export { accountClient } from './client/account'
|
|
4
|
+
export { accountAssetManagerClient } from './client/account-asset-manager'
|
|
4
5
|
export { agentClient } from './client/agent'
|
|
5
6
|
export { agentToolsClient } from './client/agent-tools'
|
|
6
7
|
export { aiClient } from './client/ai'
|