node-cnb 1.4.0 → 1.6.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.
package/src/types.d.ts CHANGED
@@ -488,25 +488,39 @@ made available for inspection by other applications.*/
488
488
  version: string;
489
489
  };
490
490
 
491
- export type ConstantAccessRole = number;
491
+ export type ConstantAccessRole = 0 | 10 | 20 | 30 | 40 | 50;
492
492
 
493
- export type ConstantActivityType = string;
493
+ export type ConstantActivityType =
494
+ | "mine"
495
+ | "fork"
496
+ | "follow"
497
+ | "star"
498
+ | "join_group"
499
+ | "create_repo"
500
+ | "user_create_release"
501
+ | "repo_create_release"
502
+ | "user_deploy_success"
503
+ | "repo_deploy_success";
494
504
 
495
- export type ConstantChargeResType = string;
505
+ export type ConstantChargeResType =
506
+ | "charge_type_git"
507
+ | "charge_type_object"
508
+ | "charge_type_ci"
509
+ | "charge_type_dev";
496
510
 
497
- export type ConstantRepoDisplayModule = number;
511
+ export type ConstantRepoDisplayModule = 1 | 2 | 4;
498
512
 
499
- export type ConstantRepoStatus = number;
513
+ export type ConstantRepoStatus = 0 | 1 | 2;
500
514
 
501
- export type ConstantSearchResourceType = number;
515
+ export type ConstantSearchResourceType = 0 | 1 | 2 | 3 | 4 | 5;
502
516
 
503
- export type ConstantSlugType = number;
517
+ export type ConstantSlugType = 0 | 1 | 2 | 3 | 4;
504
518
 
505
- export type ConstantUserEditable = number;
519
+ export type ConstantUserEditable = 1 | 2 | 4 | 8 | 16;
506
520
 
507
- export type ConstantUserType = number;
521
+ export type ConstantUserType = 0 | 1 | 2 | 3;
508
522
 
509
- export type ConstantVisibility = number;
523
+ export type ConstantVisibility = 0 | 10 | 20;
510
524
 
