@stack-spot/portal-network 0.83.0 → 0.83.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.
@@ -8,11 +8,11 @@ import * as Oazapfts from "@oazapfts/runtime";
8
8
  import * as QS from "@oazapfts/runtime/query";
9
9
  export const defaults: Oazapfts.Defaults<Oazapfts.CustomHeaders> = {
10
10
  headers: {},
11
- baseUrl: "https://cloud-cloud-platform-api.dev.stackspot.com",
11
+ baseUrl: "https://cloud-cloud-platform-api.stg.stackspot.com",
12
12
  };
13
13
  const oazapfts = Oazapfts.runtime(defaults);
14
14
  export const servers = {
15
- generatedServerUrl: "https://cloud-cloud-platform-api.dev.stackspot.com"
15
+ generatedServerUrl: "https://cloud-cloud-platform-api.stg.stackspot.com"
16
16
  };
17
17
  export type FoundationDetails = {
18
18
  name: string;
@@ -95,41 +95,6 @@ export type CreateTransitGatewayVpcAttachmentRequest = {
95
95
  vpcId: string;
96
96
  subnetIds: string[];
97
97
  };
98
- export type SubnetDetails = {
99
- availabilityZone: string;
100
- cidrBlock: string;
101
- description: string;
102
- "type": "PUBLIC" | "PRIVATE";
103
- name?: string;
104
- };
105
- export type SubnetResponse = {
106
- stackSpotAccountId: string;
107
- foundationId: string;
108
- projectId: string;
109
- networkId: string;
110
- subnetId: string;
111
- details: SubnetDetails;
112
- status: "READY" | "PENDING" | "ERROR";
113
- createdAt: string;
114
- updatedAt: string;
115
- deletedAt?: string;
116
- };
117
- export type ListSubnetResponse = {
118
- stackSpotAccountId: string;
119
- foundationId: string;
120
- projectId?: string;
121
- networkId?: string;
122
- pendingResources: boolean;
123
- content: SubnetResponse[];
124
- };
125
- export type CreateSubnetRequest = {
126
- projectId: string;
127
- networkId: string;
128
- availabilityZone: string;
129
- cidrBlock: string;
130
- "type": "PUBLIC" | "PRIVATE";
131
- name: string;
132
- };
133
98
  export type ProjectDetails = {
134
99
  name: string;
135
100
  folderName: string;
@@ -208,7 +173,6 @@ export type ListInboundResponse = {
208
173
  };
209
174
  export type CreateInboundRequest = {
210
175
  projectId: string;
211
- dnsZoneId: string;
212
176
  certificateId: string;
213
177
  domain: string;
214
178
  applicationLoadBalancer: string;
@@ -327,14 +291,22 @@ export type CreateCidrRequest = {
327
291
  address: string;
328
292
  prefix: number;
329
293
  };
294
+ export type CertificateDomainValidation = {
295
+ domainName?: string;
296
+ recordName?: string;
297
+ recordType?: string;
298
+ recordValue?: string;
299
+ };
330
300
  export type CertificateDetails = {
331
301
  name: string;
332
302
  forInbound: boolean;
333
303
  certificateStatus?: string;
334
304
  domainName?: string;
305
+ domainValidation?: CertificateDomainValidation[];
335
306
  notAfter?: string;
336
307
  notBefore?: string;
337
308
  "type"?: string;
309
+ validationMethod?: string;
338
310
  };
339
311
  export type CertificateResponse = {
340
312
  stackSpotAccountId: string;
@@ -342,7 +314,6 @@ export type CertificateResponse = {
342
314
  certificateId: string;
343
315
  details: CertificateDetails;
344
316
  status: "READY" | "PENDING" | "ERROR";
345
- validationStatus: "READY" | "PENDING" | "ERROR";
346
317
  createdAt: string;
347
318
  updatedAt: string;
348
319
  deletedAt?: string;
@@ -478,42 +449,6 @@ export function createTransitGatewayVpcAttachment({ authorization, foundationId,
478
449
  })
479
450
  })));
480
451
  }
