@stack-spot/portal-network 0.183.0 → 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 (136) hide show
  1. package/CHANGELOG.md +2412 -2405
  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.js +1 -1
  14. package/dist/api/content.js +1 -1
  15. package/dist/api/dataIntegration.js +1 -1
  16. package/dist/api/discover.js +1 -1
  17. package/dist/api/genAiInference.js +1 -1
  18. package/dist/api/insights.js +1 -1
  19. package/dist/api/notification.js +1 -1
  20. package/dist/api/secrets.js +1 -1
  21. package/dist/api/serviceCatalog.js +1 -1
  22. package/dist/api/workspace-ai.js +1 -1
  23. package/dist/api/workspace.js +1 -1
  24. package/dist/api/workspaceManager.d.ts +16 -10
  25. package/dist/api/workspaceManager.d.ts.map +1 -1
  26. package/dist/api/workspaceManager.js +11 -1
  27. package/dist/api/workspaceManager.js.map +1 -1
  28. package/dist/api/workspaceSearchEngine.js +1 -1
  29. package/dist/client/workspace-manager.d.ts +6 -0
  30. package/dist/client/workspace-manager.d.ts.map +1 -1
  31. package/dist/client/workspace-manager.js +10 -1
  32. package/dist/client/workspace-manager.js.map +1 -1
  33. package/package.json +6 -6
  34. package/scripts/generate-apis.ts +134 -134
  35. package/src/api/account.ts +8367 -8367
  36. package/src/api/agent-tools.ts +2169 -2169
  37. package/src/api/agent.ts +1083 -1083
  38. package/src/api/ai.ts +3388 -3388
  39. package/src/api/apiManagement.ts +570 -570
  40. package/src/api/apiRuntime.ts +2103 -2103
  41. package/src/api/cloudAccount.ts +1239 -1239
  42. package/src/api/cloudPlatform.ts +927 -927
  43. package/src/api/cloudPlatformHorizon.ts +2655 -2655
  44. package/src/api/cloudRuntimes.ts +2043 -2043
  45. package/src/api/cloudServices.ts +1445 -1445
  46. package/src/api/codeShift.ts +3481 -3481
  47. package/src/api/content.ts +9785 -9785
  48. package/src/api/dataIntegration.ts +1657 -1657
  49. package/src/api/discover.ts +435 -435
  50. package/src/api/eventBus.ts +171 -171
  51. package/src/api/genAiInference.ts +603 -603
  52. package/src/api/insights.ts +310 -310
  53. package/src/api/notification.ts +334 -334
  54. package/src/api/secrets.ts +342 -342
  55. package/src/api/serviceCatalog.ts +2908 -2908
  56. package/src/api/workflows.ts +1669 -1669
  57. package/src/api/workspace-ai.ts +677 -677
  58. package/src/api/workspace.ts +5889 -5889
  59. package/src/api/workspaceManager.ts +2951 -2936
  60. package/src/api/workspaceSearchEngine.ts +153 -153
  61. package/src/api-addresses.ts +120 -120
  62. package/src/apis-itau.json +225 -225
  63. package/src/apis.json +225 -225
  64. package/src/client/account.ts +902 -902
  65. package/src/client/agent-tools.ts +210 -210
  66. package/src/client/agent.ts +81 -81
  67. package/src/client/ai.ts +395 -395
  68. package/src/client/api-management.ts +40 -40
  69. package/src/client/cloud-account.ts +70 -70
  70. package/src/client/cloud-platform-horizon.ts +113 -113
  71. package/src/client/cloud-platform.ts +163 -163
  72. package/src/client/cloud-runtimes.ts +129 -129
  73. package/src/client/cloud-services.ts +94 -94
  74. package/src/client/code-shift.ts +349 -349
  75. package/src/client/content.ts +538 -538
  76. package/src/client/data-integration.ts +191 -191
  77. package/src/client/discover.ts +89 -89
  78. package/src/client/event-bus.ts +84 -84
  79. package/src/client/gen-ai-inference.ts +65 -65
  80. package/src/client/insights.ts +28 -28
  81. package/src/client/notification.ts +32 -32
  82. package/src/client/runtime-manager.ts +76 -76
  83. package/src/client/secrets.ts +60 -60
  84. package/src/client/types.ts +377 -377
  85. package/src/client/workflow.ts +83 -83
  86. package/src/client/workspace-ai.ts +191 -191
  87. package/src/client/workspace-manager.ts +564 -560
  88. package/src/client/workspace-search.ts +39 -39
  89. package/src/client/workspace.ts +480 -480
  90. package/src/error/DefaultAPIError.ts +151 -151
  91. package/src/error/FileUploadError.ts +18 -18
  92. package/src/error/IgnoredErrorCodes.ts +3 -3
  93. package/src/error/StackspotAPIError.ts +101 -101
  94. package/src/error/StreamCanceledError.ts +10 -10
  95. package/src/error/StreamError.ts +7 -7
  96. package/src/error/StreamJsonError.ts +10 -10
  97. package/src/error/dictionary/account.ts +58 -58
  98. package/src/error/dictionary/action-details.ts +20 -20
  99. package/src/error/dictionary/action.ts +211 -211
  100. package/src/error/dictionary/agent-tools.ts +75 -75
  101. package/src/error/dictionary/ai-inference.ts +28 -28
  102. package/src/error/dictionary/base.ts +22 -22
  103. package/src/error/dictionary/cloud-platform.ts +82 -82
  104. package/src/error/dictionary/cnt-fields.ts +14 -14
  105. package/src/error/dictionary/cnt.ts +103 -103
  106. package/src/error/dictionary/code-shift.ts +12 -12
  107. package/src/error/dictionary/rte.ts +24 -24
  108. package/src/error/dictionary/rtm.ts +10 -10
  109. package/src/error/dictionary/secrets.ts +14 -14
  110. package/src/error/dictionary/workspace-ai.ts +10 -10
  111. package/src/error/dictionary/workspace-details.ts +15 -15
  112. package/src/error/dictionary/workspace-fields.ts +10 -10
  113. package/src/error/dictionary/workspace.ts +209 -209
  114. package/src/error/types.ts +21 -21
  115. package/src/index.ts +43 -43
  116. package/src/network/AutoInfiniteQuery.ts +115 -115
  117. package/src/network/AutoMutation.ts +27 -27
  118. package/src/network/AutoOperation.ts +73 -73
  119. package/src/network/AutoQuery.ts +75 -75
  120. package/src/network/ManualInfiniteQuery.ts +95 -95
  121. package/src/network/ManualMutation.ts +40 -40
  122. package/src/network/ManualOperation.ts +52 -52
  123. package/src/network/ManualQuery.ts +82 -82
  124. package/src/network/NetworkClient.ts +167 -167
  125. package/src/network/ReactQueryNetworkClient.ts +312 -312
  126. package/src/network/react-query-client.ts +14 -14
  127. package/src/network/types.ts +294 -294
  128. package/src/types.ts +1 -1
  129. package/src/utils/StreamedArray.tsx +146 -146
  130. package/src/utils/StreamedJson.tsx +166 -166
  131. package/src/utils/remove-authorization-param.ts +6 -6
  132. package/src/utils/string.ts +19 -19
  133. package/src/utils/use-extended-list.ts +80 -80
  134. package/src/utils/use-streamed-array.ts +17 -17
  135. package/tsconfig.build.json +4 -4
  136. package/tsconfig.json +10 -10
@@ -1,349 +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
- } 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
+ 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()