@stack-spot/portal-network 0.184.0 → 0.185.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.
Files changed (142) hide show
  1. package/CHANGELOG.md +2444 -2412
  2. package/dist/api/account.js +1 -1
  3. package/dist/api/agent-tools.js +1 -1
  4. package/dist/api/agent.js +1 -1
  5. package/dist/api/ai.js +1 -1
  6. package/dist/api/apiManagement.js +1 -1
  7. package/dist/api/apiRuntime.js +1 -1
  8. package/dist/api/cloudAccount.js +1 -1
  9. package/dist/api/cloudPlatform.js +1 -1
  10. package/dist/api/cloudPlatformHorizon.js +1 -1
  11. package/dist/api/cloudRuntimes.js +1 -1
  12. package/dist/api/cloudServices.js +1 -1
  13. package/dist/api/codeShift.d.ts +63 -4
  14. package/dist/api/codeShift.d.ts.map +1 -1
  15. package/dist/api/codeShift.js +14 -1
  16. package/dist/api/codeShift.js.map +1 -1
  17. package/dist/api/content.js +1 -1
  18. package/dist/api/dataIntegration.js +1 -1
  19. package/dist/api/discover.js +1 -1
  20. package/dist/api/genAiInference.js +1 -1
  21. package/dist/api/insights.js +1 -1
  22. package/dist/api/notification.js +1 -1
  23. package/dist/api/secrets.js +1 -1
  24. package/dist/api/serviceCatalog.js +1 -1
  25. package/dist/api/workspace-ai.js +1 -1
  26. package/dist/api/workspace.js +1 -1
  27. package/dist/api/workspaceManager.js +1 -1
  28. package/dist/api/workspaceSearchEngine.js +1 -1
  29. package/dist/client/ai.d.ts.map +1 -1
  30. package/dist/client/ai.js +84 -14
  31. package/dist/client/ai.js.map +1 -1
  32. package/dist/client/code-shift.d.ts +30 -0
  33. package/dist/client/code-shift.d.ts.map +1 -1
  34. package/dist/client/code-shift.js +37 -1
  35. package/dist/client/code-shift.js.map +1 -1
  36. package/dist/client/types.d.ts +26 -6
  37. package/dist/client/types.d.ts.map +1 -1
  38. package/package.json +7 -7
  39. package/readme.md +1 -1
  40. package/scripts/generate-apis.ts +134 -134
  41. package/src/api/account.ts +8368 -8367
  42. package/src/api/agent-tools.ts +2172 -2169
  43. package/src/api/agent.ts +1085 -1083
  44. package/src/api/ai.ts +3388 -3388
  45. package/src/api/apiManagement.ts +570 -570
  46. package/src/api/apiRuntime.ts +2103 -2103
  47. package/src/api/cloudAccount.ts +1239 -1239
  48. package/src/api/cloudPlatform.ts +927 -927
  49. package/src/api/cloudPlatformHorizon.ts +2655 -2655
  50. package/src/api/cloudRuntimes.ts +2043 -2043
  51. package/src/api/cloudServices.ts +1445 -1445
  52. package/src/api/codeShift.ts +3567 -3481
  53. package/src/api/content.ts +9785 -9785
  54. package/src/api/dataIntegration.ts +1657 -1657
  55. package/src/api/discover.ts +435 -435
  56. package/src/api/eventBus.ts +171 -171
  57. package/src/api/genAiInference.ts +603 -603
  58. package/src/api/insights.ts +310 -310
  59. package/src/api/notification.ts +336 -334
  60. package/src/api/secrets.ts +342 -342
  61. package/src/api/serviceCatalog.ts +2908 -2908
  62. package/src/api/workflows.ts +1669 -1669
  63. package/src/api/workspace-ai.ts +677 -677
  64. package/src/api/workspace.ts +5889 -5889
  65. package/src/api/workspaceManager.ts +2951 -2951
  66. package/src/api/workspaceSearchEngine.ts +153 -153
  67. package/src/api-addresses.ts +120 -120
  68. package/src/apis-itau.json +225 -225
  69. package/src/apis.json +225 -225
  70. package/src/client/account.ts +902 -902
  71. package/src/client/agent-tools.ts +210 -210
  72. package/src/client/agent.ts +81 -81
  73. package/src/client/ai.ts +469 -395
  74. package/src/client/api-management.ts +40 -40
  75. package/src/client/cloud-account.ts +70 -70
  76. package/src/client/cloud-platform-horizon.ts +113 -113
  77. package/src/client/cloud-platform.ts +163 -163
  78. package/src/client/cloud-runtimes.ts +129 -129
  79. package/src/client/cloud-services.ts +94 -94
  80. package/src/client/code-shift.ts +371 -349
  81. package/src/client/content.ts +538 -538
  82. package/src/client/data-integration.ts +191 -191
  83. package/src/client/discover.ts +89 -89
  84. package/src/client/event-bus.ts +84 -84
  85. package/src/client/gen-ai-inference.ts +65 -65
  86. package/src/client/insights.ts +28 -28
  87. package/src/client/notification.ts +32 -32
  88. package/src/client/runtime-manager.ts +76 -76
  89. package/src/client/secrets.ts +60 -60
  90. package/src/client/types.ts +398 -377
  91. package/src/client/workflow.ts +83 -83
  92. package/src/client/workspace-ai.ts +191 -191
  93. package/src/client/workspace-manager.ts +564 -564
  94. package/src/client/workspace-search.ts +39 -39
  95. package/src/client/workspace.ts +480 -480
  96. package/src/error/DefaultAPIError.ts +151 -151
  97. package/src/error/FileUploadError.ts +18 -18
  98. package/src/error/IgnoredErrorCodes.ts +3 -3
  99. package/src/error/StackspotAPIError.ts +101 -101
  100. package/src/error/StreamCanceledError.ts +10 -10
  101. package/src/error/StreamError.ts +7 -7
  102. package/src/error/StreamJsonError.ts +10 -10
  103. package/src/error/dictionary/account.ts +58 -58
  104. package/src/error/dictionary/action-details.ts +20 -20
  105. package/src/error/dictionary/action.ts +211 -211
  106. package/src/error/dictionary/agent-tools.ts +75 -75
  107. package/src/error/dictionary/ai-inference.ts +28 -28
  108. package/src/error/dictionary/base.ts +22 -22
  109. package/src/error/dictionary/cloud-platform.ts +82 -82
  110. package/src/error/dictionary/cnt-fields.ts +14 -14
  111. package/src/error/dictionary/cnt.ts +103 -103
  112. package/src/error/dictionary/code-shift.ts +12 -12
  113. package/src/error/dictionary/rte.ts +24 -24
  114. package/src/error/dictionary/rtm.ts +10 -10
  115. package/src/error/dictionary/secrets.ts +14 -14
  116. package/src/error/dictionary/workspace-ai.ts +10 -10
  117. package/src/error/dictionary/workspace-details.ts +15 -15
  118. package/src/error/dictionary/workspace-fields.ts +10 -10
  119. package/src/error/dictionary/workspace.ts +209 -209
  120. package/src/error/types.ts +21 -21
  121. package/src/index.ts +43 -43
  122. package/src/network/AutoInfiniteQuery.ts +115 -115
  123. package/src/network/AutoMutation.ts +27 -27
  124. package/src/network/AutoOperation.ts +73 -73
  125. package/src/network/AutoQuery.ts +75 -75
  126. package/src/network/ManualInfiniteQuery.ts +95 -95
  127. package/src/network/ManualMutation.ts +40 -40
  128. package/src/network/ManualOperation.ts +52 -52
  129. package/src/network/ManualQuery.ts +82 -82
  130. package/src/network/NetworkClient.ts +167 -167
  131. package/src/network/ReactQueryNetworkClient.ts +312 -312
  132. package/src/network/react-query-client.ts +14 -14
  133. package/src/network/types.ts +294 -294
  134. package/src/types.ts +1 -1
  135. package/src/utils/StreamedArray.tsx +146 -146
  136. package/src/utils/StreamedJson.tsx +166 -166
  137. package/src/utils/remove-authorization-param.ts +6 -6
  138. package/src/utils/string.ts +19 -19
  139. package/src/utils/use-extended-list.ts +80 -80
  140. package/src/utils/use-streamed-array.ts +17 -17
  141. package/tsconfig.build.json +4 -4
  142. package/tsconfig.json +10 -10
