ydb-embedded-ui 4.10.0 → 4.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist/components/InfoViewer/formatters/schema.ts +3 -1
  3. package/dist/components/QueryResultTable/Cell/Cell.tsx +8 -8
  4. package/dist/components/QueryResultTable/i18n/en.json +1 -1
  5. package/dist/components/QueryResultTable/i18n/ru.json +1 -1
  6. package/dist/components/ShortyString/ShortyString.tsx +3 -6
  7. package/dist/components/ShortyString/i18n/en.json +8 -8
  8. package/dist/components/ShortyString/i18n/ru.json +8 -8
  9. package/dist/components/SpeedMultiMeter/i18n/index.ts +0 -2
  10. package/dist/components/Stack/Stack.tsx +16 -16
  11. package/dist/components/TableSkeleton/TableSkeleton.tsx +3 -3
  12. package/dist/components/TableWithControlsLayout/TableWithControlsLayout.scss +32 -0
  13. package/dist/components/TableWithControlsLayout/TableWithControlsLayout.tsx +43 -0
  14. package/dist/containers/AsideNavigation/AsideNavigation.tsx +2 -2
  15. package/dist/containers/Cluster/Cluster.scss +4 -5
  16. package/dist/containers/Cluster/Cluster.tsx +3 -22
  17. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.scss +4 -0
  18. package/dist/containers/Cluster/ClusterInfo/ClusterInfo.tsx +14 -3
  19. package/dist/containers/Cluster/ClusterInfoSkeleton/ClusterInfoSkeleton.tsx +1 -1
  20. package/dist/containers/Cluster/utils.tsx +0 -11
  21. package/dist/containers/Header/Header.scss +1 -5
  22. package/dist/containers/Header/Header.tsx +2 -2
  23. package/dist/containers/Header/breadcrumbs.ts +2 -1
  24. package/dist/containers/Heatmap/Heatmap.tsx +4 -3
  25. package/dist/containers/Node/NodeStructure/PDiskTitleBadge.tsx +2 -8
  26. package/dist/containers/Nodes/Nodes.scss +1 -24
  27. package/dist/containers/Nodes/Nodes.tsx +29 -39
  28. package/dist/containers/Storage/EmptyFilter/i18n/en.json +2 -2
  29. package/dist/containers/Storage/EmptyFilter/i18n/ru.json +2 -2
  30. package/dist/containers/Storage/Storage.scss +1 -14
  31. package/dist/containers/Storage/Storage.tsx +15 -18
  32. package/dist/containers/Storage/StorageGroups/i18n/en.json +5 -5
  33. package/dist/containers/Storage/StorageGroups/i18n/ru.json +5 -5
  34. package/dist/containers/Storage/StorageTypeFilter/StorageTypeFilter.tsx +3 -1
  35. package/dist/containers/Storage/{StorageVisibleEntityFilter/StorageVisibleEntityFilter.tsx → StorageVisibleEntitiesFilter/StorageVisibleEntitiesFilter.tsx} +4 -2
  36. package/dist/containers/Storage/UsageFilter/i18n/en.json +3 -8
  37. package/dist/containers/Storage/UsageFilter/i18n/ru.json +3 -8
  38. package/dist/containers/Tablet/Tablet.tsx +2 -2
  39. package/dist/containers/Tenant/Acl/Acl.scss +1 -9
  40. package/dist/containers/Tenant/Acl/Acl.tsx +137 -0
  41. package/dist/containers/Tenant/Diagnostics/Describe/Describe.tsx +2 -2
  42. package/dist/containers/Tenant/Diagnostics/Diagnostics.scss +6 -2
  43. package/dist/containers/Tenant/Diagnostics/DiagnosticsPages.ts +6 -0
  44. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +3 -3
  45. package/dist/containers/Tenant/Diagnostics/Overview/Overview.tsx +2 -0
  46. package/dist/containers/Tenant/Diagnostics/Overview/utils/prepareTopicSchemaInfo.ts +2 -3
  47. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +3 -18
  48. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.tsx +95 -88
  49. package/dist/containers/Tenant/Query/Issues/Issues.tsx +27 -23
  50. package/dist/containers/Tenant/Query/Issues/models.ts +0 -11
  51. package/dist/containers/Tenant/Query/Preview/Preview.tsx +3 -3
  52. package/dist/containers/Tenant/Query/i18n/en.json +1 -1
  53. package/dist/containers/Tenant/Query/i18n/ru.json +1 -1
  54. package/dist/containers/Tenant/Schema/SchemaTree/SchemaTree.tsx +2 -2
  55. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.tsx +99 -0
  56. package/dist/containers/Tenant/Tenant.tsx +1 -5
  57. package/dist/containers/Tenant/TenantPages.tsx +9 -14
  58. package/dist/containers/Tenant/i18n/en.json +11 -0
  59. package/dist/containers/Tenant/i18n/index.ts +11 -0
  60. package/dist/containers/Tenant/i18n/ru.json +11 -0
  61. package/dist/containers/Tenant/utils/schema.ts +24 -0
  62. package/dist/containers/Tenant/utils/schemaActions.ts +28 -24
  63. package/dist/containers/Tenants/Tenants.scss +1 -13
  64. package/dist/containers/Tenants/Tenants.tsx +18 -28
  65. package/dist/services/api.ts +6 -7
  66. package/dist/store/index.js +1 -1
  67. package/dist/store/reducers/nodes/nodes.ts +12 -111
  68. package/dist/store/reducers/nodes/selectors.ts +74 -0
  69. package/dist/store/reducers/nodes/types.ts +22 -3
  70. package/dist/store/reducers/nodes/utils.ts +59 -0
  71. package/dist/store/reducers/preview.ts +6 -4
  72. package/dist/store/reducers/schemaAcl/schemaAcl.ts +17 -0
  73. package/dist/store/reducers/schemaAcl/types.ts +9 -7
  74. package/dist/store/reducers/storage/selectors.ts +1 -1
  75. package/dist/store/reducers/tenant/constants.ts +6 -0
  76. package/dist/store/reducers/tenant/tenant.ts +15 -0
  77. package/dist/store/reducers/tenant/types.ts +18 -3
  78. package/dist/store/state-url-mapping.js +3 -0
  79. package/dist/types/api/cluster.ts +1 -1
  80. package/dist/types/api/compute.ts +27 -2
  81. package/dist/types/api/error.ts +2 -2
  82. package/dist/types/api/netInfo.ts +3 -3
  83. package/dist/types/api/nodes.ts +13 -1
  84. package/dist/types/api/query.ts +1 -1
  85. package/dist/types/api/schema/cdcStream.ts +32 -0
  86. package/dist/types/api/schema/columnEntity.ts +138 -0
  87. package/dist/types/api/schema/externalDataSource.ts +24 -0
  88. package/dist/types/api/schema/externalTable.ts +14 -0
  89. package/dist/types/api/schema/index.ts +10 -0
  90. package/dist/types/api/schema/persQueueGroup.ts +191 -0
  91. package/dist/types/api/schema/schema.ts +302 -0
  92. package/dist/types/api/schema/shared.ts +42 -0
  93. package/dist/types/api/schema/table.ts +616 -0
  94. package/dist/types/api/schema/tableIndex.ts +33 -0
  95. package/dist/types/api/storage.ts +1 -1
  96. package/dist/types/assets.d.ts +1 -2
  97. package/dist/types/store/executeQuery.ts +2 -3
  98. package/dist/types/store/executeTopQueries.ts +8 -5
  99. package/dist/types/store/explainQuery.ts +4 -4
  100. package/dist/types/store/query.ts +4 -3
  101. package/dist/types/store/shardsWorkload.ts +8 -5
  102. package/dist/utils/constants.ts +4 -1
  103. package/dist/utils/error.ts +2 -3
  104. package/dist/utils/query.ts +3 -9
  105. package/dist/utils/tests/providers.tsx +6 -9
  106. package/package.json +6 -2
  107. package/dist/assets/icons/versions.svg +0 -3
  108. package/dist/containers/Tenant/Acl/Acl.js +0 -153
  109. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +0 -94
  110. package/dist/types/api/schema.ts +0 -1326
