@stack-spot/portal-network 0.183.0 → 0.184.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.
@@ -0,0 +1,3 @@
1
+ ### STK - STEP-START - step_id_1 ###
2
+ Eu irei falhar, adeus mundo cruel
3
+ ### STK - STEP-END - step_id_1 ###
@@ -0,0 +1,5 @@
1
+ ### STK - STEP-START - step_id_1 ###
2
+ Ola estou planejando algo
3
+ ### STK - STEP-END - step_id_1 ###
4
+ ### STK - STEP-START - step_id_2 ###
5
+ ### STK - STEP-END - step_id_2 ###
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/portal-network",
3
- "version": "0.183.0",
3
+ "version": "0.184.0-beta.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,11 +9,6 @@
9
9
  "./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
- },
17
12
  "peerDependencies": {
18
13
  "@stack-spot/auth": "^5.3.3",
19
14
  "@stack-spot/opa": "^2.6.1",
@@ -55,5 +50,10 @@
55
50
  "@oazapfts/runtime": "^1.0.3",
56
51
  "fetch-event-stream": "^0.1.5",
57
52
  "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
  }
package/readme.md CHANGED
@@ -1 +1 @@
1
- # Network
1
+ # Network
@@ -8365,3 +8365,4 @@ export function deleteMember({ groupId, memberId }: {
8365
8365
  method: "DELETE"
8366
8366
  }));
8367
8367
  }
8368
+
@@ -2167,3 +2167,6 @@ export function internalForkToolkitsByIdsV1SpotToolkitsForkPost({ xAccountId, xU
2167
2167
  })
2168
2168
  })));
2169
2169
  }
2170
+
2171
+
2172
+
package/src/api/agent.ts CHANGED
@@ -1081,3 +1081,5 @@ export function getV1PublicAgents({ visibility }: {
1081
1081
  ...opts
1082
1082
  }));
1083
1083
  }
1084
+
1085
+
@@ -4,8 +4,8 @@
4
4
  * DO NOT MODIFY - This file has been generated using oazapfts.
5
5
  * See https://www.npmjs.com/package/oazapfts
6
6
  */
7
- import * as Oazapfts from "@oazapfts/runtime";
8
- import * as QS from "@oazapfts/runtime/query";
7
+ import * as Oazapfts from "@oazapfts/runtime"
8
+ import * as QS from "@oazapfts/runtime/query"
9
9
  export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
10
  headers: {},
11
11
  baseUrl: "/",
@@ -60,7 +60,7 @@ export type CreateModuleRequest = {
60
60
  } | null;
61
61
  gitAction?: GitAction | null;
62
62
  };
