@stack-spot/portal-network 0.184.0-beta.1 → 0.184.0

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