@stack-spot/portal-network 0.189.0-beta.1 → 0.190.0-beta.1
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 +76 -0
- package/dist/api/account.d.ts +4 -116
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js +9 -95
- package/dist/api/account.js.map +1 -1
- package/dist/api/ai.d.ts +189 -86
- package/dist/api/ai.d.ts.map +1 -1
- package/dist/api/ai.js +238 -142
- package/dist/api/ai.js.map +1 -1
- package/dist/api/cloudPlatform.d.ts +363 -188
- package/dist/api/cloudPlatform.d.ts.map +1 -1
- package/dist/api/cloudPlatform.js +253 -80
- package/dist/api/cloudPlatform.js.map +1 -1
- package/dist/api/codeShift.d.ts +5 -3
- package/dist/api/codeShift.d.ts.map +1 -1
- package/dist/api/codeShift.js.map +1 -1
- package/dist/client/account.d.ts +33 -19
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +33 -15
- package/dist/client/account.js.map +1 -1
- package/dist/client/ai.d.ts +29 -0
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +28 -1
- package/dist/client/ai.js.map +1 -1
- package/dist/client/cloud-platform.d.ts +128 -1
- package/dist/client/cloud-platform.d.ts.map +1 -1
- package/dist/client/cloud-platform.js +92 -2
- package/dist/client/cloud-platform.js.map +1 -1
- package/package.json +2 -2
- package/src/api/account.ts +20 -192
- package/src/api/ai.ts +364 -157
- package/src/api/cloudPlatform.ts +638 -264
- package/src/api/codeShift.ts +5 -3
- package/src/client/account.ts +36 -17
- package/src/client/ai.ts +31 -1
- package/src/client/cloud-platform.ts +52 -2
package/src/api/codeShift.ts
CHANGED
|
@@ -12,7 +12,7 @@ export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
|
|
|
12
12
|
};
|
|
13
13
|
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
14
|
export const servers = {};
|
|
15
|
-
export type CodeShiftRole = "list-applications" | "create-application" | "list-repository" | "create-repository" | "delete-repository" | "dispatch-module" | "create-module" | "account-settings" | "list-integration" | "create-integration" | "delete-integration" | "list-program-group" | "create-program-group" | "delete-program-group" | "view-analytics";
|
|
15
|
+
export type CodeShiftRole = "list-applications" | "create-application" | "list-repository" | "create-repository" | "delete-repository" | "dispatch-module" | "create-module" | "account-settings" | "list-integration" | "create-integration" | "delete-integration" | "list-program-group" | "create-program-group" | "delete-program-group" | "view-analytics" | "account-discovery-repos";
|
|
16
16
|
export type RolesResponse = {
|
|
17
17
|
result: boolean;
|
|
18
18
|
};
|
|
@@ -836,8 +836,9 @@ export type RepositoryLastReportStatusResponse = {
|
|
|
836
836
|
totalFilesChanged: number | null;
|
|
837
837
|
totalIssues: number | null;
|
|
838
838
|
pullRequestLink: string | null;
|
|
839
|
-
merged
|
|
839
|
+
merged?: boolean | null;
|
|
840
840
|
customerScore?: number | null;
|
|
841
|
+
languages?: string | null;
|
|
841
842
|
};
|
|
842
843
|
export type AnalyticsRepositoryLastReportStatusResponse = {
|
|
843
844
|
totalFiles?: number;
|
|
@@ -987,7 +988,7 @@ export type RepositoryDetailedReportItemResponse = {
|
|
|
987
988
|
moduleVersion?: string | null;
|
|
988
989
|
processingTimeSeconds?: number | null;
|
|
989
990
|
pullRequestLink?: string | null;
|
|
990
|
-
merged?:
|
|
991
|
+
merged?: boolean | null;
|
|
991
992
|
reportCreatedAt?: string | null;
|
|
992
993
|
reportCreatedByEmail?: string | null;
|
|
993
994
|
reportCreatedByName?: string | null;
|
|
@@ -1000,6 +1001,7 @@ export type RepositoryDetailedReportItemResponse = {
|
|
|
1000
1001
|
totalFilesCount?: number;
|
|
1001
1002
|
status?: string | null;
|
|
1002
1003
|
customerScore?: number | null;
|
|
1004
|
+
languages?: string | null;
|
|
1003
1005
|
};
|
|
1004
1006
|
export type AnalyticsRepositoryDetailedReportResponse = {
|
|
1005
1007
|
reposCount?: number;
|
package/src/client/account.ts
CHANGED
|
@@ -46,9 +46,9 @@ import {
|
|
|
46
46
|
getAccess,
|
|
47
47
|
getAccount1,
|
|
48
48
|
getAccountMembers,
|
|
49
|
-
|
|
49
|
+
getAccountMembers1,
|
|
50
50
|
getAccountRateLimit,
|
|
51
|
-
|
|
51
|
+
getAccounts,
|
|
52
52
|
getAccountSso,
|
|
53
53
|
getActiveExtensionVersion,
|
|
54
54
|
getAllAccountSso,
|
|
@@ -64,23 +64,33 @@ import {
|
|
|
64
64
|
getFeatures3,
|
|
65
65
|
getGroupById,
|
|
66
66
|
getGroupResources,
|
|
67
|
+
getGroupResources1,
|
|
67
68
|
getGroups,
|
|
69
|
+
getGroups1,
|
|
68
70
|
getMemberById,
|
|
69
71
|
getMemberGroups,
|
|
72
|
+
getMemberGroups1,
|
|
70
73
|
getMemberPreferences,
|
|
71
74
|
getMembers,
|
|
75
|
+
getMembers1,
|
|
72
76
|
getPartnerAccount, getPartnersSharingAllowed,
|
|
73
77
|
getPersonalAccountDetails,
|
|
78
|
+
getPersonalAccountExpirationData,
|
|
74
79
|
getPersonalClientCredentials,
|
|
75
80
|
getResources,
|
|
76
81
|
getResources2,
|
|
77
82
|
getResourcesAndActionsWithStatus,
|
|
78
83
|
getResourceTypes1,
|
|
79
84
|
getRoleGroups,
|
|
85
|
+
getRoleGroups1,
|
|
80
86
|
getRoleMembers,
|
|
87
|
+
getRoleMembers1,
|
|
81
88
|
getRoles,
|
|
82
89
|
getRoles1,
|
|
83
90
|
getRoles2,
|
|
91
|
+
getRoles3,
|
|
92
|
+
getRoles4,
|
|
93
|
+
getRoles5,
|
|
84
94
|
getScmProvider,
|
|
85
95
|
getServiceCredential,
|
|
86
96
|
getServiceCredentialByIdRateLimit,
|
|
@@ -95,9 +105,10 @@ import {
|
|
|
95
105
|
listExtensions,
|
|
96
106
|
listExtensionVersions,
|
|
97
107
|
listMemberFavoritesByResource,
|
|
98
|
-
|
|
108
|
+
listScmCredentials1,
|
|
99
109
|
listScmCredentials2, partialUpdateSso, personalAccessTokenAuthorization,
|
|
100
110
|
personalContact,
|
|
111
|
+
reactivateTrialAccount,
|
|
101
112
|
removeRoleFromMember,
|
|
102
113
|
removeTrialAccount,
|
|
103
114
|
resetOtp,
|
|
@@ -215,7 +226,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
215
226
|
/**
|
|
216
227
|
* Gets all members (paginated).
|
|
217
228
|
*/
|
|
218
|
-
allMembers = this.infiniteQuery(
|
|
229
|
+
allMembers = this.infiniteQuery(getAccountMembers)
|
|
219
230
|
/**
|
|
220
231
|
* Gets member Groups (paginated).
|
|
221
232
|
*/
|
|
@@ -402,7 +413,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
402
413
|
/**
|
|
403
414
|
* Gets all SCM credentials (account level).
|
|
404
415
|
*/
|
|
405
|
-
allSCMCredentials = this.query(
|
|
416
|
+
allSCMCredentials = this.query(listScmCredentials1)
|
|
406
417
|
/**
|
|
407
418
|
* Gets the status for the SCM credential.
|
|
408
419
|
*
|
|
@@ -478,7 +489,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
478
489
|
/**
|
|
479
490
|
* Gets all SCM credentials for the user currently logged in.
|
|
480
491
|
*/
|
|
481
|
-
allUserSCMCredentials = this.query(
|
|
492
|
+
allUserSCMCredentials = this.query(listScmCredentials2)
|
|
482
493
|
/**
|
|
483
494
|
* Gets the SCM provider.
|
|
484
495
|
*/
|
|
@@ -616,43 +627,43 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
616
627
|
/**
|
|
617
628
|
* Get all account members with pagination
|
|
618
629
|
*/
|
|
619
|
-
allMembersWithPagination = this.query(
|
|
630
|
+
allMembersWithPagination = this.query(getAccountMembers1)
|
|
620
631
|
/**
|
|
621
632
|
* Get Members Groups By Profile
|
|
622
633
|
*/
|
|
623
|
-
allMembersGroupsByProfileWithPagination = this.query(
|
|
634
|
+
allMembersGroupsByProfileWithPagination = this.query(getMemberGroups1)
|
|
624
635
|
/**
|
|
625
636
|
* Get Members Roles By Profile
|
|
626
637
|
*/
|
|
627
|
-
allMembersRolesByProfileWithPagination = this.query(
|
|
638
|
+
allMembersRolesByProfileWithPagination = this.query(getRoles4)
|
|
628
639
|
/**
|
|
629
640
|
* Get all account groups with pagination
|
|
630
641
|
*/
|
|
631
|
-
allGroupsWithPagination = this.query(
|
|
642
|
+
allGroupsWithPagination = this.query(getGroups1)
|
|
632
643
|
/**
|
|
633
644
|
* Get all members by group with pagination
|
|
634
645
|
*/
|
|
635
|
-
allMembersByGroupWithPagination = this.query(
|
|
646
|
+
allMembersByGroupWithPagination = this.query(getMembers1)
|
|
636
647
|
/**
|
|
637
648
|
* Get all roles by groups with pagination
|
|
638
649
|
*/
|
|
639
|
-
allRolesByGroupWithPagination = this.query(
|
|
650
|
+
allRolesByGroupWithPagination = this.query(getRoles5)
|
|
640
651
|
/**
|
|
641
652
|
* Get all resources by groups with pagination
|
|
642
653
|
*/
|
|
643
|
-
allResourcesByGroupWithPagination = this.query(
|
|
654
|
+
allResourcesByGroupWithPagination = this.query(getGroupResources1)
|
|
644
655
|
/**
|
|
645
656
|
* Get all roles account with pagination
|
|
646
657
|
*/
|
|
647
|
-
allRolesWithPagination = this.query(
|
|
658
|
+
allRolesWithPagination = this.query(getRoles3)
|
|
648
659
|
/**
|
|
649
660
|
* Get all members by role with pagination
|
|
650
661
|
*/
|
|
651
|
-
allMembersByRoleWithPagination = this.query(
|
|
662
|
+
allMembersByRoleWithPagination = this.query(getRoleMembers1)
|
|
652
663
|
/**
|
|
653
664
|
* Get all groups by roles with pagination
|
|
654
665
|
*/
|
|
655
|
-
allGroupsByRoleWithPagination = this.query(
|
|
666
|
+
allGroupsByRoleWithPagination = this.query(getRoleGroups1)
|
|
656
667
|
/**
|
|
657
668
|
* Get Service Credentials
|
|
658
669
|
*/
|
|
@@ -880,7 +891,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
880
891
|
/**
|
|
881
892
|
* Lists enterprise accounts
|
|
882
893
|
*/
|
|
883
|
-
getEnterpriseAccounts = this.query(
|
|
894
|
+
getEnterpriseAccounts = this.query(getAccounts)
|
|
884
895
|
/**
|
|
885
896
|
* Get an enterprise account
|
|
886
897
|
*/
|
|
@@ -905,6 +916,14 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
905
916
|
* Find Secret Associations
|
|
906
917
|
*/
|
|
907
918
|
findSecretAssociations = this.infiniteQuery(findAssociations, { accumulator: 'items' })
|
|
919
|
+
/**
|
|
920
|
+
* Get expiration data
|
|
921
|
+
*/
|
|
922
|
+
getExpirationData = this.query(getPersonalAccountExpirationData)
|
|
923
|
+
/**
|
|
924
|
+
* Reactive trial account
|
|
925
|
+
*/
|
|
926
|
+
reactivateTrialAccount = this.mutation(reactivateTrialAccount)
|
|
908
927
|
}
|
|
909
928
|
|
|
910
929
|
export const accountClient = new AccountClient()
|
package/src/client/ai.ts
CHANGED
|
@@ -293,7 +293,9 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
293
293
|
*/
|
|
294
294
|
async function transform(event: Partial<FixedChatResponse>, data: Partial<ChatResponseWithSteps>) {
|
|
295
295
|
const info = event.agent_info
|
|
296
|
+
|
|
296
297
|
if (!info) return
|
|
298
|
+
|
|
297
299
|
const tools = await AIClient.toolsOfAgent(request.context?.agent_id)
|
|
298
300
|
data.steps = data.steps ? [...data.steps] : []
|
|
299
301
|
|
|
@@ -349,6 +351,32 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
349
351
|
data.steps.push({ id: 'answer', type: 'answer', status: 'pending' })
|
|
350
352
|
}
|
|
351
353
|
|
|
354
|
+
if (info.type === 'planning' && info.action === 'awaiting_approval') {
|
|
355
|
+
data.steps.push({
|
|
356
|
+
id: 'planning',
|
|
357
|
+
type: 'planning',
|
|
358
|
+
status: 'awaiting_approval',
|
|
359
|
+
user_question: info.data?.user_question,
|
|
360
|
+
duration: info.duration || 0,
|
|
361
|
+
steps: info.data?.steps?.map(s => s.goal) ?? [],
|
|
362
|
+
goal: info.data?.plan_goal ?? '',
|
|
363
|
+
})
|
|
364
|
+
info.data?.steps.forEach(s => data.steps?.push({
|
|
365
|
+
id: s.id,
|
|
366
|
+
type: 'step',
|
|
367
|
+
status: 'pending',
|
|
368
|
+
input: s.goal,
|
|
369
|
+
attempts: [{
|
|
370
|
+
tools: s.tools?.map(t => ({
|
|
371
|
+
...(tools.find(({ id }) => id === t.tool_id) ?? { id: t.tool_id, name: t.tool_id }),
|
|
372
|
+
executionId: t.tool_execution_id,
|
|
373
|
+
goal: t.goal,
|
|
374
|
+
})),
|
|
375
|
+
}],
|
|
376
|
+
}))
|
|
377
|
+
data.steps.push({ id: 'answer', type: 'answer', status: 'pending' })
|
|
378
|
+
}
|
|
379
|
+
|
|
352
380
|
if (info.type === 'step' && info.action === 'start') {
|
|
353
381
|
const step = data.steps.find(s => s.id === info.id)
|
|
354
382
|
if (step) step.status = 'running'
|
|
@@ -415,6 +443,7 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
415
443
|
const tool = tools?.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
|
|
416
444
|
currentStep.attempts[info.data.attempt-1].tools?.push({
|
|
417
445
|
...tool,
|
|
446
|
+
executionId: info.id,
|
|
418
447
|
input,
|
|
419
448
|
})
|
|
420
449
|
} else {
|
|
@@ -426,6 +455,7 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
426
455
|
currentStep.attempts[info.data.attempt-1] ??= { tools: [] }
|
|
427
456
|
currentStep.attempts[info.data.attempt-1].tools?.push({
|
|
428
457
|
...tool,
|
|
458
|
+
executionId: info.id,
|
|
429
459
|
input,
|
|
430
460
|
})
|
|
431
461
|
}
|
|
@@ -448,7 +478,7 @@ class AIClient extends ReactQueryNetworkClient {
|
|
|
448
478
|
if (answerStep) answerStep.status = 'running'
|
|
449
479
|
}
|
|
450
480
|
|
|
451
|
-
if (info.type === '
|
|
481
|
+
if (info.type === 'chat' && info.action === 'end') {
|
|
452
482
|
const answerStep = last(data.steps)
|
|
453
483
|
if (answerStep) {
|
|
454
484
|
answerStep.status = 'success'
|
|
@@ -11,14 +11,16 @@ import {
|
|
|
11
11
|
createNetwork,
|
|
12
12
|
createNetworkConnection,
|
|
13
13
|
createProject,
|
|
14
|
+
createRuntime,
|
|
14
15
|
createTenant,
|
|
15
16
|
createVpn,
|
|
16
17
|
defaults,
|
|
17
18
|
getCertificate,
|
|
18
19
|
getFolder,
|
|
20
|
+
getFolderTags,
|
|
19
21
|
getFoundation,
|
|
20
22
|
getNetwork,
|
|
21
|
-
|
|
23
|
+
getProject,
|
|
22
24
|
getVpnConfiguration,
|
|
23
25
|
listCertificates,
|
|
24
26
|
listCidr,
|
|
@@ -28,9 +30,17 @@ import {
|
|
|
28
30
|
listInbound,
|
|
29
31
|
listNetwork,
|
|
30
32
|
listNetworkConnection,
|
|
33
|
+
listRuntime,
|
|
31
34
|
listTenant,
|
|
32
35
|
listVpns,
|
|
33
36
|
providers,
|
|
37
|
+
putCertificateTags,
|
|
38
|
+
putCidrTags,
|
|
39
|
+
putDnsZoneTags,
|
|
40
|
+
putFolderTags,
|
|
41
|
+
putNetworkTags,
|
|
42
|
+
putProjectTags,
|
|
43
|
+
putVpnTags,
|
|
34
44
|
} from '../api/cloudPlatform'
|
|
35
45
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
36
46
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
@@ -106,7 +116,7 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
|
|
|
106
116
|
/**
|
|
107
117
|
* Get a project by id
|
|
108
118
|
*/
|
|
109
|
-
getProjectById = this.query(removeAuthorizationParam(
|
|
119
|
+
getProjectById = this.query(removeAuthorizationParam(getProject))
|
|
110
120
|
/**
|
|
111
121
|
* Get a list of dns records
|
|
112
122
|
*/
|
|
@@ -167,6 +177,46 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
|
|
|
167
177
|
* Create a tenant
|
|
168
178
|
*/
|
|
169
179
|
createTenant = this.mutation(removeAuthorizationParam(createTenant))
|
|
180
|
+
/**
|
|
181
|
+
* Get a list of runtimes
|
|
182
|
+
*/
|
|
183
|
+
listRuntimes = this.query(removeAuthorizationParam(listRuntime))
|
|
184
|
+
/**
|
|
185
|
+
* Create a runtime
|
|
186
|
+
*/
|
|
187
|
+
createRuntime = this.mutation(removeAuthorizationParam(createRuntime))
|
|
188
|
+
/**
|
|
189
|
+
* Get a list of tags in folder
|
|
190
|
+
*/
|
|
191
|
+
getFolderTags = this.query(removeAuthorizationParam(getFolderTags))
|
|
192
|
+
/**
|
|
193
|
+
* Update folder tags
|
|
194
|
+
*/
|
|
195
|
+
updateFolderTags = this.mutation(removeAuthorizationParam(putFolderTags))
|
|
196
|
+
/**
|
|
197
|
+
* Update project tags
|
|
198
|
+
*/
|
|
199
|
+
updateProjectTags = this.mutation(removeAuthorizationParam(putProjectTags))
|
|
200
|
+
/**
|
|
201
|
+
* Update network tags
|
|
202
|
+
*/
|
|
203
|
+
updateNetworkTags = this.mutation(removeAuthorizationParam(putNetworkTags))
|
|
204
|
+
/**
|
|
205
|
+
* Update cidr tags
|
|
206
|
+
*/
|
|
207
|
+
updateCidrTags = this.mutation(removeAuthorizationParam(putCidrTags))
|
|
208
|
+
/**
|
|
209
|
+
* Update dns zone tags
|
|
210
|
+
*/
|
|
211
|
+
updateDnsZoneTags = this.mutation(removeAuthorizationParam(putDnsZoneTags))
|
|
212
|
+
/**
|
|
213
|
+
* Update certificate tags
|
|
214
|
+
*/
|
|
215
|
+
updateCertificateTags = this.mutation(removeAuthorizationParam(putCertificateTags))
|
|
216
|
+
/**
|
|
217
|
+
* Update vpn tags
|
|
218
|
+
*/
|
|
219
|
+
updateVpnTags = this.mutation(removeAuthorizationParam(putVpnTags))
|
|
170
220
|
}
|
|
171
221
|
|
|
172
222
|
export const cloudPlatformClient = new CloudPlatformClient()
|