Skip to content

Commit e60799e

Browse files
committed
fix: number type instead of string for uint32
1 parent 09f8e08 commit e60799e

File tree

2 files changed

+19
-40
lines changed

2 files changed

+19
-40
lines changed

src/types/api/schema.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,27 +91,19 @@ export interface TTableDescription {
9191
export interface TPartitionConfig {
9292
/** uint64 */
9393
FollowerCount?: string;
94-
/**
95-
* uint32
96-
* @deprecated use FollowerGroups
97-
*/
98-
CrossDataCenterFollowerCount?: string;
94+
/** @deprecated use FollowerGroups */
95+
CrossDataCenterFollowerCount?: number;
9996
/** 0 or 1 items */
10097
FollowerGroups?: TFollowerGroup[];
10198
}
10299

103100
export interface TFollowerGroup {
104-
/** uint32 */
105-
FollowerCount?: string;
101+
FollowerCount?: number;
106102
AllowLeaderPromotion?: boolean;
107103
AllowClientRead?: boolean;
108-
/** uint32[] */
109-
AllowedNodeIDs?: string[];
110-
/**
111-
* uint32[]
112-
* @deprecated use AllowedDataCenters
113-
*/
114-
AllowedDataCenterNumIDs?: string[];
104+
AllowedNodeIDs?: number[];
105+
/** @deprecated use AllowedDataCenters */
106+
AllowedDataCenterNumIDs?: number[];
115107
RequireAllDataCenters?: boolean;
116108
LocalNodeOnly?: boolean;
117109
RequireDifferentNodes?: boolean;

src/types/api/storage.ts

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@ export enum EVDiskState {
6464

6565
interface TRank {
6666
/**
67-
* uint32
6867
* Rank in percents; 0-100% is good; >100% is bad.
6968
* Formula for rank calculation is the following:
7069
* Rank = actual_value / max_allowed_value * 100
7170
*/
72-
RankPercent?: string;
71+
RankPercent?: number;
7372

7473
/**
7574
* Flag is the Rank transformed to something simple
@@ -84,25 +83,17 @@ interface TVDiskSatisfactionRank {
8483
}
8584

8685
interface TVDiskID {
87-
/** uint32 */
88-
GroupID?: string;
89-
/** uint32 */
90-
GroupGeneration?: string;
91-
/** uint32 */
92-
Ring?: string;
93-
/** uint32 */
94-
Domain?: string;
95-
/** uint32 */
96-
VDisk?: string;
86+
GroupID?: number;
87+
GroupGeneration?: number;
88+
Ring?: number;
89+
Domain?: number;
90+
VDisk?: number;
9791
}
9892

9993
export interface TVSlotId {
100-
/** uint32 */
101-
NodeId?: string;
102-
/** uint32 */
103-
PDiskId?: string;
104-
/** uint32 */
105-
VSlotId?: string;
94+
NodeId?: number;
95+
PDiskId?: number;
96+
VSlotId?: number;
10697
}
10798

10899
export interface TVDiskStateInfo {
@@ -111,18 +102,14 @@ export interface TVDiskStateInfo {
111102
CreateTime?: string;
112103
/** uint64 */
113104
ChangeTime?: string;
114-
/** uint32 */
115-
PDiskId?: string;
116-
/** uint32 */
117-
VDiskSlotId?: string;
105+
PDiskId?: number;
106+
VDiskSlotId?: number;
118107
/** uint64 */
119108
Guid?: string;
120109
/** uint64 */
121110
Kind?: string;
122-
/** uint32 */
123-
NodeId?: string;
124-
/** uint32 */
125-
Count?: string;
111+
NodeId?: number;
112+
Count?: number;
126113

127114
Overall?: EFlag;
128115

0 commit comments

Comments
 (0)