511
525
  export type ConvertNullTime = {
512
526
  time: string;
@@ -824,7 +838,7 @@ export type DtoBuildStatusResult = {
824
838
  };
825
839
 
826
840
  export type DtoCnbRegistry = {
827
- artifact_policy: string;
841
+ artifact_policy: "all" | "snapshot" | "release";
828
842
  created_at: string;
829
843
  description: string;
830
844
  freeze: boolean;
@@ -833,7 +847,7 @@ export type DtoCnbRegistry = {
833
847
  last_push_time: string;
834
848
  last_push_user: DtoUsers;
835
849
  name: string;
836
- overwrite_policy: string;
850
+ overwrite_policy: "forbid" | "allow";
837
851
  pkg_count: number;
838
852
  updated_at: string;
839
853
  used_size: number;
@@ -884,9 +898,9 @@ export type DtoCheckStarResponse = {
884
898
  is_star: boolean;
885
899
  };
886
900
 
887
- export type DtoCleanPolicy = string;
901
+ export type DtoCleanPolicy = "pull_time" | "push_time";
888
902
 
889
- export type DtoCleanPolicyStatus = string;
903
+ export type DtoCleanPolicyStatus = "enabled" | "disabled";
890
904
 
891
905
  export type DtoContainerAnnotation = {
892
906
  revision: string;
@@ -944,7 +958,7 @@ export type DtoCopyReq = {
944
958
  description: string;
945
959
  group: string;
946
960
  name: string;
947
- visibility: string;
961
+ visibility: "public" | "private";
948
962
  };
949
963
 
950
964
  export type DtoCountResponse = {
@@ -979,23 +993,23 @@ export type DtoCreateMissionReq = {
979
993
  description: string;
980
994
  name: string;
981
995
  repos: string[];
982
- visibility: string;
996
+ visibility: "public" | "private";
983
997
  };
984
998
 
985
999
  export type DtoCreateRegistryReq = {
986
- artifact_policy: string;
1000
+ artifact_policy: "all" | "snapshot" | "release";
987
1001
  description: string;
988
1002
  kind: string;
989
1003
  name: string;
990
- overwrite_policy: string;
991
- visibility: string;
1004
+ overwrite_policy: "forbid" | "allow";
1005
+ visibility: "public" | "private";
992
1006
  };
993
1007
 
994
1008
  export type DtoCreateRepoReq = {
995
1009
  description: string;
996
1010
  license: string;
997
1011
  name: string;
998
- visibility: string;
1012
+ visibility: "public" | "private";
999
1013
  };
1000
1014
 
1001
1015
  export type DtoDependency = {
@@ -1090,7 +1104,7 @@ export type DtoInheritMembersUser = {
1090
1104
  verified_expire_in: string;
1091
1105
  };
1092
1106
 
1093
- export type DtoInteractionType = string;
1107
+ export type DtoInteractionType = "radio" | "checkbox" | "time_selector";
1094
1108
 
1095
1109
  export type DtoInvitation = {
1096
1110
  count: number;
@@ -1485,7 +1499,7 @@ export type DtoOutsideCollaboratorInRepo = {
1485
1499
  verified_expire_in: string;
1486
1500
  };
1487
1501
 
1488
- export type DtoOverwritePolicy = string;
1502
+ export type DtoOverwritePolicy = "forbid" | "allow";
1489
1503
 
1490
1504
  export type DtoPack = {
1491
1505
  name: string;
@@ -1496,7 +1510,7 @@ export type DtoPack = {
1496
1510
  type: DtoPackType;
1497
1511
  };
1498
1512
 
1499
- export type DtoPackType = number;
1513
+ export type DtoPackType = -1 | 0 | 255;
1500
1514
 
1501
1515
  export type DtoPackage = {
1502
1516
  count: number;
@@ -1519,7 +1533,13 @@ export type DtoPackageDetail = {
1519
1533
  ohpm: DtoOhpmPackageDetail;
1520
1534
  };
1521
1535
 
1522
- export type DtoPackageType = string;
1536
+ export type DtoPackageType =
1537
+ | "all"
1538
+ | "docker"
1539
+ | "helm"
1540
+ | "npm"
1541
+ | "maven"
1542
+ | "ohpm";
1523
1543
 
1524
1544
  export type DtoPipelineStatus = {
1525
1545
  /**流水线耗时*/
@@ -1570,7 +1590,7 @@ export type DtoQuotaRsp = {
1570
1590
 
1571
1591
  export type DtoRegistry4User = {
1572
1592
  access: any;
1573
- artifact_policy: string;
1593
+ artifact_policy: "all" | "snapshot" | "release";
1574
1594
  created_at: string;
1575
1595
  description: string;
1576
1596
  freeze: boolean;
@@ -1579,7 +1599,7 @@ export type DtoRegistry4User = {
1579
1599
  last_push_time: string;
1580
1600
  last_push_user: DtoUsers;
1581
1601
  name: string;
1582
- overwrite_policy: string;
1602
+ overwrite_policy: "forbid" | "allow";
1583
1603
  path: string;
1584
1604
  pkg_count: number;
1585
1605
  star_time: string;
@@ -1743,7 +1763,7 @@ export type DtoResourceMission = {
1743
1763
  };
1744
1764
 
1745
1765
  export type DtoResourceRegistry = {
1746
- artifact_policy: string;
1766
+ artifact_policy: "all" | "snapshot" | "release";
1747
1767
  created_at: string;
1748
1768
  description: string;
1749
1769
  freeze: boolean;
@@ -1752,7 +1772,7 @@ export type DtoResourceRegistry = {
1752
1772
  last_push_time: string;
1753
1773
  last_push_user: DtoUsers;
1754
1774
  name: string;
1755
- overwrite_policy: string;
1775
+ overwrite_policy: "forbid" | "allow";
1756
1776
  path: string;
1757
1777
  pkg_count: number;
1758
1778
  updated_at: string;
@@ -1945,7 +1965,7 @@ export type DtoUserEmailPayload = {
1945
1965
  email: string;
1946
1966
  };
1947
1967
 
1948
- export type DtoUserEmailType = string;
1968
+ export type DtoUserEmailType = "git" | "contact";
1949
1969
 
1950
1970
  export type DtoUserEmailWithCodePayload = {
1951
1971
  code: string;
@@ -2101,7 +2121,7 @@ export type DtoUsersWithAccessLevelInSlug = {
2101
2121
  verified_expire_in: string;
2102
2122
  };
2103
2123
 
2104
- export type DtoVersionPolicy = string;
2124
+ export type DtoVersionPolicy = "all" | "snapshot" | "release";
2105
2125
 
2106
2126
  export type DtoVolumeUsed = any;
2107
2127