63
- export type ExceptionType = "CODE_SHIFT_API_0000_UNEXPECTED_ERROR" | "CODE_SHIFT_API_0001_INVALID_VALUE" | "CODE_SHIFT_API_0002_NOT_IMPLEMENTED" | "CODE_SHIFT_API_0003_NOT_FOUND" | "CODE_SHIFT_API_0004_VALIDATION_ERROR" | "CODE_SHIFT_API_0005_CONFLICT" | "CODE_SHIFT_API_0006_INVALID_REPO_URL" | "CODE_SHIFT_API_0007_FORBIDDEN" | "CODE_SHIFT_API_0008_DEFAULT_BRANCH" | "CODE_SHIFT_API_0009_INVALID_SPREADSHEET" | "CODE_SHIFT_API_0010_PR_LINK_NOT_EXISTS" | "CODE_SHIFT_API_0011_EMPTY_SPREADSHEET" | "CODE_SHIFT_API_0012_REPOSITORY_NOT_EXISTS_IN_SCM" | "CODE_SHIFT_API_0013_SCM_BRANCH_NOT_EXISTS_EXCEPTION" | "CODE_SHIFT_API_0014_ACCOUNT_NOT_FOUND_EXCEPTION" | "CODE_SHIFT_API_0015_INVALID_WORKFLOW_URL_EXCEPTION" | "CODE_SHIFT_API_0016_INVALID_ACTION_YAML_EXCEPTION" | "CODE_SHIFT_API_0017_FAIL_READING_ACTION_INPUTS_EXCEPTION" | "CODE_SHIFT_API_0018_MODULE_DISPATCHER_GENERIC_EXCEPTION" | "CODE_SHIFT_API_0019_GITHUB_DISPATCH_WORKFLOW_UNAUTHORIZED_EXCEPTION" | "CODE_SHIFT_API_0020_GITHUB_SAML_EXCEPTION" | "CODE_SHIFT_API_0021_GITHUB_AUTHORIZATION_ENCODING_EXCEPTION" | "CODE_SHIFT_API_0022_GITHUB_DISPATCH_WORKFLOW_NOT_FOUND_EXCEPTION" | "CODE_SHIFT_API_0023_GENERIC_FAILURE_SEARCHING_REPOSITORY_EXCEPTION" | "CODE_SHIFT_API_0024_COMPONENTS_MAX_SIZE_ALLOWED_EXCEPTION" | "CODE_SHIFT_API_0025_INVALID_SEARCH_REPOSITORY_STATUS_SAVE_EXCEPTION" | "CODE_SHIFT_API_0026_SEARCH_REPO_EMPTY_RESULT_EXCEPTION" | "CODE_SHIFT_API_3000_WORKFLOW_API_DISPATCH_FAILURE" | "CODE_SHIFT_API_3001_WORKFLOW_API_DISPATCH_FORBIDDEN" | "CODE_SHIFT_API_3009_WORKFLOW_API_DISPATCH_PARSE_ERROR" | "CODE_SHIFT_API_3010_AWS_SECRET_MANAGER_GET_SECRET_FAILURE" | "CODE_SHIFT_API_3011_AWS_SECRET_MANAGER_PARSE_SECRET_ERROR" | "CODE_SHIFT_API_3100_SCM_GET_REPOSITORIES_FAILURE" | "CODE_SHIFT_API_3110_SCM_GET_PULL_REQUEST_FAILURE" | "CODE_SHIFT_API_3120_SCM_GET_BRANCHES_FAILURE" | "CODE_SHIFT_API_3130_SCM_GET_SCM_REPOSITORY_FETCH_FAILURE" | "CODE_SHIFT_API_3131_SCM_REPOSITORY_NOT_FOUND" | "CODE_SHIFT_API_3140_SCM_GET_BRANCH_FAILURE" | "CODE_SHIFT_API_3142_SCM_GET_BRANCHES_NOT_FOUND" | "CODE_SHIFT_API_3150_SCM_GET_REPOSITORY_FILE_FAILURE" | "CODE_SHIFT_API_3151_SCM_GET_REPOSITORY_FILE_NOT_FOUND" | "CODE_SHIFT_API_3160_SCM_GET_REPOSITORY_FILE_FAILURE" | "CODE_SHIFT_API_3500_CONTENT_API_GET_WORKFLOW_VERSION_FAILURE" | "CODE_SHIFT_API_4000_ACCOUNTS_API_PAT_FAILURE" | "CODE_SHIFT_API_4001_ACCOUNTS_API_PAT_FORBIDDEN" | "CODE_SHIFT_API_4002_ACCOUNTS_API_PAT_NOT_FOUND" | "CODE_SHIFT_API_4009_ACCOUNTS_API_PAT_PARSE_ERROR" | "CODE_SHIFT_API_4010_GET_SCM_CREDENTIALS_FAILURE" | "CODE_SHIFT_API_4011_GET_SCM_CREDENTIALS_FORBIDDEN" | "CODE_SHIFT_API_4012_GET_SCM_CREDENTIALS_NOT_FOUND" | "CODE_SHIFT_API_4019_GET_SCM_CREDENTIALS_PARSE_ERROR" | "CODE_SHIFT_API_6000_IAM_GENERATE_TOKEN_FAILURE" | "CODE_SHIFT_API_6000_IAM_INTROSPECT_TOKEN_FAILURE";
63
+ export type ExceptionType = "CODE_SHIFT_API_0000_UNEXPECTED_ERROR" | "CODE_SHIFT_API_0001_INVALID_VALUE" | "CODE_SHIFT_API_0002_NOT_IMPLEMENTED" | "CODE_SHIFT_API_0003_NOT_FOUND" | "CODE_SHIFT_API_0004_VALIDATION_ERROR" | "CODE_SHIFT_API_0005_CONFLICT" | "CODE_SHIFT_API_0006_INVALID_REPO_URL" | "CODE_SHIFT_API_0007_FORBIDDEN" | "CODE_SHIFT_API_0008_DEFAULT_BRANCH" | "CODE_SHIFT_API_0009_INVALID_SPREADSHEET" | "CODE_SHIFT_API_0010_PR_LINK_NOT_EXISTS" | "CODE_SHIFT_API_0011_EMPTY_SPREADSHEET" | "CODE_SHIFT_API_0012_REPOSITORY_NOT_EXISTS_IN_SCM" | "CODE_SHIFT_API_0013_SCM_BRANCH_NOT_EXISTS_EXCEPTION" | "CODE_SHIFT_API_0014_ACCOUNT_NOT_FOUND_EXCEPTION" | "CODE_SHIFT_API_0015_INVALID_WORKFLOW_URL_EXCEPTION" | "CODE_SHIFT_API_0016_INVALID_ACTION_YAML_EXCEPTION" | "CODE_SHIFT_API_0017_FAIL_READING_ACTION_INPUTS_EXCEPTION" | "CODE_SHIFT_API_0018_MODULE_DISPATCHER_GENERIC_EXCEPTION" | "CODE_SHIFT_API_0019_GITHUB_DISPATCH_WORKFLOW_UNAUTHORIZED_EXCEPTION" | "CODE_SHIFT_API_0020_GITHUB_SAML_EXCEPTION" | "CODE_SHIFT_API_0021_GITHUB_AUTHORIZATION_ENCODING_EXCEPTION" | "CODE_SHIFT_API_0022_GITHUB_DISPATCH_WORKFLOW_NOT_FOUND_EXCEPTION" | "CODE_SHIFT_API_0023_GENERIC_FAILURE_SEARCHING_REPOSITORY_EXCEPTION" | "CODE_SHIFT_API_0024_COMPONENTS_MAX_SIZE_ALLOWED_EXCEPTION" | "CODE_SHIFT_API_0025_INVALID_SEARCH_REPOSITORY_STATUS_SAVE_EXCEPTION" | "CODE_SHIFT_API_0026_SEARCH_REPO_EMPTY_RESULT_EXCEPTION" | "CODE_SHIFT_API_0027_SCORE_OUT_OF_RANGE_EXCEPTION" | "CODE_SHIFT_API_3000_WORKFLOW_API_DISPATCH_FAILURE" | "CODE_SHIFT_API_3001_WORKFLOW_API_DISPATCH_FORBIDDEN" | "CODE_SHIFT_API_3009_WORKFLOW_API_DISPATCH_PARSE_ERROR" | "CODE_SHIFT_API_3010_AWS_SECRET_MANAGER_GET_SECRET_FAILURE" | "CODE_SHIFT_API_3011_AWS_SECRET_MANAGER_PARSE_SECRET_ERROR" | "CODE_SHIFT_API_3100_SCM_GET_REPOSITORIES_FAILURE" | "CODE_SHIFT_API_3110_SCM_GET_PULL_REQUEST_FAILURE" | "CODE_SHIFT_API_3120_SCM_GET_BRANCHES_FAILURE" | "CODE_SHIFT_API_3130_SCM_GET_SCM_REPOSITORY_FETCH_FAILURE" | "CODE_SHIFT_API_3131_SCM_REPOSITORY_NOT_FOUND" | "CODE_SHIFT_API_3140_SCM_GET_BRANCH_FAILURE" | "CODE_SHIFT_API_3142_SCM_GET_BRANCHES_NOT_FOUND" | "CODE_SHIFT_API_3150_SCM_GET_REPOSITORY_FILE_FAILURE" | "CODE_SHIFT_API_3151_SCM_GET_REPOSITORY_FILE_NOT_FOUND" | "CODE_SHIFT_API_3160_SCM_GET_REPOSITORY_FILE_FAILURE" | "CODE_SHIFT_API_3500_CONTENT_API_GET_WORKFLOW_VERSION_FAILURE" | "CODE_SHIFT_API_4000_ACCOUNTS_API_PAT_FAILURE" | "CODE_SHIFT_API_4001_ACCOUNTS_API_PAT_FORBIDDEN" | "CODE_SHIFT_API_4002_ACCOUNTS_API_PAT_NOT_FOUND" | "CODE_SHIFT_API_4009_ACCOUNTS_API_PAT_PARSE_ERROR" | "CODE_SHIFT_API_4010_GET_SCM_CREDENTIALS_FAILURE" | "CODE_SHIFT_API_4011_GET_SCM_CREDENTIALS_FORBIDDEN" | "CODE_SHIFT_API_4012_GET_SCM_CREDENTIALS_NOT_FOUND" | "CODE_SHIFT_API_4019_GET_SCM_CREDENTIALS_PARSE_ERROR" | "CODE_SHIFT_API_6000_IAM_GENERATE_TOKEN_FAILURE" | "CODE_SHIFT_API_6000_IAM_INTROSPECT_TOKEN_FAILURE"
64
64
  export type BadRequestExceptionTypes = "CODE_SHIFT_API_1001_DECODE_JWT_ERROR" | "CODE_SHIFT_API_2001_BAD_REQUEST_REQUIRED_FIELD" | "CODE_SHIFT_API_2002_BAD_REQUEST_EMPTY_FIELD_NOT_ALLOWED" | "CODE_SHIFT_API_2003_BAD_REQUEST_TYPE_FIELD_NOT_ALLOWED" | "CODE_SHIFT_API_2004_BAD_REQUEST_VALUE_FIELD_NOT_ALLOWED" | "CODE_SHIFT_API_2005_BAD_REQUEST_VALUE_FIELD_MAX_LENGTH" | "CODE_SHIFT_API_2006_BAD_REQUEST_VALUE_FIELD_MIN_LENGTH" | "CODE_SHIFT_API_2007_BAD_REQUEST_VALUE_REGEX_DOESNT_MATCH" | "CODE_SHIFT_API_2008_BAD_REQUEST_VALUE_FIELD_NUMBER_NOT_LT" | "CODE_SHIFT_API_2100_CREATE_BODY_REPO_AND_REPO_CREATE_ACTION" | "CODE_SHIFT_API_2101_CREATE_BODY_NOT_REPO_AND_NOT_REPO_CREATE_ACTION" | "CODE_SHIFT_API_2102_BAD_REQUEST_DATE_MAX_INTERVAL" | "CODE_SHIFT_API_2103_BAD_REQUEST_INVALID_PAGE" | "CODE_SHIFT_API_2104_BAD_REQUEST_DUPLICATED_ALIAS" | "CODE_SHIFT_API_2105_BAD_REQUEST_INVALID_REPO_URL" | "CODE_SHIFT_API_2110_BAD_REQUEST_PUT_STEP_STATUS_COMPLETED_WITHOUT_CONCLUSION" | "CODE_SHIFT_API_2112_BAD_REQUEST_PUT_STEP_STATUS_NOT_COMPLETED_AND_CONCLUSION_DEFINED" | "CODE_SHIFT_API_2113_BAD_REQUEST_PUT_STEP_STATUS_COMPLETED_AND_COMPLETED_AT_NOT_DEFINED" | "CODE_SHIFT_API_2114_BAD_REQUEST_PUT_STEP_STATUS_IN_PROGRESS_AND_STARTED_AT_NOT_DEFINED" | "CODE_SHIFT_API_2115_BAD_REQUEST_PUT_STEP_COMPLETED_AT_DEFINED_AND_STATUS_NOT_COMPLETED" | "CODE_SHIFT_API_2116_BAD_REQUEST_PUT_STEP_STARTED_AT_DEFINED_AND_STATUS_PENDING" | "CODE_SHIFT_API_2117_BAD_REQUEST_PUT_STEP_LOG_DEFINED_AND_CONCLUSION_IS_NOT_FAILURE" | "CODE_SHIFT_API_2120_BAD_REQUEST_MULTIPLE_INTEGRATION" | "CODE_SHIFT_API_2121_BAD_REQUEST_EMPTY_INTEGRATION" | "CODE_SHIFT_API_2121_BAD_REQUEST_EMPTY_TARGET" | "CODE_SHIFT_API_2121_BAD_REQUEST_FILLED_TARGET" | "CODE_SHIFT_API_2999_BAD_REQUEST_UNMAPPED";
