@stack-spot/portal-network 0.51.0 → 0.52.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.
@@ -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.stg.stackspot.com",
11
+ baseUrl: "https://cloud-cloud-platform-api.dev.stackspot.com",
12
12
  };
13
13
  const oazapfts = Oazapfts.runtime(defaults);
14
14
  export const servers = {
15
- generatedServerUrl: "https://cloud-cloud-platform-api.stg.stackspot.com"
15
+ generatedServerUrl: "https://cloud-cloud-platform-api.dev.stackspot.com"
16
16
  };
17
17
  export type Foundation = {
18
18
  /** Unique identifier of the foundation */
@@ -35,51 +35,6 @@ export type OffsetPageFoundation = {
35
35
  data: Foundation[];
36
36
  total: number;
37
37
  };
38
- export type ErrorResponse = {
39
- message: string;
40
- exception: {
41
- cause?: {
42
- stackTrace?: {
43
- classLoaderName?: string;
44
- moduleName?: string;
45
- moduleVersion?: string;
46
- methodName?: string;
47
- fileName?: string;
48
- lineNumber?: number;
49
- className?: string;
50
- nativeMethod?: boolean;
51
- }[];
52
- message?: string;
53
- localizedMessage?: string;
54
- };
55
- stackTrace?: {
56
- classLoaderName?: string;
57
- moduleName?: string;
58
- moduleVersion?: string;
59
- methodName?: string;
60
- fileName?: string;
61
- lineNumber?: number;
62
- className?: string;
63
- nativeMethod?: boolean;
64
- }[];
65
- message?: string;
66
- suppressed?: {
67
- stackTrace?: {
68
- classLoaderName?: string;
69
- moduleName?: string;
70
- moduleVersion?: string;
71
- methodName?: string;
72
- fileName?: string;
73
- lineNumber?: number;
74
- className?: string;
75
- nativeMethod?: boolean;
76
- }[];
77
- message?: string;
78
- localizedMessage?: string;
79
- }[];
80
- localizedMessage?: string;
81
- };
82
- };
83
38
  export type CreateFoundationRequest = {
84
39
  /** Human-readable name for the foundation */
85
40
  name: string;
@@ -90,27 +45,6 @@ export type CreateFoundationRequest = {
90
45
  /** The region where the foundation will be provisioned */
91
46
  region: string;
92
47
  };
93
- export type FolderContentResponse = {
94
- id: string;
95
- name: string;
96
- "type": "FOLDER" | "PROJECT";
97
- status: "NOT_READY" | "READY";
98
- };
99
- export type FolderResponse = {
100
- stackSpotAccountId: string;
101
- foundationId: string;
102
- parentFolderId?: string;
103
- folderId: string;
104
- folderName: string;
105
- status: "NOT_READY" | "READY";
106
- createdAt: string;
107
- updatedAt: string;
108
- deletedAt?: string;
109
- content: FolderContentResponse[];
110
- };
111
- export type CreateFolderRequest = {
112
- name: string;
113
- };
114
48
  export type DnsZoneResponse = {
115
49
  stackSpotAccountId: string;
116
50
  foundationId: string;
@@ -158,6 +92,32 @@ export type CreateCidrRequest = {
158
92
  address: string;
159
93
  prefix: number;
160
94
  };
95
+ export type ListFolderResponse = {
96
+ id: string;
97
+ name: string;
98
+ "type": "FOLDER" | "PROJECT";
99
+ status: "NOT_READY" | "READY";
100
+ children?: ListFolderResponse[];
101
+ createdAt?: string;
102
+ updatedAt?: string;
103
+ };
104
+ export type CreateFolderRequest = {
105
+ /** ID of the foundation under which the folder is being created. The foundation must be ready. */
106
+ foundationId: string;
107
+ /** Folder name. Must be lowercase and kebab-case */
108
+ name: string;
109
+ /** ID of the parent folder, or null if the folder is a root folder */
110
+ parentFolderId?: string;
111
+ };
112
+ export type FolderResponse = {
113
+ id: string;
114
+ name: string;
115
+ foundationId: string;
116
+ parentFolderId?: string;
117
+ status: "NOT_READY" | "READY";
118
+ createdAt: string;
119
+ updatedAt: string;
120
+ };
161
121
  export type EnvVar = {
162
122
  key: string;
163
123
  value: string;
@@ -350,12 +310,6 @@ export function listFoundations({ limit, offset }: {
350
310
  return oazapfts.ok(oazapfts.fetchJson<{
351
311
  status: 200;
352
312
  data: OffsetPageFoundation;
353
- } | {
354
- status: 500;
355
- data: ErrorResponse;
356
- } | {
357
- status: 503;
358
- data: ErrorResponse;
359
313
  }>(`/v1/foundations${QS.query(QS.explode({
360
314
  limit,
361
315
  offset
@@ -369,258 +323,166 @@ export function createFoundation({ createFoundationRequest }: {
369
323
  return oazapfts.ok(oazapfts.fetchJson<{
370
324
  status: 200;
371
325
  data: Foundation;
372
- } | {
373
- status: 500;
374
- data: ErrorResponse;
375
- } | {
376
- status: 503;
377
- data: ErrorResponse;
378
326
  }>("/v1/foundations", oazapfts.json({
379
327
  ...opts,
380
328
  method: "POST",
381
329
  body: createFoundationRequest
382
330
  })));
383
331
  }
384
- export function getFolder({ foundationId, authorization, folderId }: {
385
- foundationId: string;
332
+ export function listDnsZone({ authorization, foundationId }: {
386
333
  authorization: string;
387
- folderId: string;
334
+ foundationId: string;
388
335
  }, opts?: Oazapfts.RequestOpts) {
389
336
  return oazapfts.ok(oazapfts.fetchJson<{
390
337
  status: 200;
391
- data: FolderResponse;
392
- } | {
393
- status: 500;
394
- data: ErrorResponse;
395
- } | {
396
- status: 503;
397
- data: ErrorResponse;
398
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/folders/${encodeURIComponent(folderId)}`, {
338
+ data: ListDnsZoneResponse;
339
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones`, {
399
340
  ...opts,
400
341
  headers: oazapfts.mergeHeaders(opts?.headers, {
401
342
  Authorization: authorization
402
343
  })
403
344
  }));
404
345
  }
405
- export function createFolder({ authorization, foundationId, folderId, createFolderRequest }: {
346
+ export function createDnsZone({ authorization, foundationId, createDnsZoneRequest }: {
406
347
  authorization: string;
407
348
  foundationId: string;
408
- folderId: string;
409
- createFolderRequest: CreateFolderRequest;
349
+ createDnsZoneRequest: CreateDnsZoneRequest;
410
350
  }, opts?: Oazapfts.RequestOpts) {
411
351
  return oazapfts.ok(oazapfts.fetchJson<{
412
352
  status: 200;
413
- data: FolderResponse;
414
- } | {
415
- status: 500;
416
- data: ErrorResponse;
417
- } | {
418
- status: 503;
419
- data: ErrorResponse;
420
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/folders/${encodeURIComponent(folderId)}`, oazapfts.json({
353
+ data: DnsZoneResponse;
354
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones`, oazapfts.json({
421
355
  ...opts,
422
356
  method: "POST",
423
- body: createFolderRequest,
357
+ body: createDnsZoneRequest,
424
358
  headers: oazapfts.mergeHeaders(opts?.headers, {
425
359
  Authorization: authorization
426
360
  })
427
361
  })));
428
362
  }
429
- export function listDnsZone({ authorization, foundationId }: {
430
- authorization: string;
363
+ export function listCidr({ foundationId, authorization }: {
431
364
  foundationId: string;
365
+ authorization: string;
432
366
  }, opts?: Oazapfts.RequestOpts) {
433
367
  return oazapfts.ok(oazapfts.fetchJson<{
434
368
  status: 200;
435
- data: ListDnsZoneResponse;
436
- } | {
437
- status: 500;
438
- data: ErrorResponse;
439
- } | {
440
- status: 503;
441
- data: ErrorResponse;
442
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones`, {
369
+ data: ListCidrResponse;
370
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidr`, {
443
371
  ...opts,
444
372
  headers: oazapfts.mergeHeaders(opts?.headers, {
445
373
  Authorization: authorization
446
374
  })
447
375
  }));
448
376
  }
449
- export function createDnsZone({ authorization, foundationId, createDnsZoneRequest }: {
377
+ export function createCidr({ authorization, foundationId, createCidrRequest }: {
450
378
  authorization: string;
451
379
  foundationId: string;
452
- createDnsZoneRequest: CreateDnsZoneRequest;
380
+ createCidrRequest: CreateCidrRequest;
453
381
  }, opts?: Oazapfts.RequestOpts) {
454
382
  return oazapfts.ok(oazapfts.fetchJson<{
455
383
  status: 200;
456
- data: DnsZoneResponse;
457
- } | {
458
- status: 500;
459
- data: ErrorResponse;
460
- } | {
461
- status: 503;
462
- data: ErrorResponse;
463
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones`, oazapfts.json({
384
+ data: CidrResponse;
385
+ }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidr`, oazapfts.json({
464
386
  ...opts,
465
387
  method: "POST",
466
- body: createDnsZoneRequest,
388
+ body: createCidrRequest,
467
389
  headers: oazapfts.mergeHeaders(opts?.headers, {
468
390
  Authorization: authorization
469
391
  })
470
392
  })));
471
393
  }
472
- export function listCidr({ foundationId, authorization }: {
473
- foundationId: string;
394
+ export function listFolder({ authorization, foundationId, folderId }: {
474
395
  authorization: string;
396
+ foundationId: string;
397
+ folderId?: string;
475
398
  }, opts?: Oazapfts.RequestOpts) {
476
399
  return oazapfts.ok(oazapfts.fetchJson<{
477
400
  status: 200;
478
- data: ListCidrResponse;
479
- } | {
480
- status: 500;
481
- data: ErrorResponse;
482
- } | {
483
- status: 503;
484
- data: ErrorResponse;
485
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidr`, {
401
+ data: ListFolderResponse;
402
+ }>(`/v1/folders${QS.query(QS.explode({
403
+ foundationId,
404
+ folderId
405
+ }))}`, {
486
406
  ...opts,
487
407
  headers: oazapfts.mergeHeaders(opts?.headers, {
488
408
  Authorization: authorization
489
409
  })
490
410
  }));
491
411
  }
492
- export function createCidr({ authorization, foundationId, createCidrRequest }: {
412
+ export function createFolder({ authorization, createFolderRequest }: {
493
413
  authorization: string;
494
- foundationId: string;
495
- createCidrRequest: CreateCidrRequest;
414
+ createFolderRequest: CreateFolderRequest;
496
415
  }, opts?: Oazapfts.RequestOpts) {
497
416
  return oazapfts.ok(oazapfts.fetchJson<{
498
- status: 200;
499
- data: CidrResponse;
500
- } | {
501
- status: 500;
502
- data: ErrorResponse;
503
- } | {
504
- status: 503;
505
- data: ErrorResponse;
506
- }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidr`, oazapfts.json({
417
+ status: 202;
418
+ data: FolderResponse;
419
+ }>("/v1/folders", oazapfts.json({
507
420
  ...opts,
508
421
  method: "POST",
509
- body: createCidrRequest,
422
+ body: createFolderRequest,
510
423
  headers: oazapfts.mergeHeaders(opts?.headers, {
511
424
  Authorization: authorization
512
425
  })
513
426
  })));
514
427
  }
515
- export function createDeployment({ authorization, createDeploymentRequest }: {
516
- authorization: string;
428
+ export function createDeployment({ createDeploymentRequest }: {
517
429
  createDeploymentRequest: CreateDeploymentRequest;
518
430
  }, opts?: Oazapfts.RequestOpts) {
519
431
  return oazapfts.ok(oazapfts.fetchJson<{
520
432
  status: 200;
521
433
  data: CreateDeploymentResponse;
522
- } | {
523
- status: 500;
524
- data: ErrorResponse;
525
- } | {
526
- status: 503;
527
- data: ErrorResponse;
528
434
  }>("/v1/deployments", oazapfts.json({
529
435
  ...opts,
530
436
  method: "POST",
531
- body: createDeploymentRequest,
532
- headers: oazapfts.mergeHeaders(opts?.headers, {
533
- Authorization: authorization
534
- })
437
+ body: createDeploymentRequest
535
438
  })));
536
439
  }
537
- export function createApplication({ authorization, createApplicationRequest }: {
538
- authorization: string;
440
+ export function createApplication({ createApplicationRequest }: {
539
441
  createApplicationRequest: CreateApplicationRequest;
540
442
  }, opts?: Oazapfts.RequestOpts) {
541
443
  return oazapfts.ok(oazapfts.fetchJson<{
542
444
  status: 200;
543
445
  data: ApplicationResponse;
544
- } | {
545
- status: 500;
546
- data: ErrorResponse;
547
- } | {
548
- status: 503;
549
- data: ErrorResponse;
550
446
  }>("/v1/applications", oazapfts.json({
551
447
  ...opts,
552
448
  method: "POST",
553
- body: createApplicationRequest,
554
- headers: oazapfts.mergeHeaders(opts?.headers, {
555
- Authorization: authorization
556
- })
449
+ body: createApplicationRequest
557
450
  })));
558
451
  }
559
- export function getApplication({ authorization, applicationId }: {
560
- authorization: string;
452
+ export function getApplication({ applicationId }: {
561
453
  applicationId: string;
562
454
  }, opts?: Oazapfts.RequestOpts) {
563
455
  return oazapfts.ok(oazapfts.fetchJson<{
564
456
  status: 200;
565
457
  data: ApplicationResponse;
566
- } | {
567
- status: 500;
568
- data: ErrorResponse;
569
- } | {
570
- status: 503;
571
- data: ErrorResponse;
572
458
  }>(`/v1/applications/${encodeURIComponent(applicationId)}`, {
573
- ...opts,
574
- headers: oazapfts.mergeHeaders(opts?.headers, {
575
- Authorization: authorization
576
- })
459
+ ...opts
577
460
  }));
578
461
  }
579
- export function updateApplication({ authorization, applicationId, createApplicationRequest }: {
580
- authorization: string;
462
+ export function updateApplication({ applicationId, createApplicationRequest }: {
581
463
  applicationId: string;
582
464
  createApplicationRequest: CreateApplicationRequest;
583
465
  }, opts?: Oazapfts.RequestOpts) {
584
466
  return oazapfts.ok(oazapfts.fetchJson<{
585
467
  status: 200;
586
468
  data: ApplicationResponse;
587
- } | {
588
- status: 500;
589
- data: ErrorResponse;
590
- } | {
591
- status: 503;
592
- data: ErrorResponse;
593
469
  }>(`/v1/applications/${encodeURIComponent(applicationId)}`, oazapfts.json({
594
470
  ...opts,
595
471
  method: "PATCH",
596
- body: createApplicationRequest,
597
- headers: oazapfts.mergeHeaders(opts?.headers, {
598
- Authorization: authorization
599
- })
472
+ body: createApplicationRequest
600
473
  })));
601
474
  }
602
- export function getRuntimeById({ authorization, runtimeId }: {
603
- authorization: string;
475
+ export function getRuntimeById({ runtimeId }: {
604
476
  runtimeId: string;
605
477
  }, opts?: Oazapfts.RequestOpts) {
606
478
  return oazapfts.ok(oazapfts.fetchJson<{
607
479
  status: 200;
608
480
  data: RuntimeResponse;
609
- } | {
610
- status: 500;
611
- data: ErrorResponse;
612
- } | {
613
- status: 503;
614
- data: ErrorResponse;
615
481
  }>(`/v1/runtimes/${encodeURIComponent(runtimeId)}`, {
616
- ...opts,
617
- headers: oazapfts.mergeHeaders(opts?.headers, {
618
- Authorization: authorization
619
- })
482
+ ...opts
620
483
  }));
621
484
  }
622
- export function listRuntimes({ authorization, projectId, limit, offset }: {
623
- authorization: string;
485
+ export function listRuntimes({ projectId, limit, offset }: {
624
486
  projectId: string;
625
487
  limit?: number;
626
488
  offset?: number;
@@ -628,24 +490,14 @@ export function listRuntimes({ authorization, projectId, limit, offset }: {
628
490
  return oazapfts.ok(oazapfts.fetchJson<{
629
491
  status: 200;
630
492
  data: ListRuntimesResponse;
631
- } | {
632
- status: 500;
633
- data: ErrorResponse;
634
- } | {
635
- status: 503;
636
- data: ErrorResponse;
637
493
  }>(`/v1/runtimes/projects/${encodeURIComponent(projectId)}${QS.query(QS.explode({
638
494
  limit,
639
495
  offset
640
496
  }))}`, {
641
- ...opts,
642
- headers: oazapfts.mergeHeaders(opts?.headers, {
643
- Authorization: authorization
644
- })
497
+ ...opts
645
498
  }));
646
499
  }
647
- export function getRuntimeByApplicationId({ authorization, applicationId, limit, offset }: {
648
- authorization: string;
500
+ export function getRuntimeByApplicationId({ applicationId, limit, offset }: {
649
501
  applicationId: string;
650
502
  limit?: number;
651
503
  offset?: number;
@@ -653,64 +505,35 @@ export function getRuntimeByApplicationId({ authorization, applicationId, limit,
653
505
  return oazapfts.ok(oazapfts.fetchJson<{
654
506
  status: 200;
655
507
  data: ListRuntimeByApplicationResponse;
656
- } | {
657
- status: 500;
658
- data: ErrorResponse;
659
- } | {
660
- status: 503;
661
- data: ErrorResponse;
662
508
  }>(`/v1/runtimes/application/${encodeURIComponent(applicationId)}${QS.query(QS.explode({
663
509
  limit,
664
510
  offset
665
511
  }))}`, {
666
- ...opts,
667
- headers: oazapfts.mergeHeaders(opts?.headers, {
668
- Authorization: authorization
669
- })
512
+ ...opts
670
513
  }));
671
514
  }
672
- export function listRepositories({ authorization, limit, offset }: {
673
- authorization: string;
515
+ export function listRepositories({ limit, offset }: {
674
516
  limit?: number;
675
517
  offset?: number;
676
518
  }, opts?: Oazapfts.RequestOpts) {
677
519
  return oazapfts.ok(oazapfts.fetchJson<{
678
520
  status: 200;
679
521
  data: ListRepositoryResponse;
680
- } | {
681
- status: 500;
682
- data: ErrorResponse;
683
- } | {
684
- status: 503;
685
- data: ErrorResponse;
686
522
  }>(`/v1/registries/repositories${QS.query(QS.explode({
687
523
  limit,
688
524
  offset
689
525
  }))}`, {
690
- ...opts,
691
- headers: oazapfts.mergeHeaders(opts?.headers, {
692
- Authorization: authorization
693
- })
526
+ ...opts
694
527
  }));
695
528
  }
696
- export function getRepositoryImages({ authorization, repositoryId }: {
697
- authorization: string;
529
+ export function getRepositoryImages({ repositoryId }: {
698
530
  repositoryId: string;
699
531
  }, opts?: Oazapfts.RequestOpts) {
700
532
  return oazapfts.ok(oazapfts.fetchJson<{
701
533
  status: 200;
702
534
  data: ImageResponse[];
703
- } | {
704
- status: 500;
705
- data: ErrorResponse;
706
- } | {
707
- status: 503;
708
- data: ErrorResponse;
709
535
  }>(`/v1/registries/repositories/${encodeURIComponent(repositoryId)}/images`, {
710
- ...opts,
711
- headers: oazapfts.mergeHeaders(opts?.headers, {
712
- Authorization: authorization
713
- })
536
+ ...opts
714
537
  }));
715
538
  }
716
539
  export function getFoundation({ foundationId }: {
@@ -719,12 +542,6 @@ export function getFoundation({ foundationId }: {
719
542
  return oazapfts.ok(oazapfts.fetchJson<{
720
543
  status: 200;
721
544
  data: Foundation;
722
- } | {
723
- status: 500;
724
- data: ErrorResponse;
725
- } | {
726
- status: 503;
727
- data: ErrorResponse;
728
545
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}`, {
729
546
  ...opts
730
547
  }));
@@ -737,12 +554,6 @@ export function getDnsZone({ foundationId, authorization, dnsZoneId }: {
737
554
  return oazapfts.ok(oazapfts.fetchJson<{
738
555
  status: 200;
739
556
  data: DnsZoneResponse;
740
- } | {
741
- status: 500;
742
- data: ErrorResponse;
743
- } | {
744
- status: 503;
745
- data: ErrorResponse;
746
557
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/dns-zones/${encodeURIComponent(dnsZoneId)}`, {
747
558
  ...opts,
748
559
  headers: oazapfts.mergeHeaders(opts?.headers, {
@@ -758,12 +569,6 @@ export function getCidr({ foundationId, authorization, cidrId }: {
758
569
  return oazapfts.ok(oazapfts.fetchJson<{
759
570
  status: 200;
760
571
  data: CidrResponse;
761
- } | {
762
- status: 500;
763
- data: ErrorResponse;
764
- } | {
765
- status: 503;
766
- data: ErrorResponse;
767
572
  }>(`/v1/foundations/${encodeURIComponent(foundationId)}/cidr/${encodeURIComponent(cidrId)}`, {
768
573
  ...opts,
769
574
  headers: oazapfts.mergeHeaders(opts?.headers, {
@@ -777,12 +582,6 @@ export function getProvisionAvailability({ cloudProvider }: {
777
582
  return oazapfts.ok(oazapfts.fetchJson<{
778
583
  status: 200;
779
584
  data: GetProvisionAvailabilityResponse;
780
- } | {
781
- status: 500;
782
- data: ErrorResponse;
783
- } | {
784
- status: 503;
785
- data: ErrorResponse;
786
585
  }>(`/v1/foundations/provision-availability${QS.query(QS.explode({
787
586
  cloudProvider
788
587
  }))}`, {
@@ -793,118 +592,75 @@ export function providers(opts?: Oazapfts.RequestOpts) {
793
592
  return oazapfts.ok(oazapfts.fetchJson<{
794
593
  status: 200;
795
594
  data: CloudProvider[];
796
- } | {
797
- status: 500;
798
- data: ErrorResponse;
799
- } | {
800
- status: 503;
801
- data: ErrorResponse;
802
595
  }>("/v1/foundations/providers", {
803
596
  ...opts
804
597
  }));
805
598
  }
806
- export function getDeploymentStatus({ authorization, deploymentId }: {
599
+ export function getFolder({ authorization, folderId }: {
807
600
  authorization: string;
808
- deploymentId: string;
601
+ folderId: string;
809
602
  }, opts?: Oazapfts.RequestOpts) {
810
603
  return oazapfts.ok(oazapfts.fetchJson<{
811
604
  status: 200;
812
- data: DeploymentStatusResponse;
813
- } | {
814
- status: 500;
815
- data: ErrorResponse;
816
- } | {
817
- status: 503;
818
- data: ErrorResponse;
819
- }>(`/v1/deployments/${encodeURIComponent(deploymentId)}/status`, {
605
+ data: FolderResponse;
606
+ }>(`/v1/folders/${encodeURIComponent(folderId)}`, {
820
607
  ...opts,
821
608
  headers: oazapfts.mergeHeaders(opts?.headers, {
822
609
  Authorization: authorization
823
610
  })
824
611
  }));
825
612
  }
826
- export function getDeploymentLogs({ authorization, deploymentId }: {
827
- authorization: string;
613
+ export function getDeploymentStatus({ deploymentId }: {
614
+ deploymentId: string;
615
+ }, opts?: Oazapfts.RequestOpts) {
616
+ return oazapfts.ok(oazapfts.fetchJson<{
617
+ status: 200;
618
+ data: DeploymentStatusResponse;
619
+ }>(`/v1/deployments/${encodeURIComponent(deploymentId)}/status`, {
620
+ ...opts
621
+ }));
622
+ }
623
+ export function getDeploymentLogs({ deploymentId }: {
828
624
  deploymentId: string;
829
625
  }, opts?: Oazapfts.RequestOpts) {
830
626
  return oazapfts.ok(oazapfts.fetchJson<{
831
627
  status: 200;
832
628
  data: DeploymentLogResponse;
833
- } | {
834
- status: 500;
835
- data: ErrorResponse;
836
- } | {
837
- status: 503;
838
- data: ErrorResponse;
839
629
  }>(`/v1/deployments/${encodeURIComponent(deploymentId)}/logs`, {
840
- ...opts,
841
- headers: oazapfts.mergeHeaders(opts?.headers, {
842
- Authorization: authorization
843
- })
630
+ ...opts
844
631
  }));
845
632
  }
846
- export function getDeploymentHealth({ authorization, deploymentId }: {
847
- authorization: string;
633
+ export function getDeploymentHealth({ deploymentId }: {
848
634
  deploymentId: string;
849
635
  }, opts?: Oazapfts.RequestOpts) {
850
636
  return oazapfts.ok(oazapfts.fetchJson<{
851
637
  status: 200;
852
638
  data: DeploymentHealthResponse;
853
- } | {
854
- status: 500;
855
- data: ErrorResponse;
856
- } | {
857
- status: 503;
858
- data: ErrorResponse;
859
639
  }>(`/v1/deployments/${encodeURIComponent(deploymentId)}/health`, {
860
- ...opts,
861
- headers: oazapfts.mergeHeaders(opts?.headers, {
862
- Authorization: authorization
863
- })
640
+ ...opts
864
641
  }));
865
642
  }
866
- export function listDeployments({ authorization, applicationId }: {
867
- authorization: string;
643
+ export function listDeployments({ applicationId }: {
868
644
  applicationId: string;
869
645
  }, opts?: Oazapfts.RequestOpts) {
870
646
  return oazapfts.ok(oazapfts.fetchJson<{
871
647
  status: 200;
872
648
  data: BasicDeploymentResponse[];
873
- } | {
874
- status: 500;
875
- data: ErrorResponse;
876
- } | {
877
- status: 503;
878
- data: ErrorResponse;
879
649
  }>(`/v1/deployments/${encodeURIComponent(applicationId)}`, {
880
- ...opts,
881
- headers: oazapfts.mergeHeaders(opts?.headers, {
882
- Authorization: authorization
883
- })
650
+ ...opts
884
651
  }));
885
652
  }
886
- export function getDeployment({ authorization, deploymentId }: {
887
- authorization: string;
653
+ export function getDeployment({ deploymentId }: {
888
654
  deploymentId: string;
889
655
  }, opts?: Oazapfts.RequestOpts) {
890
656
  return oazapfts.ok(oazapfts.fetchJson<{
891
657
  status: 200;
892
658
  data: DeploymentResponse;
893
- } | {
894
- status: 500;
895
- data: ErrorResponse;
896
- } | {
897
- status: 503;
898
- data: ErrorResponse;
899
659
  }>(`/v1/deployments/details/${encodeURIComponent(deploymentId)}`, {
900
- ...opts,
901
- headers: oazapfts.mergeHeaders(opts?.headers, {
902
- Authorization: authorization
903
- })
660
+ ...opts
904
661
  }));
905
662
  }
906
- export function getApplicationHistory({ authorization, projectId, limit, offset }: {
907
- authorization: string;
663
+ export function getApplicationHistory({ projectId, limit, offset }: {
908
664
  projectId: string;
909
665
  limit?: number;
910
666
  offset?: number;
@@ -912,24 +668,14 @@ export function getApplicationHistory({ authorization, projectId, limit, offset
912
668
  return oazapfts.ok(oazapfts.fetchJson<{
913
669
  status: 200;
914
670
  data: ListApplicationHistoryResponse;
915
- } | {
916
- status: 500;
917
- data: ErrorResponse;
918
- } | {
919
- status: 503;
920
- data: ErrorResponse;
921
671
  }>(`/v1/applications/${encodeURIComponent(projectId)}/history${QS.query(QS.explode({
922
672
  limit,
923
673
  offset
924
674
  }))}`, {
925
- ...opts,
926
- headers: oazapfts.mergeHeaders(opts?.headers, {
927
- Authorization: authorization
928
- })
675
+ ...opts
929
676
  }));
930
677
  }
931
- export function listApplications({ authorization, projectId, limit, offset }: {
932
- authorization: string;
678
+ export function listApplications({ projectId, limit, offset }: {
933
679
  projectId: string;
934
680
  limit?: number;
935
681
  offset?: number;
@@ -937,19 +683,10 @@ export function listApplications({ authorization, projectId, limit, offset }: {
937
683
  return oazapfts.ok(oazapfts.fetchJson<{
938
684
  status: 200;
939
685
  data: ListApplicationsResponse;
940
- } | {
941
- status: 500;
942
- data: ErrorResponse;
943
- } | {
944
- status: 503;
945
- data: ErrorResponse;
946
686
  }>(`/v1/applications/project/${encodeURIComponent(projectId)}${QS.query(QS.explode({
947
687
  limit,
948
688
  offset
949
689
  }))}`, {
950
- ...opts,
951
- headers: oazapfts.mergeHeaders(opts?.headers, {
952
- Authorization: authorization
953
- })
690
+ ...opts
954
691
  }));
955
692
  }