@@ -1,349 +1,371 @@
1
-
2
- import { HttpError } from '@oazapfts/runtime'
3
- import {
4
- analyticsRepositoryLastReportStatusDownloadV1AnalyticsRepositoriesLastReportStatusDownloadGet,
5
- analyticsRepositoryLastReportStatusV1AnalyticsRepositoriesLastReportStatusGet,
6
- analyticsRepositoryUsageDownloadV1AnalyticsRepositoriesUsageDownloadGet,
7
- analyticsRepositoryUsageV1AnalyticsRepositoriesUsageGet,
8
- analyticsProgramGroupsLastReportStatusDownloadV1AnalyticsProgramGroupsLastReportStatusDownloadGet,
9
- analyticsProgramGroupsLastReportStatusV1AnalyticsProgramGroupsLastReportStatusGet,
10
- analyticsProgramGroupsUsageDownloadV1AnalyticsProgramGroupsUsageDownloadGet,
11
- analyticsProgramGroupsUsageV1AnalyticsProgramGroupsUsageGet,
12
- analyticsUserUsageDownloadV1AnalyticsUsersUsageDownloadGet,
13
- analyticsUserUsageV1AnalyticsUsersUsageGet,
14
- checkRoleRouteV1RolesRoleGet,
15
- createAccountSettingsV1SettingsPut,
16
- createIntegrationServiceV1IntegrationsPost,
17
- createModuleServiceV1ModulesPost,
18
- createProgramGroupServiceV1ProgramGroupsPost,
19
- createReposBatchServiceV1ReposBatchPost,
20
- createRepositoryServiceV1ReposPost,
21
- defaults,
22
- deleteIntegrationServiceV1IntegrationsIntegrationIdDelete,
23
- deleteProgramGroupServiceV1ProgramGroupsProgramGroupIdDelete,
24
- deleteRepositoryServiceV1ReposRepositoryIdDelete,
25
- dispatchModuleServiceV1ModulesDispatchesPost,
26
- downloadReportV1ReportsReportIdDownloadGet,
27
- downloadSearchReposScmServiceV1ReposSearchScmSearchRepoIdDownloadGet,
28
- generalReportSuccessAndErrorsV1AnalyticsReportsGeneralSuccessAndErrorsGet,
29
- getAccountSettingsV1SettingsGet,
30
- getIntegrationByIdServiceV1IntegrationsIntegrationIdGet,
31
- getProgramGroupByIdServiceV1ProgramGroupsProgramGroupIdGet,
32
- getReportPullRequestContentV1ReportsReportIdPullRequestGet,
33
- getReportV1ReportsReportIdGet,
34
- getRepositoryByIdServiceV1ReposRepositoryIdGet,
35
- getStatusSearchReposScmServiceV1ReposSearchScmSearchRepoIdStatusGet,
36
- listBranchesServiceV1ReposBranchesGet,
37
- listIntegrationServiceV1IntegrationsGet,
38
- listModulesServiceV1ModulesGet,
39
- listProgramGroupReportServiceV1ProgramGroupsProgramGroupIdReportsGet,
40
- listProgramGroupServiceV1ProgramGroupsGet,
41
- listRepositoryReportV1ReposRepositoryIdReportsGet,
42
- listRepositoryServiceV1ReposGet,
43
- listTagsServiceV1TagsGet,
44
- searchReposScmServiceV1ReposSearchScmGet,
45
- updateIntegrationServiceV1IntegrationsIntegrationIdPut,
46
- updateProgramGroupComponentsServiceV1ProgramGroupsProgramGroupIdComponentsPut,
47
- updateProgramGroupServiceV1ProgramGroupsProgramGroupIdPut,
48
- updateRepositoryServiceV1ReposRepositoryIdPut,
49
- validateScmUrlServiceV1ReposValidateScmUrlPost,
50
- listUserServiceV1UsersGet,
51
- analyticsProgramGroupsDetailsV1AnalyticsProgramGroupsDetailsGet,
52
- analyticsProgramGroupsDetailsDownloadV1AnalyticsProgramGroupsDetailsDownloadGet,
53
- getModuleInputsV1ModulesModuleIdInputsGet,
54
- analyticsRepositoryDetailedReportDownloadV1AnalyticsRepositoriesDetailsDownloadGet,
55
- analyticsRepositoryDetailedReportV1AnalyticsRepositoriesDetailsGet,
56
- listRepositoryDownloadServiceV1ReposDownloadGet,
57
- listProgramGroupDownloadServiceV1ProgramGroupsDownloadGet,
58
- getModuleV1ModulesModuleIdGet,
59
- analyticsProgramGroupsTargetDetailsV1AnalyticsProgramGroupsTargetDetailsGet,
60
- analyticsProgramGroupsTargetDetailsDownloadV1AnalyticsProgramGroupsTargetDetailsDownloadGet,
61
- analyticsRepositoryTargetDetailsV1AnalyticsRepositoriesTargetDetailsGet,
62
- analyticsRepositoryTargetDetailsDownloadV1AnalyticsRepositoriesTargetDetailsDownloadGet,
63
- } from '../api/codeShift'
64
- import { DefaultAPIError } from '../error/DefaultAPIError'
65
- import { codeShiftDictionary } from '../error/dictionary/code-shift'
66
- import { StackspotAPIError } from '../error/StackspotAPIError'
67
- import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
68
- import { removeAuthorizationParam } from '../utils/remove-authorization-param'
69
- import { getApiAddresses } from '../api-addresses'
70
-
71
- class CodeShift extends ReactQueryNetworkClient {
72
- constructor() {
73
- super(getApiAddresses().codeShift.url, defaults)
74
- }
75
-
76
- protected buildStackSpotError(error: HttpError): StackspotAPIError {
77
- return new DefaultAPIError(error.data, error.status, codeShiftDictionary, error.headers)
78
- }
79
-
80
- /**
81
- * Creates a repository.
82
- */
83
- createRepository = this.mutation(removeAuthorizationParam(createRepositoryServiceV1ReposPost))
84
- /**
85
- * Creates repositories in batch.
86
- */
87
- createRepositoriesBatch = this.mutation(removeAuthorizationParam(createReposBatchServiceV1ReposBatchPost))
88
- /**
89
- * Gets list of repositories.
90
- */
91
- repositories = this.query(removeAuthorizationParam(listRepositoryServiceV1ReposGet))
92
- /**
93
- * Gets a repository
94
- */
95
- repository = this.query(removeAuthorizationParam(getRepositoryByIdServiceV1ReposRepositoryIdGet))
96
- /**
97
- * Deletes a repository
98
- */
99
- deleteRepository = this.mutation(removeAuthorizationParam(deleteRepositoryServiceV1ReposRepositoryIdDelete))
100
- /**
101
- * Updates a repository
102
- */
103
- updateRepository = this.mutation(removeAuthorizationParam(updateRepositoryServiceV1ReposRepositoryIdPut))
104
- /**
105
- * List Repository Download Service
106
- */
107
- repositoryDownload = this.query(removeAuthorizationParam(listRepositoryDownloadServiceV1ReposDownloadGet))
108
- /**
109
- * Get a report for a pull request by id.
110
- */
111
- getReportPullRequestContent = this.query(removeAuthorizationParam(getReportPullRequestContentV1ReportsReportIdPullRequestGet))
112
- /**
113
- * Gets modules.
114
- */
115
- modules = this.query(removeAuthorizationParam(listModulesServiceV1ModulesGet))
116
- /**
117
- * Gets module by id.
118
- */
119
- module = this.query(removeAuthorizationParam(getModuleV1ModulesModuleIdGet))
120
- /**
121
- * Gets module inputs.
122
- */
123
- modulesInputs = this.query(removeAuthorizationParam(getModuleInputsV1ModulesModuleIdInputsGet))
124
- /**
125
- * Creates a module.
126
- */
127
- createModule = this.mutation(removeAuthorizationParam(createModuleServiceV1ModulesPost))
128
- /**
129
- * Generates a report.
130
- */
131
- generateReport = this.mutation(removeAuthorizationParam(dispatchModuleServiceV1ModulesDispatchesPost))
132
- /**
133
- * Gets repository reports.
134
- */
135
- repositoryReports = this.query(removeAuthorizationParam(listRepositoryReportV1ReposRepositoryIdReportsGet))
136
- /**
137
- * Gets report.
138
- */
139
- report = this.query(removeAuthorizationParam(getReportV1ReportsReportIdGet))
140
- /**
141
- * Downloads a report as a csv file.
142
- */
143
- downloadReport = this.query(removeAuthorizationParam(downloadReportV1ReportsReportIdDownloadGet))
144
- /**
145
- * Gets code shift settings
146
- */
147
- settings = this.query(removeAuthorizationParam(getAccountSettingsV1SettingsGet))
148
- /**
149
- * Updates code shift settings
150
- */
151
- updateSettings = this.mutation(removeAuthorizationParam(createAccountSettingsV1SettingsPut))
152
- /**
153
- * Starts a search repository
154
- */
155
- searchRepository = this.query(removeAuthorizationParam(searchReposScmServiceV1ReposSearchScmGet))
156
- /**
157
- * Gets the status for a search repository
158
- */
159
- searchRepositoryStatus = this.query(removeAuthorizationParam(getStatusSearchReposScmServiceV1ReposSearchScmSearchRepoIdStatusGet))
160
- /**
161
- * Downloads file with found repositories
162
- */
163
- downloadSearchRepository = this.mutation(removeAuthorizationParam(downloadSearchReposScmServiceV1ReposSearchScmSearchRepoIdDownloadGet))
164
- /**
165
- * Validate if the user has permission.
166
- * We do not use opa in this api, so this is the fn needed to check permissions.
167
- */
168
- validateRolePermissions = this.query(removeAuthorizationParam(checkRoleRouteV1RolesRoleGet))
169
- /**
170
- * Creates an integration
171
- */
172
- createIntegration = this.mutation(removeAuthorizationParam(createIntegrationServiceV1IntegrationsPost))
173
- /**
174
- * Lists integrations
175
- */
176
- listIntegration = this.query(removeAuthorizationParam(listIntegrationServiceV1IntegrationsGet))
177
- /**
178
- * Gets an integration by id
179
- */
180
- getIntegrationById = this.query(removeAuthorizationParam(getIntegrationByIdServiceV1IntegrationsIntegrationIdGet))
181
- /**
182
- * Updates an integration
183
- */
184
- updateIntegration = this.mutation(removeAuthorizationParam(updateIntegrationServiceV1IntegrationsIntegrationIdPut))
185
- /**
186
- * Deletes an integration
187
- */
188
- deleteIntegration = this.mutation(removeAuthorizationParam(deleteIntegrationServiceV1IntegrationsIntegrationIdDelete))
189
- /**
190
- * Creates a program group.
191
- */
192
- createProgramGroup = this.mutation(removeAuthorizationParam(createProgramGroupServiceV1ProgramGroupsPost))
193
- /**
194
- * Gets list of program groups.
195
- */
196
- listProgramGroups = this.query(removeAuthorizationParam(listProgramGroupServiceV1ProgramGroupsGet))
197
- /**
198
- * Gets a program group by id.
199
- */
200
- getProgramGroupById = this.query(removeAuthorizationParam(getProgramGroupByIdServiceV1ProgramGroupsProgramGroupIdGet))
201
- /**
202
- * List Program Group Report Service
203
- */
204
- listProgramGroupReport = this.query(removeAuthorizationParam(listProgramGroupReportServiceV1ProgramGroupsProgramGroupIdReportsGet))
205
- /**
206
- * Updates a program group.
207
- */
208
- updateProgramGroup = this.mutation(removeAuthorizationParam(updateProgramGroupServiceV1ProgramGroupsProgramGroupIdPut))
209
- /**
210
- * Updates a program group components.
211
- */
212
- updateProgramGroupComponents = this.mutation(
213
- removeAuthorizationParam(updateProgramGroupComponentsServiceV1ProgramGroupsProgramGroupIdComponentsPut),
214
- )
215
- /**
216
- * Deletes a program group.
217
- */
218
- deleteProgramGroup = this.mutation(removeAuthorizationParam(deleteProgramGroupServiceV1ProgramGroupsProgramGroupIdDelete))
219
- /**
220
- * List Program Group Download Service
221
- */
222
- programGroupDownload = this.query(removeAuthorizationParam(listProgramGroupDownloadServiceV1ProgramGroupsDownloadGet))
223
- /**
224
- * Gets list of tags.
225
- */
226
- tags = this.query(removeAuthorizationParam(listTagsServiceV1TagsGet))
227
- /**
228
- * Validates a SCM URL.
229
- */
230
- validateSCMUrl = this.mutation(removeAuthorizationParam(validateScmUrlServiceV1ReposValidateScmUrlPost))
231
- /**
232
- * Get Branches for a Repository
233
- */
234
- getBranches = this.query(removeAuthorizationParam(listBranchesServiceV1ReposBranchesGet))
235
- /**
236
- * General Report Success And Errors
237
- */
238
- generalReportSuccessAndErrors = this.query(
239
- removeAuthorizationParam(generalReportSuccessAndErrorsV1AnalyticsReportsGeneralSuccessAndErrorsGet),
240
- )
241
- /**
242
- * Analytics Repository Last Report Status
243
- */
244
- analyticsRepositoryLastReportStatus = this.query(
245
- removeAuthorizationParam(analyticsRepositoryLastReportStatusV1AnalyticsRepositoriesLastReportStatusGet),
246
- )
247
- /**
248
- * Analytics Repository Last Report Status Download
249
- */
250
- analyticsRepositoryLastReportStatusDownload = this.query(
251
- removeAuthorizationParam(analyticsRepositoryLastReportStatusDownloadV1AnalyticsRepositoriesLastReportStatusDownloadGet),
252
- )
253
- /**
254
- * Analytics Repository Usage
255
- */
256
- analyticsRepositoryUsage = this.query(removeAuthorizationParam(analyticsRepositoryUsageV1AnalyticsRepositoriesUsageGet))
257
- /**
258
- * Analytics Program Groups Last Report Status
259
- */
260
- analyticsProgramGroupsLastReportStatus = this.query(
261
- removeAuthorizationParam(analyticsProgramGroupsLastReportStatusV1AnalyticsProgramGroupsLastReportStatusGet),
262
- )
263
- /**
264
- * Analytics Program Groups Last Report Status Download
265
- */
266
- analyticsProgramGroupsLastReportStatusDownload = this.query(
267
- removeAuthorizationParam(analyticsProgramGroupsLastReportStatusDownloadV1AnalyticsProgramGroupsLastReportStatusDownloadGet),
268
- )
269
- /**
270
- * Analytics User Usage
271
- */
272
- analyticsUserUsage = this.query(removeAuthorizationParam(analyticsUserUsageV1AnalyticsUsersUsageGet))
273
- /**
274
- * Analytics User Usage Download
275
- */
276
- analyticsUserUsageDownload = this.query(removeAuthorizationParam(analyticsUserUsageDownloadV1AnalyticsUsersUsageDownloadGet))
277
- /**
278
- * Analytics Repository Usage Download
279
- */
280
- analyticsRepositoryUsageDownload = this.query(
281
- removeAuthorizationParam(analyticsRepositoryUsageDownloadV1AnalyticsRepositoriesUsageDownloadGet),
282
- )
283
- /**
284
- * Analytics Program Groups Usage
285
- */
286
- analyticsProgramGroupsUsage = this.query(removeAuthorizationParam(analyticsProgramGroupsUsageV1AnalyticsProgramGroupsUsageGet))
287
- /**
288
- * Analytics Program Groups Usage Download
289
- */
290
- analyticsProgramGroupsUsageDownload = this.query(
291
- removeAuthorizationParam(analyticsProgramGroupsUsageDownloadV1AnalyticsProgramGroupsUsageDownloadGet),
292
- )
293
- /**
294
- * Gets users from the Code Shift service.
295
- */
296
- getUsersService = this.query(
297
- removeAuthorizationParam(listUserServiceV1UsersGet),
298
- )
299
- /**
300
- * Analytics Program Groups Details
301
- */
302
- analyticsProgramGroupsDetails = this.query(
303
- removeAuthorizationParam(analyticsProgramGroupsDetailsV1AnalyticsProgramGroupsDetailsGet),
304
- )
305
- /**
306
- * Analytics Program Groups Details Download
307
- */
308
- analyticsProgramGroupsDetailsDownload = this.query(
309
- removeAuthorizationParam(analyticsProgramGroupsDetailsDownloadV1AnalyticsProgramGroupsDetailsDownloadGet),
310
- )
311
- /**
312
- * Analytics Program Groups Details
313
- */
314
- analyticsRepositoryDetails = this.query(
315
- removeAuthorizationParam(analyticsRepositoryDetailedReportV1AnalyticsRepositoriesDetailsGet),
316
- )
317
- /**
318
- * Analytics Program Groups Details Download
319
- */
320
- analyticsRepositoryDetailsDownload = this.query(
321
- removeAuthorizationParam(analyticsRepositoryDetailedReportDownloadV1AnalyticsRepositoriesDetailsDownloadGet),
322
- )
323
- /**
324
- * Analytics Program Groups Target Details
325
- */
326
- analyticsProgramGroupsTargetDetails = this.query(
327
- removeAuthorizationParam(analyticsProgramGroupsTargetDetailsV1AnalyticsProgramGroupsTargetDetailsGet),
328
- )
329
- /**
330
- * Analytics Program Groups Target Details Download
331
- */
332
- analyticsProgramGroupsTargetDetailsDownload = this.query(
333
- removeAuthorizationParam(analyticsProgramGroupsTargetDetailsDownloadV1AnalyticsProgramGroupsTargetDetailsDownloadGet),
334
- )
335
- /**
336
- * Analytics Repository Target Details
337
- */
338
- analyticsRepositoryTargetDetails = this.query(
339
- removeAuthorizationParam(analyticsRepositoryTargetDetailsV1AnalyticsRepositoriesTargetDetailsGet),
340
- )
341
- /**
342
- * Analytics Repository Target Details Download
343
- */
344
- analyticsRepositoryTargetDetailsDownload = this.query(
345
- removeAuthorizationParam(analyticsRepositoryTargetDetailsDownloadV1AnalyticsRepositoriesTargetDetailsDownloadGet),
346
- )
347
- }
348
-
349
- export const codeShiftClient = new CodeShift()
1
+
2
+ import { HttpError } from '@oazapfts/runtime'
3
+ import {
4
+ analyticsRepositoryLastReportStatusDownloadV1AnalyticsRepositoriesLastReportStatusDownloadGet,
5
+ analyticsRepositoryLastReportStatusV1AnalyticsRepositoriesLastReportStatusGet,
6
+ analyticsRepositoryUsageDownloadV1AnalyticsRepositoriesUsageDownloadGet,
7
+ analyticsRepositoryUsageV1AnalyticsRepositoriesUsageGet,
8
+ analyticsProgramGroupsLastReportStatusDownloadV1AnalyticsProgramGroupsLastReportStatusDownloadGet,
9
+ analyticsProgramGroupsLastReportStatusV1AnalyticsProgramGroupsLastReportStatusGet,
10
+ analyticsProgramGroupsUsageDownloadV1AnalyticsProgramGroupsUsageDownloadGet,
11
+ analyticsProgramGroupsUsageV1AnalyticsProgramGroupsUsageGet,
12
+ analyticsUserUsageDownloadV1AnalyticsUsersUsageDownloadGet,
13
+ analyticsUserUsageV1AnalyticsUsersUsageGet,
14
+ checkRoleRouteV1RolesRoleGet,
15
+ createAccountSettingsV1SettingsPut,
16
+ createIntegrationServiceV1IntegrationsPost,
17
+ createModuleServiceV1ModulesPost,
18
+ createProgramGroupServiceV1ProgramGroupsPost,
19
+ createReposBatchServiceV1ReposBatchPost,
20
+ createRepositoryServiceV1ReposPost,
21
+ defaults,
22
+ deleteIntegrationServiceV1IntegrationsIntegrationIdDelete,
23
+ deleteProgramGroupServiceV1ProgramGroupsProgramGroupIdDelete,
24
+ deleteRepositoryServiceV1ReposRepositoryIdDelete,
25
+ dispatchModuleServiceV1ModulesDispatchesPost,
26
+ downloadReportV1ReportsReportIdDownloadGet,
27
+ downloadSearchReposScmServiceV1ReposSearchScmSearchRepoIdDownloadGet,
28
+ generalReportSuccessAndErrorsV1AnalyticsReportsGeneralSuccessAndErrorsGet,
29
+ getAccountSettingsV1SettingsGet,
30
+ getIntegrationByIdServiceV1IntegrationsIntegrationIdGet,
31
+ getProgramGroupByIdServiceV1ProgramGroupsProgramGroupIdGet,
32
+ getReportPullRequestContentV1ReportsReportIdPullRequestGet,
33
+ getReportV1ReportsReportIdGet,
34
+ getRepositoryByIdServiceV1ReposRepositoryIdGet,
35
+ getStatusSearchReposScmServiceV1ReposSearchScmSearchRepoIdStatusGet,
36
+ listBranchesServiceV1ReposBranchesGet,
37
+ listIntegrationServiceV1IntegrationsGet,
38
+ listModulesServiceV1ModulesGet,
39
+ listProgramGroupReportServiceV1ProgramGroupsProgramGroupIdReportsGet,
40
+ listProgramGroupServiceV1ProgramGroupsGet,
41
+ listRepositoryReportV1ReposRepositoryIdReportsGet,
42
+ listRepositoryServiceV1ReposGet,
43
+ listTagsServiceV1TagsGet,
44
+ searchReposScmServiceV1ReposSearchScmGet,
45
+ updateIntegrationServiceV1IntegrationsIntegrationIdPut,
46
+ updateProgramGroupComponentsServiceV1ProgramGroupsProgramGroupIdComponentsPut,
47
+ updateProgramGroupServiceV1ProgramGroupsProgramGroupIdPut,
48
+ updateRepositoryServiceV1ReposRepositoryIdPut,
49
+ validateScmUrlServiceV1ReposValidateScmUrlPost,
50
+ listUserServiceV1UsersGet,
51
+ analyticsProgramGroupsDetailsV1AnalyticsProgramGroupsDetailsGet,
52
+ analyticsProgramGroupsDetailsDownloadV1AnalyticsProgramGroupsDetailsDownloadGet,
53
+ getModuleInputsV1ModulesModuleIdInputsGet,
54
+ analyticsRepositoryDetailedReportDownloadV1AnalyticsRepositoriesDetailsDownloadGet,
55
+ analyticsRepositoryDetailedReportV1AnalyticsRepositoriesDetailsGet,
56
+ listRepositoryDownloadServiceV1ReposDownloadGet,
57
+ listProgramGroupDownloadServiceV1ProgramGroupsDownloadGet,
58
+ getModuleV1ModulesModuleIdGet,
59
+ analyticsProgramGroupsTargetDetailsV1AnalyticsProgramGroupsTargetDetailsGet,
60
+ analyticsProgramGroupsTargetDetailsDownloadV1AnalyticsProgramGroupsTargetDetailsDownloadGet,
61
+ putCustomerRatingReportV1ReportsReportIdCustomerRatingPut,
62
+ searchReposScmServiceV2ReposSearchScmPost,
63
+ importReposWithTagsScmServiceV2ReposSearchScmSearchIdPost,
64
+ searchReposScmV2V2ReposSearchScmSearchIdGet,
65
+ analyticsRepositoryTargetDetailsV1AnalyticsRepositoriesTargetDetailsGet,
66
+ analyticsRepositoryTargetDetailsDownloadV1AnalyticsRepositoriesTargetDetailsDownloadGet,
67
+ } from '../api/codeShift'
68
+ import { DefaultAPIError } from '../error/DefaultAPIError'
69
+ import { codeShiftDictionary } from '../error/dictionary/code-shift'
70
+ import { StackspotAPIError } from '../error/StackspotAPIError'
71
+ import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
72
+ import { removeAuthorizationParam } from '../utils/remove-authorization-param'
73
+ import { getApiAddresses } from '../api-addresses'
74
+
75
+ class CodeShift extends ReactQueryNetworkClient {
76
+ constructor() {
77
+ super(getApiAddresses().codeShift.url, defaults)
78
+ }
79
+
80
+ protected buildStackSpotError(error: HttpError): StackspotAPIError {
81
+ return new DefaultAPIError(error.data, error.status, codeShiftDictionary, error.headers)
82
+ }
83
+
84
+ /**
85
+ * Creates a repository.
86
+ */
87
+ createRepository = this.mutation(removeAuthorizationParam(createRepositoryServiceV1ReposPost))
88
+ /**
89
+ * Creates repositories in batch.
90
+ */
91
+ createRepositoriesBatch = this.mutation(removeAuthorizationParam(createReposBatchServiceV1ReposBatchPost))
92
+ /**
93
+ * Gets list of repositories.
94
+ */
95
+ repositories = this.query(removeAuthorizationParam(listRepositoryServiceV1ReposGet))
96
+ /**
97
+ * Gets a repository
98
+ */
99
+ repository = this.query(removeAuthorizationParam(getRepositoryByIdServiceV1ReposRepositoryIdGet))
100
+ /**
101
+ * Deletes a repository
102
+ */
103
+ deleteRepository = this.mutation(removeAuthorizationParam(deleteRepositoryServiceV1ReposRepositoryIdDelete))
104
+ /**
105
+ * Updates a repository
106
+ */
107
+ updateRepository = this.mutation(removeAuthorizationParam(updateRepositoryServiceV1ReposRepositoryIdPut))
108
+ /**
109
+ * List Repository Download Service
110
+ */
111
+ repositoryDownload = this.query(removeAuthorizationParam(listRepositoryDownloadServiceV1ReposDownloadGet))
112
+ /**
113
+ * Get a report for a pull request by id.
114
+ */
115
+ getReportPullRequestContent = this.query(removeAuthorizationParam(getReportPullRequestContentV1ReportsReportIdPullRequestGet))
116
+ /**
117
+ * Gets modules.
118
+ */
119
+ modules = this.query(removeAuthorizationParam(listModulesServiceV1ModulesGet))
120
+ /**
121
+ * Gets module by id.
122
+ */
123
+ module = this.query(removeAuthorizationParam(getModuleV1ModulesModuleIdGet))
124
+ /**
125
+ * Gets module inputs.
126
+ */
127
+ modulesInputs = this.query(removeAuthorizationParam(getModuleInputsV1ModulesModuleIdInputsGet))
128
+ /**
129
+ * Creates a module.
130
+ */
131
+ createModule = this.mutation(removeAuthorizationParam(createModuleServiceV1ModulesPost))
132
+ /**
133
+ * Generates a report.
134
+ */
135
+ generateReport = this.mutation(removeAuthorizationParam(dispatchModuleServiceV1ModulesDispatchesPost))
136
+ /**
137
+ * Gets repository reports.
138
+ */
139
+ repositoryReports = this.query(removeAuthorizationParam(listRepositoryReportV1ReposRepositoryIdReportsGet))
140
+ /**
141
+ * Gets report.
142
+ */
143
+ report = this.query(removeAuthorizationParam(getReportV1ReportsReportIdGet))
144
+ /**
145
+ * Downloads a report as a csv file.
146
+ */
147
+ downloadReport = this.query(removeAuthorizationParam(downloadReportV1ReportsReportIdDownloadGet))
148
+ /**
149
+ * Put Customer Rating Report
150
+ */
151
+ updateReportRating = this.mutation(
152
+ removeAuthorizationParam(putCustomerRatingReportV1ReportsReportIdCustomerRatingPut),
153
+ )
154
+ /**
155
+ * Gets code shift settings
156
+ */
157
+ settings = this.query(removeAuthorizationParam(getAccountSettingsV1SettingsGet))
158
+ /**
159
+ * Updates code shift settings
160
+ */
161
+ updateSettings = this.mutation(removeAuthorizationParam(createAccountSettingsV1SettingsPut))
162
+ /**
163
+ * Starts a search repository
164
+ */
165
+ searchRepository = this.query(removeAuthorizationParam(searchReposScmServiceV1ReposSearchScmGet))
166
+ /**
167
+ * Gets the status for a search repository
168
+ */
169
+ searchRepositoryStatus = this.query(removeAuthorizationParam(getStatusSearchReposScmServiceV1ReposSearchScmSearchRepoIdStatusGet))
170
+ /**
171
+ * Downloads file with found repositories
172
+ */
173
+ downloadSearchRepository = this.mutation(removeAuthorizationParam(downloadSearchReposScmServiceV1ReposSearchScmSearchRepoIdDownloadGet))
174
+ /**
175
+ * Searches for repositories (v2)
176
+ */
177
+ searchRepositoryV2 = this.mutation(removeAuthorizationParam(searchReposScmServiceV2ReposSearchScmPost))
178
+ /**
179
+ * Imports repositories (v2)
180
+ */
181
+ importRepositories = this.mutation(removeAuthorizationParam(importReposWithTagsScmServiceV2ReposSearchScmSearchIdPost))
182
+ /**
183
+ * Gets repositories search by id (v2)
184
+ */
185
+ getRepositoriesBySearchId = this.query(removeAuthorizationParam(searchReposScmV2V2ReposSearchScmSearchIdGet))
186
+ /**
187
+ * Validate if the user has permission.
188
+ * We do not use opa in this api, so this is the fn needed to check permissions.
189
+ */
190
+ validateRolePermissions = this.query(removeAuthorizationParam(checkRoleRouteV1RolesRoleGet))
191
+ /**
192
+ * Creates an integration
193
+ */
194
+ createIntegration = this.mutation(removeAuthorizationParam(createIntegrationServiceV1IntegrationsPost))
195
+ /**
196
+ * Lists integrations
197
+ */
198
+ listIntegration = this.query(removeAuthorizationParam(listIntegrationServiceV1IntegrationsGet))
199
+ /**
200
+ * Gets an integration by id
201
+ */
202
+ getIntegrationById = this.query(removeAuthorizationParam(getIntegrationByIdServiceV1IntegrationsIntegrationIdGet))
203
+ /**
204
+ * Updates an integration
205
+ */
206
+ updateIntegration = this.mutation(removeAuthorizationParam(updateIntegrationServiceV1IntegrationsIntegrationIdPut))
207
+ /**
208
+ * Deletes an integration
209
+ */
210
+ deleteIntegration = this.mutation(removeAuthorizationParam(deleteIntegrationServiceV1IntegrationsIntegrationIdDelete))
211
+ /**
212
+ * Creates a program group.
213
+ */
214
+ createProgramGroup = this.mutation(removeAuthorizationParam(createProgramGroupServiceV1ProgramGroupsPost))
215
+ /**
216
+ * Gets list of program groups.
217
+ */
218
+ listProgramGroups = this.query(removeAuthorizationParam(listProgramGroupServiceV1ProgramGroupsGet))
219
+ /**
220
+ * Gets a program group by id.
221
+ */
222
+ getProgramGroupById = this.query(removeAuthorizationParam(getProgramGroupByIdServiceV1ProgramGroupsProgramGroupIdGet))
223
+ /**
224
+ * List Program Group Report Service
225
+ */
226
+ listProgramGroupReport = this.query(removeAuthorizationParam(listProgramGroupReportServiceV1ProgramGroupsProgramGroupIdReportsGet))
227
+ /**
228
+ * Updates a program group.
229
+ */
230
+ updateProgramGroup = this.mutation(removeAuthorizationParam(updateProgramGroupServiceV1ProgramGroupsProgramGroupIdPut))
231
+ /**
232
+ * Updates a program group components.
233
+ */
234
+ updateProgramGroupComponents = this.mutation(
235
+ removeAuthorizationParam(updateProgramGroupComponentsServiceV1ProgramGroupsProgramGroupIdComponentsPut),
236
+ )
237
+ /**
238
+ * Deletes a program group.
239
+ */
240
+ deleteProgramGroup = this.mutation(removeAuthorizationParam(deleteProgramGroupServiceV1ProgramGroupsProgramGroupIdDelete))
241
+ /**
242
+ * List Program Group Download Service
243
+ */
244
+ programGroupDownload = this.query(removeAuthorizationParam(listProgramGroupDownloadServiceV1ProgramGroupsDownloadGet))
245
+ /**
246
+ * Gets list of tags.
247
+ */
248
+ tags = this.query(removeAuthorizationParam(listTagsServiceV1TagsGet))
249
+ /**
250
+ * Validates a SCM URL.
251
+ */
252
+ validateSCMUrl = this.mutation(removeAuthorizationParam(validateScmUrlServiceV1ReposValidateScmUrlPost))
253
+ /**
254
+ * Get Branches for a Repository
255
+ */
256
+ getBranches = this.query(removeAuthorizationParam(listBranchesServiceV1ReposBranchesGet))
257
+ /**
258
+ * General Report Success And Errors
259
+ */
260
+ generalReportSuccessAndErrors = this.query(
261
+ removeAuthorizationParam(generalReportSuccessAndErrorsV1AnalyticsReportsGeneralSuccessAndErrorsGet),
262
+ )
263
+ /**
264
+ * Analytics Repository Last Report Status
265
+ */
266
+ analyticsRepositoryLastReportStatus = this.query(
267
+ removeAuthorizationParam(analyticsRepositoryLastReportStatusV1AnalyticsRepositoriesLastReportStatusGet),
268
+ )
269
+ /**
270
+ * Analytics Repository Last Report Status Download
271
+ */
272
+ analyticsRepositoryLastReportStatusDownload = this.query(
273
+ removeAuthorizationParam(analyticsRepositoryLastReportStatusDownloadV1AnalyticsRepositoriesLastReportStatusDownloadGet),
274
+ )
275
+ /**
276
+ * Analytics Repository Usage
277
+ */
278
+ analyticsRepositoryUsage = this.query(removeAuthorizationParam(analyticsRepositoryUsageV1AnalyticsRepositoriesUsageGet))
279
+ /**
280
+ * Analytics Program Groups Last Report Status
281
+ */
282
+ analyticsProgramGroupsLastReportStatus = this.query(
283
+ removeAuthorizationParam(analyticsProgramGroupsLastReportStatusV1AnalyticsProgramGroupsLastReportStatusGet),
284
+ )
285
+ /**
286
+ * Analytics Program Groups Last Report Status Download
287
+ */
288
+ analyticsProgramGroupsLastReportStatusDownload = this.query(
289
+ removeAuthorizationParam(analyticsProgramGroupsLastReportStatusDownloadV1AnalyticsProgramGroupsLastReportStatusDownloadGet),
290
+ )
291
+ /**
292
+ * Analytics User Usage
293
+ */
294
+ analyticsUserUsage = this.query(removeAuthorizationParam(analyticsUserUsageV1AnalyticsUsersUsageGet))
295
+ /**
296
+ * Analytics User Usage Download
297
+ */
298
+ analyticsUserUsageDownload = this.query(removeAuthorizationParam(analyticsUserUsageDownloadV1AnalyticsUsersUsageDownloadGet))
299
+ /**
300
+ * Analytics Repository Usage Download
301
+ */
302
+ analyticsRepositoryUsageDownload = this.query(
303
+ removeAuthorizationParam(analyticsRepositoryUsageDownloadV1AnalyticsRepositoriesUsageDownloadGet),
304
+ )
305
+ /**
306
+ * Analytics Program Groups Usage
307
+ */
308
+ analyticsProgramGroupsUsage = this.query(removeAuthorizationParam(analyticsProgramGroupsUsageV1AnalyticsProgramGroupsUsageGet))
309
+ /**
310
+ * Analytics Program Groups Usage Download
311
+ */
312
+ analyticsProgramGroupsUsageDownload = this.query(
313
+ removeAuthorizationParam(analyticsProgramGroupsUsageDownloadV1AnalyticsProgramGroupsUsageDownloadGet),
314
+ )
315
+ /**
316
+ * Gets users from the Code Shift service.
317
+ */
318
+ getUsersService = this.query(
319
+ removeAuthorizationParam(listUserServiceV1UsersGet),
320
+ )
321
+ /**
322
+ * Analytics Program Groups Details
323
+ */
324
+ analyticsProgramGroupsDetails = this.query(
325
+ removeAuthorizationParam(analyticsProgramGroupsDetailsV1AnalyticsProgramGroupsDetailsGet),
326
+ )
327
+ /**
328
+ * Analytics Program Groups Details Download
329
+ */
330
+ analyticsProgramGroupsDetailsDownload = this.query(
331
+ removeAuthorizationParam(analyticsProgramGroupsDetailsDownloadV1AnalyticsProgramGroupsDetailsDownloadGet),
332
+ )
333
+ /**
334
+ * Analytics Program Groups Details
335
+ */
336
+ analyticsRepositoryDetails = this.query(
337
+ removeAuthorizationParam(analyticsRepositoryDetailedReportV1AnalyticsRepositoriesDetailsGet),
338
+ )
339
+ /**
340
+ * Analytics Program Groups Details Download
341
+ */
342
+ analyticsRepositoryDetailsDownload = this.query(
343
+ removeAuthorizationParam(analyticsRepositoryDetailedReportDownloadV1AnalyticsRepositoriesDetailsDownloadGet),
344
+ )
345
+ /**
346
+ * Analytics Program Groups Target Details
347
+ */
348
+ analyticsProgramGroupsTargetDetails = this.query(
349
+ removeAuthorizationParam(analyticsProgramGroupsTargetDetailsV1AnalyticsProgramGroupsTargetDetailsGet),
350
+ )
351
+ /**
352
+ * Analytics Program Groups Target Details Download
353
+ */
354
+ analyticsProgramGroupsTargetDetailsDownload = this.query(
355
+ removeAuthorizationParam(analyticsProgramGroupsTargetDetailsDownloadV1AnalyticsProgramGroupsTargetDetailsDownloadGet),
356
+ )
357
+ /**
358
+ * Analytics Repository Target Details
359
+ */
360
+ analyticsRepositoryTargetDetails = this.query(
361
+ removeAuthorizationParam(analyticsRepositoryTargetDetailsV1AnalyticsRepositoriesTargetDetailsGet),
362
+ )
363
+ /**
364
+ * Analytics Repository Target Details Download
365
+ */
366
+ analyticsRepositoryTargetDetailsDownload = this.query(
367
+ removeAuthorizationParam(analyticsRepositoryTargetDetailsDownloadV1AnalyticsRepositoriesTargetDetailsDownloadGet),
368
+ )
369
+ }
370
+
371
+ export const codeShiftClient = new CodeShift()