65
65
  export type InvalidPayloadDetails = {
66
66
  code: BadRequestExceptionTypes | ExceptionType;
@@ -392,10 +392,16 @@ export type GetReportResponseRead = {
392
392
  inputs?: {
393
393
  [key: string]: any;
394
394
  } | null;
395
+ customerScore?: number | null
396
+ customerCommentary?: string | null
395
397
  };
396
398
  export type GetPullRequest = {
397
399
  content: string;
398
400
  };
401
+ export type PutCustomerRatingReportRequest = {
402
+ score: number
403
+ commentary?: string | null
404
+ }
399
405
  export type SearchRepoScmResponse = {
400
406
  id: string;
401
407
  };
@@ -797,6 +803,8 @@ export type RepositoryLastReportStatusResponse = {
797
803
  totalIssues: number | null;
798
804
  pullRequestLink: string | null;
799
805
  merged: boolean | null;
806
+ customerScore?: number | null
807
+ customerCommentary?: string | null
800
808
  };
801
809
  export type AnalyticsRepositoryLastReportStatusResponse = {
802
810
  totalFiles?: number;
@@ -819,6 +827,8 @@ export type RepositoryUsageResponse = {
819
827
  totalFixFailure?: number;
820
828
  totalPullRequests?: number;
821
829
  mergedPullRequests?: number;
830
+ averageRating?: number
831
+ totalRatings?: number
822
832
  };
823
833
  export type AnalyticsRepositoryUsageResponse = {
824
834
  totalScan?: number;
@@ -829,6 +839,8 @@ export type AnalyticsRepositoryUsageResponse = {
829
839
  totalFixFailure?: number;
830
840
  totalPullRequests?: number;
831
841
  mergedPullRequests?: number;
842
+ overallAverageRating?: number
843
+ totalRatings?: number;
832
844
  items: RepositoryUsageResponse[];
833
845
  totalItems?: number;
834
846
  };
@@ -838,17 +850,25 @@ export type UserUsageResponse = {
838
850
  totalScan?: number;
839
851
  totalScanSuccess?: number;
840
852
  totalScanFailure?: number;
853
+ averageScanRating?: number
854
+ ratedScanCount?: number;
841
855
  totalFix?: number;
842
856
  totalFixSuccess?: number;
843
857
  totalFixFailure?: number;
858
+ averageFixRating?: number
859
+ ratedFixCount?: number
844
860
  };
845
861
  export type AnalyticsUserUsageResponse = {
846
862
  totalScan?: number;
847
863
  totalScanSuccess?: number;
848
864
  totalScanFailure?: number;
865
+ averageScanRating?: number
866
+ totalRatedScans?: number;
849
867
  totalFix?: number;
850
868
  totalFixSuccess?: number;
851
869
  totalFixFailure?: number;
870
+ averageFixRating?: number
871
+ totalRatedFixes?: number;
852
872
  items: UserUsageResponse[];
853
873
  totalItems?: number;
854
874
  };
@@ -858,6 +878,8 @@ export type ProgramGroupLastReportStatusResponse = {
858
878
  mode: string;
859
879
  reportCreatedAt: string;
860
880
  reportCreatedBy: string;
881
+ customerScore?: number | null
882
+ customerCommentary?: string | null;
861
883
  totalFiles?: number;
862
884
  totalFilesAnalyzed?: number;
863
885
  totalFilesIssues?: number;
@@ -881,6 +903,8 @@ export type ProgramGroupsUsageResponse = {
881
903
  totalFix?: number;
882
904
  totalFixSuccess?: number;
883
905
  totalFixFailure?: number;
906
+ averageRating?: number
907
+ totalRatings?: number
884
908
  };
885
909
  export type AnalyticsProgramGroupsUsageResponse = {
886
910
  totalScan?: number;
@@ -889,6 +913,8 @@ export type AnalyticsProgramGroupsUsageResponse = {
889
913
  totalFix?: number;
890
914
  totalFixSuccess?: number;
891
915
  totalFixFailure?: number;
916
+ overallAverageRating?: number
917
+ totalRatings?: number;
892
918
  items: ProgramGroupsUsageResponse[];
893
919
  totalItems?: number;
894
920
  };
@@ -913,6 +939,9 @@ export type ProgramGroupsDetailsResponse = {
913
939
  issuesFilesCount?: number;
914
940
  changedFilesCount?: number;
915
941
  issuesCount?: number;
942
+ customerScore?: number | null
943
+ customerCommentary?: string | null
944
+ customerRatingCreatedAt?: string | null
916
945
  };
917
946
  export type AnalyticsProgramGroupsDetailsResponse = {
918
947
  programsCount?: number;
@@ -952,6 +981,9 @@ export type RepositoryDetailedReportItemResponse = {
952
981
  targetBranch?: string | null;
953
982
  totalFilesCount?: number;
954
983
  status?: string | null;
984
+ customerScore?: number | null
985
+ customerCommentary?: string | null
986
+ customerRatingCreatedAt?: string | null
955
987
  };
956
988
  export type AnalyticsRepositoryDetailedReportResponse = {
957
989
  reposCount?: number;
@@ -980,6 +1012,8 @@ export type ProgramGroupsTargetDetailsResponse = {
980
1012
  customOutputs?: {
981
1013
  [key: string]: any;
982
1014
  } | null;
1015
+ customerScore?: number | null
1016
+ customerCommentary?: string | null
983
1017
  };
984
1018
  export type AnalyticsProgramGroupsTargetDetailsResponse = {
985
1019
  totalComponents?: number;
@@ -999,6 +1033,8 @@ export type RepositoryTargetDetailsItemResponse = {
999
1033
  issuesCount?: number | null;
1000
1034
  reportCreatedAt: string | null;
1001
1035
  reportId: string | null;
1036
+ customerScore?: number | null
1037
+ customerCommentary?: string | null
1002
1038
  };
1003
1039
  export type AnalyticsRepositoryTargetDetailsResponse = {
1004
1040
  totalFiles?: number;
@@ -1029,6 +1065,34 @@ export type RepositoryPayload = {
1029
1065
  export type ImportReposScmWithTagsRequest = {
1030
1066
  repositories: RepositoryPayload[];
1031
1067
  };
1068
+ export type SaveSearchReposRepositoryResponse = {
1069
+ id: string;
1070
+ };
1071
+ export type SaveSearchReposResponse = {
1072
+ search_id: string;
1073
+ repositories: SaveSearchReposRepositoryResponse[];
1074
+ };
1075
+ export type SearchRepoByIdResponse = {
1076
+ url: string
1077
+ name: string
1078
+ defaultBranch: string
1079
+ lastCommitDate: string
1080
+ archived: boolean
1081
+ visibility?: "public" | "private" | "internal" | "unknown"
1082
+ alreadyCreated?: boolean | null
1083
+ }
1084
+ export type ResponseSearchRepoByIdResponse = {
1085
+ total: number | null
1086
+ status?: string
1087
+ exceptions: HttpErrorResponse[]
1088
+ items?: SearchRepoByIdResponse[]
1089
+ }
1090
+ export type ResponseSearchRepoByIdResponseRead = {
1091
+ total: number | null
1092
+ status?: string
1093
+ exceptions: HttpErrorResponseRead[]
1094
+ items?: SearchRepoByIdResponse[]
1095
+ };
1032
1096
  /**
1033
1097
  * Check Role Route
1034
1098
  */
@@ -1453,6 +1517,43 @@ export function downloadReportV1ReportsReportIdDownloadGet({ reportId, extension
1453
1517
  })
1454
1518
  }));
1455
1519
  }
1520
+ /**
1521
+ * Put Customer Rating Report
1522
+ */
1523
+ export function putCustomerRatingReportV1ReportsReportIdCustomerRatingPut({ reportId, authorization, putCustomerRatingReportRequest }: {
1524
+ reportId: string
1525
+ authorization: string
1526
+ putCustomerRatingReportRequest: PutCustomerRatingReportRequest
1527
+ }, opts?: Oazapfts.RequestOpts) {
1528
+ return oazapfts.ok(oazapfts.fetchJson<{
1529
+ status: 200
1530
+ data: any
1531
+ } | {
1532
+ status: 400
1533
+ data: HttpErrorResponseRead
1534
+ } | {
1535
+ status: 401
1536
+ data: HttpErrorResponseRead
1537
+ } | {
1538
+ status: 404
1539
+ data: HttpErrorResponseRead
1540
+ } | {
1541
+ status: 422
1542
+ } | {
1543
+ status: 500
1544
+ data: HttpErrorResponseRead
1545
+ } | {
1546
+ status: 503
1547
+ data: HttpErrorResponseRead
1548
+ }>(`/v1/reports/${encodeURIComponent(reportId)}/customer-rating`, oazapfts.json({
1549
+ ...opts,
1550
+ method: "PUT",
1551
+ body: putCustomerRatingReportRequest,
1552
+ headers: oazapfts.mergeHeaders(opts?.headers, {
1553
+ authorization
1554
+ })
1555
+ })))
1556
+ }
1456
1557
  /**
1457
1558
  * Search Repos Scm Service
1458
1559
  */
@@ -3376,8 +3477,6 @@ export function searchReposScmServiceV2ReposSearchScmPost({ authorization, searc
3376
3477
  }, opts?: Oazapfts.RequestOpts) {
3377
3478
  return oazapfts.ok(oazapfts.fetchJson<{
3378
3479
  status: 200;
3379
- } | {
3380
- status: 201;
3381
3480
  data: SearchReposInScmResponse;
3382
3481
  } | {
3383
3482
  status: 207;
@@ -3418,7 +3517,7 @@ export function importReposWithTagsScmServiceV2ReposSearchScmSearchIdPost({ sear
3418
3517
  }, opts?: Oazapfts.RequestOpts) {
3419
3518
  return oazapfts.ok(oazapfts.fetchJson<{
3420
3519
  status: 200;
3421
- data: SearchReposInScmResponse;
3520
+ data: SaveSearchReposResponse;
3422
3521
  } | {
3423
3522
  status: 400;
3424
3523
  data: HttpErrorResponseRead;
@@ -3454,7 +3553,7 @@ export function searchReposScmV2V2ReposSearchScmSearchIdGet({ searchId, authoriz
3454
3553
  }, opts?: Oazapfts.RequestOpts) {
3455
3554
  return oazapfts.ok(oazapfts.fetchJson<{
3456
3555
  status: 200;
3457
- data: any;
3556
+ data: ResponseSearchRepoByIdResponseRead;
3458
3557
  } | {
3459
3558
  status: 400;
3460
3559
  data: HttpErrorResponseRead;
@@ -332,3 +332,5 @@ export function delete1({ notificationIntentId }: {
332
332
  method: "DELETE"
333
333
  }));
334
334
  }
335
+
336
+
package/src/client/ai.ts CHANGED
@@ -264,7 +264,10 @@ class AIClient extends ReactQueryNetworkClient {
264
264
  if (!agent) return []
265
265
  const tools: (Omit<ChatAgentTool, 'duration' | 'prompt' | 'output'>)[] = []
266
266
  agent.toolkits?.builtin_toolkits?.forEach(kit => kit.tools?.forEach(({ id, name, description }) => {
267
- if (id) tools.push({ image: kit.image_url, id, name: name || id, description })
267
+ if (id) tools.push({ image: kit.image_url, id, name: name || id, description, goal: '' })
268
+ }))
269
+ agent.toolkits?.custom_toolkits?.forEach(kit => kit.tools?.forEach(({ id, name, description }) => {
270
+ if (id) tools.push({ image: kit.avatar ?? undefined, id, name: name || id, description, goal: '' })
268
271
  }))
269
272
  return tools
270
273
  } catch {
@@ -303,6 +306,33 @@ class AIClient extends ReactQueryNetworkClient {
303
306
  steps: info.data?.steps?.map(s => s.goal) ?? [],
304
307
  goal: info.data?.plan_goal ?? '',
305
308
  })
309
+
310
+ info.data?.steps.forEach(s => data.steps?.push({
311
+ id: s.id,
312
+ type: 'step',
313
+ status: 'pending',
314
+ input: s.goal,
315
+ attempts: [{
316
+ tools: s.tools?.map(t => ({
317
+ ...(tools.find(({ id }) => id === t.tool_id) ?? { id: t.tool_id, name: t.tool_id }),
318
+ executionId: t.tool_execution_id,
319
+ goal: t.goal,
320
+ })),
321
+ }],
322
+ }))
323
+ data.steps.push({ id: 'answer', type: 'answer', status: 'pending' })
324
+ }
325
+
326
+ if (info.type === 'planning' && info.action === 'awaiting_approval') {
327
+ data.steps.push({
328
+ id: 'planning',
329
+ type: 'planning',
330
+ status: 'awaiting_approval',
331
+ user_question: info.data?.user_question,
332
+ duration: info.duration || 0,
333
+ steps: info.data?.steps?.map(s => s.goal) ?? [],
334
+ goal: info.data?.plan_goal ?? '',
335
+ })
306
336
  info.data?.steps.forEach(s => data.steps?.push({
307
337
  id: s.id,
308
338
  type: 'step',
@@ -312,6 +342,7 @@ class AIClient extends ReactQueryNetworkClient {
312
342
  tools: s.tools?.map(t => ({
313
343
  ...(tools.find(({ id }) => id === t.tool_id) ?? { id: t.tool_id, name: t.tool_id }),
314
344
  executionId: t.tool_execution_id,
345
+ goal: t.goal,
315
346
  })),
316
347
  }],
317
348
  }))
@@ -334,27 +365,69 @@ class AIClient extends ReactQueryNetworkClient {
334
365
  }
335
366
  }
336
367
 
368
+ if (info.type === 'tool' && info.action === 'awaiting_approval') {
369
+ const tool = tools.find(({ id }) => id === info.data?.tool_id)
370
+ data.steps.push({
371
+ id: info.id,
372
+ type: 'tool',
373
+ status: 'awaiting_approval',
374
+ duration: info.duration || 0,
375
+ input: info.data?.input,
376
+ user_question: info.data?.user_question,
377
+ attempts: [{
378
+ tools: [{
379
+ executionId: info.id,
380
+ id: info.data?.tool_id ?? '',
381
+ name: tool?.name ?? '',
382
+ goal: tool?.goal ?? '',
383
+ ...tool,
384
+ }],
385
+ }],
386
+ })
387
+ data.steps.push({ id: 'answer', type: 'answer', status: 'pending' })
388
+ }
389
+
337
390
  if (info.type === 'tool' && info.action === 'start') {
338
391
  const currentStep = data.steps.find(s => s.status === 'running') as StepChatStep
339
- if (!currentStep || !info.data || !currentStep.attempts[0].tools) return
340
- const toolInFirstAttempt = currentStep.attempts[0].tools.find(t => t.executionId === info.id)
341
- if (!toolInFirstAttempt) return
342
- const input = formatJson(info.data.input)
343
- if (info.data.attempt === 0) {
344
- toolInFirstAttempt.input = input
345
- } else {
346
- currentStep.attempts[info.data.attempt] ??= { tools: [] }
347
- currentStep.attempts[info.data.attempt].tools?.push({
348
- ...toolInFirstAttempt,
349
- input,
392
+ if (!info.data) return
393
+
394
+ //There might be a tool with status awaiting_approval, so we want to inform tool has already started
395
+ if (!currentStep || !currentStep.attempts[0].tools) {
396
+ const input = formatJson(info.data.input)
397
+ const tool = tools.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
398
+ data.steps.push({
399
+ id: info.id,
400
+ type: 'tool',
401
+ status: 'running',
402
+ duration: info.duration || 0,
403
+ input: info.data?.input,
404
+ user_question: info.data?.user_question,
405
+ attempts: [{
406
+ tools:[{ ...tool, executionId: info.id, input }],
407
+ }],
350
408
  })
409
+ } else {
410
+ const toolInFirstAttempt = currentStep.attempts[0].tools.find(t => t.executionId === info.id)
411
+ if (!toolInFirstAttempt) return
412
+ const input = formatJson(info.data.input)
413
+ if (info.data.attempt === 1) {
414
+ toolInFirstAttempt.input = input
415
+ } else {
416
+ const tool = tools.find(({ id }) => id === info.data?.tool_id) ?? { id: info.data?.tool_id, name: info.data?.tool_id }
417
+ currentStep.attempts[info.data.attempt-1] ??= { tools: [] }
418
+ currentStep.attempts[info.data.attempt-1].tools?.push({
419
+ ...tool,
420
+ input,
421
+ })
422
+ }
423
+
351
424
  }
352
425
  }
353
426
 
354
427
  if (info.type === 'tool' && info.action === 'end') {
355
428
  const currentStep = data.steps.find(s => s.status === 'running') as StepChatStep
356
429
  if (!currentStep || !info.data) return
357
- const tool = currentStep.attempts[info.data.attempt]?.tools?.find(t => t.executionId === info.id)
430
+ const tool = currentStep.attempts[info.data.attempt-1]?.tools?.find(t => t.executionId === info.id)
358
431
  if (tool) {
359
432
  tool.output = formatJson(info.data.output)
360
433
  tool.duration = info.duration
@@ -393,3 +466,4 @@ class AIClient extends ReactQueryNetworkClient {
393
466
  }
394
467
 
395
468
  export const aiClient = new AIClient()
469
+
@@ -60,6 +60,10 @@ import {
60
60
  analyticsProgramGroupsTargetDetailsDownloadV1AnalyticsProgramGroupsTargetDetailsDownloadGet,
61
61
  analyticsRepositoryTargetDetailsV1AnalyticsRepositoriesTargetDetailsGet,
62
62
  analyticsRepositoryTargetDetailsDownloadV1AnalyticsRepositoriesTargetDetailsDownloadGet,
63
+ searchReposScmServiceV2ReposSearchScmPost,
64
+ importReposWithTagsScmServiceV2ReposSearchScmSearchIdPost,
65
+ searchReposScmV2V2ReposSearchScmSearchIdGet,
66
+ putCustomerRatingReportV1ReportsReportIdCustomerRatingPut,
63
67
  } from '../api/codeShift'
64
68
  import { DefaultAPIError } from '../error/DefaultAPIError'
65
69
  import { codeShiftDictionary } from '../error/dictionary/code-shift'
@@ -161,6 +165,18 @@ class CodeShift extends ReactQueryNetworkClient {
161
165
  * Downloads file with found repositories
162
166
  */
163
167
  downloadSearchRepository = this.mutation(removeAuthorizationParam(downloadSearchReposScmServiceV1ReposSearchScmSearchRepoIdDownloadGet))
168
+ /**
169
+ * Searches for repositories (v2)
170
+ */
171
+ searchRepositoryV2 = this.mutation(removeAuthorizationParam(searchReposScmServiceV2ReposSearchScmPost))
172
+ /**
173
+ * Imports repositories (v2)
174
+ */
175
+ importRepositories = this.mutation(removeAuthorizationParam(importReposWithTagsScmServiceV2ReposSearchScmSearchIdPost))
176
+ /**
177
+ * Gets repositories search by id (v2)
178
+ */
179
+ getRepositoriesBySearchId = this.query(removeAuthorizationParam(searchReposScmV2V2ReposSearchScmSearchIdGet))
164
180
  /**
165
181
  * Validate if the user has permission.
166
182
  * We do not use opa in this api, so this is the fn needed to check permissions.
@@ -344,6 +360,12 @@ class CodeShift extends ReactQueryNetworkClient {
344
360
  analyticsRepositoryTargetDetailsDownload = this.query(
345
361
  removeAuthorizationParam(analyticsRepositoryTargetDetailsDownloadV1AnalyticsRepositoriesTargetDetailsDownloadGet),
346
362
  )
363
+ /**
364
+ * Put Customer Rating Report
365
+ */
366
+ updateReportRating = this.mutation(
367
+ removeAuthorizationParam(putCustomerRatingReportV1ReportsReportIdCustomerRatingPut),
368
+ )
347
369
  }
348
370
 
349
371
  export const codeShiftClient = new CodeShift()
@@ -245,19 +245,20 @@ export interface ChatAgentTool {
245
245
  image?: string,
246
246
  input?: string,
247
247
  output?: string,
248
+ goal: string,
248
249
  }
249
250
 
250
251
  export interface ChatStepAttempt {
251
252
  /**
252
253
  * The tools used by this step.
253
254
  */
254
- tools?: ChatAgentTool[],
255
+ tools?: Partial<ChatAgentTool>[],
255
256
  }
256
257
 
257
258
  export interface BaseChatStep {
258
259
  id: string,
259
- type: 'planning' | 'step' | 'answer',
260
- status: 'pending' | 'running' | 'success' | 'error',
260
+ type: 'planning' | 'step' | 'answer' | 'tool',
261
+ status: 'pending' | 'running' | 'success' | 'error' | 'awaiting_approval',
261
262
  /**
262
263
  * Duration in seconds.
263
264
  */
@@ -266,9 +267,24 @@ export interface BaseChatStep {
266
267
 
267
268
  export interface PlanningChatStep extends BaseChatStep {
268
269
  type: 'planning',
269
- status: 'success',
270
+ status: 'success' | 'awaiting_approval',
270
271
  steps: string[],
271
272
  goal: string,
273
+ user_question?: string,
274
+ }
275
+
276
+ export interface ToolChatStep extends BaseChatStep {
277
+ type: 'tool',
278
+ status: 'running' | 'success' | 'error' | 'awaiting_approval',
279
+ /**
280
+ * Each step might attempt to run for multiple times, with different inputs and outputs. If first attempt succeeds, this array will have
281
+ * only one element.
282
+ *
283
+ * This array never has less than one element, despite the step's status.
284
+ */
285
+ attempts: ChatStepAttempt[],
286
+ input?: Record<string, any>,
287
+ user_question?: string,
272
288
  }
273
289
 
274
290
  export interface StepChatStep extends BaseChatStep {
@@ -288,17 +304,19 @@ export interface AnswerChatStep extends BaseChatStep {
288
304
  type: 'answer',
289
305
  }
290
306
 
291
- export type ChatStep = PlanningChatStep | StepChatStep | AnswerChatStep
307
+ export type ChatStep = PlanningChatStep | StepChatStep | AnswerChatStep | ToolChatStep
292
308
 
293
309
  export interface BaseAgentInfo {
294
310
  type: 'chat' | 'planning' | 'step' | 'tool' | 'final_answer',
295
- action: 'start' | 'end',
311
+ action: 'start' | 'end' | 'awaiting_approval',
296
312
  duration?: number,
313
+ id: string,
297
314
  }
298
315
 
299
316
  export interface AgentTool {
300
317
  tool_id: string,
301
318
  tool_execution_id: string,
319
+ goal: string,
302
320
  }
303
321
 
304
322
  export interface PlanningAgentInfo extends BaseAgentInfo {
@@ -311,6 +329,7 @@ export interface PlanningAgentInfo extends BaseAgentInfo {
311
329
  goal: string,
312
330
  tools?: AgentTool[],
313
331
  }[],
332
+ user_question?: string,
314
333
  },
315
334
  }
316
335
 
@@ -326,6 +345,8 @@ export interface ToolAgentInfo extends BaseAgentInfo {
326
345
  input?: any,
327
346
  attempt: number,
328
347
  output?: string,
348
+ user_question?: string,
349
+ tool_id: string,
329
350
  },
330
351
  }
331
352