@stack-spot/portal-network 0.117.0 → 0.118.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 +16 -0
- package/dist/api/agent.d.ts +14 -1
- package/dist/api/agent.d.ts.map +1 -1
- package/dist/api/agent.js +19 -1
- package/dist/api/agent.js.map +1 -1
- package/dist/api/codeShift.d.ts +155 -3
- package/dist/api/codeShift.d.ts.map +1 -1
- package/dist/api/codeShift.js +97 -2
- package/dist/api/codeShift.js.map +1 -1
- package/dist/api/insights.d.ts +14 -2
- package/dist/api/insights.d.ts.map +1 -1
- package/dist/api/insights.js +23 -6
- package/dist/api/insights.js.map +1 -1
- package/dist/client/agent.d.ts +4 -0
- package/dist/client/agent.d.ts.map +1 -1
- package/dist/client/agent.js +10 -1
- package/dist/client/agent.js.map +1 -1
- package/dist/client/code-shift.d.ts +72 -7
- package/dist/client/code-shift.d.ts.map +1 -1
- package/dist/client/code-shift.js +81 -11
- package/dist/client/code-shift.js.map +1 -1
- package/dist/client/insights.d.ts +11 -0
- package/dist/client/insights.d.ts.map +1 -1
- package/dist/client/insights.js +10 -1
- package/dist/client/insights.js.map +1 -1
- package/dist/error/dictionary/cnt.d.ts +2 -0
- package/dist/error/dictionary/cnt.d.ts.map +1 -1
- package/dist/error/dictionary/cnt.js +2 -0
- package/dist/error/dictionary/cnt.js.map +1 -1
- package/package.json +1 -1
- package/src/api/agent.ts +82 -1
- package/src/api/codeShift.ts +366 -4
- package/src/api/insights.ts +40 -6
- package/src/client/agent.ts +6 -1
- package/src/client/code-shift.ts +62 -15
- package/src/client/insights.ts +5 -1
- package/src/error/dictionary/cnt.ts +2 -0
package/src/api/agent.ts
CHANGED
|
@@ -61,7 +61,12 @@ export type WorkspaceForkRequest = {
|
|
|
61
61
|
agentIds?: string[];
|
|
62
62
|
memberId?: Uuid;
|
|
63
63
|
};
|
|
64
|
+
export type AgentItemFork = {
|
|
65
|
+
agentId?: string;
|
|
66
|
+
isBuiltIn?: boolean;
|
|
67
|
+
};
|
|
64
68
|
export type WorkspaceForkResponse = {
|
|
69
|
+
agents?: AgentItemFork[];
|
|
65
70
|
agentIds?: string[];
|
|
66
71
|
agentIdsAccount?: string[];
|
|
67
72
|
ksIds?: string[];
|
|
@@ -528,7 +533,7 @@ export function postV1AgentByAgentIdFavorite({ agentId }: {
|
|
|
528
533
|
}));
|
|
529
534
|
}
|
|
530
535
|
/**
|
|
531
|
-
*
|
|
536
|
+
* Delete favorite of an AI agent.
|
|
532
537
|
*/
|
|
533
538
|
export function deleteV1AgentByAgentIdFavorite({ agentId }: {
|
|
534
539
|
agentId: string;
|
|
@@ -732,6 +737,44 @@ export function getV1Agents({ visibility }: {
|
|
|
732
737
|
...opts
|
|
733
738
|
}));
|
|
734
739
|
}
|
|
740
|
+
/**
|
|
741
|
+
* Create agents trial
|
|
742
|
+
*/
|
|
743
|
+
export function postV1AgentsTrial(opts?: Oazapfts.RequestOpts) {
|
|
744
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
745
|
+
status: 204;
|
|
746
|
+
} | {
|
|
747
|
+
status: 404;
|
|
748
|
+
data: {
|
|
749
|
+
code?: string;
|
|
750
|
+
details?: string;
|
|
751
|
+
additionalInformation?: {
|
|
752
|
+
[key: string]: any;
|
|
753
|
+
} | null;
|
|
754
|
+
};
|
|
755
|
+
} | {
|
|
756
|
+
status: 422;
|
|
757
|
+
data: {
|
|
758
|
+
code?: string;
|
|
759
|
+
details?: string;
|
|
760
|
+
additionalInformation?: {
|
|
761
|
+
[key: string]: any;
|
|
762
|
+
} | null;
|
|
763
|
+
};
|
|
764
|
+
} | {
|
|
765
|
+
status: 500;
|
|
766
|
+
data: {
|
|
767
|
+
code?: string;
|
|
768
|
+
details?: string;
|
|
769
|
+
additionalInformation?: {
|
|
770
|
+
[key: string]: any;
|
|
771
|
+
} | null;
|
|
772
|
+
};
|
|
773
|
+
}>("/v1/agents/trial", {
|
|
774
|
+
...opts,
|
|
775
|
+
method: "POST"
|
|
776
|
+
}));
|
|
777
|
+
}
|
|
735
778
|
/**
|
|
736
779
|
* Creates a new built-in AI Agent.
|
|
737
780
|
*/
|
|
@@ -1054,3 +1097,41 @@ export function getV1PublicAgents({ visibility }: {
|
|
|
1054
1097
|
...opts
|
|
1055
1098
|
}));
|
|
1056
1099
|
}
|
|
1100
|
+
/**
|
|
1101
|
+
* Create agents trial
|
|
1102
|
+
*/
|
|
1103
|
+
export function postV1PublicAgentsTrial(opts?: Oazapfts.RequestOpts) {
|
|
1104
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1105
|
+
status: 204;
|
|
1106
|
+
} | {
|
|
1107
|
+
status: 404;
|
|
1108
|
+
data: {
|
|
1109
|
+
code?: string;
|
|
1110
|
+
details?: string;
|
|
1111
|
+
additionalInformation?: {
|
|
1112
|
+
[key: string]: any;
|
|
1113
|
+
} | null;
|
|
1114
|
+
};
|
|
1115
|
+
} | {
|
|
1116
|
+
status: 422;
|
|
1117
|
+
data: {
|
|
1118
|
+
code?: string;
|
|
1119
|
+
details?: string;
|
|
1120
|
+
additionalInformation?: {
|
|
1121
|
+
[key: string]: any;
|
|
1122
|
+
} | null;
|
|
1123
|
+
};
|
|
1124
|
+
} | {
|
|
1125
|
+
status: 500;
|
|
1126
|
+
data: {
|
|
1127
|
+
code?: string;
|
|
1128
|
+
details?: string;
|
|
1129
|
+
additionalInformation?: {
|
|
1130
|
+
[key: string]: any;
|
|
1131
|
+
} | null;
|
|
1132
|
+
};
|
|
1133
|
+
}>("/v1/public/agents/trial", {
|
|
1134
|
+
...opts,
|
|
1135
|
+
method: "POST"
|
|
1136
|
+
}));
|
|
1137
|
+
}
|
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" | "dispatch-module" | "create-module";
|
|
15
|
+
export type CodeShiftRole = "list-applications" | "create-application" | "list-repository" | "create-repository" | "delete-repository" | "dispatch-module" | "create-module";
|
|
16
16
|
export type RolesResponse = {
|
|
17
17
|
result: boolean;
|
|
18
18
|
};
|
|
@@ -86,7 +86,7 @@ export type RepositoryRequest = {
|
|
|
86
86
|
};
|
|
87
87
|
export type CreateApplicationRequest = {
|
|
88
88
|
/** Application name */
|
|
89
|
-
name
|
|
89
|
+
name?: string | null;
|
|
90
90
|
/** Repository */
|
|
91
91
|
repository: RepositoryRequest;
|
|
92
92
|
};
|
|
@@ -253,7 +253,10 @@ export type TargetFilesRequest = {
|
|
|
253
253
|
export type PutReportRequest = {
|
|
254
254
|
filesCount: number;
|
|
255
255
|
issuesCount: number;
|
|
256
|
+
total_files_count?: number | null;
|
|
257
|
+
analyzed_files_count?: number | null;
|
|
256
258
|
pullRequestLink?: string | null;
|
|
259
|
+
commitHash?: string | null;
|
|
257
260
|
targetFiles: TargetFilesRequest[];
|
|
258
261
|
};
|
|
259
262
|
export type ModuleResponse3 = {
|
|
@@ -263,6 +266,7 @@ export type ModuleResponse3 = {
|
|
|
263
266
|
export type ApplicationResponse2 = {
|
|
264
267
|
id: string;
|
|
265
268
|
name: string;
|
|
269
|
+
url: string;
|
|
266
270
|
};
|
|
267
271
|
export type ExecutionResponse3 = {
|
|
268
272
|
id: string;
|
|
@@ -303,11 +307,101 @@ export type GetReportResponse = {
|
|
|
303
307
|
createdAt: string;
|
|
304
308
|
updatedAt: string;
|
|
305
309
|
filesCount: number | null;
|
|
310
|
+
total_files_count: number | null;
|
|
311
|
+
analyzed_files_count: number | null;
|
|
312
|
+
issues_files_count: number | null;
|
|
306
313
|
issuesCount: number | null;
|
|
314
|
+
commitHash: string | null;
|
|
307
315
|
pullRequestLink?: string | null;
|
|
308
316
|
targetFiles: TargetFilesResponse[];
|
|
309
317
|
errorLog?: string | null;
|
|
310
318
|
};
|
|
319
|
+
export type ModuleResponse4 = {
|
|
320
|
+
id: string;
|
|
321
|
+
name: string;
|
|
322
|
+
};
|
|
323
|
+
export type ExecutionResponse4 = {
|
|
324
|
+
id: string;
|
|
325
|
+
startedAt: string | null;
|
|
326
|
+
completedAt: string | null;
|
|
327
|
+
status: string | null;
|
|
328
|
+
conclusion: string | null;
|
|
329
|
+
};
|
|
330
|
+
export type ReportResponse3 = {
|
|
331
|
+
id: string;
|
|
332
|
+
"module": ModuleResponse4;
|
|
333
|
+
execution: ExecutionResponse4 | null;
|
|
334
|
+
mode: string;
|
|
335
|
+
sourceBranch: string;
|
|
336
|
+
targetBranch?: string | null;
|
|
337
|
+
createdBy: UserResponse;
|
|
338
|
+
createdAt: string;
|
|
339
|
+
updatedAt: string;
|
|
340
|
+
filesCount: number | null;
|
|
341
|
+
issuesCount: number | null;
|
|
342
|
+
pullRequestLink?: string | null;
|
|
343
|
+
errorLog?: string | null;
|
|
344
|
+
};
|
|
345
|
+
export type ListRepositoryReportResponse = {
|
|
346
|
+
/** List of reports */
|
|
347
|
+
items: ReportResponse3[];
|
|
348
|
+
/** Number of reports */
|
|
349
|
+
itemsCount: number;
|
|
350
|
+
/** Last evaluated key */
|
|
351
|
+
lastEvaluatedKey: string | null;
|
|
352
|
+
};
|
|
353
|
+
export type BodyCreateReposBatchServiceV1ReposBatchPost = {
|
|
354
|
+
file: Blob;
|
|
355
|
+
};
|
|
356
|
+
export type CreateRepositoryRequest = {
|
|
357
|
+
url: string;
|
|
358
|
+
defaultBranch: string;
|
|
359
|
+
};
|
|
360
|
+
export type ExecutionResponse5 = {
|
|
361
|
+
id: string;
|
|
362
|
+
startedAt: string | null;
|
|
363
|
+
completedAt: string | null;
|
|
364
|
+
status: string | null;
|
|
365
|
+
conclusion: string | null;
|
|
366
|
+
};
|
|
367
|
+
export type ReportResponse4 = {
|
|
368
|
+
id: string;
|
|
369
|
+
execution: ExecutionResponse5 | null;
|
|
370
|
+
mode: string;
|
|
371
|
+
moduleId: string;
|
|
372
|
+
sourceBranch: string;
|
|
373
|
+
targetBranch?: string | null;
|
|
374
|
+
createdBy: UserResponse;
|
|
375
|
+
createdAt: string;
|
|
376
|
+
updatedAt: string;
|
|
377
|
+
filesCount: number | null;
|
|
378
|
+
issuesCount: number | null;
|
|
379
|
+
pullRequestLink?: string | null;
|
|
380
|
+
errorLog?: string | null;
|
|
381
|
+
};
|
|
382
|
+
export type RepositoryResponse2 = {
|
|
383
|
+
/** Repository ID */
|
|
384
|
+
id: string;
|
|
385
|
+
/** Repository creation date */
|
|
386
|
+
createdAt?: string | null;
|
|
387
|
+
/** Repository creation user */
|
|
388
|
+
createdBy?: string | null;
|
|
389
|
+
lastModuleReport: ReportResponse4 | null;
|
|
390
|
+
url: string;
|
|
391
|
+
defaultBranch: string;
|
|
392
|
+
};
|
|
393
|
+
export type ListRepositoryResponse = {
|
|
394
|
+
/** List of applications */
|
|
395
|
+
items: RepositoryResponse2[];
|
|
396
|
+
/** Number of applications */
|
|
397
|
+
itemsCount: number;
|
|
398
|
+
/** Last evaluated key */
|
|
399
|
+
lastEvaluatedKey: string | null;
|
|
400
|
+
};
|
|
401
|
+
export type PutRepositoryRequest = {
|
|
402
|
+
url?: string | null;
|
|
403
|
+
defaultBranch?: string | null;
|
|
404
|
+
};
|
|
311
405
|
/**
|
|
312
406
|
* Check Role Route
|
|
313
407
|
*/
|
|
@@ -597,9 +691,10 @@ export function updateApplicationServiceV1ApplicationsApplicationIdPut({ applica
|
|
|
597
691
|
/**
|
|
598
692
|
* Create Module Service
|
|
599
693
|
*/
|
|
600
|
-
export function createModuleServiceV1ModulesPost({ authorization, xAccountSlug, createModuleRequest }: {
|
|
694
|
+
export function createModuleServiceV1ModulesPost({ authorization, xAccountSlug, xAccountId, createModuleRequest }: {
|
|
601
695
|
authorization: string;
|
|
602
696
|
xAccountSlug?: any;
|
|
697
|
+
xAccountId?: any;
|
|
603
698
|
createModuleRequest: CreateModuleRequest;
|
|
604
699
|
}, opts?: Oazapfts.RequestOpts) {
|
|
605
700
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
@@ -628,7 +723,8 @@ export function createModuleServiceV1ModulesPost({ authorization, xAccountSlug,
|
|
|
628
723
|
body: createModuleRequest,
|
|
629
724
|
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
630
725
|
authorization,
|
|
631
|
-
"x-account-slug": xAccountSlug
|
|
726
|
+
"x-account-slug": xAccountSlug,
|
|
727
|
+
"x-account-id": xAccountId
|
|
632
728
|
})
|
|
633
729
|
})));
|
|
634
730
|
}
|
|
@@ -889,3 +985,269 @@ export function downloadReportV1ReportsReportIdDownloadGet({ reportId, authoriza
|
|
|
889
985
|
})
|
|
890
986
|
}));
|
|
891
987
|
}
|
|
988
|
+
/**
|
|
989
|
+
* List Repository Report
|
|
990
|
+
*/
|
|
991
|
+
export function listRepositoryReportV1ReposRepositoryIdReportsGet({ repositoryId, pageSize, page, lastEvaluatedKey, authorization }: {
|
|
992
|
+
repositoryId: string;
|
|
993
|
+
pageSize?: number;
|
|
994
|
+
page?: number;
|
|
995
|
+
lastEvaluatedKey?: string;
|
|
996
|
+
authorization: string;
|
|
997
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
998
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
999
|
+
status: 200;
|
|
1000
|
+
data: ListRepositoryReportResponse;
|
|
1001
|
+
} | {
|
|
1002
|
+
status: 400;
|
|
1003
|
+
data: HttpErrorResponse;
|
|
1004
|
+
} | {
|
|
1005
|
+
status: 401;
|
|
1006
|
+
data: HttpErrorResponse;
|
|
1007
|
+
} | {
|
|
1008
|
+
status: 404;
|
|
1009
|
+
data: HttpErrorResponse;
|
|
1010
|
+
} | {
|
|
1011
|
+
status: 422;
|
|
1012
|
+
} | {
|
|
1013
|
+
status: 500;
|
|
1014
|
+
data: HttpErrorResponse;
|
|
1015
|
+
} | {
|
|
1016
|
+
status: 503;
|
|
1017
|
+
data: HttpErrorResponse;
|
|
1018
|
+
}>(`/v1/repos/${encodeURIComponent(repositoryId)}/reports${QS.query(QS.explode({
|
|
1019
|
+
pageSize,
|
|
1020
|
+
page,
|
|
1021
|
+
lastEvaluatedKey
|
|
1022
|
+
}))}`, {
|
|
1023
|
+
...opts,
|
|
1024
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1025
|
+
authorization
|
|
1026
|
+
})
|
|
1027
|
+
}));
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* Create Repos Batch Service
|
|
1031
|
+
*/
|
|
1032
|
+
export function createReposBatchServiceV1ReposBatchPost({ authorization, bodyCreateReposBatchServiceV1ReposBatchPost }: {
|
|
1033
|
+
authorization: string;
|
|
1034
|
+
bodyCreateReposBatchServiceV1ReposBatchPost: BodyCreateReposBatchServiceV1ReposBatchPost;
|
|
1035
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1036
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1037
|
+
status: 200;
|
|
1038
|
+
data: any;
|
|
1039
|
+
} | {
|
|
1040
|
+
status: 207;
|
|
1041
|
+
data: HttpErrorResponse;
|
|
1042
|
+
} | {
|
|
1043
|
+
status: 400;
|
|
1044
|
+
data: HttpErrorResponse;
|
|
1045
|
+
} | {
|
|
1046
|
+
status: 401;
|
|
1047
|
+
data: HttpErrorResponse;
|
|
1048
|
+
} | {
|
|
1049
|
+
status: 404;
|
|
1050
|
+
data: HttpErrorResponse;
|
|
1051
|
+
} | {
|
|
1052
|
+
status: 422;
|
|
1053
|
+
} | {
|
|
1054
|
+
status: 500;
|
|
1055
|
+
data: HttpErrorResponse;
|
|
1056
|
+
} | {
|
|
1057
|
+
status: 503;
|
|
1058
|
+
data: HttpErrorResponse;
|
|
1059
|
+
}>("/v1/repos/batch", oazapfts.multipart({
|
|
1060
|
+
...opts,
|
|
1061
|
+
method: "POST",
|
|
1062
|
+
body: bodyCreateReposBatchServiceV1ReposBatchPost,
|
|
1063
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1064
|
+
authorization
|
|
1065
|
+
})
|
|
1066
|
+
})));
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* Create Repository Service
|
|
1070
|
+
*/
|
|
1071
|
+
export function createRepositoryServiceV1ReposPost({ authorization, createRepositoryRequest }: {
|
|
1072
|
+
authorization: string;
|
|
1073
|
+
createRepositoryRequest: CreateRepositoryRequest;
|
|
1074
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1075
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1076
|
+
status: 200;
|
|
1077
|
+
data: any;
|
|
1078
|
+
} | {
|
|
1079
|
+
status: 400;
|
|
1080
|
+
data: HttpErrorResponse;
|
|
1081
|
+
} | {
|
|
1082
|
+
status: 401;
|
|
1083
|
+
data: HttpErrorResponse;
|
|
1084
|
+
} | {
|
|
1085
|
+
status: 404;
|
|
1086
|
+
data: HttpErrorResponse;
|
|
1087
|
+
} | {
|
|
1088
|
+
status: 422;
|
|
1089
|
+
} | {
|
|
1090
|
+
status: 500;
|
|
1091
|
+
data: HttpErrorResponse;
|
|
1092
|
+
} | {
|
|
1093
|
+
status: 503;
|
|
1094
|
+
data: HttpErrorResponse;
|
|
1095
|
+
}>("/v1/repos", oazapfts.json({
|
|
1096
|
+
...opts,
|
|
1097
|
+
method: "POST",
|
|
1098
|
+
body: createRepositoryRequest,
|
|
1099
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1100
|
+
authorization
|
|
1101
|
+
})
|
|
1102
|
+
})));
|
|
1103
|
+
}
|
|
1104
|
+
/**
|
|
1105
|
+
* List Repository Service
|
|
1106
|
+
*/
|
|
1107
|
+
export function listRepositoryServiceV1ReposGet({ pageSize, page, lastEvaluatedKey, filter, moduleId, authorization }: {
|
|
1108
|
+
pageSize?: number;
|
|
1109
|
+
page?: number;
|
|
1110
|
+
lastEvaluatedKey?: string;
|
|
1111
|
+
filter?: string;
|
|
1112
|
+
moduleId?: string;
|
|
1113
|
+
authorization: string;
|
|
1114
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1115
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1116
|
+
status: 200;
|
|
1117
|
+
data: ListRepositoryResponse;
|
|
1118
|
+
} | {
|
|
1119
|
+
status: 400;
|
|
1120
|
+
data: HttpErrorResponse;
|
|
1121
|
+
} | {
|
|
1122
|
+
status: 401;
|
|
1123
|
+
data: HttpErrorResponse;
|
|
1124
|
+
} | {
|
|
1125
|
+
status: 404;
|
|
1126
|
+
data: HttpErrorResponse;
|
|
1127
|
+
} | {
|
|
1128
|
+
status: 422;
|
|
1129
|
+
} | {
|
|
1130
|
+
status: 500;
|
|
1131
|
+
data: HttpErrorResponse;
|
|
1132
|
+
} | {
|
|
1133
|
+
status: 503;
|
|
1134
|
+
data: HttpErrorResponse;
|
|
1135
|
+
}>(`/v1/repos${QS.query(QS.explode({
|
|
1136
|
+
pageSize,
|
|
1137
|
+
page,
|
|
1138
|
+
lastEvaluatedKey,
|
|
1139
|
+
filter,
|
|
1140
|
+
moduleId
|
|
1141
|
+
}))}`, {
|
|
1142
|
+
...opts,
|
|
1143
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1144
|
+
authorization
|
|
1145
|
+
})
|
|
1146
|
+
}));
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Get Repository By Id Service
|
|
1150
|
+
*/
|
|
1151
|
+
export function getRepositoryByIdServiceV1ReposRepositoryIdGet({ repositoryId, authorization }: {
|
|
1152
|
+
repositoryId: string;
|
|
1153
|
+
authorization: string;
|
|
1154
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1155
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1156
|
+
status: 200;
|
|
1157
|
+
data: RepositoryResponse2;
|
|
1158
|
+
} | {
|
|
1159
|
+
status: 400;
|
|
1160
|
+
data: HttpErrorResponse;
|
|
1161
|
+
} | {
|
|
1162
|
+
status: 401;
|
|
1163
|
+
data: HttpErrorResponse;
|
|
1164
|
+
} | {
|
|
1165
|
+
status: 404;
|
|
1166
|
+
data: HttpErrorResponse;
|
|
1167
|
+
} | {
|
|
1168
|
+
status: 422;
|
|
1169
|
+
} | {
|
|
1170
|
+
status: 500;
|
|
1171
|
+
data: HttpErrorResponse;
|
|
1172
|
+
} | {
|
|
1173
|
+
status: 503;
|
|
1174
|
+
data: HttpErrorResponse;
|
|
1175
|
+
}>(`/v1/repos/${encodeURIComponent(repositoryId)}`, {
|
|
1176
|
+
...opts,
|
|
1177
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1178
|
+
authorization
|
|
1179
|
+
})
|
|
1180
|
+
}));
|
|
1181
|
+
}
|
|
1182
|
+
/**
|
|
1183
|
+
* Delete Repository Service
|
|
1184
|
+
*/
|
|
1185
|
+
export function deleteRepositoryServiceV1ReposRepositoryIdDelete({ repositoryId, authorization }: {
|
|
1186
|
+
repositoryId: string;
|
|
1187
|
+
authorization: string;
|
|
1188
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1189
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1190
|
+
status: 200;
|
|
1191
|
+
data: any;
|
|
1192
|
+
} | {
|
|
1193
|
+
status: 400;
|
|
1194
|
+
data: HttpErrorResponse;
|
|
1195
|
+
} | {
|
|
1196
|
+
status: 401;
|
|
1197
|
+
data: HttpErrorResponse;
|
|
1198
|
+
} | {
|
|
1199
|
+
status: 404;
|
|
1200
|
+
data: HttpErrorResponse;
|
|
1201
|
+
} | {
|
|
1202
|
+
status: 422;
|
|
1203
|
+
} | {
|
|
1204
|
+
status: 500;
|
|
1205
|
+
data: HttpErrorResponse;
|
|
1206
|
+
} | {
|
|
1207
|
+
status: 503;
|
|
1208
|
+
data: HttpErrorResponse;
|
|
1209
|
+
}>(`/v1/repos/${encodeURIComponent(repositoryId)}`, {
|
|
1210
|
+
...opts,
|
|
1211
|
+
method: "DELETE",
|
|
1212
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1213
|
+
authorization
|
|
1214
|
+
})
|
|
1215
|
+
}));
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* Update Repository Service
|
|
1219
|
+
*/
|
|
1220
|
+
export function updateRepositoryServiceV1ReposRepositoryIdPut({ repositoryId, authorization, putRepositoryRequest }: {
|
|
1221
|
+
repositoryId: string;
|
|
1222
|
+
authorization: string;
|
|
1223
|
+
putRepositoryRequest: PutRepositoryRequest;
|
|
1224
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
1225
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
1226
|
+
status: 200;
|
|
1227
|
+
data: any;
|
|
1228
|
+
} | {
|
|
1229
|
+
status: 400;
|
|
1230
|
+
data: HttpErrorResponse;
|
|
1231
|
+
} | {
|
|
1232
|
+
status: 401;
|
|
1233
|
+
data: HttpErrorResponse;
|
|
1234
|
+
} | {
|
|
1235
|
+
status: 404;
|
|
1236
|
+
data: HttpErrorResponse;
|
|
1237
|
+
} | {
|
|
1238
|
+
status: 422;
|
|
1239
|
+
} | {
|
|
1240
|
+
status: 500;
|
|
1241
|
+
data: HttpErrorResponse;
|
|
1242
|
+
} | {
|
|
1243
|
+
status: 503;
|
|
1244
|
+
data: HttpErrorResponse;
|
|
1245
|
+
}>(`/v1/repos/${encodeURIComponent(repositoryId)}`, oazapfts.json({
|
|
1246
|
+
...opts,
|
|
1247
|
+
method: "PUT",
|
|
1248
|
+
body: putRepositoryRequest,
|
|
1249
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
1250
|
+
authorization
|
|
1251
|
+
})
|
|
1252
|
+
})));
|
|
1253
|
+
}
|
package/src/api/insights.ts
CHANGED
|
@@ -8,11 +8,11 @@ import * as Oazapfts from "@oazapfts/runtime";
|
|
|
8
8
|
import * as QS from "@oazapfts/runtime/query";
|
|
9
9
|
export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
|
|
10
10
|
headers: {},
|
|
11
|
-
baseUrl: "https://insights-insights-api.
|
|
11
|
+
baseUrl: "https://insights-insights-api.stg.stackspot.com",
|
|
12
12
|
};
|
|
13
13
|
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
14
|
export const servers = {
|
|
15
|
-
generatedServerUrl: "https://insights-insights-api.
|
|
15
|
+
generatedServerUrl: "https://insights-insights-api.stg.stackspot.com"
|
|
16
16
|
};
|
|
17
17
|
export type NewPanelRequest = {
|
|
18
18
|
panelType: string;
|
|
@@ -156,11 +156,12 @@ export function save1({ newDatasetRequest }: {
|
|
|
156
156
|
/**
|
|
157
157
|
* Download Studio Data
|
|
158
158
|
*/
|
|
159
|
-
export function downloadStudioData({ accountSlug, studioSlug, startDate, endDate, stackspotCustomerIp }: {
|
|
159
|
+
export function downloadStudioData({ accountSlug, studioSlug, startDate, endDate, dataset, stackspotCustomerIp }: {
|
|
160
160
|
accountSlug: string;
|
|
161
161
|
studioSlug: string;
|
|
162
162
|
startDate: string;
|
|
163
163
|
endDate: string;
|
|
164
|
+
dataset: string;
|
|
164
165
|
stackspotCustomerIp?: string;
|
|
165
166
|
}, opts?: Oazapfts.RequestOpts) {
|
|
166
167
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
@@ -174,7 +175,8 @@ export function downloadStudioData({ accountSlug, studioSlug, startDate, endDate
|
|
|
174
175
|
data: ErrorResponse;
|
|
175
176
|
}>(`/v1/assets/account/${encodeURIComponent(accountSlug)}/studio/${encodeURIComponent(studioSlug)}/csv${QS.query(QS.explode({
|
|
176
177
|
startDate,
|
|
177
|
-
endDate
|
|
178
|
+
endDate,
|
|
179
|
+
dataset
|
|
178
180
|
}))}`, {
|
|
179
181
|
...opts,
|
|
180
182
|
method: "POST",
|
|
@@ -212,10 +214,11 @@ export function streamingAccountData({ accountSlug, startDate, endDate, dataset
|
|
|
212
214
|
/**
|
|
213
215
|
* Download Account Data
|
|
214
216
|
*/
|
|
215
|
-
export function downloadAccountData({ accountSlug, startDate, endDate, stackspotCustomerIp }: {
|
|
217
|
+
export function downloadAccountData({ accountSlug, startDate, endDate, dataset, stackspotCustomerIp }: {
|
|
216
218
|
accountSlug: string;
|
|
217
219
|
startDate: string;
|
|
218
220
|
endDate: string;
|
|
221
|
+
dataset: string;
|
|
219
222
|
stackspotCustomerIp?: string;
|
|
220
223
|
}, opts?: Oazapfts.RequestOpts) {
|
|
221
224
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
@@ -229,7 +232,8 @@ export function downloadAccountData({ accountSlug, startDate, endDate, stackspot
|
|
|
229
232
|
data: ErrorResponse;
|
|
230
233
|
}>(`/v1/assets/account/${encodeURIComponent(accountSlug)}/csv${QS.query(QS.explode({
|
|
231
234
|
startDate,
|
|
232
|
-
endDate
|
|
235
|
+
endDate,
|
|
236
|
+
dataset
|
|
233
237
|
}))}`, {
|
|
234
238
|
...opts,
|
|
235
239
|
method: "POST",
|
|
@@ -238,6 +242,36 @@ export function downloadAccountData({ accountSlug, startDate, endDate, stackspot
|
|
|
238
242
|
})
|
|
239
243
|
}));
|
|
240
244
|
}
|
|
245
|
+
/**
|
|
246
|
+
* Get Dashboard Account
|
|
247
|
+
*/
|
|
248
|
+
export function getDashboardAccount({ accountSlug, startDate, endDate, panels, stackspotCustomerIp }: {
|
|
249
|
+
accountSlug: string;
|
|
250
|
+
startDate?: string;
|
|
251
|
+
endDate?: string;
|
|
252
|
+
panels?: string[];
|
|
253
|
+
stackspotCustomerIp?: string;
|
|
254
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
255
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
256
|
+
status: 200;
|
|
257
|
+
data: DashboardReadResponse;
|
|
258
|
+
} | {
|
|
259
|
+
status: 403;
|
|
260
|
+
data: ErrorResponse;
|
|
261
|
+
} | {
|
|
262
|
+
status: 500;
|
|
263
|
+
data: ErrorResponse;
|
|
264
|
+
}>(`/v1/dashboards/account/${encodeURIComponent(accountSlug)}${QS.query(QS.explode({
|
|
265
|
+
startDate,
|
|
266
|
+
endDate,
|
|
267
|
+
panels
|
|
268
|
+
}))}`, {
|
|
269
|
+
...opts,
|
|
270
|
+
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
271
|
+
"stackspot-customer-ip": stackspotCustomerIp
|
|
272
|
+
})
|
|
273
|
+
}));
|
|
274
|
+
}
|
|
241
275
|
/**
|
|
242
276
|
* Get Dashboard Studio
|
|
243
277
|
*/
|
package/src/client/agent.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpError } from '@oazapfts/runtime'
|
|
2
|
-
import { defaults, deleteV1AgentByAgentIdFavorite, getV1AgentByAgentId, getV1Agents, getV1PublicAgentByAgentId, getV1PublicAgents, postV1AgentByAgentIdFavorite } from '../api/agent'
|
|
2
|
+
import { defaults, deleteV1AgentByAgentIdFavorite, getV1AgentByAgentId, getV1Agents, getV1PublicAgentByAgentId, getV1PublicAgents, postV1AgentByAgentIdFavorite, postV1AgentsTrial } from '../api/agent'
|
|
3
3
|
import apis from '../apis.json'
|
|
4
4
|
import { StackspotAPIError } from '../error/StackspotAPIError'
|
|
5
5
|
import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
@@ -57,6 +57,11 @@ class AgentClient extends ReactQueryNetworkClient {
|
|
|
57
57
|
* Removes the resource of type Agent from the list of favorites.
|
|
58
58
|
*/
|
|
59
59
|
removeFavoriteAgent = this.mutation(deleteV1AgentByAgentIdFavorite)
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Create a test agent if it does not exist
|
|
63
|
+
*/
|
|
64
|
+
createTrialAgents = this.mutation(postV1AgentsTrial)
|
|
60
65
|
}
|
|
61
66
|
|
|
62
67
|
export const agentClient = new AgentClient()
|