481
- export function listSubnet({ authorization, foundationId, projectId, vpcId }: {
482
- authorization: string;
483
- foundationId: string;
484
- projectId?: string;
485
- vpcId?: string;
486
- }, opts?: Oazapfts.RequestOpts) {
487
- return oazapfts.ok(oazapfts.fetchJson<{
488
- status: 200;
489
- data: ListSubnetResponse;
490
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/subnets${QS.query(QS.explode({
491
- projectId,
492
- vpcId
493
- }))}`, {
494
- ...opts,
495
- headers: oazapfts.mergeHeaders(opts?.headers, {
496
- Authorization: authorization
497
- })
498
- }));
499
- }
500
- export function createSubnet({ authorization, foundationId, createSubnetRequest }: {
501
- authorization: string;
502
- foundationId: string;
503
- createSubnetRequest: CreateSubnetRequest;
504
- }, opts?: Oazapfts.RequestOpts) {
505
- return oazapfts.ok(oazapfts.fetchJson<{
506
- status: 200;
507
- data: SubnetResponse;
508
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/subnets`, oazapfts.json({
509
- ...opts,
510
- method: "POST",
511
- body: createSubnetRequest,
512
- headers: oazapfts.mergeHeaders(opts?.headers, {
513
- Authorization: authorization
514
- })
515
- })));
516
- }
517
452
  export function listProject({ authorization, foundationId, parentFolderId }: {
518
453
  authorization: string;
519
454
  foundationId: string;
@@ -750,14 +685,17 @@ export function createCidr({ authorization, foundationId, createCidrRequest }: {
750
685
  })
751
686
  })));
752
687
  }
