@stack-spot/portal-network 0.182.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.
- package/CHANGELOG.md +33 -0
- package/dist/api/codeShift.d.ts +76 -4
- package/dist/api/codeShift.d.ts.map +1 -1
- package/dist/api/codeShift.js +13 -0
- package/dist/api/codeShift.js.map +1 -1
- package/dist/client/ai.d.ts.map +1 -1
- package/dist/client/ai.js +84 -14
- package/dist/client/ai.js.map +1 -1
- package/dist/client/code-shift.d.ts +30 -0
- package/dist/client/code-shift.d.ts.map +1 -1
- package/dist/client/code-shift.js +37 -1
- package/dist/client/code-shift.js.map +1 -1
- package/dist/client/types.d.ts +26 -6
- package/dist/client/types.d.ts.map +1 -1
- package/dist/client/workspace-ai.d.ts.map +1 -1
- package/dist/client/workspace-ai.js +3 -7
- package/dist/client/workspace-ai.js.map +1 -1
- package/dist/error/dictionary/workspace-ai.d.ts +9 -0
- package/dist/error/dictionary/workspace-ai.d.ts.map +1 -0
- package/dist/error/dictionary/workspace-ai.js +9 -0
- package/dist/error/dictionary/workspace-ai.js.map +1 -0
- package/logs/simple-failure/01JBER7AWKACEC3Y1NF7M6PHFF/job_id_1.log +3 -0
- package/logs/simple-suspend/01JBEMQG94ADPT99MSZ7EJKGXZ/job_id_1.log +5 -0
- package/package.json +6 -6
- package/readme.md +1 -1
- package/src/api/account.ts +1 -0
- package/src/api/agent-tools.ts +3 -0
- package/src/api/agent.ts +2 -0
- package/src/api/codeShift.ts +106 -7
- package/src/api/notification.ts +2 -0
- package/src/client/ai.ts +87 -13
- package/src/client/code-shift.ts +22 -0
- package/src/client/types.ts +27 -6
- package/src/client/workspace-ai.ts +19 -23
- package/src/error/dictionary/workspace-ai.ts +10 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-ai.d.ts","sourceRoot":"","sources":["../../src/client/workspace-ai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAA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0BAA0B;;;;;4EAAgG;IAC1H,6BAA6B;;;;;4EAAoG;IAEjI;;;;;OAKG;IAEH,mBAAmB;;;;;;;;;;;oCAAuQ;IAE1R;;OAEG;IACH,sBAAsB;;;;4EAA0F;IAEhH;;OAEG;IACH,yBAAyB;;;;4EAA+F;IAExH;;OAEG;IACH,wBAAwB;;;;;4HAA0F;IAClH;;OAEG;IACH,qBAAqB;;;;wHAA+F;IACpH;;OAEG;IACH,aAAa;;;;wHAA+E;IAC5F;;OAEG;IACH,qBAAqB;;;;;;4EAAmH;IACxI;;OAEG;IACH,wBAAwB;;;;;;4EAC8F;IACtH;;OAEG;IACH,mBAAmB;;;;;;;;;;;;gIACuG;CAC3H;AAED,eAAO,MAAM,iBAAiB,mBAA0B,CAAA"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { addContentV1WorkspacesWorkspaceIdContentTypePost, addFavoriteV1WorkspacesWorkspaceIdFavoritePost, addPermissionV1ResourceTypeResourceTypeResourcesResourceIdentifierPatch, addPermissionV1WorkspacesWorkspaceIdPermissionsPatch, createShareableLinkV1WorkspacesWorkspaceIdSharePost, createWorkspaceV1WorkspacesPost, defaults, deleteFavoriteV1WorkspacesWorkspaceIdFavoriteDelete, deleteWorkspaceV1WorkspacesWorkspaceIdDelete, getWorkspaceByIdV1WorkspacesIdGet, listAllByContentTypeV1WorkspacesWorkspaceIdContentTypeGet, listAllContentsV1WorkspacesContentsContentTypeGet, listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet, listMembersV1ResourceTypeResourceTypeResourcesResourceIdentifierMembersGet, listWorkspacesV1WorkspacesGet, removeContentV1WorkspacesWorkspaceIdContentTypeContentIdDelete, removePermissionV1ResourceTypeResourceTypeResourcesResourceIdentifierDelete, removePermissionV1WorkspacesWorkspaceIdPermissionsDelete, updateWorkspaceV1WorkspacesWorkspaceIdPatch, useShareableLinkV1ShareShareIdPatch, } from '../api/workspace-ai.js';
|
|
2
|
-
import { StackspotAPIError } from '../error/StackspotAPIError.js';
|
|
3
2
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient.js';
|
|
4
3
|
import { removeAuthorizationParam } from '../utils/remove-authorization-param.js';
|
|
5
4
|
import { getApiAddresses } from '../api-addresses.js';
|
|
5
|
+
import { DefaultAPIError } from '../error/DefaultAPIError.js';
|
|
6
|
+
import { wksAiDictionary } from '../error/dictionary/workspace-ai.js';
|
|
6
7
|
class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
7
8
|
constructor() {
|
|
8
9
|
super(getApiAddresses()['workspace-ai'].url, defaults);
|
|
@@ -219,12 +220,7 @@ class WorkspaceAiClient extends ReactQueryNetworkClient {
|
|
|
219
220
|
});
|
|
220
221
|
}
|
|
221
222
|
buildStackSpotError(error) {
|
|
222
|
-
return new
|
|
223
|
-
status: error.status,
|
|
224
|
-
headers: error.headers,
|
|
225
|
-
stack: error.stack,
|
|
226
|
-
message: error.data?.detail?.map(d => d.msg)?.join('\n'),
|
|
227
|
-
});
|
|
223
|
+
return new DefaultAPIError(error.data, error.status, wksAiDictionary, error.headers);
|
|
228
224
|
}
|
|
229
225
|
}
|
|
230
226
|
export const workspaceAiClient = new WorkspaceAiClient();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-ai.js","sourceRoot":"","sources":["../../src/client/workspace-ai.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gDAAgD,EAChD,8CAA8C,EAC9C,uEAAuE,EACvE,oDAAoD,EACpD,mDAAmD,EACnD,+BAA+B,EAC/B,QAAQ,EACR,mDAAmD,EACnD,4CAA4C,EAC5C,iCAAiC,
|
|
1
|
+
{"version":3,"file":"workspace-ai.js","sourceRoot":"","sources":["../../src/client/workspace-ai.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gDAAgD,EAChD,8CAA8C,EAC9C,uEAAuE,EACvE,oDAAoD,EACpD,mDAAmD,EACnD,+BAA+B,EAC/B,QAAQ,EACR,mDAAmD,EACnD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AAwB,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,mDAAmD,CAAC,CAAC;WAAA;QACpH;;WAEG;QACH;;;;mBAAgB,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,mCAAmC,CAAC,CAAC;WAAA;QAC5F;;WAEG;QACH;;;;mBAAwB,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,uEAAuE,CAAC,CAAC;WAAA;QACxI;;WAEG;QACH;;;;mBACE,IAAI,CAAC,QAAQ,CAAC,wBAAwB,CAAC,2EAA2E,CAAC,CAAC;WAAA;QACtH;;WAEG;QACH;;;;mBACE,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC,0EAA0E,CAAC,CAAC;WAAA;IAtJ1H,CAAC;IAES,mBAAmB,CAAC,KAAgB;QAC5C,OAAO,IAAI,eAAe,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACtF,CAAC;CAmJF;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,iBAAiB,EAAE,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-ai.d.ts","sourceRoot":"","sources":["../../../src/error/dictionary/workspace-ai.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;CAON,CAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const wksAiDictionary = {
|
|
2
|
+
en: {
|
|
3
|
+
AGENT_1105_TOOLKIT_WITH_PERSONAL_SECRET: 'It is not possible to share the agent, as it has a tool with a personal secret. Remove the tool or replace it with an organization secret.',
|
|
4
|
+
},
|
|
5
|
+
pt: {
|
|
6
|
+
AGENT_1105_TOOLKIT_WITH_PERSONAL_SECRET: 'Não é possível compartilhar o agente, pois ele possui uma ferramenta com segredo pessoal. Remova a ferramenta ou substitua por um segredo da organização.',
|
|
7
|
+
},
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=workspace-ai.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workspace-ai.js","sourceRoot":"","sources":["../../../src/error/dictionary/workspace-ai.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,EAAE,EAAE;QACF,uCAAuC,EAAE,4IAA4I;KACtL;IACD,EAAE,EAAE;QACF,uCAAuC,EAAE,2JAA2J;KACrM;CACmB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stack-spot/portal-network",
|
|
3
|
-
"version": "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
|
package/src/api/account.ts
CHANGED
package/src/api/agent-tools.ts
CHANGED
package/src/api/agent.ts
CHANGED
package/src/api/codeShift.ts
CHANGED
|
@@ -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:
|
|
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:
|
|
3556
|
+
data: ResponseSearchRepoByIdResponseRead;
|
|
3458
3557
|
} | {
|
|
3459
3558
|
status: 400;
|
|
3460
3559
|
data: HttpErrorResponseRead;
|
package/src/api/notification.ts
CHANGED
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 (!
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
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
|
+
|
package/src/client/code-shift.ts
CHANGED
|
@@ -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()
|