@@ -0,0 +1,32 @@
1
+ import type {TPathID} from './shared';
2
+
3
+ export interface TCdcStreamDescription {
4
+ Name?: string;
5
+ Mode?: ECdcStreamMode;
6
+ Format?: ECdcStreamFormat;
7
+ PathId?: TPathID;
8
+ State?: ECdcStreamState;
9
+ /** uint64 */
10
+ SchemaVersion?: string;
11
+ }
12
+
13
+ enum ECdcStreamMode {
14
+ ECdcStreamModeInvalid = 'ECdcStreamModeInvalid',
15
+ ECdcStreamModeKeysOnly = 'ECdcStreamModeKeysOnly',
16
+ ECdcStreamModeUpdate = 'ECdcStreamModeUpdate',
17
+ ECdcStreamModeNewImage = 'ECdcStreamModeNewImage',
18
+ ECdcStreamModeOldImage = 'ECdcStreamModeOldImage',
19
+ ECdcStreamModeNewAndOldImages = 'ECdcStreamModeNewAndOldImages',
20
+ }
21
+
22
+ enum ECdcStreamFormat {
23
+ ECdcStreamFormatInvalid = 'ECdcStreamFormatInvalid',
24
+ ECdcStreamFormatProto = 'ECdcStreamFormatProto',
25
+ ECdcStreamFormatJson = 'ECdcStreamFormatJson',
26
+ }
27
+
28
+ enum ECdcStreamState {
29
+ ECdcStreamStateInvalid = 'ECdcStreamStateInvalid',
30
+ ECdcStreamStateReady = 'ECdcStreamStateReady',
31
+ ECdcStreamStateDisabled = 'ECdcStreamStateDisabled',
32
+ }
@@ -0,0 +1,138 @@
1
+ import type {EColumnCodec, EUnit, TPathID, TStorageSettings, TTypeInfo} from './shared';
2
+
3
+ export interface TColumnTableDescription {
4
+ Name?: string;
5
+
6
+ Schema?: TColumnTableSchema;
7
+ TtlSettings?: TColumnDataLifeCycle;
8
+
9
+ SchemaPresetId?: number;
10
+ SchemaPresetName?: string;
11
+
12
+ ColumnStorePathId?: TPathID;
13
+
14
+ ColumnShardCount?: number;
15
+ Sharding?: TColumnTableSharding;
16
+
17
+ /** uint64 */
18
+ SchemaPresetVersionAdj?: string;
19
+ /** uint64 */
20
+ TtlSettingsPresetVersionAdj?: string;
21
+
22
+ StorageConfig?: TColumnStorageConfig;
23
+ }
24
+
25
+ export interface TColumnStoreDescription {
26
+ Name?: string;
27
+ ColumnShardCount?: number;
28
+
29
+ /** uint64 */
30
+ ColumnShards?: string[];
31
+
32
+ SchemaPresets?: TColumnTableSchemaPreset[];
33
+ StorageConfig?: TColumnStorageConfig;
34
+
35
+ NextSchemaPresetId?: number;
36
+ NextTtlSettingsPresetId?: number;
37
+ }
38
+
39
+ export interface TColumnDataLifeCycle {
40
+ Enabled?: TTtl;
41
+ Disabled?: {};
42
+ Tiering?: TStorageTiering;
43
+
44
+ /** uint64 */
45
+ Version?: string;
46
+ }
47
+
48
+ interface TColumnStorageConfig {
49
+ SysLog?: TStorageSettings;
50
+ Log?: TStorageSettings;
51
+ Data?: TStorageSettings;
52
+ DataChannelCount?: number;
53
+ }
54
+
55
+ interface TStorageTiering {
56
+ Tiers?: TStorageTier[];
57
+ }
58
+
59
+ interface TStorageTier {
60
+ Name?: string;
61
+ Eviction?: TTtl;
62
+ }
63
+
64
+ interface TTtl {
65
+ ColumnName?: string;
66
+
67
+ ExpireAfterSeconds?: number;
68
+
69
+ /** uint64 */
70
+ ExpireAfterBytes?: string;
71
+
72
+ ColumnUnit?: EUnit;
73
+ }
74
+
75
+ interface TColumnTableSchema {
76
+ Columns?: TOlapColumnDescription[];
77
+ KeyColumnNames?: string[];
78
+ Engine?: EColumnTableEngine;
79
+ NextColumnId?: number;
80
+
81
+ /** uint64 */
82
+ Version?: string;
83
+
84
+ DefaultCompression?: TCompressionOptions;
85
+ EnableTiering?: boolean;
86
+ }
87
+
88
+ interface TColumnTableSchemaPreset {
89
+ Id?: number;
90
+ Name?: string;
91
+ Schema?: TColumnTableSchema;
92
+ }
93
+
94
+ interface TOlapColumnDescription {
95
+ Id?: number;
96
+ Name?: string;
97
+ Type?: string;
98
+ TypeId?: number;
99
+ TypeInfo?: TTypeInfo;
100
+ }
101
+
102
+ interface TColumnTableSharding {
103
+ /** uint64 */
104
+ Version?: string;
105
+
106
+ /** uint64 */
107
+ ColumnShards?: string[];
108
+
109
+ /** uint64 */
110
+ AdditionalColumnShards?: string[];
111
+
112
+ UniquePrimaryKey?: boolean;
113
+
114
+ RandomSharding?: {};
115
+ HashSharding?: THashSharding;
116
+ }
117
+
118
+ interface THashSharding {
119
+ Function?: EHashFunction;
120
+ Columns?: string[];
121
+ UniqueShardKey?: boolean;
122
+ ActiveShardsCount?: number;
123
+ }
124
+
125
+ interface TCompressionOptions {
126
+ CompressionCodec?: EColumnCodec;
127
+ CompressionLevel?: number;
128
+ }
129
+
130
+ enum EHashFunction {
131
+ HASH_FUNCTION_MODULO_N = 'HASH_FUNCTION_MODULO_N',
132
+ HASH_FUNCTION_CLOUD_LOGS = 'HASH_FUNCTION_CLOUD_LOGS',
133
+ }
134
+
135
+ enum EColumnTableEngine {
136
+ COLUMN_ENGINE_NONE = 'COLUMN_ENGINE_NONE',
137
+ COLUMN_ENGINE_REPLACING_TIMESERIES = 'COLUMN_ENGINE_REPLACING_TIMESERIES',
138
+ }
@@ -0,0 +1,24 @@
1
+ import type {TPathID} from './shared';
2
+
3
+ export interface TExternalDataSourceDescription {
4
+ Name?: string;
5
+ PathId?: TPathID;
6
+ /** uint64 */
7
+ Version?: string;
8
+ SourceType?: string;
9
+ Location?: string;
10
+ Installation?: string;
11
+ Auth?: TAuth;
12
+ }
13
+
14
+ interface TAuth {
15
+ None?: NoneAuth;
16
+ ServiceAccount?: ServiceAccountAuth;
17
+ }
18
+
19
+ interface NoneAuth {}
20
+
21
+ interface ServiceAccountAuth {
22
+ Id?: string;
23
+ SecretName?: string;
24
+ }
@@ -0,0 +1,14 @@
1
+ import type {TColumnDescription, TPathID} from './shared';
2
+
3
+ export interface TExternalTableDescription {
4
+ Name?: string;
5
+ PathId?: TPathID;
6
+ /** uint64 */
7
+ Version?: string;
8
+ SourceType?: string;
9
+ DataSourcePath?: string;
10
+ Location?: string;
11
+ Columns?: TColumnDescription[];
12
+ /** bytes */
13
+ Content?: unknown;
14
+ }
@@ -0,0 +1,10 @@
1
+ export * from './schema';
2
+ export * from './shared';
3
+
4
+ export * from './cdcStream';
5
+ export * from './columnEntity';
6
+ export * from './externalDataSource';
7
+ export * from './externalTable';
8
+ export * from './persQueueGroup';
9
+ export * from './table';
10
+ export * from './tableIndex';
@@ -0,0 +1,191 @@
1
+ export interface TPersQueueGroupDescription {
2
+ Name: string;
3
+ /** uint64 */
4
+ PathId?: string;
5
+ TotalGroupCount: number;
6
+
7
+ PartitionsToAdd?: TPartitionToAdd[];
8
+ PartitionsToDelete?: number[];
9
+ NextPartitionId?: number;
10
+ PartitionPerTablet?: number;
11
+ PQTabletConfig: TPQTabletConfig;
12
+ Partitions?: TPartition[];
13
+ /** uint64 */
14
+ AlterVersion?: string;
15
+ /** uint64 */
16
+ BalancerTabletID?: string;
17
+
18
+ PartitionBoundaries?: unknown;
19
+
20
+ BootstrapConfig?: TBootstrapConfig;
21
+ }
22
+
23
+ export interface TPQTabletConfig {
24
+ /** uint64 */
25
+ CacheSize?: string;
26
+ PartitionConfig: TPQPartitionConfig;
27
+ /** @deprecated use Partitions */
28
+ PartitionIds?: number[];
29
+ TopicName?: string;
30
+ Version?: number;
31
+ LocalDC?: boolean;
32
+ RequireAuthWrite?: boolean;
33
+ RequireAuthRead?: boolean;
34
+ Producer?: string;
35
+ Ident?: string;
36
+ Topic?: string;
37
+ DC?: string;
38
+
39
+ ReadRules?: string[];
40
+ /** uint64[] */
41
+ ReadFromTimestampsMs?: number[];
42
+ /** uint64[] */
43
+ ConsumerFormatVersions?: number[];
44
+
45
+ ConsumerCodecs?: TCodecs[];
46
+ ReadRuleServiceTypes?: string;
47
+
48
+ /** uint64 */
49
+ FormatVersion?: string;
50
+ Codecs?: TCodecs;
51
+
52
+ /** uint64[] */
53
+ ReadRuleVersions?: string[];
54
+ /** uint64[] */
55
+ ReadRuleGenerations?: string[];
56
+
57
+ TopicPath?: string;
58
+
59
+ YcCloudId?: string;
60
+ YcFolderId?: string;
61
+ YdbDatabaseId?: string;
62
+ YdbDatabasePath?: string;
63
+ FederationAccount?: string;
64
+
65
+ PartitionKeySchema?: TKeyComponentSchema[];
66
+
67
+ Partitions?: TPartition[];
68
+
69
+ MeteringMode?: EMeteringMode;
70
+ }
71
+
72
+ export interface TPQPartitionConfig {
73
+ MaxCountInPartition?: number;
74
+ /** int64 */
75
+ MaxSizeInPartition?: string;
76
+ LifetimeSeconds: number;
77
+ /** uint64 */
78
+ StorageLimitBytes?: string;
79
+
80
+ ImportantClientId?: string[];
81
+ LowWatermark?: number;
82
+ SourceIdLifetimeSeconds?: number;
83
+ SourceIdMaxCounts?: number;
84
+
85
+ /** uint64 */
86
+ WriteSpeedInBytesPerSecond?: string;
87
+ /** uint64 */
88
+ BurstSize?: string;
89
+
90
+ ReadQuota?: TReadQuota[];
91
+ /** uint64 */
92
+ MaxWriteInflightSize?: string;
93
+ /** uint64 */
94
+ BorderWriteInflightSize?: string;
95
+
96
+ NumChannels?: number;
97
+
98
+ TotalPartitions?: number;
99
+
100
+ ExplicitChannelProfiles?: TChannelProfile[];
101
+
102
+ MirrorFrom?: TMirrorPartitionConfig;
103
+ }
104
+
105
+ interface TMirrorPartitionConfig {
106
+ Endpoint?: string;
107
+ EndpointPort?: number;
108
+ Topic?: string;
109
+ Consumer?: string;
110
+ /** uint64 */
111
+ ReadFromTimestampsMs?: string;
112
+ Credentials?: TCredentials;
113
+ Database?: string;
114
+ UseSecureConnection?: boolean;
115
+ SyncWriteTime?: boolean;
116
+ }
117
+
118
+ interface TChannelProfile {
119
+ PoolKind?: string;
120
+ /** uint64 */
121
+ Size?: string;
122
+ ReadIops?: number;
123
+ ReadBandwidth?: number;
124
+ WriteIops?: number;
125
+ WriteBandwidth?: number;
126
+ }
127
+
128
+ interface IamCredentials {
129
+ Endpoint?: string;
130
+ ServiceAccountKey?: string;
131
+ }
132
+
133
+ interface TCredentials {
134
+ OauthToken?: string;
135
+ JwtParams?: string;
136
+ Iam?: IamCredentials;
137
+ }
138
+
139
+ interface TBootstrapConfig {
140
+ ExplicitMessageGroups?: TMessageGroup[];
141
+ }
142
+
143
+ interface TMessageGroup {
144
+ // Id of message group (SourceId)
145
+ Id?: string;
146
+ // Range of the key to which it is allowed to write.
147
+ KeyRange?: TPartitionKeyRange;
148
+ }
149
+
150
+ interface TKeyComponentSchema {
151
+ Name?: string;
152
+ TypeId?: number;
153
+ }
154
+
155
+ interface TReadQuota {
156
+ ClientId?: string;
157
+ /** uint64 */
158
+ SpeedInBytesPerSecond?: string;
159
+ /** uint64 */
160
+ BurstSize?: string;
161
+ }
162
+
163
+ interface TPartition {
164
+ PartitionId?: number;
165
+ /** uint64 */
166
+ TabletId?: string;
167
+ KeyRange?: TPartitionKeyRange;
168
+ }
169
+
170
+ interface TPartitionToAdd {
171
+ PartitionId?: number;
172
+ GroupId?: number;
173
+ }
174
+
175
+ interface TCodecs {
176
+ /** int64 */
177
+ Ids?: string[];
178
+ Codecs?: string[];
179
+ }
180
+
181
+ interface TPartitionKeyRange {
182
+ // Inclusive left border. Emptiness means -inf.
183
+ FromBound?: string;
184
+ // Exclusive right border. Emptiness means +inf.
185
+ ToBound?: string;
186
+ }
187
+
188
+ export enum EMeteringMode {
189
+ METERING_MODE_RESERVED_CAPACITY = 'METERING_MODE_RESERVED_CAPACITY',
190
+ METERING_MODE_REQUEST_UNITS = 'METERING_MODE_REQUEST_UNITS',
191
+ }
@@ -0,0 +1,302 @@
1
+ import type {TMetrics} from '../tenant';
2
+
3
+ import type {TCdcStreamDescription} from './cdcStream';
4
+ import type {TColumnStoreDescription, TColumnTableDescription} from './columnEntity';
5
+ import type {TExternalDataSourceDescription} from './externalDataSource';
6
+ import type {TExternalTableDescription} from './externalTable';
7
+ import type {TPersQueueGroupDescription} from './persQueueGroup';
8
+ import type {TTableDescription, TTableStats} from './table';
9
+ import type {TIndexDescription} from './tableIndex';
10
+
11
+ /**
12
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/flat_tx_scheme.proto
13
+ */
14
+ export interface TEvDescribeSchemeResult {
15
+ Status?: EStatus;
16
+ Reason?: string;
17
+ Path?: string;
18
+ PathDescription?: TPathDescription;
19
+ /** fixed64 */
20
+ PathOwner?: string;
21
+ /** fixed64 */
22
+ PathId?: string;
23
+
24
+ LastExistedPrefixPath?: string;
25
+ /** fixed64 */
26
+ LastExistedPrefixPathId?: string;
27
+ LastExistedPrefixDescription?: TPathDescription;
28
+ /** fixed64 */
29
+ PathOwnerId?: string;
30
+ }
31
+
32
+ enum EStatus {
33
+ StatusSuccess = 'StatusSuccess',
34
+ StatusAccepted = 'StatusAccepted',
35
+ StatusPathDoesNotExist = 'StatusPathDoesNotExist',
36
+ StatusPathIsNotDirectory = 'StatusPathIsNotDirectory',
37
+ StatusAlreadyExists = 'StatusAlreadyExists',
38
+ StatusSchemeError = 'StatusSchemeError',
39
+ StatusNameConflict = 'StatusNameConflict',
40
+ StatusInvalidParameter = 'StatusInvalidParameter',
41
+ StatusMultipleModifications = 'StatusMultipleModifications',
42
+ StatusReadOnly = 'StatusReadOnly',
43
+ StatusTxIdNotExists = 'StatusTxIdNotExists',
44
+ StatusTxIsNotCancellable = 'StatusTxIsNotCancellable',
45
+ StatusAccessDenied = 'StatusAccessDenied',
46
+ StatusNotAvailable = 'StatusNotAvailable',
47
+ StatusPreconditionFailed = 'StatusPreconditionFailed',
48
+ StatusRedirectDomain = 'StatusRedirectDomain',
49
+ StatusQuotaExceeded = 'StatusQuotaExceeded',
50
+ StatusResourceExhausted = 'StatusResourceExhausted',
51
+ }
52
+
53
+ /**
54
+ * source: https://github.com/ydb-platform/ydb/blob/main/ydb/core/protos/flat_scheme_op.proto
55
+ *
56
+ * incomplete interface, only currently used fields are covered
57
+ */
58
+ export interface TPathDescription {
59
+ /** info about the path itself */
60
+ Self?: TDirEntry;
61
+ DomainDescription?: TDomainDescription;
62
+
63
+ // for directory
64
+ Children?: TDirEntry[];
65
+
66
+ // for table
67
+ Table?: TTableDescription;
68
+ TableStats?: TTableStats;
69
+ TabletMetrics?: TMetrics;
70
+ TablePartitions?: TTablePartition[];
71
+ TablePartitionStats?: TTableStats[];
72
+ TablePartitionMetrics?: TMetrics[];
73
+
74
+ ColumnStoreDescription?: TColumnStoreDescription;
75
+ ColumnTableDescription?: TColumnTableDescription;
76
+
77
+ TableIndex?: TIndexDescription;
78
+
79
+ CdcStreamDescription?: TCdcStreamDescription;
80
+ PersQueueGroup?: TPersQueueGroupDescription;
81
+
82
+ ExternalTableDescription?: TExternalTableDescription;
83
+ ExternalDataSourceDescription?: TExternalDataSourceDescription;
84
+ }
85
+
86
+ export interface TDirEntry {
87
+ Name?: string;
88
+ /** uint64 */
89
+ PathId?: string;
90
+ /** uint64 */
91
+ SchemeshardId?: string;
92
+ PathType?: EPathType;
93
+ CreateFinished?: boolean;
94
+ /** uint64 */
95
+ CreateTxId?: string;
96
+ /** uint64 */
97
+ CreateStep?: string;
98
+ /** uint64 */
99
+ ParentPathId?: string;
100
+ PathState?: EPathState;
101
+ Owner?: string;
102
+ ACL?: string;
103
+ EffectiveACL?: string;
104
+ /** uint64 */
105
+ PathVersion?: string;
106
+ PathSubType?: EPathSubType;
107
+ Version?: TPathVersion;
108
+ }
109
+
110
+ interface TDomainDescription {
111
+ ProcessingParams?: TProcessingParams;
112
+
113
+ DomainKey?: TDomainKey;
114
+
115
+ StoragePools?: TStoragePool[];
116
+
117
+ /** uint64 */
118
+ PathsInside?: string;
119
+ /** uint64 */
120
+ PathsLimit?: string;
121
+ /** uint64 */
122
+ ShardsInside?: string;
123
+ /** uint64 */
124
+ ShardsLimit?: string;
125
+
126
+ ResourcesDomainKey?: TDomainKey;
127
+
128
+ DiskSpaceUsage?: TDiskSpaceUsage;
129
+
130
+ /** uint64 */
131
+ PQPartitionsInside?: string;
132
+ /** uint64 */
133
+ PQPartitionsLimit?: string;
134
+
135
+ DomainState?: TDomainState;
136
+
137
+ DeclaredSchemeQuotas?: TSchemeQuotas;
138
+ DatabaseQuotas?: DatabaseQuotas;
139
+ SecurityState?: TSecurityState;
140
+ }
141
+
142
+ interface TDomainKey {
143
+ /** fixed64 */
144
+ SchemeShard?: string;
145
+ /** fixed64 */
146
+ PathId?: string;
147
+ }
148
+
149
+ interface TProcessingParams {
150
+ Version?: number;
151
+ /** uint64 */
152
+ PlanResolution?: string;
153
+ /** fixed64 */
154
+ Coordinators?: string[];
155
+ /** uint64 */
156
+ TimeCastBucketsPerMediator?: string;
157
+ /** fixed64 */
158
+ Mediators?: string[];
159
+ /** fixed64 */
160
+ SchemeShard?: string;
161
+ /** fixed64 */
162
+ Hive?: string;
163
+ /** fixed64 */
164
+ SysViewProcessor?: string;
165
+ }
166
+
167
+ interface TDomainState {
168
+ DiskQuotaExceeded?: boolean;
169
+ }
170
+
171
+ interface TDiskSpaceUsage {
172
+ Tables?: TTables;
173
+ }
174
+
175
+ interface TTables {
176
+ /** uint64 */
177
+ TotalSize?: string;
178
+ /** uint64 */
179
+ DataSize?: string;
180
+ /** uint64 */
181
+ IndexSize?: string;
182
+ }
183
+
184
+ interface TStoragePool {
185
+ Name?: string;
186
+ Kind?: string;
187
+ }
188
+
189
+ interface TSchemeQuotas {
190
+ SchemeQuotas?: TSchemeQuota[];
191
+ }
192
+
193
+ interface TSchemeQuota {
194
+ /** double */
195
+ BucketSize?: number;
196
+ /** uint64 */
197
+ BucketSeconds?: string;
198
+ }
199
+
200
+ interface TSecurityState {
201
+ PublicKeys?: TPublicKey[];
202
+ Sids?: TSid[];
203
+ Audience: string;
204
+ }
205
+
206
+ interface TPublicKey {
207
+ /** uint64 */
208
+ KeyId: string;
209
+ KeyDataPEM: string;
210
+ /** uint64 */
211
+ ExpiresAt: string;
212
+ }
213
+
214
+ interface TSid {
215
+ Name: string;
216
+ Type: SidType;
217
+
218
+ Hash: string;
219
+ Members?: string[];
220
+ }
221
+
222
+ enum SidType {
223
+ 'UNKNOWN' = 'UNKNOWN',
224
+ 'USER' = 'USER',
225
+ 'GROUP' = 'GROUP',
226
+ }
227
+
228
+ interface DatabaseQuotas {
229
+ /** uint64 */
230
+ // eslint-disable-next-line camelcase
231
+ data_size_hard_quota: string;
232
+
233
+ /** uint64 */
234
+ // eslint-disable-next-line camelcase
235
+ data_size_soft_quota: string;
236
+
237
+ /** uint64 */
238
+ // eslint-disable-next-line camelcase
239
+ data_stream_shards_quota: string;
240
+
241
+ /** uint64 */
242
+ // eslint-disable-next-line camelcase
243
+ data_stream_reserved_storage_quota: string;
244
+
245
+ // eslint-disable-next-line camelcase
246
+ ttl_min_run_internal_seconds: number;
247
+ }
248
+
249
+ // incomplete
250
+ export enum EPathType {
251
+ EPathTypeInvalid = 'EPathTypeInvalid',
252
+ EPathTypeDir = 'EPathTypeDir',
253
+ EPathTypeTable = 'EPathTypeTable',
254
+ EPathTypePersQueueGroup = 'EPathTypePersQueueGroup',
255
+ EPathTypeSubDomain = 'EPathTypeSubDomain',
256
+
257
+ EPathTypeTableIndex = 'EPathTypeTableIndex',
258
+ EPathTypeExtSubDomain = 'EPathTypeExtSubDomain',
259
+
260
+ EPathTypeColumnStore = 'EPathTypeColumnStore',
261
+ EPathTypeColumnTable = 'EPathTypeColumnTable',
262
+ EPathTypeCdcStream = 'EPathTypeCdcStream',
263
+
264
+ EPathTypeExternalDataSource = 'EPathTypeExternalDataSource',
265
+ EPathTypeExternalTable = 'EPathTypeExternalTable',
266
+ }
267
+
268
+ export enum EPathSubType {
269
+ EPathSubTypeEmpty = 'EPathSubTypeEmpty',
270
+ EPathSubTypeSyncIndexImplTable = 'EPathSubTypeSyncIndexImplTable',
271
+ EPathSubTypeAsyncIndexImplTable = 'EPathSubTypeAsyncIndexImplTable',
272
+ EPathSubTypeStreamImpl = 'EPathSubTypeStreamImpl',
273
+ }
274
+
275
+ enum EPathState {
276
+ EPathStateNotExist = 'EPathStateNotExist',
277
+ EPathStateNoChanges = 'EPathStateNoChanges',
278
+ EPathStateCreate = 'EPathStateCreate',
279
+ EPathStateAlter = 'EPathStateAlter',
280
+ EPathStateDrop = 'EPathStateDrop',
281
+ EPathStateCopying = 'EPathStateCopying',
282
+ EPathStateBackup = 'EPathStateBackup',
283
+ EPathStateUpgrade = 'EPathStateUpgrade',
284
+ EPathStateMigrated = 'EPathStateMigrated',
285
+ EPathStateRestore = 'EPathStateRestore',
286
+ EPathStateMoving = 'EPathStateMoving',
287
+ }
288
+
289
+ // incomplete
290
+ interface TPathVersion {
291
+ /** uint64 */
292
+ GeneralVersion?: string;
293
+ }
294
+
295
+ interface TTablePartition {
296
+ /** bytes */
297
+ EndOfRangeKeyPrefix?: unknown;
298
+ IsPoint?: boolean;
299
+ IsInclusive?: boolean;
300
+ /** uint64 */
301
+ DatashardId?: string;
302
+ }