753
- export function listCertificates({ authorization, foundationId }: {
688
+ export function listCertificates({ authorization, foundationId, forInbound }: {
754
689
  authorization: string;
755
690
  foundationId: string;
691
+ forInbound?: boolean;
756
692
  }, opts?: Oazapfts.RequestOpts) {
757
693
  return oazapfts.ok(oazapfts.fetchJson<{
758
694
  status: 200;
759
695
  data: ListCertificateResponse;
760
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates`, {
696
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates${QS.query(QS.explode({
697
+ forInbound
698
+ }))}`, {
761
699
  ...opts,
762
700
  headers: oazapfts.mergeHeaders(opts?.headers, {
763
701
  Authorization: authorization
@@ -824,21 +762,6 @@ export function getTransitGatewayVpcAttachment({ authorization, foundationId, tr
824
762
  })
825
763
  }));
826
764
  }
827
- export function getSubnet({ authorization, foundationId, subnetId }: {
828
- authorization: string;
829
- foundationId: string;
830
- subnetId: string;
831
- }, opts?: Oazapfts.RequestOpts) {
832
- return oazapfts.ok(oazapfts.fetchJson<{
833
- status: 200;
834
- data: SubnetResponse;
835
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/subnets/${encodeURIComponent(subnetId)}`, {
836
- ...opts,
837
- headers: oazapfts.mergeHeaders(opts?.headers, {
838
- Authorization: authorization
839
- })
840
- }));
841
- }
842
765
  export function getProject({ authorization, foundationId, projectId }: {
843
766
  authorization: string;
844
767
  foundationId: string;
@@ -929,15 +852,18 @@ export function getCidr({ authorization, foundationId, cidrId }: {
929
852
  })
930
853
  }));
931
854
  }
932
- export function getCertificate({ authorization, foundationId, certificateId }: {
855
+ export function getCertificate({ authorization, foundationId, certificateId, forInbound }: {
933
856
  authorization: string;
934
857
  foundationId: string;
935
858
  certificateId: string;
859
+ forInbound?: boolean;
936
860
  }, opts?: Oazapfts.RequestOpts) {
937
861
  return oazapfts.ok(oazapfts.fetchJson<{
938
862
  status: 200;
939
863
  data: CertificateResponse;
940
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates/${encodeURIComponent(certificateId)}`, {
864
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/certificates/${encodeURIComponent(certificateId)}${QS.query(QS.explode({
865
+ forInbound
866
+ }))}`, {
941
867
  ...opts,
942
868
  headers: oazapfts.mergeHeaders(opts?.headers, {
943
869
  Authorization: authorization
@@ -241,9 +241,10 @@ export function removePermissionV1WorkspacesWorkspaceIdPermissionsDelete({ works
241
241
  /**
242
242
  * List Groups And Members Permission In Workspace
243
243
  */
244
- export function listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet({ workspaceId, sortBy, authorization, xAccountId }: {
244
+ export function listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceIdPermissionsGet({ workspaceId, sortBy, order, authorization, xAccountId }: {
245
245
  workspaceId: string;
246
246
  sortBy?: SortBy | null;
247
+ order?: OrderEnum;
247
248
  authorization: string;
248
249
  xAccountId?: string | null;
249
250
  }, opts?: Oazapfts.RequestOpts) {
@@ -256,7 +257,8 @@ export function listGroupsAndMembersPermissionInWorkspaceV1WorkspacesWorkspaceId
256
257
  status: 422;
257
258
  data: HttpValidationError;
258
259
  }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/permissions${QS.query(QS.explode({
259
- sort_by: sortBy
260
+ sort_by: sortBy,
261
+ order
260
262
  }))}`, {
261
263
  ...opts,
262
264
  headers: oazapfts.mergeHeaders(opts?.headers, {
@@ -455,7 +455,7 @@ export type UpdatePluginAndCreatePrRequest = {
455
455
  originBranchName: string;
456
456
  newBranchName: string;
457
457
  stkFilePath: string;
458
- infraPluginsToUpdate: InfraPluginRequest[];
458
+ plugins: InfraPluginRequest[];
459
459
  };
460
460
  export type CreateConnectionInterfaceRequest = {
461
461
  /** Connection interface type id. */
@@ -1599,7 +1599,10 @@ export function updateInfrastructureControllerupdateInfraPluginsAndCreatePullReq
1599
1599
  sharedInfraId: string;
1600
1600
  updatePluginAndCreatePrRequest: UpdatePluginAndCreatePrRequest;
1601
1601
  }, opts?: Oazapfts.RequestOpts) {
1602
- return oazapfts.ok(oazapfts.fetchText(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/create-pull-request`, oazapfts.json({
1602
+ return oazapfts.ok(oazapfts.fetchJson<{
1603
+ status: 200;
1604
+ data: string;
1605
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/shared-infra/${encodeURIComponent(sharedInfraId)}/create-pull-request`, oazapfts.json({
1603
1606
  ...opts,
1604
1607
  method: "POST",
1605
1608
  body: updatePluginAndCreatePrRequest
@@ -1623,7 +1626,10 @@ export function updateInfrastructureControllerupdateInfraPluginsAndCreatePullReq
1623
1626
  applicationId: string;
1624
1627
  updatePluginAndCreatePrRequest: UpdatePluginAndCreatePrRequest;
1625
1628
  }, opts?: Oazapfts.RequestOpts) {
1626
- return oazapfts.ok(oazapfts.fetchText(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/create-pull-request`, oazapfts.json({
1629
+ return oazapfts.ok(oazapfts.fetchJson<{
1630
+ status: 200;
1631
+ data: string;
1632
+ }>(`/v1/workspaces/${encodeURIComponent(workspaceId)}/applications/${encodeURIComponent(applicationId)}/create-pull-request`, oazapfts.json({
1627
1633
  ...opts,
1628
1634
  method: "POST",
1629
1635
  body: updatePluginAndCreatePrRequest
@@ -10,7 +10,6 @@ import
10
10
  createInbound,
11
11
  createNetwork,
12
12
  createProject,
13
- createSubnet,
14
13
  defaults,
15
14
  getCertificate,
16
15
  getFolder,
@@ -23,7 +22,6 @@ import
23
22
  listFoundations,
24
23
  listInbound,
25
24
  listNetwork,
26
- listSubnet,
27
25
  providers,
28
26
  } from '../api/cloudPlatform'
29
27
  import apis from '../apis.json'
@@ -117,14 +115,6 @@ class CloudPlatformClient extends ReactQueryNetworkClient {
117
115
  * Create a network
118
116
  */
119
117
  createNetwork = this.mutation(removeAuthorizationParam(createNetwork))
120
- /**
121
- * Get a list of subnets
122
- */
123
- listSubnets = this.query(removeAuthorizationParam(listSubnet))
124
- /**
125
- * Create a subnet
126
- */
127
- createSubnet = this.mutation(removeAuthorizationParam(createSubnet))
128
118
  /**
129
119
  * Get a list of inbounds
130
120
  */