@stack-spot/portal-network 0.97.0 → 0.97.2

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.
@@ -12,8 +12,49 @@ export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
12
12
  };
13
13
  const oazapfts = Oazapfts.runtime(defaults);
14
14
  export const servers = {};
15
- export type BodyCreateApplicationsBatchServiceV1ApplicationsBatchPost = {
16
- file: Blob;
15
+ export type ModuleResponse = {
16
+ id: string;
17
+ name: string;
18
+ };
19
+ export type ApplicationResponse = {
20
+ id: string;
21
+ name: string;
22
+ };
23
+ export type ExecutionResponse = {
24
+ id: string;
25
+ started_at: string | null;
26
+ completed_at: string | null;
27
+ status: string | null;
28
+ conclusion: string | null;
29
+ };
30
+ export type UserResponse = {
31
+ id: string;
32
+ name: string;
33
+ email: string;
34
+ ip?: string | null;
35
+ };
36
+ export type ReportResponse = {
37
+ id: string;
38
+ "module": ModuleResponse;
39
+ application: ApplicationResponse;
40
+ execution: ExecutionResponse;
41
+ mode: string;
42
+ sourceBranch: string;
43
+ targetBranch?: string | null;
44
+ createdBy: UserResponse;
45
+ createdAt: string;
46
+ updatedAt: string;
47
+ files_count: number | null;
48
+ issues_count: number | null;
49
+ pullRequestLink?: string | null;
50
+ };
51
+ export type ListApplicationReportResponse = {
52
+ /** List of reports */
53
+ items: ReportResponse[];
54
+ /** Number of reports */
55
+ items_count: number;
56
+ /** Last evaluated key */
57
+ last_evaluated_key: string | null;
17
58
  };
18
59
  export type ExceptionType = "CODE_SHIFT_API_0000_UNEXPECTED_ERROR" | "CODE_SHIFT_API_0001_INVALID_VALUE" | "CODE_SHIFT_API_0002_NOT_IMPLEMENTED" | "CODE_SHIFT_API_0003_NOT_FOUND" | "CODE_SHIFT_API_0004_VALIDATION_ERROR" | "CODE_SHIFT_API_3000_WORKFLOW_API_DISPATCH_FAILURE" | "CODE_SHIFT_API_3001_WORKFLOW_API_DISPATCH_FORBIDDEN" | "CODE_SHIFT_API_3002_WORKFLOW_API_DISPATCH_PARSE_ERROR" | "CODE_SHIFT_API_3010_AWS_SECRET_MANAGER_GET_SECRET_FAILURE" | "CODE_SHIFT_API_3011_AWS_SECRET_MANAGER_PARSE_SECRET_ERROR" | "CODE_SHIFT_API_6000_IAM_GENERATE_TOKEN_FAILURE";
19
60
  export type BadRequestExceptionTypes = "CODE_SHIFT_API_1001_DECODE_JWT_ERROR" | "CODE_SHIFT_API_2001_BAD_REQUEST_REQUIRED_FIELD" | "CODE_SHIFT_API_2002_BAD_REQUEST_EMPTY_FIELD_NOT_ALLOWED" | "CODE_SHIFT_API_2003_BAD_REQUEST_TYPE_FIELD_NOT_ALLOWED" | "CODE_SHIFT_API_2004_BAD_REQUEST_VALUE_FIELD_NOT_ALLOWED" | "CODE_SHIFT_API_2005_BAD_REQUEST_VALUE_FIELD_MAX_LENGTH" | "CODE_SHIFT_API_2006_BAD_REQUEST_VALUE_FIELD_MIN_LENGTH" | "CODE_SHIFT_API_2007_BAD_REQUEST_VALUE_REGEX_DOESNT_MATCH" | "CODE_SHIFT_API_2008_BAD_REQUEST_VALUE_FIELD_NUMBER_NOT_LT" | "CODE_SHIFT_API_2100_CREATE_BODY_REPO_AND_REPO_CREATE_ACTION" | "CODE_SHIFT_API_2101_CREATE_BODY_NOT_REPO_AND_NOT_REPO_CREATE_ACTION" | "CODE_SHIFT_API_2102_BAD_REQUEST_DATE_MAX_INTERVAL" | "CODE_SHIFT_API_2103_BAD_REQUEST_INVALID_PAGE" | "CODE_SHIFT_API_2104_BAD_REQUEST_DUPLICATED_ALIAS" | "CODE_SHIFT_API_2105_BAD_REQUEST_INVALID_REPO_URL" | "CODE_SHIFT_API_2110_BAD_REQUEST_PUT_STEP_STATUS_COMPLETED_WITHOUT_CONCLUSION" | "CODE_SHIFT_API_2112_BAD_REQUEST_PUT_STEP_STATUS_NOT_COMPLETED_AND_CONCLUSION_DEFINED" | "CODE_SHIFT_API_2113_BAD_REQUEST_PUT_STEP_STATUS_COMPLETED_AND_COMPLETED_AT_NOT_DEFINED" | "CODE_SHIFT_API_2114_BAD_REQUEST_PUT_STEP_STATUS_IN_PROGRESS_AND_STARTED_AT_NOT_DEFINED" | "CODE_SHIFT_API_2115_BAD_REQUEST_PUT_STEP_COMPLETED_AT_DEFINED_AND_STATUS_NOT_COMPLETED" | "CODE_SHIFT_API_2116_BAD_REQUEST_PUT_STEP_STARTED_AT_DEFINED_AND_STATUS_PENDING" | "CODE_SHIFT_API_2117_BAD_REQUEST_PUT_STEP_LOG_DEFINED_AND_CONCLUSION_IS_NOT_FAILURE" | "CODE_SHIFT_API_2120_BAD_REQUEST_MULTIPLE_INTEGRATION" | "CODE_SHIFT_API_2121_BAD_REQUEST_EMPTY_INTEGRATION" | "CODE_SHIFT_API_2121_BAD_REQUEST_EMPTY_TARGET" | "CODE_SHIFT_API_2121_BAD_REQUEST_FILLED_TARGET" | "CODE_SHIFT_API_2999_BAD_REQUEST_UNMAPPED";
@@ -27,6 +68,9 @@ export type HttpErrorResponse = {
27
68
  details: string;
28
69
  validationDetails?: InvalidPayloadDetails[] | null;
29
70
  };
71
+ export type BodyCreateApplicationsBatchServiceV1ApplicationsBatchPost = {
72
+ file: Blob;
73
+ };
30
74
  export type RepositoryRequest = {
31
75
  url: string;
32
76
  default_branch: string;
@@ -41,7 +85,7 @@ export type RepositoryResponse = {
41
85
  url: string;
42
86
  default_branch: string;
43
87
  };
44
- export type ApplicationResponse = {
88
+ export type ApplicationResponse2 = {
45
89
  /** Application ID */
46
90
  id: string;
47
91
  /** Application name */
@@ -55,12 +99,18 @@ export type ApplicationResponse = {
55
99
  };
56
100
  export type ListApplicationResponse = {
57
101
  /** List of applications */
58
- items: ApplicationResponse[];
102
+ items: ApplicationResponse2[];
59
103
  /** Number of applications */
60
104
  items_count: number;
61
105
  /** Last evaluated key */
62
106
  last_evaluated_key: string | null;
63
107
  };
108
+ export type PutApplicationRequest = {
109
+ /** Application name */
110
+ name?: string | null;
111
+ /** Repository */
112
+ repository?: RepositoryRequest | null;
113
+ };
64
114
  export type CreateModuleRequest = {
65
115
  /** Module name */
66
116
  name: string;
@@ -75,7 +125,7 @@ export type CreateModuleRequest = {
75
125
  /** Module tags */
76
126
  tags: string[];
77
127
  };
78
- export type ModuleResponse = {
128
+ export type ModuleResponse2 = {
79
129
  /** Module ID */
80
130
  id: string;
81
131
  /** Module name */
@@ -95,54 +145,35 @@ export type ModuleResponse = {
95
145
  };
96
146
  export type ListModuleResponse = {
97
147
  /** List of modules */
98
- items: ModuleResponse[];
148
+ items: ModuleResponse2[];
99
149
  /** Number of modules */
100
150
  items_count: number;
101
151
  /** Last evaluated key */
102
152
  last_evaluated_key: string | null;
103
153
  };
154
+ export type PutModuleRequest = {
155
+ /** Module name */
156
+ name?: string | null;
157
+ /** Module description */
158
+ description?: string | null;
159
+ /** Module workflow_name */
160
+ workflow_name?: string | null;
161
+ /** Module version */
162
+ version?: string | null;
163
+ /** Module mode */
164
+ modes?: string[] | null;
165
+ /** Module tags */
166
+ tags?: string[] | null;
167
+ };
104
168
  export type ModuleDispatchRequest = {
105
169
  /** Module mode */
106
170
  mode: string;
107
171
  /** Target branch */
108
172
  targetBranch?: string | null;
109
- application_id?: string;
110
- module_id?: string;
111
- };
112
- export type ModuleResponse2 = {
113
- id: string;
114
- name: string;
115
- };
116
- export type ApplicationResponse2 = {
117
- id: string;
118
- name: string;
119
- };
120
- export type ExecutionResponse = {
121
- id: string;
122
- started_at: string | null;
123
- completed_at: string | null;
124
- status: string | null;
125
- conclusion: string | null;
126
- };
127
- export type UserResponse = {
128
- id: string;
129
- name: string;
130
- ip?: string | null;
131
- };
132
- export type ListReportResponse = {
133
- id: string;
134
- "module": ModuleResponse2;
135
- application: ApplicationResponse2;
136
- execution: ExecutionResponse;
137
- mode: string;
138
- source_branch: string;
139
- target_branch?: string | null;
140
- createdBy: UserResponse;
141
- createdAt: string;
142
- updatedAt: string;
143
- filesCount: number;
144
- issuesCount: number;
145
- pullRequestLink?: string | null;
173
+ /** Application ID */
174
+ applicationId: string;
175
+ /** Module ID */
176
+ moduleId: string;
146
177
  };
147
178
  export type DependsOnRequest = {
148
179
  sourceRef: string;
@@ -206,6 +237,47 @@ export type GetReportResponse = {
206
237
  pullRequestLink?: string | null;
207
238
  targetFiles: TargetFilesResponse[];
208
239
  };
240
+ /**
241
+ * List Report
242
+ */
243
+ export function listReportV1ApplicationsApplicationIdReportsGet({ applicationId, pageSize, page, lastEvaluatedKey, authorization }: {
244
+ applicationId: string;
245
+ pageSize?: number;
246
+ page?: number;
247
+ lastEvaluatedKey?: string;
248
+ authorization: string;
249
+ }, opts?: Oazapfts.RequestOpts) {
250
+ return oazapfts.ok(oazapfts.fetchJson<{
251
+ status: 200;
252
+ data: ListApplicationReportResponse;
253
+ } | {
254
+ status: 400;
255
+ data: HttpErrorResponse;
256
+ } | {
257
+ status: 401;
258
+ data: HttpErrorResponse;
259
+ } | {
260
+ status: 404;
261
+ data: HttpErrorResponse;
262
+ } | {
263
+ status: 422;
264
+ } | {
265
+ status: 500;
266
+ data: HttpErrorResponse;
267
+ } | {
268
+ status: 503;
269
+ data: HttpErrorResponse;
270
+ }>(`/v1/applications/${encodeURIComponent(applicationId)}/reports${QS.query(QS.explode({
271
+ pageSize,
272
+ page,
273
+ lastEvaluatedKey
274
+ }))}`, {
275
+ ...opts,
276
+ headers: oazapfts.mergeHeaders(opts?.headers, {
277
+ authorization
278
+ })
279
+ }));
280
+ }
209
281
  /**
210
282
  * Create Applications Batch Service
211
283
  */
@@ -281,11 +353,11 @@ export function createApplicationServiceV1ApplicationsPost({ authorization, crea
281
353
  /**
282
354
  * List Application Service
283
355
  */
284
- export function listApplicationServiceV1ApplicationsGet({ pageSize, page, lastEvaluatedKey, applicationSlug, moduleId, authorization }: {
356
+ export function listApplicationServiceV1ApplicationsGet({ pageSize, page, lastEvaluatedKey, filter, moduleId, authorization }: {
285
357
  pageSize?: number;
286
358
  page?: number;
287
359
  lastEvaluatedKey?: string;
288
- applicationSlug?: string;
360
+ filter?: string;
289
361
  moduleId?: string;
290
362
  authorization: string;
291
363
  }, opts?: Oazapfts.RequestOpts) {
@@ -313,7 +385,7 @@ export function listApplicationServiceV1ApplicationsGet({ pageSize, page, lastEv
313
385
  pageSize,
314
386
  page,
315
387
  last_evaluated_key: lastEvaluatedKey,
316
- applicationSlug,
388
+ filter,
317
389
  moduleId
318
390
  }))}`, {
319
391
  ...opts,
@@ -331,7 +403,7 @@ export function getApplicationByIdServiceV1ApplicationsApplicationIdGet({ applic
331
403
  }, opts?: Oazapfts.RequestOpts) {
332
404
  return oazapfts.ok(oazapfts.fetchJson<{
333
405
  status: 200;
334
- data: ApplicationResponse;
406
+ data: ApplicationResponse2;
335
407
  } | {
336
408
  status: 400;
337
409
  data: HttpErrorResponse;
@@ -394,10 +466,10 @@ export function deleteApplicationServiceV1ApplicationsApplicationIdDelete({ appl
394
466
  /**
395
467
  * Update Application Service
396
468
  */
397
- export function updateApplicationServiceV1ApplicationsApplicationIdPut({ applicationId, authorization, createApplicationRequest }: {
469
+ export function updateApplicationServiceV1ApplicationsApplicationIdPut({ applicationId, authorization, putApplicationRequest }: {
398
470
  applicationId: string;
399
471
  authorization: string;
400
- createApplicationRequest: CreateApplicationRequest;
472
+ putApplicationRequest: PutApplicationRequest;
401
473
  }, opts?: Oazapfts.RequestOpts) {
402
474
  return oazapfts.ok(oazapfts.fetchJson<{
403
475
  status: 200;
@@ -422,7 +494,7 @@ export function updateApplicationServiceV1ApplicationsApplicationIdPut({ applica
422
494
  }>(`/v1/applications/${encodeURIComponent(applicationId)}`, oazapfts.json({
423
495
  ...opts,
424
496
  method: "PUT",
425
- body: createApplicationRequest,
497
+ body: putApplicationRequest,
426
498
  headers: oazapfts.mergeHeaders(opts?.headers, {
427
499
  authorization
428
500
  })
@@ -538,10 +610,10 @@ export function deleteModuleServiceV1ModulesModuleIdDelete({ moduleId, authoriza
538
610
  /**
539
611
  * Update Module Service
540
612
  */
541
- export function updateModuleServiceV1ModulesModuleIdPut({ moduleId, authorization, createModuleRequest }: {
613
+ export function updateModuleServiceV1ModulesModuleIdPut({ moduleId, authorization, putModuleRequest }: {
542
614
  moduleId: string;
543
615
  authorization: string;
544
- createModuleRequest: CreateModuleRequest;
616
+ putModuleRequest: PutModuleRequest;
545
617
  }, opts?: Oazapfts.RequestOpts) {
546
618
  return oazapfts.ok(oazapfts.fetchJson<{
547
619
  status: 200;
@@ -566,7 +638,7 @@ export function updateModuleServiceV1ModulesModuleIdPut({ moduleId, authorizatio
566
638
  }>(`/v1/modules/${encodeURIComponent(moduleId)}`, oazapfts.json({
567
639
  ...opts,
568
640
  method: "PUT",
569
- body: createModuleRequest,
641
+ body: putModuleRequest,
570
642
  headers: oazapfts.mergeHeaders(opts?.headers, {
571
643
  authorization
572
644
  })
@@ -575,15 +647,13 @@ export function updateModuleServiceV1ModulesModuleIdPut({ moduleId, authorizatio
575
647
  /**
576
648
  * Dispatch Module Service
577
649
  */
578
- export function dispatchModuleServiceV1ModulesDispatchPost({ authorization, body }: {
650
+ export function dispatchModuleServiceV1ModulesDispatchesPost({ authorization, body }: {
579
651
  authorization: string;
580
652
  body: ModuleDispatchRequest[];
581
653
  }, opts?: Oazapfts.RequestOpts) {
582
654
  return oazapfts.ok(oazapfts.fetchJson<{
583
655
  status: 200;
584
- data: {
585
- [key: string]: string;
586
- };
656
+ data: string[];
587
657
  } | {
588
658
  status: 400;
589
659
  data: HttpErrorResponse;
@@ -601,7 +671,7 @@ export function dispatchModuleServiceV1ModulesDispatchPost({ authorization, body
601
671
  } | {
602
672
  status: 503;
603
673
  data: HttpErrorResponse;
604
- }>("/v1/modules/dispatch", oazapfts.json({
674
+ }>("/v1/modules/dispatches", oazapfts.json({
605
675
  ...opts,
606
676
  method: "POST",
607
677
  body,
@@ -610,39 +680,7 @@ export function dispatchModuleServiceV1ModulesDispatchPost({ authorization, body
610
680
  })
611
681
  })));
612
682
  }
613
- /**
614
- * List Report
615
- */
616
- export function listReportV1ReportsGet({ authorization }: {
617
- authorization: string;
618
- }, opts?: Oazapfts.RequestOpts) {
619
- return oazapfts.ok(oazapfts.fetchJson<{
620
- status: 200;
621
- data: ListReportResponse;
622
- } | {
623
- status: 400;
624
- data: HttpErrorResponse;
625
- } | {
626
- status: 401;
627
- data: HttpErrorResponse;
628
- } | {
629
- status: 404;
630
- data: HttpErrorResponse;
631
- } | {
632
- status: 422;
633
- } | {
634
- status: 500;
635
- data: HttpErrorResponse;
636
- } | {
637
- status: 503;
638
- data: HttpErrorResponse;
639
- }>("/v1/reports", {
640
- ...opts,
641
- headers: oazapfts.mergeHeaders(opts?.headers, {
642
- authorization
643
- })
644
- }));
645
- }
683
+
646
684
  /**
647
685
  * Put Report
648
686
  */
@@ -32,6 +32,7 @@ import {
32
32
  getAccess,
33
33
  getAccountMembers,
34
34
  getAccountMembers2,
35
+ getAccountRateLimit,
35
36
  getAccountSso,
36
37
  getActiveExtensionVersion,
37
38
  getAllAccountSso,
@@ -91,6 +92,7 @@ import {
91
92
  updateMemberPreferences,
92
93
  updatePartnerAccountAdminData,
93
94
  updatePartnerAccountData,
95
+ updateRateLimit,
94
96
  updateResourceActions,
95
97
  updateRoleWithNewActions,
96
98
  updateSecret,
@@ -724,6 +726,15 @@ class AccountClient extends ReactQueryNetworkClient {
724
726
  * Disable secret
725
727
  */
726
728
  disableSecret = this.mutation(disableSecret)
729
+ /**
730
+ * Get account rate limit
731
+ */
732
+ getAccountRateLimit = this.mutation(getAccountRateLimit)
733
+ /**
734
+ * Update Account rate limit
735
+ */
736
+ updateRateLimit = this.mutation(updateRateLimit)
737
+
727
738
  }
728
739
 
729
740
  export const accountClient = new AccountClient()
@@ -8,9 +8,9 @@ import { defaults, createApplicationsBatchServiceV1ApplicationsBatchPost, create
8
8
  deleteApplicationServiceV1ApplicationsApplicationIdDelete, listApplicationServiceV1ApplicationsGet, listModulesServiceV1ModulesGet,
9
9
  updateApplicationServiceV1ApplicationsApplicationIdPut,
10
10
  getApplicationByIdServiceV1ApplicationsApplicationIdGet,
11
- dispatchModuleServiceV1ModulesDispatchPost,
11
+ dispatchModuleServiceV1ModulesDispatchesPost,
12
12
  getReportV1ReportsReportIdGet,
13
- listReportV1ReportsGet,
13
+ listReportV1ApplicationsApplicationIdReportsGet,
14
14
  } from '../api/codeShift'
15
15
  import { DefaultAPIError } from '../error/DefaultAPIError'
16
16
 
@@ -30,8 +30,8 @@ class CodeShift extends ReactQueryNetworkClient {
30
30
  updateApplication = this.mutation(removeAuthorizationParam(updateApplicationServiceV1ApplicationsApplicationIdPut))
31
31
  modules = this.query(removeAuthorizationParam(listModulesServiceV1ModulesGet))
32
32
  deleteImportedApp = this.mutation(removeAuthorizationParam(deleteApplicationServiceV1ApplicationsApplicationIdDelete))
33
- generateReport = this.mutation(removeAuthorizationParam(dispatchModuleServiceV1ModulesDispatchPost))
34
- reports = this.query(removeAuthorizationParam(listReportV1ReportsGet))
33
+ generateReport = this.mutation(removeAuthorizationParam(dispatchModuleServiceV1ModulesDispatchesPost))
34
+ reports = this.query(removeAuthorizationParam(listReportV1ApplicationsApplicationIdReportsGet))
35
35
  report = this.query(removeAuthorizationParam(getReportV1ReportsReportIdGet))
36
36
  }
37
37